diff options
Diffstat (limited to 'payloads/libpayload/include/stdlib.h')
-rw-r--r-- | payloads/libpayload/include/stdlib.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/payloads/libpayload/include/stdlib.h b/payloads/libpayload/include/stdlib.h index 91d854ec67..04acec54e1 100644 --- a/payloads/libpayload/include/stdlib.h +++ b/payloads/libpayload/include/stdlib.h @@ -202,6 +202,10 @@ void srand(unsigned int seed); void halt(void) __attribute__ ((noreturn)); void exit(int status) __attribute__ ((noreturn)); #define abort() halt() /**< Alias for the halt() function */ +#ifdef CONFIG_LP_REMOTEGDB +/* Override abort()/halt() to trap into GDB if it is enabled. */ +#define halt() do { gdb_enter(); halt(); } while (0) +#endif /** @} */ |