From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 29D9C3857818; Mon, 23 Aug 2021 19:08:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 29D9C3857818 From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug gdb/26880] hex instead of filename printed in error message Date: Mon, 23 Aug 2021 19:08:55 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Aug 2021 19:08:56 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26880 --- Comment #10 from cvs-commit at gcc dot gnu.org --- The gdb-11-branch branch has been updated by Tom de Vries : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D2840a1862bc1= b86ecd77e65608c0b8d819ed6901 commit 2840a1862bc1b86ecd77e65608c0b8d819ed6901 Author: Tom de Vries Date: Mon Aug 23 21:08:51 2021 +0200 [gdb] Fix 'not in executable format' error message With trying to load a non-executable file into gdb, we run into PR26880: ... $ gdb -q -batch test.c "0x7ffc87bfc8d0s": not in executable format: \ file format not recognized ... The problem is caused by using %ps in combination with the error functi= on (note that confusingly, it does work in combination with the warning function). Fix this by using plain "%s" instead. Tested on x86_64-linux. gdb/ChangeLog: 2021-08-23 Tom de Vries PR gdb/26880 * gdb/exec.c (exec_file_attach): Use %s instead of %ps in call = to error function. gdb/testsuite/ChangeLog: 2021-08-23 Tom de Vries PR gdb/26880 * gdb.base/non-executable.exp: New file. --=20 You are receiving this mail because: You are on the CC list for the bug.=