public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/107414] New: dwarf 5 C macro support
@ 2022-10-26  9:25 drepper.fsp+rhbz at gmail dot com
  2022-10-26  9:34 ` [Bug debug/107414] " jakub at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: drepper.fsp+rhbz at gmail dot com @ 2022-10-26  9:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107414

            Bug ID: 107414
           Summary: dwarf 5 C macro support
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: drepper.fsp+rhbz at gmail dot com
  Target Milestone: ---

Take this code:

union node {
  struct {
    int a;
  } l;
} x;

#define memory l.a

int main()
{
  return x.memory;
}

When compiled with -gdwarf-4 -g3 and run in gdb, it is possible to use

Breakpoint 1, main () at u.c:11
11        return x.memory;
(gdb) p x.memory
$1 = 0

When instead -gdwarf-5 -g3 is used 'memory' is not known to be a macro and one
gets

Breakpoint 1, main () at u.c:11
11        return x.memory;
(gdb) p x.memory
There is no member named memory.

Shouldn't the Dwarf 5 data be a superset of what Dwarf 4 provides?

This is not new in the trunk/13 version.  12.1 fails as well and likely prior
versions, too.

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

end of thread, other threads:[~2022-10-27  1:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-26  9:25 [Bug debug/107414] New: dwarf 5 C macro support drepper.fsp+rhbz at gmail dot com
2022-10-26  9:34 ` [Bug debug/107414] " jakub at gcc dot gnu.org
2022-10-26 10:00 ` drepper.fsp+rhbz at gmail dot com
2022-10-26 11:37 ` pinskia at gcc dot gnu.org
2022-10-26 22:05 ` drepper.fsp+rhbz at gmail dot com
2022-10-27  1:27 ` simon.marchi at polymtl dot ca

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