aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2025-03-17 16:06:25 +0100
committerGitHub <noreply@github.com>2025-03-17 16:06:25 +0100
commit1b237198dc9d308c6d589e01637ec7496b48b3e0 (patch)
treea843c0d0cbde337e75fbabd9f1acfc8f6dad061e /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
parent83356f3b62e95b980ca48083aafa4a1b4040d4c9 (diff)
downloadllvm-1b237198dc9d308c6d589e01637ec7496b48b3e0.zip
llvm-1b237198dc9d308c6d589e01637ec7496b48b3e0.tar.gz
llvm-1b237198dc9d308c6d589e01637ec7496b48b3e0.tar.bz2
Reapply "[lldb] Implement basic support for reverse-continue (#125242)" (again) (#128156)
This reverts commit https://github.com/llvm/llvm-project/commit/87b7f63a117c340a6d9ca47959335fd7ef6c7ad2, reapplying https://github.com/llvm/llvm-project/commit/7e66cf74fb4e6a103f923e34700a7b6f20ac2a9b with a small (and probably temporary) change to generate more debug info to help with diagnosing buildbot issues.
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
index 581dd8f..501670d 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
@@ -199,6 +199,18 @@ uint64_t GDBRemoteCommunicationClient::GetRemoteMaxPacketSize() {
return m_max_packet_size;
}
+bool GDBRemoteCommunicationClient::GetReverseContinueSupported() {
+ if (m_supports_reverse_continue == eLazyBoolCalculate)
+ GetRemoteQSupported();
+ return m_supports_reverse_continue == eLazyBoolYes;
+}
+
+bool GDBRemoteCommunicationClient::GetReverseStepSupported() {
+ if (m_supports_reverse_step == eLazyBoolCalculate)
+ GetRemoteQSupported();
+ return m_supports_reverse_step == eLazyBoolYes;
+}
+
bool GDBRemoteCommunicationClient::QueryNoAckModeSupported() {
if (m_supports_not_sending_acks == eLazyBoolCalculate) {
m_send_acks = true;
@@ -295,6 +307,8 @@ void GDBRemoteCommunicationClient::ResetDiscoverableSettings(bool did_exec) {
m_supports_augmented_libraries_svr4_read = eLazyBoolCalculate;
m_uses_native_signals = eLazyBoolCalculate;
m_x_packet_state.reset();
+ m_supports_reverse_continue = eLazyBoolCalculate;
+ m_supports_reverse_step = eLazyBoolCalculate;
m_supports_qProcessInfoPID = true;
m_supports_qfProcessInfo = true;
m_supports_qUserName = true;
@@ -349,6 +363,8 @@ void GDBRemoteCommunicationClient::GetRemoteQSupported() {
m_supports_qSaveCore = eLazyBoolNo;
m_uses_native_signals = eLazyBoolNo;
m_x_packet_state.reset();
+ m_supports_reverse_continue = eLazyBoolNo;
+ m_supports_reverse_step = eLazyBoolNo;
m_max_packet_size = UINT64_MAX; // It's supposed to always be there, but if
// not, we assume no limit
@@ -404,6 +420,10 @@ void GDBRemoteCommunicationClient::GetRemoteQSupported() {
m_uses_native_signals = eLazyBoolYes;
else if (x == "binary-upload+")
m_x_packet_state = xPacketState::Prefixed;
+ else if (x == "ReverseContinue+")
+ m_supports_reverse_continue = eLazyBoolYes;
+ else if (x == "ReverseStep+")
+ m_supports_reverse_step = eLazyBoolYes;
// Look for a list of compressions in the features list e.g.
// qXfer:features:read+;PacketSize=20000;qEcho+;SupportedCompressions=zlib-
// deflate,lzma