Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Re: faster printing of QStrings
@ 2007-03-22 15:19 Markus.Grunwald
  0 siblings, 0 replies; 8+ messages in thread
From: Markus.Grunwald @ 2007-03-22 15:19 UTC (permalink / raw)
  To: gdb

Hello,

> Thanks for posting this - I'm sure it will be useful to someone, and
> it's also a good test case for GDB performance :-)

:) 
 
> I couldn't think of anything.  It's probably the array access and a
> pile of symbol lookups that are slowing it down; when I can find time
> (no promises, but this was already on top of my todo list) I will try
> to speed it up.

Perhaps a look into the kdevelop code could help - they do it somehow ...


> The only way you could use it with display today is by defining a
> hook-stop macro.

I'll have a look how this works.

Thanks !

Markus


^ permalink raw reply	[flat|nested] 8+ messages in thread
* faster printing of QStrings
@ 2007-03-22 12:30 Markus.Grunwald
  2007-03-22 12:42 ` Daniel Jacobowitz
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Markus.Grunwald @ 2007-03-22 12:30 UTC (permalink / raw)
  To: gdb

Hello,

we are developing Qt applications. kdevelops debugger offers a watch where 
it can display QStrings. I am more the commandline user and have found a 
nice function that prints QStrings with gdb:

define pqs
    set $i=0
    set $unicode=$arg0.d->unicode

    printf "Getting QString...\n"
    while $i < $arg0.d->len
        set $c=$unicode[$i++].ucs
        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

(gdb) pqs oszPrinterLine
Getting QString...
kopierer akzeptiert Anfragen seit Mo 19 Feb 2007 13:27:28 CET

Works fine - except that it takes ages (25s) ! Kdevelop displays the 
QStrings in an instant. Now I wonder if there is a faster way of getting 
this information in gdb - and maybe even to "display oszPrinterLine" which 
makes sense only if printing is fast... ?

Mit freundlichen Grüßen

Markus Grunwald
Softwareentwicklung

PRÜFTECHNIK Condition Monitoring GmbH
Oskar-Messter-Straße 19-21
85737 Ismaning
www.pruftechnik.com
Tel: +49 (0)89 99616177
Fax: +49 (0)89 99616200

PRÜFTECHNIK Condition Monitoring GmbH
Sitz Ismaning / HRB 145655 München 
Geschäftsführer: Johann Lösl, Roland Schühle

Ein Unternehmen der PRÜFTECHNIK-Gruppe


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-03-23 14:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-22 15:19 faster printing of QStrings Markus.Grunwald
  -- strict thread matches above, loose matches on Subject: below --
2007-03-22 12:30 Markus.Grunwald
2007-03-22 12:42 ` Daniel Jacobowitz
2007-03-23 13:08   ` Eli Zaretskii
2007-03-22 13:50 ` Ramana Radhakrishnan
2007-03-22 15:03   ` Markus.Grunwald
2007-03-23 13:10 ` Eli Zaretskii
2007-03-23 14:00   ` Markus.Grunwald

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox