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

Rename expressions functionality #22813

Open
satk0 opened this issue Apr 9, 2024 · 5 comments
Open

Rename expressions functionality #22813

satk0 opened this issue Apr 9, 2024 · 5 comments

Comments

@satk0
Copy link

satk0 commented Apr 9, 2024

Description

r2 could enable renaming the expressions, like the afvn command renames locals/arguments.

For instance:

Instead of hard to remember expression, like rbp + rax - 0x1020:

image

There could be a command that renames it to e.g. cwd[i] (it is just a concept, drawn in GIMP):

image

As Pancake said, such a renaming should only affect the context of the function and not be global.

@trufae
Copy link
Collaborator

trufae commented Apr 10, 2024

You can do this with rpase plugins in c and js. If its ok for you we can close the ticket because im not sure if this should be a core feature of r2 because it looks quitw custom and hacky when the proper fix must be improving the variable analysis code

@satk0
Copy link
Author

satk0 commented Apr 10, 2024

As far as I know, no other disassembler has such a functionality, so that would make radare2 even more unique and customizable.

@trufae
Copy link
Collaborator

trufae commented Apr 11, 2024

Yeah i agree on that. It can be very useful because it gives the user the ability to mess with the disassembly the eay they need like if it was made with pen and paper. But as long as doing it natively will require abi breaking changes and i think its better to do the change as plugins for now, having that implemented in C can be also useful because it will provide the feature in place and do it in a modular way

@satk0
Copy link
Author

satk0 commented Apr 14, 2024

Great that you agree with me on it. If I manage to create a plugin like this I would definitely post it here.

@trufae
Copy link
Collaborator

trufae commented May 9, 2024

Can you publish your plugin so the ticket is in sync with the current state? Feel free to submit it to the extras repo if you want

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

No branches or pull requests

2 participants