[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).
This commit is contained in:
Robert O'Callahan
2024-10-11 09:01:47 +13:00
committed by GitHub
parent 29e192a0bf
commit d5e1de6da9
32 changed files with 978 additions and 44 deletions

View File

@@ -182,10 +182,15 @@ void ScriptedProcess::DidResume() {
m_pid = GetInterface().GetProcessID();
}
Status ScriptedProcess::DoResume() {
Status ScriptedProcess::DoResume(RunDirection direction) {
LLDB_LOGF(GetLog(LLDBLog::Process), "ScriptedProcess::%s resuming process", __FUNCTION__);
return GetInterface().Resume();
if (direction == RunDirection::eRunForward) {
return GetInterface().Resume();
} else {
return Status::FromErrorStringWithFormatv(
"error: {0} does not support reverse execution of processes", GetPluginName());
}
}
Status ScriptedProcess::DoAttach(const ProcessAttachInfo &attach_info) {