Commit Graph

268 Commits

Author SHA1 Message Date
Sepalani
5b658e77df MemoryWidget: Fix preview of zero as float/double 2022-04-07 11:55:23 +04:00
TryTwo
ed96b8e308 Debugger MemoryWidget: add float and integer inputs. Add input preview. Change input logic. Use combobox for options. 2022-04-06 16:20:55 -07:00
Admiral H. Curtiss
25c173cefc
Merge pull request #8732 from dreamsyntax/debugger-function-differencing
Qt/Debugger CodeWidget: Record and find specific functions by differencing
2022-04-02 05:42:33 +02:00
TryTwo
8f85e384c3 Debugger MemoryViewWidget: fixed, tighter spacing 2022-03-29 14:16:25 -07:00
dreamsyntax
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
Sepalani
d5916fd14c MemoryWidget: Add negative offset search support 2022-03-24 23:06:25 +04:00
TryTwo
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
JosJuice
9ebfdff6b4
Merge pull request #10423 from Pokechu22/improperly-exclusive-radio-buttons
Fix improperly exclusive radio buttons
2022-02-18 21:20:14 +01:00
Pokechu22
50d9349926 Fix integer sign difference comparison warnings 2022-02-13 14:38:59 -08:00
Pokechu22
99b3ac21e4 NewBreakpointDialog: Fix improperly behaving radio buttons 2022-02-12 11:40:53 -08:00
Pokechu22
a05dd6b7e6 MemoryWidget: Fix improperly behaving radio buttons 2022-02-12 11:40:53 -08:00
Pokechu22
6e5f4125e3 Use Common::ToLower and Common::ToUpper 2022-01-16 17:00:12 -08:00
Admiral H. Curtiss
e08171fa24
Config: Port remaining Core settings to new config system (partial). 2022-01-05 00:54:15 +01:00
Admiral H. Curtiss
d6331c1e71
Config: Port remaining Interface settings to new config system. 2021-12-31 17:40:04 +01:00
Pokechu22
5bcbc8fcef CodeViewWidget: Fix undefined behavior when centered around address 0 2021-12-08 21:42:15 -08:00
Pokechu22
78bfd25964 Fix all uninitialized variable warnings (C26495) 2021-10-13 12:32:16 -07:00
Sepalani
94cba46467 MemoryWidget: Simplify the search logic
Fix leading nul bytes being ignored in hex search
2021-09-20 20:46:26 +04:00
JosJuice
0a973ddcbb DolphinQt: Don't update NetworkWidget when hidden
Like 92a655c but for NetworkWidget (which was added later).
2021-09-18 14:41:11 +02:00
JosJuice
f17584fc06 DolphinQt: Fix divide by zero in JITWidget::Update
I ran into this while fiddling with the debugger.
2021-08-27 10:30:18 +02:00
Dentomologist
87924f2ddd DolphinQt: Remove Windows dialog help buttons 2021-08-21 10:53:12 -07:00
JosJuice
6c908f8ddb DolphinQt: Set default focus for NewBreakpointDialog
I found it a little bit annoying that you can't start typing
the desired address immediately after opening the window.

Also getting rid of the window's ? button while I'm at it.
2021-08-13 10:56:11 +02:00
Pokechu22
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
Pierre Bourdon
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
JMC47
736de8abf6
Merge pull request #9527 from sepalani/watch-items
WatchWidget: Add new/delete/clear toolbar items
2021-05-18 04:08:58 -04:00
Léo Lam
61198541a0
Merge pull request #9562 from sepalani/dis-icons
Breakpoints: Change icon when disabled
2021-03-07 12:14:12 +01:00
Sepalani
1e6dfc6b91 BreakpointWidget: Use QSignalBlocker 2021-03-05 13:35:33 +04:00
Sepalani
fd7eeb7221 BreakpointWidget: Fix delete deleting both MBP and BP at address 2021-03-05 13:01:32 +04:00
Sepalani
359a539f25 Breakpoints: Change icon when disabled 2021-03-05 11:21:37 +04:00
Sepalani
ef977123d5 BreakpointWidget: Emit BreakpointsChanged to update views 2021-03-04 21:10:37 +04:00
Léo Lam
be500a98e2
Merge pull request #8779 from sepalani/open-dump
NetworkWidget: Reorganise SSL options group box
2021-03-04 13:37:10 +01:00
InusualZ
5e1b3514f6 Allow to disable/enable from the BreakpointWidget
Added a context menu, for when a breakpoint is right-clicked
Removed the `itemClicked` behavior, since it would clash with the context menu
2021-03-03 15:55:22 +00:00
Sepalani
a8dc1e3f1c NetworkWidget: Reorganise SSL options group box
Create "Dump options" and "Security options" group boxes.
Add "Network dump format" combo box.
Add "Open dump folder" button.
2021-02-20 18:19:37 +04:00
Sepalani
07f68560e6 WatchWidget: Add new/delete/clear toolbar items 2021-02-20 18:08:46 +04:00
Sepalani
e3d85ffe35 MemoryWidget: Add "Add to watch" action 2021-02-17 21:32:36 +04:00
Sepalani
bbcaede389 RegisterWidget: Fix add to watch action 2021-02-17 21:25:29 +04:00
Léo Lam
6944eaa003
Merge pull request #9512 from sepalani/func-update
CodeViewWidget: Add WithDetailedUpdate to update CodeWidget
2021-02-14 16:30:05 +01:00
Sepalani
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
Sepalani
aab78b88ab NetworkWidget: Add hostname to SSL table 2021-02-13 23:45:22 +04:00
Léo Lam
522cb6b137
IOS: Use less ambiguous names for classes
Some of the device names can be ambiguous and require fully or partly
qualifying the name (e.g. IOS::HLE::FS::) in a somewhat verbose way.

