[PATCH] D82495: [Apple Silicon] Support attach by name correctly for Rosetta.

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 24 13:01:44 PDT 2020


davide created this revision.
davide added reviewers: jasonmolenda, aprantl, friss.

The fix is that of updating attach_info with pid once we discover it, if we specified to attach by name (otherwise, the process is treated as native).


https://reviews.llvm.org/D82495

Files:
  lldb/source/Target/Process.cpp


Index: lldb/source/Target/Process.cpp
===================================================================
--- lldb/source/Target/Process.cpp
+++ lldb/source/Target/Process.cpp
@@ -2901,6 +2901,11 @@
           const uint32_t num_matches = process_infos.size();
           if (num_matches == 1) {
             attach_pid = process_infos[0].GetProcessID();
+            // attach_info will be passed to DoAttachToProcessWithID()
+            // which uses the pid to determine if this is a translated
+            // process so include the pid we just found in the attach_info.
+            attach_info.SetProcessID(attach_pid);
+
             // Fall through and attach using the above process ID
           } else {
             match_info.GetProcessInfo().GetExecutableFile().GetPath(


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82495.273129.patch
Type: text/x-patch
Size: 786 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200624/5c7f972b/attachment-0001.bin>


More information about the llvm-commits mailing list