[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Success: Was Re: Linking problems with gdb-7.2



On Tue, 2011-03-22 at 10:21 +0100, Samuel Thibault wrote:
> Svante Signell, le Tue 22 Mar 2011 08:49:14 +0100, a écrit :
> > Attaching the patch for review.
> 
> Thanks.
> 
> > The need to explicitly link the lib*user libraries is probably due to
> > the recent ---as-needed linker changes. Was this needed before?
> 
> It wasn't. Please remove this part from the patch for now, we need to
> discuss on bug-hurd whether these shouldn't just be added to libc.so.
> 
> > --- gdb-7.2/gdb/gnu-nat.c	2011-03-22 07:30:32.000000000 +0100
> > +++ gdb-7.2.patched/gdb/gnu-nat.c	2011-03-20 17:55:58.000000000 +0100
> > @@ -75,6 +75,8 @@
> >  #include "exc_request_U.h"
> >  #include "msg_U.h"
> >  
> > +extern void prune_threads (void);
> > +
> 
> Add it to gdb/gdbthread.h instead.

Will do.

> > @@ -1578,8 +1580,8 @@
> >  	  if (--inf->pending_execs == 0)
> >  	    /* We're done!  */
> >  	    {
> > +	      prune_threads ();	/* Get rid of the old shell threads */
> >  #if 0				/* do we need this? */
> > -	      prune_threads (1);	/* Get rid of the old shell threads */
> >  	      renumber_threads (0);	/* Give our threads reasonable names. */
> >  #endif
> 
> Oh my... "let's see is somebody shouts if I drop this"... However it was
> out in 7.0 already, so gdb people will rather want a real explanation,
> not just a patch.

This is exactly from the patch by Thomas S. I did not change anything in
that patch, and I did not know it was in 7.0 already. Sorry, I cannot
explain to gdb people, this is for somebody else to do.

> > @@ -2137,6 +2139,10 @@
> >      inf_steal_exc_ports (inf);
> >    else
> >      inf_restore_exc_ports (inf);
> > +
> > +#if 0
> > +  prune_threads ();
> > +#endif
> >  }
> >  
> >  
> 
> Why this?  It looks like a leftover.

Yes, this is from the patch by Thomas Schwinge, 
http://sourceware.org/ml/gdb-patches/2009-11/msg00581.html

I did not change that patch.

> > --- gdb-7.2/gdb/thread.c.orig	2010-08-06 21:51:49.000000000 +0200
> > +++ gdb-7.2/gdb/thread.c	2011-03-21 17:08:05.000000000 +0100
> > @@ -61,7 +61,7 @@
> >  static void info_threads_command (char *, int);
> >  static void thread_apply_command (char *, int);
> >  static void restore_current_thread (ptid_t);
> > -static void prune_threads (void);
> > +void prune_threads (void);
> 
> Unneeded when it's put in gdbthread.h (that's the whole point of a .h...).

OK, I just wanted to make as few changes as possible and this statement was already in that file!

My part in this was only to make gdb build again (and work with the
proposed gnu-nat.c patch see bug #579834)



Reply to: