Symbol and address resolution

Overview

Command Handler support for resolving a symbol name to an address, and an address back to a name, in the Test Agent’s own image. More…

// global functions

te_errno rcf_ch_register_symbol_table(const rcf_symbol_entry* entries);
void* rcf_ch_symbol_addr(const char* name, bool is_func);
const char* rcf_ch_symbol_name(const void* addr);

Detailed Documentation

Command Handler support for resolving a symbol name to an address, and an address back to a name, in the Test Agent’s own image.

Global Functions

te_errno rcf_ch_register_symbol_table(const rcf_symbol_entry* entries)

Register symbol table

The entries must point to a static memory, as it is not copied by the function

Parameters:

entries

An array of symbol entries, the last element must have NULL name

void* rcf_ch_symbol_addr(const char* name, bool is_func)

This function may be used by Portable Commands Handler to resolve name of the variable or function to its address if rcf_ch_vread, rcf_ch_vwrite or rcf_ch_call function returns -1. In this case default command processing is performed by caller: it is assumed that variable or function are in TA address space and variable is unsigned 32 bit integer.

Parameters:

name

symbol name

is_func

if true, function name is required

Returns:

symbol address or NULL

const char* rcf_ch_symbol_name(const void* addr)

This function may be used by Portable Commands Handler to symbol address to its name.

Parameters:

addr

symbol address

Returns:

symbol name or NULL