* mcheck.c: Avoid warning about undeclared abort fn.

* tm-sparc.h (PC_ADJUST):  Avoid calling error() from this;
it causes recursive calls to error() when used in cleanups.
To do so requires that we make it a function, so we do.
* sparc-tdep.c (sparc_pc_adjust):  New implem of PC_ADJUST.
* utils.c (do_cleanups):  Remove the current cleanup from the
chain *before* calling it, in case error() is called from it.
The result won't be pretty, but won't be an infinite loop either.
This commit is contained in:
John Gilmore
1991-08-20 03:02:39 +00:00
parent 24e2462158
commit 5e5215eba7
5 changed files with 40 additions and 6 deletions

View File

@@ -84,8 +84,8 @@ extern CORE_ADDR skip_prologue ();
encodes the structure size being returned. If we detect such
a fake insn, step past it. */
#define PC_ADJUST(pc) ((read_memory_integer (pc + 8, 4) & 0xfffffe00) == 0 ? \
pc+12 : pc+8)
#define PC_ADJUST(pc) sparc_pc_adjust(pc)
extern CORE_ADDR sparc_pc_adjust();
#define SAVED_PC_AFTER_CALL(frame) PC_ADJUST (read_register (RP_REGNUM))