From 7051231709ac438a59b5b4577b93511584885794 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Tue, 8 May 2012 01:45:38 +0000 Subject: Switch over to the "*-apple-macosx" for desktop and "*-apple-ios" for iOS triples. Also make the selection process for auto selecting platforms based off of an arch much better. llvm-svn: 156354 --- lldb/tools/debugserver/source/RNBRemote.cpp | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'lldb/tools/debugserver/source/RNBRemote.cpp') diff --git a/lldb/tools/debugserver/source/RNBRemote.cpp b/lldb/tools/debugserver/source/RNBRemote.cpp index e776cef689e..3900ab949eb 100644 --- a/lldb/tools/debugserver/source/RNBRemote.cpp +++ b/lldb/tools/debugserver/source/RNBRemote.cpp @@ -3553,14 +3553,25 @@ RNBRemote::HandlePacket_qHostInfo (const char *p) strm << "cpusubtype:" << std::dec << cpusubtype << ';'; } - char ostype[64]; - len = sizeof(ostype); - if (::sysctlbyname("kern.ostype", &ostype, &len, NULL, 0) == 0) + // The OS in the triple should be "ios" or "macosx" which doesn't match our + // "Darwin" which gets returned from "kern.ostype", so we need to hardcode + // this for now. + if (cputype == CPU_TYPE_ARM) { - len = strlen(ostype); - std::transform (ostype, ostype + len, ostype, tolower); - strm << "ostype:" << std::dec << ostype << ';'; + strm << "ostype:ios;"; } + else + { + strm << "ostype:macosx;"; + } +// char ostype[64]; +// len = sizeof(ostype); +// if (::sysctlbyname("kern.ostype", &ostype, &len, NULL, 0) == 0) +// { +// len = strlen(ostype); +// std::transform (ostype, ostype + len, ostype, tolower); +// strm << "ostype:" << std::dec << ostype << ';'; +// } strm << "vendor:apple;"; -- cgit v1.2.3