Commit Graph

27 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 91f16ae45a Debugger/CPUWidget: Make "Go to in Memory View" open the Memory View 2024-04-08 19:54:46 +01: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
Silent 5e1009b4fb Debugger: Unbind the BP UpdateHandler on destructing DebuggerWindow
Prevents an use-after-free on the DebuggerWindow object
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
Dan McCarthy a903387182 Debugger: Add automatic refresh on 1 second interval
The debugger now refreshes/updates it's widgets once a second so that the user does not need to interact with the debugger to know when data/state changes.
2024-02-28 17:07:56 +00:00
Dan McCarthy ce5e66a2d5 Debugger: Migrates Memory Search tab to it's own widget
Moves the Memory Search fucntionality to it's own widget so as to not pollute the CpuWidget with search related functionality, especially as it is intended to grow in scope. CpuWidget is fairly general and as such everything tends to get tossed together which makes it harder to navigate/understand/maintain.
2024-02-21 00:25:40 +00:00
Dan McCarthy be208df11b Debugger: Allow copying address of memory search results
Adds the ability to copy the address directly of a memory search result through the right click context menu.
2024-01-25 16:55:43 +10:00
Dan McCarthy 52ccc609cd Debugger: Adds loading breakpoints/saved addresses from settings
Adds `/inis/debuggersettings/` settings folder to contain settings specifically for the debugger. Adds functionality to manually save (to settings) Breakpoints/Saved addresses and automatically load them upon launching the debugger.
2024-01-24 20:06:20 +10:00
Dan McCarthy 3a03b579d2 Debugger: Add Saved Addresses tab widget for bookmarking mem addresses
Adds a tab widget to the debugger that allows saving/bookmarking memory addresses and giving them labels/descriptions for convenience. Includes the ability to jump back to memory addresses from the Saved Addresses tab, and adding Saved Addresses from memory search search results context menu and the memory view context menu.

Also supports importing and exporting the saved addresses as CSV format.
2024-01-06 13:17:39 +10:00
Stenzek d9abe10308 Misc: Remove explicit PCH include, switch to SPDX 2023-12-24 14:03:14 +10:00
Dan McCarthy ade6a6c3ab
Debugger: Add memory search types: GreaterThan(OrEqual), LesserThan(OrEqual), and Not Equal (#10441)
* Make memory search search type handling more clear with enum

Adds an enum class to represent the Search type used in a memory search. Prior, this was just handled with an integer to represent each type, but it was very unclear what corresponded to which type at first glance.

Made this easier to follow by using an enum to represent the type.

* Debugger : Add support for greater than/less than/not equal search types

Adds support for basic greater than/greater than or equal/less than/less than or equal/not equal search types for the debugger's Memory Scan.

This adds a new input to allow selecting the search comparison type, which defaults to Equals, and allows switching to the above mentioned comparisons.
It's set up to allow for adding more easily. Restructures some of the functions to make having multiple comparisons quite manageable.
Adds an enum for search comparison types for easy logic handling.

* Debugger: Update Array/String search type error to mention not handling Not Equals

Currently array/string searches don't support Not Equals searches, so this needs to be removed.

* Debugger: Code cleanup + feedback changes

Sets up if expressions to use constexpr for compile time evaluation and makes the is greater/less than logic simpler to read for int. Also removes an unneeded QPushButton cast and simply compares the pointers directly.
2023-12-23 19:02:48 +10:00
Dan McCarthy 0f4a95e31b Qt: (Debugger) Add ability to remove result from Memory Search results
Adds the ability to remove individual search results from the Memory Search results list. Right clicking a result will give the "Remove Result" option in the context menu.
2023-12-09 15:29:35 +00:00
Dan McCarthy b453787670 Qt: Adds right click Go To Disassembly menu option to Memory Search
Allows user to right click a memory search result in order to go to that memory address location in the disassembly view. This saves several step and makes it easier to do.

Also adds precedent for the memory search result context menu which will be used in future features.
2023-12-08 22:21:29 +10:00
Dan McCarthy 90e9b60287
Debugger: Implement subsequent/next scan for Mem Search (#10260)
Co-authored-by: Ty <AmFobes@gmail.com>
2023-11-19 14:41:27 +00:00
Ty Lamontagne 46a0c2d5b6 Debugger: IOP Function Tree
Co-authored-by: Ziemas <ziemas@ziemas.se>
2023-10-31 15:42:56 +00:00
Ty Lamontagne 8d13877002 Debugger: Demangle symbols in the disassembly view as well 2023-10-12 12:46:12 +10:00
Ty Lamontagne 4f825641ce Debugger: Copy as CSV. Breakpoint import from CSV 2023-10-12 12:46:12 +10:00
Ty Lamontagne ade2b4baea Debugger Thread List: Sorting 2023-10-12 12:46:12 +10:00
Ty Lamontagne 2ef2f5db1d Debugger: Fix step out 2023-01-14 12:51:14 +01:00
Ty Lamontagne b6125e97e9 Debugger Stack frames: (Refactor) Use model based widgets 2023-01-10 13:57:06 +01:00
Ty Lamontagne c00caa886e Debugger Threads: (Refactor) Use model based widgets 2023-01-10 13:57:06 +01:00
Ty Lamontagne 37540d1c68 Debugger Breakpoints: (Refactor) Use some reflection and item models 2023-01-10 13:57:06 +01:00
Ty Lamontagne 2f0b244f48 Debugger: Initial debugger implementation 2022-12-24 07:21:49 +00:00