summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/cv2pdb.h4
-rw-r--r--src/dwarf2pdb.cpp18
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)
{