Running a program through gdb without "interfering"

Mel Flynn mel.flynn+fbsd.hackers at mailing.thruhere.net
Thu Oct 8 22:15:26 UTC 2009


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.

[1] In order to get this working I had to put a statically compiled ps in the 
jail, or the uid test would fail. It has the downside that it lists both jail 
and host processes, but it is acceptable to me as the jail is only accessible 
from the host (pf enforced). I suspect sudo to have a similar problem or even 
related to ps returning processes from a uid that doesn't exist in the jail, 
but without a backtrace I don't know what to fix.
-- 
Mel


More information about the freebsd-hackers mailing list