From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 61AF33858430; Thu, 21 Apr 2022 22:03:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 61AF33858430 From: "wcohen at redhat dot com" To: systemtap@sourceware.org Subject: [Bug translator/29037] Systemtap unable to find struct bitfield members for gcc11 compiled code Date: Thu, 21 Apr 2022 22:03:34 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: translator X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: wcohen at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: systemtap at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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: systemtap@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Systemtap mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Apr 2022 22:03:34 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D29037 --- Comment #2 from William Cohen --- dwflpp.cxx:3470 has a check on DW_AT_data_member_location and only adds thi= ngs if there a DW_AT_data_member_location seems to be part of the problem.=20 However, just adding an additional check for DW_AT_data_bit_offset there is= not sufficient. Before adding the DW_AT_data_bit_offset check get the following= in the -vvv output: finding location for local 'a' near address 0x401170, module bias 0 get_cfa_ops @0x401170, module_start @0x400000 dwfl_module_dwarf_cfi failed: no error got eh cfi bias: 0x0 found cfa, info: -1 [start: 0x7f2cd31f669d, end: 0x561b5f61cff0, nops: 1 chaining to identifier '$a' at fields_probes_f35.stp:2:16 semantic error: no location for field 'icsk_ca_state':no error: operator '-= >' at fields_probes_f35.stp:2:18 thrown from: dwflpp.cxx:3481 source: if (@defined($a->icsk_ca_state)) After adding the DW_AT_data_bit_offset check: finding location for local 'a' near address 0x401170, module bias 0 get_cfa_ops @0x401170, module_start @0x400000 dwfl_module_dwarf_cfi failed: no error got eh cfi bias: 0x0 found cfa, info: -1 [start: 0x770000007c, end: 0x5b0000006e, nops: 1 chaining to identifier '$a' at fields_probes_f35.stp:2:16 semantic error: dwarf_getlocation_addr failed at this address (pc: 0x401170) [man error::dwarf]: identifier '$a' at fields_probes_f35.stp:2:16 dwarf_error: not a location list value dieoffset: 0x95 from /home/wcohen/research/profiling/systemtap_write/gcc11_bitfield/fields_f35 function: f at /home/wcohen/research/profiling/systemtap_write/gcc11_bitfield/fields.c:14:1 thrown from: dwflpp.cxx:3266 source: if (@defined($a->icsk_ca_state)) ^ I did a quick check with gdb to see if it was able to extract the bit field information member information on the field_f35 example that does not have = the DW_AT_data_member_location, and gdb was able to get the info, so this looks= to be limited to systemtap rather than a problem in the elfutils libraries. The fedora debuginfo is also missing the DW_AT_byte_size, so should check to see how/where that is being used. --=20 You are receiving this mail because: You are the assignee for the bug.=