Commit Graph

8244 Commits

Author SHA1 Message Date
David Spickett ef7edba159 Debugger: Fix interrupt after continue from GDB stub
GDB and LLDB will send a ctrl-c character (\x03) to the stub
to interrupt it after a continue where it doesn't stop on its own.

E.g.
```
void foo() {
  foo2();      // Continue from here.
  while (1) {} // Loops here until ctrl-c in the debugger.
}
```

mGBA had code to handle the ctrl-c but because in _continue
we set the paused status after calling mDebuggerModuleSetNeedsCallback,
the callback was never set so nothing was looking for new messages
while we were running. We should instead set the paused state then call
mDebuggerModuleSetNeedsCallback.

mDebuggerModuleSetNeedsCallback calls mDebuggerUpdatePaused, and all
other calls to mDebuggerUpdatePaused update the paused state before
that call so this matches existing usage of that too.

With this fix, after the continue _gdbStubPoll is called periodically
and will pick up the ctrl-c as it comes in (_gdbStubWait is used when
we are stopped in the debugger).

This fixes ctrl-c to interrupt when using lldb and gdb.
2023-10-07 23:56:11 -07:00
Vicki Pfau 46f59df10a Core: Add missing defines to flags.h 2023-09-27 20:21:28 -07:00
Vicki Pfau d34ec95879 Wii: Fix build 2023-09-27 20:21:03 -07:00
Vicki Pfau 0f0dccdcf2 Scripting: Unpack breakpoint name struct 2023-09-27 17:53:30 -07:00
Vicki Pfau 476dcc11df Scripting: Attach canvas object in docgen 2023-09-27 16:51:48 -07:00
Vicki Pfau 1dd00d5bb0 Scripting: Fix typo in docs 2023-09-27 16:47:43 -07:00
Vicki Pfau 4215332eb4 Revert "Qt: Ensure action set is clean before (re)building"
This reverts commit 3ee12b1a55.
2023-09-24 21:04:59 -07:00
David Spickett 7de02c9949 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-22 23:07:43 -07:00
Vicki Pfau beda1d5b87 Scripting: Enhance error reporting 2023-09-16 01:30:40 -07:00
Vicki Pfau efb30080e8 Scripting: Code cleanup 2023-09-16 01:20:55 -07:00
Vicki Pfau 0c675b12e4 Scripting: Simplify console implementation 2023-09-16 01:20:34 -07:00
Vicki Pfau 805773aa8f Scripting: Fix console error log level 2023-09-16 00:42:52 -07:00
Vicki Pfau c03b15944b Qt: Add shadow ROM exporting 2023-09-15 23:36:03 -07:00
Vicki Pfau 8610147ad7 Qt: Expand romFilters functionality 2023-09-15 23:36:03 -07:00
Vicki Pfau 131b983894 Debugger: Move platform-specific flag lookup to mDebuggerPlatform 2023-09-15 23:36:03 -07:00
Vicki Pfau d55a13c9ba Debugger: Initial memory access logger support 2023-09-15 23:36:03 -07:00
Vicki Pfau 9c673f527d ARM, SM83: Check for events both before and after single stepping 2023-09-15 23:36:03 -07:00
Vicki Pfau 5d32e432b3 GBA Core: Add missing blocks 2023-09-15 23:36:03 -07:00
Vicki Pfau c6316edf2a GB, GBA: Move CLI debugger headers 2023-09-15 22:08:12 -07:00
Vicki Pfau 7015a104be Debugger: Clean up layering violation 2023-09-15 22:08:12 -07:00
Vicki Pfau b2dd7611ea GBA Core: Export reduced GBA ROM region size if the ROM is less than 32 MiB 2023-09-15 22:06:33 -07:00
Vicki Pfau 022e009a75 GB Core: Fix exported size information 2023-09-15 22:06:33 -07:00
Vicki Pfau b46278b3ed GBA: Make sure unloading a ROM frees the AGBPrint buffer 2023-09-15 22:06:33 -07:00
Vicki Pfau 4b9072de03 Qt: Move controller-based subview auto-closing 2023-09-14 22:34:46 -07:00
Vicki Pfau f051b88f81 Qt: SaveConverter doesn't use the controller 2023-09-14 22:34:46 -07:00
Vicki Pfau 4de9d5f16c Core: Fix potential UAF when loading a ROM in a VDir 2023-09-14 22:34:46 -07:00
Vicki Pfau 8520ad8f1f GBA I/O: Prefix GBA registers with GBA_REG_ 2023-09-07 00:12:19 -07:00
Vicki Pfau 4c03970ffe GBA I/O: More legibility improvements 2023-09-07 00:12:19 -07:00
Vicki Pfau bcb0073a4a GBA I/O: Improve legibility of long constants 2023-09-07 00:12:19 -07:00
Vicki Pfau 6ed7341b5a Debugger: Fix trace 2023-09-06 18:59:07 -07:00
Vicki Pfau 20931a89d9 GBA Core: Fix Flash 1M memory block descriptor 2023-09-02 00:43:43 -07:00
Vicki Pfau f2186f6a5c Vita: Fix camera setting not appearing (fixes #3012) 2023-08-28 13:29:03 -07:00
Vicki Pfau 85c9872cd6 GB I/O: Fix STAT writing IRQ trigger conditions (fixes #2501) 2023-08-25 23:02:18 -07:00
Vicki Pfau 0acc8c2af2 GBA Audio: Fix sample position issues when rate changes (fixes #3006) 2023-08-23 14:35:16 -07:00
Vicki Pfau 16fe12cc97 Qt: Remove shared_ptr copies in for loops 2023-08-18 22:14:40 -07:00
Vicki Pfau 5c2a55884b Qt: Fix remaining non-Multimedia Qt 6 build issues 2023-08-18 21:45:08 -07:00
Vicki Pfau 613ce0286a Qt: Force surface type to OpenGL in DisplayGL 2023-08-18 21:44:46 -07:00
Vicki Pfau 17dbdcf57c Qt: Change Action* semantics to std::shared_ptr<Action> 2023-08-18 21:30:33 -07:00
Vicki Pfau 3ee12b1a55 Qt: Ensure action set is clean before (re)building 2023-08-18 21:28:43 -07:00
Vicki Pfau 6e65b70c32 Qt: Fix input-related Qt 6 build errors 2023-08-18 20:17:19 -07:00
Vicki Pfau f5a6906ef8 Qt: Fix display-related Qt6 build errors 2023-08-18 20:12:18 -07:00
Vicki Pfau f637b5b1e8 Util: Fix warning when libpng is disabled 2023-08-10 12:43:39 -07:00
Vicki Pfau bbdcb8b83b Scripting: Fix rounding warning 2023-08-10 12:17:44 -07:00
Vicki Pfau 56d21feb10 OpenGL: Fix warnings 2023-08-10 12:17:44 -07:00
Vicki Pfau 19e44d59d0 Util: Fix warnings 2023-08-10 12:06:29 -07:00
Vicki Pfau a4d8c433c6 Scripting: Silence warnings 2023-08-10 12:03:15 -07:00
Vicki Pfau f96ba8c1aa ARM: Fix warning 2023-08-10 11:58:05 -07:00
Vicki Pfau 6a317779c8 Qt: Fix mute settings not being loaded on setting screen (fixes #2990) 2023-08-08 19:34:10 -07:00
Vicki Pfau 0cd50cae8c Qt: Fix crash entering commands into detached debugger (fixes #2987) 2023-08-06 22:38:45 -07:00
Vicki Pfau 1bb8d52e16 Qt: Fix gdb at startup (fixes #2986) 2023-08-05 17:58:12 -07:00