Yossi Lev
2010-May-10 15:16 UTC
[dtrace-discuss] Translating a pointer to a user function name + offset
Hi I wondered if given a pointer to an instruction in a user C function, DTrace can print out the user function name and offset of that instruction. That is, I''m looking for something like the %a flag but for user functions and not only for kernel functions. I know that in the DTrace Java API this functionality exists. In particular, the Consumer class has both the lookupKernelFunction and lookupUserFunction methods (where the latter also requires the process id as an argument, in addition to the instruction pointer). I can''t find the equivalent mechanism for DTrace scripts, though. Thanks, Yossi -- This message posted from opensolaris.org
Chad Mynhier
2010-May-10 15:27 UTC
[dtrace-discuss] Translating a pointer to a user function name + offset
On Mon, May 10, 2010 at 11:16 AM, Yossi Lev <yossi.lev at oracle.com> wrote:> Hi > > I wondered if given a pointer to an instruction in a user C function, > DTrace can print out the user function name and offset of that > instruction. ?That is, I''m looking for something like the %a flag but > for user functions and not only for kernel functions. >Are you looking for %A? Chad
Yosef Lev (Sun Labs, Oracle)
2010-May-10 15:58 UTC
[dtrace-discuss] Translating a pointer to a user function name + offset
Chad Mynhier wrote:> On Mon, May 10, 2010 at 11:16 AM, Yossi Lev <yossi.lev at oracle.com> wrote: > >> Hi >> >> I wondered if given a pointer to an instruction in a user C function, >> DTrace can print out the user function name and offset of that >> instruction. That is, I''m looking for something like the %a flag but >> for user functions and not only for kernel functions. >> >> > > Are you looking for %A? >Yes, that works, thanks! Yossi> Chad >