aboutsummaryrefslogtreecommitdiff
path: root/sys/i386
diff options
context:
space:
mode:
authorMitchell Horne <mhorne@FreeBSD.org>2022-10-28 21:20:05 +0000
committerMitchell Horne <mhorne@FreeBSD.org>2022-11-06 14:54:46 +0000
commit3e00f4ab107d68d5f7782c8bdeeead41cb06b38b (patch)
tree6fedaa630148a4d191b90153b6414804845ef84e /sys/i386
parentd96eebfdb351abf5e604f43e8f022f8bb861bdbd (diff)
ddb: print the actual syscall name
Some architectures will pretty-print a system call trap in the backtrace. Rather than printing the symbol, use the syscallname() function to pull the string from the sv_syscallnames array corresponding to the process. This simplifies the function somewhat. Mostly, this will result in dropping the "sys" prefix, e.g. "sys_exit" will now be printed simply as "exit". Make two minor tweaks to the function signature: use a u_int for the syscall number since this is a more correct type (see the 'code' member of struct syscall_args), and make the thread pointer the first argument. The latter is more natural and conventional. Suggested by: jrtc27 Reviewed by: jrtc27, markj, jhb MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D37200 (cherry picked from commit aba921bd9e1869dae9ae4cc6e0c048f997401034)
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/i386/db_trace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/i386/i386/db_trace.c b/sys/i386/i386/db_trace.c
index aee90ee058de..47057906fa58 100644
--- a/sys/i386/i386/db_trace.c
+++ b/sys/i386/i386/db_trace.c
@@ -372,7 +372,7 @@ db_nextframe(struct i386_frame **fp, db_addr_t *ip, struct thread *td)
break;
case SYSCALL:
db_printf("--- syscall");
- db_decode_syscall(tf->tf_eax, td);
+ db_decode_syscall(td, tf->tf_eax);
break;
case INTERRUPT:
db_printf("--- interrupt");