2 Interface to Charm++ portion of parallel debugger.
3 Orion Sky Lawlor, olawlor@acm.org, 7/30/2001
5 #ifndef __CMK_DEBUG_CHARM_H
6 #define __CMK_DEBUG_CHARM_H
9 # error "debug-charm.h is for C++; use debug-conv.h for C programs"
13 #include "debug-conv++.h"
18 void CkPupMessage(PUP::er
&p
,void **atMsg
,int pack_detail
=1);
20 void *CpdGetCurrentObject();
21 void *CpdGetCurrentMsg();
23 //Hooks inside the debugger before and after an entry method is invoked
24 extern void CpdBeforeEp(int, void*, void*);
25 extern void CpdAfterEp(int);
26 extern void CpdFinishInitialization();
28 class CpdPersistentChecker
{
30 virtual ~CpdPersistentChecker() {}
31 virtual void cpdCheck(void*) {}
34 typedef struct DebugPersistentCheck
{
35 CpdPersistentChecker
*object
;
38 DebugPersistentCheck() : object(NULL
), msg(NULL
) {}
39 DebugPersistentCheck(CpdPersistentChecker
*o
, void *m
) : object(o
), msg(m
) {}
40 } DebugPersistentCheck
;
42 // This class is the parallel of EntryInfo declared in register.h and is used
43 // to extend the former with additional debug information. There is a direct
44 // correspondence between elements on the two arrays.
45 class DebugEntryInfo
{
47 // true if this entry method has a breakpoint set
49 std::vector
<DebugPersistentCheck
> preProcess
;
50 std::vector
<DebugPersistentCheck
> postProcess
;
52 DebugEntryInfo() : isBreakpoint(false) { }
55 typedef std::vector
<DebugEntryInfo
> DebugEntryTable
;
57 //These pup functions are useful in CpdLists, as they document the name
58 // of the variable. Your object must be named "c" (a stupid hack).
59 #define PCOM(field) p.comment(#field); p(c->field);
60 #define PCOMS(field) \
61 if (!p.isUnpacking()) { \
62 p.comment(#field); p((char *)c->field,strlen(c->field)); \