public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [Bug default/28584] New: abidw doesn't get Clang DWARF type information for certain symbols
@ 2021-11-11 12:15 gprocida at google dot com
  2021-11-12 13:09 ` [Bug default/28584] " gprocida at google dot com
                   ` (9 more replies)
  0 siblings, 10 replies; 12+ messages in thread
From: gprocida at google dot com @ 2021-11-11 12:15 UTC (permalink / raw)
  To: libabigail

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

            Bug ID: 28584
           Summary: abidw doesn't get Clang DWARF type information for
                    certain symbols
           Product: libabigail
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: default
          Assignee: dodji at redhat dot com
          Reporter: gprocida at google dot com
                CC: libabigail at sourceware dot org
  Target Milestone: ---

Created attachment 13776
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13776&action=edit
test case

Consider these two code fragments.

namespace N {                                                                   
struct S { static int D; };                                                     
}                                                                               
int N::S::D = 17;                                                               


namespace N {                                                                   
struct S { static int D; };                                                     
int S::D = 17;                                                                  
}                                                                               

Looking at the DWARF, in all cases the variable declaration linked to the
symbol is a separate entity (with just a linkage name) from the member within
the struct.

While GCC produces essentially identical DWARF for both fragments above, Clang
does something different for the second case. For GCC, this entity exists
outside the namespace scope. For Clang it exists in the scope it appeared in
the file (global and namespace N scope, for the two examples, respectively).

abidw doesn't appear to handle Clang's inner-scoped DW_TAG_variables. I express
no opinion as to which is wrong. :-)

I've attached a full test case.

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

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

end of thread, other threads:[~2021-11-16 15:30 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-11 12:15 [Bug default/28584] New: abidw doesn't get Clang DWARF type information for certain symbols gprocida at google dot com
2021-11-12 13:09 ` [Bug default/28584] " gprocida at google dot com
2021-11-12 14:05 ` gprocida at google dot com
2021-11-15 15:25 ` dodji at redhat dot com
2021-11-15 16:10 ` [Bug default/28584] Clang doesn't emit DW_AT_external for some global variables so they are dropped by libabigail dodji at redhat dot com
2021-11-15 16:42 ` dodji at redhat dot com
2021-11-15 21:05 ` gprocida at google dot com
2021-11-16  7:34 ` dodji at redhat dot com
2021-11-16 10:57 ` gprocida at google dot com
2021-11-16 14:08   ` Dodji Seketeli
2021-11-16 14:08 ` dodji at seketeli dot org
2021-11-16 15:30 ` gprocida at google dot com

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