This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: [PATCH]: Clarify the warning displayed when you debug a core file for the wrong architecture.
- From: Jim Blandy <jimb at codesourcery dot com>
- To: Nitin Gupta <ngupta at mvista dot com>
- Cc: gdb at sourceware dot org
- Date: Tue, 28 Nov 2006 11:01:26 -0800
- Subject: Re: [PATCH]: Clarify the warning displayed when you debug a core file for the wrong architecture.
- References: <456B8B19.8050403@mvista.com>
Nitin Gupta <ngupta@mvista.com> writes:
> Pushing one of the old patches from Daniel into FSF.
>
> 2002-08-30 Daniel Jacobowitz <drow@mvista.com>
>
> * corelow.c (get_core_register_section): Clarify warning.
>
> Index: gdb-6.3.90_20051109/gdb/corelow.c
> ===================================================================
> --- gdb-6.3.90_20051109.orig/gdb/corelow.c 2005-07-04
> 13:29:10.000000000 +0000
> +++ gdb-6.3.90_20051109/gdb/corelow.c 2005-11-09 23:23:54.000000000 +0000
> @@ -462,7 +462,10 @@
> if (! section)
> {
> if (required)
> + {
> warning (_("Couldn't find %s registers in core file."), human_name);
> + warning (_("Core file may be for a different architecture.\n"));
> + }
> return;
> }
I don't object to this patch, but I wonder if there isn't a better
place to do the check, where we could issue a more informative
message.
Does this warning ever come about when the core file is *not* of a
different architecture? I'd assume not, since the caller indicated
that the section in question is required.
(Sorry if this patch has been discussed before --- I couldn't find the
thread in the archives.)