summaryrefslogtreecommitdiffstats
path: root/lldb/tools/debugserver/source/RNBRemote.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2012-05-08 01:45:38 +0000
committerGreg Clayton <gclayton@apple.com>2012-05-08 01:45:38 +0000
commit7051231709ac438a59b5b4577b93511584885794 (patch)
tree72e0e2af6ce771c65dd9171220075b812ae95f31 /lldb/tools/debugserver/source/RNBRemote.cpp
parentd6560a6384b9dc3c3e7189a60c117b2f0b5c0985 (diff)
downloadbcm5719-llvm-7051231709ac438a59b5b4577b93511584885794.tar.gz
bcm5719-llvm-7051231709ac438a59b5b4577b93511584885794.zip
<rdar://problem/11358639>
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
Diffstat (limited to 'lldb/tools/debugserver/source/RNBRemote.cpp')
-rw-r--r--lldb/tools/debugserver/source/RNBRemote.cpp23
1 files changed, 17 insertions, 6 deletions
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;";
OpenPOWER on IntegriCloud