Re: [PATCH/RFA] Re: [RFC] Core files and the architecture vector

Mark Kettenis
2003-10-27T20:53:32Z

Date: Mon, 27 Oct 2003 10:49:19 -0500
From: Andrew Cagney <ac131313@redhat.com>

Like it. Yep.

Thanks, I checked it in, with a ChangeLog that also mentions the
change to arch-utils.h:

Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>

* arch-utils.c (deprecated_select_gdbarch_hack): New function.
(gdbarch_from_bfd): New function.
(set_gdbarch_from_file): Re-implement using gdbarch_from_bfd and
deprecated_select_gdbarch_hack.
* arch-utils.h (gdbarch_from_bfd): New prototype.

BTW, while you're there can you tweak:

error ("Architecture of file not recognized.\n");

to something like this:

error ("Architecture %s of file not recognized",
bfd_get_arch_info(bfd)->printable_name);

Hmm, that would seem strange to me:

Architecture sparc:v8plus of file not recognized

Quite contradictory isn't it. By printing the name GDB implies that
it is somehow recognizing the architecture. So I left this out for
now. Perhaps we can change the string to something that doesn't let
GDB make a fool out of itself?

Mark