[Lldb-commits] [PATCH] D139252: [lldb/Plugins] Introduce Scripted Platform Plugin

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Dec 15 11:06:20 PST 2022


labath added inline comments.


================
Comment at: lldb/source/Plugins/Platform/scripted/ScriptedPlatform.cpp:75
+  Status error;
+  ScriptedPlatform *scripted_platform =
+      new ScriptedPlatform(const_cast<Debugger *>(debugger), metadata, error);
----------------
Use a shared_ptr directly here. This currently leaks platform object in the error.Fail() case.


================
Comment at: lldb/source/Plugins/Platform/scripted/ScriptedPlatform.cpp:261
+  if (!proc_info_or_error) {
+    llvm::consumeError(proc_info_or_error.takeError());
+    return false;
----------------
When I saw the amount of effort put into the error messages in the ParseProcessFunction, I assumed you are going to give those messages to the user somehow, but now I see they are just thrown away. Do you plan to change that? Maybe you could at least log (LLDB_LOG_ERROR) them?


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

https://reviews.llvm.org/D139252



More information about the lldb-commits mailing list