# HG changeset patch # User Eric Fry # Date 1588075384 -36000 # Node ID 495569c1dc614875e8a7aef2f861fea915204d8d # Parent 16d46ff1f620fe8cac5144b40512257940a19eee Add support for printing a byte from memory in native debugger. Add stubs for GDB commands qThreadExtraInfo and qP diff -r 16d46ff1f620 -r 495569c1dc61 debug.c --- a/debug.c Sun May 03 12:40:37 2020 -0700 +++ b/debug.c Tue Apr 28 22:03:04 2020 +1000 @@ -158,6 +158,9 @@ uint32_t p_addr = strtol(param+(param[0] == '0' ? 2 : 1), &after, 16); if (after[0] == '.' && after[1] == 'l') { value = m68k_read_long(p_addr, context); + } else if (after[0] == '.' && after[1] == 'b') { + value = m68k_read_word(p_addr, context); + value &= 0xFF; } else { value = m68k_read_word(p_addr, context); } @@ -166,6 +169,9 @@ uint32_t p_addr = param[1] == 'a' ? context->aregs[reg] : context->dregs[reg]; if (param[4] == '.' && param[5] == 'l') { value = m68k_read_long(p_addr, context); + } else if (param[4] == '.' && param[5] == 'b') { + value = m68k_read_word(p_addr, context); + value &= 0xFF; } else { value = m68k_read_word(p_addr, context); } diff -r 16d46ff1f620 -r 495569c1dc61 gdb_remote.c --- a/gdb_remote.c Sun May 03 12:40:37 2020 -0700 +++ b/gdb_remote.c Tue Apr 28 22:03:04 2020 +1000 @@ -401,6 +401,10 @@ gdb_send_command("m1"); } else if (!strcmp("sThreadInfo", command + 1)) { gdb_send_command("l"); + } else if (!memcmp("ThreadExtraInfo", command+1, strlen("ThreadExtraInfo"))) { + gdb_send_command(""); + } else if (command[1] == 'P') { + gdb_send_command(""); } else { goto not_impl; }