int DecodeLocationA(
void * addr,
struct TagItem * tags );
int DecodeLocation(
void * addr,
TAG tag, ... );
Locate the given address in the list of registered modules and return
information about it.
addr - An address to resolve
tags - An optional taglist. ti_Tag can be one of the following tags and
ti_Data is always a pointer to a storage of specified type.
Resulting values will be placed into specified locations if the
function succeeds.
DL_ModuleName (char *) - Module name
DL_SegmentName (char *) - Segment name. Can be NULL if there were
no segment names provided for the module.
DL_SegmentPointer (BPTR) - DOS pointer to the corresponding segment.
Note that it will be different from
KDL_SegmentStart value
DL_SegmentNumber (unsigned int) - Order number of the segment in the
module
DL_SegmentStart (void *) - Start address of actual segment contents
in memory.
DL_SegmentEnd (void *) - End address of actual segment contents
in memory.
DL_FirstSegment (BPTR) - DOS pointer to the first segment.
The following tags may return NULL values if there was no corresponding
information provided for the module:
DL_SymbolName (char *) - Symbol name (function or variable name)
DL_SymbolStart (void *) - Start address of contents described by this
symbol.
DL_SymbolEnd (void *) - End address of contents described by this
symbol.
Zero if lookup failed and no corresponding module found, nonzero
otherwise.
If the function fails values pointed to by taglist will not be changed.
void RegisterModule(
const char * name,
BPTR segList,
ULONG debugType,
APTR debugInfo );
Add information about the loaded executable module to the
debug information database
name - Module name
segList - DOS segment list for the module
debugType - Type of supplied debug information. The only currently
supported type is DEBUG_ELF.
debugInfo - Debug information data. For DEBUG_ELF type this should be
a pointer to struct ELF_DebugInfo, filled in as follows:
eh - a pointer to ELF file header.
sh - a pointer to an array of ELF section headers.