Commit Graph

42 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
4e6c89fbfd Qt/CodeViewWidget: Don't read PC in Update() if we don't have a CPU thread guard. 2023-02-20 03:10:12 +01:00
ef1520c2c6 Qt/CodeViewWidget: Don't try to pause emulator in Update() if we happen to be on a breakpoint. 2023-02-20 02:56:04 +01:00
b6d476241a CodeViewWidget: Fix memory leak
Per https://doc.qt.io/qt-6/qabstractitemview.html#setItemDelegateForColumn setItemDelegateForColumn does not take ownership of the parameter, so it was not being deleted. Specifying a parent to QObject (via QStyledItemDelegate's constructor) will allow it to automatically be deleted, per https://doc.qt.io/qt-6/objecttrees.html. The other instance of a QItemDelegate in IOWindow.cpp already used this.
2023-02-17 18:29:32 -08:00
5b6784432c Follow-up fixes for "Properly lock CPU before accessing emulated memory" 2023-02-14 18:44:16 +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
be8d0b76ca PowerPC: Remove PC macro. 2023-01-27 15:22:41 +01:00
e5b91f00b0 Common: Replace StringBeginsWith/StringEndsWith with std equivalents
Obsoletes these functions in favor of the standard member functions
added in C++20.
2023-01-24 14:58:20 -05:00
3611045a6c DolphinQt: Add more i18n comments 2022-12-24 08:32:49 +01:00
431301add3 Merge pull request #10771 from TryTwo/PR_AutoStep
Debugger: Implement base code tracing logic. and feature to auto-step through code.
2022-11-04 23:32:54 +01:00
e2f4400f49 Make SetPatch responsible for overwriting old patches 2022-10-26 22:46:49 -05:00
f9fe25291d Remove most uses of StringFromFormat in favor of fmt 2022-10-12 16:50:47 -07:00
fb79c04cf1 MemoryView auto updateDebugger. Implement base codetrace logic. Add register breakpoints. Add CodeViewWidget autostepping to track a value.Debugger 2022-10-06 22:17:22 -07:00
53cf78d413 Gekko constistancy changes. Add context item to codeview to show or copy a load/store target memory address from instructions at or near PC when paused. 2022-03-17 12:53:38 -07:00
50d9349926 Fix integer sign difference comparison warnings 2022-02-13 14:38:59 -08:00
5bcbc8fcef CodeViewWidget: Fix undefined behavior when centered around address 0 2021-12-08 21:42:15 -08:00
78bfd25964 Fix all uninitialized variable warnings (C26495) 2021-10-13 12:32:16 -07:00
87924f2ddd DolphinQt: Remove Windows dialog help buttons 2021-08-21 10:53:12 -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
359a539f25 Breakpoints: Change icon when disabled 2021-03-05 11:21:37 +04: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
87330ae524 DolphinQt: Use QFontMetrics::boundingRect instead of QFontMetrics::width
See https://kdepepo.wordpress.com/2019/08/05/about-deprecation-of-qfontmetricswidth/
2020-06-08 12:32:36 +02:00
f87e32840f DolphinQt: Remove another usage of QFontMetrics::width
QFontMetrics::width breaks building with CMake on Windows,
due to a deprecation warning which gets promoted to an error.
2020-05-18 00:39:57 +02:00
bf57abc0d5 Fix Windows CMake build errors
Lambda expressions with uncaptured constants were leading to errors,
and there were also some warnings about deprecated functions
(QFontMetrics::width and inet_ntoa).
2020-05-03 14:10:24 +02:00
330c80055d Qt/Debugger: Refresh windows on savestate load. 2020-04-15 00:12:35 +02:00
e8dfb8f78d Qt/CodeViewWidget: Make columns resizable by the user and set sensible defaults. 2020-03-18 22:27:53 +01:00
9c98b659f1 Qt/CodeViewWidget: Indent branch arrows based on free space rather than reserving a full column for each. 2020-03-15 16:14:35 +01:00
18127e2554 Qt/CodeViewWidget: Implement branch arrows. 2020-03-07 01:52:53 +01:00
c70e004f53 Qt/CodeViewWidget: Use named constants for column IDs. 2020-02-23 18:49:27 +01: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
66e7a11139 Merge pull request #8235 from lioncash/move
Common/DebugInterface: Minor cleanup changes
2019-07-22 15:07:14 -07:00
d4d485b692 Common/DebugInterface: Make return value of GetColor() a u32
At its only usage point, its return value is stored into a u32, and the
default implementation returns 0xFFFFFFFF (-1), which would be an
unsigned integer. Given all of the bits are used to determine a color,
it makes slightly more sense to treat this as an unsigned value as
opposed to a signed one.
2019-07-09 14:19:38 -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
86d1e6cd7e Qt/Debugger: Improve Code View
* Use font based sizing for row height. Fits more rows on screen.
* Adds whitespace for better formatting and minimum column width.
  Helps prevent frequent resizing while scrolling.
2019-05-11 17:48:49 +02:00
f6e73a0aec Qt/Debugger: Implement patch instruction preview 2019-04-27 23:31:19 +02: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
5b992f138b Qt/Debugger: Improve scrolling
Reduces the scrolling speed for both keyboard and mouse scrolling so
users are able to navigate the code and memory view line by line
2018-08-19 22:36:04 +02:00
8d184ab9bd Qt/Debugger: Make spacing more compact 2018-08-15 19:26:04 +02:00
a22ffb6387 Qt: Remove ActionHelper 2018-07-09 10:02:10 +02:00
13ba24c5a6 Move DolphinQt2 to DolphinQt 2018-07-07 00:48:38 +02:00