Skip to content
Commit 8da1e659 authored by Oleksandr Senkovych's avatar Oleksandr Senkovych Committed by Kevin Funk
Browse files

Fix inspecting of nested STL containers.

The problem is that GDB MI shows no children for dynamic STL objects,
it just add "dynamic" attribute to it. Here is -var-list-children
output for std::map< int, std::vector<std::string> > object:

SEND: "-var-list-children --thread 1 --frame 0 --all-values "var1" 0 5
kdevelop(20230)/kdevelop (gdb debugger) GDBDebugger::GDB::processLine:
GDB output:
"^done,numchild="2",displayhint="map",children=[child={name="var1.[0]",
exp="[0]",numchild="0",value="0",type="const int",thread-id="1"},
child={name="var1.[1]",exp="[1]",numchild="0",value="{...}",
type="std::vector<std::basic_string<char, std::char_traits<char>,
 std::allocator<char> >, std::allocator<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >
> >",thread-id="1",displayhint="array",dynamic="1"}],has_more="0""

As you see, the second variable, std::vector<std::string> has
numchild="0", but dynamic="1". This patch adds extra check for
"dynamic" attribute in variables.

BUG: 330734
(cherry picked from commit 751488d0)
parent 9a81681f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment