diff --git a/lldb/packages/Python/lldbsuite/test/commands/platform/basic/TestPlatformCommand.py b/lldb/packages/Python/lldbsuite/test/commands/platform/basic/TestPlatformCommand.py index ab45b221c94d0..9c16da8ad0059 100644 --- a/lldb/packages/Python/lldbsuite/test/commands/platform/basic/TestPlatformCommand.py +++ b/lldb/packages/Python/lldbsuite/test/commands/platform/basic/TestPlatformCommand.py @@ -42,8 +42,9 @@ def test_status(self): 'Platform', 'Triple', 'OS Version', + 'Hostname', 'Kernel', - 'Hostname']) + ]) @expectedFailureAll(oslist=["windows"]) @no_debug_info_test diff --git a/lldb/source/Target/Platform.cpp b/lldb/source/Target/Platform.cpp index 0ad3f36266c31..3739ccd7edc6f 100644 --- a/lldb/source/Target/Platform.cpp +++ b/lldb/source/Target/Platform.cpp @@ -421,9 +421,6 @@ void Platform::GetStatus(Stream &strm) { strm.EOL(); } - if (GetOSKernelDescription(s)) - strm.Printf(" Kernel: %s\n", s.c_str()); - if (IsHost()) { strm.Printf(" Hostname: %s\n", GetHostname()); } else { @@ -443,6 +440,9 @@ void Platform::GetStatus(Stream &strm) { if (!specific_info.empty()) strm.Printf("Platform-specific connection: %s\n", specific_info.c_str()); + + if (GetOSKernelDescription(s)) + strm.Printf(" Kernel: %s\n", s.c_str()); } llvm::VersionTuple Platform::GetOSVersion(Process *process) {