[DebugInfo] Add CIE::getAugmentationData() and FDE::getCIEPointer()
authorBenjamin Maxwell <benjamin.maxwell@arm.com>
Mon, 9 Jan 2023 16:24:07 +0000 (16:24 +0000)
committerBenjamin Maxwell <benjamin.maxwell@arm.com>
Mon, 16 Jan 2023 15:38:14 +0000 (15:38 +0000)
Public getters are provided for other similar members of both the CIE
and FDE, these fields are also displayed by the llvm-drawfdump tool,
so it seems like not exposing them was likely an oversight.

These are needed for tools based on LLVM that need access to all the
parsed DWARF data.

Differential Revision: https://reviews.llvm.org/D141475

llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h

index 8e1e619..93c2c91 100644 (file)
@@ -599,6 +599,8 @@ public:
     return PersonalityEnc;
   }
 
+  StringRef getAugmentationData() const { return AugmentationData; }
+
   uint32_t getFDEPointerEncoding() const { return FDEPointerEncoding; }
 
   uint32_t getLSDAPointerEncoding() const { return LSDAPointerEncoding; }
@@ -638,6 +640,7 @@ public:
   ~FDE() override = default;
 
   const CIE *getLinkedCIE() const { return LinkedCIE; }
+  uint64_t getCIEPointer() const { return CIEPointer; }
   uint64_t getInitialLocation() const { return InitialLocation; }
   uint64_t getAddressRange() const { return AddressRange; }
   std::optional<uint64_t> getLSDAAddress() const { return LSDAAddress; }