close
The Wayback Machine - https://web.archive.org/web/20211015100313/https://github.com/radareorg/radare2/issues/19003
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

Unique coloring for simmilar immediates #19003

Open
swoops opened this issue Aug 19, 2021 · 0 comments
Open

Unique coloring for simmilar immediates #19003

swoops opened this issue Aug 19, 2021 · 0 comments

Comments

@swoops
Copy link
Collaborator

@swoops swoops commented Aug 19, 2021

Description

Please describe what are you missing or wanting to be improved
Recently I read a new syntax coloring technique for programing languages. Instead of highlighting grammar, highlight the things you are likely to mistake. So make sure strcpy and strncpy are easily distinguishable by their color. It would be cool to apply this to immediate values in assembly and the ? command.

For example, it is difficult to distinguish between 0x9d343f8b318614d1 and 0x9d345f8b318614d1. I don't even read that number all the way when I see it, I won't recognize it if I see it again later in code. If later the result of a math operation (from ? cmd) is 0x9d343f8b318614d1, I won't remember the significance of the number. Applying a unique color to similar numbers would help the user remember if they had seen the number before. It would make it easy to see if the same number is used a lot in large chunks of code, or if numbers vary slightly.

Initial implementation could just be a simple hash of the immediate, then index that value from an accepted color space.

** If anyone knows the article I am speaking of, please link it. I can't find it anymore and I would like them to receive credit for the idea.

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

Successfully merging a pull request may close this issue.

None yet
1 participant