-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debugger: Add memory search types: GreaterThan(OrEqual), LesserThan(OrEqual), and Not Equal #10441
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Adds an enum class to represent the Search type used in a memory search. Prior, this was just handled with an integer to represent each type, but it was very unclear what corresponded to which type at first glance. Made this easier to follow by using an enum to represent the type.
Adds support for basic greater than/greater than or equal/less than/less than or equal/not equal search types for the debugger's Memory Scan. This adds a new input to allow selecting the search comparison type, which defaults to Equals, and allows switching to the above mentioned comparisons. It's set up to allow for adding more easily. Restructures some of the functions to make having multiple comparisons quite manageable. Adds an enum for search comparison types for easy logic handling.
…ng Not Equals Currently array/string searches don't support Not Equals searches, so this needs to be removed.
stenzek
reviewed
Dec 21, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly stylistic nitpicks, nothing major
Sets up if expressions to use constexpr for compile time evaluation and makes the is greater/less than logic simpler to read for int. Also removes an unneeded QPushButton cast and simply compares the pointers directly.
Mrlinkwii
approved these changes
Dec 22, 2023
kamfretoz
approved these changes
Dec 23, 2023
vertver
pushed a commit
to vertver/pcsx2-gdbserver
that referenced
this pull request
Apr 4, 2024
…rEqual), and Not Equal (PCSX2#10441) * Make memory search search type handling more clear with enum Adds an enum class to represent the Search type used in a memory search. Prior, this was just handled with an integer to represent each type, but it was very unclear what corresponded to which type at first glance. Made this easier to follow by using an enum to represent the type. * Debugger : Add support for greater than/less than/not equal search types Adds support for basic greater than/greater than or equal/less than/less than or equal/not equal search types for the debugger's Memory Scan. This adds a new input to allow selecting the search comparison type, which defaults to Equals, and allows switching to the above mentioned comparisons. It's set up to allow for adding more easily. Restructures some of the functions to make having multiple comparisons quite manageable. Adds an enum for search comparison types for easy logic handling. * Debugger: Update Array/String search type error to mention not handling Not Equals Currently array/string searches don't support Not Equals searches, so this needs to be removed. * Debugger: Code cleanup + feedback changes Sets up if expressions to use constexpr for compile time evaluation and makes the is greater/less than logic simpler to read for int. Also removes an unneeded QPushButton cast and simply compares the pointers directly.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Changes
Implements #10266
Adds the ability to do debugger memory searches for values that are not equal to, greater than (or equal), or less than (or equal) to the search value.
Does not tackle
[Not] Changed
,[De/In]creased
, or[De/In]creased By
in this PR as it increases the scope of the issue and the changes required. Adding this as the initial step + refactoring to make it easier to add more in the future.Rationale behind Changes
Currently it is not possible to search for a value that is not exactly known. Adding the ability to do > or < searches allows finding a bulk of values and narrow down results. Not Equals also helps filter out/narrow down results lists for values we know we don't need or don't want.
Suggested Testing Steps
I highly recommend validating > and < (and >=, <=) with float and double, and any int type. Ensuring each search type is behaving as expected for integers, floats, decimals.