Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

include: sof: debug: gdb: gdb.h: Add ifdef guard for symbol definition #7460

Merged
merged 1 commit into from
Apr 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/include/sof/debug/gdb/gdb.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@
#ifndef __SOF_DEBUG_GDB_GDB_H__
#define __SOF_DEBUG_GDB_GDB_H__

/* unconditionally including this header will cause
* problems on architectures such as ARM64 with Zephyr
* since they don't have an entry in arch/.
*
* since GDB debug is only to be used when CONFIG_GDB_DEBUG=y
* we can safely avoid this problem with the below conditional
* definition of the symbols.
*/
#ifdef CONFIG_GDB_DEBUG

#include <arch/debug/gdb/init.h>
#include <arch/debug/gdb/utilities.h>

Expand All @@ -30,4 +40,6 @@ void gdb_debug_info(unsigned char *str);
void gdb_init_debug_exception(void);
void gdb_init(void);

#endif /* CONFIG_GDB_DEBUG */

#endif /* __SOF_DEBUG_GDB_GDB_H__ */