From 2b82007571dbe02b85338dc9fa85251cd5d68028 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Wed, 4 Sep 2024 13:29:30 +0100 Subject: [gdb] Allow CPU architectures to omit support for GDB Move the file to , and provide a common dummy implementation for all architectures that have not yet implemented support for GDB. Signed-off-by: Michael Brown --- src/include/bits/gdbmach.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 src/include/bits/gdbmach.h (limited to 'src/include/bits') diff --git a/src/include/bits/gdbmach.h b/src/include/bits/gdbmach.h new file mode 100644 index 000000000..7e349856f --- /dev/null +++ b/src/include/bits/gdbmach.h @@ -0,0 +1,45 @@ +#ifndef _BITS_GDBMACH_H +#define _BITS_GDBMACH_H + +/** @file + * + * Dummy GDB architecture specifics + * + * This file is included only if the architecture does not provide its + * own version of this file. + * + */ + +#include + +typedef unsigned long gdbreg_t; + +/* Register snapshot */ +enum { + /* Not yet implemented */ + GDBMACH_NREGS, +}; + +#define GDBMACH_SIZEOF_REGS ( GDBMACH_NREGS * sizeof ( gdbreg_t ) ) + +static inline void gdbmach_set_pc ( gdbreg_t *regs, gdbreg_t pc ) { + /* Not yet implemented */ + ( void ) regs; + ( void ) pc; +} + +static inline void gdbmach_set_single_step ( gdbreg_t *regs, int step ) { + /* Not yet implemented */ + ( void ) regs; + ( void ) step; +} + +static inline void gdbmach_breakpoint ( void ) { + /* Not yet implemented */ +} + +extern int gdbmach_set_breakpoint ( int type, unsigned long addr, size_t len, + int enable ); +extern void gdbmach_init ( void ); + +#endif /* _BITS_GDBMACH_H */ -- cgit v1.2.3-55-g7522