Branch: refs/heads/thaines/v13_dwarf_enhancements
Home: https://github.com/dyninst/dyninst
Commit: b2636dfdf0bcebf66006a4567335e7bf1c528b1d
https://github.com/dyninst/dyninst/commit/b2636dfdf0bcebf66006a4567335e7bf1c528b1d
Author: Tim Haines <thaines.astro@xxxxxxxxx>
Date: 2022-02-08 (Tue, 08 Feb 2022)
Changed paths:
M dyninstAPI/src/BPatch.C
M symtabAPI/h/Type.h
M symtabAPI/src/Type.C
M symtabAPI/src/dwarfWalker.C
Log Message:
-----------
Improve DWARF enum parsing in Symtab::Type (#1164)
* Inherit from derivedType
* Add parsing of underlying type
* Improve enum parsing debug information
* Add support for C++ scoped enums (i.e., 'enum class')
* Remove typeEnum::setName
This has no definition.
* Inline default constructor
* Clean up BPatch::createEnum
This removes the unnecessary construction of a separate (thread-safe!)
container of pairs and the associated memory leaks. It also explicitly
makes the enum's underlying type a four-byte signed int. Redundant code
from the overload which computes the enum values was replaced by using
std::iota and calling the three-argument createEnum.
* Remove factory functions
Adding overloads for these would add more clutter than utility. We
should remove these from all of the types as the constructors should
always be used to ensure class invariants.
* Remove non-portable constructors
Since we're breaking ABI here, these constructors need to go. Manually
setting the size to `sizeof(int)` is non-portable as the
BPatch::createEnum may be used to modify a binary that doesn't have the
same `int` representation as the host on which Dyninst was compiled.
Co-authored-by: Tim Haines <thaines@xxxxxxxxxxx>
|