Additionally, insufficiently qualified names are prone to breaking.
Consider the example of IOS::HLE::FS:: (namespace) and
IOS::HLE::Device::FS (class). If we use FS::Foo in a file that doesn't
know about the class, everything will work fine. However, as soon as
Device::FS is declared via a header include or even just forward
declared, that code will cease to compile because FS:: now resolves
to Device::FS if FS::Foo was used in the Device namespace.

It also leads to having to write IOS::ES:: to access ES types and
utilities even for code that is already under the IOS namespace.

The fix for this is simple: rename the device classes and give them
a "device" suffix in their names if the existing ones may be ambiguous.
This makes it clear whether we're referring to the device class or to
something else.

This is not any longer to type, considering it lets us get rid of the
Device namespace, which is now wholly unnecessary.

There are no functional changes in this commit.

A future commit will fix unnecessarily qualified names.
2021-02-12 21:40:31 +01:00
Sepalani
2a15bc6ab2 SSL: Workaround to remove SNI from ClientHello 2021-02-11 23:13:59 +04:00
Sepalani
82bb5d9915 NetworkCaptureLogger: PCAP support added
Log TCP/UDP read/write with fake packet.
2021-01-30 19:35:09 +04:00
Sepalani
b363962757 BreakpointWidget: Remove unnecessary code
PPCDebugInterface.Clear() is called by Core on shutdown instead
2021-01-28 21:23:18 +04:00
Léo Lam
9ca24ae8e0
Merge pull request #9092 from shuffle2/vshack
msbuild: Merge "Core" libs into single DolphinLib
2021-01-28 01:33:46 +01:00
SirMangler
9f6d88880e
MemoryWidget: Add 'Offset' and General Improvements 2021-01-28 01:04:09 +01:00
Shawn Hoffman
84128d9532 rename Common/File to Common/IOFile 2021-01-27 14:29:48 -08:00
Lioncash
765a1b3c09 DolphinQt: Explicitly include <QActionGroup> where applicable
An indirect inclusion scenario that breaks on Qt 6.0
2021-01-13 04:46:11 -05:00
Lioncash
f647ca4620 DolphinQt: Replace usages of QLatin1Literal with QStringLiteral
This literal was deprecated in 5.14.0. Not to mention it wasn't
documented as part of the API either: see the 5.14.0 changelog here:

https://code.qt.io/cgit/qt/qtbase.git/tree/dist/changes-5.14.0?h=v5.14.0

On Qt 6.0 this define is removed entirely. To stay forward compatible,
we can make use of QStringLiteral instead.
2021-01-13 03:50:42 -05:00
Dentomologist
5fe7528855 DolphinQt: Update register view font when Debug Font changes
Resolves https://bugs.dolphin-emu.org/issues/12261

Co-authored-by: Léo Lam <leo@leolam.fr>
2020-10-29 09:31:14 -07:00
Sammi Husky
fa866062ca DolphinQt/Debugger: Fix DBAT and IBAT registers in RegisterWidget 2020-09-29 22:11:21 -07:00
iwubcode
2bb7d207b7 DolphinQt: fix other widgets that use lambdas (capturing this) without setting the receiver 2020-09-12 17:53:17 -05:00
Shawn Hoffman
89b6a4cbee DolphinQt: resolve Qt5.15 deprecations 2020-08-23 13:57:05 -07:00
Tillmann Karras
d2b06f4786 Fix various -Wshadow warnings 2020-08-08 21:45:03 +01:00
Tilka
76b955e090
Merge pull request #8940 from RenaKunisaki/master
add Break On Hit and Log On Hit for instruction breakpoints
2020-08-08 19:46:10 +01:00
Tillmann Karras
5bd2b2699c DolphinQt: fix -Wsign-compare warning 2020-07-24 17:44:32 +01:00
Tillmann Karras
750cb1f830 DolphinQt: fix -Wunused-but-set-variable warning 2020-07-24 17:41:37 +01:00
Rena Kunisaki
a553f22385 Add Break On Hit and Log On Hit for instruction breakpoints 2020-07-11 13:38:58 -04:00
JMC47
1ab37990b1
Merge pull request #8808 from sepalani/net-widgets-block
NetworkWidget: Add Blocking column
2020-06-26 07:38:52 -04:00
JosJuice
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
Tilka
abe125aea7
Merge pull request #8816 from JosJuice/qfontmetrics-width
DolphinQt: Remove another usage of QFontMetrics::width
2020-05-18 00:19:41 +01:00
JosJuice
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
Sepalani
10870a0f74 Config: Migrate SSL options to Onion config 2020-05-17 20:37:10 +01:00
Sepalani
4bf7c3e051 NetworkWidget: Add Blocking column 2020-05-13 11:53:29 +04:00
Sepalani
39d34e133f Debugger: Add a Thread widget
DebugInterface: Add GetThreads

