Dwarf_Die * unit, simgrid::mc::Frame* frame,
const char *ns)
{
-
simgrid::mc::Type type;
- type.type = -1;
+ type.type = dwarf_tag(die);
type.name = std::string();
type.element_count = -1;
- type.type = dwarf_tag(die);
-
// Global Offset
type.id = dwarf_dieoffset(die);
std::shared_ptr<simgrid::mc::ObjectInformation> result =
std::make_shared<simgrid::mc::ObjectInformation>();
if (executable)
- result->flags |= MC_OBJECT_INFO_EXECUTABLE;
+ result->flags |= simgrid::mc::ObjectInformation::Executable;
result->file_name = name;
MC_find_object_address(maps, result.get());
MC_dwarf_get_variables(result.get());
// ***** Type
-typedef int e_mc_type_type;
-
namespace simgrid {
namespace mc {
Type(Type&& type) = default;
Type& operator=(Type&&) = default;
- e_mc_type_type type;
+ /** The DWARF TAG of the type (e.g. DW_TAG_array_type) */
+ int type;
Dwarf_Off id; /* Offset in the section (in hexadecimal form) */
std::string name; /* Name of the type */
int byte_size; /* Size in bytes */
// ***** Object info
-/** Bit field of options */
-typedef int mc_object_info_flags;
-#define MC_OBJECT_INFO_NONE 0
-#define MC_OBJECT_INFO_EXECUTABLE 1
-
namespace simgrid {
namespace mc {
ObjectInformation(ObjectInformation const&) = delete;
ObjectInformation& operator=(ObjectInformation const&) = delete;
- mc_object_info_flags flags;
+ // Flag:
+ static const int Executable = 1;
+
+ /** Bitfield of flags */
+ int flags;
std::string file_name;
const void* start;
const void *end;
bool executable() const
{
- return this->flags & MC_OBJECT_INFO_EXECUTABLE;
+ return this->flags & simgrid::mc::ObjectInformation::Executable;
}
bool privatized() const
void* base_address() const;
simgrid::mc::Frame* find_function(const void *ip) const;
- // TODO, should be simgrid::mc::Variable*
simgrid::mc::Variable* find_variable(const char* name) const;
};