Running a program through gdb without "interfering"

Dag-Erling Smørgrav des at
Fri Oct 9 09:38:31 UTC 2009

Mel Flynn <mel.flynn+fbsd.hackers at> writes:
> is there a way to have a program run through gdb and gdb only record a 
> 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 
> jail, or the uid test would fail. It has the downside that it lists both jail 
> 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.

Dag-Erling Smørgrav - des at

More information about the freebsd-hackers mailing list