From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2009) id 9DC513858D39; Tue, 13 Sep 2022 13:32:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9DC513858D39 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Aaron Merey To: bfd-cvs@sourceware.org Subject: [binutils-gdb] objdump: '-S' should trigger search for separate debuginfo. X-Act-Checkin: binutils-gdb X-Git-Author: Aaron Merey X-Git-Refname: refs/heads/master X-Git-Oldrev: 8fa9bc6a030c9a41eb8cf6f0f66043e02005b291 X-Git-Newrev: e9a241e87b42f902d0408704df6bbcd8bf465a46 Message-Id: <20220913133211.9DC513858D39@sourceware.org> Date: Tue, 13 Sep 2022 13:32:11 +0000 (GMT) X-BeenThere: binutils-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Sep 2022 13:32:11 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3De9a241e87b42= f902d0408704df6bbcd8bf465a46 commit e9a241e87b42f902d0408704df6bbcd8bf465a46 Author: Aaron Merey Date: Mon Sep 12 18:57:38 2022 -0400 objdump: '-S' should trigger search for separate debuginfo. =20 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'. Diff: --- binutils/ChangeLog | 7 +++++++ binutils/objdump.c | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 3cac2353e3b..41a2f9cb0c7 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,10 @@ +2022-09-12 Aaron Merey + + * 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 =20 PR 29532 diff --git a/binutils/objdump.c b/binutils/objdump.c index d34f269b406..6610906f83e 100644 --- a/binutils/objdump.c +++ b/binutils/objdump.c @@ -5407,7 +5407,7 @@ might_need_separate_debug_info (bool is_mainfile) return true; =20 if (process_links || dump_symtab || dump_debugging - || dump_dwarf_section_info) + || dump_dwarf_section_info || with_source_code) return true; =20 return false; =20 @@ -6114,7 +6114,8 @@ main (int argc, char **argv) =20 dump_any_debugging =3D (dump_debugging || dump_dwarf_section_info - || process_links); + || process_links + || with_source_code); =20 if (formats_info) exit_status =3D display_info ();