Symbol Access Library


Data Structures

struct  _drsym_info_t

Typedefs

typedef struct _drsym_info_t drsym_info_t

Enumerations

enum  drsym_error_t {
  DRSYM_SUCCESS,
  DRSYM_ERROR,
  DRSYM_ERROR_INVALID_PARAMETER,
  DRSYM_ERROR_INVALID_SIZE,
  DRSYM_ERROR_LOAD_FAILED,
  DRSYM_ERROR_SYMBOL_NOT_FOUND,
  DRSYM_ERROR_LINE_NOT_AVAILABLE,
  DRSYM_ERROR_NOT_IMPLEMENTED
}

Functions

DR_EXPORT drsym_error_t drsym_init (IF_WINDOWS_ELSE(const wchar_t *, int) shmid)
DR_EXPORT drsym_error_t drsym_exit (void)
DR_EXPORT drsym_error_t drsym_lookup_address (const char *modpath, size_t modoffs, drsym_info_t *info)
DR_EXPORT drsym_error_t drsym_lookup_symbol (const char *modpath, const char *symbol, size_t *modoffs)

Typedef Documentation

typedef struct _drsym_info_t drsym_info_t

Data structure that holds symbol information


Enumeration Type Documentation

Success code for each DRSyms operation

Enumerator:
DRSYM_SUCCESS  Operation succeeded.
DRSYM_ERROR  Operation failed.
DRSYM_ERROR_INVALID_PARAMETER  Operation failed: invalid parameter
DRSYM_ERROR_INVALID_SIZE  Operation failed: invalid size
DRSYM_ERROR_LOAD_FAILED  Operation failed: unable to load symbols
DRSYM_ERROR_SYMBOL_NOT_FOUND  Operation failed: symbol not found
DRSYM_ERROR_LINE_NOT_AVAILABLE  Operation failed: line info not available
DRSYM_ERROR_NOT_IMPLEMENTED  Operation failed: not yet implemented


Function Documentation

DR_EXPORT drsym_error_t drsym_exit ( void   ) 

Clean up and shut down the symbol access library.

DR_EXPORT drsym_error_t drsym_init ( IF_WINDOWS_ELSE(const wchar_t *, int)  shmid  ) 

Initialize the symbol access library.

Parameters:
[in] shmid Identifies the symbol server for sideline operation.
Note:
Sideline operation is not yet implemented.

DR_EXPORT drsym_error_t drsym_lookup_address ( const char *  modpath,
size_t  modoffs,
drsym_info_t info 
)

Retrieves symbol information for a given module offset. When returning DRSYM_ERROR_LINE_NOT_AVAILABLE, the symbol information start_offs, end_offs, and name will still be valid.

Parameters:
[in] modpath The full path to the module to be queried.
[in] modoffs The offset from the base of the module specifying the address to be queried.
[in,out] info Information about the symbol at the queried address.

DR_EXPORT drsym_error_t drsym_lookup_symbol ( const char *  modpath,
const char *  symbol,
size_t *  modoffs 
)

Retrieves the address for a given symbol name.

Parameters:
[in] modpath The full path to the module to be queried.
[in] symbol The name of the symbol being queried.
[out] modoffs The offset from the base of the module specifying the address of the specified symbol.


  DynamoRIO API version 2.0.0 --- Thu Apr 22 00:18:20 2010