This is the mail archive of the gdb-prs@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]

[Bug sim/9734] result of sim_create_inferior not checked in remote-sim.c


------- 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.


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