Description of problem: If you set a breakpoint on a C++ symbol, symtabs_from_filename is called and iterates through all the debuginfo files searching for a nonexistent filename, which requires multiple GBs of memory for a KDE application, and brings my 4GB RAM system grinding to a halt. Version-Release number of selected component (if applicable): gdb-7.4.50.20120120-10.fc17.x86_64 How reproducible: Always Steps to Reproduce: 0. ulimit -v 3000000 1. gdb some-kde-application 2. b 'SomeClass::someFn(someType)' 3. run Actual results: gdb eventually crashes as it can't allocate enough memory Expected results: no crash Additional info: It's unnecessary to call symtabs_from_filename in this case, because there is no filename. This has already been recognised and patched for the case where there is no ':', but of course this breakpoint spec does have a ':' in it.
This was fixed upstream: 2012-01-17 Doug Evans <dje> * linespec.c (decode_line_internal): Don't call symtabs_from_filename if we know we don't have a file name to look for.
(In reply to comment #1) > This was fixed upstream: > > 2012-01-17 Doug Evans <dje> > > * linespec.c (decode_line_internal): Don't call symtabs_from_filename > if we know we don't have a file name to look for. The RPM already contains this patch (I've stepped through it, and you can also infer that from the date in the RPM version). And that patch is the one I referred to above: it deals with the case where there is no ':', but this linespec does have a ':' in it. If you read the comments just above the patch, it's clear that he's forgotten to address this case.
Sorry about my poor reading comprehension. I am working on a fix.
http://sourceware.org/ml/gdb-patches/2012-02/msg00112.html It should go in soon.