diff options
8 files changed, 194 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp index fda46375560..f537934a917 100644 --- a/lldb/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp +++ b/lldb/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp @@ -16,6 +16,7 @@ #include "lldb/Breakpoint/BreakpointLocation.h" #include "lldb/Core/ArchSpec.h" #include "lldb/Core/Error.h" +#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleList.h" #include "lldb/Core/ModuleSpec.h" @@ -68,6 +69,20 @@ PlatformAppleTVSimulator::Terminate () PlatformSP PlatformAppleTVSimulator::CreateInstance (bool force, const ArchSpec *arch) { + Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_PLATFORM)); + if (log) + { + const char *arch_name; + if (arch && arch->GetArchitectureName ()) + arch_name = arch->GetArchitectureName (); + else + arch_name = "<null>"; + + const char *triple_cstr = arch ? arch->GetTriple ().getTriple ().c_str() : "<null>"; + + log->Printf ("PlatformAppleTVSimulator::%s(force=%s, arch={%s,%s})", __FUNCTION__, force ? "true" : "false", arch_name, triple_cstr); + } + bool create = force; if (create == false && arch && arch->IsValid()) { @@ -121,7 +136,16 @@ PlatformAppleTVSimulator::CreateInstance (bool force, const ArchSpec *arch) } } if (create) + { + if (log) + log->Printf ("PlatformAppleTVSimulator::%s() creating platform", __FUNCTION__); + return PlatformSP(new PlatformAppleTVSimulator ()); + } + + if (log) + log->Printf ("PlatformAppleTVSimulator::%s() aborting creation of platform", __FUNCTION__); + return PlatformSP(); } diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp index 03bfb5fbbe2..ea8e789b292 100644 --- a/lldb/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp +++ b/lldb/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp @@ -16,6 +16,7 @@ #include "lldb/Breakpoint/BreakpointLocation.h" #include "lldb/Core/ArchSpec.h" #include "lldb/Core/Error.h" +#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleList.h" #include "lldb/Core/ModuleSpec.h" @@ -68,6 +69,20 @@ PlatformAppleWatchSimulator::Terminate () PlatformSP PlatformAppleWatchSimulator::CreateInstance (bool force, const ArchSpec *arch) { + Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_PLATFORM)); + if (log) + { + const char *arch_name; + if (arch && arch->GetArchitectureName ()) + arch_name = arch->GetArchitectureName (); + else + arch_name = "<null>"; + + const char *triple_cstr = arch ? arch->GetTriple ().getTriple ().c_str() : "<null>"; + + log->Printf ("PlatformAppleWatchSimulator::%s(force=%s, arch={%s,%s})", __FUNCTION__, force ? "true" : "false", arch_name, triple_cstr); + } + bool create = force; if (create == false && arch && arch->IsValid()) { @@ -121,7 +136,16 @@ PlatformAppleWatchSimulator::CreateInstance (bool force, const ArchSpec *arch) } } if (create) + { + if (log) + log->Printf ("PlatformAppleWatchSimulator::%s() creating platform", __FUNCTION__); + return PlatformSP(new PlatformAppleWatchSimulator ()); + } + + if (log) + log->Printf ("PlatformAppleWatchSimulator::%s() aborting creation of platform", __FUNCTION__); + return PlatformSP(); } diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp index 65bbda35872..a502aa03eb2 100644 --- a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp +++ b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp @@ -19,6 +19,7 @@ #include "lldb/Breakpoint/BreakpointLocation.h" #include "lldb/Core/ArchSpec.h" #include "lldb/Core/Error.h" +#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleList.h" #include "lldb/Core/ModuleSpec.h" @@ -79,11 +80,29 @@ PlatformDarwinKernel::Terminate () PlatformSP PlatformDarwinKernel::CreateInstance (bool force, const ArchSpec *arch) { + Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_PLATFORM)); + if (log) + { + const char *arch_name; + if (arch && arch->GetArchitectureName ()) + arch_name = arch->GetArchitectureName (); + else + arch_name = "<null>"; + + const char *triple_cstr = arch ? arch->GetTriple ().getTriple ().c_str() : "<null>"; + + log->Printf ("PlatformDarwinKernel::%s(force=%s, arch={%s,%s})", __FUNCTION__, force ? "true" : "false", arch_name, triple_cstr); + } + // This is a special plugin that we don't want to activate just based on an ArchSpec for normal // userland debugging. It is only useful in kernel debug sessions and the DynamicLoaderDarwinPlugin // (or a user doing 'platform select') will force the creation of this Platform plugin. if (force == false) + { + if (log) + log->Printf ("PlatformDarwinKernel::%s() aborting creation of platform because force == false", __FUNCTION__); return PlatformSP(); + } bool create = force; LazyBool is_ios_debug_session = eLazyBoolCalculate; @@ -150,7 +169,16 @@ PlatformDarwinKernel::CreateInstance (bool force, const ArchSpec *arch) } } if (create) + { + if (log) + log->Printf ("PlatformDarwinKernel::%s() creating platform", __FUNCTION__); + return PlatformSP(new PlatformDarwinKernel (is_ios_debug_session)); + } + + if (log) + log->Printf ("PlatformDarwinKernel::%s() aborting creation of platform", __FUNCTION__); + return PlatformSP(); } diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp index e35115a9640..7e15facc1b0 100644 --- a/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp +++ b/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp @@ -19,6 +19,7 @@ #include "lldb/Breakpoint/BreakpointLocation.h" #include "lldb/Core/Error.h" #include "lldb/Core/DataBufferHeap.h" +#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleList.h" #include "lldb/Core/ModuleSpec.h" @@ -73,6 +74,20 @@ PlatformMacOSX::Terminate () PlatformSP PlatformMacOSX::CreateInstance (bool force, const ArchSpec *arch) { + Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_PLATFORM)); + if (log) + { + const char *arch_name; + if (arch && arch->GetArchitectureName ()) + arch_name = arch->GetArchitectureName (); + else + arch_name = "<null>"; + + const char *triple_cstr = arch ? arch->GetTriple ().getTriple ().c_str() : "<null>"; + + log->Printf ("PlatformMacOSX::%s(force=%s, arch={%s,%s})", __FUNCTION__, force ? "true" : "false", arch_name, triple_cstr); + } + // The only time we create an instance is when we are creating a remote // macosx platform const bool is_host = false; @@ -121,7 +136,15 @@ PlatformMacOSX::CreateInstance (bool force, const ArchSpec *arch) } } if (create) + { + if (log) + log->Printf ("PlatformMacOSX::%s() creating platform", __FUNCTION__); return PlatformSP(new PlatformMacOSX (is_host)); + } + + if (log) + log->Printf ("PlatformMacOSX::%s() aborting creation of platform", __FUNCTION__); + return PlatformSP(); } diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp index 4e0b46ec424..04231f27ff9 100644 --- a/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp +++ b/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp @@ -19,6 +19,7 @@ #include "lldb/Breakpoint/BreakpointLocation.h" #include "lldb/Core/ArchSpec.h" #include "lldb/Core/Error.h" +#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleList.h" #include "lldb/Core/ModuleSpec.h" @@ -107,6 +108,20 @@ PlatformRemoteAppleTV::Terminate () PlatformSP PlatformRemoteAppleTV::CreateInstance (bool force, const ArchSpec *arch) { + Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_PLATFORM)); + if (log) + { + const char *arch_name; + if (arch && arch->GetArchitectureName ()) + arch_name = arch->GetArchitectureName (); + else + arch_name = "<null>"; + + const char *triple_cstr = arch ? arch->GetTriple ().getTriple ().c_str() : "<null>"; + + log->Printf ("PlatformRemoteAppleTV::%s(force=%s, arch={%s,%s})", __FUNCTION__, force ? "true" : "false", arch_name, triple_cstr); + } + bool create = force; if (!create && arch && arch->IsValid()) { @@ -164,7 +179,16 @@ PlatformRemoteAppleTV::CreateInstance (bool force, const ArchSpec *arch) } if (create) + { + if (log) + log->Printf ("PlatformRemoteAppleTV::%s() creating platform", __FUNCTION__); + return lldb::PlatformSP(new PlatformRemoteAppleTV ()); + } + + if (log) + log->Printf ("PlatformRemoteAppleTV::%s() aborting creation of platform", __FUNCTION__); + return lldb::PlatformSP(); } diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp index 83645b9a212..808fd96a528 100644 --- a/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp +++ b/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp @@ -19,6 +19,7 @@ #include "lldb/Breakpoint/BreakpointLocation.h" #include "lldb/Core/ArchSpec.h" #include "lldb/Core/Error.h" +#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleList.h" #include "lldb/Core/ModuleSpec.h" @@ -107,6 +108,20 @@ PlatformRemoteAppleWatch::Terminate () PlatformSP PlatformRemoteAppleWatch::CreateInstance (bool force, const ArchSpec *arch) { + Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_PLATFORM)); + if (log) + { + const char *arch_name; + if (arch && arch->GetArchitectureName ()) + arch_name = arch->GetArchitectureName (); + else + arch_name = "<null>"; + + const char *triple_cstr = arch ? arch->GetTriple ().getTriple ().c_str() : "<null>"; + + log->Printf ("PlatformRemoteAppleWatch::%s(force=%s, arch={%s,%s})", __FUNCTION__, force ? "true" : "false", arch_name, triple_cstr); + } + bool create = force; if (!create && arch && arch->IsValid()) { @@ -172,7 +187,16 @@ PlatformRemoteAppleWatch::CreateInstance (bool force, const ArchSpec *arch) #endif if (create) + { + if (log) + log->Printf ("PlatformRemoteAppleWatch::%s() creating platform", __FUNCTION__); + return lldb::PlatformSP(new PlatformRemoteAppleWatch ()); + } + + if (log) + log->Printf ("PlatformRemoteAppleWatch::%s() aborting creation of platform", __FUNCTION__); + return lldb::PlatformSP(); } diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp index becfe96fc56..75afa9019dc 100644 --- a/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp +++ b/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp @@ -91,6 +91,20 @@ PlatformRemoteiOS::Terminate () PlatformSP PlatformRemoteiOS::CreateInstance (bool force, const ArchSpec *arch) { + Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_PLATFORM)); + if (log) + { + const char *arch_name; + if (arch && arch->GetArchitectureName ()) + arch_name = arch->GetArchitectureName (); + else + arch_name = "<null>"; + + const char *triple_cstr = arch ? arch->GetTriple ().getTriple ().c_str() : "<null>"; + + log->Printf ("PlatformRemoteiOS::%s(force=%s, arch={%s,%s})", __FUNCTION__, force ? "true" : "false", arch_name, triple_cstr); + } + bool create = force; if (create == false && arch && arch->IsValid()) { @@ -149,7 +163,16 @@ PlatformRemoteiOS::CreateInstance (bool force, const ArchSpec *arch) } if (create) + { + if (log) + log->Printf ("PlatformRemoteiOS::%s() creating platform", __FUNCTION__); + return lldb::PlatformSP(new PlatformRemoteiOS ()); + } + + if (log) + log->Printf ("PlatformRemoteiOS::%s() aborting creation of platform", __FUNCTION__); + return lldb::PlatformSP(); } diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp index 90d31cec99e..cbe9c7949a4 100644 --- a/lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp +++ b/lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp @@ -16,6 +16,7 @@ #include "lldb/Breakpoint/BreakpointLocation.h" #include "lldb/Core/ArchSpec.h" #include "lldb/Core/Error.h" +#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleList.h" #include "lldb/Core/ModuleSpec.h" @@ -68,6 +69,20 @@ PlatformiOSSimulator::Terminate () PlatformSP PlatformiOSSimulator::CreateInstance (bool force, const ArchSpec *arch) { + Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_PLATFORM)); + if (log) + { + const char *arch_name; + if (arch && arch->GetArchitectureName ()) + arch_name = arch->GetArchitectureName (); + else + arch_name = "<null>"; + + const char *triple_cstr = arch ? arch->GetTriple ().getTriple ().c_str() : "<null>"; + + log->Printf ("PlatformiOSSimulator::%s(force=%s, arch={%s,%s})", __FUNCTION__, force ? "true" : "false", arch_name, triple_cstr); + } + bool create = force; if (create == false && arch && arch->IsValid()) { @@ -124,7 +139,16 @@ PlatformiOSSimulator::CreateInstance (bool force, const ArchSpec *arch) } } if (create) + { + if (log) + log->Printf ("PlatformiOSSimulator::%s() creating platform", __FUNCTION__); + return PlatformSP(new PlatformiOSSimulator ()); + } + + if (log) + log->Printf ("PlatformiOSSimulator::%s() aborting creation of platform", __FUNCTION__); + return PlatformSP(); } |

