[Converted from Gnats 1939] gdb coredumps on a simple test program (attached) when it is compiled with -O1. Running gdb on the core file shows the offending code to be in gdb/dwarf2loc.c:dwarf_expr_frame_base() function: *length = symbaton->size; Now, if the program is compiled with -O0 then everything is fine. But if the program is compiled with -O2 then some function arguments on the backtrace are shown as "optimized away", which is understandable, but the argument x9 passed to the top-level function kt_func3 is shown incorrectly. But I doubt this has anything to do with the coredump I am reporting. Just a different bug. Release: 6.3.50.20050506-cvs Environment: SLES9 x86_64 How-To-Repeat: $ gcc -g -Wall uvar.c -O1 -o uvar $ gdb uvar (gdb) b kt_func3 (gdb) r
(gdb) b kt_func3 Breakpoint 1 at 0x400530: file uvar.c, line 10. (gdb) r Starting program: /tmp/a.out Breakpoint 1, kt_func3 (x1=x1@entry=286331187, x2=x2@entry=572662340, x3=x3@entry=858993493, x4=x4@entry=1145324646, x5=x5@entry=1431655799, x6=x6@entry=1717986952, x7=x7@entry=2004318105, x8=x8@entry=-2004318038, x9=x9@entry=-1717986885) at uvar.c:10 10 { Therefore, closing as OBSOLETE.