Created attachment 361460 [details] pr41353-1.c Description of problem: FSF GDB HEAD prints a variable while Fedora 12 or even archer-jankratochvil-fedora12 prints <value optimized out>. Version-Release number of selected component (if applicable): gdb-6.8.50.20090910-1.fc12.x86_64 How reproducible: Always. Steps to Reproduce: Attached file. Actual results: (gdb) b 18 Breakpoint 1 at 0x400480: file pr41353-1.c, line 18. (gdb) r Starting program: /home/jkratoch/t/pr41353-1 Breakpoint 1, f1 () at pr41353-1.c:18 18 } (gdb) disass Dump of assembler code for function f1: 0x0000000000400480 <f1+0>: mov 0x20048a(%rip),%eax # 0x600910 <varj> 0x0000000000400486 <f1+6>: retq End of assembler dump. (gdb) p/x $pc $1 = 0x400480 (gdb) stepi 0x0000000000400486 in f1 () at pr41353-1.c:18 18 } (gdb) p vari1 $2 = <value optimized out> Expected results: (gdb) b 18 Breakpoint 1 at 0x400480: file pr41353-1.c, line 18. (gdb) r Starting program: /home/jkratoch/t/pr41353-1 Breakpoint 1, f1 () at pr41353-1.c:18 18 } (gdb) disass Dump of assembler code for function f1: 0x0000000000400480 <f1+0>: mov 0x20048a(%rip),%eax # 0x600910 <varj> 0x0000000000400486 <f1+6>: retq End of assembler dump. (gdb) p/x $pc $1 = 0x400480 (gdb) stepi 0x0000000000400486 in f1 () at pr41353-1.c:18 18 } (gdb) p vari1 $2 = 34 Additional info:
Created attachment 361461 [details] pr41353-1.s
It gets fixed just by a rebase on FSF GDB HEAD, did not investigate more. To be in Rawhide soon. Still there fails this single testcase due to DWARF: line 25 /* { dg-gdb-test "j" "28 + 37" { target *-*-* } 28 } */ <2><128>: Abbrev Number: 6 (DW_TAG_formal_parameter) <129> DW_AT_name : j <12b> DW_AT_decl_file : 1 <12c> DW_AT_decl_line : 21 <12d> DW_AT_type : <0xf3> <131> DW_AT_location : 0x0 (location list) Offset Begin End Expression 00000000 <End of list> (gdb) b 25 Breakpoint 1 at 0x400493: file pr41353-1.c, line 25. (gdb) r Breakpoint 1, f2 (i=37, j=<value optimized out>) at pr41353-1.c:29 29 } (gdb) p j $1 = <value optimized out> (gdb)
http://koji.fedoraproject.org/koji/buildinfo?buildID=132416