summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2005-12-27 23:23:47 +0000
committerpjd <pjd@FreeBSD.org>2005-12-27 23:23:47 +0000
commitc11d01f58c2a77cbed7a38ed8970e0435a2c63d6 (patch)
tree6ae8fffb956221ee2e06486107188f57daf8f680 /sys
parent5e136009538a36ec42653740d9d983fac13a97ac (diff)
downloadFreeBSD-src-c11d01f58c2a77cbed7a38ed8970e0435a2c63d6.zip
FreeBSD-src-c11d01f58c2a77cbed7a38ed8970e0435a2c63d6.tar.gz
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.
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/amd64/db_trace.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/amd64/amd64/db_trace.c b/sys/amd64/amd64/db_trace.c
index 274d56f..ffbba83 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;
OpenPOWER on IntegriCloud