public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "dje at google dot com" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug breakpoints/15826] Slow symbol lookups during conditional breakpoints Date: Thu, 15 Aug 2013 18:42:00 -0000 [thread overview] Message-ID: <bug-15826-4717-7wdBR3h8Of@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-15826-4717@http.sourceware.org/bugzilla/> http://sourceware.org/bugzilla/show_bug.cgi?id=15826 --- Comment #4 from dje at google dot com --- ---snip--- #include <unistd.h> 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.
next prev parent reply other threads:[~2013-08-15 18:42 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-08-08 21:10 [Bug breakpoints/15826] New: " mjw at redhat dot com 2013-08-08 21:17 ` [Bug breakpoints/15826] " mjw at redhat dot com 2013-08-15 17:29 ` dje at google dot com 2013-08-15 18:34 ` mjw at redhat dot com 2013-08-15 18:42 ` dje at google dot com [this message] 2013-08-31 21:43 ` mjw at redhat dot com 2013-09-01 10:23 ` mjw at redhat dot com 2013-09-01 20:40 ` mjw at redhat dot com 2013-09-05 21:13 ` mjw at redhat dot com 2014-02-17 16:00 ` markus.mohrhard at googlemail dot com 2014-05-29 21:53 ` [Bug symtab/15826] " dje at google dot com 2014-06-03 9:35 ` mjw at redhat dot com 2023-03-06 23:33 ` tromey at sourceware dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-15826-4717-7wdBR3h8Of@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).