From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14998 invoked by alias); 12 Jan 2009 14:48:43 -0000 Received: (qmail 14984 invoked by uid 48); 12 Jan 2009 14:48:43 -0000 Date: Mon, 12 Jan 2009 14:48:00 -0000 Message-ID: <20090112144843.14983.qmail@sourceware.org> From: "richard dot stuckey at arc dot com" To: gdb-prs@sourceware.org In-Reply-To: <20090112142713.9734.richard.stuckey@arc.com> References: <20090112142713.9734.richard.stuckey@arc.com> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug sim/9734] result of sim_create_inferior not checked in remote-sim.c X-Bugzilla-Reason: CC Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2009-q1/txt/msg00048.txt.bz2 ------- Additional Comments From richard dot stuckey at arc dot com 2009-01-12 14:48 ------- I have added a check to the ARC-specific version of sim_create_inferior that the endianness of the executable file matches the endiannness of the simulator target, for the situation that the target instance is created before the executable file has been specified (this check should also probably go into the gdb core code, in remote-sim.c, but I try to avoid altering the core code where possible); if the check fails, the function gives a warning and returns SIM_RC_FAIL. This, together with the change I suggested to gdbsim_create_inferior, gives the behaviour: (gdb) set endian big The target is assumed to be big endian (gdb) target sim Connected to the simulator. (gdb) file test.little Reading symbols from test.little...done. (gdb) load (gdb) run Starting program: test.little Target is big-endian but executable file test.little is little-endian. The program is not being run. gdb appears to be left in a stable state at this point, but I have not carried out extensive testing on this, so am willing to accept that throwing an error may be better. -- http://sourceware.org/bugzilla/show_bug.cgi?id=9734 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.