[Lldb-commits] [lldb] r156119 - in /lldb/branches/lldb-platform-work: ./ examples/python/crashlog.py source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp source/Target/Process.cpp
Johnny Chen
johnny.chen at apple.com
Thu May 3 15:47:58 PDT 2012
Author: johnny
Date: Thu May 3 17:47:57 2012
New Revision: 156119
URL: http://llvm.org/viewvc/llvm-project?rev=156119&view=rev
Log:
Merge changes from ToT trunk:
svn merge -r 156101:156116 https://johnny@llvm.org/svn/llvm-project/lldb/trunk .
Modified:
lldb/branches/lldb-platform-work/ (props changed)
lldb/branches/lldb-platform-work/examples/python/crashlog.py
lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/branches/lldb-platform-work/source/Target/Process.cpp
Propchange: lldb/branches/lldb-platform-work/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 3 17:47:57 2012
@@ -1 +1 @@
-/lldb/trunk:154223-156101
+/lldb/trunk:154223-156116
Modified: lldb/branches/lldb-platform-work/examples/python/crashlog.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/python/crashlog.py?rev=156119&r1=156118&r2=156119&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/python/crashlog.py (original)
+++ lldb/branches/lldb-platform-work/examples/python/crashlog.py Thu May 3 17:47:57 2012
@@ -469,7 +469,7 @@
# Create a new debugger instance
lldb.debugger = lldb.SBDebugger.Create()
SymbolicateCrashLog (sys.argv[1:])
-elif lldb.debugger:
+elif getattr(lldb, 'debugger', None):
lldb.debugger.HandleCommand('command script add -f lldb.macosx.crashlog.Symbolicate crashlog')
print '"crashlog" command installed, type "crashlog --help" for detailed help'
Modified: lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=156119&r1=156118&r2=156119&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Thu May 3 17:47:57 2012
@@ -457,6 +457,14 @@
else
error.SetErrorStringWithFormat ("Process %llu was reported after connecting to '%s', but no stop reply packet was received", pid, remote_url);
}
+
+ if (error.Success()
+ && !GetTarget().GetArchitecture().IsValid()
+ && m_gdb_comm.GetHostArchitecture().IsValid())
+ {
+ GetTarget().SetArchitecture(m_gdb_comm.GetHostArchitecture());
+ }
+
return error;
}
Modified: lldb/branches/lldb-platform-work/source/Target/Process.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Target/Process.cpp?rev=156119&r1=156118&r2=156119&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Target/Process.cpp (original)
+++ lldb/branches/lldb-platform-work/source/Target/Process.cpp Thu May 3 17:47:57 2012
@@ -2741,11 +2741,23 @@
assert (platform_sp.get());
if (platform_sp)
{
- ProcessInstanceInfo process_info;
- platform_sp->GetProcessInfo (GetID(), process_info);
- const ArchSpec &process_arch = process_info.GetArchitecture();
- if (process_arch.IsValid() && m_target.GetArchitecture() != process_arch)
- m_target.SetArchitecture (process_arch);
+ const ArchSpec &target_arch = m_target.GetArchitecture();
+ if (target_arch.IsValid() && !platform_sp->IsCompatibleWithArchitecture (target_arch))
+ {
+ platform_sp = platform_sp->GetPlatformForArchitecture (target_arch);
+ if (platform_sp)
+ {
+ m_target.SetPlatform (platform_sp);
+ }
+ }
+ else
+ {
+ ProcessInstanceInfo process_info;
+ platform_sp->GetProcessInfo (GetID(), process_info);
+ const ArchSpec &process_arch = process_info.GetArchitecture();
+ if (process_arch.IsValid() && m_target.GetArchitecture() != process_arch)
+ m_target.SetArchitecture (process_arch);
+ }
}
// We have completed the attach, now it is time to find the dynamic loader
More information about the lldb-commits
mailing list