Hi tfiala,
This is part of the Linux remote platform work. Displaying the local
kernel information when remote debugging doesn't make sense, so we
should verify if we are in host mode before doing so.
http://reviews.llvm.org/D5928
Files:
source/Plugins/Platform/Linux/PlatformLinux.cpp
Index: source/Plugins/Platform/Linux/PlatformLinux.cpp
===================================================================
--- source/Plugins/Platform/Linux/PlatformLinux.cpp
+++ source/Plugins/Platform/Linux/PlatformLinux.cpp
@@ -487,14 +487,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
}
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits