From owner-cvs-all@FreeBSD.ORG Wed Jun 29 18:12:01 2005 Return-Path: X-Original-To: cvs-all@freebsd.org Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4AFE516A41C for ; Wed, 29 Jun 2005 18:12:01 +0000 (GMT) (envelope-from ups@tree.com) Received: from smtp.speedfactory.net (smtp.speedfactory.net [66.23.216.216]) by mx1.FreeBSD.org (Postfix) with ESMTP id B131E43D49 for ; Wed, 29 Jun 2005 18:12:00 +0000 (GMT) (envelope-from ups@tree.com) Received: (qmail 28436 invoked by uid 210); 29 Jun 2005 18:12:50 +0000 Received: from 66.23.216.49 by talon (envelope-from , uid 201) with qmail-scanner-1.25st (clamdscan: 0.85.1/959. spamassassin: 3.0.2. perlscan: 1.25st. Clear:RC:1(66.23.216.49):. Processed in 0.077086 secs); 29 Jun 2005 18:12:50 -0000 X-Qmail-Scanner-Mail-From: ups@tree.com via talon X-Qmail-Scanner: 1.25st (Clear:RC:1(66.23.216.49):. Processed in 0.077086 secs Process 28429) Received: from 66-23-216-49.clients.speedfactory.net (HELO palm.tree.com) (66.23.216.49) by smtp.speedfactory.net with AES256-SHA encrypted SMTP; 29 Jun 2005 18:12:50 +0000 Received: from [127.0.0.1] (ups@localhost.tree.com [127.0.0.1]) by palm.tree.com (8.12.10/8.12.10) with ESMTP id j5TIBrLl012299; Wed, 29 Jun 2005 14:11:54 -0400 (EDT) (envelope-from ups@tree.com) From: Stephan Uphoff To: Marcel Moolenaar In-Reply-To: References: <200506252214.j5PMEgip000380@repoman.freebsd.org> <7c65ef6b909f86fa7f5a8aa041773a72@xcllnt.net> <20050627050618.W34733@delplex.bde.org> <1120052829.77984.17793.camel@palm> Content-Type: text/plain Message-Id: <1120068712.77984.18622.camel@palm> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Wed, 29 Jun 2005 14:11:53 -0400 Content-Transfer-Encoding: 7bit Cc: cvs-src@freebsd.org, src-committers@freebsd.org, Bruce Evans , cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/i386/i386 trap.c src/sys/amd64/amd64 trap.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Jun 2005 18:12:01 -0000 On Wed, 2005-06-29 at 11:42, Marcel Moolenaar wrote: > On Jun 29, 2005, at 6:47 AM, Stephan Uphoff wrote: > > > this is just a quick fix to get basic debugging capabilities back for > > some common environments. I plan to migrate parts or all of kdb_trap > > back to MD code to deal with SMP race conditions. > > That is not a good idea. The overall behaviour of entering the > debugger in inherently MI. The MD specifics are in the details, > which require nothing more than some MD callback functions to > fill in the blanks or create the right abstraction. > Race conditions are not MD phenomena either, but may require MD > techniques to prevent them. Hence, to fix race conditions you > don't have to degenerate MI code to MD code, provided you have > proper MD callback functions to fill in the blanks or create > the right abstractions. Don't panic ! The last thing I want to do is to totally dismantle the current kdb_trap or sprinkle MI code all over the different architecture directories. The console stuff definitely belongs in the MI part. However for readability I would rather have: kdb_trap_md() { md code; .... if (really_enter_debugger) kdb_trap_mi(); .... md code; } instead of: kdb_trap_mi() { really_enter_debugger = md_debugger_enter_code(); if (!really_enter_debugger) return .. stuff .. md_debugger_exit_code(); } I am all for MI code and callback functions. However kdb_trap is only called from MD code. Guaranteeing a certain execution environment for the MI code is all I care about. There is no abstraction gained by using MI callbacks on entering/exiting the MD kdb trap function. This being said I am not religious about it and can use callbacks if you feel strongly about this. I just think callbacks would be a bit silly in this context. Stephan