public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "branko.drevensek at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/16420] New: Gdb cannot print static variables when code is compiled but not linked with -flto
Date: Thu, 09 Jan 2014 11:23:00 -0000	[thread overview]
Message-ID: <bug-16420-4717@http.sourceware.org/bugzilla/> (raw)

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.


             reply	other threads:[~2014-01-09 11:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-09 11:23 branko.drevensek at gmail dot com [this message]
2024-01-02 12:02 ` [Bug gdb/16420] " ssbssa at sourceware dot org
2024-03-15  9:31 ` sam at gentoo dot org
2024-03-15 13:04 ` tromey at sourceware dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-16420-4717@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).