This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [preliminary patch] sim/h8300/compile.c: abort when abort iscalled.
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: Kazu Hirata <kazu at cs dot umass dot edu>
- Cc: gdb-patches at sources dot redhat dot com, msnyder at redhat dot com,rsandifo at redhat dot com, aoliva at redhat dot com, vinschen at redhat dot com,dvenkat at noida dot hcltech dot com
- Date: Tue, 24 Jun 2003 11:46:28 -0400
- Subject: Re: [preliminary patch] sim/h8300/compile.c: abort when abort iscalled.
- References: <20030624.035043.10249396.kazu@cs.umass.edu>
Hi,
Attached is a patch to teach the h8300 simulator to abort when abort
is called. Without this, I get spurious XPASS when testing gcc.
Although the patched simulator works, my gut feeling is telling me
that there should be a better way to do this. Any thought?
Yes. Generally speaking, the simulators should not call abort. Instead
they should, some how, stop the simulation and return to the caller.
That statement looks to be trying to do just that. I think MichaelS
recently changed sim/common to, for the h8300 do a correct exit.
2003-06-04 Michael Snyder <msnyder@redhat.com>
* common/run.c (main): Remove SIM_H8300 ifdef.
(usage): Ditto.
* common/sim-options.c (STANDARD_OPTIONS): Add SIM_H8300SX.
(standard_options): Add '-x' for h8/300sx.
(standard_option_handler): Add case for SIM_H8300SX.
suggest studying that code.
Andrew
Kazu Hirata
2003-06-24 Kazu Hirata <kazu@cs.umass.edu>
* compile.c (sim_resume): Abort when sleep instruction is used
without the magic number.
Index: compile.c
===================================================================
RCS file: /cvs/src/src/sim/h8300/compile.c,v
retrieving revision 1.31
diff -u -r1.31 compile.c
--- compile.c 19 Jun 2003 02:14:14 -0000 1.31
+++ compile.c 24 Jun 2003 07:40:12 -0000
@@ -3577,8 +3577,7 @@
}
else
{
- /* Treat it as a sigtrap. */
- sim_engine_set_run_state (sd, sim_stopped, SIGTRAP);
+ abort ();
}
goto end;