[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: osx test
From: |
Jason Stover |
Subject: |
Re: osx test |
Date: |
Sun, 4 May 2008 22:04:28 -0400 |
User-agent: |
Mutt/1.5.10i |
On Sun, May 04, 2008 at 03:01:09PM -0700, Ben Pfaff wrote:
> Jason Stover <address@hidden> writes:
>
> > I just compiled successfully without the gui on OSX. But
> > pspp segfaults. gdb tells me this:
> >
> > Unable to find Mach task port for process-id 268865: (os/kern) failure (0x5)
> >
> > PSPP never even executed.
>
> When I get a fault like this that I can't diagnose, I use a
> search strategy to try to find the failure point. I start by
> inserting "exit(77);" or "for(;;);" or something along those
> lines at a likely point. Then I run the program. If it reaches
> that point and exits with code 77 or goes into an infinite loop,
> respectively, the program got to that point, so the problem must
> be later on, and so I move the point where I insert that
> statement later. If it segfaults, then the program didn't get to
> that point, so the problem must be earlier on, and so I move the
> point where I insert that statement earlier. This often works to
> quickly pinpoint the trouble spot.
I'll try that if I can't get gdb to work properly. I read a post
on a mac mailing list that renstalling the "developer tools" sometimes
fixes gdb.
I used to use such diagnostic code all the time, but sometime in the
recent past I got addicted to gdb.
-Jason