From owner-freebsd-current@FreeBSD.ORG Tue Apr 5 22:48:33 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 A59E91065672 for ; Tue, 5 Apr 2011 22:48:33 +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 77A7E8FC08 for ; Tue, 5 Apr 2011 22:48:33 +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 p35MmUwD059669 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 5 Apr 2011 15:48:32 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <4D9B9C5D.4000909@freebsd.org> Date: Tue, 05 Apr 2011 15:49:01 -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: Navdeep Parhar References: <4D9A4CE5.5090900@freebsd.org> <4D9B7C92.6030901@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Justin Hibbits , 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 22:48:33 -0000 On 4/5/11 1:35 PM, Navdeep Parhar wrote: > On Tue, Apr 5, 2011 at 1:33 PM, Julian Elischer wrote: >> 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. >> :-) > What does ddb do? It always seems to get this stuff correct. > > Navdeep it has all sorts of special code that knows the intricacies of freebsd's stack. (k)gdb only knows more generic stuff. hmmm set 0 into the saved ebp bit that didn't help.. I'll play a bit more