Re: Success: Was Re: Linking problems with gdb-7.2
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.
> @@ -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.
> @@ -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.
> --- 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...).
Samuel
Reply to: