Commit Graph

30 Commits

Author SHA1 Message Date
8dabd1a025 PowerPC/MMU: Refactor to class, move to System. 2023-03-28 03:47:51 +02:00
912cd456fb Core: Add System parameter to CPUThreadGuard. 2023-03-08 22:41:42 +01:00
3b364c5c16 HW/CPU: Refactor to class, move to System. 2023-03-08 12:23:37 +01:00
6f0266e8de DolphinQt: Only update call stack if paused
This avoids a pseudo infinite loop where CodeWidget::UpdateCallstack
would lock the CPU in order to read the call stack, causing the CPU to
call Host_UpdateDisasmDialog because it's transitioning from running to
pausing, causing Host::UpdateDisasmDialog to be emitted, causing
CodeWidget::Update to be called, once again causing
CodeWidget::UpdateCallstack to be called, repeating the cycle.

Dolphin didn't go completely unresponsive during this, because
Host_UpdateDisasmDialog schedules the emitting of Host::UpdateDisasmDialog
to happen on another thread without blocking, but it was stopping certain
operations like exiting emulation from working.
2023-02-12 12:50:28 +01:00
7cecb28bdf DolphinQt: Properly lock CPU before accessing emulated memory
This fixes a problem I was having where using frame advance with the
debugger open would frequently cause panic alerts about invalid addresses
due to the CPU thread changing MSR.DR while the host thread was trying
to access memory.

To aid in tracking down all the places where we weren't properly locking
the CPU, I've created a new type (in Core.h) that you have to pass as a
reference or pointer to functions that require running as the CPU thread.
2023-02-12 11:27:50 +01:00
5c8d8383e2 CodeWidget: Fix shadowing warning 2023-02-09 16:23:02 -08:00
8adabb86cf Debugger: Avoid ppcState global. 2023-01-27 15:22:45 +01:00
c13ca271d8 PowerPC: Parametrize CTR macro. 2023-01-27 15:22:43 +01:00
be8d0b76ca PowerPC: Remove PC macro. 2023-01-27 15:22:41 +01:00
0ccfa31ec8 Fix code widget not becoming visible when selecting 'view code' or similar
This affected the memory and registers widgets (and possibly others). I'm pretty sure it regressed in 5f629abd8b.

The SetCodeVisible line is a new fix, but the equivalent already existed in the memory widget.
2022-12-01 17:43:35 -08:00
f9fe25291d Remove most uses of StringFromFormat in favor of fmt 2022-10-12 16:50:47 -07:00
87f84d4f54 Debugger/CodeWidget: Update callstack/callers/calls on symbol changes
Before, only the symbols box would update. However, if you edit the symbol of a function in the call stack (which seems like something that would happen reasonably often while debugging), the call stack would be out of date until it was updated by clicking on it. Callers and calls were more of an edge case; for them to be out of date, you would need to right-click on an instruction in a function other than the one containing the currently-selected instruction (though it would also affect recursive functions).
2022-09-28 21:01:37 -07:00
d0b33c7adf Debugger CodeWidget: Add filter boxes to callstack, function calls, and function callers. Move symbols search box to align with changes. 2022-07-05 12:57:41 -07:00
88a1acdfc0 implement CodeDiffTool Feature
Add Diff button to CodeWidget
Add Code Diff Tool window for recording and differencing functions. Allows finding specific functions based on when they run.
2022-03-26 11:41:08 -07:00
e149ad4f0a treewide: convert GPLv2+ license info to SPDX tags
SPDX standardizes how source code conveys its copyright and licensing
information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX
tags are adopted in many large projects, including things like the Linux
kernel.
2021-07-05 04:35:56 +02:00
5f629abd8b CodeViewWidget: Add WithDetailedUpdate to update CodeWidget
This used to also update the function calls and callers.
2021-02-14 16:01:32 +04:00
2bb7d207b7 DolphinQt: fix other widgets that use lambdas (capturing this) without setting the receiver 2020-09-12 17:53:17 -05:00
303b18ddaf Qt/CodeWidget: Typo in settings key. 2020-03-20 20:51:26 +01:00
3e94366fe0 DolphinQt/Debugger: Fix crash with floating debugger windows 2020-02-09 02:32:04 -05:00
bbeb25de48 Qt/Debugger/CodeWidget: Allow pressing 'enter' in address search box. 2019-10-14 21:47:27 +02:00
fef1b84f0a DolphinQt: Replace QStringLiteral with alternatives where applicable
QStringLiterals generate a buffer so that during runtime there's very
little cost to constructing a QString. However, this also means that
duplicated strings cannot be optimized out into a single entry that gets
referenced everywhere, taking up space in the binary.

Rather than use QStringLiteral(""), we can just use QString{} (the
default constructor) to signify the empty string. This gets rid of an
unnecessary string buffer from being created, saving a tiny bit of
space.

While we're at it, we can just use the character overloads of particular
functions when they're available instead of using a QString overload.
The characters in this case are Latin-1 to begin with, so we can just
specify the characters as QLatin1Char instances to use those overloads.
These will automatically convert to QChar if needed, so this is safe.
2019-07-30 09:06:03 -04:00
92a655c8b9 DolphinQt: Don't update debug widgets when hidden
Saves on CPU usage when pausing/unpausing with the debugger disabled.
This is especially important when using frame advance rapidly.
2019-07-06 11:30:17 +02:00
e06a62d9d1 Qt: Fix CodeWidget navigation
Changed itemSelectionChanged and itemClicked signal to itemPressed in CodeWidget.
Holding mouse down and moving will only travel up/down the stack one time.
This fixes the common occurrence of unintentionally traveling deeper down the stack or higher up the callstack than intended.
2019-05-24 14:39:15 +02:00
290275e8ea Debugger: Move hiding logic via setHidden() to before setFloating() 2019-04-23 16:20:42 -04:00
e3075f3834 PowerPC: Factor out CR helpers into POD class 2019-03-08 20:42:09 +01:00
75b8824c95 Merge pull request #7658 from spycrab/debugger_show
Qt/Debugger: Add Show in Code / Show in Memory
2018-12-29 15:08:51 +01:00
3e3f9565ec Qt/Debugger: Add Show in Code / Show in Memory 2018-12-28 20:30:38 +01:00
68aff9c023 Qt/debugger: make the symbols search case insensitive 2018-10-08 21:17:33 -04:00
8d184ab9bd Qt/Debugger: Make spacing more compact 2018-08-15 19:26:04 +02:00
13ba24c5a6 Move DolphinQt2 to DolphinQt 2018-07-07 00:48:38 +02:00