forked from Imagelibrary/binutils-gdb
Hurd: Adjust to changes to "push pruning old threads down to the target"
For "info threads", we currently run into:
$ gdb/gdb -q -nw -nx --batch -ex start -ex info\ threads bfd/doc/chew
Temporary breakpoint 1 at 0x80486e0: file ../../../W._C._Handy/bfd/doc/chew.c, line 1535.
[New Thread 10656.5]
Thread 4 hit Temporary breakpoint 1, main (ac=1, av=0x102cd84) at ../../../W._C._Handy/bfd/doc/chew.c:1535
1535 {
Id Target Id Frame
1 bogus thread id 1 Can't fetch registers from thread bogus thread id 1: No such thread
Before commit e8032dde10,
gdb/thread.c:update_thread_list used to call prune_threads, after that change
it doesn't anymore, and we don't implement the to_update_thread_list target
method where the prune_threads call got moved. For now, apply a fix, related
to commit c82f56d9d7 "Hurd: Adjust to
startup-with-shell changes", which restores the previous behavior:
Id Target Id Frame
* 4 Thread 10688.4 main (ac=1, av=0x102cd84) at ../../../W._C._Handy/bfd/doc/chew.c:1535
5 Thread 10688.5 0x0106096c in ?? () from /lib/i386-gnu/libc.so.0.3
Not perfect, but at least better.
gdb/
* gnu-nat.c (gnu_create_inferior): After startup_inferior, call
prune_threads.
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
2016-12-09 Thomas Schwinge <thomas@codesourcery.com>
|
2016-12-09 Thomas Schwinge <thomas@codesourcery.com>
|
||||||
|
|
||||||
|
* gnu-nat.c (gnu_create_inferior): After startup_inferior, call
|
||||||
|
prune_threads.
|
||||||
|
|
||||||
* inferior.c (print_selected_inferior): Avoid PATH_MAX usage.
|
* inferior.c (print_selected_inferior): Avoid PATH_MAX usage.
|
||||||
|
|
||||||
2016-12-08 Simon Marchi <simon.marchi@ericsson.com>
|
2016-12-08 Simon Marchi <simon.marchi@ericsson.com>
|
||||||
|
|||||||
@@ -2163,6 +2163,8 @@ gnu_create_inferior (struct target_ops *ops,
|
|||||||
|
|
||||||
startup_inferior (START_INFERIOR_TRAPS_EXPECTED);
|
startup_inferior (START_INFERIOR_TRAPS_EXPECTED);
|
||||||
inf->pending_execs = 0;
|
inf->pending_execs = 0;
|
||||||
|
/* Get rid of the old shell threads. */
|
||||||
|
prune_threads ();
|
||||||
|
|
||||||
inf_validate_procinfo (inf);
|
inf_validate_procinfo (inf);
|
||||||
inf_update_signal_thread (inf);
|
inf_update_signal_thread (inf);
|
||||||
|
|||||||
Reference in New Issue
Block a user