Skip to content

Commit

Permalink
Fixed dwarf assert issue with newest version of libdwarf.
Browse files Browse the repository at this point in the history
  • Loading branch information
John Detter committed Jun 3, 2016
1 parent 6e3a1f9 commit 468101b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions symtabAPI/src/dwarfWalker.C
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ bool DwarfWalker::parse() {
* following CU is already reported in next_cu_header.
*/
compile_offset = next_cu_header = 0;
Dwarf_Error err;

/* Iterate over the compilation-unit headers. */
while (dwarf_next_cu_header_c(dbg(), is_info,
Expand All @@ -137,7 +138,7 @@ bool DwarfWalker::parse() {
&extension_size,
&signature,
&typeoffset,
&next_cu_header, NULL) == DW_DLV_OK ) {
&next_cu_header, &err) == DW_DLV_OK ) {
push();
bool ret = parseModule(is_info, fixUnknownMod);
pop();
Expand Down Expand Up @@ -2437,6 +2438,7 @@ void DwarfWalker::findAllSig8Types()
* but DWARF5 is considering them for .debug_info too.*/
for (int i = 0; i < 2; ++i) {
Dwarf_Bool is_info = i;
Dwarf_Error err;
compile_offset = next_cu_header = 0;

/* Iterate over the compilation-unit headers. */
Expand All @@ -2449,7 +2451,7 @@ void DwarfWalker::findAllSig8Types()
&extension_size,
&signature,
&typeoffset,
&next_cu_header, NULL) == DW_DLV_OK ) {
&next_cu_header, &err) == DW_DLV_OK ) {
parseModuleSig8(is_info);
compile_offset = next_cu_header;
}
Expand Down Expand Up @@ -2513,4 +2515,4 @@ void DwarfWalker::setFuncReturnType() {
if (returnType)
curFunc()->setReturnType(returnType);
}
}
}

0 comments on commit 468101b

Please sign in to comment.