summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/debugger/debuggdbstub.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/modules/debugger/debuggdbstub.cpp')
-rw-r--r--src/osd/modules/debugger/debuggdbstub.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/osd/modules/debugger/debuggdbstub.cpp b/src/osd/modules/debugger/debuggdbstub.cpp
index c521bd0d463..1787d3857a6 100644
--- a/src/osd/modules/debugger/debuggdbstub.cpp
+++ b/src/osd/modules/debugger/debuggdbstub.cpp
@@ -1037,35 +1037,35 @@ void debug_gdbstub::handle_packet(void)
//-------------------------------------------------------------------------
#define BYTESWAP_64(x) ((((x) << 56) & 0xFF00000000000000) \
- | (((x) << 40) & 0x00FF000000000000) \
- | (((x) << 24) & 0x0000FF0000000000) \
- | (((x) << 8) & 0x000000FF00000000) \
- | (((x) >> 8) & 0x00000000FF000000) \
- | (((x) >> 24) & 0x0000000000FF0000) \
- | (((x) >> 40) & 0x000000000000FF00) \
- | (((x) >> 56) & 0x00000000000000FF))
+ | (((x) << 40) & 0x00FF000000000000) \
+ | (((x) << 24) & 0x0000FF0000000000) \
+ | (((x) << 8) & 0x000000FF00000000) \
+ | (((x) >> 8) & 0x00000000FF000000) \
+ | (((x) >> 24) & 0x0000000000FF0000) \
+ | (((x) >> 40) & 0x000000000000FF00) \
+ | (((x) >> 56) & 0x00000000000000FF))
#define BYTESWAP_32(x) ((((x) << 24) & 0xFF000000) \
- | (((x) << 8) & 0x00FF0000) \
- | (((x) >> 8) & 0x0000FF00) \
- | (((x) >> 24) & 0x000000FF))
+ | (((x) << 8) & 0x00FF0000) \
+ | (((x) >> 8) & 0x0000FF00) \
+ | (((x) >> 24) & 0x000000FF))
#define BYTESWAP_16(x) ((((x) << 8) & 0xFF00) \
- | (((x) >> 8) & 0x00FF))
+ | (((x) >> 8) & 0x00FF))
//-------------------------------------------------------------------------
std::string debug_gdbstub::get_register_string(int gdb_regnum)
{
const gdb_register &reg = m_gdb_registers[gdb_regnum];
const char *fmt = (reg.gdb_bitsize == 64) ? "%016" PRIx64
- : (reg.gdb_bitsize == 32) ? "%08" PRIx64
- : (reg.gdb_bitsize == 16) ? "%04" PRIx64
- : "%02" PRIx64;
+ : (reg.gdb_bitsize == 32) ? "%08" PRIx64
+ : (reg.gdb_bitsize == 16) ? "%04" PRIx64
+ : "%02" PRIx64;
uint64_t value = m_state->state_int(reg.state_index);
if ( !m_is_be )
{
value = (reg.gdb_bitsize == 64) ? BYTESWAP_64(value)
- : (reg.gdb_bitsize == 32) ? BYTESWAP_32(value)
- : (reg.gdb_bitsize == 16) ? BYTESWAP_16(value)
- : value;
+ : (reg.gdb_bitsize == 32) ? BYTESWAP_32(value)
+ : (reg.gdb_bitsize == 16) ? BYTESWAP_16(value)
+ : value;
}
return string_format(fmt, value);
}
@@ -1075,18 +1075,18 @@ bool debug_gdbstub::parse_register_string(uint64_t *pvalue, const char *buf, int
{
const gdb_register &reg = m_gdb_registers[gdb_regnum];
const char *fmt = (reg.gdb_bitsize == 64) ? "%016" PRIx64
- : (reg.gdb_bitsize == 32) ? "%08" PRIx64
- : (reg.gdb_bitsize == 16) ? "%04" PRIx64
- : "%02" PRIx64;
+ : (reg.gdb_bitsize == 32) ? "%08" PRIx64
+ : (reg.gdb_bitsize == 16) ? "%04" PRIx64
+ : "%02" PRIx64;
uint64_t value;
if ( sscanf(buf, fmt, &value) != 1 )
return false;
if ( !m_is_be )
{
value = (reg.gdb_bitsize == 64) ? BYTESWAP_64(value)
- : (reg.gdb_bitsize == 32) ? BYTESWAP_32(value)
- : (reg.gdb_bitsize == 16) ? BYTESWAP_16(value)
- : value;
+ : (reg.gdb_bitsize == 32) ? BYTESWAP_32(value)
+ : (reg.gdb_bitsize == 16) ? BYTESWAP_16(value)
+ : value;
}
*pvalue = value;
return true;