[Lldb-commits] [lldb] r265732 - In GDBRemoteCommunicationClient::GetHostInfo, don't set the

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Thu Apr 7 15:00:55 PDT 2016


Author: jmolenda
Date: Thu Apr  7 17:00:55 2016
New Revision: 265732

URL: http://llvm.org/viewvc/llvm-project?rev=265732&view=rev
Log:
In GDBRemoteCommunicationClient::GetHostInfo, don't set the
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> 

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

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp?rev=265732&r1=265731&r2=265732&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp Thu Apr  7 17:00:55 2016
@@ -158,14 +158,6 @@ PlatformRemoteAppleTV::CreateInstance (b
                         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;

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp?rev=265732&r1=265731&r2=265732&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp Thu Apr  7 17:00:55 2016
@@ -158,14 +158,6 @@ PlatformRemoteAppleWatch::CreateInstance
                         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;

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp?rev=265732&r1=265731&r2=265732&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp Thu Apr  7 17:00:55 2016
@@ -142,14 +142,6 @@ PlatformRemoteiOS::CreateInstance (bool
                         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;

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp?rev=265732&r1=265731&r2=265732&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp Thu Apr  7 17:00:55 2016
@@ -2143,20 +2143,6 @@ GDBRemoteCommunicationClient::GetHostInf
                                 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())

Modified: lldb/trunk/source/Target/Process.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=265732&r1=265731&r2=265732&view=diff
==============================================================================
--- lldb/trunk/source/Target/Process.cpp (original)
+++ lldb/trunk/source/Target/Process.cpp Thu Apr  7 17:00:55 2016
@@ -3379,7 +3379,7 @@ Process::Attach (ProcessAttachInfo &atta
 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__);
 




More information about the lldb-commits mailing list