Commit Graph

321 Commits

Author SHA1 Message Date
mitaclaw ebf7cebc32 Modernize `std::sort` with ranges 2024-10-10 00:53:48 -07:00
JosJuice 6ca2da53e8 Partially revert "Revert "Audit uses of IsRunning and GetState""
This reverts the revert commit bc67fc97c3,
except for the changes in BaseConfigLoader.cpp, which caused the bug
that made us revert 72cf2bdb87. PR 12917
contains an improved change to BaseConfigLoader.cpp, which can be merged
(or rejected) independently.

A few changes have also been made based on review comments.
2024-10-04 18:35:41 +02:00
mitaclaw 4f821f4332 BreakpointWidget: Update when `Host::PPCSymbolsChanged`
Otherwise, outdated symbol names will remain.
2024-09-20 18:39:20 -07:00
mitaclaw 7c2a39706e DolphinQt: A Ubiquitous Signal For When Breakpoints Change
There were three distinct mechanisms for signaling breakpoint changes in DolphinQt, and the wiring had room for improvement. The behavior of these signals has been consolidated into the new `Host::PPCBreakpointsChanged` signal, which can be emitted from anywhere in DolphinQt to properly update breakpoints everywhere in DolphinQt.

This improves a few things:
- For the `CodeViewWidget` and `MemoryViewWidget`, signals no longer need to propagate through the `CodeWidget` and `MemoryWidget` (respectively) to reach their destination (incoming or outgoing).
- For the `BreakpointWidget`, by self-triggering from its own signal, it no longer must manually call `Update()` after all of the emission sites.
- For the `BranchWatchDialog`, it now has one less thing it must go through the `CodeWidget` for, which is a plus.
2024-09-20 18:37:39 -07:00
JMC47 efc395f7f4
Merge pull request #12977 from mitaclaw/branch-watch-tool-fixes-4
Branch Watch Tool: Refactors, Fixes, and Features
2024-09-04 19:36:24 -04:00
mitaclaw 2a20e6e3df Branch Watch Tool: Toolbar Visiblity Menu
Adds the ability to hide unneeded features of the controls toolbar.
2024-08-31 15:37:34 -07:00
mitaclaw 8f76a32be4 Branch Watch Tool: New Conditional Branch Inspection Tools
Invert conditions, invert decrement checks, and make conditional branches unconditional. USnapshotMetadata in prior versions of Dolphin is forward-compatible with these changes (tested on x86_64).
2024-08-31 15:37:34 -07:00
mitaclaw 8bdfdc88b2 Branch Watch Tool: Ignore Apploader Branch Hits Concurrency Fix
Also removed worthless `Start` and `Pause` helpers from `Core::BranchWatch`.
2024-08-31 15:37:34 -07:00
mitaclaw e4500b5798 BranchWatchDialog: Improve Branch Was/Not Overwritten Buttons
Giving a warning if these are used when not usable is bad UX.
2024-08-31 15:37:34 -07:00
mitaclaw f5e7b45773 BranchWatchDialog: Listen For `clicked` Signal Rather Than `pressed`
The latter signal was used by mistake, see PR #8263.
2024-08-31 15:37:24 -07:00
mitaclaw 0c889c715d BranchWatchDialog: Const Correctness
m_index_list_temp should not be imagined as a member of `BranchWatchDialog`, so it is now mutable to allow for more const member functions.
2024-08-31 15:31:26 -07:00
mitaclaw 7ce703a4a8 BranchWatchDialog: Refactor Context Menus
Instead of one wildly complex context menu constructed lazily, now three manageable context menus are constructed proactively.
2024-08-31 15:11:25 -07:00
mitaclaw 107c08b77f BranchWatchDialog: Clean Up Object Parenting and Prefer Auto
Objects which get parented automatically by later processing now pass a nullptr to the constructor to make the intent clearer. Also fixed "true" and "false" not being translatable strings.
2024-08-31 15:11:25 -07:00
mitaclaw f9f0806022 BranchWatchDialog: Disconnect Slots When Hidden 2024-08-31 15:11:24 -07:00
mitaclaw ffaba26830 BranchWatchDialog: Refactor For LoadQSettings / SaveQSettings 2024-08-24 00:29:53 -07:00
mitaclaw 7b89730daa BranchWatchDialog: Defer Layout Construction When Possible
The main layout, tool controls layout, and misc. controls layout all don't need the QLayout constructed so early.
2024-08-24 00:29:52 -07:00
mitaclaw 9eb79f1d28 BranchWatchDialog: De-lambda-ize Constructor 2024-08-24 00:29:52 -07:00
Alfred Wingate d7c93d87be
Add support for libfmt-11
fmt::join was moved into fmt/ranges.h

