From owner-freebsd-current@FreeBSD.ORG Tue Apr 5 21:02:49 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 EC1971065672; Tue, 5 Apr 2011 21:02:49 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 8CB8A8FC0A; Tue, 5 Apr 2011 21:02:49 +0000 (UTC) Received: by qwc9 with SMTP id 9so542755qwc.13 for ; Tue, 05 Apr 2011 14:02:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=n8lXpQ1I2qL8ILuO6lm4XOH+u5Dkl4goDJ/ZMbEV7s0=; b=f0SBqXPQ8ETO4Qmp28Xt1OJcywIzle+d22QvmcSl9MuMO1srQQ+TXwQxPj7Q60hF9+ K7YUMCe2QCiIx47Cvs50ac0b/NTUE0hGKc7HAguM7WKcmh9r6iuDZaSa+4wKnkACPo6V 0vlPqAbo3VG0Wsw60YZomRCjzB0EkhfOut358= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=j4uOs1Y79kPtWhQZ6ijRb38CkemRmpnGwbYtUKgb2N18SrbBdKV5e3Es8S80KyL7Ci VmfTXpOkMwlzcbNaVmucrTapGMnjxl7N5abvwaP+BirgsIaGAp5JJ4eJnvcIwADp+w9E UKnKoEil4X5ne/edQXyVtIjtzgwCy3js5j12o= MIME-Version: 1.0 Received: by 10.229.136.1 with SMTP id p1mr107581qct.218.1302035744644; Tue, 05 Apr 2011 13:35:44 -0700 (PDT) Received: by 10.229.40.138 with HTTP; Tue, 5 Apr 2011 13:35:44 -0700 (PDT) In-Reply-To: <4D9B7C92.6030901@freebsd.org> References: <4D9A4CE5.5090900@freebsd.org> <4D9B7C92.6030901@freebsd.org> Date: Tue, 5 Apr 2011 13:35:44 -0700 Message-ID: From: Navdeep Parhar To: Julian Elischer Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 21:02:50 -0000 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 wha= t >>> we would need to put on the stack at fork_exit() to make it stop when i= t >>> gets there? >>> >>> not only is it annoying but it slows down debugging because kgdb and th= e >>> 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 e= nd >>> of a stack. >>> >>> Julian >> >> From my experience, it checks for a NULL stack chain pointer. =A0Once th= at >> 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