From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2726 invoked by alias); 15 Aug 2013 18:42:23 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 2687 invoked by uid 48); 15 Aug 2013 18:42:23 -0000 From: "dje at google dot com" To: gdb-prs@sourceware.org Subject: [Bug breakpoints/15826] Slow symbol lookups during conditional breakpoints Date: Thu, 15 Aug 2013 18:42:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: breakpoints X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dje at google dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-q3/txt/msg00228.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=15826 --- Comment #4 from dje at google dot com --- ---snip--- #include int x = 0; void forever () { while (1) { ++x; usleep (100000); // 0.1 second } } int main () { forever (); return 0; } ---snip--- $ g++ -g foo.cc -o foo # Following is cribbed from memory, heads up. $ gdb gdb (top-gdb) b lookup_symbol_aux_quick (top-gdb) run foo (gdb) start (gdb) b 11 # line with usleep (gdb) cond 2 x % 10 == 0 (gdb) c (top-gdb) bt or some such. The key is that bool isn't in the debug info, and c++ expression parsing wants to cast the value to bool, so it ultimately calls the language lookup routine for bool, which first checks the debug info (and if that fails uses the builtin type). Caching lookups, especially failed ones, will help, though gdb can still be smarter with "standard" types. -- You are receiving this mail because: You are on the CC list for the bug.