Created attachment 334060 [details] build using gcc-4.3.2-7.x86_64 to reproduce the binary, using g++ -Wall -O1 -g -std=c++0x memo.cpp -o memo Description of problem: gdb reliably dies with an assertion failure when attempting to set a specific breakpoint in a C++ program Version-Release number of selected component (if applicable): gdb-6.8-29.fc10.x86_64 (test binary built using gcc-4.3.2-7.x86_64) How reproducible: Always Steps to Reproduce: 1. g++ -Wall -O1 -g -std=c++0x memo.cpp -o memo 2. gdb memo (gdb) b fib_impl Breakpoint 1 at 0x400dcd: file memo.cpp, line 41. (gdb) run Starting program: /home/nicholas/src/bitbucket/memo Breakpoint 1, fib_impl (x=0) at memo.cpp:41 41 int fib_impl(int x) (gdb) up #1 0x0000000000400ccd in memoizer<int ()(int)>::operator() () at memo.cpp:29 29 return memo_[i] = fcn_(params...); (gdb) b Actual results: ../../gdb/breakpoint.c:5196: internal-error: expand_line_sal_maybe: Assertion `found' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) y ../../gdb/breakpoint.c:5196: internal-error: expand_line_sal_maybe: Assertion `found' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Create a core file of GDB? (y or n) y Expected results: Breakpoint is set. Additional info: I suspect this may be a bug in GCC's debugging information generation.
FSF GDB post: http://sourceware.org/ml/gdb-patches/2009-03/msg00131.html * Mon Mar 9 2009 Jan Kratochvil <jan.kratochvil> - 6.8.50.20090302-8 - Archer update to the snapshot: a99e30d08ade4a2df0f943b036cd653bcd12b04d - Fixes internal error on breaking at a multi-locations C++ caller (BZ 488572). Thanks.