Commit Graph

38 Commits

Author SHA1 Message Date
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
3bd655463d MemoryViewWidget: Fix warning: enumeration value ‘Null’ not handled in switch [-Wswitch] 2023-02-09 16:23:02 -08:00
b56411b84b Fix MemoryViewWidget background colour 2022-12-17 10:37:37 +01:00
a17fbe7c65 Expand conditional breakpoints to memory breakpoints 2022-12-04 11:25:33 -07:00
700eca1baa MemoryViewWidget set target address as selected. Fix focus call. Always color selected item blue. 2022-11-30 16:38:56 -07:00
6f4f4e057e MemoryViewWidget refactor memory table.
Don't re-create the table on every update.
2022-10-22 17:52:39 -07:00
bd59b0a490 Debugger MemoryViewWidget: Allow direct editing of memory cells. 2022-07-01 17:30:24 -07:00
a334883c47 Qt/MemoryViewWidget: Don't elide text
Before, the Hex 32 display would get truncated on Linux.
2022-06-20 18:53:23 -07:00
828ce0f3cf Qt/MemoryViewWidget: Fix resizing. 2022-05-10 12:35:37 +02:00
7f94e62dd5 Qt/MemoryViewWidget: Remove the behavior that clicking anywhere in the table centers the table on that row. 2022-05-08 23:14:37 +02:00
88dd9e57f3 Qt/MemoryViewWidget: Add a custom scrollbar. 2022-05-08 23:14:37 +02:00
4e153212a0 Qt/MemoryViewWidget: Convert into QWidget that has the table as a member. 2022-05-08 23:14:36 +02:00
0e1e2323ea Qt/MemoryViewWidget: Keyboard navigation should observe the number of bytes per row instead of assuming 16. 2022-05-08 23:14:36 +02:00
787e3efeb8 Qt/MemoryViewWidget: Detect row breakpoint cell by cell data instead of cell position. 2022-04-24 16:22:36 +02:00
6920a24f1d Qt/MemoryViewWidget: Add option to copy the actually displayed cell value to clipboard. 2022-04-24 16:22:36 +02:00
54ec0bd0d0 Qt/MemoryViewWidget: Don't use a member variable to hold information about the current mouse click. 2022-04-24 16:14:42 +02:00
a7111e3910 Dual View any size. 2022-04-23 02:46:25 -07:00
cc22f1a558 MemoryWidget add dual views for two separate column types. Force first column to be Hex32. 2022-04-17 00:15:44 -07:00
a2aecc3794 Debugger MemoryWidget: More display types, use combo box for display options. Add alignment and riw length options. 2022-04-15 22:00:51 -07:00
8f85e384c3 Debugger MemoryViewWidget: fixed, tighter spacing 2022-03-29 14:16:25 -07:00
6e5f4125e3 Use Common::ToLower and Common::ToUpper 2022-01-16 17:00:12 -08:00
bcf2c6b9b9 MemoryViewWidget: Remove unnecessary column
This column would end up containing junk data after changing the data type.
2021-07-22 17:39:35 -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
e3d85ffe35 MemoryWidget: Add "Add to watch" action 2021-02-17 21:32:36 +04:00
89b6a4cbee DolphinQt: resolve Qt5.15 deprecations 2020-08-23 13:57:05 -07:00
330c80055d Qt/Debugger: Refresh windows on savestate load. 2020-04-15 00:12:35 +02:00
89b0ab2d22 StringUtil: Add IsPrintableCharacter and use it
Add a function that safely returns whether a character is printable
i.e. whether 0x20 <= c <= 0x7e is true.

This is done in several places in our codebase and it's easy to run
into undefined behaviour if the C version defined in <cctype>
is used instead of this one, since its behaviour is undefined
if the character is not representable as an unsigned char.

This fixes MemoryViewWidget.
2020-01-16 00:22:26 +01:00
5b6e7aabcf Fixed 11874 (leading 0s ignored by debugger) 2019-11-22 19:16:34 +00: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
2b00eefbef DolphinQt/Debugger: Replace AddressSpace.h inclusions with a forward declaration 2019-07-15 23:20:26 -04:00
2ff0486335 Debugger/Memory: Add support for address spaces
Different address spaces can be chosen in the memory view panel.
 * Effective (or virtual): Probably the view people mostly want. Address
   translation goes through MMU.
 * Auxiliary: ARAM address space. Does not display anything in Wii mode.
 * Physical: Physical address space. Only supports mem1 and mem2 (wii
   mode) so far.
2019-05-02 21:14:30 -04: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