From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2F72D3857C42; Mon, 15 Nov 2021 21:05:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2F72D3857C42 From: "gprocida at google dot com" To: libabigail@sourceware.org Subject: [Bug default/28584] Clang doesn't emit DW_AT_external for some global variables so they are dropped by libabigail Date: Mon, 15 Nov 2021 21:05:13 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: libabigail X-Bugzilla-Component: default X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gprocida at google dot com X-Bugzilla-Status: REOPENED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dodji at redhat dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: resolution bug_status Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2021 21:05:13 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28584 gprocida at google dot com changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|FIXED |--- Status|RESOLVED |REOPENED --- Comment #4 from gprocida at google dot com --- Hi. I don't think DW_AT_external is the real cause. For the second example below. Here are what GCC 10 and Clang 11 both give m= e as debug_info. They have exactly one DW_AT_external attribute. GCC COMPILE_UNIT
: < 0><0x0000000b> DW_TAG_compile_unit DW_AT_producer GNU C++14 10.3.0 -mtune=3Dg= eneric -march=3Dx86-64 -g -fasynchronous-unwind-tables DW_AT_language DW_LANG_C_plus_plus DW_AT_name smv.cc DW_AT_comp_dir=20=20=20=20=20=20=20=20=20=20=20=20=20 /usr/local/google/home/gprocida/dev/stg/static_member_variable DW_AT_stmt_list 0x00000000 LOCAL_SYMBOLS: < 1><0x0000001d> DW_TAG_namespace DW_AT_name N DW_AT_decl_file 0x00000001 /usr/local/google/home/gprocida/dev/stg/static_member_variable/smv.cc DW_AT_decl_line 0x00000001 DW_AT_decl_column 0x0000000b DW_AT_sibling <0x0000003a> < 2><0x00000027> DW_TAG_structure_type DW_AT_name S DW_AT_byte_size 0x00000001 DW_AT_decl_file 0x00000001 /usr/local/google/home/gprocida/dev/stg/static_member_variable/smv.cc DW_AT_decl_line 0x00000002 DW_AT_decl_column 0x00000008 < 3><0x0000002e> DW_TAG_member DW_AT_name D DW_AT_decl_file 0x00000001 /usr/local/google/home/gprocida/dev/stg/static_member_variable/smv.cc DW_AT_decl_line 0x00000002 DW_AT_decl_column 0x00000017 DW_AT_type <0x0000003a> DW_AT_external yes(1) DW_AT_declaration yes(1) < 1><0x0000003a> DW_TAG_base_type DW_AT_byte_size 0x00000004 DW_AT_encoding DW_ATE_signed DW_AT_name int < 1><0x00000041> DW_TAG_variable DW_AT_specification <0x0000002e> DW_AT_decl_line 0x00000003 DW_AT_decl_column 0x00000005 DW_AT_linkage_name _ZN1N1S1DE DW_AT_location len 0x0009: 0x030000000000000000:=20 DW_OP_addr 0x00000000 Clang COMPILE_UNIT
: < 0><0x0000000b> DW_TAG_compile_unit DW_AT_producer Debian clang version 11.1.0-4+build1 DW_AT_language DW_LANG_C_plus_plus_14 DW_AT_name smv.cc DW_AT_stmt_list 0x00000000 DW_AT_comp_dir=20=20=20=20=20=20=20=20=20=20=20=20=20 /usr/local/google/home/gprocida/dev/stg/static_member_variable LOCAL_SYMBOLS: < 1><0x0000001e> DW_TAG_namespace DW_AT_name N < 2><0x00000023> DW_TAG_variable DW_AT_specification <0x0000003f> DW_AT_location len 0x0009: 0x030000000000000000:=20 DW_OP_addr 0x00000000 DW_AT_linkage_name _ZN1N1S1DE < 2><0x00000036> DW_TAG_structure_type DW_AT_calling_convention DW_CC_pass_by_value DW_AT_name S DW_AT_byte_size 0x00000001 DW_AT_decl_file 0x00000001 /usr/local/google/home/gprocida/dev/stg/static_member_variable/smv.cc DW_AT_decl_line 0x00000002 < 3><0x0000003f> DW_TAG_member DW_AT_name D DW_AT_type <0x0000004c> DW_AT_decl_file 0x00000001 /usr/local/google/home/gprocida/dev/stg/static_member_variable/smv.cc DW_AT_decl_line 0x00000002 DW_AT_external yes(1) DW_AT_declaration yes(1) < 1><0x0000004c> DW_TAG_base_type DW_AT_name int DW_AT_encoding DW_ATE_signed DW_AT_byte_size 0x00000004 --=20 You are receiving this mail because: You are on the CC list for the bug.=