DebugSymbolInfo_t Class Reference

Class to obtain debug symbol information for a given address. More...

#include <UTDebugSymbolInfo.h>

List of all members.

Public Member Functions

 DebugSymbolInfo_t ()
 DebugSymbolInfo_t (byte *function_name_buf, int function_name_buf_size)
 DebugSymbolInfo_t (byte *function_name_buf, int function_name_buf_size, byte *file_name_buf, int file_name_buf_size)
bool SetAddr (const void *address, bool collect_file_name=true, bool file_leaf_name_only=true)
const String_tFunctionName () const
uint32 FunctionOffset () const
const Path_tFileName () const
uint32 FileLineNumber () const

Detailed Description

Class to obtain debug symbol information for a given address. It is necessary to call the SetAddr function. Once SetAddr has been called, the function name, function offset, file name, and file line can be obtained for the address specified in the call to SetAddr.

Definition at line 36 of file UTDebugSymbolInfo.h.


Constructor & Destructor Documentation

DebugSymbolInfo_t::DebugSymbolInfo_t (  )  [inline]

Constructor.

Definition at line 126 of file UTDebugSymbolInfo.h.

DebugSymbolInfo_t::DebugSymbolInfo_t ( byte function_name_buf,
int  function_name_buf_size 
) [inline]

Constructor whose function name string will refer to a borrowed stack buffer. The stack buffer should not be used. Instead, use FunctionName since the underlying String_t may have needed to reallocate its buffer from the heap.

Definition at line 134 of file UTDebugSymbolInfo.h.

DebugSymbolInfo_t::DebugSymbolInfo_t ( byte function_name_buf,
int  function_name_buf_size,
byte file_name_buf,
int  file_name_buf_size 
) [inline]

Constructor whose strings will refer to borrowed stack buffers. The stack buffers should not be used. Instead, use FunctionName and FileName since the underlying String_t objects may have needed to reallocate their buffers from the heap.

Definition at line 143 of file UTDebugSymbolInfo.h.


Member Function Documentation

bool DebugSymbolInfo_t::SetAddr ( const void *  address,
bool  collect_file_name = true,
bool  file_leaf_name_only = true 
)

Loads debug symbols if necessary and available, and extracts symbol information about the specified address. If the file_leaf_name_only parameter is false, the full path of the source file will be returned from the FileName function, otherwise only the leaf name will be returned. If symbol information is not available for the specified address, returns false. If symbol information is available, returns true. If the function name and offset are available, SetAddr will return true even if the file name and line number are unavailable. In that case, the line number will be zero and file name might indicate the module name, depending on the target platform. If the line number is zero and the file name does not indicate the module, the file name will be an empty string.

const String_t & DebugSymbolInfo_t::FunctionName (  )  const [inline]

Returns the name of the function in which the address passed to the last call to SetAddr is located.

Definition at line 156 of file UTDebugSymbolInfo.h.

uint32 DebugSymbolInfo_t::FunctionOffset (  )  const [inline]

Returns the offset of the address passed to the last call to SetAddr within the funciton indicated by FunctionName.

Definition at line 164 of file UTDebugSymbolInfo.h.

const Path_t & DebugSymbolInfo_t::FileName (  )  const [inline]

Returns the file name for the source code which generated the symbol containing the address passed to the last call to SetAddr. If the file_leaf_name_only parameter passed to SetAddr was false, the full path of the source file will be returned, otherwise only the leaf name will be returned.

Definition at line 171 of file UTDebugSymbolInfo.h.

uint32 DebugSymbolInfo_t::FileLineNumber (  )  const [inline]

Returns the line number withing the source file indicated by the FileName function of the source code which generated the symbol containing the address passed to the last call to SetAddr. If this information is unavailable, returns 0.

Definition at line 178 of file UTDebugSymbolInfo.h.


The documentation for this class was generated from the following file:

Generated on Tue Dec 14 22:35:06 2010 for UT library by  doxygen 1.6.1