aboutsummaryrefslogtreecommitdiff
path: root/binutils/objdump.c
diff options
context:
space:
mode:
authorAaron Merey <amerey@redhat.com>2022-09-12 18:57:38 -0400
committerAaron Merey <amerey@redhat.com>2022-09-13 09:29:09 -0400
commite9a241e87b42f902d0408704df6bbcd8bf465a46 (patch)
tree263f88eb0a15437b6bacf5cede948e773221cf72 /binutils/objdump.c
parent8fa9bc6a030c9a41eb8cf6f0f66043e02005b291 (diff)
downloadgdb-e9a241e87b42f902d0408704df6bbcd8bf465a46.zip
gdb-e9a241e87b42f902d0408704df6bbcd8bf465a46.tar.gz
gdb-e9a241e87b42f902d0408704df6bbcd8bf465a46.tar.bz2
objdump: '-S' should trigger search for separate debuginfo.
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'.
Diffstat (limited to 'binutils/objdump.c')
-rw-r--r--binutils/objdump.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/binutils/objdump.c b/binutils/objdump.c
index d34f269..6610906 100644
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -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 ();