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

Add a hotkey for toggling immidiate base #2420

Open
Surendrajat opened this issue Sep 4, 2020 · 2 comments · May be fixed by #2429
Open

Add a hotkey for toggling immidiate base #2420

Surendrajat opened this issue Sep 4, 2020 · 2 comments · May be fixed by #2429
Labels
Enhancement Label requests for new features or to improve existing ones good first issue Easy issues for new comers.

Comments

@Surendrajat
Copy link
Member

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

It'll be nice to have a hotkey (like H in IDA) to toggle the integer base between HEX and DEC. Since it may not work in Decompiler without backend support, having it in Disassembly/Graph will still be nice.

Describe the solution you'd like

So when I press the hotkey (maybe H if it's available), it should work like this:
toggle_base

Describe alternatives you've considered

Click on integer -> Set Immidiate base to -> Hex/Dec

Additional context

@Surendrajat Surendrajat added the Nice-To-Have Issues tagged with this label are considered low priority label Sep 4, 2020
@ITAYC0HEN ITAYC0HEN added Enhancement Label requests for new features or to improve existing ones good first issue Easy issues for new comers. and removed Nice-To-Have Issues tagged with this label are considered low priority labels Sep 4, 2020
@plaets
Copy link

plaets commented Sep 23, 2020

Hello, I've been working on this issue at https://github.com/plaets/cutter/tree/issue-2420
I've already developed a (proof of concept) implementation of this, but currently, the user needs to press the hotkey twice to switch from decimal to hexadecimal base (but only if the value is decimal by default, after the first switch the hotkey works as I expect it to). That is because I'm using ahj to get the current immediate base, and it looks like this command specifies it only if it was changed before. If there is no immbase in ahj output I just assume that the value is hexadecimal, but this is not always true.
The hotkey does not work for graphs in the latest commit, but it should be easy to implement there too.
I wasn't able to find any other way to get the current immediate base. Maybe there is a way to figure it out from aoj but I don't know how. I'm not sure how to proceed...

(I apologize if issues are not the best place to discuss my own implementation, maybe I should open a pull request instead)

@Surendrajat
Copy link
Member Author

@plaets it's totally fine to discuss it here but since you have POC ready and nobody else is working on it, I'll suggest you draft a PR and keep working on it. That way you'll be able to get feedback early on.
That said, thanks for your interest and I'd like to see it in Graph view as well :)

@plaets plaets linked a pull request Sep 23, 2020 that will close this issue
3 tasks
@ITAYC0HEN ITAYC0HEN added the HacktoberFest Any easy issue that is proper for Hacktober Fest contribution label Oct 2, 2020
@xarkes xarkes removed the HacktoberFest Any easy issue that is proper for Hacktober Fest contribution label Feb 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Label requests for new features or to improve existing ones good first issue Easy issues for new comers.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants