diff options
Diffstat (limited to 'lldb/source/API/SBTarget.cpp')
-rw-r--r-- | lldb/source/API/SBTarget.cpp | 4 |
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)) { |