public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.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	[thread overview]
Message-ID: <bug-26880-4717-CARxkhihOs@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-26880-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=26880

--- Comment #10 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The gdb-11-branch branch has been updated by Tom de Vries
<vries@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=2840a1862bc1b86ecd77e65608c0b8d819ed6901

commit 2840a1862bc1b86ecd77e65608c0b8d819ed6901
Author: Tom de Vries <tdevries@suse.de>
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 function
    (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  <tdevries@suse.de>

            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  <tdevries@suse.de>

            PR gdb/26880
            * gdb.base/non-executable.exp: New file.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2021-08-23 19:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-14  9:51 [Bug gdb/26880] New: " vries at gcc dot gnu.org
2020-11-14  9:58 ` [Bug gdb/26880] " vries at gcc dot gnu.org
2020-11-14 10:22 ` vries at gcc dot gnu.org
2020-11-14 10:30 ` vries at gcc dot gnu.org
2020-11-14 10:35 ` vries at gcc dot gnu.org
2020-11-14 11:00 ` philippe.waroquiers at skynet dot be
2020-11-16 19:35 ` tromey at sourceware dot org
2021-08-17 23:19 ` kuba at kadziolka dot net
2021-08-18  7:14 ` vries at gcc dot gnu.org
2021-08-23 10:08 ` cvs-commit at gcc dot gnu.org
2021-08-23 19:08 ` cvs-commit at gcc dot gnu.org [this message]
2021-08-23 19:10 ` vries at gcc dot gnu.org
2021-08-23 19:10 ` vries at gcc dot gnu.org
2021-08-23 20:19 ` tromey at sourceware dot org
2021-08-24  6:15 ` vries at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-26880-4717-CARxkhihOs@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).