/* Copyright (c) 2008-2013. 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. */
char* key = bprintf("%" PRIx64, (uint64_t) type->id);
xbt_dict_set(info->types, key, type, NULL);
+
+ if(type->name && type->byte_size!=0) {
+ xbt_dict_set(info->types_by_name, type->name, type, NULL);
+ }
}
/** \brief Convert libdw location expresion elment into native one (or NULL in some cases) */
variable->global = 1;
Dwarf_Off offset = expr[0].number;
// TODO, Why is this different base on the object?
- Dwarf_Off base = strcmp(info->file_name, xbt_binary_name) !=0 ? (Dwarf_Off) info->start_text : 0;
+ Dwarf_Off base = strcmp(info->file_name, xbt_binary_name) !=0 ? (Dwarf_Off) info->start_exec : 0;
variable->address.address = (void*) (base + offset);
} else {
variable->address.location = MC_dwarf_get_expression(expr, len);
size_t length;
while (dwarf_nextcu (dwarf, offset, &next_offset, &length, NULL, NULL, NULL) == 0) {
Dwarf_Die die;
+
if(dwarf_offdie(dwarf, offset+length, &die)!=NULL) {
+
+ // Skip C++ for now (we will add support for it soon):
+ int lang = dwarf_srclang(&die);
+ if((lang==DW_LANG_C_plus_plus) || (lang==DW_LANG_ObjC_plus_plus)) {
+ offset = next_offset;
+ continue;
+ }
+
MC_dwarf_handle_die(info, &die, &die, NULL);
}
offset = next_offset;