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

[Feature] Better interaction between data and disassembler #1994

Open
1 task
mikrosk opened this issue Dec 9, 2024 · 4 comments
Open
1 task

[Feature] Better interaction between data and disassembler #1994

mikrosk opened this issue Dec 9, 2024 · 4 comments

Comments

@mikrosk
Copy link

mikrosk commented Dec 9, 2024

What feature would you like to see?

Currently I'm missing two super-useful features for my workflow:

  • Selecting some range with the cursor and being able to show it disassembled. Currently I have to manually count (!) the offsets, remember them and then enter it into the disassembly window (if there's an easier way, I'm all ears)
  • Similarly, editing something in the data window and changing the disassembly output based on that

How will this feature be useful to you and others?

I'm often analysing what m68k applications do and I can't afford IDA for this kind of tasks.

Request Type

  • I can provide a PoC for this feature or am willing to work on it myself and submit a PR

Additional context?

No response

@WerWolv
Copy link
Owner

WerWolv commented Dec 9, 2024

Hey, I added an option to the hex editor right click menu to immediately disassemble the selected region (Also the CTRL + SHIFT + D shortcut). Does that suffice for what you're doing?

image

@mikrosk
Copy link
Author

mikrosk commented Dec 9, 2024

Wow, that was fast. From a quick test I can say it works perfectly.

I have a one suggestion to this feature, though: before one had to enter everything manually (as mentioned in my first post) so one entered the base address, from, to, the CPU etc.

Now it is nicely automated and luckily, all settings stay (i.e. I don't have to choose the CPU etc again). However there's one part which doesn't really fit this and that is the base address.

Imagine you have an executable image or a ROM image or anything open. You know it's loaded to a specific base address, so you set it, cool. But since you don't want to read a 100 KB disassembly output, you just select the portion you are interested in. However what happens now? The base address is applied to the selected region from the beginning so the region starting at offset e.g. 0x0100 will be starting at the previously set base address.

Of course, you can change the base offset and reapply but that's not very convenient because you have to remember the offset you are selecting from. Could you change the behaviour in such way that the selection would calculate the base address used in the disassembly from the last one manually entered + the offset from the selection?

@WerWolv
Copy link
Owner

WerWolv commented Dec 9, 2024

Hmm that's a good point. Honestly not quite sure how to handle this nicely yet but I'll try to figure something out

@mikrosk
Copy link
Author

mikrosk commented Dec 10, 2024

I have been playing with it a bit more. You are right, one has to be careful how to approach this. I have even noticed that there already is a similar use case (which I seem to have missed completely): I can select some range in Hex editor and then go to the Disassembler tab and choose "selection" and it will work in the same way as this new cool feature.

But there's the same issue: I have set the base address to something and now I'm choosing some random selections which are always disassembled from the same base address.

IMHO the base address should be used only when you choose "Entire Data". If you choose "Region", "Selection" or do it in the Hex editor's menu/shortcut, the start address should be always calculated as base address plus the offset.

For cases that somebody would prefer to just randomly trying some regions/selections with the same start address (although I have a hard time imagining why...) you could always add a checkbox next to Base address, something like "Always use as start address".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants