This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[sim] Stop no-return functions returning
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Sat, 01 Mar 2003 15:56:53 -0500
- Subject: [sim] Stop no-return functions returning
Hello,
This follows up a patch from a few days ago. It makes certain that
several no-return functions really don't return. If things are really
bad (no jmpbuf) the'll now abort.
committed,
Andrew
2003-03-01 Andrew Cagney <cagney at redhat dot com>
* sim-engine.c (sim_engine_halt): If jmpbuf is invalid, abort.
(sim_engine_vabort): Ditto.
Index: sim-engine.c
===================================================================
RCS file: /cvs/src/src/sim/common/sim-engine.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 sim-engine.c
--- sim-engine.c 16 Apr 1999 01:34:57 -0000 1.1.1.1
+++ sim-engine.c 1 Mar 2003 17:50:01 -0000
@@ -79,7 +79,10 @@
longjmp (*halt_buf, sim_engine_halt_jmpval);
}
else
- sim_io_error (sd, "sim_halt - bad long jump");
+ {
+ sim_io_error (sd, "sim_halt - bad long jump");
+ abort ();
+ }
}
@@ -127,6 +130,7 @@
sim_io_evprintf (sd, fmt, ap);
sim_io_eprintf (sd, "\n");
sim_io_error (sd, "Quit Simulator");
+ abort ();
}
else
{