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

Added option to add new flags from hexdump #2932 #3297

Open
wants to merge 12 commits into
base: dev
Choose a base branch
from

Conversation

Rohan-Sagar
Copy link

Your checklist for this pull request

Detailed description

  • Problem:
    • Currently, users can add new flags from the disassembly widget using the right-click menu and a keyboard shortcut. However, this functionality is missing in the hexdump widget.
  • Proposed solution:
    • To address this issue, we propose the following solution:
      • Add Action for Adding New Flag:
        • Introduce a new action in the right-click menu of the hexdump widget for adding a new flag. This action will provide users with a convenient option to add flags directly from the hexdump view.
      • Synchronize with Disassembly Widget:
        • Ensure that the keyboard shortcut for adding flags from the hexdump widget is synchronized with the shortcut used in the disassembly widget. This consistency will enhance the user experience and streamline flag management across different views.
      • Implementation Details:
        • Add a QAction object (actionFlag) within the HexWidget class to represent the action for adding a new flag.
        • Add a QAction object (actionDeleteFlag) within the HexWidget class to represent the action for deleting a flag.
        • Implement the onActionAddFlagTriggered() slot to handle user-triggered events for adding flags within the HexWidget class.
        • Implement the onActionDeleteFlagTriggered() slot to handle user-triggered events for deleting flags within the HexWidget class.
        • Update the context menu event handling (contextMenuEvent()) in the HexWidget class to include the new action for adding flags.
        • Introduce the parentForDialog() function in the HexWidget class to provide the parent widget for dialogs spawned within the hexdump view.

Test plan (required)

Functionality Test:

  • Open the application and navigate to the hexdump view.
  • Right-click in the hexdump widget to bring up the context menu.
  • Select the option to add a new flag. Verify that a dialog box or input field appears with the correct address, allowing you to enter a flag name and size.
  • Enter a valid flag name and size, then confirm the action.
  • Verify that the new flag is correctly added to the list of flags and is visible in the hexdump widget or disassembly widget.

Keyboard Shortcut Synchronization Test:

  • While in the hexdump view, use the keyboard shortcut (key bind N) for adding a new flag (ensure this is the same shortcut used in the disassembly widget).
  • Confirm that the action for adding a new flag is triggered, similar to the right-click context menu action.
  • Follow the same steps as in the functionality test to add a flag and verify its addition.

Cross-Widget Synchronization Test:

  • After adding a new flag in the hexdump widget, switch to the disassembly view.
  • Verify that the newly added flag is also reflected in the disassembly widget and any other relevant parts of the application where flags are displayed.

Screenshot 2024-02-15 at 7 02 39 PM
Screenshot 2024-02-15 at 7 03 07 PM
Screenshot 2024-02-15 at 7 03 26 PM
Screenshot 2024-02-15 at 7 03 40 PM
Screenshot 2024-02-15 at 7 03 53 PM
Screenshot 2024-02-15 at 7 04 11 PM

Closing issues

@karliss
Copy link
Member

karliss commented Feb 16, 2024

So is this ready for review or is it still WIP (work in progress)? Note if the PR is still work in progress, but you just wanted to give a heads up early, and there are things you want to change before review, you can use the Github draft feature.

@Rohan-Sagar Rohan-Sagar marked this pull request as draft February 16, 2024 13:48
@Rohan-Sagar
Copy link
Author

So is this ready for review or is it still WIP (work in progress)? Note if the PR is still work in progress, but you just wanted to give a heads up early, and there are things you want to change before review, you can use the Github draft feature.

Thank you for the notice. I've marked the pull request as a draft to indicate that it's ready for review, but there may still be some changes. Once all adjustments are made, I'll mark it as ready for review again.

@Rohan-Sagar Rohan-Sagar marked this pull request as ready for review February 19, 2024 18:23
@karliss karliss self-requested a review February 20, 2024 06:49
.vscode/settings.json Outdated Show resolved Hide resolved
src/dialogs/CommentsDialog.cpp Outdated Show resolved Hide resolved
src/dialogs/FlagDialog.cpp Outdated Show resolved Hide resolved
src/menus/DisassemblyContextMenu.cpp Outdated Show resolved Hide resolved
src/widgets/HexWidget.cpp Outdated Show resolved Hide resolved
src/widgets/HexWidget.cpp Outdated Show resolved Hide resolved
src/widgets/HexWidget.cpp Outdated Show resolved Hide resolved
@Rohan-Sagar Rohan-Sagar changed the title WIP Added option to add new flags from hexdump #2932 Added option to add new flags from hexdump #2932 Mar 20, 2024
bferro373 and others added 2 commits April 12, 2024 21:46
THIS FILE SHOULD BE DELETED BEFORE UPLOADING ANY PULL REQUESTS
@karliss
Copy link
Member

karliss commented Apr 24, 2024

@Rohan-Sagar Are you planning to finish cleaning up this PR ?

@Rohan-Sagar
Copy link
Author

@karliss I’m getting this issue in the continuous-integration check:

Dependency libzstd skipped: feature use_sys_libzstd disabled
Downloading zstd source from https://github.com/facebook/zstd/releases/download/v1.5.5/zstd-1.5.5.tar.gz
<urlopen error [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond>
A fallback URL could be specified using source_fallback_url key in the wrap file
........\rizin\meson.build:621:2: ERROR: could not get https://github.com/facebook/zstd/releases/download/v1.5.5/zstd-1.5.5.tar.gz is the internet available?

Any idea what could be going wrong?

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.

3 participants