[Bug translator/27984] stap skipping partially-inlined instance, but it is not inline function actually

wcohen at redhat dot com sourceware-bugzilla@sourceware.org
Fri Jul 16 18:39:00 GMT 2021


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.


More information about the Systemtap mailing list