Commit fe938fb0df155d902846ca39ef06cdee8869f165

Authored by Simon Glass
Committed by Alexander Graf
1 parent 613185023f

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: Simon Glass <sjg@chromium.org>
Signed-off-by: Alexander Graf <agraf@suse.de>

Showing 2 changed files with 9 additions and 0 deletions Side-by-side Diff

arch/sandbox/cpu/os.c
... ... @@ -652,4 +652,9 @@
652 652 {
653 653 longjmp((struct __jmp_buf_tag *)jmp, ret);
654 654 }
  655 +
  656 +void os_abort(void)
  657 +{
  658 + abort();
  659 +}
... ... @@ -351,5 +351,9 @@
351 351 */
352 352 void os_longjmp(ulong *jmp, int ret);
353 353  
  354 +/**
  355 + * os_abort() - Raise SIGABRT to exit sandbox (e.g. to debugger)
  356 + */
  357 +void os_abort(void);
354 358 #endif