kdevelop2.0 dbg changes

Simon Hausmann hausmann at kde.org
Mon Jun 25 15:18:18 UTC 2001

On Mon, Jun 25, 2001 at 03:58:14PM +0200, Harald Fernengel wrote:
> Hi,
> > latin1() doesn't always work in gdb :(( hence that nasty convoluted gdb
> > statement you've replace. Wanna fix.... :-)
> >
> > you can test this by debugging kdevelop 2.0 and breaking on main.cpp:143
> >
> > It could be done better than I've done it, I'm sure, but...
> >
> Sorry, I am not very good with gdb (as you may have already noticed ;))
> The problem in Qt3 is that there is no more "rw" member in QChar, because the 
> row and the col of a Unicode char are now stored in an unsigned short named 
> "ucs".
> QChar::latin1() simply does this:
> { return ucs > 0xff ? 0 : (char) ucs; }
> since we cannot call this member function, we have to find a way how to 
> distinguish a Qt2 String from a Qt3 string and then write a small GDB script 
> as Simon suggested to debug Qt3 strings properly.
> Any suggestions welcome.

And then it hit me :-) . I don't know the details of the gdb frontend, but
kdevelop certainly knows if the application uses qt2 or qt3, right? So what
kdevelop could do is to feed either a qt2 implementation of printqstring
or a qt3 one to gdb in the initializing phase. The actual code in the gdb
frontend then just pipes 'printqstring blah' to gdb.


to unsubscribe from this list send an email to kdevelop-devel-request at kdevelop.org with the following body:
unsubscribe »your-email-address«

More information about the KDevelop-devel mailing list