Logo Search packages:      
Sourcecode: maxdb-7.5.00 version File versions

veo670.c File Reference


Detailed Description

Interface that allows to produce a stack backtrace.

Author:
JoergM, RaymondR area Stack Back Trace

Definition in file veo670.c.

#include "heo670.h"
#include "gsp00.h"
#include "hsp77.h"
#include "geo60.h"
#include "RunTime/System/RTESys_Spinlock.h"
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <signal.h>
#include <setjmp.h>

Go to the source code of this file.

Classes

struct  eo670_CallInfo
struct  eo670_ModuleChain_

Defines

#define GIVEUP_TIME_SLICE   sleep(0)
#define HAS_NO_ADDITIONAL_FRAME_INFO
#define HAS_NO_STACKBACKTRACE_IMPLEMENTATION
#define MAX_SYMBOL_LENGTH   4096
#define MESSAGE_TEXT_LIMIT   115
#define MSG_ID   11599
#define NO_CALLBACK   (OutputCallBackFuncPtr)0
#define NO_DISPLACEMENT   (void*)0
#define SIZE_OF_MESSAGE_BUFFER_EO670   (4096)
#define SIZE_OF_MODULE_INFO_BUFFER_EO670   (64*1024)

Typedefs

typedef struct eo670_ModuleChain_ eo670_ModuleChain

Enumerations

enum  eo670_CallArrayType { eo670_NoArrayJustOutput = 0, eo670_PointerArray = 1, eo670_FullInfoArray = 2 }

Functions

static int eo670_AddToLoadedModuleChain (const char *file_name, void *text_mapaddr, void *text_endaddr, void *osDependend, SAPDB_ULong osDependendSize, OutputCallBackFuncPtr pOutput, void *const pOutContext)
void eo670_CTraceContextStack (eo670TraceContextPtr pBTraceContext)
 Create a stack backtrace using given context.
void eo670_CTraceContextStackOCB (eo670TraceContextPtr pBTraceContext, OutputCallBackFuncPtr pOutput, void *const pOutContext)
 Create a stack backtrace using given context into the user given stack back trace output channel.
void eo670_CTraceStack (void)
 Create a stack backtrace on DEFAULT stack back trace output channel.
void eo670_CTraceStackInit ()
 Initialize lock used to serialize tracebacks.
void eo670_CTraceStackOCB (OutputCallBackFuncPtr pOutput, void *const pOutContext)
 Create a stack backtrace on stdout into the user given stack back trace output channel.
static void eo670_FillAddressInfo (char *pcAddr, eo670AddressInfo *pAddrInfo, OutputCallBackFuncPtr pOutput, void *const pOutContext)
SAPDB_Int4 eo670_FillCallArray (SAPDB_Int4 givenMaxLevel, void **callArray)
 Fill the given array with at most level trace back entries.
void eo670_FreeAddressInfo (eo670AddressInfo *pAddrInfo)
 Free mapping information.
SAPDB_Bool eo670_GetAddressInfo (void *pcAddr, eo670AddressInfo *pAddrInfo, void *pAddrInfoContext)
 Get mapping information about a given PC address.
void eo670_GetAddressInfoEpilog (void *pAddrInfoContext)
 finishes a sequences of eo670_GetAddressInfo calls and release all resources hold by eo670_GetAddressInfoProlog.
SAPDB_Bool eo670_GetAddressInfoProlog (void **pAddrInfoContext)
 prepares for following calls of eo670_GetAddressInfo
static SAPDB_Byte * eo670_GetStackLimit (void *currentStackPointer)
static void eo670_OsFreeAddressInfo (eo670AddressInfo *pAddrInfo)
static void eo670_RegisterDump (void *pBTraceContext, OutputCallBackFuncPtr pOutput, void *const pOutContext)
void eo670_SetDefaultOutputCallback (OutputCallBackFuncPtr pOutput, void *const pOutContext)
 Set default output callback function and context used for calls, that do not specify it.
static void eo670_ShowLoadedModules (OutputCallBackFuncPtr pOutput, void *const pOutContext)
void eo670_UnixFillCallArray (SAPDB_Int4 skipCount, SAPDB_Int4 maxLevel, SAPDB_Int4 *pFilledLevel, eo670_CallArrayType addCallInfo, void **callArray, void *pBTraceContext, OutputCallBackFuncPtr pOutput, void *const pOutContext)
static SAPDB_Bool eo670_UnixGetAddressInfo (void *pcAddr, eo670AddressInfo *pAddrInfo, OutputCallBackFuncPtr pOutput, void *const pOutContext)
static void eo670_UnixShowCallInfoAddon (eo670_CallInfo *callInfo, OutputCallBackFuncPtr pOutput, void *const pOutContext)
void eo670_UnixTraceStack (void *pBTraceContext, OutputCallBackFuncPtr pOutput, void *const pOutContext)
static SAPDB_Bool eo670_UpdateModuleChain (OutputCallBackFuncPtr pOutput, void *const pOutContext)
SAPDB_Bool eo670_UpdateSymbols ()
 Update symbol information.
SAPDB_Bool eo670_UpdateSymbolsOCB (OutputCallBackFuncPtr pOutput, void *const pOutContext)
 Update symbol information.
static void eo670WriteOutput (const char *str, const char *pDisplacement, OutputCallBackFuncPtr pOutput, void *const pOutContext)
void eo670WriteString (const char *str)
 Write a string into the DEFAULT stack back trace output channel.
void eo670WriteStringOCB (const char *str, OutputCallBackFuncPtr pOutput, void *const pOutContext)
 Write a string into the user given stack back trace output channel.
SAPDB_Bool RTEDiag_SymbolResolutionInit (volatile int *pEverCalled, void **pAnchor)
 Init or Reinit of lock.
void RTEDiag_SymbolResolutionLock ()
 lock the symbol resolution lock
void RTEDiag_SymbolResolutionUnlock ()
 unlock the symbol resolution lock
void vtracestack (void)
 Create a stack backtrace from pascal.

Variables

static RTE_Lock eo670_inTraceStack
static eo670_ModuleChain * eo670_LastModuleEntry = 0
static eo670_ModuleChain * eo670_ModuleAnchor = 0
static char eo670_ModuleInfoBuffer [SIZE_OF_MODULE_INFO_BUFFER_EO670]
static volatile int eo670_TraceEverCalled = 0
static char eo670MessageBuffer [SIZE_OF_MESSAGE_BUFFER_EO670]
static void * pDefaultOutContext = (void*)0
static OutputCallBackFuncPtr pDefaultOutput = NO_CALLBACK


Generated by  Doxygen 1.6.0   Back to index