WatchWidget: Update widget on AddWatch
2020-05-03 20:48:30 +04:00
JosJuice
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
JosJuice
492bb5ccee DolphinQt: Add some i18n comments for recently added strings 2020-05-01 13:22:54 +02:00
Sepalani
5e33cd48da Debugger: Add a Network widget
Display socket table, SSL context and options
2020-04-27 21:47:00 +04:00
Admiral H. Curtiss
330c80055d Qt/Debugger: Refresh windows on savestate load. 2020-04-15 00:12:35 +02:00
Admiral H. Curtiss
303b18ddaf Qt/CodeWidget: Typo in settings key. 2020-03-20 20:51:26 +01:00
Admiral H. Curtiss
e8dfb8f78d Qt/CodeViewWidget: Make columns resizable by the user and set sensible defaults. 2020-03-18 22:27:53 +01:00
Admiral H. Curtiss
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
Admiral H. Curtiss
18127e2554 Qt/CodeViewWidget: Implement branch arrows. 2020-03-07 01:52:53 +01:00
Admiral H. Curtiss
c70e004f53 Qt/CodeViewWidget: Use named constants for column IDs. 2020-02-23 18:49:27 +01:00
Luke Street
3e94366fe0 DolphinQt/Debugger: Fix crash with floating debugger windows 2020-02-09 02:32:04 -05:00
Jordan Woyak
b9f34bc822 DolphinQt: setTabKeyNavigation(false) on QTableWidget and QTableView. 2020-02-06 20:48:45 -06:00
Léo Lam
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
Léo Lam
4cc2d97294 Require clang-format 9 and reformat source code
This updates the lint script to require clang-format 9 and reformats
existing source code. Since VS2019 ships with clang-format 9 this
should make auto reformats less painful.

