User Tools

Site Tools


solaris:dtrace_lookup_by_type.3dtrace

dtrace_lookup_by_type


NAME

dtrace_lookup_by_type, dtrace_symbol_type, dtrace_type_fcompile, dtrace_type_strcompile - DTrace type interface

SYNOPSIS

cc [ flag… ] file… -ldtrace [ library… ]
#include <dtrace.h>

int dtrace_lookup_by_type(dtrace_hdl_t *dtp, const char *object,

const char *name, dtrace_typeinfo_t *tip)

int dtrace_symbol_type(dtrace_hdl_t *dtp, const GElf_Sym *symp,

const dtrace_syminfo_t *sip, dtrace_typeinfo_t *tip)

int dtrace_type_fcompile(dtrace_hdl_t *dtp, FILE *fp,

dtrace_typeinfo_t *tip)

int dtrace_type_strcompile(dtrace_hdl_t *dtp, const char *s,

dtrace_typeinfo_t *tip)

DESCRIPTION

The dtrace_lookup_by_type() function performs a lookup of the type, name in the module, object. The function returns the type information in tip, an opaque data structure.

The dtrace_symbol_type() function looks up the type information for the symbol described by the symp and sip arguments, and returns it in the tip argument.

The dtrace_type_fcompile() and dtrace_type_strcompile() functions take a D language type, either in a string, s or a in a file referred to by the fp argument. The functions add the type information to the information stored in the dtp argument, and return a reference to that type in the tip argument.

RETURN VALUES

On successful completion, these functions return 0. 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_lookup_by_type() function will fail if:

EINVAL

dtp is NULL.

EDT_NOMOD

The named module, object does not exist. (if a module name is given)

EDT_NOTYPE

The type does not exist in the specified module.

EDT_NOMEM

The system failed to allocate memory while processing this function.

The dtrace_symbol_type() function will fail if:

EINVAL

The value of the dtp, symp, sip, or tip argument is NULL.

EDT_NOMOD

The module specified in the sip argument does not exist.

EDT_NOSYM

The symbol specified in the sip argument does not exist in the specified module.

EDT_TYPE

There was a backend-type system error when looking up the symbol.

The dtrace_type_fcompile() and dtrace_type_strcompile() functions will fail if:

EINVAL

dtp, fp or s (respectively), or dtt is NULL.

EDT_NOMEM

The system was unable to allocate memory while processing this function.

ATTRIBUTES

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

SEE ALSO

libdtrace(3LIB), dtrace_errno(3DTRACE), dtrace_lookup_by_name(3DTRACE), dtrace_type_name(3DTRACE), gelf(3ELF)


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