gdb, remote, btrace: move switch_to_thread call right before xfer call
authorMarkus Metzger <markus.t.metzger@intel.com>
Thu, 25 Nov 2021 14:22:24 +0000 (15:22 +0100)
committerMarkus Metzger <markus.t.metzger@intel.com>
Thu, 27 Jan 2022 12:31:21 +0000 (13:31 +0100)
commit0d8cbc5f2fcbcb9eb207f12507fdfe04f3d3ae14
treef25de2cf681ae607b3afe2b65fc60fb51d36b4d7
parent696c0d5ef2a6edaa2094e808f53acd502a157641
gdb, remote, btrace: move switch_to_thread call right before xfer call

In remote_target::remote_btrace_maybe_reopen, we switch to the currently
iterated thread in order to set inferior_ptid for a subsequent xfer.

Move the switch_to_thread call directly before the target_read_stralloc
call to clarify why we need to switch threads.
gdb/remote.c