epasveer / seer

Seer - a gui frontend to gdb
GNU General Public License v3.0
2.09k stars 66 forks source link

Suggestion: Struct Visualizer in Locals tab #178

Closed tinloaf closed 9 months ago

tinloaf commented 10 months ago

First: Thanks for seer, it's awesome.

One thing that regularly costs me time is that I have structures in my 'locals' tab that I can't really look at without using the struct visualizer. The code to build a tree-view for structs seems to be there (it's used in the struct visualizer) - would it be possible/desirable to also directly use that in the locals tab? I.e., directly make all structs expandable in the locals tab?

epasveer commented 10 months ago

Hi,

First: Thanks for seer, it's awesome.

Thanks!

To clarify, a struct in the "locals" tab currently shows the structure in a flat manner.

image

And you want it more "nested", as in the Struct Visualizer.

image

I think this is doable. I'll probably make it an option accessible from the "Locals" tab.

tinloaf commented 10 months ago

Yes exactly. If would be great if the struct in the 'locals' tab could be expanded in the same way as in the struct visualizer tab. Thanks! :)

epasveer commented 10 months ago

This should be implemented in the mainline. Go ahead and pull it and let me know how you like it.

image

epasveer commented 10 months ago

Note. I haven't added the automatic tree expanding/collapsing. I wanted to get the basics down first. Let me know what types of expanding you want. For example:

Anyway, you get the idea. Let me know what you think.

tinloaf commented 10 months ago

Hi, this looks great. Thanks! :) I think that it's okay to leave every symbol unexpanded at the start.

However, I suspect (but I'm not sure) this causes a crash for me. I have created #181 for the crash.

epasveer commented 10 months ago

Cool. I'll leave it as unexpanded, for now.

I've checked #181. I think I know what's going on. And it related to my changes.

epasveer commented 9 months ago

I noticed the "locals" tab didn't expand structs that were passed by reference. This is fixed in "main".

Also, I've added struct expansion to the "logger" tab. I'll do the same to the "tracker" tab and the "arguments" tab shortly. This will make this feature a little more consistent through out Seer.

epasveer commented 9 months ago

The "tracker" tab and "arguments" tab now have nested struct viewing.

"main" has been updated in case you want to try it.

I'll close this task in a few days.

tinloaf commented 9 months ago

Thanks, I think it's a great improvement!

epasveer commented 9 months ago

Good. Thanks.

Closing task.