public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug symtab/10002] New: extern optimized out symbols print: Address of symbol is unknown.
@ 2009-03-25 8:55 jan dot kratochvil at redhat dot com
2009-03-26 14:23 ` [Bug symtab/10002] " jan dot kratochvil at redhat dot com
0 siblings, 1 reply; 2+ messages in thread
From: jan dot kratochvil at redhat dot com @ 2009-03-25 8:55 UTC (permalink / raw)
To: gdb-prs
Testcase:
------------------------------------------------
extern int missing;
int
main (void)
{
return 0 && missing;
}
------------------------------------------------
gcc -o kfail kfail.c -Wall -g
gcc-4.3.2-7.x86_64 (Fedora 10)
produces:
<1><55>: Abbrev Number: 4 (DW_TAG_variable)
<56> DW_AT_name : (indirect string, offset: 0x66): missing
<5c> DW_AT_type : <0x4e>
<60> DW_AT_external : 1
<61> DW_AT_declaration : 1
and GDB prints:
GNU gdb (GDB) 6.8.50.20090324-cvs
(gdb) p missing
Address of symbol "missing" is unknown.
It should print:
(gdb) p missing
$1 = <value optimized out>
Filing only to get a number for KFAIL, it was discussed at:
http://sourceware.org/ml/gdb-patches/2009-03/threads.html#00282
--
Summary: extern optimized out symbols print: Address of symbol is
unknown.
Product: gdb
Version: unknown
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: symtab
AssignedTo: unassigned at sourceware dot org
ReportedBy: jan dot kratochvil at redhat dot com
CC: gdb-prs at sourceware dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=10002
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug symtab/10002] extern optimized out symbols print: Address of symbol is unknown.
2009-03-25 8:55 [Bug symtab/10002] New: extern optimized out symbols print: Address of symbol is unknown jan dot kratochvil at redhat dot com
@ 2009-03-26 14:23 ` jan dot kratochvil at redhat dot com
0 siblings, 0 replies; 2+ messages in thread
From: jan dot kratochvil at redhat dot com @ 2009-03-26 14:23 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From jan dot kratochvil at redhat dot com 2009-03-26 14:23 -------
As there is DW_AT_declaration present according to the DWARF spec such DIE
cannot represent an <optimized out> variable:
DWARF3 4.1 point 4:
# In a variable entry representing the definition of a variable (that is, with
# no DW_AT_declaration attribute) if no location attribute is present [...],
# the variable is assumed to exist in the source code but not in the executable
# program [...]
Currently the compiler cannot optimize out variables referenced from other
compilation units.
Discussed at:
http://sourceware.org/ml/gdb/2009-03/threads.html#00159
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://sourceware.org/bugzilla/show_bug.cgi?id=10002
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-03-26 14:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-25 8:55 [Bug symtab/10002] New: extern optimized out symbols print: Address of symbol is unknown jan dot kratochvil at redhat dot com
2009-03-26 14:23 ` [Bug symtab/10002] " jan dot kratochvil at redhat dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).