Gentoo Archives: gentoo-user

From: Fernando Rodriguez <frodriguez.developer@×××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: [OFF TOPIC] Qt Creator unable to access containers in debug mode
Date: Wed, 25 Mar 2015 00:12:25
Message-Id: 4994020.5WZmRhaifa@navi
In Reply to: [gentoo-user] Re: [OFF TOPIC] Qt Creator unable to access containers in debug mode by Nikos Chantziaras
1 On Wednesday, March 25, 2015 12:32:30 AM Nikos Chantziaras wrote:
2 > Note that gdb cannot inspect containers. It doesn't know anything about
3 > them.
4
5 It can, it's just not pretty:
6
7 (gdb) p list1
8 $1 = {{p = {static shared_null = {ref = {_q_value = 15}, alloc = 0, begin = 0,
9 end = 0, sharable = 1, array = {0x0}},
10 d = 0x61b050}, d = 0x61b050}}
11 (gdb) p/c ((QString*)list1.d.array).d.data[0]@10
12 $2 = {72 'H', 101 'e', 108 'l', 108 'l', 111 'o', 32 ' ', 71 'G', 68 'D', 66
13 'B', 0 '\000'}
14
15 and with missing symbols:
16
17 (gdb) p list1
18 No symbol "list1" in current context.
19
20 So I wasn't arguing, just suggesting a way to find out quickly.
21
22 --
23 Fernando Rodriguez