Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
DebugStackwalk::Signature Class Reference

a stack trace signature More...

#include <debug_stack.h>

Public Member Functions

 Signature (void)
 
 Signature (const Signature &src)
 
Signatureoperator= (const Signature &src)
 
unsigned Size (void) const
 Determine the number of addresses in this signature.
 
unsigned GetAddress (int n) const
 Get a single address from the signature.
 
bool operator< (const Signature &other) const
 Strong ordering operator.
 

Static Public Member Functions

static void GetSymbol (unsigned addr, char *buf, unsigned bufSize)
 Determines symbol for given address.
 
static void GetSymbol (unsigned addr, char *bufMod, unsigned sizeMod, unsigned *relMod, char *bufSym, unsigned sizeSym, unsigned *relSym, char *bufFile, unsigned sizeFile, unsigned *line, unsigned *relLine)
 Determines symbol for given address.
 

Friends

class DebugStackwalk
 

Detailed Description

a stack trace signature

Definition at line 50 of file debug_stack.h.

Constructor & Destructor Documentation

◆ Signature() [1/2]

DebugStackwalk::Signature::Signature ( void )
inlineexplicit

Definition at line 65 of file debug_stack.h.

◆ Signature() [2/2]

DebugStackwalk::Signature::Signature ( const Signature & src)

Definition at line 118 of file debug_stack.cpp.

Member Function Documentation

◆ GetAddress()

unsigned DebugStackwalk::Signature::GetAddress ( int n) const

Get a single address from the signature.

The address at index 0 is always on top of the stack.

Parameters
nindex, 0..Size()-1
Returns
signature address

Definition at line 133 of file debug_stack.cpp.

◆ GetSymbol() [1/2]

void DebugStackwalk::Signature::GetSymbol ( unsigned addr,
char * buf,
unsigned bufSize )
static

Determines symbol for given address.

The data is returned in the form <addr> <module>+NN, <sym>+NN, <file>:<line>+NN

Parameters
addrfunction address
bufreturn buffer
bufSizesize of return buffer, minimum is 64 bytes (256 recommended)

Definition at line 139 of file debug_stack.cpp.

◆ GetSymbol() [2/2]

void DebugStackwalk::Signature::GetSymbol ( unsigned addr,
char * bufMod,
unsigned sizeMod,
unsigned * relMod,
char * bufSym,
unsigned sizeSym,
unsigned * relSym,
char * bufFile,
unsigned sizeFile,
unsigned * line,
unsigned * relLine )
static

Determines symbol for given address.

Parameters
addrfunction address
bufModmodule buffer, may be NULL
sizeModsize of buffer, including NUL, minimum 16 if given
relModrelative address within module, may be NULL
bufSymsymbol buffer, may be NULL
sizeSymsize of buffer, including NUL
relSymrelative address within symbol, may be NULL
bufFilefile name buffer, may be NULL
sizeFilesize of buffer, including NUL
lineline number, may be NULL
relLinerelative address within line, may be NULL

Definition at line 204 of file debug_stack.cpp.

◆ operator<()

bool DebugStackwalk::Signature::operator< ( const Signature & other) const
inline

Strong ordering operator.

Signatures are ordered by looking at the bottom of the stack first. Implemented inline so that STL algorithms using this operator can be compiled more efficiently.

Definition at line 93 of file debug_stack.h.

◆ operator=()

DebugStackwalk::Signature & DebugStackwalk::Signature::operator= ( const Signature & src)

Definition at line 123 of file debug_stack.cpp.

◆ Size()

unsigned DebugStackwalk::Signature::Size ( void ) const
inline

Determine the number of addresses in this signature.

Returns
number of addresses in this signature

Definition at line 74 of file debug_stack.h.

Friends And Related Symbol Documentation

◆ DebugStackwalk

friend class DebugStackwalk
friend

Definition at line 53 of file debug_stack.h.


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