charmxi sdag: Comment generated code to aid debugging a forgotten __sdag_init() in...
authorPhil Miller <mille121@illinois.edu>
Wed, 28 Mar 2012 23:16:56 +0000 (18:16 -0500)
committerPhil Miller <mille121@illinois.edu>
Wed, 28 Mar 2012 23:16:56 +0000 (18:16 -0500)
src/xlat-i/sdag/CSdagConstruct.C

index 1032a252825ae0d7c10a6e288193064ddd884188..ba693fbb0ba426505d028a12db30059959fbd2ca 100644 (file)
@@ -572,29 +572,17 @@ void SdagConstruct::generateWhen(XStr& decls, XStr& defs, Entry* entry)
   el = elist;
   while (el != NULL) {
      e = el->entry;
-     if ((e->paramIsMarshalled() == 1) || (e->param->isVoid() == 1)) {
-        if((e->intExpr == 0) || (e->param->isVoid() == 1)) {   // DOUBLE CHECK THIS LOGIC
-           defs << "    " << e->getEntryName();
-           defs << "_buf = __cDep->getMessage(" << e->entryPtr->entryNum << ");\n";
-        }          
-        else {
-           defs << "    " << e->getEntryName() <<
-                 "_buf = __cDep->getMessage(" << e->entryPtr->entryNum <<
-                 ", " << e->intExpr << ");\n";
-        }
-     }
-     else { // The parameter is a message
-        sv = e->stateVars->begin();
-        if(e->intExpr == 0) {
-           defs << "    " << sv->name->charstar();
-           defs << "_buf = __cDep->getMessage(" << e->entryPtr->entryNum << ");\n";
-        }          
-        else {
-           defs << "    " << sv->name->charstar() <<
-                 "_buf = __cDep->getMessage(" << e->entryPtr->entryNum <<
-                 ", " << e->intExpr << ");\n";
-        }
-     }  
+
+     defs << "    ";
+     if ((e->paramIsMarshalled() == 1) || (e->param->isVoid() == 1))
+       defs << e->getEntryName();
+     else
+       defs << sv->name->charstar();
+     defs << "_buf = __cDep->getMessage(" << e->entryPtr->entryNum;
+     if (e->intExpr)
+       defs << ", " << e->intExpr;
+     defs << "); // SEGFAULT? __cDep = 0x0? Did you call __sdag_init() in your constructor?\n";
+
     el = el->next;
   }