Date: Sun, 5 Aug 2018 21:31:40 -0400 From: Farhan Khan <khanzf@gmail.com> To: freebsd-hackers@freebsd.org Subject: addr2line with FreeBSD kernel failing Message-ID: <CAFd4kYCAwKKNNsZJ49aa4YUT3fQ-PqS1Dymc27LO_hXXqbedfA@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hi all, Is there a way to go from a memory address to a kernel symbol? I am working with a subsystem that uses a lot of function pointers, and I am not certain which particular function is being called. I have dtrace(1) printing out the memory address of the function, like this: printf("Runs vap->iv_newstate: 0x%p", vap->iv_newstate); The resulting memory address will be 0xffffffff834fa6d0. I was told I can use addr2line(1), but it seems to fail, as follows: # addr2line -e /usr/obj/usr/src/amd64.amd64/sys/GENERIC/kernel.full ffffffff834fa6d0 ??:0 Am I doing something wrong? Also, if I can do this directly in dtrace(1), that would be much much better. This is definitely the installed kernel, so there is no kernel mismatch. I have also tried using kernel.debug and kernel, same result. Thank you, -- Farhan Khan PGP Fingerprint: B28D 2726 E2BC A97E 3854 5ABE 9A9F 00BC D525 16EE
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFd4kYCAwKKNNsZJ49aa4YUT3fQ-PqS1Dymc27LO_hXXqbedfA>