We skipped calling edit_dwarf2 when no base and dest dir were given and
debugedit was invoked with -i -n. But we never need to call edit_dwarf2
if we aren't rewriting paths and we don't want to list the source files.
* tools/debugedit.c (main): Adjust edit_dwarf2 call guard.
https://sourceware.org/bugzilla/show_bug.cgi?id=27639
error (0, 0, "Stabs debuginfo not supported: %s", file);
break;
}
- if (!(do_build_id && no_recompute_build_id && !base_dir && !dest_dir)
+ /* We only have to go over the DIE tree if we are rewriting paths
+ or listing sources. */
+ if ((base_dir != NULL || dest_dir != NULL || list_file_fd != -1)
&& name != NULL && strcmp (name, ".debug_info") == 0)
edit_dwarf2 (dso);