public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/55608] New: [4.6/4.7/4.8 Regression] Debug info quality regressions with file scope vars Date: Thu, 06 Dec 2012 08:58:00 -0000 [thread overview] Message-ID: <bug-55608-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55608 Bug #: 55608 Summary: [4.6/4.7/4.8 Regression] Debug info quality regressions with file scope vars Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug AssignedTo: jakub@gcc.gnu.org ReportedBy: jakub@gcc.gnu.org static const char *a = "opq"; static const char b[8] = "rstuv"; int main () { const char *p = "abcd"; const char *q = "efgh"; const char r[] = "ijk\0lmn"; const char *s = r; return 0; } at -g -O2, gdb ./test; b main; p a; p b shows (gdb) p a $1 = 0x400560 "opq" (gdb) p b $2 = "rstuv\000\000" in e.g. GCC 3.2 or 3.3, but later on it is <optimized out>. This is related to PR55395, without reverting or adjusting part of that all the info is gone. I have a patch which so far makes p b work (if a non-DECL_EXTERNAL variable is optimized away and had an initializer, it means nothing is actually changing it and so we can add DW_AT_const_value attribute), plans how to do some other vars in this testcase.
next reply other threads:[~2012-12-06 8:58 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-12-06 8:58 jakub at gcc dot gnu.org [this message] 2012-12-06 9:05 ` [Bug debug/55608] " rguenth at gcc dot gnu.org 2012-12-06 9:12 ` pinskia at gcc dot gnu.org 2012-12-06 9:15 ` jakub at gcc dot gnu.org 2012-12-06 14:12 ` jakub at gcc dot gnu.org 2012-12-11 10:42 ` rguenth at gcc dot gnu.org 2013-01-11 15:56 ` [Bug debug/55608] [4.6/4.7/4.8/4.9 " jakub at gcc dot gnu.org 2013-03-21 20:03 ` jakub at gcc dot gnu.org 2014-03-04 11:39 ` [Bug debug/55608] [4.7/4.8/4.9 " jakub at gcc dot gnu.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-55608-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.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: linkBe 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).