[Lldb-commits] [lldb] r214223 - Resolve the executable _before_ we try to get the module specifications.
Greg Clayton
gclayton at apple.com
Tue Jul 29 14:27:21 PDT 2014
Author: gclayton
Date: Tue Jul 29 16:27:21 2014
New Revision: 214223
URL: http://llvm.org/viewvc/llvm-project?rev=214223&view=rev
Log:
Resolve the executable _before_ we try to get the module specifications.
Also fixed the host 32 and 64 bit arch to return "x86_64-apple-macosx" again instead of "x86_64-apple-" (unspecified OS) after recent changes.
<rdar://problem/17845078>
Modified:
lldb/trunk/source/Host/common/Host.cpp
lldb/trunk/source/Target/TargetList.cpp
Modified: lldb/trunk/source/Host/common/Host.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/Host.cpp?rev=214223&r1=214222&r2=214223&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/Host.cpp (original)
+++ lldb/trunk/source/Host/common/Host.cpp Tue Jul 29 16:27:21 2014
@@ -379,6 +379,17 @@ Host::GetArchitecture (SystemDefaultArch
cpusubtype32 = CPU_SUBTYPE_ARM_V7S;
#endif
g_host_arch_32.SetArchitecture (eArchTypeMachO, cputype & ~(CPU_ARCH_MASK), cpusubtype32);
+
+ if (cputype == CPU_TYPE_ARM || cputype == CPU_TYPE_ARM64)
+ {
+ g_host_arch_32.GetTriple().setOS(llvm::Triple::IOS);
+ g_host_arch_64.GetTriple().setOS(llvm::Triple::IOS);
+ }
+ else
+ {
+ g_host_arch_32.GetTriple().setOS(llvm::Triple::MacOSX);
+ g_host_arch_64.GetTriple().setOS(llvm::Triple::MacOSX);
+ }
}
else
{
Modified: lldb/trunk/source/Target/TargetList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/TargetList.cpp?rev=214223&r1=214222&r2=214223&view=diff
==============================================================================
--- lldb/trunk/source/Target/TargetList.cpp (original)
+++ lldb/trunk/source/Target/TargetList.cpp Tue Jul 29 16:27:21 2014
@@ -92,6 +92,11 @@ TargetList::CreateTarget (Debugger &debu
ModuleSpecList module_specs;
ModuleSpec module_spec;
module_spec.GetFileSpec().SetFile(user_exe_path, true);
+
+ // Resolve the executable in case we are given a path to a application bundle
+ // like a .app bundle on MacOSX
+ Host::ResolveExecutableInBundle (module_spec.GetFileSpec());
+
lldb::offset_t file_offset = 0;
lldb::offset_t file_size = 0;
const size_t num_specs = ObjectFile::GetModuleSpecifications (module_spec.GetFileSpec(), file_offset, file_size, module_specs);
More information about the lldb-commits
mailing list