1 /* Copyright (c) 2007-2020. The SimGrid Team.
2 * All rights reserved. */
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. */
7 #ifndef SIMGRID_MC_FRAME_HPP
8 #define SIMGRID_MC_FRAME_HPP
14 #include "xbt/range.hpp"
16 #include "src/mc/inspect/LocationList.hpp"
17 #include "src/mc/inspect/Variable.hpp"
18 #include "src/mc/mc_forward.hpp"
23 /** Debug information about a given function or scope within a function */
26 /** Kind of scope (DW_TAG_subprogram, DW_TAG_inlined_subroutine, etc.) */
27 int tag = DW_TAG_invalid;
29 /** Name of the function (if it is a function) */
32 /** Range of instruction addresses for which this scope is valid */
33 simgrid::xbt::Range<std::uint64_t> range{0, 0};
35 simgrid::dwarf::LocationList frame_base_location;
37 /** List of the variables (sorted by name) */
38 std::vector<Variable> variables;
40 /* Unique identifier for this scope (in the object_info)
42 * This is the global DWARF offset of the DIE. */
43 unsigned long int id = 0;
45 std::vector<Frame> scopes;
47 /** Value of `DW_AT_abstract_origin`
49 * For inlined subprograms, this is the ID of the
52 unsigned long int abstract_origin_id = 0;
54 simgrid::mc::ObjectInformation* object_info = nullptr;
56 void* frame_base(unw_cursor_t& unw_cursor) const;
57 void remove_variable(char* name);
60 } // namespace simgrid