diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2019-11-07 13:16:26 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2019-11-07 13:16:26 +0000 |
commit | 645d3174e61b85e4233587c144dc8fa18b1d5325 (patch) | |
tree | c8afd551bbfe8664b8dc57fc99d15f705789653d | |
parent | bc59e83ea236ae7cdb60e573c1c20ba2d4c6f094 (diff) |
db_addr_t -> vaddr_t
ok deraadt@
-rw-r--r-- | sys/ddb/db_access.c | 6 | ||||
-rw-r--r-- | sys/ddb/db_access.h | 12 | ||||
-rw-r--r-- | sys/ddb/db_break.c | 18 | ||||
-rw-r--r-- | sys/ddb/db_break.h | 8 | ||||
-rw-r--r-- | sys/ddb/db_command.c | 18 | ||||
-rw-r--r-- | sys/ddb/db_command.h | 4 | ||||
-rw-r--r-- | sys/ddb/db_ctf.c | 6 | ||||
-rw-r--r-- | sys/ddb/db_elf.c | 5 | ||||
-rw-r--r-- | sys/ddb/db_examine.c | 22 | ||||
-rw-r--r-- | sys/ddb/db_expr.c | 4 | ||||
-rw-r--r-- | sys/ddb/db_extern.h | 4 | ||||
-rw-r--r-- | sys/ddb/db_interface.h | 4 | ||||
-rw-r--r-- | sys/ddb/db_run.c | 10 | ||||
-rw-r--r-- | sys/ddb/db_sym.c | 4 | ||||
-rw-r--r-- | sys/ddb/db_sym.h | 4 | ||||
-rw-r--r-- | sys/ddb/db_watch.c | 6 | ||||
-rw-r--r-- | sys/ddb/db_watch.h | 10 |
17 files changed, 72 insertions, 73 deletions
diff --git a/sys/ddb/db_access.c b/sys/ddb/db_access.c index 225aece430c..03d7b519374 100644 --- a/sys/ddb/db_access.c +++ b/sys/ddb/db_access.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_access.c,v 1.15 2016/04/19 10:24:42 mpi Exp $ */ +/* $OpenBSD: db_access.c,v 1.16 2019/11/07 13:16:25 mpi Exp $ */ /* $NetBSD: db_access.c,v 1.8 1994/10/09 08:37:35 mycroft Exp $ */ /* @@ -42,7 +42,7 @@ * boundaries. */ db_expr_t -db_get_value(db_addr_t addr, size_t size, int is_signed) +db_get_value(vaddr_t addr, size_t size, int is_signed) { char data[sizeof(db_expr_t)]; db_expr_t value, extend; @@ -70,7 +70,7 @@ db_get_value(db_addr_t addr, size_t size, int is_signed) } void -db_put_value(db_addr_t addr, size_t size, db_expr_t value) +db_put_value(vaddr_t addr, size_t size, db_expr_t value) { char data[sizeof(db_expr_t)]; int i; diff --git a/sys/ddb/db_access.h b/sys/ddb/db_access.h index 4da22dc9317..fc57b75b3b7 100644 --- a/sys/ddb/db_access.h +++ b/sys/ddb/db_access.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_access.h,v 1.9 2018/05/07 15:52:46 visa Exp $ */ +/* $OpenBSD: db_access.h,v 1.10 2019/11/07 13:16:25 mpi Exp $ */ /* $NetBSD: db_access.h,v 1.6 1994/10/09 08:29:57 mycroft Exp $ */ /* @@ -33,17 +33,17 @@ /* * Data access functions for debugger. */ -db_expr_t db_get_value(db_addr_t, size_t, int); -void db_put_value(db_addr_t, size_t, db_expr_t); +db_expr_t db_get_value(vaddr_t, size_t, int); +void db_put_value(vaddr_t, size_t, db_expr_t); -void db_read_bytes(db_addr_t, size_t, char *); -void db_write_bytes(db_addr_t, size_t, char *); +void db_read_bytes(vaddr_t, size_t, char *); +void db_write_bytes(vaddr_t, size_t, char *); #define DB_STACK_TRACE_MAX 19 struct db_stack_trace { unsigned int st_count; - db_addr_t st_pc[DB_STACK_TRACE_MAX]; + vaddr_t st_pc[DB_STACK_TRACE_MAX]; }; void db_print_stack_trace(struct db_stack_trace *, int (*)(const char *, ...)); diff --git a/sys/ddb/db_break.c b/sys/ddb/db_break.c index f33fab11778..13eaaedb94d 100644 --- a/sys/ddb/db_break.c +++ b/sys/ddb/db_break.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_break.c,v 1.20 2016/04/19 12:23:25 mpi Exp $ */ +/* $OpenBSD: db_break.c,v 1.21 2019/11/07 13:16:25 mpi Exp $ */ /* $NetBSD: db_break.c,v 1.7 1996/03/30 22:30:03 christos Exp $ */ /* @@ -51,8 +51,8 @@ db_breakpoint_t db_breakpoint_list = 0; db_breakpoint_t db_breakpoint_alloc(void); void db_breakpoint_free(db_breakpoint_t); -void db_set_breakpoint(db_addr_t, int); -void db_delete_breakpoint(db_addr_t); +void db_set_breakpoint(vaddr_t, int); +void db_delete_breakpoint(vaddr_t); void db_list_breakpoints(void); db_breakpoint_t @@ -82,7 +82,7 @@ db_breakpoint_free(db_breakpoint_t bkpt) } void -db_set_breakpoint(db_addr_t addr, int count) +db_set_breakpoint(vaddr_t addr, int count) { db_breakpoint_t bkpt; @@ -114,7 +114,7 @@ db_set_breakpoint(db_addr_t addr, int count) } void -db_delete_breakpoint(db_addr_t addr) +db_delete_breakpoint(vaddr_t addr) { db_breakpoint_t bkpt; db_breakpoint_t *prev; @@ -135,7 +135,7 @@ db_delete_breakpoint(db_addr_t addr) } db_breakpoint_t -db_find_breakpoint(db_addr_t addr) +db_find_breakpoint(vaddr_t addr) { db_breakpoint_t bkpt; @@ -182,7 +182,7 @@ db_clear_breakpoints(void) * so the breakpoint does not have to be on the breakpoint list. */ db_breakpoint_t -db_set_temp_breakpoint(db_addr_t addr) +db_set_temp_breakpoint(vaddr_t addr) { db_breakpoint_t bkpt; @@ -242,7 +242,7 @@ db_list_breakpoints(void) void db_delete_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif) { - db_delete_breakpoint((db_addr_t)addr); + db_delete_breakpoint((vaddr_t)addr); } /* Set breakpoint with skip count */ @@ -253,7 +253,7 @@ db_breakpoint_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif) if (count == -1) count = 1; - db_set_breakpoint((db_addr_t)addr, count); + db_set_breakpoint((vaddr_t)addr, count); } /* list breakpoints */ diff --git a/sys/ddb/db_break.h b/sys/ddb/db_break.h index 1c44a7f6093..00d702b337b 100644 --- a/sys/ddb/db_break.h +++ b/sys/ddb/db_break.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_break.h,v 1.11 2016/04/19 12:23:25 mpi Exp $ */ +/* $OpenBSD: db_break.h,v 1.12 2019/11/07 13:16:25 mpi Exp $ */ /* $NetBSD: db_break.h,v 1.8 1996/02/05 01:56:52 christos Exp $ */ /* @@ -39,7 +39,7 @@ * Breakpoints. */ typedef struct db_breakpoint { - db_addr_t address; /* set here */ + vaddr_t address; /* set here */ int init_count; /* number of times to skip bkpt */ int count; /* current count */ int flags; /* flags: */ @@ -49,10 +49,10 @@ typedef struct db_breakpoint { struct db_breakpoint *link; /* link in in-use or free chain */ } *db_breakpoint_t; -db_breakpoint_t db_find_breakpoint(db_addr_t); +db_breakpoint_t db_find_breakpoint(vaddr_t); void db_set_breakpoints(void); void db_clear_breakpoints(void); -db_breakpoint_t db_set_temp_breakpoint(db_addr_t); +db_breakpoint_t db_set_temp_breakpoint(vaddr_t); void db_delete_temp_breakpoint(db_breakpoint_t); void db_delete_cmd(db_expr_t, int, db_expr_t, char *); void db_breakpoint_cmd(db_expr_t, int, db_expr_t, char *); diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c index 98602541be3..7a87ce889ac 100644 --- a/sys/ddb/db_command.c +++ b/sys/ddb/db_command.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_command.c,v 1.87 2019/11/06 07:30:08 mpi Exp $ */ +/* $OpenBSD: db_command.c,v 1.88 2019/11/07 13:16:25 mpi Exp $ */ /* $NetBSD: db_command.c,v 1.20 1996/03/30 22:30:05 christos Exp $ */ /* @@ -71,11 +71,11 @@ label_t *db_recover; */ int db_ed_style = 1; -db_addr_t db_dot; /* current location */ -db_addr_t db_last_addr; /* last explicit address typed */ -db_addr_t db_prev; /* last address examined +vaddr_t db_dot; /* current location */ +vaddr_t db_last_addr; /* last explicit address typed */ +vaddr_t db_prev; /* last address examined or written */ -db_addr_t db_next; /* next address to be examined +vaddr_t db_next; /* next address to be examined or written */ int db_cmd_search(char *, struct db_command *, struct db_command **); @@ -269,7 +269,7 @@ db_command(struct db_command **last_cmdp, struct db_command *cmd_table) } if (db_expression(&addr)) { - db_dot = (db_addr_t) addr; + db_dot = (vaddr_t) addr; db_last_addr = db_dot; have_addr = 1; } @@ -858,7 +858,7 @@ db_show_regs(db_expr_t addr, int have_addr, db_expr_t count, char *modif) db_read_variable(regp, &value); db_printf("%-12s%s", regp->name, db_format(tmpfmt, sizeof tmpfmt, (long)value, DB_FORMAT_N, 1, sizeof(long) * 3)); - db_find_xtrn_sym_and_offset((db_addr_t)value, &name, &offset); + db_find_xtrn_sym_and_offset((vaddr_t)value, &name, &offset); if (name != 0 && offset <= db_maxoff && offset != value) { db_printf("\t%s", name); if (offset != 0) @@ -877,13 +877,13 @@ db_show_regs(db_expr_t addr, int have_addr, db_expr_t count, char *modif) void db_write_cmd(db_expr_t address, int have_addr, db_expr_t count, char *modif) { - db_addr_t addr; + vaddr_t addr; db_expr_t old_value; db_expr_t new_value; int size, wrote_one = 0; char tmpfmt[28]; - addr = (db_addr_t) address; + addr = (vaddr_t) address; switch (modif[0]) { case 'b': diff --git a/sys/ddb/db_command.h b/sys/ddb/db_command.h index b2785f189f6..45800424d35 100644 --- a/sys/ddb/db_command.h +++ b/sys/ddb/db_command.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_command.h,v 1.32 2016/04/19 12:23:25 mpi Exp $ */ +/* $OpenBSD: db_command.h,v 1.33 2019/11/07 13:16:25 mpi Exp $ */ /* $NetBSD: db_command.h,v 1.8 1996/02/05 01:56:55 christos Exp $ */ /* @@ -41,7 +41,7 @@ void db_command_loop(void); void db_command(struct db_command **, struct db_command *); void db_machine_commands_install(struct db_command *); -extern db_addr_t db_dot, db_last_addr, db_prev, db_next; +extern vaddr_t db_dot, db_last_addr, db_prev, db_next; /* * Command table diff --git a/sys/ddb/db_ctf.c b/sys/ddb/db_ctf.c index 0f76b361407..87253bb8fa6 100644 --- a/sys/ddb/db_ctf.c +++ b/sys/ddb/db_ctf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_ctf.c,v 1.27 2018/08/31 11:57:04 bluhm Exp $ */ +/* $OpenBSD: db_ctf.c,v 1.28 2019/11/07 13:16:25 mpi Exp $ */ /* * Copyright (c) 2016-2017 Martin Pieuchot @@ -343,7 +343,7 @@ db_ctf_type_by_index(uint16_t index) void db_ctf_pprint(const struct ctf_type *ctt, vaddr_t addr) { - db_addr_t taddr = (db_addr_t)ctt; + vaddr_t taddr = (vaddr_t)ctt; const struct ctf_type *ref; uint16_t kind; uint32_t eob, toff; @@ -635,7 +635,7 @@ db_ctf_show_struct(db_expr_t addr, int have_addr, db_expr_t count, * In that case, update `dot' value. */ if (db_expression(&addr)) { - db_dot = (db_addr_t)addr; + db_dot = (vaddr_t)addr; db_last_addr = db_dot; } else addr = (db_expr_t)db_dot; diff --git a/sys/ddb/db_elf.c b/sys/ddb/db_elf.c index 3d463d7c3d4..df3be008eb4 100644 --- a/sys/ddb/db_elf.c +++ b/sys/ddb/db_elf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_elf.c,v 1.28 2017/09/08 05:36:52 deraadt Exp $ */ +/* $OpenBSD: db_elf.c,v 1.29 2019/11/07 13:16:25 mpi Exp $ */ /* $NetBSD: db_elf.c,v 1.13 2000/07/07 21:55:18 jhawk Exp $ */ /*- @@ -263,8 +263,7 @@ db_elf_sym_lookup(char *symstr) * provided threshold). */ Elf_Sym * -db_elf_sym_search(db_addr_t off, db_strategy_t strategy, - db_expr_t *diffp) +db_elf_sym_search(vaddr_t off, db_strategy_t strategy, db_expr_t *diffp) { db_symtab_t *stab = &db_symtab; Elf_Sym *rsymp, *symp, *symtab_start, *symtab_end; diff --git a/sys/ddb/db_examine.c b/sys/ddb/db_examine.c index 62e3843d637..12bcb29546e 100644 --- a/sys/ddb/db_examine.c +++ b/sys/ddb/db_examine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_examine.c,v 1.25 2019/11/06 07:30:08 mpi Exp $ */ +/* $OpenBSD: db_examine.c,v 1.26 2019/11/07 13:16:25 mpi Exp $ */ /* $NetBSD: db_examine.c,v 1.11 1996/03/30 22:30:07 christos Exp $ */ /* @@ -45,8 +45,8 @@ char db_examine_format[TOK_STRING_SIZE] = "x"; -void db_examine(db_addr_t, char *, int); -void db_search(db_addr_t, int, db_expr_t, db_expr_t, db_expr_t); +void db_examine(vaddr_t, char *, int); +void db_search(vaddr_t, int, db_expr_t, db_expr_t, db_expr_t); /* * Examine (print) data. Syntax is: @@ -66,11 +66,11 @@ db_examine_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif) if (count == -1) count = 1; - db_examine((db_addr_t)addr, db_examine_format, count); + db_examine((vaddr_t)addr, db_examine_format, count); } void -db_examine(db_addr_t addr, char *fmt, int count) +db_examine(vaddr_t addr, char *fmt, int count) { int i, c; db_expr_t value; @@ -78,7 +78,7 @@ db_examine(db_addr_t addr, char *fmt, int count) int width; int bytes; char * fp; - db_addr_t incr; + vaddr_t incr; int dis; char tmpfmt[28]; @@ -251,7 +251,7 @@ db_print_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif) switch (db_print_format) { case 'a': - db_printsym((db_addr_t)addr, DB_STGY_ANY, db_printf); + db_printsym((vaddr_t)addr, DB_STGY_ANY, db_printf); break; case 'r': db_printf("%s", db_format(tmpfmt, sizeof tmpfmt, addr, @@ -285,7 +285,7 @@ db_print_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif) } void -db_print_loc_and_inst(db_addr_t loc) +db_print_loc_and_inst(vaddr_t loc) { db_printsym(loc, DB_STGY_PROC, db_printf); db_printf(":\t"); @@ -328,7 +328,7 @@ void db_search_cmd(db_expr_t daddr, int have_addr, db_expr_t dcount, char *modif) { int t; - db_addr_t addr; + vaddr_t addr; int size; db_expr_t value; db_expr_t mask; @@ -362,7 +362,7 @@ db_search_cmd(db_expr_t daddr, int have_addr, db_expr_t dcount, char *modif) db_flush_lex(); return; } - addr = (db_addr_t) value; + addr = (vaddr_t) value; if (!db_expression(&value)) { db_printf("Value missing\n"); @@ -390,7 +390,7 @@ db_search_cmd(db_expr_t daddr, int have_addr, db_expr_t dcount, char *modif) } void -db_search(db_addr_t addr, int size, db_expr_t value, db_expr_t mask, +db_search(vaddr_t addr, int size, db_expr_t value, db_expr_t mask, db_expr_t count) { /* Negative counts means forever. */ diff --git a/sys/ddb/db_expr.c b/sys/ddb/db_expr.c index c491d8083ea..820b91b022c 100644 --- a/sys/ddb/db_expr.c +++ b/sys/ddb/db_expr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_expr.c,v 1.16 2019/11/07 10:51:46 mpi Exp $ */ +/* $OpenBSD: db_expr.c,v 1.17 2019/11/07 13:16:25 mpi Exp $ */ /* $NetBSD: db_expr.c,v 1.5 1996/02/05 01:56:58 christos Exp $ */ /* @@ -121,7 +121,7 @@ db_unary(db_expr_t *valuep) db_error("Syntax error\n"); /*NOTREACHED*/ } - *valuep = db_get_value((db_addr_t)*valuep, sizeof(db_addr_t), 0); + *valuep = db_get_value((vaddr_t)*valuep, sizeof(vaddr_t), 0); return 1; } db_unread_token(t); diff --git a/sys/ddb/db_extern.h b/sys/ddb/db_extern.h index e31239de457..20b8a3bcecd 100644 --- a/sys/ddb/db_extern.h +++ b/sys/ddb/db_extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_extern.h,v 1.20 2019/11/06 07:30:08 mpi Exp $ */ +/* $OpenBSD: db_extern.h,v 1.21 2019/11/07 13:16:25 mpi Exp $ */ /* $NetBSD: db_extern.h,v 1.1 1996/02/05 01:57:00 christos Exp $ */ /* @@ -39,7 +39,7 @@ void ddb_init(void); void db_examine_cmd(db_expr_t, int, db_expr_t, char *); void db_print_cmd(db_expr_t, int, db_expr_t, char *); void db_search_cmd(db_expr_t, int, db_expr_t, char *); -void db_print_loc_and_inst(db_addr_t); +void db_print_loc_and_inst(vaddr_t); size_t db_strlcpy(char *, const char *, size_t); /* db_expr.c */ diff --git a/sys/ddb/db_interface.h b/sys/ddb/db_interface.h index f4d935d8495..d290d35d813 100644 --- a/sys/ddb/db_interface.h +++ b/sys/ddb/db_interface.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_interface.h,v 1.21 2019/11/06 07:30:08 mpi Exp $ */ +/* $OpenBSD: db_interface.h,v 1.22 2019/11/07 13:16:25 mpi Exp $ */ /* $NetBSD: db_interface.h,v 1.1 1996/02/05 01:57:03 christos Exp $ */ /* @@ -37,7 +37,7 @@ void db_stack_trace_print(db_expr_t, int, db_expr_t, char *, int (*)(const char *, ...)); /* arch/<arch>/<arch>/db_disasm.c */ -db_addr_t db_disasm(db_addr_t, int); +vaddr_t db_disasm(vaddr_t, int); /* kern/kern_proc.c */ void db_kill_cmd(db_expr_t, int, db_expr_t, char *); diff --git a/sys/ddb/db_run.c b/sys/ddb/db_run.c index c53fb53ba81..0d546ed5c20 100644 --- a/sys/ddb/db_run.c +++ b/sys/ddb/db_run.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_run.c,v 1.28 2019/11/06 07:30:08 mpi Exp $ */ +/* $OpenBSD: db_run.c,v 1.29 2019/11/07 13:16:25 mpi Exp $ */ /* $NetBSD: db_run.c,v 1.8 1996/02/05 01:57:12 christos Exp $ */ /* @@ -70,7 +70,7 @@ int db_call_depth; int db_stop_at_pc(db_regs_t *regs, int *is_breakpoint) { - db_addr_t pc, old_pc; + vaddr_t pc, old_pc; db_breakpoint_t bkpt; db_clear_breakpoints(); @@ -176,7 +176,7 @@ db_stop_at_pc(db_regs_t *regs, int *is_breakpoint) void db_restart_at_pc(db_regs_t *regs, int watchpt) { - db_addr_t pc = PC_REGS(regs); + vaddr_t pc = PC_REGS(regs); if ((db_run_mode == STEP_COUNT) || (db_run_mode == STEP_RETURN) || (db_run_mode == STEP_CALLT)) { @@ -329,9 +329,9 @@ db_continue_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif) void db_set_single_step(db_regs_t *regs) { - db_addr_t pc = PC_REGS(regs); + vaddr_t pc = PC_REGS(regs); #ifndef SOFTWARE_SSTEP_EMUL - db_addr_t brpc; + vaddr_t brpc; u_int inst; /* diff --git a/sys/ddb/db_sym.c b/sys/ddb/db_sym.c index fb0755140a0..00d363f5b7f 100644 --- a/sys/ddb/db_sym.c +++ b/sys/ddb/db_sym.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_sym.c,v 1.53 2017/05/30 15:39:05 mpi Exp $ */ +/* $OpenBSD: db_sym.c,v 1.54 2019/11/07 13:16:25 mpi Exp $ */ /* $NetBSD: db_sym.c,v 1.24 2000/08/11 22:50:47 tv Exp $ */ /* @@ -96,7 +96,7 @@ db_eqname(char *src, char *dst, int c) * and the difference between val and the symbol found. */ Elf_Sym * -db_search_symbol(db_addr_t val, db_strategy_t strategy, db_expr_t *offp) +db_search_symbol(vaddr_t val, db_strategy_t strategy, db_expr_t *offp) { unsigned int diff; db_expr_t newdiff; diff --git a/sys/ddb/db_sym.h b/sys/ddb/db_sym.h index f9b1899c360..fe1aff6d6af 100644 --- a/sys/ddb/db_sym.h +++ b/sys/ddb/db_sym.h @@ -68,7 +68,7 @@ int db_eqname(char *, char *, int); Elf_Sym * db_symbol_by_name(char *, db_expr_t *); /* find symbol value given name */ -Elf_Sym * db_search_symbol(db_addr_t, db_strategy_t, db_expr_t *); +Elf_Sym * db_search_symbol(vaddr_t, db_strategy_t, db_expr_t *); /* find symbol given value */ void db_symbol_values(Elf_Sym *, char **, db_expr_t *); @@ -86,7 +86,7 @@ void db_printsym(db_expr_t, db_strategy_t, int (*)(const char *, ...)); /* print closest symbol to a value */ int db_elf_sym_init(int, void *, void *, const char *); -Elf_Sym * db_elf_sym_search(db_addr_t, db_strategy_t, db_expr_t *); +Elf_Sym * db_elf_sym_search(vaddr_t, db_strategy_t, db_expr_t *); int db_elf_line_at_pc(Elf_Sym *, char **, int *, db_expr_t); void db_elf_sym_forall(db_forall_func_t db_forall_func, void *); diff --git a/sys/ddb/db_watch.c b/sys/ddb/db_watch.c index 84c6d9dccab..ee63fd166d5 100644 --- a/sys/ddb/db_watch.c +++ b/sys/ddb/db_watch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_watch.c,v 1.16 2016/04/19 10:24:42 mpi Exp $ */ +/* $OpenBSD: db_watch.c,v 1.17 2019/11/07 13:16:25 mpi Exp $ */ /* $NetBSD: db_watch.c,v 1.9 1996/03/30 22:30:12 christos Exp $ */ /* @@ -83,7 +83,7 @@ db_watchpoint_free(db_watchpoint_t watch) } void -db_set_watchpoint(db_addr_t addr, vsize_t size) +db_set_watchpoint(vaddr_t addr, vsize_t size) { db_watchpoint_t watch; @@ -113,7 +113,7 @@ db_set_watchpoint(db_addr_t addr, vsize_t size) } void -db_delete_watchpoint(db_addr_t addr) +db_delete_watchpoint(vaddr_t addr) { db_watchpoint_t watch; db_watchpoint_t *prev; diff --git a/sys/ddb/db_watch.h b/sys/ddb/db_watch.h index 850aa9aec93..af1362f0fc9 100644 --- a/sys/ddb/db_watch.h +++ b/sys/ddb/db_watch.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_watch.h,v 1.10 2016/01/25 14:30:30 mpi Exp $ */ +/* $OpenBSD: db_watch.h,v 1.11 2019/11/07 13:16:25 mpi Exp $ */ /* $NetBSD: db_watch.h,v 1.9 1996/02/05 01:57:24 christos Exp $ */ /* @@ -37,15 +37,15 @@ * Watchpoint. */ typedef struct db_watchpoint { - db_addr_t loaddr; /* from this address */ - db_addr_t hiaddr; /* to this address */ + vaddr_t loaddr; /* from this address */ + vaddr_t hiaddr; /* to this address */ struct db_watchpoint *link; /* link in in-use or free chain */ } *db_watchpoint_t; db_watchpoint_t db_watchpoint_alloc(void); void db_watchpoint_free(db_watchpoint_t); -void db_set_watchpoint(db_addr_t, vsize_t); -void db_delete_watchpoint(db_addr_t); +void db_set_watchpoint(vaddr_t, vsize_t); +void db_delete_watchpoint(vaddr_t); void db_list_watchpoints(void); void db_deletewatch_cmd(db_expr_t, int, db_expr_t, char *); void db_watchpoint_cmd(db_expr_t, int, db_expr_t, char *); |