rizinorg / cutter

Free and Open Source Reverse Engineering Platform powered by rizin
https://cutter.re
GNU General Public License v3.0
15.73k stars 1.15k forks source link

Show added globals name in disassembly #3329

Open JomerDev opened 5 months ago

JomerDev commented 5 months ago

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 commented 5 months ago

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 commented 5 months ago

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 commented 5 months ago

The screenshot was obtained by:

Non need to reanalyze anything