This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [commit] build failure in inf-ptrace.c (pa-hpux)


On Wednesday 30 December 2009 20:07:20, Mark Kettenis wrote:
> > Date: Wed, 30 Dec 2009 23:46:28 +0400
> > From: Joel Brobecker <brobecker@adacore.com>
> > 
> > Hello,
> > 
> > inf-ptrace no longer builds on pa-hpux. Looks like a small thinko
> > while updating gazillions of files the same way. I hope I fixed it
> > right (notice the [...]->pspace = [...]->aspace on the second line
> > I changed ;-). I didn't see I first fixed the name of the variable...
> > 
> > 2009-12-30  Joel Brobecker  <brobecker@adacore.com>
> > 
> >         Fix build failure in inf-ptrace.c.
> >         * inf-ptrace.c (inf_ptrace_follow_fork): Fix typo.
> > 
> > Checked in.

Thanks.

On Wednesday 30 December 2009 20:07:20, Mark Kettenis wrote:
> > Date: Wed, 30 Dec 2009 23:46:28 +0400
> > From: Joel Brobecker <brobecker@adacore.com>

> For what it is worth, it also broke OpenBSD and I came up with the
> same fix.  

You could have said something sooner.  ;-)

> I'm not sure the fix is right though. 
> 
> > +      child_inf->pspace = parent_inf->pspace;
> > +      child_inf->aspace = parent_inf->aspace;
> 

> Looking at the Linux code, this seesm to be right for vfork(), but the
> code in inf-ptrace.c handles fork().
> Pedro, Stan, what would be the right thing to do here?

It's also what linux does in the "set detach-on-fork on" (default) case
when following the child, notice the `|| detach_fork'
condition there.  Neither OpenBSD nor pa-hpux implement
"set detach-on-fork off", that is, don't handle debugging more
than inferior simultaneouly, so this is fine.  I assume one of
you confirmed following a fork works as good as it use to.

-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]