Branch: refs/heads/master
Home: https://github.com/dyninst/dyninst
Commit: 4be991a7338c0df78041722dde63b9dcd5368a85
https://github.com/dyninst/dyninst/commit/4be991a7338c0df78041722dde63b9dcd5368a85
Author: Sasha Nicolas <sasha@xxxxxxxxxxx>
Date: 2021-03-26 (Fri, 26 Mar 2021)
Changed paths:
M dwarf/h/dwarfExprParser.h
M dwarf/src/dwarfExprParser.C
M dyninstAPI/src/BPatch_image.C
M symtabAPI/src/Object-elf.C
M symtabAPI/src/Symtab-lookup.C
M symtabAPI/src/Symtab.C
M symtabAPI/src/Type.C
M symtabAPI/src/dwarfWalker.C
M symtabAPI/src/dwarfWalker.h
Log Message:
-----------
DWARF supplemental file and type parsing (#1002)
* Several fixes related to supplemental dwarf files and the redhat issues
- Do not create modules from DW_TAG_compile_unit;
- Append compilation offset to compilation name if name is <artificial>;
- Initialize decode of DW_OP_entry_value, DW_OP_GNU_entry_value DW_OP_GNU_convert, DW_OP_GNU_implicit_pointer;
- Disable dwarf_parse_aranges to prevent duplicates;
- Clear error after call to Symtab::getLastSymtabError();
- Change dwarf_hasattr to dwarf_hasattr_integrate, and dwarf_attr to dwarf_attr_integrate;
- Check return of parseRangeTypes() and setFunctionFromRange() in DwarfWalker::parseSubprogram;
- Ignore abstract origin in DwarfWalker::handleAbstractOrigin() if it's in a supplemental file;
- Retrieve DIE from a GNU extension DW_FORM_GNU_ref_alt reference;
* Add suppemental file flag to hash_map of types {key->ID}, fix it on get_type_id()
- In struct Context, switch Dwarf_Off to Dwarf_Die
- Add case DW_TAG_imported_unit in parse()
- Parse compile_unit and partial_unit in parseModule()
- Remove DwarfWalker::findOffset()
- Remove unnecessary first parameter of DwarfWalker::findDieName(), fix all calls
* Parse referenced type DIE while parsing a DIE:
- Dyninst parses DIEs in a 'sequential' order. With the new supplemental dwarf file (optimized with DWZ), the previous assumption that a type referenced by a DIE will be in the same compile unit is now wrong. This lets Dyninst create DIEs whose type reference is never parsed. The solution is to parse a type as soon as Dyninst sees it, which essentially means parse when the first reference is encountered.
- Other fixes included:
- Fix name of types struct, enum, and arrays with brackets.
- Create new key (offset, file, module) to map type id.
- Associate DIEs named <artificial> to defaultModule.
- Remove redundant search on DwarfParseActions::setModuleFromName
- Remove unused decode dwarf expression function.
- Initialize SymtabError serr to SymtabError::No_Error
* Fix regression on test5_9.
* Fix regressions test family test5_* and test_type_info.
* Allow dwarf class entry with declaration attribute flag to create type and avoid loop.
|