Bug 12966

Summary: python threads incompatible with gdbserver
Product: gdb Reporter: Jan Kratochvil <jan>
Component: pythonAssignee: Not yet assigned to anyone <unassigned>
Status: NEW ---    
Severity: normal CC: pmuldoon, tromey
Priority: P2    
Version: HEAD   
Target Milestone: ---   
Host: x86_64-fedora15-linux-gnu Target: x86_64-fedora15-linux-gnu
Build: Last reconfirmed:

Description Jan Kratochvil 2011-07-06 19:23:20 UTC
gdb.python/py-evsignal.exp and gdb.python/py-evthreads.exp will have now KFAIL with gdbserver.

RuntimeError: Could not find event thread

I do not see anywhere target_find_new_threads call before Python tries to deal with the thread list.

(gdb) spawn ../gdbserver/gdbserver --once :2347 /home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.python/py-evthreads^M
Process /home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.python/py-evthreads created; pid = 9932^M
Listening on port 2347^M
target remote localhost:2347^M
Remote debugging using localhost:2347^M
Remote debugging from host 127.0.0.1^M
[New Thread 9932]^M
RuntimeError: Could not find event thread^M
(gdb) ^M
[Thread 9932] #1 stopped.^M
0x00007f03fb24d600 in ?? ()^M
event type: stop^M
event type: stop^M
Comment 1 Jan Kratochvil 2011-07-06 19:38:53 UTC
The testcase being referenced is the updated one - before it gets checked in:
Re: [patch] Support inferior events in python
http://sourceware.org/ml/gdb-patches/2011-07/msg00209.html
Comment 2 Sourceware Commits 2017-10-13 12:29:05 UTC
The master branch has been updated by Pedro Alves <palves@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ebe3b40202042fc644df5ea3bd111425ba1aeeee

commit ebe3b40202042fc644df5ea3bd111425ba1aeeee
Author: Pedro Alves <palves@redhat.com>
Date:   Fri Oct 13 13:25:20 2017 +0100

    Remove is_remote kfail from gdb.python/py-evthreads.exp
    
    This testcase works fine with gdbserver nowadays.  So remove the
    kfail.
    
    gdb/testsuite/ChangeLog:
    2017-10-13  Pedro Alves  <palves@redhat.com>
    	    Simon Marchi  <simon.marchi@polymtl.ca>
    
    	PR python/12966
    	* gdb.python/py-evthreads.exp: Remove is_remote target kfail.
Comment 3 Tom Tromey 2022-06-05 15:01:32 UTC
py-evsignal.exp still seems to fail with native-gdbserver.exp
and native-extended-gdbserver.exp (though they fail differently).