On Monday 20 July 2009 15:53:34, Thomas Schwinge wrote: > Well, thanks to you for helping with maintining GDB's Hurd port! If you > need help with a new Hurd image, or want shell access to a system > (<http://www.gnu.org/software/hurd/public_hurd_boxen.html>), please just > speak up. (Likewise everyone else who is interested, of course!)
Cool! I just might. > Whether it is better to do it the old way ( have a nested function > attach_to_child that will be passed to and called from within > fork_inferior), or do it like your patch does (inline the former > attach_to_child to be executed after fork_inferior has returned) -- I > have no idea, so I'll leave that to you. Yeah. I needed to pass the target_ops argument to attach_to_child, since gnu_ops is now gone. This way was simpler, as it avoids having to change the callback's interface. That callback used to make sense when fork_inferior did some extra work after calling it, and before returning; but, fork_inferior doesn't do that anymore, it just calls the callback and returns. We've done the same change to inf-ptrace.c recently-ish (inlined the corresponding function when we needed the extra argument, instead of changing the callback's interface). > > > +/* Create a prototype generic GNU/Hurd target. The client can > > + override it with local methods. */ > > + > > +struct target_ops * > > +gnu_target (void) > > +{ > > + struct target_ops *t = inf_child_target (); > > That one needs ``#include "inf-child.h"''. Fixed. > > > + t->to_can_run = gnu_can_run; > > This statement should be removed: the default value (as set by > inf_child_target) is alright and you removed gnu_can_run just above. Fixed. > > > + t->to_thread_alive = gnu_thread_alive; > > + t->to_pid_to_str = gnu_pid_to_str; > > + t->to_stop = gnu_stop; > > +} > > ``return t;'' is missing. Fixed. Thanks. I'll commit the patch in a bit. -- Pedro Alves