summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRainer Schuetze <r.sagitario@gmx.de>2018-02-23 09:30:49 (GMT)
committerRainer Schuetze <r.sagitario@gmx.de>2018-02-23 09:30:49 (GMT)
commita76c08cdbecf7a20f7f486de724e720a8f012bdd (patch)
tree75e7038bc53eac07adacc97ec6fe7814cd7bfe54 /src
parentedc8ac2e4ac38f973ebb259a6a75c1ea9db32072 (diff)
downloadcv2pdb-a76c08cdbecf7a20f7f486de724e720a8f012bdd.zip
cv2pdb-a76c08cdbecf7a20f7f486de724e720a8f012bdd.tar.gz
cv2pdb-a76c08cdbecf7a20f7f486de724e720a8f012bdd.tar.bz2
DWARF: fix finding sibling with multiple consecutive end tags
Diffstat (limited to 'src')
-rw-r--r--src/dwarf2pdb.cpp2
-rw-r--r--src/readDwarf.cpp2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/dwarf2pdb.cpp b/src/dwarf2pdb.cpp
index 2520279..6388f8d 100644
--- a/src/dwarf2pdb.cpp
+++ b/src/dwarf2pdb.cpp
@@ -748,6 +748,7 @@ bool CV2PDB::addDWARFProc(DWARF_InfoData& procid, DWARF_CompilationUnit* cu, DIE
appendLexicalBlock(id, pclo + codeSegOff);
DIECursor next = cursor;
next.gotoSibling();
+ assert(lexicalBlocks.empty() || next.ptr <= lexicalBlocks.back().ptr);
lexicalBlocks.push_back(next);
cursor = cursor.getSubtreeCursor();
continue;
@@ -765,6 +766,7 @@ bool CV2PDB::addDWARFProc(DWARF_InfoData& procid, DWARF_CompilationUnit* cu, DIE
cursor.gotoSibling();
}
appendEnd();
+ assert(lexicalBlocks.empty() || cursor.ptr <= lexicalBlocks.back().ptr);
}
}
else
diff --git a/src/readDwarf.cpp b/src/readDwarf.cpp
index 7fe983b..690cb8e 100644
--- a/src/readDwarf.cpp
+++ b/src/readDwarf.cpp
@@ -342,7 +342,7 @@ void DIECursor::gotoSibling()
DWARF_InfoData dummy;
// read untill we pop back to the level we were at
while (level > currLevel)
- readNext(dummy);
+ readNext(dummy, true);
}
}