mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-05-31 18:20:12 +08:00
* 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:
@ -134,8 +134,8 @@ do_cleanups (old_chain)
|
||||
register struct cleanup *ptr;
|
||||
while ((ptr = cleanup_chain) != old_chain)
|
||||
{
|
||||
cleanup_chain = ptr->next; /* Do this first incase recursion */
|
||||
(*ptr->function) (ptr->arg);
|
||||
cleanup_chain = ptr->next;
|
||||
free (ptr);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user