This also updates the clang-format configuration to set
BraceWrapping.AfterCaseLabel to true to ensure consistent brace
style; otherwise clang-format 9+ defaults to putting braces on
the same line as switch case labels.
2020-01-08 22:18:15 +01:00
Matthew Foulds
5b6e7aabcf Fixed 11874 (leading 0s ignored by debugger) 2019-11-22 19:16:34 +00:00
Mat M
c6da1f050b
Merge pull request #8376 from tkln/watch-widget-sign-compare
WatchWidget: Fix integer comparison signedness warnings
2019-10-23 20:20:51 -04:00
JosJuice
a6daed23e7
Merge pull request #8387 from sepalani/reg-view-in
RegisterWidget: Fix view in code/memory
2019-10-16 20:43:32 +02:00
Admiral H. Curtiss
bbeb25de48 Qt/Debugger/CodeWidget: Allow pressing 'enter' in address search box. 2019-10-14 21:47:27 +02:00
Sepalani
beeb68d541 RegisterWidget: Fix view in code/memory 2019-10-06 12:25:46 +04:00
Aapo Vienamo
e3e682c4ca WatchWidget: Change type of NUM_COLUMNS to int
Fixes integer comparison signedness warnings.
2019-10-03 23:00:41 +03:00
Lioncash
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
Silent
3529dfd691
Connect numerous QPushButtons to use clicked signal instead of pressed. This unifies UI behaviour more. 2019-07-24 00:18:58 +02:00
Anthony
66e7a11139
Merge pull request #8235 from lioncash/move
Common/DebugInterface: Minor cleanup changes
2019-07-22 15:07:14 -07:00
Lioncash
2b00eefbef DolphinQt/Debugger: Replace AddressSpace.h inclusions with a forward declaration 2019-07-15 23:20:26 -04:00
Lioncash
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
JosJuice
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
Pokechu22
ae0843f53d Show values as floats in watch 2019-06-29 12:04:20 -07:00
Léo Lam
9373bc3aa9
Merge pull request #8102 from dreamsyntax/debug-mousefix
Qt/Debugger CodeWidget navigation unification
2019-05-24 14:49:05 +02:00
dreamsyntax
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
Léo Lam
d3c4d278e2
Merge pull request #8077 from leoetlino/debugger-valign
Qt/Debugger: Fix register cell text vertical alignment
2019-05-17 20:17:52 +02:00
TryTwo
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
Léo Lam
e66547d6e5 Qt: Fix AddressSpace::WriteXXX parameter order mixup 2019-05-11 00:16:27 +02:00
Léo Lam
db159ec8bf Qt/Debugger: Vertically align text in register cells
Looks better with the text vertically aligned.
2019-05-05 10:30:22 +02:00
Léo Lam
afa46aaf43
Merge pull request #7887 from lioncash/hid
DolphinQt/Debugger/RegisterColumn: Add HID registers to the register pane
2019-05-04 22:33:45 +02:00
booto
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
spycrab
906ccdb1b4
Merge pull request #8030 from spycrab/qt_patch_preview
Qt/Debugger: Implement patch instruction preview
2019-04-28 00:32:36 +02:00
spycrab
f6e73a0aec Qt/Debugger: Implement patch instruction preview 2019-04-27 23:31:19 +02:00
chargeflux
290275e8ea Debugger: Move hiding logic via setHidden() to before setFloating() 2019-04-23 16:20:42 -04:00
Lioncash
02da306d9a DolphinQt/Debugger/RegisterColumn: Add HID registers to the register pane
Adds the Hardware Implementation-Dependent registers to the register
pane, which makes it much nicer to see which hardware-specific features
are enabled or disabled.
2019-03-13 15:45:28 -04:00
CrystalGamma
e3075f3834 PowerPC: Factor out CR helpers into POD class 2019-03-08 20:42:09 +01:00
spycrab
70da86f1c3 Qt: Use ModalMessageBox everywhere 2019-03-04 21:53:02 +01:00
Filip Gawin
49fe9f5db1 Use empty instead of size 2019-02-13 00:03:49 +01:00
spycrab
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
spycrab
3e3f9565ec Qt/Debugger: Add Show in Code / Show in Memory 2018-12-28 20:30:38 +01:00
Lioncash
244d083f0e PowerPC: Remove separate macros for paired singles
Previously, PowerPC.h had four macros in it like so:

\#define rPS0(i) (*(double*)(&PowerPC::ppcState.ps[i][0]))
\#define rPS1(i) (*(double*)(&PowerPC::ppcState.ps[i][1]))

\#define riPS0(i) (*(u64*)(&PowerPC::ppcState.ps[i][0]))
\#define riPS1(i) (*(u64*)(&PowerPC::ppcState.ps[i][1]))

Casting between object representations like this is undefined behavior.
Given this is used heavily with the interpreter (that is, the most
accurate, but slowest CPU backend), we don't exactly want to allow
undefined behavior to creep into it.

Instead, this adds a helper struct for operating with the paired singles,
and replaces the four macros with a single macro for accessing the
paired-singles/floating-point registers.

This way, it's left up to the caller to explicitly decide how it wants to interpret
the data (and makes it more obvious where different interpretations of
the same data are occurring at, as there'll be a call to one of the
[x]AsDouble() functions).
2018-12-25 10:35:09 -05:00
Mat M
57529bc455
Merge pull request #7438 from RolandMunsil/master
Fix issue where breakpoint type wasn't correct in debugger memory view.
2018-10-12 10:30:31 -04:00
Tillmann Karras
db54b903ef Zero-initialize CPU state and register view 2018-10-10 00:04:02 +01:00
aldelaro5
68aff9c023
Qt/debugger: make the symbols search case insensitive 2018-10-08 21:17:33 -04:00
Roland Munsil
5eefd0482a Fix issue with breakpoint type loaded from settings not propogating to MemoryWindow 2018-09-25 17:45:18 -05:00
JosJuice
fb6b31bba8 Re-add i18n comments that were lost in the DolphinWX removal 2018-09-08 15:58:15 +02:00
Pierre Bourdon
d44087128e
Merge pull request #7342 from spycrab/qt_dbg_scroll
Qt/Debugger: Improve scrolling
2018-08-20 21:41:54 +02:00
spycrab
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
spycrab
27bc9046e7 Qt/Debugger: Readd title bar to breakpoint widget
Removed it by accident in #7299
2018-08-19 13:37:59 +02:00
spycrab
8d184ab9bd Qt/Debugger: Make spacing more compact 2018-08-15 19:26:04 +02:00
spycrab
a22ffb6387 Qt: Remove ActionHelper 2018-07-09 10:02:10 +02:00
spycrab
13ba24c5a6 Move DolphinQt2 to DolphinQt 2018-07-07 00:48:38 +02:00