aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
diff options
context:
space:
mode:
authorRobert O'Callahan <robert@ocallahan.org>2024-10-11 09:01:47 +1300
committerGitHub <noreply@github.com>2024-10-10 13:01:47 -0700
commitd5e1de6da96c1ab3b8cae68447e8ed3696a7006e (patch)
treeb9f51773b031f21c8cb9502c7de1879e8436d5b5 /lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
parent29e192a0bfbc75fa66498d3b1c1d1329009f1dd2 (diff)
downloadllvm-d5e1de6da96c1ab3b8cae68447e8ed3696a7006e.zip
llvm-d5e1de6da96c1ab3b8cae68447e8ed3696a7006e.tar.gz
llvm-d5e1de6da96c1ab3b8cae68447e8ed3696a7006e.tar.bz2
[lldb] Implement basic support for reverse-continue (#99736)
This commit only adds support for the `SBProcess::ReverseContinue()` API. A user-accessible command for this will follow in a later commit. This feature depends on a gdbserver implementation (e.g. `rr`) providing support for the `bc` and `bs` packets. `lldb-server` does not support those packets, and there is no plan to change that. So, for testing purposes, `lldbreverse.py` wraps `lldb-server` with a Python implementation of *very limited* record-and-replay functionality for use by *tests only*. The majority of this PR is test infrastructure (about 700 of the 950 lines added).
Diffstat (limited to 'lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp')
-rw-r--r--lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
index 9b2907c..116c43343 100644
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
@@ -402,9 +402,16 @@ lldb_private::DynamicLoader *ProcessKDP::GetDynamicLoader() {
Status ProcessKDP::WillResume() { return Status(); }
-Status ProcessKDP::DoResume() {
+Status ProcessKDP::DoResume(RunDirection direction) {
Status error;
Log *log = GetLog(KDPLog::Process);
+
+ if (direction == RunDirection::eRunReverse) {
+ error.SetErrorStringWithFormatv(
+ "error: {0} does not support reverse execution of processes", GetPluginName());
+ return error;
+ }
+
// Only start the async thread if we try to do any process control
if (!m_async_thread.IsJoinable())
StartAsyncThread();