* [gentoo-user] [OFF TOPIC] Qt Creator unable to access containers in debug mode @ 2015-03-24 13:07 Francisco Ares 2015-03-24 13:52 ` [gentoo-user] " Nikos Chantziaras 2015-03-24 19:12 ` [gentoo-user] " Fernando Rodriguez 0 siblings, 2 replies; 9+ messages in thread From: Francisco Ares @ 2015-03-24 13:07 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 578 bytes --] Hi, Recently - but can't figure out exactly when - Qt Creator has become unable to access Qt containers (where the STL ones work as expected) on the debug panel. It shows <not accessible> in place of the expected item quantity for a QList, for instance, but for a std::vector<std::string>, it works, allowing inspection of all items. Any hints on what I may be doing wrong? The headers are all accessible, for instance. Should I build Qt with debug symbols enabled, as recommended for glibc? Using current Qt 4.8.5, Qt Creator 2.8.1, gdb 7.7.1, gcc 4.8.3 Thanks! Francisco [-- Attachment #2: Type: text/html, Size: 725 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* [gentoo-user] Re: [OFF TOPIC] Qt Creator unable to access containers in debug mode 2015-03-24 13:07 [gentoo-user] [OFF TOPIC] Qt Creator unable to access containers in debug mode Francisco Ares @ 2015-03-24 13:52 ` Nikos Chantziaras 2015-03-24 17:04 ` Francisco Ares 2015-03-24 19:12 ` [gentoo-user] " Fernando Rodriguez 1 sibling, 1 reply; 9+ messages in thread From: Nikos Chantziaras @ 2015-03-24 13:52 UTC (permalink / raw To: gentoo-user On 24/03/15 15:07, Francisco Ares wrote: > Hi, > > Recently - but can't figure out exactly when - Qt Creator has become > unable to access Qt containers (where the STL ones work as expected) on > the debug panel. It shows <not accessible> in place of the expected > item quantity for a QList, for instance, but for a > std::vector<std::string>, it works, allowing inspection of all items. > > Any hints on what I may be doing wrong? The headers are all accessible, > for instance. Should I build Qt with debug symbols enabled, as > recommended for glibc? > > Using current Qt 4.8.5, Qt Creator 2.8.1, gdb 7.7.1, gcc 4.8.3 I remember having a problem with old Creator that had to do with showing contents of variables. I don't remember the details though. I only remember that the issue was gdb. I was using a version that was not working correctly with Creator 2.8. I had to downgrade to an old gdb. 7.5.1, I think. I can't reproduce the problem anymore, since I've since switched to Creator 3 (now on 3.3.2.) This is rather easy to upgrade to now, as Qt5 is now in portage (although in ~arch.) If you want to upgrade, note that you can still develop for Qt4 just fine. Qt5 is only used to run Creator itself, it doesn't have any effect on the version of Qt you want to develop for. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Re: [OFF TOPIC] Qt Creator unable to access containers in debug mode 2015-03-24 13:52 ` [gentoo-user] " Nikos Chantziaras @ 2015-03-24 17:04 ` Francisco Ares 0 siblings, 0 replies; 9+ messages in thread From: Francisco Ares @ 2015-03-24 17:04 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 1469 bytes --] Thank you, gonna play a bit around gdb. Best regards, Francisco 2015-03-24 10:52 GMT-03:00 Nikos Chantziaras <realnc@gmail.com>: > On 24/03/15 15:07, Francisco Ares wrote: > >> Hi, >> >> Recently - but can't figure out exactly when - Qt Creator has become >> unable to access Qt containers (where the STL ones work as expected) on >> the debug panel. It shows <not accessible> in place of the expected >> item quantity for a QList, for instance, but for a >> std::vector<std::string>, it works, allowing inspection of all items. >> >> Any hints on what I may be doing wrong? The headers are all accessible, >> for instance. Should I build Qt with debug symbols enabled, as >> recommended for glibc? >> >> Using current Qt 4.8.5, Qt Creator 2.8.1, gdb 7.7.1, gcc 4.8.3 >> > > I remember having a problem with old Creator that had to do with showing > contents of variables. I don't remember the details though. I only remember > that the issue was gdb. I was using a version that was not working > correctly with Creator 2.8. I had to downgrade to an old gdb. 7.5.1, I > think. > > I can't reproduce the problem anymore, since I've since switched to > Creator 3 (now on 3.3.2.) This is rather easy to upgrade to now, as Qt5 is > now in portage (although in ~arch.) If you want to upgrade, note that you > can still develop for Qt4 just fine. Qt5 is only used to run Creator > itself, it doesn't have any effect on the version of Qt you want to develop > for. > > > [-- Attachment #2: Type: text/html, Size: 2024 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] [OFF TOPIC] Qt Creator unable to access containers in debug mode 2015-03-24 13:07 [gentoo-user] [OFF TOPIC] Qt Creator unable to access containers in debug mode Francisco Ares 2015-03-24 13:52 ` [gentoo-user] " Nikos Chantziaras @ 2015-03-24 19:12 ` Fernando Rodriguez 2015-03-24 19:32 ` [gentoo-user] " Nikos Chantziaras 1 sibling, 1 reply; 9+ messages in thread From: Fernando Rodriguez @ 2015-03-24 19:12 UTC (permalink / raw To: gentoo-user On Tuesday, March 24, 2015 10:07:56 AM Francisco Ares wrote: > Hi, > > Recently - but can't figure out exactly when - Qt Creator has become unable > to access Qt containers (where the STL ones work as expected) on the debug > panel. It shows <not accessible> in place of the expected item quantity > for a QList, for instance, but for a std::vector<std::string>, it works, > allowing inspection of all items. > > Any hints on what I may be doing wrong? The headers are all accessible, for > instance. Should I build Qt with debug symbols enabled, as recommended for > glibc? > > Using current Qt 4.8.5, Qt Creator 2.8.1, gdb 7.7.1, gcc 4.8.3 > > Thanks! > Francisco Try to print it from gdb cli, if it works you'll know the issue QtCreator, otherwise you're likely missing some symbols. You should always compile any development libraries with debug symbols. -- Fernando Rodriguez ^ permalink raw reply [flat|nested] 9+ messages in thread
* [gentoo-user] Re: [OFF TOPIC] Qt Creator unable to access containers in debug mode 2015-03-24 19:12 ` [gentoo-user] " Fernando Rodriguez @ 2015-03-24 19:32 ` Nikos Chantziaras 2015-03-24 20:07 ` Fernando Rodriguez 0 siblings, 1 reply; 9+ messages in thread From: Nikos Chantziaras @ 2015-03-24 19:32 UTC (permalink / raw To: gentoo-user On 24/03/15 21:12, Fernando Rodriguez wrote: > On Tuesday, March 24, 2015 10:07:56 AM Francisco Ares wrote: >> Hi, >> >> Recently - but can't figure out exactly when - Qt Creator has become unable >> to access Qt containers (where the STL ones work as expected) on the debug >> panel. It shows <not accessible> in place of the expected item quantity >> for a QList, for instance, but for a std::vector<std::string>, it works, >> allowing inspection of all items. >> >> Any hints on what I may be doing wrong? The headers are all accessible, for >> instance. Should I build Qt with debug symbols enabled, as recommended for >> glibc? >> >> Using current Qt 4.8.5, Qt Creator 2.8.1, gdb 7.7.1, gcc 4.8.3 >> >> Thanks! >> Francisco > > Try to print it from gdb cli, if it works you'll know the issue QtCreator, > otherwise you're likely missing some symbols. You should always compile any > development libraries with debug symbols. You don't need debug symbols for inspecting containers. They are not needed. The only reason for enabling debug symbols in Qt is if you want to step into Qt's code. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Re: [OFF TOPIC] Qt Creator unable to access containers in debug mode 2015-03-24 19:32 ` [gentoo-user] " Nikos Chantziaras @ 2015-03-24 20:07 ` Fernando Rodriguez 2015-03-24 20:43 ` Francisco Ares 0 siblings, 1 reply; 9+ messages in thread From: Fernando Rodriguez @ 2015-03-24 20:07 UTC (permalink / raw To: gentoo-user On Tuesday, March 24, 2015 9:32:07 PM Nikos Chantziaras wrote: > On 24/03/15 21:12, Fernando Rodriguez wrote: > > On Tuesday, March 24, 2015 10:07:56 AM Francisco Ares wrote: > >> Hi, > >> > >> Recently - but can't figure out exactly when - Qt Creator has become unable > >> to access Qt containers (where the STL ones work as expected) on the debug > >> panel. It shows <not accessible> in place of the expected item quantity > >> for a QList, for instance, but for a std::vector<std::string>, it works, > >> allowing inspection of all items. > >> > >> Any hints on what I may be doing wrong? The headers are all accessible, for > >> instance. Should I build Qt with debug symbols enabled, as recommended for > >> glibc? > >> > >> Using current Qt 4.8.5, Qt Creator 2.8.1, gdb 7.7.1, gcc 4.8.3 > >> > >> Thanks! > >> Francisco > > > > Try to print it from gdb cli, if it works you'll know the issue QtCreator, > > otherwise you're likely missing some symbols. You should always compile any > > development libraries with debug symbols. > > You don't need debug symbols for inspecting containers. They are not > needed. The only reason for enabling debug symbols in Qt is if you want > to step into Qt's code. Thank you. You do need symbols though, just not Qts for this specific case. There are many reasons why you should compile your development libraries with symbols besides stepping into the code. Such as getting a backtrace. Even proprietary (closed-source) libraries often make the symbols available for this reason. -- Fernando Rodriguez ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Re: [OFF TOPIC] Qt Creator unable to access containers in debug mode 2015-03-24 20:07 ` Fernando Rodriguez @ 2015-03-24 20:43 ` Francisco Ares 2015-03-24 22:32 ` Nikos Chantziaras 0 siblings, 1 reply; 9+ messages in thread From: Francisco Ares @ 2015-03-24 20:43 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 1929 bytes --] Thank you all for those clues, pretty interesting. For now I suppose it is a gdb thing, as QtCreator is able to show details about STL containers as expected. Going to fiddle in gdb a bit more... 2015-03-24 17:07 GMT-03:00 Fernando Rodriguez < frodriguez.developer@outlook.com>: > On Tuesday, March 24, 2015 9:32:07 PM Nikos Chantziaras wrote: > > On 24/03/15 21:12, Fernando Rodriguez wrote: > > > On Tuesday, March 24, 2015 10:07:56 AM Francisco Ares wrote: > > >> Hi, > > >> > > >> Recently - but can't figure out exactly when - Qt Creator has become > unable > > >> to access Qt containers (where the STL ones work as expected) on the > debug > > >> panel. It shows <not accessible> in place of the expected item > quantity > > >> for a QList, for instance, but for a std::vector<std::string>, it > works, > > >> allowing inspection of all items. > > >> > > >> Any hints on what I may be doing wrong? The headers are all > accessible, > for > > >> instance. Should I build Qt with debug symbols enabled, as recommended > for > > >> glibc? > > >> > > >> Using current Qt 4.8.5, Qt Creator 2.8.1, gdb 7.7.1, gcc 4.8.3 > > >> > > >> Thanks! > > >> Francisco > > > > > > Try to print it from gdb cli, if it works you'll know the issue > QtCreator, > > > otherwise you're likely missing some symbols. You should always compile > any > > > development libraries with debug symbols. > > > > You don't need debug symbols for inspecting containers. They are not > > needed. The only reason for enabling debug symbols in Qt is if you want > > to step into Qt's code. > > Thank you. You do need symbols though, just not Qts for this specific case. > There are many reasons why you should compile your development libraries > with > symbols besides stepping into the code. Such as getting a backtrace. Even > proprietary (closed-source) libraries often make the symbols available for > this reason. > > -- > Fernando Rodriguez > > [-- Attachment #2: Type: text/html, Size: 2741 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* [gentoo-user] Re: [OFF TOPIC] Qt Creator unable to access containers in debug mode 2015-03-24 20:43 ` Francisco Ares @ 2015-03-24 22:32 ` Nikos Chantziaras 2015-03-25 0:11 ` Fernando Rodriguez 0 siblings, 1 reply; 9+ messages in thread From: Nikos Chantziaras @ 2015-03-24 22:32 UTC (permalink / raw To: gentoo-user Note that gdb cannot inspect containers. It doesn't know anything about them. Qt Creator uses "debugging helpers" for that. See: https://qt-project.org/doc/qtcreator-2.8/creator-debugging-helpers.html Since you're using a deprecated version of Creator (2.8 is from 2013 and not maintained anymore), those helpers are probably not updated for new gdb versions. If you don't want to upgrade Creator through portage, you could instead use the binary Qt Creator installer, and simply install it in your home directory (I did that in the past, before Qt5 was put in ~arch.) On 24/03/15 22:43, Francisco Ares wrote: > Thank you all for those clues, pretty interesting. > > For now I suppose it is a gdb thing, as QtCreator is able to show > details about STL containers as expected. > > Going to fiddle in gdb a bit more... > > > 2015-03-24 17:07 GMT-03:00 Fernando Rodriguez > <frodriguez.developer@outlook.com > <mailto:frodriguez.developer@outlook.com>>: > > On Tuesday, March 24, 2015 9:32:07 PM Nikos Chantziaras wrote: > > On 24/03/15 21:12, Fernando Rodriguez wrote: > > > On Tuesday, March 24, 2015 10:07:56 AM Francisco Ares wrote: > > >> Hi, > > >> > > >> Recently - but can't figure out exactly when - Qt Creator has > become > unable > > >> to access Qt containers (where the STL ones work as expected) > on the > debug > > >> panel. It shows <not accessible> in place of the expected > item quantity > > >> for a QList, for instance, but for a std::vector<std::string>, > it works, > > >> allowing inspection of all items. > > >> > > >> Any hints on what I may be doing wrong? The headers are all > accessible, > for > > >> instance. Should I build Qt with debug symbols enabled, as > recommended > for > > >> glibc? > > >> > > >> Using current Qt 4.8.5, Qt Creator 2.8.1, gdb 7.7.1, gcc 4.8.3 > > >> > > >> Thanks! > > >> Francisco > > > > > > Try to print it from gdb cli, if it works you'll know the issue > QtCreator, > > > otherwise you're likely missing some symbols. You should always > compile > any > > > development libraries with debug symbols. > > > > You don't need debug symbols for inspecting containers. They are not > > needed. The only reason for enabling debug symbols in Qt is if > you want > > to step into Qt's code. > > Thank you. You do need symbols though, just not Qts for this > specific case. > There are many reasons why you should compile your development > libraries with > symbols besides stepping into the code. Such as getting a backtrace. > Even > proprietary (closed-source) libraries often make the symbols > available for > this reason. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Re: [OFF TOPIC] Qt Creator unable to access containers in debug mode 2015-03-24 22:32 ` Nikos Chantziaras @ 2015-03-25 0:11 ` Fernando Rodriguez 0 siblings, 0 replies; 9+ messages in thread From: Fernando Rodriguez @ 2015-03-25 0:11 UTC (permalink / raw To: gentoo-user On Wednesday, March 25, 2015 12:32:30 AM Nikos Chantziaras wrote: > Note that gdb cannot inspect containers. It doesn't know anything about > them. It can, it's just not pretty: (gdb) p list1 $1 = {{p = {static shared_null = {ref = {_q_value = 15}, alloc = 0, begin = 0, end = 0, sharable = 1, array = {0x0}}, d = 0x61b050}, d = 0x61b050}} (gdb) p/c ((QString*)list1.d.array).d.data[0]@10 $2 = {72 'H', 101 'e', 108 'l', 108 'l', 111 'o', 32 ' ', 71 'G', 68 'D', 66 'B', 0 '\000'} and with missing symbols: (gdb) p list1 No symbol "list1" in current context. So I wasn't arguing, just suggesting a way to find out quickly. -- Fernando Rodriguez ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2015-03-25 0:12 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-03-24 13:07 [gentoo-user] [OFF TOPIC] Qt Creator unable to access containers in debug mode Francisco Ares 2015-03-24 13:52 ` [gentoo-user] " Nikos Chantziaras 2015-03-24 17:04 ` Francisco Ares 2015-03-24 19:12 ` [gentoo-user] " Fernando Rodriguez 2015-03-24 19:32 ` [gentoo-user] " Nikos Chantziaras 2015-03-24 20:07 ` Fernando Rodriguez 2015-03-24 20:43 ` Francisco Ares 2015-03-24 22:32 ` Nikos Chantziaras 2015-03-25 0:11 ` Fernando Rodriguez
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox