aboutsummaryrefslogtreecommitdiff
path: root/lldb
diff options
context:
space:
mode:
authorTamas Berghammer <tberghammer@google.com>2016-07-07 10:38:05 +0000
committerTamas Berghammer <tberghammer@google.com>2016-07-07 10:38:05 +0000
commit130802b33974b3c3cb85140f4f92128f2bfe65eb (patch)
tree5e62ef1d10e016b0798400395c68761c4f0c61b3 /lldb
parent575f2bb28737bc5bfbe625b470a23be68466bffa (diff)
downloadllvm-130802b33974b3c3cb85140f4f92128f2bfe65eb.zip
llvm-130802b33974b3c3cb85140f4f92128f2bfe65eb.tar.gz
llvm-130802b33974b3c3cb85140f4f92128f2bfe65eb.tar.bz2
Try to fix the OSX build with old SDK after r274725
llvm-svn: 274743
Diffstat (limited to 'lldb')
-rw-r--r--lldb/tools/debugserver/source/MacOSX/MachProcess.mm14
1 files changed, 12 insertions, 2 deletions
diff --git a/lldb/tools/debugserver/source/MacOSX/MachProcess.mm b/lldb/tools/debugserver/source/MacOSX/MachProcess.mm
index c5d1ce0..ab0039e 100644
--- a/lldb/tools/debugserver/source/MacOSX/MachProcess.mm
+++ b/lldb/tools/debugserver/source/MacOSX/MachProcess.mm
@@ -631,8 +631,14 @@ MachProcess::GetMachOInformationFromMemory (nub_addr_t mach_o_header_addr, int w
if (ReadMemory (load_cmds_p, sizeof (struct uuid_command), &uuidcmd) == sizeof (struct uuid_command))
uuid_copy (inf.uuid, uuidcmd.uuid);
}
- if (lc.cmd == LC_VERSION_MIN_IPHONEOS || lc.cmd == LC_VERSION_MIN_MACOSX
- || lc.cmd == LC_VERSION_MIN_WATCHOS || lc.cmd == LC_VERSION_MIN_TVOS)
+ bool lc_cmd_known = lc.cmd == LC_VERSION_MIN_IPHONEOS || lc.cmd == LC_VERSION_MIN_MACOSX;
+#if defined(LC_VERSION_MIN_TVOS)
+ lc_cmd_known |= lc.cmd == LC_VERSION_MIN_TVOS;
+#endif
+#if defined(LC_VERSION_MIN_WATCHOS)
+ lc_cmd_known |= lc.cmd == LC_VERSION_MIN_WATCHOS;
+#endif
+ if (lc_cmd_known)
{
struct version_min_command vers_cmd;
if (ReadMemory (load_cmds_p, sizeof (struct version_min_command), &vers_cmd) != sizeof (struct version_min_command))
@@ -647,12 +653,16 @@ MachProcess::GetMachOInformationFromMemory (nub_addr_t mach_o_header_addr, int w
case LC_VERSION_MIN_MACOSX:
inf.min_version_os_name = "macosx";
break;
+#if defined(LC_VERSION_MIN_TVOS)
case LC_VERSION_MIN_TVOS:
inf.min_version_os_name = "tvos";
break;
+#endif
+#if defined(LC_VERSION_MIN_WATCHOS)
case LC_VERSION_MIN_WATCHOS:
inf.min_version_os_name = "watchos";
break;
+#endif
default:
return false;
}