Skip to content

Commit

Permalink
gdbstub: fix checksum on Windows (mamedev#12067)
Browse files Browse the repository at this point in the history
gdbstub: fix m68000 register names
  • Loading branch information
BartmanAbyss authored and Mokona committed Feb 28, 2024
1 parent 92b2880 commit 4434664
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/osd/modules/debugger/debuggdbstub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,9 @@ static const gdb_register_map gdb_register_map_m68020pmmu =
{ "A4", "a4", false, TYPE_INT },
{ "A5", "a5", false, TYPE_INT },
{ "A6", "fp", true, TYPE_INT },
{ "A7", "sp", true, TYPE_INT },
{ "SP", "sp", true, TYPE_INT },
{ "SR", "ps", false, TYPE_INT }, // NOTE GDB named it ps, but it's actually sr
{ "PC", "pc", true, TYPE_CODE_POINTER },
{ "CURPC","pc", true, TYPE_CODE_POINTER },
}
};

Expand All @@ -280,9 +280,9 @@ static const gdb_register_map gdb_register_map_m68000 =
{ "A4", "a4", false, TYPE_INT },
{ "A5", "a5", false, TYPE_INT },
{ "A6", "fp", true, TYPE_INT },
{ "A7", "sp", true, TYPE_INT },
{ "SP", "sp", true, TYPE_INT },
{ "SR", "ps", false, TYPE_INT }, // NOTE GDB named it ps, but it's actually sr
{ "PC", "pc", true, TYPE_CODE_POINTER },
{ "CURPC","pc", true, TYPE_CODE_POINTER },
//NOTE m68-elf-gdb complains about fpcontrol register not present but 68000 doesn't have floating point so...
}
};
Expand Down Expand Up @@ -682,6 +682,9 @@ static std::string escape_packet(const std::string src)
result.reserve(src.length());
for ( char ch: src )
{
if ( ch == '\n' ) // don't let socket convert line endings and messing up the checksum
continue;

if ( ch == '#' || ch == '$' || ch == '}' )
{
result += '}';
Expand Down

0 comments on commit 4434664

Please sign in to comment.