summaryrefslogtreecommitdiff
path: root/gdb/btrace.c
diff options
context:
space:
mode:
authorMarkus Metzger <markus.t.metzger@intel.com>2020-03-18 10:53:41 +0100
committerMarkus Metzger <markus.t.metzger@intel.com>2020-04-21 15:51:06 +0200
commit1a476b6d68f338e6daa0345501c0cf0fe97dd8f3 (patch)
treef9e909c6d92dfbd11943892ccb24458b680251ad /gdb/btrace.c
parent4778a5f87d253399083565b4919816f541ebe414 (diff)
downloadbinutils-gdb-1a476b6d68f338e6daa0345501c0cf0fe97dd8f3.tar.gz
gdb, btrace: forward fetch_registers for unknown threads
In the record-btrace target, while replaying, we can only provide the PC register. The btrace state is stored in the thread_info. So, when trying to determine whether we are currently replaying, GDB calls find_thread_ptid() to obtain the thread_info. It also asserts that we do have a thread_info. For new threads, libthread-db may fetch registers before the thread is known to GDB. In this case, find_thread_ptid() returns nullptr and the assertion fails. Forward the fetch_registers request to the target beneath in that case. gdb/ChangeLog: 2020-03-19 Markus Metzger <markus.t.metzger@intel.com> * record-btrace.c (record_btrace_target::fetch_registers): Forward request if we do not have a thread_info. gdb/testsuite/ChangeLog: 2020-03-19 Markus Metzger <markus.t.metzger@intel.com> * gdb.btrace/enable-new-thread.c: New test. * gdb.btrace/enable-new-thread.exp: New file.
Diffstat (limited to 'gdb/btrace.c')
0 files changed, 0 insertions, 0 deletions