* gdbstub beginnings

* gdbstub: finish gdb impl things, next up is integration with melonDS

* holy fuck the gdbstub works

* gdb breakpoints work, but there's a mysterious crash on continue

* fix memory corruption that sometimes happened, and make resetting the console thru gdb work

* remove some gdb debug printing

* fix things in gdbstub

* separate option for enabling gdbstub

* add mode-dependent CPU registers

* C++ize the GDBstub code

* add gdbstub config in emu settings dialog

* make sure gdb is disabled when jit is enabled

* Remove unnecessary compiler flags, mark ARMJIT assembly code as no-execute-stack

This hardens the binary a little bit against common exploitation methods

* add option to wait for debugger attach on startup

* only insert GNU stack notes on linux

* disable gdbstub enable checkbox when jit is enabled

* fix non-linux incompatibilities

* enable gdbstub by default

* fix issues with gdbstub settings disable stuff

* format stuff

* update gdb test code

* Fix segfault when calling StubCallbacks->GetCPU()

C++ overrides are hard. Please I'm just a lowly C programmer.

* fix packet size not being sent correctly

Thanks to @GlowingUmbreon on Github for troubleshooting this

* fix select(2) calls (i should read docs more properly)

* fix GDB command sequencing/parsing issue (hopefully)

* [GDB] implement no-ack mode

* fix sending ack on handshake

* get lldb to work
This commit is contained in:
PoroCYon
2023-10-22 15:35:31 +02:00
committed by GitHub
parent 3d58a338a1
commit 3ab752b8ca
29 changed files with 3210 additions and 49 deletions

View File

@ -213,6 +213,11 @@ int GetConfigInt(ConfigEntry entry)
case Firm_Color: return Config::FirmwareFavouriteColour;
case AudioBitDepth: return Config::AudioBitDepth;
#ifdef GDBSTUB_ENABLED
case GdbPortARM7: return Config::GdbPortARM7;
case GdbPortARM9: return Config::GdbPortARM9;
#endif
}
return 0;
@ -241,6 +246,12 @@ bool GetConfigBool(ConfigEntry entry)
case Firm_OverrideSettings: return Config::FirmwareOverrideSettings != 0;
case DSi_FullBIOSBoot: return Config::DSiFullBIOSBoot != 0;
#ifdef GDBSTUB_ENABLED
case GdbEnabled: return Config::GdbEnabled;
case GdbARM7BreakOnStartup: return Config::GdbARM7BreakOnStartup;
case GdbARM9BreakOnStartup: return Config::GdbARM9BreakOnStartup;
#endif
}
return false;