Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
oops, forgot to perform the actual change of path in 3854ce9a5 .
[simgrid.git] / src / mc / mc_dwarf_expression.c
index c3490916ec29e2fd7dc91b08b2374505e779b174..f143a37edcc0ccbc84ed92e2ee691a8851f92589 100644 (file)
@@ -1,3 +1,8 @@
+/* Copyright (c) 2014. The SimGrid Team.
+ * All rights reserved.                                                     */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include <stdint.h>
 #include <stdarg.h>
@@ -364,10 +369,10 @@ void mc_dwarf_location_list_init(mc_location_list_t list, mc_object_info_t info,
     list->size++;
     list->locations = (mc_expression_t) realloc(list->locations, list->size*sizeof(s_mc_expression_t));
     mc_expression_t expression = list->locations + i;
-
-    void* base = info->flags & MC_OBJECT_INFO_EXECUTABLE ? 0 : MC_object_base_address(info);
+    expression->ops = NULL;
     mc_dwarf_expression_init(expression, len, ops);
 
+    void* base = info->flags & MC_OBJECT_INFO_EXECUTABLE ? 0 : MC_object_base_address(info);
     // If start == 0, this is not a location list:
     expression->lowpc = start == 0 ? NULL : (char*) base + start;
     expression->highpc = start == 0 ? NULL : (char*) base + end;