rohanrhu / gdb-frontend

☕ GDBFrontend is an easy, flexible and extensible gui debugger. Try it on https://debugme.dev
https://oguzhaneroglu.com/projects/gdb-frontend/
GNU General Public License v3.0
2.79k stars 98 forks source link

How to view std::vector contents? #32

Closed typon closed 2 years ago

typon commented 2 years ago

Whenever I click on a variable that's a std::vector type, I get the error:

Structure or union is not initialized yet

rohanrhu commented 2 years ago

Hi, can you send the code?

typon commented 2 years ago

Hi Rohan,

It's basically the standard vector...here let me make a simple godbolt example:

https://godbolt.org/z/WYzd1z41v

I can't step through this code and see the contents of the vector in the debugger.

rohanrhu commented 2 years ago

Ah alright.. we don't have an array explorer yet.

image

I will make an array exploring feature to this VariableExplorer that supports also C++'s std::vector.

Btw we have a LinkedListExplorer. image

typon commented 2 years ago

awesome. the linkedlist explorer looks great btw

rohanrhu commented 2 years ago

I added auto and ptr array support to VariablesExplorer. std::vector support is still waiting, I will make it soon. I also will add std::list support on LinkedListVisualizer.

I've also made expression connection to support arrays too.

image

rohanrhu commented 2 years ago

@typon std::vector support is added. Feel free to re-open this issue when you see any issue. 😊

image