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

Default address of "AddressField" should be rendered as hexadecimal #6282

Open
GeorgePattern opened this issue Dec 28, 2024 · 0 comments
Open
Labels
Component: UI Issue needs changes to the user interface Effort: Low Issue should take < 1 week Impact: Low Issue is a papercut or has a good, supported workaround Type: Enhancement Issue is a small enhancement to existing functionality UI: Dialogs Issues with smaller dialogs

Comments

@GeorgePattern
Copy link

What is the feature you'd like to have?

Python API,AddressField with get_form_input, renders the default address as decimal.
Since the type of default parameter in AddressField is int, I cannot force it to render address as hexadecimal.

Users must manually convert the address value to hex even if they want to use the default value.

It'll be nice if I can pass the default parameter as str type.
At least, I would like the initial address rendering result of the AddressField to be expressed in hexadecimal.

Is your feature request related to a problem?

AddessField takes address value as hexadecimal, and I cannot pass the default address value seamlessly.
I think this is a problem on the aspect of user experience.

Are any alternative solutions acceptable?

I think there can be several alternatives.

  1. Change default parameter type of AddressField from int to str. (this suggestion)
  2. Set the default rendering value of AddressField from decimal to hexadecimal.
  3. Make AddressField's text input acceptable for decimal value(I think this is not a good alternative,,)

Additional Information:
You can reproduce this issue with following python code.(binaryninja gui)

af = AddressField("test",default=0x1a7c73)
get_form_input([af],"title")

image

@xusheng6 xusheng6 added Type: Enhancement Issue is a small enhancement to existing functionality Component: UI Issue needs changes to the user interface Impact: Low Issue is a papercut or has a good, supported workaround Effort: Low Issue should take < 1 week UI: Dialogs Issues with smaller dialogs labels Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: UI Issue needs changes to the user interface Effort: Low Issue should take < 1 week Impact: Low Issue is a papercut or has a good, supported workaround Type: Enhancement Issue is a small enhancement to existing functionality UI: Dialogs Issues with smaller dialogs
Projects
None yet
Development

No branches or pull requests

2 participants