[Lldb-commits] [PATCH] Display local kernel version only when non-remote in PlatformLinux.
Stephane Sezer
sas at fb.com
Thu Dec 18 12:25:37 PST 2014
REPOSITORY
rL LLVM
http://reviews.llvm.org/D5928
Files:
lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
Index: lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
===================================================================
--- lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
+++ lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
@@ -503,14 +503,20 @@
Platform::GetStatus(strm);
#ifndef LLDB_DISABLE_POSIX
- struct utsname un;
+ // Display local kernel information only when we are running in host mode.
+ // Otherwise, we would end up printing non-Linux information (when running
+ // on Mac OS for example).
+ if (IsHost())
+ {
+ struct utsname un;
- if (uname(&un))
- return;
+ if (uname(&un))
+ return;
- strm.Printf (" Kernel: %s\n", un.sysname);
- strm.Printf (" Release: %s\n", un.release);
- strm.Printf (" Version: %s\n", un.version);
+ strm.Printf (" Kernel: %s\n", un.sysname);
+ strm.Printf (" Release: %s\n", un.release);
+ strm.Printf (" Version: %s\n", un.version);
+ }
#endif
}
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5928.17463.patch
Type: text/x-patch
Size: 1040 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20141218/95504eff/attachment.bin>
More information about the lldb-commits
mailing list