[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Tue Dec 17 02:00:06 PST 2024


================
@@ -199,6 +199,20 @@ 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();
+  }
----------------
labath wrote:

We don't use (aren't supposed to use?) braces on short statements like these: https://llvm.org/docs/CodingStandards.html#don-t-use-else-after-a-return

```suggestion
  if (m_supports_reverse_continue == eLazyBoolCalculate)
    GetRemoteQSupported();
  return m_supports_reverse_continue == eLazyBoolYes;
}

bool GDBRemoteCommunicationClient::GetReverseStepSupported() {
  if (m_supports_reverse_step == eLazyBoolCalculate)
    GetRemoteQSupported();
```

https://github.com/llvm/llvm-project/pull/112079


More information about the lldb-commits mailing list