On Wed, Nov 29, 2017 at 04:04:49AM +1100, Bruce Evans wrote:
> On Tue, 28 Nov 2017, Edward Tomasz Napierala wrote:
> > Log:
> > Make kdb_reenter() silent when explicitly called from db_error().
> > This removes the useless backtrace on various ddb(4) user errors.
> >
> > Reviewed by: jhb@
> > Obtained from: CheriBSD
> > MFC after: 2 weeks
> > Sponsored by: DARPA, AFRL
> > Differential Revision: https://reviews.freebsd.org/D13212
>
> This doesn't fix the spam for user errors that cause a trap, which are
> very common (for mistyping memory addresses). ddb sets up trap handlers
> using setjmp, and actually does this correctly in many cases, but when
> a trap occurs the error handling is: [...]
>
> I use the following fix of disabling the spam in all cases (unless reenabled
> in all cases using ddb): [...]
Since someone is hacking on subr_kdb.c, may I ask them to commit attached
small patch? I want to do some work in that area, and these style issues
bug me.
./danfe
Index: kern/subr_kdb.c
===================================================================
--- kern/subr_kdb.c (revision 326310)
+++ kern/subr_kdb.c (working copy)
@@ -224,7 +224,7 @@
return (0);
}
-void
+static void
kdb_panic(const char *msg)
{
@@ -232,7 +232,7 @@
panic("%s", msg);
}
-void
+static void
kdb_reboot(void)
{
@@ -362,7 +362,6 @@
* is selected or the current debugger does not support backtraces, this
* function silently returns.
*/
-
void
kdb_backtrace(void)
{
@@ -410,7 +409,6 @@
/*
* Set/change the current backend.
*/
-
int
kdb_dbbe_select(const char *name)
{
@@ -450,7 +448,6 @@
/*
* Initialize the kernel debugger interface.
*/
-
void
kdb_init(void)
{
@@ -485,7 +482,6 @@
/*
* Handle contexts.
*/
-
void *
kdb_jmpbuf(jmp_buf new)
{
@@ -510,9 +506,8 @@
}
/*
- * Thread related support functions.
+ * Thread-related support functions.
*/
-
struct pcb *
kdb_thr_ctx(struct thread *thr)
{
@@ -606,7 +601,6 @@
/*
* Enter the debugger due to a trap.
*/
-
int
kdb_trap(int type, int code, struct trapframe *tf)
{
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"