This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug breakpoints/15826] Slow symbol lookups during conditional breakpoints
- From: "dje at google dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Thu, 15 Aug 2013 18:42:22 +0000
- Subject: [Bug breakpoints/15826] Slow symbol lookups during conditional breakpoints
- Auto-submitted: auto-generated
- References: <bug-15826-4717 at http dot sourceware dot 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.