User Tools

Site Tools


solaris:dtrace_addr2str.3dtrace

dtrace_addr2str


NAME

dtrace_addr2str, dtrace_uaddr2str - Convert addresses to symbols

SYNOPSIS

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)

DESCRIPTION

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:

module’symbol

If the address corresponds to a known object

module’function+offset

If the address is in a function

raw hex address

Any other condition

RETURN VALUES

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.

ERRORS

The dtrace_addr2str() and dtrace_uaddr2str() functions will fail if:

EINVAL

dtp or str is NULL.

ATTRIBUTES

See attributes(7) for descriptions of the following attributes:

SEE ALSO

libdtrace(3LIB), dtrace_errno(3DTRACE)


solaris/dtrace_addr2str.3dtrace.txt · Last modified: 2023/07/19 08:58 by A User Not Logged in