summaryrefslogtreecommitdiffstats
path: root/sys/ia64/include/db_machdep.h
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>2001-09-15 11:06:07 +0000
committerdfr <dfr@FreeBSD.org>2001-09-15 11:06:07 +0000
commit01ee11f4089db73bd35056711623d696d285dc94 (patch)
tree436c5cb5980e2a98d7b1f21477fbda20cf5f27ed /sys/ia64/include/db_machdep.h
parent5330a2f5be549ed9795bcd65dfa6b7a02d8e59ee (diff)
downloadFreeBSD-src-01ee11f4089db73bd35056711623d696d285dc94.zip
FreeBSD-src-01ee11f4089db73bd35056711623d696d285dc94.tar.gz
Fill out some gaps in ia64 DDB support. This involves generalising DDB's
breakpoint handling slightly to cope with the fact that ia64 instructions are not located on byte boundaries.
Diffstat (limited to 'sys/ia64/include/db_machdep.h')
-rw-r--r--sys/ia64/include/db_machdep.h25
1 files changed, 18 insertions, 7 deletions
diff --git a/sys/ia64/include/db_machdep.h b/sys/ia64/include/db_machdep.h
index 3ac65d7..c419092 100644
--- a/sys/ia64/include/db_machdep.h
+++ b/sys/ia64/include/db_machdep.h
@@ -41,6 +41,11 @@
#define DB_NO_AOUT
+struct ia64_bundle {
+ u_int64_t slot[3];
+ int template;
+};
+
typedef vm_offset_t db_addr_t; /* address - unsigned */
typedef long db_expr_t; /* expression - signed */
typedef struct trapframe db_regs_t;
@@ -50,16 +55,16 @@ db_regs_t ddb_regs; /* register state */
#define PC_REGS(regs) ((db_addr_t)(regs)->tf_cr_iip \
+ (((regs)->tf_cr_ipsr >> 41) & 3))
-#define BKPT_INST 0x00000080 /* breakpoint instruction */
-#define BKPT_SIZE (4) /* size of breakpoint inst */
-#define BKPT_SET(inst) (BKPT_INST)
+#define BKPT_WRITE(addr, storage) db_write_breakpoint(addr, storage)
+#define BKPT_CLEAR(addr, storage) db_clear_breakpoint(addr, storage)
+#define BKPT_INST_TYPE u_int64_t
-#define FIXUP_PC_AFTER_BREAK
+#define BKPT_SKIP db_skip_breakpoint()
-#define db_clear_single_step(regs) 0
-#define db_set_single_step(regs) 0
+#define db_clear_single_step(regs) ddb_regs.tf_cr_ipsr &= ~IA64_PSR_SS
+#define db_set_single_step(regs) ddb_regs.tf_cr_ipsr |= IA64_PSR_SS
-#define IS_BREAKPOINT_TRAP(type, code) 0
+#define IS_BREAKPOINT_TRAP(type, code) (type == IA64_VEC_BREAK)
#define IS_WATCHPOINT_TRAP(type, code) 0
#define inst_trap_return(ins) 0
@@ -86,6 +91,12 @@ u_int64_t *db_rse_current_frame(void);
u_int64_t *db_rse_previous_frame(u_int64_t *bsp, int sof);
u_int64_t *db_rse_register_address(u_int64_t *bsp, int regno);
+void db_read_bundle(db_addr_t addr, struct ia64_bundle *bp);
+void db_write_bundle(db_addr_t addr, struct ia64_bundle *bp);
+void db_write_breakpoint(db_addr_t addr, u_int64_t *storage);
+void db_clear_breakpoint(db_addr_t addr, u_int64_t *storage);
+void db_skip_breakpoint(void);
+
/*
* Pretty arbitrary
*/
OpenPOWER on IntegriCloud