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/27984] stap skipping partially-inlined instance, but it is not inline function actually
Date: Fri, 16 Jul 2021 18:39:00 +0000	[thread overview]
Message-ID: <bug-27984-6586-jgRnrs0aiv@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-27984-6586@http.sourceware.org/bugzilla/>

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

--- Comment #9 from William Cohen <wcohen at redhat dot com> ---
Frank suggested dw.mod_info->bias as a possible place to get the information
about the bias.  However, the value doesn't appear to be set to the correct
value. It was 0.  Ironically, if one manually adds the expected bias (0x10000)
needed for the reproducer and provide a variable to store the returned bias in
the last arg of dwfl_module_addrinfo() like the patche below, the function
returns the expected bias:

diff --git a/tapsets.cxx b/tapsets.cxx
index 20e0cb68f..4f8d31c5f 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -2280,9 +2280,17 @@ query_dwarf_func (Dwarf_Die * func, dwarf_query * q)
               // up the ELF symbol name and rely on a heuristic.
               GElf_Sym sym;
               GElf_Off off = 0;
-              const char *name = dwfl_module_addrinfo (q->dw.module, entrypc,
-                                                       &off, &sym, NULL, NULL,
NULL);
+             // The following seems to be 0
+             // Dwarf_Addr bias = q->dw.mod_info->bias;
+             Dwarf_Addr bias = 0x10000;
+             Dwarf_Addr ret_bias = 0;

+             const char *name = dwfl_module_addrinfo (q->dw.module, entrypc +
bias,
+                                                       &off, &sym, NULL, NULL,
&ret_bias);
+
+             if (q->sess.verbose>2)
+                     clog << _F("%s = dwfl_module_addrinfo(entrypc=%p + %p,
off=%p, ret_bias=%p)\n",
+                                name, (void*)entrypc, (void *)bias, (void*)
off, (void*) ret_bias);
               if (name != NULL && strstr(name, ".part.") != NULL)
                 {
                   if (q->sess.verbose>2)

selected function BIO_new_ssl
BIO_new_ssl = dwfl_module_addrinfo(entrypc=0x1f760 + 0x10000, off=(nil),
ret_bias=0x10000)
selected function BIO_new_ssl_connect
BIO_new_ssl_connect = dwfl_module_addrinfo(entrypc=0x1f7e0 + 0x10000,
off=(nil), ret_bias=0x10000)
selected function ssl_puts
ssl_puts = dwfl_module_addrinfo(entrypc=0x1ed10 + 0x10000, off=(nil),
ret_bias=0x10000)

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

  parent reply	other threads:[~2021-07-16 18:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-16  2:26 [Bug translator/27984] New: " zhuizhuhaomeng at gmail dot com
2021-07-14 19:48 ` [Bug translator/27984] " wcohen at redhat dot com
2021-07-14 20:37 ` wcohen at redhat dot com
2021-07-15  0:39 ` lijunlong at openresty dot com
2021-07-15  1:37 ` lijunlong at openresty dot com
2021-07-15 14:34 ` wcohen at redhat dot com
2021-07-15 15:28 ` wcohen at redhat dot com
2021-07-15 16:22 ` wcohen at redhat dot com
2021-07-16 14:49 ` wcohen at redhat dot com
2021-07-16 18:39 ` wcohen at redhat dot com [this message]
2021-07-16 19:07 ` mark at klomp dot org
2021-07-17  0:25 ` lijunlong at openresty dot com
2021-07-17 22:05 ` wcohen 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-27984-6586-jgRnrs0aiv@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).