diff options
author | Pierre-Marie de Rodat <derodat@adacore.com> | 2017-03-22 14:49:09 (GMT) |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2018-03-23 18:02:26 (GMT) |
commit | f9c54374f07264f0320eab3dca2d8764813ad8c5 (patch) | |
tree | 480bb6f2208a1f49d76294a43cf1e10b9956bf48 | |
parent | 4a20baa3ea5efd1dae78d0f85c22ccd7d62c184b (diff) | |
download | cv2pdb-f9c54374f07264f0320eab3dca2d8764813ad8c5.zip cv2pdb-f9c54374f07264f0320eab3dca2d8764813ad8c5.tar.gz cv2pdb-f9c54374f07264f0320eab3dca2d8764813ad8c5.tar.bz2 |
CV2PDB: keep track of the default lower bound for the curret unit
-rw-r--r-- | src/cv2pdb.h | 4 | ||||
-rw-r--r-- | src/dwarf2pdb.cpp | 18 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/cv2pdb.h b/src/cv2pdb.h index a0af159..46f9459 100644 --- a/src/cv2pdb.h +++ b/src/cv2pdb.h @@ -268,6 +268,10 @@ public: int codeSegOff;
std::unordered_map<byte*, int> mapOffsetToType;
+ // Default lower bound for the current compilation unit. This depends on
+ // the language of the current unit.
+ unsigned currentDefaultLowerBound;
+
// 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.
diff --git a/src/dwarf2pdb.cpp b/src/dwarf2pdb.cpp index abc7ee0..221e8af 100644 --- a/src/dwarf2pdb.cpp +++ b/src/dwarf2pdb.cpp @@ -1275,6 +1275,24 @@ bool CV2PDB::createTypes() case DW_TAG_compile_unit:
currentBaseAddress = id.pclo;
+ switch (id.language)
+ {
+ case DW_LANG_Ada83:
+ case DW_LANG_Cobol74:
+ case DW_LANG_Cobol85:
+ case DW_LANG_Fortran77:
+ case DW_LANG_Fortran90:
+ case DW_LANG_Pascal83:
+ case DW_LANG_Modula2:
+ case DW_LANG_Ada95:
+ case DW_LANG_Fortran95:
+ case DW_LANG_PLI:
+ currentDefaultLowerBound = 1;
+ break;
+
+ default:
+ currentDefaultLowerBound = 0;
+ }
#if !FULL_CONTRIB
if (id.dir && id.name)
{
|