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: "mjw at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Thu, 05 Sep 2013 21:13:44 +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/>
https://sourceware.org/bugzilla/show_bug.cgi?id=15826
--- Comment #8 from Mark Wielaard <mjw at redhat dot com> ---
Since some people asked, this is my current testcase:
int x = 0;
int
bar (int y)
{
int flag = y < 42;
return flag ? y : 0;
}
int
forever ()
{
int z;
while (x < 42)
{
z = x + 1;
x = bar (z);
}
return z;
}
int
main ()
{
return forever ();
}
$ g++ -g -o loop loop.c
$ gdb loop
Reading symbols from /usr/local/src/tests/loop...done.
(gdb) break bar
Breakpoint 1 at 0x4005b7: file loop.c, line 6.
(gdb) condition 1 y == 55
(gdb) run
Starting program: /usr/local/src/tests/loop
Even though that doesn't really have a symbol table at all, it already will
show that gdb is mainly spending time in lookup_symbol_aux_objfile.
This isn't a very good testcase, except to inspect what is going on. In the
real testcase with libreoffice you can see a lot more stuff gdb spends time on
during the evaluation of a breakpoint condition (there the breakpoints are hit
often, but not like here in a loop, and libreoffice is linked against a lot
more libraries to make things a bit more interesting).
--
You are receiving this mail because:
You are on the CC list for the bug.