From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 9 09:38:31 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA1411065672 for ; Fri, 9 Oct 2009 09:38:31 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 6D2748FC08 for ; Fri, 9 Oct 2009 09:38:31 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 5EF996D41B; Fri, 9 Oct 2009 09:38:30 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 1319B844A2; Fri, 9 Oct 2009 11:38:30 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Mel Flynn References: <200910090015.24175.mel.flynn+fbsd.hackers@mailing.thruhere.net> Date: Fri, 09 Oct 2009 11:38:29 +0200 In-Reply-To: <200910090015.24175.mel.flynn+fbsd.hackers@mailing.thruhere.net> (Mel Flynn's message of "Fri, 9 Oct 2009 00:15:24 +0200") Message-ID: <86skds7vqi.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: Running a program through gdb without "interfering" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2009 09:38:31 -0000 Mel Flynn writes: > is there a way to have a program run through gdb and gdb only record a=20 > segfault, but otherwise let the program run? Yes, just run "gdb /path/to/program" and type "run". > [...] sudo *sometimes* segfaults [...] However, it doesn't dump core sudo(1) is setuid root. You need to set kern.sugid_coredump to get it to dump core. > [1] In order to get this working I had to put a statically compiled ps in= the=20 > jail, or the uid test would fail. It has the downside that it lists both = jail=20 > and host processes, [...] Uh, no. Processes outside the jail are not visible inside it, no matter what version of ps(1) or top(1) or any other such program you use. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no