diff options
| author | Han Ming Ong <hanming@apple.com> | 2012-02-25 01:07:38 +0000 |
|---|---|---|
| committer | Han Ming Ong <hanming@apple.com> | 2012-02-25 01:07:38 +0000 |
| commit | 846470482c0726a9d9301fbf05094fdb54d3b793 (patch) | |
| tree | 02ac9b02cdbe36b13ddc47d83acbdebb43290627 /lldb/source/API/SBTarget.cpp | |
| parent | 73dc95c5cd32fc64e2c1578e341f0d724d1eb22f (diff) | |
| download | bcm5719-llvm-846470482c0726a9d9301fbf05094fdb54d3b793.tar.gz bcm5719-llvm-846470482c0726a9d9301fbf05094fdb54d3b793.zip | |
<rdar://problem/3535148>
Added ability to debug root processes on OS X. This uses XPC service that is available on Lion and above only.
llvm-svn: 151419
Diffstat (limited to 'lldb/source/API/SBTarget.cpp')
| -rw-r--r-- | lldb/source/API/SBTarget.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp index 2b6489a80a0..51c0720d86c 100644 --- a/lldb/source/API/SBTarget.cpp +++ b/lldb/source/API/SBTarget.cpp @@ -901,6 +901,14 @@ SBTarget::AttachToProcessWithID ProcessAttachInfo attach_info; attach_info.SetProcessID (pid); + + PlatformSP platform_sp = target_sp->GetPlatform(); + ProcessInstanceInfo instance_info; + if (platform_sp->GetProcessInfo(pid, instance_info)) + { + attach_info.SetUserID(instance_info.GetEffectiveUserID()); + + } error.SetError (process_sp->Attach (attach_info)); // If we are doing synchronous mode, then wait for the // process to stop! |

