summaryrefslogtreecommitdiff
path: root/libunwindstack/include/unwindstack
diff options
context:
space:
mode:
Diffstat (limited to 'libunwindstack/include/unwindstack')
-rw-r--r--libunwindstack/include/unwindstack/DwarfLocation.h10
-rw-r--r--libunwindstack/include/unwindstack/DwarfSection.h2
2 files changed, 11 insertions, 1 deletions
diff --git a/libunwindstack/include/unwindstack/DwarfLocation.h b/libunwindstack/include/unwindstack/DwarfLocation.h
index 0881182..3d50ccf 100644
--- a/libunwindstack/include/unwindstack/DwarfLocation.h
+++ b/libunwindstack/include/unwindstack/DwarfLocation.h
@@ -23,6 +23,8 @@
namespace unwindstack {
+struct DwarfCie;
+
enum DwarfLocationEnum : uint8_t {
DWARF_LOCATION_INVALID = 0,
DWARF_LOCATION_UNDEFINED,
@@ -38,7 +40,13 @@ struct DwarfLocation {
uint64_t values[2];
};
-typedef std::unordered_map<uint32_t, DwarfLocation> dwarf_loc_regs_t;
+struct DwarfLocations : public std::unordered_map<uint32_t, DwarfLocation> {
+ const DwarfCie* cie;
+ // The range of PCs where the locations are valid (end is exclusive).
+ uint64_t pc_start = 0;
+ uint64_t pc_end = 0;
+};
+typedef DwarfLocations dwarf_loc_regs_t;
} // namespace unwindstack
diff --git a/libunwindstack/include/unwindstack/DwarfSection.h b/libunwindstack/include/unwindstack/DwarfSection.h
index da91fd0..209c54a 100644
--- a/libunwindstack/include/unwindstack/DwarfSection.h
+++ b/libunwindstack/include/unwindstack/DwarfSection.h
@@ -20,6 +20,7 @@
#include <stdint.h>
#include <iterator>
+#include <map>
#include <unordered_map>
#include <unwindstack/DwarfError.h>
@@ -112,6 +113,7 @@ class DwarfSection {
std::unordered_map<uint64_t, DwarfFde> fde_entries_;
std::unordered_map<uint64_t, DwarfCie> cie_entries_;
std::unordered_map<uint64_t, dwarf_loc_regs_t> cie_loc_regs_;
+ std::map<uint64_t, dwarf_loc_regs_t> loc_regs_; // Single row indexed by pc_end.
};
template <typename AddressType>