gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r25639 - monkey/trunk/pathologist/src/pathologist


From: gnunet
Subject: [GNUnet-SVN] r25639 - monkey/trunk/pathologist/src/pathologist
Date: Sat, 22 Dec 2012 05:45:21 +0100

Author: teichm
Date: 2012-12-22 05:45:21 +0100 (Sat, 22 Dec 2012)
New Revision: 25639

Modified:
   monkey/trunk/pathologist/src/pathologist/action_api.c
   monkey/trunk/pathologist/src/pathologist/pathologist.c
Log:
removed non relevant expressions "Not Evaluated" and "<value optimized out>" 
from the report

Modified: monkey/trunk/pathologist/src/pathologist/action_api.c
===================================================================
--- monkey/trunk/pathologist/src/pathologist/action_api.c       2012-12-21 
22:11:11 UTC (rev 25638)
+++ monkey/trunk/pathologist/src/pathologist/action_api.c       2012-12-22 
04:45:21 UTC (rev 25639)
@@ -505,7 +505,7 @@
 
                // build the function struct
                function = MONKEY_malloc(sizeof(struct Function));
-               function->depth = ++stackDepth;
+               function->depth = stackDepth++;
                function->line = cntxt->gdb_frames->line;
                function->name = cntxt->gdb_frames->func;
                function->file = cntxt->gdb_frames->file;
@@ -554,7 +554,7 @@
 
        // evaluate globals only once
        function = MONKEY_malloc(sizeof(struct Function));
-       function->depth = 0;
+       function->depth = stackDepth;
        function->line = 0;
        function->name = "Global Variables";
        function->file = "all (not yet just relevant) files";
@@ -562,7 +562,7 @@
        function->expressionListTail = NULL;
        function->next = NULL;
        function->prev = NULL;
