This is the mail archive of the gdb-patches@sources.redhat.com 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]

[preliminary patch] sim/h8300/compile.c: abort when abort iscalled.


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?

By the way, the last h8300-side function that causes the simulator to
abort is _kill() in newlib/libc/sys/h8300hms/misc.c, which in turn
issues sleep instruction.

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;
 


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