Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Numeric modifiers conflict with the syntax interpretation of...
details: https://anonhg.NetBSD.org/src/rev/0b15ddc4c698
branches: trunk
changeset: 953497:0b15ddc4c698
user: ryo <ryo%NetBSD.org@localhost>
date: Thu Mar 11 10:34:34 2021 +0000
description:
Numeric modifiers conflict with the syntax interpretation of ddb, so use 'b', 'w', 'l', 'q' instead.
Also, change load/store('l','s') to 'r','w' like the other arch.
>db{0}> machine watch/1 hostname
>Bad modifier
>db{0}> machine watch/s1 hostname
>add watchpoint 0 as ffffc00001087848
diffstat:
share/man/man4/ddb.4 | 34 ++++++++++++++--------------------
sys/arch/aarch64/aarch64/db_machdep.c | 33 ++++++++++++++++++---------------
2 files changed, 32 insertions(+), 35 deletions(-)
diffs (130 lines):
diff -r 3e54ccb3b6c0 -r 0b15ddc4c698 share/man/man4/ddb.4
--- a/share/man/man4/ddb.4 Thu Mar 11 10:33:36 2021 +0000
+++ b/share/man/man4/ddb.4 Thu Mar 11 10:34:34 2021 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: ddb.4,v 1.198 2021/02/19 08:57:56 msaitoh Exp $
+.\" $NetBSD: ddb.4,v 1.199 2021/03/11 10:34:34 ryo Exp $
.\"
.\" Copyright (c) 1997 - 2019 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -56,7 +56,7 @@
.\" any improvements or extensions that they make and grant Carnegie Mellon
.\" the rights to redistribute these changes.
.\"
-.Dd February 19, 2021
+.Dd March 11, 2021
.Dt DDB 4
.Os
.Sh NAME
@@ -1017,6 +1017,8 @@
Some of these commands are:
.Ss AARCH64
.Bl -tag -width "traptrace" -compact
+.It Ic break
+Set or clear a hardware breakpoint.
.It Ic cpu
Switch to another CPU.
.It Ic cpuinfo
@@ -1035,26 +1037,18 @@
Set or clear a hardware watchpoint.
Pass the address to be watched, or watchpoint number to clear the watchpoint.
Optional modifiers are
-.Dq l
-for load access,
-.Dq s
-for store access,
-.Dq 1
+.Dq r
+for read access,
+.Dq w
+for write access (default: trap on read or write access),
+.Dq b
for 8 bit width,
-.Dq 2
+.Dq h
for 16 bit,
-.Dq 3
-for 24 bit,
-.Dq 4
-for 32 bit,
-.Dq 5
-for 40 bit,
-.Dq 6
-for 48 bit,
-.Dq 7
-for 56 bit,
-.Dq 8
-for 64 bit.
+.Dq l
+for 32 bit or,
+.Dq q
+for 64 bit (default: 32 bit).
.El
.Ss ALPHA
.Bl -tag -width "traptrace" -compact
diff -r 3e54ccb3b6c0 -r 0b15ddc4c698 sys/arch/aarch64/aarch64/db_machdep.c
--- a/sys/arch/aarch64/aarch64/db_machdep.c Thu Mar 11 10:33:36 2021 +0000
+++ b/sys/arch/aarch64/aarch64/db_machdep.c Thu Mar 11 10:34:34 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_machdep.c,v 1.38 2021/03/11 09:48:40 ryo Exp $ */
+/* $NetBSD: db_machdep.c,v 1.39 2021/03/11 10:34:34 ryo Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.38 2021/03/11 09:48:40 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.39 2021/03/11 10:34:34 ryo Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd32.h"
@@ -179,10 +179,11 @@
DDB_ADD_CMD(
"watch", db_md_watch_cmd, 0,
"set or clear watchpoint",
- "[/12345678] [address|#]",
+ "[/rwbhlq] [address|#]",
"\taddress: watchpoint address to set\n"
- "\t#: watchpoint number to remove"
- "\t/1..8: size of data\n")
+ "\t#: watchpoint number to remove\n"
+ "\t/rw: read or write access\n"
+ "\t/bhlq: size of access\n")
},
{
DDB_ADD_CMD(
@@ -978,20 +979,22 @@
ch = *modif;
switch (ch) {
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- watchsize = ch - '0';
+ case 'b':
+ watchsize = 1;
+ break;
+ case 'h':
+ watchsize = 2;
break;
case 'l':
+ watchsize = 4;
+ break;
+ case 'q':
+ watchsize = 8;
+ break;
+ case 'r':
accesstype |= WATCHPOINT_ACCESS_LOAD;
break;
- case 's':
+ case 'w':
accesstype |= WATCHPOINT_ACCESS_STORE;
break;
}
Home |
Main Index |
Thread Index |
Old Index