aboutsummaryrefslogtreecommitdiff
path: root/src/monkey/gnunet-monkey.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/monkey/gnunet-monkey.c')
-rw-r--r--src/monkey/gnunet-monkey.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/monkey/gnunet-monkey.c b/src/monkey/gnunet-monkey.c
index 7821936bf..030eb0774 100644
--- a/src/monkey/gnunet-monkey.c
+++ b/src/monkey/gnunet-monkey.c
@@ -77,6 +77,7 @@ run (void *cls,
77 77
78 result = GNUNET_MONKEY_ACTION_rerun_with_gdb(cntxt); 78 result = GNUNET_MONKEY_ACTION_rerun_with_gdb(cntxt);
79 switch (result) { 79 switch (result) {
80 int retVal;
80 case GDB_STATE_ERROR: 81 case GDB_STATE_ERROR:
81 break; 82 break;
82 case GDB_STATE_EXIT_NORMALLY: 83 case GDB_STATE_EXIT_NORMALLY:
@@ -85,10 +86,19 @@ run (void *cls,
85 break; 86 break;
86 case GDB_STATE_STOPPED: 87 case GDB_STATE_STOPPED:
87 /*FIXME: Expression Database should be inspected here (before writing the report) */ 88 /*FIXME: Expression Database should be inspected here (before writing the report) */
88 if (GNUNET_OK != GNUNET_MONKEY_ACTION_inspect_expression_database(cntxt)) { 89 retVal = GNUNET_MONKEY_ACTION_inspect_expression_database(cntxt);
90 if (GNUNET_NO == retVal) {
89 GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Error using Expression Database!\n"); 91 GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Error using Expression Database!\n");
90 ret = 1; 92 ret = 1;
91 break; 93 break;
94 } else if (GDB_STATE_ERROR == retVal) {
95 /* GDB could not locate a NULL value expression, launch Valgrind */
96 retVal = GNUNET_MONKEY_ACTION_rerun_with_valgrind(cntxt);
97 if (GNUNET_NO == retVal) {
98 GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Error using Valgrind!\n");
99 ret = 1;
100 break;
101 }
92 } 102 }
93 if(GNUNET_OK != GNUNET_MONKEY_ACTION_format_report(cntxt)){ 103 if(GNUNET_OK != GNUNET_MONKEY_ACTION_format_report(cntxt)){
94 GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Error in generating debug report!\n"); 104 GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Error in generating debug report!\n");