summaryrefslogtreecommitdiffstats
path: root/sys/alpha/include
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>1998-06-28 01:00:27 +0000
committerdfr <dfr@FreeBSD.org>1998-06-28 01:00:27 +0000
commit40ca608c7a947e4c5eb6799a4054bb74e2311bb8 (patch)
tree86d6b01a120793ebcf13173e88fb58149cf1bc4c /sys/alpha/include
parent54c71cf68a96f481226bbf1df5b4261073859a7d (diff)
downloadFreeBSD-src-40ca608c7a947e4c5eb6799a4054bb74e2311bb8.zip
FreeBSD-src-40ca608c7a947e4c5eb6799a4054bb74e2311bb8.tar.gz
Make breakpoints and single-step work.
Diffstat (limited to 'sys/alpha/include')
-rw-r--r--sys/alpha/include/db_machdep.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/sys/alpha/include/db_machdep.h b/sys/alpha/include/db_machdep.h
index 3aa84d3..a8c6b1f 100644
--- a/sys/alpha/include/db_machdep.h
+++ b/sys/alpha/include/db_machdep.h
@@ -34,10 +34,14 @@
* Machine-dependent defines for new kernel debugger.
*/
+#include "opt_simos.h"
+
#include <sys/param.h>
#include <vm/vm.h>
#include <machine/frame.h>
+#define DB_NO_AOUT
+
typedef vm_offset_t db_addr_t; /* address - unsigned */
typedef long db_expr_t; /* expression - signed */
@@ -47,18 +51,25 @@ db_regs_t ddb_regs; /* register state */
#define PC_REGS(regs) ((db_addr_t)(regs)->tf_regs[FRAME_PC])
+#ifdef SIMOS
+#define BKPT_INST 0x000000aa /* gentrap instruction */
+#else
#define BKPT_INST 0x00000080 /* breakpoint instruction */
+#endif
#define BKPT_SIZE (4) /* size of breakpoint inst */
#define BKPT_SET(inst) (BKPT_INST)
-#if 0
#define FIXUP_PC_AFTER_BREAK \
- (ddb_regs.tf_regs[FRAME_PC] -= BKPT_SIZE)
-#endif
+ (ddb_regs.tf_regs[FRAME_PC] -= BKPT_SIZE);
#define SOFTWARE_SSTEP 1 /* no hardware support */
+#ifdef SIMOS
+#define IS_BREAKPOINT_TRAP(type, code) ((type) == ALPHA_KENTRY_IF && \
+ (code) == ALPHA_IF_CODE_GENTRAP)
+#else
#define IS_BREAKPOINT_TRAP(type, code) ((type) == ALPHA_KENTRY_IF && \
(code) == ALPHA_IF_CODE_BPT)
+#endif
#define IS_WATCHPOINT_TRAP(type, code) 0
/*
@@ -106,7 +117,6 @@ int ddb_trap __P((unsigned long, unsigned long, unsigned long,
/*
* We use Elf64 symbols in DDB.
*/
-#define DB_ELF_SYMBOLS
#define DB_ELFSIZE 64
#endif /* _ALPHA_DB_MACHDEP_H_ */
OpenPOWER on IntegriCloud