From owner-freebsd-current@FreeBSD.ORG Tue Apr 5 20:32:53 2011 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58398106564A for ; Tue, 5 Apr 2011 20:32:53 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) by mx1.freebsd.org (Postfix) with ESMTP id 2DA388FC12 for ; Tue, 5 Apr 2011 20:32:53 +0000 (UTC) Received: from julian-mac.elischer.org (home-nat.elischer.org [67.100.89.137]) (authenticated bits=0) by vps1.elischer.org (8.14.4/8.14.4) with ESMTP id p35KWpNr059245 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 5 Apr 2011 13:32:52 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <4D9B7C92.6030901@freebsd.org> Date: Tue, 05 Apr 2011 13:33:22 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 To: Justin Hibbits References: <4D9A4CE5.5090900@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD Current Subject: Re: KGDB stack traces in the kernel. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Apr 2011 20:32:53 -0000 On 4/4/11 6:04 PM, Justin Hibbits wrote: > On Apr 4, 2011, at 6:57 PM, Julian Elischer wrote: >> is there anyone here with enough gdb/kgdb source experience to know >> what >> we would need to put on the stack at fork_exit() to make it stop >> when it >> gets there? >> >> not only is it annoying but it slows down debugging because kgdb >> and the ddd >> front end ask for stacks a LOT. sometimes it actually just hangs as >> the stack >> goes into a loop and never ends. >> >> I had a quick look but didn't spot how gdb decides it has reached >> the end of a stack. >> >> Julian > > From my experience, it checks for a NULL stack chain pointer. Once > that reaches NULL, it's the end of the stack. > > - Justin > I'll try adding NULL when we build the intial stack up. :-)