diff options
author | Tom Tromey <tromey@adacore.com> | 2023-06-07 09:32:46 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2025-08-04 10:39:20 -0600 |
commit | 1b34c1e50db8536d54c039d8251359571a753d63 (patch) | |
tree | 2582584bbfed2d92b2144b3857cc43ef8f0658ea | |
parent | 14de1447c9c52c1bfc52588f8652836f66ac6c47 (diff) | |
download | binutils-1b34c1e50db8536d54c039d8251359571a753d63.zip binutils-1b34c1e50db8536d54c039d8251359571a753d63.tar.gz binutils-1b34c1e50db8536d54c039d8251359571a753d63.tar.bz2 |
Disabling hardware single step in gdbserver
This patch gives gdbserver the ability to omit the 's' reply to
'vCont?'. This tells gdb that hardware single-step is definitely not
supported, causing it to fall back to using software single-step.
This is useful for testing the earlier change to
maybe_software_singlestep.
Approved-By: Andrew Burgess <aburgess@redhat.com>
-rw-r--r-- | gdbserver/server.cc | 12 | ||||
-rw-r--r-- | gdbserver/server.h | 1 |
2 files changed, 9 insertions, 4 deletions
diff --git a/gdbserver/server.cc b/gdbserver/server.cc index 4037b1c..673b784 100644 --- a/gdbserver/server.cc +++ b/gdbserver/server.cc @@ -143,6 +143,7 @@ unsigned long signal_pid; in gdbserver, for the sake of testing GDB against stubs that don't support them. */ bool disable_packet_vCont; +bool disable_packet_vCont_step; bool disable_packet_Tthread; bool disable_packet_qC; bool disable_packet_qfThreadInfo; @@ -3538,9 +3539,10 @@ handle_v_requests (char *own_buf, int packet_len, int *new_packet_len) { strcpy (own_buf, "vCont;c;C;t"); - if (target_supports_hardware_single_step () - || target_supports_software_single_step () - || !cs.vCont_supported) + if (!disable_packet_vCont_step + && (target_supports_hardware_single_step () + || target_supports_software_single_step () + || !cs.vCont_supported)) { /* If target supports single step either by hardware or by software, add actions s and S to the list of supported @@ -3873,7 +3875,7 @@ gdbserver_usage (FILE *stream) " --disable-packet=OPT1[,OPT2,...]\n" " Disable support for RSP packets or features.\n" " Options:\n" - " vCont, T, Tthread, qC, qfThreadInfo and \n" + " vCont, vConts, T, Tthread, qC, qfThreadInfo and\n" " threads (disable all threading packets).\n" "\n" "For more information, consult the GDB manual (available as on-line \n" @@ -4293,6 +4295,8 @@ captured_main (int argc, char *argv[]) { if (strcmp ("vCont", tok) == 0) disable_packet_vCont = true; + else if (strcmp ("vConts", tok) == 0) + disable_packet_vCont_step = true; else if (strcmp ("Tthread", tok) == 0) disable_packet_Tthread = true; else if (strcmp ("qC", tok) == 0) diff --git a/gdbserver/server.h b/gdbserver/server.h index 5609584..b9dacb8 100644 --- a/gdbserver/server.h +++ b/gdbserver/server.h @@ -68,6 +68,7 @@ void initialize_low (); extern bool server_waiting; extern bool disable_packet_vCont; +extern bool disable_packet_vCont_step; extern bool disable_packet_Tthread; extern bool disable_packet_qC; extern bool disable_packet_qfThreadInfo; |