Re: Running a program through gdb without interfering

2009-10-09 Thread Gary Jennejohn
On Fri, 9 Oct 2009 01:16:59 +0200 Mel Flynn mel.flynn+fbsd.hack...@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.hack...@mailing.thruhere.net wrote: Hi, is there a way to have a program run through gdb and gdb

Re: Running a program through gdb without interfering

2009-10-09 Thread Dag-Erling Smørgrav
Mel Flynn mel.flynn+fbsd.hack...@mailing.thruhere.net 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

Re: Running a program through gdb without interfering

2009-10-09 Thread Stef Walter
Mel Flynn wrote: [1] In order to get this working I had to put a statically compiled ps in the jail This is a pretty standard practice. I always put these statically built into any jails that don't match the outside system. I use the following crunchgen config to accomplish that. Cheers,

Re: Running a program through gdb without interfering

2009-10-09 Thread Mel Flynn
On Friday 09 October 2009 11:38:29 Dag-Erling Smørgrav wrote: Mel Flynn mel.flynn+fbsd.hack...@mailing.thruhere.net 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.

Re: Running a program through gdb without interfering

2009-10-09 Thread Mel Flynn
On Friday 09 October 2009 16:50:04 Mel Flynn wrote: On Friday 09 October 2009 11:38:29 Dag-Erling Smørgrav wrote: Mel Flynn mel.flynn+fbsd.hack...@mailing.thruhere.net writes: [...] sudo *sometimes* segfaults [...] However, it doesn't dump core sudo(1) is setuid root. You need to set

Re: Running a program through gdb without interfering

2009-10-09 Thread Nate Eldredge
On Fri, 9 Oct 2009, Mel Flynn wrote: On Friday 09 October 2009 11:38:29 Dag-Erling Smørgrav wrote: Mel Flynn mel.flynn+fbsd.hack...@mailing.thruhere.net 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

Re: Running a program through gdb without interfering

2009-10-09 Thread Mel Flynn
On Friday 09 October 2009 16:50:04 Mel Flynn wrote: On Friday 09 October 2009 11:38:29 Dag-Erling Smørgrav wrote: Mel Flynn mel.flynn+fbsd.hack...@mailing.thruhere.net writes: is there a way to have a program run through gdb and gdb only record a segfault, but otherwise let the program

Re: Running a program through gdb without interfering

2009-10-09 Thread Dag-Erling Smørgrav
Mel Flynn mel.flynn+fbsd.hack...@mailing.thruhere.net writes: Dag-Erling Smørgrav d...@des.no writes: Yes, just run gdb /path/to/program and type run. Not what I was looking for. The segfaults are random and the only way to somewhat reliably reproduce it is to have portmaster invoke it as

Re: Running a program through gdb without interfering

2009-10-09 Thread Dag-Erling Smørgrav
Nate Eldredge n...@thatsmathematics.com writes: This won't work. You can't debug setuid programs (for reasons which should be obvious). Ah, true, but easily fixable. Add a sysctl for it (just copy-paste the declaration for kern.sugid_coredump and change the name) and check its value in

Re: Running a program through gdb without interfering

2009-10-09 Thread Mel Flynn
On Friday 09 October 2009 21:27:21 Dag-Erling Smørgrav wrote: Mel Flynn mel.flynn+fbsd.hack...@mailing.thruhere.net writes: Dag-Erling Smørgrav d...@des.no writes: Yes, just run gdb /path/to/program and type run. Not what I was looking for. The segfaults are random and the only way to

Running a program through gdb without interfering

2009-10-08 Thread Mel Flynn
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

Re: Running a program through gdb without interfering

2009-10-08 Thread Mel Flynn
On Friday 09 October 2009 00:38:32 Paul B Mahol wrote: On 10/9/09, Mel Flynn mel.flynn+fbsd.hack...@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: