ACE 8.0.5
Loading...
Searching...
No Matches
Stack_Trace.cpp File Reference

Encapsulate string representation of stack trace. More...

#include "ace/Stack_Trace.h"
#include "ace/OS_NS_string.h"
#include "ace/OS_NS_stdio.h"
#include <algorithm>
#include <windows.h>
#include <Dbghelp.h>

Classes

struct  _dbghelp_functions
struct  frame_state

Macros

#define MAXTEXT   5000
#define SYMSIZE   100
#define LINK(TYPE, NAME)
#define LINK_T(NAME)

Typedefs

typedef struct _dbghelp_functions dbghelp_functions

Functions

static size_t determine_starting_frame (ssize_t initial_frame, ssize_t offset)
static bool load_dbghelp_library_if_needed (dbghelp_functions *pDbg)
static int add_frame_to_buf (struct frame_state const *fs, void *usrarg)
static void emptyStack ()
static int cs_operate (int(*func)(struct frame_state const *, void *), void *usrarg, size_t starting_frame, size_t num_frames)

Detailed Description

Encapsulate string representation of stack trace.

Some platform-specific areas of this code have been adapted from examples found elsewhere. Specifically,

If you add support for a new platform, please add a bullet to the above list with durable references to the origins of your code.

Macro Definition Documentation

◆ LINK

#define LINK ( TYPE,
NAME )
Value:
(pDbg->NAME = \
(TYPE) GetProcAddress (pDbg->hMod, #NAME))

◆ LINK_T

#define LINK_T ( NAME)
Value:
LINK (dbghelp_functions::NAME##_t, NAME)
#define LINK(TYPE, NAME)

◆ MAXTEXT

#define MAXTEXT   5000

◆ SYMSIZE

#define SYMSIZE   100

Typedef Documentation

◆ dbghelp_functions

Function Documentation

◆ add_frame_to_buf()

int add_frame_to_buf ( struct frame_state const * fs,
void * usrarg )
static

◆ cs_operate()

int cs_operate ( int(* func )(struct frame_state const *, void *),
void * usrarg,
size_t starting_frame,
size_t num_frames )
static

◆ determine_starting_frame()

size_t determine_starting_frame ( ssize_t initial_frame,
ssize_t offset )
inlinestatic

◆ emptyStack()

void emptyStack ( )
static

◆ load_dbghelp_library_if_needed()

bool load_dbghelp_library_if_needed ( dbghelp_functions * pDbg)
static