Hi, Do we really want the filename to be printed in the message? If so we should use __FILE__. On the other hand, having the function name makes more sense to me.
OK? Index: amd64/amd64/db_trace.c =================================================================== RCS file: /cvs/src/sys/arch/amd64/amd64/db_trace.c,v retrieving revision 1.20 diff -u -p -r1.20 db_trace.c --- amd64/amd64/db_trace.c 4 Sep 2016 09:22:28 -0000 1.20 +++ amd64/amd64/db_trace.c 9 Sep 2016 18:35:09 -0000 @@ -174,7 +174,7 @@ db_stack_trace_print(db_expr_t addr, boo if (trace_proc) { struct proc *p = pfind((pid_t)addr); if (p == NULL) { - (*pr) ("db_trace.c: process not found\n"); + (*pr) ("%s: process not found\n", __func__); return; } frame = (struct callframe *)p->p_addr->u_pcb.pcb_rbp; Index: i386/i386/db_trace.c =================================================================== RCS file: /cvs/src/sys/arch/i386/i386/db_trace.c,v retrieving revision 1.19 diff -u -p -r1.19 db_trace.c --- i386/i386/db_trace.c 3 Mar 2016 12:44:09 -0000 1.19 +++ i386/i386/db_trace.c 9 Sep 2016 18:35:09 -0000 @@ -186,11 +186,11 @@ db_stack_trace_print(db_expr_t addr, boo frame = (struct callframe *)ddb_regs.tf_ebp; callpc = (db_addr_t)ddb_regs.tf_eip; } else if (trace_thread) { - (*pr) ("db_trace.c: can't trace thread\n"); + (*pr) ("%s: can't trace thread\n", __func__); } else if (trace_proc) { struct proc *p = pfind((pid_t)addr); if (p == NULL) { - (*pr) ("db_trace.c: process not found\n"); + (*pr) ("%s: process not found\n", __func__); return; } frame = (struct callframe *)p->p_addr->u_pcb.pcb_ebp; -- jasper