aboutsummaryrefslogtreecommitdiff
path: root/gdbserver/server.cc
diff options
context:
space:
mode:
authorTankut Baris Aktemur <tankut.baris.aktemur@intel.com>2022-11-09 17:46:21 +0100
committerTankut Baris Aktemur <tankut.baris.aktemur@intel.com>2022-11-09 17:46:21 +0100
commit8263b346fa07e3f679b05a8b369d491af51e6de8 (patch)
treedfff8b66f8274737d3b94d82ad0fe44100ade66a /gdbserver/server.cc
parent97e20099d3b02baafe244e975aebe09020d2ab34 (diff)
downloadgdb-8263b346fa07e3f679b05a8b369d491af51e6de8.zip
gdb-8263b346fa07e3f679b05a8b369d491af51e6de8.tar.gz
gdb-8263b346fa07e3f679b05a8b369d491af51e6de8.tar.bz2
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.
Diffstat (limited to 'gdbserver/server.cc')
-rw-r--r--gdbserver/server.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdbserver/server.cc b/gdbserver/server.cc
index 366a843..aaef38e 100644
--- a/gdbserver/server.cc
+++ b/gdbserver/server.cc
@@ -2475,7 +2475,8 @@ handle_query (char *own_buf, int packet_len, int *new_packet_len_p)
if (target_supports_agent ())
strcat (own_buf, ";QAgent+");
- supported_btrace_packets (own_buf);
+ if (the_target->supports_btrace ())
+ supported_btrace_packets (own_buf);
if (target_supports_stopped_by_sw_breakpoint ())
strcat (own_buf, ";swbreak+");