[Qt-creator] gdbmucros helper add dump classes
André Pönitz
andre.poenitz at nokia.com
Thu Oct 15 15:10:28 CEST 2009
On Thursday 15 October 2009 14:54:02 ext Rudenko Eugene wrote:
> And I have one more question.
> I have my Lib project and my custom classes with it.
> If I add this dumpers in gdbmacros helper then I need to link to my lib. It's not A good way.
Indeed.
We have a similar problem with the QObject dumpers that would
need private headers to access certain parts of the QObject structure.
The workaround I currently use is to have a dummy structure with
identical layout and cast the "real" QObjectPrivate to this dummy
structure. This is very fragile, so it's nothing I should _recommend_.
But I think I can _mention_ it ;-)
> Maybe It's better to make some common interface for custom classes, I need to dump.
If that's possible, it not a bad plan.
> Or maybe realise some mechanism to embed some code to y custom classes to help
> dumper understand this class ?
At least on Linux this might already work: Implement your dumper
in your library, declare it as "extern" in gdbmacros.cpp, and call
it from the big dispatcher switch in handleProtocolVersion2and3().
> Do you plan to realise something in this direction and what
> recommendations you can get to me for this decision ?
I am currently indeed investigating options to make creating dumpers
easier. The solutions I have so far are not as satifying as I'd like...
Regards,
Andre'
More information about the Qt-creator-old
mailing list