summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPierre-Marie de Rodat <derodat@adacore.com>2017-03-20 17:48:10 (GMT)
committerPierre-Marie de Rodat <derodat@adacore.com>2018-03-21 10:55:50 (GMT)
commit6c71972b0a5850e4e269f20ce0e2179031ba4f41 (patch)
tree806a44079510758ca7051104510bf249e8e3a1e9 /src
parent6bf2602f38e5bea4782b4ee601bd7bfb5eec6b78 (diff)
downloadcv2pdb-6c71972b0a5850e4e269f20ce0e2179031ba4f41.zip
cv2pdb-6c71972b0a5850e4e269f20ce0e2179031ba4f41.tar.gz
cv2pdb-6c71972b0a5850e4e269f20ce0e2179031ba4f41.tar.bz2
CV2PDB: store the current unit's base address
Diffstat (limited to 'src')
-rw-r--r--src/cv2pdb.h5
-rw-r--r--src/dwarf2pdb.cpp1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/cv2pdb.h b/src/cv2pdb.h
index b1e84a1..af9d11b 100644
--- a/src/cv2pdb.h
+++ b/src/cv2pdb.h
@@ -264,6 +264,11 @@ public:
// DWARF
int codeSegOff;
std::unordered_map<byte*, int> mapOffsetToType;
+
+ // Value of the DW_AT_low_pc attribute for the current compilation unit.
+ // Specify the default base address for use in location lists and range
+ // lists.
+ uint32_t currentBaseAddress;
};
#endif //__CV2PDB_H__
diff --git a/src/dwarf2pdb.cpp b/src/dwarf2pdb.cpp
index 798151c..f5ef586 100644
--- a/src/dwarf2pdb.cpp
+++ b/src/dwarf2pdb.cpp
@@ -1229,6 +1229,7 @@ bool CV2PDB::createTypes()
break;
case DW_TAG_compile_unit:
+ currentBaseAddress = id.pclo;
#if !FULL_CONTRIB
if (id.dir && id.name)
{