[Lldb-commits] [PATCH] D118055: [lldb] [gdb-remote] Support getting siginfo via API

Michał Górny via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 27 03:45:25 PST 2022


mgorny added inline comments.


================
Comment at: lldb/source/API/SBThread.cpp:1326-1334
+  if (!process.IsValid()) {
+    error.SetErrorString("no process");
+    return value;
+  }
+  SBTarget target = process.GetTarget();
+  if (!target.IsValid()) {
+    error.SetErrorString("unable to get target");
----------------
labath wrote:
> It should be fine to chain these, relying on the fact that the SB methods on an empty object will return another empty object.
I suppose I could avoid `process` and switch to getting byte order from target but tbh I think the explicit error message for lack of process is worth keeping the split.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118055/new/

https://reviews.llvm.org/D118055



More information about the lldb-commits mailing list