summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/Process.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2014-08-02 00:33:35 +0000
committerJim Ingham <jingham@apple.com>2014-08-02 00:33:35 +0000
commitbb006ce29171aef3eb7bdebf52fcd0a5c21385fe (patch)
tree5265d4909dbacd5ca17b27f2b80b1618a739fdd4 /lldb/source/Target/Process.cpp
parentee1a1fc90043cc520e778ccde5241f451b9cc40c (diff)
downloadbcm5719-llvm-bb006ce29171aef3eb7bdebf52fcd0a5c21385fe.tar.gz
bcm5719-llvm-bb006ce29171aef3eb7bdebf52fcd0a5c21385fe.zip
After you attach, give the process plugin a chance to report back (through
DidAttach) the architecture of the binary you attached to. <rdar://problem/17891396> llvm-svn: 214603
Diffstat (limited to 'lldb/source/Target/Process.cpp')
-rw-r--r--lldb/source/Target/Process.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index cdbbe8df129..b4e88bd453f 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -3063,7 +3063,11 @@ Process::CompleteAttach ()
{
// Let the process subclass figure out at much as it can about the process
// before we go looking for a dynamic loader plug-in.
- DidAttach();
+ ArchSpec process_arch;
+ DidAttach(process_arch);
+
+ if (process_arch.IsValid())
+ m_target.SetArchitecture(process_arch);
// We just attached. If we have a platform, ask it for the process architecture, and if it isn't
// the same as the one we've already set, switch architectures.
@@ -3082,7 +3086,7 @@ Process::CompleteAttach ()
m_target.SetArchitecture(platform_arch);
}
}
- else
+ else if (!process_arch.IsValid())
{
ProcessInstanceInfo process_info;
platform_sp->GetProcessInfo (GetID(), process_info);
OpenPOWER on IntegriCloud