#define DWARF_E_NO_DWARF 6
#endif
-#ifndef DWARF_E_INVALID_DWARF
-#define DWARF_E_INVALID_DWARF 16
-#endif
-
int pakfire_elf_foreach_source_file(struct pakfire_elf* self,
pakfire_elf_foreach_source_file_callback callback, void* data) {
const char* filename = NULL;
// Fetch the source files
r = dwarf_getsrcfiles(die, &files, &count);
- if (r < 0) {
- switch (dwarf_errno()) {
- // Skip any invalid DWARF sections
- case DWARF_E_INVALID_DWARF:
- goto NEXT;
-
- default:
- ERROR(self->ctx, "Could not fetch the source files for %s: %s\n",
- self->path, dwarf_errmsg(-1));
- r = -ENOTSUP;
- goto ERROR;
- }
- }
+ if (r < 0)
+ goto NEXT;
// Iterate over all files...
for (unsigned int i = 0; i < count; i++) {