Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [commit] build failure in inf-ptrace.c (pa-hpux)
@ 2009-12-30 19:47 Joel Brobecker
  2009-12-30 20:10 ` Mark Kettenis
  0 siblings, 1 reply; 3+ messages in thread
From: Joel Brobecker @ 2009-12-30 19:47 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 457 bytes --]

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.

-- 
Joel

[-- Attachment #2: inf-ptrace.diff --]
[-- Type: text/x-diff, Size: 879 bytes --]

commit 1a2d71c8b05b915da66a162b794eada3d85126ca
Author: brobecke <brobecke@f8352e7e-cb20-0410-8ce7-b5d9e71c585c>
Date:   Wed Dec 30 19:34:08 2009 +0000

    Fix build failure in inf-ptrace.c.
    
            * inf-ptrace.c (inf_ptrace_follow_fork): Fix typo.

diff --git a/gdb/inf-ptrace.c b/gdb/inf-ptrace.c
index a138701..d2df3b1 100644
--- a/gdb/inf-ptrace.c
+++ b/gdb/inf-ptrace.c
@@ -67,8 +67,8 @@ inf_ptrace_follow_fork (struct target_ops *ops, int follow_child)
       child_inf = add_inferior (fpid);
       child_inf->attach_flag = parent_inf->attach_flag;
       copy_terminal_info (child_inf, parent_inf);
-      inf->pspace = parent_inf->pspace;
-      inf->pspace = parent_inf->aspace;
+      child_inf->pspace = parent_inf->pspace;
+      child_inf->aspace = parent_inf->aspace;
 
       /* Before detaching from the parent, remove all breakpoints from
 	 it.  */

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [commit] build failure in inf-ptrace.c (pa-hpux)
  2009-12-30 19:47 [commit] build failure in inf-ptrace.c (pa-hpux) Joel Brobecker
@ 2009-12-30 20:10 ` Mark Kettenis
  2009-12-31  8:50   ` Pedro Alves
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Kettenis @ 2009-12-30 20:10 UTC (permalink / raw)
  To: brobecker, pedro, stan; +Cc: gdb-patches

> 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.

For what it is worth, it also broke OpenBSD and I came up with the
same fix.  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?


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [commit] build failure in inf-ptrace.c (pa-hpux)
  2009-12-30 20:10 ` Mark Kettenis
@ 2009-12-31  8:50   ` Pedro Alves
  0 siblings, 0 replies; 3+ messages in thread
From: Pedro Alves @ 2009-12-31  8:50 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: brobecker, stan, gdb-patches

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-12-31  8:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-30 19:47 [commit] build failure in inf-ptrace.c (pa-hpux) Joel Brobecker
2009-12-30 20:10 ` Mark Kettenis
2009-12-31  8:50   ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox