Gentoo Archives: gentoo-user

From: Nikos Chantziaras <realnc@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: [OFF TOPIC] Qt Creator unable to access containers in debug mode
Date: Tue, 24 Mar 2015 22:32:54
Message-Id: mesolu$oob$1@ger.gmane.org
In Reply to: Re: [gentoo-user] Re: [OFF TOPIC] Qt Creator unable to access containers in debug mode by Francisco Ares
1 Note that gdb cannot inspect containers. It doesn't know anything about
2 them.
3
4 Qt Creator uses "debugging helpers" for that. See:
5
6 https://qt-project.org/doc/qtcreator-2.8/creator-debugging-helpers.html
7
8 Since you're using a deprecated version of Creator (2.8 is from 2013 and
9 not maintained anymore), those helpers are probably not updated for new
10 gdb versions.
11
12 If you don't want to upgrade Creator through portage, you could instead
13 use the binary Qt Creator installer, and simply install it in your home
14 directory (I did that in the past, before Qt5 was put in ~arch.)
15
16
17 On 24/03/15 22:43, Francisco Ares wrote:
18 > Thank you all for those clues, pretty interesting.
19 >
20 > For now I suppose it is a gdb thing, as QtCreator is able to show
21 > details about STL containers as expected.
22 >
23 > Going to fiddle in gdb a bit more...
24 >
25 >
26 > 2015-03-24 17:07 GMT-03:00 Fernando Rodriguez
27 > <frodriguez.developer@×××××××.com
28 > <mailto:frodriguez.developer@×××××××.com>>:
29 >
30 > On Tuesday, March 24, 2015 9:32:07 PM Nikos Chantziaras wrote:
31 > > On 24/03/15 21:12, Fernando Rodriguez wrote:
32 > > > On Tuesday, March 24, 2015 10:07:56 AM Francisco Ares wrote:
33 > > >> Hi,
34 > > >>
35 > > >> Recently - but can't figure out exactly when - Qt Creator has
36 > become
37 > unable
38 > > >> to access Qt containers (where the STL ones work as expected)
39 > on the
40 > debug
41 > > >> panel. It shows <not accessible> in place of the expected
42 > item quantity
43 > > >> for a QList, for instance, but for a std::vector<std::string>,
44 > it works,
45 > > >> allowing inspection of all items.
46 > > >>
47 > > >> Any hints on what I may be doing wrong? The headers are all
48 > accessible,
49 > for
50 > > >> instance. Should I build Qt with debug symbols enabled, as
51 > recommended
52 > for
53 > > >> glibc?
54 > > >>
55 > > >> Using current Qt 4.8.5, Qt Creator 2.8.1, gdb 7.7.1, gcc 4.8.3
56 > > >>
57 > > >> Thanks!
58 > > >> Francisco
59 > > >
60 > > > Try to print it from gdb cli, if it works you'll know the issue
61 > QtCreator,
62 > > > otherwise you're likely missing some symbols. You should always
63 > compile
64 > any
65 > > > development libraries with debug symbols.
66 > >
67 > > You don't need debug symbols for inspecting containers. They are not
68 > > needed. The only reason for enabling debug symbols in Qt is if
69 > you want
70 > > to step into Qt's code.
71 >
72 > Thank you. You do need symbols though, just not Qts for this
73 > specific case.
74 > There are many reasons why you should compile your development
75 > libraries with
76 > symbols besides stepping into the code. Such as getting a backtrace.
77 > Even
78 > proprietary (closed-source) libraries often make the symbols
79 > available for
80 > this reason.

Replies

Subject Author
Re: [gentoo-user] Re: [OFF TOPIC] Qt Creator unable to access containers in debug mode Fernando Rodriguez <frodriguez.developer@×××××××.com>