diff options
author | Jim Ingham <jingham@apple.com> | 2010-08-17 21:54:19 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2010-08-17 21:54:19 +0000 |
commit | 2ecb7421c1a64545f72606348fce5d2ea3594854 (patch) | |
tree | 08f50a83a3a0a4d3c3e5fa76073534d51f8d4a43 /lldb/source/Target/Process.cpp | |
parent | 6d86202fa752a3dffa0a7c70f171c175e6028463 (diff) | |
download | bcm5719-llvm-2ecb7421c1a64545f72606348fce5d2ea3594854.tar.gz bcm5719-llvm-2ecb7421c1a64545f72606348fce5d2ea3594854.zip |
Don't try to get the architecture up front when doing attach -w.
llvm-svn: 111302
Diffstat (limited to 'lldb/source/Target/Process.cpp')
-rw-r--r-- | lldb/source/Target/Process.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index 3171c94652f..38f99094e85 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -1135,13 +1135,16 @@ Process::Attach (const char *process_name, bool wait_for_launch) // Find the process and its architecture. Make sure it matches the architecture // of the current Target, and if not adjust it. - ArchSpec attach_spec = GetArchSpecForExistingProcess (process_name); - if (attach_spec != GetTarget().GetArchitecture()) + if (!wait_for_launch) { - // Set the architecture on the target. - GetTarget().SetArchitecture(attach_spec); + ArchSpec attach_spec = GetArchSpecForExistingProcess (process_name); + if (attach_spec != GetTarget().GetArchitecture()) + { + // Set the architecture on the target. + GetTarget().SetArchitecture(attach_spec); + } } - + Error error (WillAttachToProcessWithName(process_name, wait_for_launch)); if (error.Success()) { |