From 39c4bb0211356f951614e619a90215e08efd1c5f Mon Sep 17 00:00:00 2001 From: Julius Werner Date: Wed, 18 Apr 2018 14:57:33 -0700 Subject: libpayload: Move GDB functions to stdlib.h When GDB support is compiled in, halt() in libpayload will call gdb_enter(). halt() is defined in and gdb_enter() in . Usually files just include so this is not a problem, but in some situatons a payload may just include (or a file including it like ), leading to an undeclared identifier here. Move the GDB functions to to solve this. Change-Id: I7b23b8ac9cd302aa6ef96f24565130490ac40071 Signed-off-by: Julius Werner Reviewed-on: https://review.coreboot.org/25730 Reviewed-by: Aaron Durbin Tested-by: build bot (Jenkins) --- payloads/libpayload/include/libpayload.h | 5 ----- payloads/libpayload/include/stdlib.h | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'payloads') diff --git a/payloads/libpayload/include/libpayload.h b/payloads/libpayload/include/libpayload.h index 83658d15b4..43ecd05b02 100644 --- a/payloads/libpayload/include/libpayload.h +++ b/payloads/libpayload/include/libpayload.h @@ -440,11 +440,6 @@ int getline(char *buffer, int len); /* Defined in arch/${ARCH}/selfboot.c */ void selfboot(void *entry); -/* 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); - /* look for area "name" in "fmap", setting offset and size to describe it. Returns 0 on success, < 0 on error. */ int fmap_region_by_name(const uint32_t fmap_offset, const char * const name, 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). */ -- cgit v1.2.3