+2015-01-04 Mark Wielaard <mjw@redhat.com>
+
+ * cu.c (intern_cu): Store result and return directly when finding
+ EOF marker.
+ (__libdwfl_nextcu): Check *nextp as returned by intern_cu isn't -1.
+
2014-12-19 Mark Wielaard <mjw@redhat.com>
* dwfl_module_getdwarf.c (find_symtab): Always try find_dynsym last.
/* Keeping track of DWARF compilation units in libdwfl.
- Copyright (C) 2005-2010 Red Hat, Inc.
+ Copyright (C) 2005-2010, 2015 Red Hat, Inc.
This file is part of elfutils.
This file is free software; you can redistribute it and/or modify
{
/* This is the EOF marker. Now we have interned all the CUs.
One increment in MOD->lazycu counts not having hit EOF yet. */
- *found = (void *) -1l;
+ *found = *result = (void *) -1;
less_lazy (mod);
+ return DWFL_E_NOERROR;
}
else
{
if (result != DWFL_E_NOERROR)
return result;
- if ((*nextp)->next == NULL && nextoff == (Dwarf_Off) -1l)
+ if (*nextp != (void *) -1
+ && (*nextp)->next == NULL && nextoff == (Dwarf_Off) -1l)
(*nextp)->next = (void *) -1l;
}