Skip to content
Snippets Groups Projects
Commit fe938fb0 authored by Simon Glass's avatar Simon Glass Committed by Alexander Graf
Browse files

sandbox: Add support for calling abort()


This function is useful to signal that the application needs to exit
immediate. It can be caught with a debugger (e.g. gdb). Add a stub for it
so that it can be called from within sandbox when an internal error
occurs.

Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
parent 61318502
No related branches found
No related tags found
No related merge requests found
...@@ -652,3 +652,8 @@ void os_longjmp(ulong *jmp, int ret) ...@@ -652,3 +652,8 @@ void os_longjmp(ulong *jmp, int ret)
{ {
longjmp((struct __jmp_buf_tag *)jmp, ret); longjmp((struct __jmp_buf_tag *)jmp, ret);
} }
void os_abort(void)
{
abort();
}
...@@ -351,4 +351,8 @@ int os_setjmp(ulong *jmp, int size); ...@@ -351,4 +351,8 @@ int os_setjmp(ulong *jmp, int size);
*/ */
void os_longjmp(ulong *jmp, int ret); void os_longjmp(ulong *jmp, int ret);
/**
* os_abort() - Raise SIGABRT to exit sandbox (e.g. to debugger)
*/
void os_abort(void);
#endif #endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment