00001
00002
00003
00004
00005 #ifndef __CMK_DEBUG_CONV_H
00006 #define __CMK_DEBUG_CONV_H
00007
00008 #include "pup_c.h"
00009
00010
00011
00012 #define CHARMDEBUG_MAJOR 10
00013 #define CHARMDEBUG_MINOR 9
00014
00015 #ifdef __cplusplus
00016 extern "C" {
00017 #endif
00018
00019 extern void * (*CpdDebugGetAllocationTree)(int*);
00020 extern void (*CpdDebug_pupAllocationPoint)(pup_er p, void *data);
00021 extern void (*CpdDebug_deleteAllocationPoint)(void *ptr);
00022 extern void * (*CpdDebug_MergeAllocationTree)(int *size, void *data, void **remoteData, int numRemote);
00023
00024 extern void * (*CpdDebugGetMemStat)(void);
00025 extern void (*CpdDebug_pupMemStat)(pup_er p, void *data);
00026 extern void (*CpdDebug_deleteMemStat)(void *ptr);
00027 extern void * (*CpdDebug_mergeMemStat)(int *size, void *data, void **remoteData, int numRemote);
00028
00029 CpvExtern(int, cmiArgDebugFlag);
00030 extern char ** memoryBackup;
00031 extern void CpdCheckMemory(void);
00032 extern void CpdResetMemory(void);
00033
00034 void CpdInit(void);
00035 void CpdFreeze(void);
00036 void CpdUnFreeze(void);
00037 int CpdIsFrozen(void);
00038 void CpdFreezeModeScheduler(void);
00039 void CpdStartGdb(void);
00040 void Cpd_CmiHandleMessage(void *msg);
00041 void CpdAborting(const char *message);
00042
00043 extern int (*CpdIsDebugMessage)(void*);
00044 extern void * (*CpdGetNextMessage)(CsdSchedulerState_t*);
00045 extern int _conditionalDelivery;
00046 extern int conditionalPipe[2];
00047
00048 enum {
00049 CPD_ERROR = 0,
00050 CPD_SIGNAL = 1,
00051 CPD_ABORT = 2,
00052 CPD_FREEZE = 3,
00053 CPD_BREAKPOINT = 4,
00054 CPD_CROSSCORRUPTION = 5
00055 };
00056 extern void CpdNotify(int type, ...);
00057
00058 typedef struct LeakSearchInfo {
00059 char *begin_data, *end_data;
00060 char *begin_bss, *end_bss;
00061 int quick;
00062 int pe;
00063 } LeakSearchInfo;
00064 extern void CpdSearchLeaks(char*);
00065
00066
00067
00074 typedef struct {
00075 int lo,hi;
00076 int extraLen;
00077 void *extra;
00078 } CpdListItemsRequest;
00079
00084 void CpdListBeginItem(pup_er p,int itemNo);
00085
00092 typedef void (*CpdListItemsFn_c)(void *itemsParam,pup_er p,
00093 CpdListItemsRequest *req);
00094
00101 typedef size_t (*CpdListLengthFn_c)(void *lenParam);
00102
00113 void CpdListRegister_c(const char *path,
00114 CpdListLengthFn_c lenFn,void *lenParam,
00115 CpdListItemsFn_c itemsFn,void *itemsParam,
00116 int checkBoundary);
00117
00118 #ifdef __cplusplus
00119 }
00120 #endif
00121
00122 #endif