diff options
author | Jason Molenda <jmolenda@apple.com> | 2018-02-05 23:10:51 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 2018-02-05 23:10:51 +0000 |
commit | 8c0d106f5dc81106392fde6dd74272fc02d19d5b (patch) | |
tree | cb2a27773712b0e8bb5091cc785d4ef39fbd1ad4 | |
parent | ea21100272c1076a34c34624a659a5a8e8ccaf76 (diff) | |
download | bcm5719-llvm-8c0d106f5dc81106392fde6dd74272fc02d19d5b.tar.gz bcm5719-llvm-8c0d106f5dc81106392fde6dd74272fc02d19d5b.zip |
Fix the cputype comparison in GDBRemoteCommunicationServerCommon::Handle_qHostInfo
to use Mach-O cpu types instead of the ArchSpec enum value, and handle the case
of bridgeos.
llvm-svn: 324287
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp index f098b3068ff..1791b8733f3 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp @@ -36,6 +36,7 @@ #include "lldb/Utility/Endian.h" #include "lldb/Utility/JSON.h" #include "lldb/Utility/Log.h" +#include "lldb/Utility/SafeMachO.h" #include "lldb/Utility/StreamGDBRemote.h" #include "lldb/Utility/StreamString.h" #include "llvm/ADT/Triple.h" @@ -218,12 +219,15 @@ GDBRemoteCommunicationServerCommon::Handle_qHostInfo( if (sub != LLDB_INVALID_CPUTYPE) response.Printf("cpusubtype:%u;", sub); - if (cpu == ArchSpec::kCore_arm_any) { + if (cpu == llvm::MachO::CPU_TYPE_ARM + || cpu == llvm::MachO::CPU_TYPE_ARM64) { // Indicate the OS type. #if defined(TARGET_OS_TV) && TARGET_OS_TV == 1 response.PutCString("ostype:tvos;"); #elif defined(TARGET_OS_WATCH) && TARGET_OS_WATCH == 1 response.PutCString("ostype:watchos;"); +#elif defined(TARGET_OS_BRIDGE) && TARGET_OS_BRIDGE == 1 + response.PutCString("ostype:bridgeos;"); #else response.PutCString("ostype:ios;"); #endif |