gdb 7.0.1 opening many files when breakpoints are pending
Tom Tromey
tromey@redhat.com
Thu Feb 25 06:34:00 GMT 2010
>>>>> "Martin" == Martin Runge <Martin.Runge@rohde-schwarz.com> writes:
Martin> gdb calls "open" 10,000 times until it reaches breakpoint A when
Martin> B is not set, but 600,000 times when B is set.
Hah, that is ridiculous.
Martin> Why does gdb open all these files and where does it do it? The
Martin> breakpoint is specified as <sourcefile>:<line>, but the debug
Martin> info in the binary should be sufficient to resolve the address?
Martin> I'll try to develop a path if I understand why and where some of
Martin> these "open" syscall can be avoided.
gdb typically opens source files to show you a line of code when it
stops at a breakpoint.
Offhand I don't know what might be going wrong in your scenario. I
suggest something like "catch syscall open" and then going up to see the
call chain, and sampling some of the opens to try to get a glimpse into
what is happening.
Tom
More information about the Gdb
mailing list