summaryrefslogtreecommitdiff
path: root/payloads/libpayload/include/stdlib.h
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2018-04-18 14:57:33 -0700
committerJulius Werner <jwerner@chromium.org>2018-04-19 20:39:29 +0000
commit39c4bb0211356f951614e619a90215e08efd1c5f (patch)
tree64a69945304ff045d4c7451676053d1ba164852b /payloads/libpayload/include/stdlib.h
parent2e8f4ccfe636fcb0ccd62aee503aa2320c83b6ea (diff)
downloadcoreboot-39c4bb0211356f951614e619a90215e08efd1c5f.tar.xz
libpayload: Move GDB functions to stdlib.h
When GDB support is compiled in, halt() in libpayload will call gdb_enter(). halt() is defined in <stdlib.h> and gdb_enter() in <libpayload.h>. Usually files just include <libpayload.h> so this is not a problem, but in some situatons a payload may just include <stdlib.h> (or a file including it like <assert.h>), leading to an undeclared identifier here. Move the GDB functions to <stdlib.h> to solve this. Change-Id: I7b23b8ac9cd302aa6ef96f24565130490ac40071 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/25730 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'payloads/libpayload/include/stdlib.h')
-rw-r--r--payloads/libpayload/include/stdlib.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/payloads/libpayload/include/stdlib.h b/payloads/libpayload/include/stdlib.h
index 658fe610d0..a2e612de41 100644
--- a/payloads/libpayload/include/stdlib.h
+++ b/payloads/libpayload/include/stdlib.h
@@ -211,6 +211,11 @@ int rand(void);
void srand(unsigned int seed);
/** @} */
+/* Enter remote GDB mode. Will initialize connection if not already up. */
+void gdb_enter(void);
+/* Disconnect existing GDB connection if one exists. */
+void gdb_exit(s8 exit_status);
+
/**
* Stop execution and halt the processor (this function does not return).
*/