[Development] Work on qDebug and friends - debug areas

Francesco R.(vivo) vivo75 at gmail.com
Thu Jan 26 00:23:46 CET 2012


On Wednesday 25 January 2012 20:07:57 Thiago Macieira wrote:
> On Wednesday, 25 de January de 2012 18.28.18, Olivier Goffart wrote:
> > KDebug::registerArea needs a registery. That works for KDE, but I don't
> > know  if that is a good idea for Qt

don't know if it can be applied to all platform or even linux, but both 
binutils linkers (bfd and gold) support --build-id, which is already used by 
distributions.

it can be generally read from an elf file like this:
readelf -x .note.gnu.build-id /lib/modules/3.2.1/misc/vboxnetflt.ko \
| awk '$NF ~ /GNU/ { getline; printf $2$3$4$5; getline; print $2 }'

it require "--build-id" flag passed to the linker, or it can be computed by 
`debugedit` as extracted by the rpm tool.

the id would change even for the same object with whatever change of 
compilation tools or settings and it would not work under other OS, so I'm not 
suggesting this, just bringing it to your attention.

> TBH, I really don't want the default debugging system in Qt to rely on
> config files. We're removing QSettings dependency from QtCore, so there's
> nothing to use.

+1 

$ wc -l ~/.kde4/share/config/kdebugrc
2837 .kde4/share/config/kdebugrc

> A third-party plugin can have a configuration mechanism to use the areas
> that qDebug defines.




More information about the Development mailing list