Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gdbstub fixes for Windows and m68000 #12067

Merged
merged 3 commits into from Feb 27, 2024
Merged

Conversation

BartmanAbyss
Copy link
Contributor

  • debug_gdbstub::generate_target_xml() contained newlines that were converted from '\n' to '\r\n' on Windows, thus breaking the gdb packet checksum (debug_gdbstub::send_reply), so removed newlines in escape_packet. GDB doesn't care about newlines in XML files. This seemed to be the least invasive fix I could think of.
  • m68000: complained about not finding registers A7 => SP, PC => CURPC

I guess we should rename other instances of PC to CURPC as well, as device_state_entry::device_state_entry() automatically changes the name of PC to CURPC (see distate.cpp line 66)

@rb6502 rb6502 merged commit 12129e0 into mamedev:master Feb 27, 2024
5 checks passed
Mokona pushed a commit to Mokona/mame that referenced this pull request Feb 28, 2024
gdbstub: fix m68000 register names
@@ -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;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn’t the proper solution to this be to change the calls to m_socket.puts(...) to use m_socket.write(...) instead to avoid text conversion altogether? This looks like working around the issue rather than actually fixing it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, probably. wasn't familiar with the socket interface :)

stonedDiscord pushed a commit to stonedDiscord/mame that referenced this pull request Apr 8, 2024
gdbstub: fix m68000 register names
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants