From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5519 invoked by alias); 20 Jul 2009 15:14:12 -0000 Received: (qmail 5506 invoked by uid 22791); 20 Jul 2009 15:14:10 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 20 Jul 2009 15:13:59 +0000 Received: (qmail 26711 invoked from network); 20 Jul 2009 15:13:57 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 20 Jul 2009 15:13:57 -0000 From: Pedro Alves To: Thomas Schwinge Subject: Re: Restore GNU/Hurd functionality Date: Mon, 20 Jul 2009 17:33:00 -0000 User-Agent: KMail/1.9.10 Cc: gdb-patches@sourceware.org, bug-hurd@gnu.org References: <200902160549.49108.pedro@codesourcery.com> <200907201122.34853.pedro@codesourcery.com> <20090720145334.GB5192@fencepost.gnu.org> In-Reply-To: <20090720145334.GB5192@fencepost.gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907201614.47233.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-07/txt/msg00488.txt.bz2 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 > (), 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