This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Can't connect to simulator that doesn't have bi-endian
- From: Daniel Jacobowitz <drow at false dot org>
- To: Masaki Muranaka <monaka at monami-software dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 5 Jan 2007 09:34:38 -0500
- Subject: Re: [patch] Can't connect to simulator that doesn't have bi-endian
- References: <DE6CF8CC-2269-4372-AFFE-AF4E9F343FDE@monami-software.com>
On Thu, Jan 04, 2007 at 09:17:48PM +0900, Masaki Muranaka wrote:
> Hello Maintainers,
>
> This is a fix that I've report to the bug database (sim/2216).
> The HEAD version of GDB passes '-E' option to the simulator.
> But '-E' option has canceled when SIM_HAVE_BIENDIAN is defined.
> I guess those ifdefs are unsuitable as mono-endian checks are
> included in standard_option_handler().
>
> - - - - - - - - -
> 2007-01-04 Masaki Muranaka <monaka@monami-software.com>
>
> * common/sim-options.c (enum STANDARD_OPTIONS, standard_options,
> standard_option_handler): Enable OPTION_ENDIAN (-E) regardless of
> SIM_HAVE_BIENDIAN definition.
I researched the history of this problem. The use of -E was added long
ago; I don't know precisely when. In November 2003, it was adjusted to
depend on selected_byte_order (), but that patch was buggy - it never
registered as either big or little endian. Then I fixed the bug in
2006, and we started getting -E again.
The problem is that this patch won't fix all the simulators. d10v,
for instance, doesn't handle -E or use common/sim-options.c.
Does anyone reading this know how that used to work?
--
Daniel Jacobowitz
CodeSourcery