[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: a real basic q: is "string" examine possible?
From:       Andreas Pakulat <apaku () gmx ! de>
Date:       2007-01-02 23:46:07
Message-ID: 20070102234607.GA21937 () morpheus ! apaku ! dnsalias ! org
[Download RAW message or body]

On 02.01.07 15:14:49, David Johnson wrote:
> On Tuesday 02 January 2007 14:55, craig harris wrote:
> > HI All.,
> >
> > Is it possible to examine the contents of strings in Kdevelop?
> > For instance if I have a QString and want to examine it's data while
> > at a break point, is there a way to do it? Thanks
> > -Craig
> 
> Yes there is. But you're going to run into two problems. The first
> is because of implicit sharing (copy on write).

What exactly should that impose a problem on? You need to know just the
internals of Qt's QString class.

> The other is because the data is in unicode (qt4), not the standard
> ascii char* people are used to.
>
> There is a tip floating about on the web on how to examine a QStrings 
> contents in gdb. I can't find it right now, but I remember seeing it. 
> It's complicated enough that I usually make do with qDebug().

Its not that complicated and the tip is not floating around, its right
there in KDE svn. See kdesdk/scripts, the file is kde-devel-gdb and can
be sourced in .gdbinit. (Thats 3.5 branch)

As for kdevelop, 3.3 doesn't support it. 3.4 will hopefully support it
(I'm working on it right now), but it doesn't at the moment.

Andreas

-- 
Your analyst has you mixed up with another patient.  Don't believe a
thing he tells you.
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic