Skip to content
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

Allow expressions in Move Memory Block dialog like in Go To dialog #7227

Open
hippietrail opened this issue Nov 26, 2024 · 0 comments
Open
Assignees
Labels
Feature: GUI Feature: Memory Status: Internal This is being tracked internally by the Ghidra team

Comments

@hippietrail
Copy link
Contributor

Is your feature request related to a problem? Please describe.
When exploring new file formats and often when implementing Loaders, we want to move the memory block when we discover the length of the header or a field with the load address.

Here I find the load address at offset 0011 is BA00 and the header is 80 bytes long. I know I want what is now at 0080 to start at BA00 but I have to calculate in my head, grab a calculator, or guess. If the Move Memory Block dialog shared the expression feature with the Go To dialog I would just enter BA00-80.
image

Describe the solution you'd like
The Go To dialog already lets you enter an expression, which may be relative: Screenshot 2024-11-26 at 4 30 54 pm

The current Move Memory Block for comparison:
Screenshot 2024-11-26 at 4 31 35 pm

Describe alternatives you've considered
Using a calculator, trying to calculate in my head, guessing.

Bonus feature requests

  • If the main feature request is not accepted, and even if it is, it would be great to have an Apply button in the dialog so that when we get it wrong we can just try again until the listing lines up.
  • It would be nice if the numeric fields of the dialog had the decimal vs hex feature that many but not all numeric fields in Ghidra dialogs have. Currently the length displays both decimal and hex but all the addresses display only hex. They're also not labelled hex so if they don't contain a-f they can be mistaken for decimal. Especially if we're following documentation with values given in decimal.
  • It would be nice if the numeric field New Start Address is focused with the caret in it already when the dialog appears.
@ryanmkurtz ryanmkurtz self-assigned this Nov 26, 2024
@ryanmkurtz ryanmkurtz added Feature: GUI Feature: Memory Status: Prioritize This is currently being prioritized labels Nov 26, 2024
@ryanmkurtz ryanmkurtz added Status: Internal This is being tracked internally by the Ghidra team and removed Status: Prioritize This is currently being prioritized labels Dec 12, 2024
@ryanmkurtz ryanmkurtz assigned ghidragon and unassigned ryanmkurtz Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: GUI Feature: Memory Status: Internal This is being tracked internally by the Ghidra team
Projects
None yet
Development

No branches or pull requests

3 participants