From: Doug Evans <dje@google.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch] print a more useful error message for "gdb core"
Date: Thu, 21 Jan 2010 17:17:00 -0000 [thread overview]
Message-ID: <e394668d1001210917k569a6857i789090f1dfa81165@mail.gmail.com> (raw)
In-Reply-To: <20100121135838.GA5211@host0.dyn.jankratochvil.net>
On Thu, Jan 21, 2010 at 5:58 AM, Jan Kratochvil
<jan.kratochvil@redhat.com> wrote:
> On Thu, 21 Jan 2010 01:12:49 +0100, Doug Evans wrote:
>> On Wed, Jan 20, 2010 at 3:56 PM, Doug Evans <dje@google.com> wrote:
>> > If the user accidentally does "gdb core" gdb currently prints:
>> >
>> > "/foo/bar": not in executable format: File format not recognized
>> >
>> > This patch prints a more useful error message for this particular case:
>> >
>> > "/foo/bar" is a core file.
>> > Please specify an executable to debug.
>
> I would prefer to try automatically loading it as a core file ("gdb -c core")
> and to print a warning instead of error. Fedora GDB is patched for build-id
> (still not submitted for FSF) so that it can find the executable in such case.
One could do that alright.
Not an exhaustive list, but if we go down the path of converting "gdb
corefile" to "gdb -c corefile", then we also need to think about "file
corefile" being converted to "core corefile" [or "target core
corefile", "core" is apparently deprecated in favor of "target core"]
and "target exec corefile" -> "target core corefile". Presumably
"file corefile" (and "target exec corefile") would discard the
currently selected executable. But maybe not. Will that be confusing
for users? I don't know.
Whatever you want is fine with me.
next prev parent reply other threads:[~2010-01-21 17:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-20 23:56 Doug Evans
2010-01-21 0:13 ` Doug Evans
2010-01-21 2:33 ` Hui Zhu
2010-01-21 13:58 ` Jan Kratochvil
2010-01-21 16:34 ` Tom Tromey
2010-01-21 17:17 ` Doug Evans [this message]
2010-01-25 4:22 ` Jan Kratochvil
2010-01-28 21:37 ` Jan Kratochvil
2010-01-28 21:39 ` Doug Evans
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=e394668d1001210917k569a6857i789090f1dfa81165@mail.gmail.com \
--to=dje@google.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
/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