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.
This commit is contained in:
Tankut Baris Aktemur
2022-11-09 17:46:21 +01:00
parent 97e20099d3
commit 8263b346fa
5 changed files with 19 additions and 1 deletions

View File

@@ -6712,6 +6712,12 @@ linux_process_target::qxfer_libraries_svr4 (const char *annex,
#ifdef HAVE_LINUX_BTRACE
bool
linux_process_target::supports_btrace ()
{
return true;
}
btrace_target_info *
linux_process_target::enable_btrace (thread_info *tp,
const btrace_config *conf)