x86: gdbstub: add arch-specific funcs to read/write registers

This adds some architecture-specific functions to read/write
registers for the GDB stub. This is in preparation for the actual
introduction of these functions in the core GDB stub code to
avoid breaking the build in between commits.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
Daniel Leung 2021-10-14 10:56:36 -07:00 committed by Anas Nashif
commit e1180c8cee
2 changed files with 90 additions and 2 deletions

View file

@ -22,6 +22,8 @@
*/
#define ARCH_GDB_NUM_REGISTERS 16
#define GDB_STUB_NUM_REGISTERS 16
/**
* @brief GDB interruption context
*
@ -71,12 +73,13 @@ enum GDB_REGISTER {
GDB_DS,
GDB_ES,
GDB_FS,
GDB_GS
GDB_GS,
GDB_ORIG_EAX = 41,
};
struct gdb_ctx {
unsigned int exception;
unsigned int registers[ARCH_GDB_NUM_REGISTERS];
unsigned int registers[GDB_STUB_NUM_REGISTERS];
};
#endif /* _ASMLANGUAGE */