[Lldb-commits] [PATCH] D143104: [lldb/Plugins] Add Attach capabilities to ScriptedProcess

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Feb 9 14:44:09 PST 2023


JDevlieghere added inline comments.


================
Comment at: lldb/include/lldb/Utility/ProcessInfo.h:90
 
+  bool IsScriptedProcess() const;
+
----------------
Can we not ask this from the ScriptedMetadata?


================
Comment at: lldb/source/API/SBAttachInfo.cpp:272
 void SBAttachInfo::SetScriptedProcessClassName(const char *class_name) {
   LLDB_INSTRUMENT_VA(this, class_name);
+  ScriptedMetadataSP metadata_sp = m_opaque_sp->GetScriptedMetadata();
----------------
Newline after `LLDB_INSTRUMENT_VA`


================
Comment at: lldb/source/Plugins/Process/scripted/ScriptedProcess.cpp:216-225
+Status
+ScriptedProcess::DoAttachToProcessWithID(lldb::pid_t pid,
+                                         const ProcessAttachInfo &attach_info) {
+  return DoAttach();
+}
+
+Status ScriptedProcess::DoAttachToProcessWithName(
----------------
Wouldn't you want to at least pass this information down to the scripted process? I could imagine that the PID and the process name, if known, could be pretty interesting to store in the scripted process, even if it always succeeds regardless. 


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

https://reviews.llvm.org/D143104



More information about the lldb-commits mailing list