Fixed CpdIsBgCharmDebugMessage when the message has the flab BG_CLONE on. Also protec...
authorFilippo Gioachin <gioachin@uiuc.edu>
Sat, 3 Apr 2010 18:51:40 +0000 (13:51 -0500)
committerFilippo Gioachin <gioachin@uiuc.edu>
Sat, 3 Apr 2010 18:51:40 +0000 (13:51 -0500)
src/ck-core/debug-charm.C

index a61f01dafd2f0ef7683ed71c822c43b58d5a1658..5bed0903feec04e4d340fb013160d5f95e6b7cb2 100644 (file)
@@ -760,12 +760,17 @@ extern "C" int CpdIsCharmDebugMessage(void *msg) {
          env->getMsgtype() == FillVidMsg || _entryTable[env->getEpIdx()]->inCharm;
 }
 
          env->getMsgtype() == FillVidMsg || _entryTable[env->getEpIdx()]->inCharm;
 }
 
+#if CMK_BLUEGENE_CHARM
 CpvExtern(int, _bgCcsHandlerIdx);
 extern "C" int CpdIsBgCharmDebugMessage(void *msg) {
   envelope *env = (envelope*)msg;
 CpvExtern(int, _bgCcsHandlerIdx);
 extern "C" int CpdIsBgCharmDebugMessage(void *msg) {
   envelope *env = (envelope*)msg;
+  if (CmiBgMsgFlag(msg) == BG_CLONE) {
+    env=*(envelope**)(((char*)msg)+CmiBlueGeneMsgHeaderSizeBytes);
+  }
   return (((CmiBlueGeneMsgHeader*)msg)->hID) == CpvAccess(_bgCcsHandlerIdx) || env->getMsgtype() == ForVidMsg ||
          env->getMsgtype() == FillVidMsg || _entryTable[env->getEpIdx()]->inCharm;
 }
   return (((CmiBlueGeneMsgHeader*)msg)->hID) == CpvAccess(_bgCcsHandlerIdx) || env->getMsgtype() == ForVidMsg ||
          env->getMsgtype() == FillVidMsg || _entryTable[env->getEpIdx()]->inCharm;
 }
+#endif
 
 CpvExtern(char *, displayArgument);
 
 
 CpvExtern(char *, displayArgument);