mirror of
https://github.com/ipxe/ipxe
synced 2025-12-25 09:01:24 +03:00
[GDB] Add watch and rwatch hardware watchpoints
This commit is contained in:
committed by
Michael Brown
parent
6e670b5f38
commit
19386ec2c8
@@ -10,6 +10,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
typedef uint32_t gdbreg_t;
|
||||
|
||||
/* The register snapshot, this must be in sync with interrupt handler and the
|
||||
@@ -35,6 +37,15 @@ enum {
|
||||
GDBMACH_SIZEOF_REGS = GDBMACH_NREGS * sizeof ( gdbreg_t )
|
||||
};
|
||||
|
||||
/* Breakpoint types */
|
||||
enum {
|
||||
GDBMACH_BPMEM,
|
||||
GDBMACH_BPHW,
|
||||
GDBMACH_WATCH,
|
||||
GDBMACH_RWATCH,
|
||||
GDBMACH_AWATCH,
|
||||
};
|
||||
|
||||
static inline void gdbmach_set_pc ( gdbreg_t *regs, gdbreg_t pc ) {
|
||||
regs [ GDBMACH_EIP ] = pc;
|
||||
}
|
||||
@@ -48,4 +59,6 @@ static inline void gdbmach_breakpoint ( void ) {
|
||||
__asm__ __volatile__ ( "int $3\n" );
|
||||
}
|
||||
|
||||
extern int gdbmach_set_breakpoint ( int type, unsigned long addr, size_t len, int enable );
|
||||
|
||||
#endif /* GDBMACH_H */
|
||||
|
||||
Reference in New Issue
Block a user