rohanrhu / gdb-frontend

☕ GDBFrontend is an easy, flexible and extensible gui debugger.
https://oguzhaneroglu.com/projects/gdb-frontend/
GNU General Public License v3.0
2.84k stars 100 forks source link

View base class elements #11

Closed jstaursky closed 4 years ago

jstaursky commented 4 years ago

Is there a way to view variables apart of the base class when only a derived class variable is available in scope? I know you can access them but I was wondering if I could have an expanded view rather than have to set a window manually for each member of the base class.

rohanrhu commented 4 years ago

I did not undertand your question. Can you explain more with screenshots and description?

jstaursky commented 4 years ago

No problem, gdb-frontend-example Notice how the derived variable doot has its own window that lists its member derived_var but in order to see its base class variable base_var an new window instance must be opened. it would be nice to bring this information into 1 window to remind you that the class you are working with is a derived class. And also to show information about variables in the base class.

rohanrhu commented 4 years ago

I made base class members visible. You can test it and I will make a new release after testing.

jstaursky commented 4 years ago

nice seems to work well (haven't tested super thoroughly outside the example). Just a suggestion but it might be useful to have the base members to be put inside a submenu so that the derived members are clear from the base members something like

doot members ...
--------------------------------------------------------------------------------
 <foo> = { ... (expand menu)
--------------------------------------------------------------------------------

Or some other way to discern the base class members from the derived class members. It's not that big of a deal for a small example like this but for bigger projects there can be a lot of both base class members and derived members.

rohanrhu commented 4 years ago

Actually inherited classes are shown but i excluded them. So i can incldue them again but expanding inherited class feature is not implemented yet but still that can be useful for understanding member hierarchy.