summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBTarget.cpp
diff options
context:
space:
mode:
authorHan Ming Ong <hanming@apple.com>2013-03-25 20:11:18 +0000
committerHan Ming Ong <hanming@apple.com>2013-03-25 20:11:18 +0000
commitfbd8de83db6648880a808c8ccbd7ab8e14bbe4fa (patch)
tree7ac5d5b4bec4724341f9d14a6d2630d4c27af068 /lldb/source/API/SBTarget.cpp
parent1ff803f47b778098256a235796c2514ca4b9c7c6 (diff)
downloadbcm5719-llvm-fbd8de83db6648880a808c8ccbd7ab8e14bbe4fa.tar.gz
bcm5719-llvm-fbd8de83db6648880a808c8ccbd7ab8e14bbe4fa.zip
<rdar://problem/13404009>
Only get the attach_info's user ID if the supplied user info is invalid. llvm-svn: 177900
Diffstat (limited to 'lldb/source/API/SBTarget.cpp')
-rw-r--r--lldb/source/API/SBTarget.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp
index 739cb4c82ae..8cddd0968b9 100644
--- a/lldb/source/API/SBTarget.cpp
+++ b/lldb/source/API/SBTarget.cpp
@@ -865,13 +865,13 @@ SBTarget::Attach (SBAttachInfo &sb_attach_info, SBError& error)
if (process_sp)
{
ProcessAttachInfo &attach_info = sb_attach_info.ref();
- lldb::pid_t attach_pid = attach_info.GetProcessID();
- if (attach_pid != LLDB_INVALID_PROCESS_ID)
+ if (attach_info.ProcessIDIsValid() && !attach_info.UserIDIsValid())
{
PlatformSP platform_sp = target_sp->GetPlatform();
// See if we can pre-verify if a process exists or not
if (platform_sp && platform_sp->IsConnected())
{
+ lldb::pid_t attach_pid = attach_info.GetProcessID();
ProcessInstanceInfo instance_info;
if (platform_sp->GetProcessInfo(attach_pid, instance_info))
{
OpenPOWER on IntegriCloud