This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/16420] New: Gdb cannot print static variables when code is compiled but not linked with -flto


https://sourceware.org/bugzilla/show_bug.cgi?id=16420

            Bug ID: 16420
           Summary: Gdb cannot print static variables when code is
                    compiled but not linked with -flto
           Product: gdb
           Version: 7.6
            Status: NEW
          Severity: minor
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: branko.drevensek at gmail dot com

Code:
---
int main()
{
    static int x = 4;
    return x;
}
---
Compiled with -O0 -g3 -flto. Linked *without* -flto.

In gdb within main:
info locals
x.1586 = 4
print x
No symbol "x" in current context.
print x.1586
No symbol "x" in current context.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]