From c11d01f58c2a77cbed7a38ed8970e0435a2c63d6 Mon Sep 17 00:00:00 2001 From: pjd Date: Tue, 27 Dec 2005 23:23:47 +0000 Subject: [PATCH] Fix watch address truncation. The address was truncated when it was passed to amd64_set_watch() as 'unsigned int' and 'unsigned int' is 32bit long on amd64. Even with that fix hardware watchpoint don't work for me on amd64, ie. when I set the watchpoint and write a byte there, nothing happens. --- sys/amd64/amd64/db_trace.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/amd64/amd64/db_trace.c b/sys/amd64/amd64/db_trace.c index 274d56fec6bc..ffbba83c959c 100644 --- a/sys/amd64/amd64/db_trace.c +++ b/sys/amd64/amd64/db_trace.c @@ -199,8 +199,8 @@ static void db_print_stack_entry(const char *, int, char **, long *, db_addr_t); static void decode_syscall(int, struct thread *); static char * watchtype_str(int type); -int amd64_set_watch(int watchnum, unsigned int watchaddr, int size, int access, - struct dbreg * d); +int amd64_set_watch(int watchnum, unsigned long watchaddr, int size, + int access, struct dbreg * d); int amd64_clr_watch(int watchnum, struct dbreg * d); /* @@ -526,7 +526,7 @@ stack_save(struct stack *st) int amd64_set_watch(watchnum, watchaddr, size, access, d) int watchnum; - unsigned int watchaddr; + unsigned long watchaddr; int size; int access; struct dbreg * d;