From 8263b346fa07e3f679b05a8b369d491af51e6de8 Mon Sep 17 00:00:00 2001 From: Tankut Baris Aktemur Date: Wed, 9 Nov 2022 17:46:21 +0100 Subject: gdbserver: do not report btrace support if target does not announce it Gdbserver unconditionally reports support for btrace packets. Do not report the support, if the underlying target does not say it supports it. Otherwise GDB would query the server with btrace-related packets unnecessarily. --- gdbserver/target.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gdbserver/target.h') diff --git a/gdbserver/target.h b/gdbserver/target.h index 6c536a3..18ab969 100644 --- a/gdbserver/target.h +++ b/gdbserver/target.h @@ -388,6 +388,9 @@ public: /* Return true if target supports debugging agent. */ virtual bool supports_agent (); + /* Return true if target supports btrace. */ + virtual bool supports_btrace (); + /* Enable branch tracing for TP based on CONF and allocate a branch trace target information struct for reading and for disabling branch trace. */ virtual btrace_target_info *enable_btrace (thread_info *tp, -- cgit v1.1