From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9910 invoked by alias); 22 Mar 2007 12:42:49 -0000 Received: (qmail 7189 invoked by uid 22791); 22 Mar 2007 12:39:09 -0000 Received: from return.false.org (HELO return.false.org) (66.207.162.98) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 22 Mar 2007 12:39:09 +0000 Received: from return.false.org (localhost [127.0.0.1]) by return.false.org (Postfix) with ESMTP id 2F9E34B267; Thu, 22 Mar 2007 07:39:08 -0500 (CDT) Received: from caradoc.them.org (dsl093-172-095.pit1.dsl.speakeasy.net [66.93.172.95]) by return.false.org (Postfix) with ESMTP id 126824B262; Thu, 22 Mar 2007 07:39:07 -0500 (CDT) Received: from drow by caradoc.them.org with local (Exim 4.63) (envelope-from ) id 1HUMZO-0007wC-7X; Thu, 22 Mar 2007 08:39:06 -0400 Date: Thu, 22 Mar 2007 12:42:00 -0000 From: Daniel Jacobowitz To: Markus.Grunwald@pruftechnik.com Cc: gdb@sourceware.org Subject: Re: faster printing of QStrings Message-ID: <20070322123906.GA30375@caradoc.them.org> Mail-Followup-To: Markus.Grunwald@pruftechnik.com, gdb@sourceware.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.14+cvs20070313 (2007-03-13) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-03/txt/msg00271.txt.bz2 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