Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge pull request #2 from mquinson/master
[simgrid.git] / src / mc / Frame.hpp
1 /* Copyright (c) 2007-2015. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 #ifndef SIMGRID_MC_FRAME_HPP
8 #define SIMGRID_MC_FRAME_HPP
9
10 #include <string>
11
12 #include <xbt/base.h>
13 #include <xbt/range.hpp>
14
15 #include "src/mc/mc_forward.h"
16 #include "src/mc/LocationList.hpp"
17 #include "src/mc/Variable.hpp"
18 #include "src/mc/Frame.hpp"
19
20 namespace simgrid {
21 namespace mc {
22
23 /** Debug information about a given function or scope within a function */
24 class Frame {
25 public:
26   Frame();
27
28   int tag;
29   std::string name;
30   /** Range of instruction addresses for which this scope is valid */
31   simgrid::xbt::range<std::uint64_t> range;
32   simgrid::dwarf::LocationList frame_base_location;
33   std::vector<Variable> variables;
34   unsigned long int id; /* DWARF offset of the subprogram */
35   std::vector<Frame> scopes;
36   unsigned long int abstract_origin_id;
37   simgrid::mc::ObjectInformation* object_info;
38
39   void* frame_base(unw_cursor_t& unw_cursor) const;
40   void remove_variable(char* name);
41 };
42
43 inline
44 Frame::Frame()
45 {
46   this->tag = 0;
47   this->range = {0, 0};
48   this->id = 0;
49   this->abstract_origin_id = 0;
50   this->object_info = nullptr;
51 }
52
53 }
54 }
55
56 #endif