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

Show available flags and comments in hexdump (#1471) #2111

Closed

Conversation

dhavalpur0hit
Copy link
Contributor

Your checklist for this pull request

Detailed description

Functional Changes

  • Displays the flags and comments in the Information tab of the hexdump sidebar for the current address.

Code Changes
HexdumpWidget.ui:

  • Added ui item elements under hexSideTab_2 for displaying flags and comments.

HexdumpWidget.cpp:

  • Set the placeholder text for the flag and comment elements using setPlaceholderText.
  • Created a new function showMetaInfo(RVA address):
    • Fetched the flags info for the address using r_flag_get_i (core->flags, address)
    • Fetched the comments for the address using Core()->cmd("CC." + RAddressString(address)
    • Set the fetched values for the UI elements using setText.
  • Invoked showMetaInfo whenever positionChanged signal is emitted.

Test plan (required)

  • Both flag and comment are present:
    Case-1

  • Only the flag is present:
    Case-2

  • Only the Comment is present:
    hexdump-4

  • Both flag and comment are not present:
    Case-4

Closing issues
Closes #1471

@dhavalpur0hit
Copy link
Contributor Author

@karliss, please review this.

@karliss
Copy link
Member

karliss commented Mar 23, 2020

This way of displaying the flag and comment seems very inconvenient to me, but I'd like to hear other opinions.

@radare
Copy link
Contributor

radare commented Mar 23, 2020 via email

@karliss
Copy link
Member

karliss commented Mar 23, 2020

@dhaval0894 , we appreciate the contribution but unfortunately your current implementation provides little improvement over just opening a synchronized disassembly widget next to hexwidget. You can read the ideas for how it could look in #1471. pxa suggested by radare and right side of wxHexEditor screenshot in https://github.com/radareorg/cutter/issues/1945#issuecomment-598116829 are also good ideas.

@karliss karliss closed this Mar 23, 2020
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

Successfully merging this pull request may close these issues.

Mark available flags and available comments in hexdump
3 participants