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 variables of the selected type in "Types" tab #3313

Open
XVilka opened this issue Mar 5, 2024 · 3 comments
Open

Show variables of the selected type in "Types" tab #3313

XVilka opened this issue Mar 5, 2024 · 3 comments
Assignees
Labels
good first issue Easy issues for new comers. UI

Comments

@XVilka
Copy link
Member

XVilka commented Mar 5, 2024

In the "Types" tab, righ click menu on any non-atomic type should have "Show variables and globals of this type" option, that will show dialogue with a list of those, and double click on every item in those would go to the disassembly view, where variable is defined.

@XVilka XVilka added good first issue Easy issues for new comers. UI labels Mar 5, 2024
@DreamerChaserHAH
Copy link

Greetings! @XVilka

As an interested contributor for Google SoC, I would like to take this good-first-issue to prove my ability if it is still available.

image

I was checking out Type tab, and identified several types
Primitive (atomic)
Struct (non-atomic <- value with several values?)
Typedef (non-atomic <- could be used in different places?)
Union (non-atomic <- same reason as struct)

I will check out the codebase to find the part where the categories are determined.

According to your text, here is a list of things we want to implement:

  1. Right click context menu with "Show variables and globals of this type"
    image

  2. Display dialogue on click
    image

  3. Display all the variables using the type inside the dialogue
    I would like to believe that a search function has already been implemented within cutter-core or rz
    The UI can be modified accordingly, but I believe we can display it like how the functions are displayed on the left tab (correct me if you want a specific implementation)
    image

  4. Double click to move to that location in disassembly code
    Switch to assembly tab, and move to relevant map depending on what the user selected. We could potentially have the variable highlighted as well.

Best regards

@DreamerChaserHAH
Copy link

Progress Update 1 (Milestone 1)

image

How I implemented this

I added an additional field called is_atomic into TypeDescription in CutterDescriptions.h
image

Then, I checked whether if the type is atomic or not during the data entry process in Cutter.cpp
image

Then, in the TypesWidget.cpp, I check for the is_atomic and display it as necessary
image

@DreamerChaserHAH
Copy link

Sorry for the delay. Although I started to contribute because of Google SoC I couldn't manage it as my time management failed me entirely.

I will work on the project again, asap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Easy issues for new comers. UI
Projects
Status: No status
Development

No branches or pull requests

2 participants