dtrace_addr2str, dtrace_uaddr2str - Convert addresses to symbols
cc [ flag... ] file... -ldtrace [ library... ] #include <dtrace.h> int dtrace_addr2str(dtrace_hdl_t *dtp, uint64_t addr, char *str, int nbytes) int dtrace_uaddr2str(dtrace_hdl_t *dtp, pid_t pid, uint64_t addr, char *str, int nbytes)
The dtrace_addr2str() function takes a kernel address, addr. The function writes a maximum of nbytes of the name of the symbol associated with the kernel address into the buffer, str.
The dtrace_uaddr2str() function takes a userspace address, addr., The function writes a maximum of nbytes of the name of the symbol associated with the userspace address into the provided buffer, str.
The string returned in the buffer, str can take the following forms:
If the address corresponds to a known object
If the address is in a function
Any other condition
On successful completion, the dtrace_addr2str() and dtrace_uaddr2str() functions return the length of the translated string, regardless of the value of _nbytes_.
On failure, these functions return -1 and set the DTrace error number to indicate the reason for the failure.
See the dtrace_errno(3DTRACE) man page for more information.
The dtrace_addr2str() and dtrace_uaddr2str() functions will fail if:
dtp or str is NULL.
See attributes(7) for descriptions of the following attributes:
|