From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2124) id 20BD03858D1E; Thu, 8 Sep 2022 08:58:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 20BD03858D1E Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Nick Clifton To: bfd-cvs@sourceware.org Subject: [binutils-gdb] i686-w64-mingw32-objdump -WL returns incorrect file paths X-Act-Checkin: binutils-gdb X-Git-Author: Nick Clifton X-Git-Refname: refs/heads/master X-Git-Oldrev: f42546b6cc7468ac7d929181ed7b965ab60958ac X-Git-Newrev: 2caffd34df293680755ebad35c618ee68686fcf1 Message-Id: <20220908085834.20BD03858D1E@sourceware.org> Date: Thu, 8 Sep 2022 08:58:34 +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: Thu, 08 Sep 2022 08:58:34 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D2caffd34df29= 3680755ebad35c618ee68686fcf1 commit 2caffd34df293680755ebad35c618ee68686fcf1 Author: Nick Clifton Date: Thu Sep 8 09:56:39 2022 +0100 i686-w64-mingw32-objdump -WL returns incorrect file paths =20 PR 29523 * dwarf.c (display_debug_lines_decoded): Correctly handle DWARF= -5 directory and filename tables. Diff: --- binutils/ChangeLog | 6 ++++++ binutils/dwarf.c | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index cfb6417b55e..5f8403b158b 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,9 @@ +2022-09-08 Nick Clifton + + PR 29523 + * dwarf.c (display_debug_lines_decoded): Correctly handle DWARF-5 + directory and filename tables. + 2022-09-02 Aaron Merey =20 PR 29075 diff --git a/binutils/dwarf.c b/binutils/dwarf.c index 71d8bc9ed5c..f90f4efac5b 100644 --- a/binutils/dwarf.c +++ b/binutils/dwarf.c @@ -5215,6 +5215,8 @@ display_debug_lines_decoded (struct dwarf_section * = section, ix, n_directories); directory =3D _(""); } + else if (linfo.li_version >=3D 5) + directory =3D (char *) directory_table[ix]; else directory =3D (char *) directory_table[ix - 1]; =20 @@ -5385,6 +5387,7 @@ display_debug_lines_decoded (struct dwarf_section * = section, =20 if (linfo.li_version < 5) --file; + if (file_table =3D=3D NULL || n_files =3D=3D 0) printf (_("\n [Use file table entry %d]\n"), file); /* PR 20439 */ @@ -5406,6 +5409,10 @@ display_debug_lines_decoded (struct dwarf_section * = section, dir, n_directories); printf (_("\n \n"), dir); } + else if (linfo.li_version >=3D 5) + printf ("\n%s/%s:\n", + /* The directory index starts counting at 0. */ + directory_table[dir], file_table[file].name); else printf ("\n%s/%s:\n", /* The directory index starts counting at 1. */