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

Show added globals name in disassembly #3329

Open
JomerDev opened this issue Apr 5, 2024 · 3 comments
Open

Show added globals name in disassembly #3329

JomerDev opened this issue Apr 5, 2024 · 3 comments
Labels
rizin Needs changes into rizin codebase.

Comments

@JomerDev
Copy link

JomerDev commented Apr 5, 2024

Is your feature request related to a problem? Please describe.

It's great that we can select memory addresses and make a global out of them, but it would be even better if the name we gave the global would be shown instead of the memory address in places where it is used.
E.g. I have the line lea.l 0x26000.l, a7 in the disassembly window and have added global for 0x26000.
But unless I explicitly look in the globals tab I wont know that I gave a name to that address anywhere in the disassembly tab, making the globals much less useful

Describe the solution you'd like

In the best case, show the globals name instead of the address in the disassembly tab. Show the address the global points to on hover.
Please not the other way around, because then you'll not see that an address is already known unless you hover over every single one

Describe alternatives you've considered

As an alternative the globals name could be shown in a autogenerated comment behind the line.
It could also be an option so people who don't want that can disable it

Just please make it not hidden or only show the globals name on hover, because that makes it impossible to see at a quick glance

Additional context

image
Instead of 0x26000.l show RAM_setup_val and show 0x26000 on hover similar to the tooltip that shows up for a7 on the image

@karliss karliss added the rizin Needs changes into rizin codebase. label Apr 5, 2024
@karliss
Copy link
Member

karliss commented Apr 5, 2024

The comment with name should already be there. Here an example of it working:
image
Although I agree that showing it inline in the place that currently displays "data.0016010" would be preferable.

If you don't see even that much then that's probably due to rizin analysis for that specific architecture not being as good as it is for others.

@JomerDev
Copy link
Author

JomerDev commented Apr 5, 2024

It's the m68k architecture
(Also, does that work with globals I added afterwards, or do I need to re-analyze the file in that case?)

@karliss
Copy link
Member

karliss commented Apr 5, 2024

The screenshot was obtained by:

  • opening binary with default analysis at the start
  • define global variable using "addAt/Add or change global variable"
  • observe the automatic comment being shown next to the instruction

Non need to reanalyze anything

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rizin Needs changes into rizin codebase.
Projects
None yet
Development

No branches or pull requests

2 participants