From owner-svn-src-head@freebsd.org Wed Nov 29 06:57:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91F98DFB263; Wed, 29 Nov 2017 06:57:02 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 70956689ED; Wed, 29 Nov 2017 06:57:02 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id B0414CFE6; Wed, 29 Nov 2017 06:57:01 +0000 (UTC) Date: Wed, 29 Nov 2017 06:57:01 +0000 From: Alexey Dokuchaev To: Bruce Evans Cc: Edward Tomasz Napierala , 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> References: <201711281253.vASCrtlB071488@repo.freebsd.org> <20171129030035.W2283@besplex.bde.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="OXfL5xGRrasGEqWY" Content-Disposition: inline In-Reply-To: <20171129030035.W2283@besplex.bde.org> User-Agent: Mutt/1.9.1 (2017-09-22) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Nov 2017 06:57:02 -0000 --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--