This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: faster printing of QStrings


On Thu, Mar 22, 2007 at 01:28:18PM +0100, Markus.Grunwald@pruftechnik.com wrote:
> 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:

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

> 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... ?

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.

The only way you could use it with display today is by defining a
hook-stop macro.  I would like to offer something better involving
integrated Python, but it probably won't happen until next year.

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]