]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Hurd: Adjust to changes to "push pruning old threads down to the target"
authorThomas Schwinge <thomas@codesourcery.com>
Wed, 25 May 2016 16:54:40 +0000 (18:54 +0200)
committerThomas Schwinge <thomas@codesourcery.com>
Fri, 9 Dec 2016 06:36:31 +0000 (07:36 +0100)
commitc752a4cccb99ba73f51eff74b394dcdcd26d4c59
tree332f7cf25eecc2e84be2d1cd773365766959c960
parent53488a6e194af11c2528e5e284facb8a6171b695
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 e8032dde10b743253125d7defb5f5503b21c1d26,
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 c82f56d9d760a9b4034eeaac44f2f0fa5779ff69 "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.
gdb/ChangeLog
gdb/gnu-nat.c