This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] print a more useful error message for "gdb core"


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]