diff options
author | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2021-07-11 12:21:53 +0000 |
---|---|---|
committer | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2021-07-11 12:21:53 +0000 |
commit | ef1e553c0844490a07cb2339e2c9cea1309d54e2 (patch) | |
tree | 80074a6bbb52fab79ec01a9f8936f0c3a0ed4113 /sys/arch | |
parent | c1b60bd59d883aa299ce9e2c20639502e1189280 (diff) |
convert db_addr_t to vaddr_t
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/riscv64/include/db_machdep.h | 6 | ||||
-rw-r--r-- | sys/arch/riscv64/riscv64/db_interface.c | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/sys/arch/riscv64/include/db_machdep.h b/sys/arch/riscv64/include/db_machdep.h index 03aabfbd09f..426d5ea2724 100644 --- a/sys/arch/riscv64/include/db_machdep.h +++ b/sys/arch/riscv64/include/db_machdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_machdep.h,v 1.3 2021/05/12 01:20:52 jsg Exp $ */ +/* $OpenBSD: db_machdep.h,v 1.4 2021/07/11 12:21:52 jasper Exp $ */ /* * Copyright (c) 2019 Brian Bamsch <bbamsch@google.com> @@ -57,7 +57,7 @@ typedef trapframe_t db_regs_t; extern db_regs_t ddb_regs; #define DDB_REGS (&ddb_regs) -#define PC_REGS(regs) ((db_addr_t)(regs)->tf_ra) +#define PC_REGS(regs) ((vaddr_t)(regs)->tf_ra) #define SET_PC_REGS(regs, value) (regs)->tf_ra = (register_t)(value) #define BKPT_INST (KERNEL_BREAKPOINT) @@ -81,7 +81,7 @@ extern db_regs_t ddb_regs; int db_trapper(vaddr_t, u_int, trapframe_t *, int); void db_machine_init (void); -db_addr_t db_branch_taken(u_int inst, db_addr_t pc, db_regs_t *regs); +vaddr_t db_branch_taken(u_int inst, vaddr_t pc, db_regs_t *regs); #define branch_taken(ins, pc, fun, regs) \ db_branch_taken((ins), (pc), (regs)) diff --git a/sys/arch/riscv64/riscv64/db_interface.c b/sys/arch/riscv64/riscv64/db_interface.c index 508c15f84ae..d5f880b74b5 100644 --- a/sys/arch/riscv64/riscv64/db_interface.c +++ b/sys/arch/riscv64/riscv64/db_interface.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_interface.c,v 1.5 2021/07/10 18:46:39 jasper Exp $ */ +/* $OpenBSD: db_interface.c,v 1.6 2021/07/11 12:21:52 jasper Exp $ */ /* * Copyright (c) 1996 Scott K. Stevens @@ -179,7 +179,7 @@ db_validate_address(vaddr_t addr) * Read bytes from kernel address space for debugger. */ void -db_read_bytes(db_addr_t addr, size_t size, char *data) +db_read_bytes(vaddr_t addr, size_t size, char *data) { char *src = (char *)addr; @@ -217,7 +217,7 @@ db_read_bytes(db_addr_t addr, size_t size, char *data) * Write bytes to kernel address space for debugger. */ void -db_write_bytes(db_addr_t addr, size_t size, char *data) +db_write_bytes(vaddr_t addr, size_t size, char *data) { // XXX } @@ -457,8 +457,8 @@ db_machine_init(void) #endif } -db_addr_t -db_branch_taken(u_int insn, db_addr_t pc, db_regs_t *db_regs) +vaddr_t +db_branch_taken(u_int insn, vaddr_t pc, db_regs_t *db_regs) { // XXX return pc + 4; |