Signed-off-by: Alfred Wingate <parona@protonmail.com>
2024-08-22 16:54:35 +03:00
OatmealDome 93617e96c3
Merge pull request #13029 from JosJuice/sddress
DolphinQt: Fix "Sddress" typo
2024-08-21 12:32:49 -04:00
JosJuice 9f95a8fa8a DolphinQt: Fix "Sddress" typo 2024-08-21 18:12:04 +02:00
Dr. Dystopia 9602f36248 Remove redundant semicolons 2024-08-20 14:59:54 +02:00
Dr. Dystopia 618b41a459 Use 'contains' method 2024-08-14 22:18:28 +02:00
mitaclaw 8e546e79aa DolphinQT: Listen For `clicked` Signal Rather Than `pressed`
The latter signal was likely used by mistake, e.g. https://github.com/dolphin-emu/dolphin/pull/8263.
2024-08-08 08:09:38 -07:00
Tilka e736d611fc
Merge pull request #12963 from JosJuice/i18n-2024-07-28
i18n: Add comments and improve source strings
2024-08-07 03:28:01 +01:00
Tillmann Karras f1366a4546 Debugger: keep breakpoints ordered by address
Previously, breakpoints would move to the end of the list whenever
they were edited.
2024-08-04 19:36:20 +01:00
JosJuice 9d2f5245f4 i18n: Add comments and improve source strings
Most of these changes are to improve consistency in capitalization.
2024-07-28 14:38:20 +02:00
Admiral H. Curtiss 2d8f54fdd2
Merge pull request #12862 from SuperSamus/debugger-fixes
Debugger: Various fixes
2024-07-23 20:36:34 +02:00
VampireFlower afa6e26e5d BreakpointWidget: Correct icon position
Co-Authored-By: TryTwo <10532806+TryTwo@users.noreply.github.com>
2024-07-09 15:20:56 -07:00
Martino Fontana 719af828e5 BreakpointWidget: Can create new breakpoints when emulation isn't running
It works perfectly fine, so why not? Also, consistency with CodeViewWidget.
2024-07-05 21:33:23 +02:00
Martino Fontana bd3cf67cbc Debugger: Rework temporary breakpoints
Before:
1. In theory there could be multiple, but in practice they were (manually) cleared before creating one
2. (Some of) the conditions to clear one were either to reach it, to create a new one (due to the point above), or to step. This created weird behavior: let's say you Step Over a `bl` (thus creating a temporary breakpoint on `pc+4`), and you reached a regular breakpoint inside the `bl`. The temporary one would still be there: if you resumed, the emulation would still stop there, as a sort of Step Out. But, if before resuming, you made a Step, then it wouldn't do that.
3. The breakpoint widget had no idea concept of them, and will treat them as regular breakpoints. Also, they'll be shown only when the widget is updated in some other way, leading to more confusion.
4. Because only one breakpoint could exist per address, the creation of a temporary breakpoint on a top of a regular one would delete it and inherit its properties (e.g. being log-only). This could happen, for instance, if you Stepped Over a `bl` specifically, and pc+4 had a regular breakpoint.

Now there can only be one temporary breakpoint, which is automatically cleared whenever emulation is paused. So, removing some manual clearing from 1., and removing the weird behavior of 2. As it is stored in a separate variable, it won't be seen at all depending on the function used (fixing 3., and removing some checks in other places), and it won't replace a regular breakpoint, instead simply having priority (fixing 4.).
2024-07-05 21:33:22 +02:00
Martino Fontana 037de1ce92 Debugger: fix Run to Here
Now it actually does what it says on the name, instead of creating a breapoint and doing nothing else (not even updating the widget).
Also, it now can't be selected if emulation isn't running.
Closes https://bugs.dolphin-emu.org/issues/13532
2024-07-02 18:29:42 +02:00
Martino Fontana 8235c38df7 Debugger: Small other cleanup
Change misleading names.
Fix function usage: Intepreter and Step Out will not check breakpoints in their own wrong way anymore (e.g. breaking on log-only breakpoints).
2024-07-02 18:29:42 +02:00
Martino Fontana 9aeeea3762 Debugger: Small Breakpoint cleanup
Reuse more code, change misleading names, remove useless documentation, add useful documentation
2024-07-02 18:29:42 +02:00
JosJuice bc67fc97c3 Revert "Audit uses of IsRunning and GetState"
This reverts commit 72cf2bdb87.

