Diff below make all archs supporting TID filter in ddb(4)'s trace to use
the same modifier.
Historically the '/p' modifier was used to pick a PID, then it changed
to be a TID. Now 'p' doesn't intuitively points to "thread" and because
arm and arm64 already use 't', I picked this letter.
If '/p' is preferred I can do the change the other way.
ok for the unification?
Index: share/man/man4/ddb.4
===================================================================
RCS file: /cvs/src/share/man/man4/ddb.4,v
retrieving revision 1.95
diff -u -p -r1.95 ddb.4
--- share/man/man4/ddb.4 6 Dec 2019 19:15:16 -0000 1.95
+++ share/man/man4/ddb.4 8 May 2020 07:05:38 -0000
@@ -539,19 +539,19 @@ argument.
.\" --------------------
.It Xo
.Ic trace
-.Op Cm /pu
+.Op Cm /tu
.Op Ar frameaddr Ns
.Op Ic \&, Ns Ar count
.Xc
Show the stack trace.
The
-.Cm /p
+.Cm /t
modifier interprets the
.Ar frameaddr
argument as the TID of a process and shows the stack trace of
that process.
The
-.Cm /p
+.Cm /t
modifier is not supported on all platforms.
The
.Cm /u
Index: sys/arch/amd64/amd64/db_trace.c
===================================================================
RCS file: /cvs/src/sys/arch/amd64/amd64/db_trace.c,v
retrieving revision 1.52
diff -u -p -r1.52 db_trace.c
--- sys/arch/amd64/amd64/db_trace.c 18 Apr 2020 04:45:20 -0000 1.52
+++ sys/arch/amd64/amd64/db_trace.c 8 May 2020 07:06:26 -0000
@@ -101,7 +101,7 @@ db_stack_trace_print(db_expr_t addr, int
char c;
while ((c = *cp++) != 0) {
- if (c == 'p')
+ if (c == 't')
trace_proc = 1;
if (c == 'u')
kernel_only = 0;
Index: sys/arch/i386/i386/db_trace.c
===================================================================
RCS file: /cvs/src/sys/arch/i386/i386/db_trace.c,v
retrieving revision 1.41
diff -u -p -r1.41 db_trace.c
--- sys/arch/i386/i386/db_trace.c 18 Apr 2020 04:45:20 -0000 1.41
+++ sys/arch/i386/i386/db_trace.c 8 May 2020 07:06:48 -0000
@@ -120,7 +120,7 @@ db_stack_trace_print(db_expr_t addr, int
char c;
while ((c = *cp++) != 0) {
- if (c == 'p')
+ if (c == 't')
trace_proc = 1;
if (c == 'u')
kernel_only = 0;
Index: sys/arch/powerpc/ddb/db_trace.c
===================================================================
RCS file: /cvs/src/sys/arch/powerpc/ddb/db_trace.c,v
retrieving revision 1.16
diff -u -p -r1.16 db_trace.c
--- sys/arch/powerpc/ddb/db_trace.c 18 Apr 2020 04:45:20 -0000 1.16
+++ sys/arch/powerpc/ddb/db_trace.c 8 May 2020 07:07:07 -0000
@@ -126,7 +126,7 @@ db_stack_trace_print(db_expr_t addr, int
int i, narg, trace_proc = 0;
while ((c = *cp++) != 0) {
- if (c == 'p')
+ if (c == 't')
trace_proc = 1;
}