mgba/src
David Spickett 35cdd5d242 Debugger: Correct PC value when read with 'p' instead of 'g' packet
The 'g' packet is handled by _readGPRs which has a special case for
the PC due to the way the CPU reports the PC value.

This was added by added by a967f9aac4.

The 'p' packet is handled by _readRegister which did not have this
special case for PC. This lead to GDB reporting the correct PC value
but LLDB not, as the latter used 'p' instead.

This meant you saw things like this:
    0x80002a4 <+16>: str    r0, [sp, #0x4]
    0x80002a8 <+20>: bl     0x80001f0      <----------expected to be here.
->  0x80002ac <+24>: b      0x80002b0

Where you expected to be about to bl to another function,
but it looked like you had already done it.

And more obviously, when you first attached to the GDB stub,
the PC was reported as 4 not 0.
2023-09-27 20:24:40 -07:00
..
arm ARM: Fake bpkt instruction should take no cycles (fixes #2551) 2023-07-05 22:11:59 -07:00
core Scripting: Simplify console implementation 2023-09-27 20:24:40 -07:00
debugger Debugger: Correct PC value when read with 'p' instead of 'g' packet 2023-09-27 20:24:40 -07:00
feature GUI: Add missing include 2023-07-23 22:49:59 -07:00
gb GB Core: Fix exported size information 2023-09-16 01:36:15 -07:00
gba GBA: Make sure unloading a ROM frees the AGBPrint buffer 2023-09-16 01:36:10 -07:00
platform Scripting: Enhance error reporting 2023-09-27 20:24:40 -07:00
script Scripting: Enhance error reporting 2023-09-27 20:24:40 -07:00
sm83 Debugger: platformCommands should be able to be NULL 2022-10-03 15:55:09 -07:00
third-party Third-Party: Update zlib and libpng 2022-08-31 00:12:33 -07:00
util Updater: Fix overwriting directories with files 2023-07-18 01:43:07 -07:00