Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Oct 2009 11:32:01 +0200
From:      Gary Jennejohn <gary.jennejohn@freenet.de>
To:        Mel Flynn <mel.flynn+fbsd.hackers@mailing.thruhere.net>
Cc:        freebsd-hackers@freebsd.org, Paul B Mahol <onemda@gmail.com>
Subject:   Re: Running a program through gdb without "interfering"
Message-ID:  <20091009113201.0ade498f@ernst.jennejohn.org>
In-Reply-To: <200910090116.59158.mel.flynn%2Bfbsd.hackers@mailing.thruhere.net>
References:  <200910090015.24175.mel.flynn%2Bfbsd.hackers@mailing.thruhere.net> <3a142e750910081538g213eb63cse559b4601e97a3@mail.gmail.com> <200910090116.59158.mel.flynn%2Bfbsd.hackers@mailing.thruhere.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 9 Oct 2009 01:16:59 +0200
Mel Flynn <mel.flynn+fbsd.hackers@mailing.thruhere.net> wrote:

> On Friday 09 October 2009 00:38:32 Paul B Mahol wrote:
> > On 10/9/09, Mel Flynn <mel.flynn+fbsd.hackers@mailing.thruhere.net> wrote:
> > > Hi,
> > >
> > > is there a way to have a program run through gdb and gdb only record a
> > > segfault, but otherwise let the program run?
> > >
> > > Why I'd like this is the following:
> > > I've got a i386 jail on an amd64 box, running 7.2-p4. UNAME_p and UNAME_m
> > > have
> > > been set to i386 as well as ARCH in /etc/make.conf. Running portmaster[1]
> > > to build ports under my uid and PM_SU_CMD, sudo *sometimes* segfaults.
> > > It's only
> > > sudo, so at present I don't have a reason to doubt memory. However, it
> > > doesn't
> > > dump core, so I'm at a loss what the culprit could be.
> > 
> > Tried 'sysctl kern.sugid_coredump=1' ?
> 
> Hmm, no. Enabled now and waiting for the next segfault.
> I actually looked at the sysctl -d, but it didn't register that this could be 
> the main cause.
> Perhaps that sentence could be more clear:
> -kern.sugid_coredump: Enable coredumping set user/group ID processes
> +kenr.sugid_coredump: Allow setuid/setgid processes to dump core
> 

See the info file for gdb, section 5.3 Signals.  It's possible to tell
gdb how to handle signals, e.g. stop vs. nostop, etc.

---
Gary Jennejohn



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091009113201.0ade498f>