]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Improve remote attach round-trips without btrace
authorConrad Meyer <cem@FreeBSD.org>
Mon, 19 Aug 2019 07:02:19 +0000 (00:02 -0700)
committerPedro Alves <palves@redhat.com>
Tue, 20 Aug 2019 14:06:37 +0000 (15:06 +0100)
commitaedbe3bb9f03be12ad714adca1fefc391317bd94
tree577892888ccb5462341d72bc9056f6c46edbe16f
parentac533243beac35f158341d53edab53031218bcde
Improve remote attach round-trips without btrace

For remotes which do not support btrace at all, we can save several
round trips for each thread.  This is especially significant when your
remote is a kernel with 100s or 1000s of threads and latency is
intercontinental.

Previously, with target, remote, and infrun debugging enabled, one
might see:

    Sending packet: $Hg18aee#43...Ack
    Packet received: OK
    Sending packet: $Hg186f7#eb...Ack
    Packet received: OK
    remote:target_xfer_partial (24, , 0x805454000, 0x0, 0x0, 4096) = -1, 0

repeated for all non-exited threads.

Afterwards, if the remote does not specify 'qXfer:btrace-conf:read+'
in qSupported stub features, these unnecessary thread switches are
avoided.

gdb/ChangeLog:

* remote.c (remote_target::remote_btrace_maybe_reopen): Avoid
unnecessary thread walk if remote doesn't support the packet.
gdb/ChangeLog
gdb/remote.c