Bug 523929 - <value optimized out>
Summary: <value optimized out>
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gdb
Version: rawhide
Hardware: All
OS: Linux
low
high
Target Milestone: ---
Assignee: Jan Kratochvil
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-09-17 09:07 UTC by Jan Kratochvil
Modified: 2009-09-17 12:51 UTC (History)
3 users (show)

Fixed In Version: gdb-6.8.91.20090917-1.fc12
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-17 12:51:24 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
pr41353-1.c (1.71 KB, text/plain)
2009-09-17 09:07 UTC, Jan Kratochvil
no flags Details
pr41353-1.s (26.51 KB, text/plain)
2009-09-17 09:07 UTC, Jan Kratochvil
no flags Details

Description Jan Kratochvil 2009-09-17 09:07:22 UTC
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:

Comment 1 Jan Kratochvil 2009-09-17 09:07:52 UTC
Created attachment 361461 [details]
pr41353-1.s

Comment 2 Jan Kratochvil 2009-09-17 11:19:42 UTC
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)


Note You need to log in before you can comment on or make changes to this bug.