public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug macros/29725] New: Dwarf 5 C macros not handled
@ 2022-10-26  9:59 drepper.fsp at gmail dot com
  2022-10-26 15:47 ` [Bug macros/29725] " simon.marchi at polymtl dot ca
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: drepper.fsp at gmail dot com @ 2022-10-26  9:59 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 29725
           Summary: Dwarf 5 C macros not handled
           Product: gdb
           Version: 12.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: macros
          Assignee: unassigned at sourceware dot org
          Reporter: drepper.fsp at gmail dot com
  Target Milestone: ---

See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107414 for the gcc
maintainer's analysis.  Jakub thinks this is a gdb issue.

Copied from the gcc bug:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~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.

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

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

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

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-26  9:59 [Bug macros/29725] New: Dwarf 5 C macros not handled drepper.fsp at gmail dot com
2022-10-26 15:47 ` [Bug macros/29725] " simon.marchi at polymtl dot ca
2022-10-26 22:09 ` drepper.fsp at gmail dot com
2022-10-27  0:58 ` simark at simark dot ca
2022-10-27  1:21 ` simark at simark 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).