Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
model-checker : update backtrace display
authorMarion Guthmuller <marion.guthmuller@loria.fr>
Sat, 7 Jul 2012 20:19:44 +0000 (22:19 +0200)
committerMarion Guthmuller <marion.guthmuller@loria.fr>
Tue, 10 Jul 2012 14:13:57 +0000 (16:13 +0200)
src/xbt/backtrace_linux.c
src/xbt/mmalloc/mm_diff.c

index 9704bc0..4f246cc 100644 (file)
@@ -58,6 +58,11 @@ backtrace_helper (struct _Unwind_Context *ctx, void *a)
  * */
 
 int xbt_backtrace_no_malloc(void **array, int size) {
+
+  int i = 0;
+  for(i=0; i < size; i++)
+    array[i] = NULL;
+
   struct trace_arg arg = { .array = array, .size = size, .cnt = -1 };
 
   if (size >= 1)
index fe69f23..1b80240 100644 (file)
@@ -16,15 +16,8 @@ extern char *xbt_binary_name;
 
 void mmalloc_backtrace_block_display(xbt_mheap_t heap, size_t block){
 
-  int type;
   xbt_ex_t e;
 
-  type = heap->heapinfo[block].type;
-
-  if (type != 0) {
-    fprintf(stderr,"Only full blocks are backtraced for now. Ignoring your request.\n");
-    return;
-  }
   if (heap->heapinfo[block].busy_block.bt_size == 0) {
     fprintf(stderr,"No backtrace available for that block, sorry.\n");
     return;