This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: gdb 7.0.1 opening many files when breakpoints are pending
>>>>> "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