summaryrefslogtreecommitdiffstats
path: root/libdwfl/dwfl_nextcu.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdwfl/dwfl_nextcu.c')
-rw-r--r--libdwfl/dwfl_nextcu.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libdwfl/dwfl_nextcu.c b/libdwfl/dwfl_nextcu.c
index 6db3e0f1..db7ec121 100644
--- a/libdwfl/dwfl_nextcu.c
+++ b/libdwfl/dwfl_nextcu.c
@@ -75,7 +75,7 @@ dwfl_nextcu (Dwfl *dwfl, Dwarf_Die *lastcu, Dwarf_Addr *bias)
if (cu != NULL)
{
- *bias = mod->debug.bias;
+ *bias = DWBIAS (mod);
return &cu->die;
}
@@ -88,12 +88,12 @@ dwfl_nextcu (Dwfl *dwfl, Dwarf_Die *lastcu, Dwarf_Addr *bias)
return NULL;
if (mod->dwerr == DWFL_E_NOERROR
- && (mod->dw != NULL
+ && ((mod->debug.shared != NULL && mod->debug.shared->dw != NULL)
|| INTUSE(dwfl_module_getdwarf) (mod, bias) != NULL))
break;
}
while (mod->dwerr == DWFL_E_NO_DWARF);
- error = mod->dwerr;
+ error = mod->dwerr ?: mod->debug.shared->dwerr;
}
while (error == DWFL_E_NOERROR);