objdump: '-S' should trigger search for separate debuginfo.
authorAaron Merey <amerey@redhat.com>
Mon, 12 Sep 2022 22:57:38 +0000 (18:57 -0400)
committerAaron Merey <amerey@redhat.com>
Tue, 13 Sep 2022 13:29:09 +0000 (09:29 -0400)
Add with_source_code to the command line options that trigger
might_need_separate_debug_info and dump_any_debugging.  This helps
'objdump -S' download missing files via debuginfod without the need for
specifying extra command line options like '-L'.

binutils/ChangeLog
binutils/objdump.c

index 3cac2353e3bc55e06d53ee5b808274fbf35eb637..41a2f9cb0c79696f354147d46856648f10552b78 100644 (file)
@@ -1,3 +1,10 @@
+2022-09-12  Aaron Merey  <amerey@redhat.com>
+
+       * objcopy.c (might_need_separate_debug_info): Add with_source_code to
+       the options that cause this function to return true.
+       (main.c): Add with_source_code to the options that enable
+       dump_any_debugging.
+
 2022-09-09  Nick Clifton  <nickc@redhat.com>
 
        PR 29532
index d34f269b40600f6db2d66562304c327400322262..6610906f83eb330d6f8f6ce5610119c07dabca39 100644 (file)
@@ -5407,7 +5407,7 @@ might_need_separate_debug_info (bool is_mainfile)
     return true;
   
   if (process_links || dump_symtab || dump_debugging
-      || dump_dwarf_section_info)
+      || dump_dwarf_section_info || with_source_code)
     return true;
 
   return false;  
@@ -6114,7 +6114,8 @@ main (int argc, char **argv)
 
   dump_any_debugging = (dump_debugging
                        || dump_dwarf_section_info
-                       || process_links);
+                       || process_links
+                       || with_source_code);
 
   if (formats_info)
     exit_status = display_info ();