================
@@ -1363,6 +1374,43 @@ Status ProcessGDBRemote::DoResume() {
       }
     }
 
+    if (direction == RunDirection::eRunReverse && continue_packet_error) {
+      if (num_continue_C_tids > 0 || num_continue_S_tids > 0) {
+        error.SetErrorString("can't deliver signals while running in reverse");
+        LLDB_LOGF(log, "ProcessGDBRemote::DoResumeReverse: Signals not 
supported");
+        return error;
+      }
+
+      if (num_continue_s_tids > 0) {
+        if (num_continue_s_tids > 1) {
+          error.SetErrorString("can't step multiple threads while 
reverse-stepping");
+          LLDB_LOGF(log, "ProcessGDBRemote::DoResumeReverse: can't step 
multiple threads");
+          return error;
+        }
+
+        if (!m_gdb_comm.GetReverseStepSupported()) {
+          error.SetErrorString("target does not support reverse-stepping");
+          LLDB_LOGF(log, "ProcessGDBRemote::DoResumeReverse: target does not 
support reverse-stepping");
+          return error;
+        }
+
+        m_gdb_comm.SetCurrentThreadForRun(m_continue_s_tids.front());
+        continue_packet.PutCString("bs");
+      } else {
+        if (!m_gdb_comm.GetReverseContinueSupported()) {
----------------
jimingham wrote:

Ah, right, I forgot that those were separate capabilities.  I thought it would 
be useful to see that early out, but there's no need to complicate the logic in 
service of that.

https://github.com/llvm/llvm-project/pull/99736
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to