Note: The qt-interest archive has moved to http://lists.trolltech.com/qt-interest/, and qt-interest.trolltech.com is no longer updated with new content. Please use that link instead.
Here are all the messages with subject "GNU and QString", and all replies to such messages. Note that some of the links in the text may perhaps not work any more when you read this.Does anybody know how to display QStrings in GNU ? I scanned the Archives but find only old pre 2.0 solutions Thanx
Do you mean gdb? Then you could add following script to you .gdbinit (thanks to
David Faure who sent it to the kde-devel mailinglist):
define printqstring
set $i=0
while $i < $arg0.d->len
print $arg0.d->unicode[$i++].cl
end
end
Greetings,
Wilco
-----Original Message-----
From: owner-qt-interest@trolltech.com
[mailto:owner-qt-interest@trolltech.com]On Behalf Of Wilco Greven
Sent: Thursday, January 18, 2001 8:18 AM
To: qt interest
Subject: Re: GNU and QString
On Thu, Jan 18, 2001 at 03:02:03PM +0100, wim delvaux wrote:
> Hi,
>
> Does anybody know how to display QStrings in GNU ?
> I scanned the Archives but find only old pre 2.0 solutions
Do you mean gdb? Then you could add following script to you .gdbinit (thanks
to
David Faure who sent it to the kde-devel mailinglist):
define printqstring
set $i=0
while $i < $arg0.d->len
print $arg0.d->unicode[$i++].cl
end
end
Greetings,
Wilco
--
[ signature omitted ]
Is there any way to print QString as a (char*) string ? (line rather than column printing is more efficient for long string). Where we can found gdb macro language specifications, help ? Thanks for this useful macro. Arnaud. Wilco Greven wrote: > > On Thu, Jan 18, 2001 at 03:02:03PM +0100, wim delvaux wrote: > > Hi, > > > > Does anybody know how to display QStrings in GNU ? > > I scanned the Archives but find only old pre 2.0 solutions > > Do you mean gdb? Then you could add following script to you .gdbinit (thanks to > David Faure who sent it to the kde-devel mailinglist): > > define printqstring > set $i=0 > while $i < $arg0.d->len > print $arg0.d->unicode[$i++].cl > end > end > > Greetings, > Wilco > > -- > List archive and information: http://qt-interest.trolltech.com
> How can I use this with a gdb based debugger like DDD? > > -----Original Message----- > From: owner-qt-interest@trolltech.com > [mailto:owner-qt-interest@trolltech.com]On Behalf Of Wilco Greven > Sent: Thursday, January 18, 2001 8:18 AM > To: qt interest > Subject: Re: GNU and QString > > On Thu, Jan 18, 2001 at 03:02:03PM +0100, wim delvaux wrote: > > Hi, > > > > Does anybody know how to display QStrings in GNU ? > > I scanned the Archives but find only old pre 2.0 solutions > > Do you mean gdb? Then you could add following script to you .gdbinit (thanks > to > David Faure who sent it to the kde-devel mailinglist): > > define printqstring > set $i=0 > while $i < $arg0.d->len > print $arg0.d->unicode[$i++].cl > end > end > > Greetings, > Wilco > > -- > List archive and information: http://qt-interest.trolltech.com > > Shop online without a credit card > http://www.rocketcash.com > RocketCash, a NetZero subsidiary > > -- > List archive and information: http://qt-interest.trolltech.com
$arg0.d->unicode as an array whit $arg0.d->len fields and set the array prettyprinting to false Just a though (not sure if it even works) > Hi, > > Is there any way to print QString as a (char*) string ? > (line rather than column printing is more efficient for long string). > Where we can found gdb macro language specifications, help ? > Thanks for this useful macro. > > Arnaud. > > > Wilco Greven wrote: > > > > On Thu, Jan 18, 2001 at 03:02:03PM +0100, wim delvaux wrote: > > > Hi, > > > > > > Does anybody know how to display QStrings in GNU ? > > > I scanned the Archives but find only old pre 2.0 solutions > > > > Do you mean gdb? Then you could add following script to you .gdbinit (thanks to > > David Faure who sent it to the kde-devel mailinglist): > > > > define printqstring > > set $i=0 > > while $i < $arg0.d->len > > print $arg0.d->unicode[$i++].cl > > end > > end > > > > Greetings, > > Wilco > > > > -- > > List archive and information: http://qt-interest.trolltech.com > > -- > List archive and information: http://qt-interest.trolltech.com
Arnaud.
define pqs
set $i=0
set $unicode=$arg0.d->unicode
printf "Getting QString...\n"
while $i < $arg0.d->len
set $c=$unicode[$i++].cl
if $c < 32
printf "\\0%o", $c
else
if $c <= 127
printf "%c", $c
else
printf "\\0%o", $c
end
end
end
echo \n
end
Arnaud de Muyser wrote:
>
> Hi,
>
> Is there any way to print QString as a (char*) string ?
> (line rather than column printing is more efficient for long string).
> Where we can found gdb macro language specifications, help ?
> Thanks for this useful macro.
>
> Arnaud.
>
>
> Wilco Greven wrote:
> >
> > On Thu, Jan 18, 2001 at 03:02:03PM +0100, wim delvaux wrote:
> > > Hi,
> > >
> > > Does anybody know how to display QStrings in GNU ?
> > > I scanned the Archives but find only old pre 2.0 solutions
> >
> > Do you mean gdb? Then you could add following script to you .gdbinit (thanks to
> > David Faure who sent it to the kde-devel mailinglist):
> >
> > define printqstring
> > set $i=0
> > while $i < $arg0.d->len
> > print $arg0.d->unicode[$i++].cl
> > end
> > end
> >
> > Greetings,
> > Wilco
> >
> > --
> > List archive and information: http://qt-interest.trolltech.com
>
> --
> List archive and information: http://qt-interest.trolltech.com