Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
display more info about the local data model
[simgrid.git] / src / mc / mc_location.h
index 7f60328..0143f2d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2004-2014. The SimGrid Team.
+/* Copyright (c) 2004-2015. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
 
 #include <libunwind.h>
 #include <dwarf.h>
-#include <elfutils/libdw.h>
 
 #include <simgrid_config.h>
 #include "mc_base.h"
-#include "mc_forward.h"
+#include "mc_forward.hpp"
 #include "AddressSpace.hpp"
 
 namespace simgrid {
 namespace mc {
 
-typedef std::vector<Dwarf_Op> DwarfExpression;
+typedef struct
+{
+  uint8_t atom;
+  std::uint64_t number;
+  std::uint64_t number2;
+  std::uint64_t offset;
+} DwarfInstruction;
 
+typedef std::vector<DwarfInstruction> DwarfExpression;
 
 /** \brief A DWARF expression with optional validity contraints */
 class LocationListEntry {
@@ -92,19 +98,15 @@ enum mc_location_type mc_get_location_type(mc_location_t location) {
 
 XBT_INTERNAL void mc_dwarf_resolve_location(
   mc_location_t location, simgrid::mc::DwarfExpression* expression,
-  mc_object_info_t object_info, unw_cursor_t* c,
-  void* frame_pointer_address, mc_address_space_t address_space,
+  simgrid::mc::ObjectInformation* object_info, unw_cursor_t* c,
+  void* frame_pointer_address, simgrid::mc::AddressSpace* address_space,
   int process_index);
 MC_SHOULD_BE_INTERNAL void mc_dwarf_resolve_locations(
   mc_location_t location, simgrid::mc::LocationList* locations,
-  mc_object_info_t object_info, unw_cursor_t* c,
-  void* frame_pointer_address, mc_address_space_t address_space,
+  simgrid::mc::ObjectInformation* object_info, unw_cursor_t* c,
+  void* frame_pointer_address, simgrid::mc::AddressSpace* address_space,
   int process_index);
 
-XBT_INTERNAL void mc_dwarf_location_list_init(
-  simgrid::mc::LocationList*, mc_object_info_t info, Dwarf_Die* die,
-  Dwarf_Attribute* attr);
-
 #define MC_EXPRESSION_STACK_SIZE 64
 
 #define MC_EXPRESSION_OK 0
@@ -121,16 +123,16 @@ typedef struct s_mc_expression_state {
 
   unw_cursor_t* cursor;
   void* frame_base;
-  mc_address_space_t address_space;
-  mc_object_info_t object_info;
+  simgrid::mc::AddressSpace* address_space;
+  simgrid::mc::ObjectInformation* object_info;
   int process_index;
 } s_mc_expression_state_t, *mc_expression_state_t;
 
 MC_SHOULD_BE_INTERNAL int mc_dwarf_execute_expression(
-  size_t n, const Dwarf_Op* ops, mc_expression_state_t state);
+  size_t n, const simgrid::mc::DwarfInstruction* ops, mc_expression_state_t state);
 
 MC_SHOULD_BE_INTERNAL void* mc_find_frame_base(
-  mc_frame_t frame, mc_object_info_t object_info, unw_cursor_t* unw_cursor);
+  simgrid::mc::Frame* frame, simgrid::mc::ObjectInformation* object_info, unw_cursor_t* unw_cursor);
 
 SG_END_DECL()