-       MONKEY_CONTAINER_DLL_insert(trace->functionListHead,
+       MONKEY_CONTAINER_DLL_insert_tail(trace->functionListHead,
                                         trace->functionListTail, function);
 
        // Retrieve globals from the database
@@ -953,83 +953,55 @@
 
 
     switch (cntxt->bug_detected) {
-    case BUG_NULL_POINTER:
-       cntxt->xml_report_node =
-           createXmlCrashNode("npe", functionPtr->name, functionPtr->line,
-                              functionPtr->file);
-       break;
+       case BUG_NULL_POINTER:
+               cntxt->xml_report_node = createXmlCrashNode("npe", 
functionPtr->name, functionPtr->line, functionPtr->file);
+               break;
     case BUG_BAD_MEM_ACCESS:
-       cntxt->xml_report_node =
-           createXmlCrashNode("Bad memory access", functionPtr->name,
-                              functionPtr->line, functionPtr->file);
-       node =
-           MONKEY_XML_WRITER_add_child(cntxt->xml_report_node,
-                                       createXmlSimpleNode("valgrind",
-                                                           getValgrindOutput
-                                                           (cntxt)));
-       break;
+               cntxt->xml_report_node = createXmlCrashNode("Bad memory 
access", functionPtr->name, functionPtr->line, functionPtr->file);
+               node = MONKEY_XML_WRITER_add_child(cntxt->xml_report_node, 
createXmlSimpleNode("valgrind", getValgrindOutput(cntxt)));
+               break;
     case BUG_ABORT:
-       cntxt->xml_report_node =
-           createXmlCrashNode("Assertion Failure", functionPtr->name,
-                              functionPtr->line, functionPtr->file);
-       break;
+               cntxt->xml_report_node = createXmlCrashNode("Assertion 
Failure", functionPtr->name, functionPtr->line, functionPtr->file);
+               break;
     case BUG_ARITHMETIC:
-       cntxt->xml_report_node =
-           createXmlCrashNode("Division By Zero", functionPtr->name,
-                              functionPtr->line, functionPtr->file);
-       break;
+               cntxt->xml_report_node = createXmlCrashNode("Division By Zero", 
functionPtr->name, functionPtr->line, functionPtr->file);
+               break;
     case BUG_SIG_BUS:
-       cntxt->xml_report_node =
-           createXmlCrashNode("Bus Error", functionPtr->name,
-                          functionPtr->line, functionPtr->file);
-    break;
+       cntxt->xml_report_node = createXmlCrashNode("Bus Error", 
functionPtr->name, functionPtr->line, functionPtr->file);
+               break;
     default:
-       cntxt->xml_report_node =
-               createXmlCrashNode("Unknown", functionPtr->name,
-                       functionPtr->line, functionPtr->file);
+       cntxt->xml_report_node = createXmlCrashNode("Unknown", 
functionPtr->name, functionPtr->line, functionPtr->file);
        break;
     }
 
-    historyNode =
-       MONKEY_XML_WRITER_add_child(cntxt->xml_report_node,
-                                   createXmlSimpleNode("history", NULL));
+    historyNode = MONKEY_XML_WRITER_add_child(cntxt->xml_report_node, 
createXmlSimpleNode("history", NULL));
 
     /* Adding Stack Trace Nodes to XML Report */
     while (NULL != tracePtr) {
-       node =
-           MONKEY_XML_WRITER_add_child(historyNode,
-                                       createXmlEpochStep(i));
-       traceNode =
-           MONKEY_XML_WRITER_add_child(node,
-                                       createXmlSimpleNode("trace",
-                                                           NULL));
+               node = MONKEY_XML_WRITER_add_child(historyNode, 
createXmlEpochStep(i));
+               traceNode = MONKEY_XML_WRITER_add_child(node, 
createXmlSimpleNode("trace", NULL));
 
-       functionPtr = tracePtr->functionListHead;
-       while (NULL != functionPtr) {
-           node =
-               MONKEY_XML_WRITER_add_child(traceNode,
-                                           createXmlFunctionNode
-                                           (functionPtr->name,
-                                            functionPtr->line,
-                                            functionPtr->file,
-                                            functionPtr->depth));
-           node =
-               MONKEY_XML_WRITER_add_child(node,
-                                           createXmlSimpleNode
-                                           ("expressions", NULL));
+               functionPtr = tracePtr->functionListHead;
+               while (NULL != functionPtr) {
+                       node = MONKEY_XML_WRITER_add_child(traceNode, 
createXmlFunctionNode(functionPtr->name,
+                                                                               
                                                                                
functionPtr->line,
+                                                                               
                                                                                
functionPtr->file,
+                                                                               
                                                                                
functionPtr->depth));
+                       node = MONKEY_XML_WRITER_add_child(node, 
createXmlSimpleNode("expressions", NULL));
 
-           expressionPtr = functionPtr->expressionListHead;
-           while (NULL != expressionPtr) {
-               MONKEY_XML_WRITER_add_child(node, 
createXmlExpressionNode(expressionPtr->expressionSyntax, (NULL == 
expressionPtr->expressionValue) ? "Not Evaluated" : 
expressionPtr->expressionValue));       // node = "expressions" node
+                       expressionPtr = functionPtr->expressionListHead;
+                       while (NULL != expressionPtr) {
+                               // ignore non helpful expressions
+                               if( expressionPtr->expressionValue && 
strcmp(expressionPtr->expressionValue, "<value optimized out>") != 0)
+                                       MONKEY_XML_WRITER_add_child(node, 
createXmlExpressionNode(expressionPtr->expressionSyntax, 
expressionPtr->expressionValue));
+                               expressionPtr = expressionPtr->next;
+                       }
 
-               expressionPtr = expressionPtr->next;
-           }
+                       functionPtr = functionPtr->next;
+               }
 
-           functionPtr = functionPtr->next;
-       }
-
-       tracePtr = tracePtr->next;
-       i++;
+               tracePtr = tracePtr->next;
+               i++;
     }
     return MONKEY_OK;
 }

Modified: monkey/trunk/pathologist/src/pathologist/pathologist.c
===================================================================
--- monkey/trunk/pathologist/src/pathologist/pathologist.c      2012-12-21 
22:11:11 UTC (rev 25638)
+++ monkey/trunk/pathologist/src/pathologist/pathologist.c      2012-12-22 
04:45:21 UTC (rev 25639)
@@ -220,7 +220,7 @@
                }
 
 
-               /*                              REPORTING                       
                                */
+               //                              REPORTING
                if (MONKEY_OK != MONKEY_ACTION_format_report_xml (cntxt))
                {
                        fprintf( stderr,
@@ -258,12 +258,6 @@
 {
        if (NULL != dumpFileName)
                MONKEY_free(dumpFileName);
-//     if (NULL != binaryName)
-//             MONKEY_free(binaryName);
-//     if (NULL != binaryArgs)
-//             MONKEY_free(binaryArgs);
-//     if (NULL != command)
-//             MONKEY_free(command);
        if (NULL != emailAddress)
                MONKEY_free(emailAddress);
        if (NULL != edbFilePath)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]