public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/55608] New: [4.6/4.7/4.8 Regression] Debug info quality regressions with file scope vars
@ 2012-12-06  8:58 jakub at gcc dot gnu.org
  2012-12-06  9:05 ` [Bug debug/55608] " rguenth at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-12-06  8:58 UTC (permalink / raw)
  To: gcc-bugs


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.


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-03-04 11:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-06  8:58 [Bug debug/55608] New: [4.6/4.7/4.8 Regression] Debug info quality regressions with file scope vars jakub at gcc dot gnu.org
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

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).