[Qt-creator] QtCreator debug shows anonymous union for QVector, QSet, QList, etc

Alex Reche al.exreche at gmail.com
Wed Mar 23 15:09:52 CET 2011


Nothing happens. I also try "p b" where b is a QVector to see if I was doing
it right.
Here is the output:

&"p (char*)&qDumpOutBuffer\n"

&"p qDumpOutBuffer\n"

&"p b\n"

~"$2 = {\n"

~" {\n"

~" d = 0x1d03900, \n"

~" p = 0x1d03900\n"

~" }"

~"\n"

~"}"

~"\n"

^done

Thanks already for pointing me out that something is wrong in my logs.

   Alex

On Wed, Mar 23, 2011 at 2:47 PM, André Pönitz <andre.poenitz at nokia.com>wrote:

>
> On Wednesday 23 March 2011 13:27:06 ext Alex Reche wrote:
> > Hi!
> >
> >
> > I'm building an application using QtCreator and until recently, I was
> able to normally debug the application and inspect the values of the local
> variables.
> > Recently I've installed QtCreator 2.1, Qt 4.7.2 and XCode4.
> >
> > It seems that something went wrong because now I cannot see the values of
> my variables anymore.
> > To be more specific, the containers QVector, QList, QSet, etc... are
> displayed as an anonymous union and then I can see the internal structure of
> those.
> > dNOTE: INFERIOR SPONTANEOUES STOP
> > dState changed from InferiorRunOk(10) to InferiorStopOk(13).
> > <20call (void)dlopen("/Applications/Qt
> Creator.app/Contents/qtc-debugging-helper/92501879/libgdbmacros.dylib", 2)
> > <21call (void*)qDumpObjectData440(1,0,0,0,0,0,0,0)
> > <22p (char*)&qDumpOutBuffer
> > <23p 4
> > >&"call (void)dlopen(\"/Applications/Qt
> Creator.app/Contents/qtc-debugging-helper/92501879/libgdbmacros.dylib\",
> 2)\n"
> > >20^done
> > >&"call (void*)qDumpObjectData440(1,0,0,0,0,0,0,0)\n"
> > >&"p (char*)&qDumpOutBuffer\n"
> > >&"p 4\n"
> > >~"$1 = 4"
> > >~"\n"
> > >23^done
>
> Something goes wrong here. There is no response for commands 21 and 22.
>
> As this is supposed to produce the list of "dumpable types" Creator ends up
> believing that there is no dumper for any type available and falls back to
> "plain C structure display".
>
> > ----------------------- Using the gdb version that comes with XCode3
> -------------------
> > [....]
> > <21call (void*)qDumpObjectData440(1,0,0,0,0,0,0,0)
> > <22p (char*)&qDumpOutBuffer
> > <23p 4
> > >&"call (void)dlopen(\"/Applications/Qt
> Creator.app/Contents/qtc-debugging-helper/92501879/libgdbmacros.dylib\",
> 2)\n"
> > >20^done
> > >&"call (void*)qDumpObjectData440(1,0,0,0,0,0,0,0)\n"
> > >&"p (char*)&qDumpOutBuffer\n"
> > >&"p 4\n"
> > >~"$1 = 4"
> > >~"\n"
> > >23^done
>
> Same here.
>
> A "good" log looks like:
>
>  295: <24call
> (void)dlopen("/Volumes/Data/Users/.../qtc-debugging-helper/libgdbmacros.dylib",
> 2)
>  296: <25call (void*)qDumpObjectData440(1,0,0,0,0,0,0,0)
>  297: <26p (char*)&qDumpOutBuffer
>  298: <27p 4
>  299: >&"call
> (void)dlopen(\"/Volumes/Data/Users/.../qtc-debugging-helper/libgdbmacros.dylib\",
> 2)\n"
>  300:
> >=shlibs-added,shlib-info={num="108",name="libgdbmacros.1.0.0.dylib",kind="-",dyld-addr="0x1153f7000",reason="dyld",requested-state="Y",state="Y",path="/Volumes/Data/Users/.../qtc-debugging-helper/libgdbmacros.1.0.0.dylib",description="/Volumes/Data/.../qtc-debugging-helper/libgdbmacros.1.0.0.dylib",loaded_addr="0x1153f7000",slide="0x1153f7000",prefix=""},time={now="1300886290.777835"}
>  301: >24^done
>  302: >&"call (void*)qDumpObjectData440(1,0,0,0,0,0,0,0)\n"
>  303: >~"$1 = (void *) 0x115418260\n"
>  304: >25^done
>  305: >&"p (char*)&qDumpOutBuffer\n"
>  306: >~"$2 = 0x115418260
> \"tdumpers=[\\\"QAbstractItem\\\",\\\"QAbstractItemModel\\\",\\\"QByteArray\\\",\\\"QChar\\\",\\\"QDate\\\",\\\"QDateTime\\\",\\\"QDir\\\",\\\"QFile\\\",\\\"QFileInfo\\\",\\\"QHash\\\",\\\"QHashNode\\\",\\\"QImage\\\",\\\"QLinkedList\\\",\\\"QList\\\",\\\"QLocale\\\",\\\"QMap\\\",\\\"QMapNode\\\",\\\"QModelIndex\\\",\\\"QObject\\\",\\\"QObjectMethodList\\\",\\\"QObjectProperty\\\",\\\"QObjectPropertyList\\\",\\\"QObjectSignal\\\",\\\"QObjectSignalList\\\",\\\"QObjectSlot\\\",\\\"QObjectSlotList\\\",\\\"QObjectChildList\\\",\\\"QPoint\\\",\\\"QPointF\\\",\\\"QRect\\\",\\\"QRectF\\\",\\\"QSet\\\",\\\"QSize\\\",\\\"QSizeF\\\",\\\"QStack\\\",\\\"QString\\\",\\\"QStringList\\\",\\\"QTextCodec\\\",\\\"QTime\\\",\\\"QVariant\\\",\\\"QVariantList\\\",\\\"QVector\\\",\\\"QMultiMap\\\",\\\"QSharedPointer\\\",\\\"QWeakPointer\\\",\\\"QPixmap\\\",\\\"QWidget\\\",\\\"string\\\",\\\"wstring\\\",\\\"std::basic_string\\\",\\\"std::list\\\",\\\"std::map\\\",\\\"std::set\\\",\\\"std::string\\\",\\\"std::vector\\\",\\\"std::wstring\\\",],qtversion=[\\\"4\\\",\\\"7\\\",\\\"4\\\"],namespace=\\\"\\\",dumperversion=\\\"1.3\\\",\""
>  307: >~"\n"
>  308: >26^done
>  309: sDumper version 1.3, 56 custom dumpers found.
>
> Note the responses to commands 25 and 26.
>
> Could you try to enter command like  "p (char*)&qDumpOutBuffer"
> or "p qDumpOutBuffer" "manually" in the input pane (left hand side,
> send with Ctrl-<Return>), or take the contents of the input pane
> and paste it into a gdb started from the command line?
>
> Andre'
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-creator-old/attachments/20110323/6ad0215c/attachment.html 


More information about the Qt-creator-old mailing list