SYSCONF settings are getting cleared when they shouldn't be. Let's
revert the change until I get proper time to figure out why it's broken.
2024-06-26 20:36:46 +02:00
Admiral H. Curtiss 9b33b777cf
Merge pull request #12828 from JosJuice/unify-state-variables-2
Clean up Core::GetState
2024-06-22 20:20:54 +02:00
JosJuice 72cf2bdb87 Audit uses of IsRunning and GetState
Some pieces of code are calling IsRunning because there's some
particular action that only makes sense when emulation is running, for
instance showing the state of the emulated CPU. IsRunning is appropriate
to use for this. Then there are pieces of code that are calling
IsRunning because there's some particular thing they must avoid doing
e.g. when the CPU thread is running or IOS is running. IsRunning isn't
quite appropriate for this. Such code should also be checking for the
states Starting and Stopping. Keep in mind that:

* When the state is Starting, the state can asynchronously change to
  Running at any time.
* When we try to stop the core, the state gets set to Stopping before we
  take any action to actually stop things.

This commit adds a new method Core::IsUninitialized, and changes all
callers of IsRunning and GetState that look to me like they should be
changed.
2024-06-21 20:52:55 +02:00
Admiral H. Curtiss 69fc754c65
Merge pull request #12799 from mitaclaw/branch-watch-tool-fixes-3
Branch Watch Tool: Add Set Breakpoints Submenu
2024-06-17 22:36:04 +02:00
mitaclaw eb26937a93 Branch Watch Tool: Add Set Breakpoints Submenu 2024-06-16 20:46:56 -07:00
mitaclaw 8050760fe9 BranchWatchTableModel: Assume Unreachable Code Truly Is 2024-06-05 19:59:39 -07:00
mitaclaw 7dc0bdd5df BranchWatchProxyModel: Avoid String Copies In filterAcceptsRow 2024-06-05 19:59:39 -07:00
mitaclaw cf6a392979 Branch Watch Tool: Smarter Context Menu
Also, right-clicking the table's scroll area when all columns are hidden will show the column visibility menu.
2024-06-01 07:23:05 -07:00
Admiral H. Curtiss 46a89936ae
Merge pull request #12780 from TryTwo/BreakpointWidget_Direct_Edit
BreakpointWidget: Add ability to directly edit breakpoints
2024-06-01 04:25:19 +02:00
TryTwo 3526f3cd9f
Color unused cells and disabled rows.
(bug?) Does not update on dark/light style change, as no signals are sent.
2024-06-01 03:42:25 +02:00
TryTwo 1396e927c7
BreakpointWidget: Give conditionals a popup text entry on click. 2024-06-01 03:42:25 +02:00
TryTwo e52b814eb2
BreakpointWidget: Direct editing of address cells. Prevent symbol cells from being affected. 2024-06-01 03:42:24 +02:00
TryTwo b740671792
BreakpointWidget: Make buttons, removing selecting row on clicking, and fix OnContextMenu which relied on select rows.
Add functions to edit breakpoints.
2024-06-01 03:42:18 +02:00
TryTwo b7b0842d2f BreakpointWidget: Fix Qt centering issues with a Custom Delegate 2024-05-25 17:09:21 -07:00
TryTwo d96840f808 BreakpointWidget: Move delete to the context menu. Selecting rows will be removed, so select -> delete is hard to maintain. 2024-05-25 17:09:21 -07:00
mitaclaw 3b214a4978 BranchWatchDialog: Resolve Linux FIXME
This stopped being an issue for me with a recent package update, so I guess Qt6 was fixed upstream?
2024-05-25 06:22:45 -07:00
mitaclaw 4a2ec86a9a Branch Watch Tool: Add Rule Of 5 And Remove Unnecessary Include 2024-05-25 06:22:44 -07:00