public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "wcohen at redhat dot com" <sourceware-bugzilla@sourceware.org>
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	[thread overview]
Message-ID: <bug-29037-6586-6QwBEvLU5b@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-29037-6586@http.sourceware.org/bugzilla/>

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

--- Comment #2 from William Cohen <wcohen at redhat dot com> ---
dwflpp.cxx:3470 has a check on DW_AT_data_member_location and only adds things
if there a DW_AT_data_member_location seems to be part of the problem. 
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
        <error getting alternative locations: not a location list value>
   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.

-- 
You are receiving this mail because:
You are the assignee for the bug.

  parent reply	other threads:[~2022-04-21 22:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-07 14:10 [Bug translator/29037] New: " wcohen at redhat dot com
2022-04-07 14:30 ` [Bug translator/29037] " wcohen at redhat dot com
2022-04-21 22:03 ` wcohen at redhat dot com [this message]
2022-06-15 14:00 ` wcohen at redhat dot com
2022-06-24 21:31 ` wcohen at redhat dot com
2022-07-01 17:39 ` wcohen at redhat dot com
2022-07-08 17:36 ` wcohen at redhat dot com
2023-03-09 22:09 ` fche at redhat dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-29037-6586-6QwBEvLU5b@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=systemtap@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).