In GDBRemoteCommunicationClient::GetHostInfo, don't set the
authorJason Molenda <jmolenda@apple.com>
Thu, 7 Apr 2016 22:00:55 +0000 (22:00 +0000)
committerJason Molenda <jmolenda@apple.com>
Thu, 7 Apr 2016 22:00:55 +0000 (22:00 +0000)
os to "ios" or "macosx" if it is unspecified.  For environments
where there genuinely is no os, we don't want to errantly
convert that to ios/macosx, e.g. bare board debugging.

Change PlatformRemoteiOS, PlatformRemoteAppleWatch, and
PlatformRemoteAppleTV to not create themselves if we have
an unspecified OS.  Same problem - these are not appropriate
platforms for bare board debugging environments.

Have Process::Attach's logging take place if either
process or target logging is enabled.

<rdar://problem/25592378>

llvm-svn: 265732

lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
lldb/source/Target/Process.cpp

index 39494f2..a6bc9b5 100644 (file)
@@ -158,14 +158,6 @@ PlatformRemoteAppleTV::CreateInstance (bool force, const ArchSpec *arch)
                         case llvm::Triple::TvOS:     // This is the right triple value for Apple TV debugging
                             break;
 
-#if defined(__APPLE__)
-                        // Only accept "unknown" for the OS if the host is Apple and
-                        // it "unknown" wasn't specified (it was just returned because it
-                        // was NOT specified)
-                        case llvm::Triple::UnknownOS:
-                            create = !arch->TripleOSWasSpecified();
-                            break;
-#endif
                         default:
                             create = false;
                             break;
index 3c5e776..158a4aa 100644 (file)
@@ -158,14 +158,6 @@ PlatformRemoteAppleWatch::CreateInstance (bool force, const ArchSpec *arch)
                         case llvm::Triple::WatchOS:     // This is the right triple value for Apple Watch debugging
                             break;
 
-#if defined(__APPLE__)
-                        // Only accept "unknown" for the OS if the host is Apple and
-                        // it "unknown" wasn't specified (it was just returned because it
-                        // was NOT specified)
-                        case llvm::Triple::UnknownOS:
-                            create = !arch->TripleOSWasSpecified();
-                            break;
-#endif
                         default:
                             create = false;
                             break;
index 75afa90..797a1cc 100644 (file)
@@ -142,14 +142,6 @@ PlatformRemoteiOS::CreateInstance (bool force, const ArchSpec *arch)
                         case llvm::Triple::IOS:     // This is the right triple value for iOS debugging
                             break;
 
-#if defined(__APPLE__)
-                        // Only accept "unknown" for the OS if the host is Apple and
-                        // it "unknown" wasn't specified (it was just returned because it
-                        // was NOT specified)
-                        case llvm::Triple::UnknownOS:
-                            create = !arch->TripleOSWasSpecified();
-                            break;
-#endif
                         default:
                             create = false;
                             break;
index 472c6aa..f674d29 100644 (file)
@@ -2143,20 +2143,6 @@ GDBRemoteCommunicationClient::GetHostInfo (bool force)
                                 assert (byte_order == m_host_arch.GetByteOrder());
                             }
 
-                            if (!os_name.empty() && vendor_name.compare("apple") == 0 && os_name.find("darwin") == 0)
-                            {
-                                switch (m_host_arch.GetMachine())
-                                {
-                                case llvm::Triple::aarch64:
-                                case llvm::Triple::arm:
-                                case llvm::Triple::thumb:
-                                    os_name = "ios";
-                                    break;
-                                default:
-                                    os_name = "macosx";
-                                    break;
-                                }
-                            }
                             if (!vendor_name.empty())
                                 m_host_arch.GetTriple().setVendorName (llvm::StringRef (vendor_name));
                             if (!os_name.empty())
index be21df5..34557e0 100644 (file)
@@ -3379,7 +3379,7 @@ Process::Attach (ProcessAttachInfo &attach_info)
 void
 Process::CompleteAttach ()
 {
-    Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
+    Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_TARGET));
     if (log)
         log->Printf ("Process::%s()", __FUNCTION__);