summaryrefslogtreecommitdiffstats
path: root/lldb/tools/debugserver/source/RNBRemote.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2015-05-07 18:42:03 +0000
committerGreg Clayton <gclayton@apple.com>2015-05-07 18:42:03 +0000
commit3d415cd2cd7949340c3cf181b8bd5780a9c32d91 (patch)
treeb6d96e44170188e06950d99ebb0c65cbea41cfa6 /lldb/tools/debugserver/source/RNBRemote.cpp
parent9a6caea967422dd277dfead1a958496e5b63d17f (diff)
downloadbcm5719-llvm-3d415cd2cd7949340c3cf181b8bd5780a9c32d91.tar.gz
bcm5719-llvm-3d415cd2cd7949340c3cf181b8bd5780a9c32d91.zip
qProcessInfo was not correctly detecting the sysctl value for "hw.cpu64bit_capable".
It was just detecting the existance of the value. If it gets the value correctly, we need to check that it is non-zero to see if cpu64bit_capable should be true. <rdar://problem/20857426> llvm-svn: 236759
Diffstat (limited to 'lldb/tools/debugserver/source/RNBRemote.cpp')
-rw-r--r--lldb/tools/debugserver/source/RNBRemote.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lldb/tools/debugserver/source/RNBRemote.cpp b/lldb/tools/debugserver/source/RNBRemote.cpp
index 3acf7b046d5..88ff9242fdb 100644
--- a/lldb/tools/debugserver/source/RNBRemote.cpp
+++ b/lldb/tools/debugserver/source/RNBRemote.cpp
@@ -4387,13 +4387,11 @@ RNBRemote::HandlePacket_qProcessInfo (const char *p)
rep << "cputype:" << std::hex << cputype << ";";
}
- bool host_cpu_is_64bit;
+ bool host_cpu_is_64bit = false;
uint32_t is64bit_capable;
size_t is64bit_capable_len = sizeof (is64bit_capable);
if (sysctlbyname("hw.cpu64bit_capable", &is64bit_capable, &is64bit_capable_len, NULL, 0) == 0)
- host_cpu_is_64bit = true;
- else
- host_cpu_is_64bit = false;
+ host_cpu_is_64bit = is64bit_capable != 0;
uint32_t cpusubtype;
size_t cpusubtype_len = sizeof(cpusubtype);
OpenPOWER on IntegriCloud