Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Nov 2017 06:57:01 +0000
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        Bruce Evans <brde@optusnet.com.au>
Cc:        Edward Tomasz Napierala <trasz@freebsd.org>, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r326314 - in head/sys: ddb kern sys
Message-ID:  <20171129065701.GB71839@FreeBSD.org>
In-Reply-To: <20171129030035.W2283@besplex.bde.org>
References:  <201711281253.vASCrtlB071488@repo.freebsd.org> <20171129030035.W2283@besplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--OXfL5xGRrasGEqWY
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

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

--OXfL5xGRrasGEqWY
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="subr_kdb.c.diff"

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)
 {

--OXfL5xGRrasGEqWY--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20171129065701.GB71839>