Commit Graph

30 Commits

Author SHA1 Message Date
chaoticgd 79dbc272b8 Debugger: Add symbol tree widgets for functions and variables
This adds three new tabs in the debugger: The Globals tab, the Locals
tab and the Parameters tab. In addition, it rewrites the Functions tab.

All four of these tabs use the new symbol tree widgets and the
associated model. This allows the user the inspect complex data
structures in memory with full type information.

Lastly, new dialogs have been added for creating symbols.
2024-08-27 12:48:40 -04:00
chaoticgd 44b50bee26 Debugger: Replace SymbolMap class with new SymbolGuardian class
This new class uses the CCC library I added in the last commit and
parses the symbol tables on a worker thread.
2024-08-27 12:48:40 -04:00
chaoticgd b43e05a8fc Debugger: Remove the Avast demangler
This library doesn't support the demangling scheme used by GCC 2.x
compilers and hence doesn't work in lots of cases.
2024-08-27 12:48:40 -04:00
GovanifY 132431b7c8 headers: relicense to GPL-3.0+
also update to 2024 while i'm at it
2024-07-30 17:17:13 -04:00
Silent 272c0369f1 Debugger: Untangle the breakpoints data flow to resolve races
Tightens the data flow between the CPU and UI threads
to resolve multiple race conditions, such as:
1. Unbinding a debug interface update CB while it's in use,
    causing a possible use-after-free.
2. Binding breakpoints via the disassembly widget that would read
    a stale local variable, and bind the breakpoint to a bogus address

+ probably more subtle races that are now resolved
2024-04-08 19:54:46 +01:00
Dan McCarthy bd032bbcb8 Debugger: Memory search expansions + results count
Adds memory search comparisons for Increased, Increased By, Decreased, Decreased By, Changed, Not Changed, Changed By.
For arrays, adds not equals, changed, not changed for filter searches.
Now only shows the comparison types that are currently valid for the given search type and if there's prior search results.

Also refactors to allow holding the prior set of search results rather than just the addresses, needed for these search comparisons to work.

Also adds a ui label to show that the debugger is searching after clicking the search button which then gets replaced with the results count when the search completes.
2024-03-02 14:49:15 +00:00
Ty Lamontagne 4919f9b18c DebugTools: Add noreturn heuristic 2024-02-28 16:48:54 +00:00
Dan McCarthy f00f0cc846 Debugger: Fixes crash on debugger open when cpu not alive
The debugger was crashing on open if no game was running due to failing to read from the CPU while the cpu was not alive.

The opcode was read before checking if it should be shown, so I have moved it to only read if the showOpcode boolean is true, and set it to not show opcodes of the cpu is not alive.
2024-02-23 11:36:41 +00:00
Ty Lamontagne 78b6323272 DisassemblyWidget: Allow showing opcodes & some key bind modification 2024-02-23 01:28:44 +00:00
Stenzek d9abe10308 Misc: Remove explicit PCH include, switch to SPDX 2023-12-24 14:03:14 +10:00
Ty Lamontagne 20c3178dfe Debugger: Don't modify disassembly focus on CPU state change 2023-12-15 20:35:06 +00:00
Dan McCarthy ae2860d03d Debugger: Allow copying function names
Add the ability to copy a function name when you right click the first instruction of a function (the line where the function name displays).

Instructions inside the function that are not the first instruction will not show the copy option, partly because it's less clear what will be copied but also to not needlessly overpopulate the context menu.
2023-11-21 20:54:27 +00:00
Ty Lamontagne 93776707a9 Debugger: Stub the current opcode if no function is selected 2023-10-31 15:42:56 +00:00
Ty Lamontagne 85539c7bb9 DebugTools: Simplify the symbol map 2023-10-31 15:42:56 +00:00
Ty Lamontagne 95d1dcc521 Debugger: Fallback to unmangled symbol when it cannot be demangled 2023-10-26 19:26:43 +01:00
Ty Lamontagne 132726bc45 Debugger: Provide visual feedback of a breakpoints enable setting 2023-10-26 19:26:43 +01:00
Ty Lamontagne 593f977621 Debugger: Add spacebar as a breakpoint toggle hotkey 2023-10-26 19:26:43 +01:00
Ty Lamontagne 8d13877002 Debugger: Demangle symbols in the disassembly view as well 2023-10-12 12:46:12 +10:00
Ty Lamontagne 065f7d6cc7 Debugger: Don't elide func names as much when func start is selected 2023-10-12 12:46:12 +10:00
Ty Lamontagne 03a7c745c9 Debugger: Implement function/instruction nop restore 2023-10-12 12:46:12 +10:00
Ty Lamontagne 4269f16bcd Debugger: Implement stubbing (noping) functions 2023-10-12 12:46:12 +10:00
Ty Lamontagne 0d42b81285 Debugger: Fix 'run-to-cursor' context action 2023-07-28 22:00:08 +01:00
Ty Lamontagne 577e15a949 Debugger Expressions: Add 'target', 'load', and 'store' reference
target -> The evaluated target of the load or the store, 0 if the opcode is not a memory access
load -> The evaluated target of a load, is 0 if the opcode is not loading
store -> The evaluated target of a store, is 0 if the opcode is not storing

Fixes the disassembly widget mouse click handler
Fixes the breakpoint dialog not setting the breakpoint address or condition cpu (oops)
2023-01-14 01:58:04 +00:00
arcum42 2892f629f0 build/QT: Unmute the warnings for deprecation & overloading virtuals. Fix assorted warnings. Mute 'maybe initialized' warnings. Add a policy to take care of LTO warnings in cmake. 2023-01-11 00:55:21 +01:00
Ty Lamontagne c00caa886e Debugger Threads: (Refactor) Use model based widgets 2023-01-10 13:57:06 +01:00
Ty Lamontagne eac90c6b42 Debugger Disassembly: Add 'NOP Instruction(s)' Context menu action 2023-01-03 04:38:14 +01:00
Ty Lamontagne a9a3342519 Debugger: Disable certain actions when the VM is not alive. 2023-01-03 04:38:14 +01:00
Ty Lamontagne 51f3e1b684 Debugger Disassembly: Page Up/Down hotkey for disassembly view 2023-01-03 04:38:14 +01:00
Chromaryu 30504660fa Translation: Add translation notation for all translatable strings 2022-12-24 14:42:20 +01:00
Ty Lamontagne 2f0b244f48 Debugger: Initial debugger implementation 2022-12-24 07:21:49 +00:00