diff options
| author | Greg Clayton <gclayton@apple.com> | 2013-05-10 21:47:16 +0000 |
|---|---|---|
| committer | Greg Clayton <gclayton@apple.com> | 2013-05-10 21:47:16 +0000 |
| commit | 57abc5d6a6f393f488903c5a35e5a898fc201d3a (patch) | |
| tree | 25cef51feff2409f74f0bdb1bd9938c20d138ba5 /lldb/source/Plugins/LanguageRuntime/ObjC | |
| parent | bf0bd1f4ab2b9b4826d58407962260256d4b3709 (diff) | |
| download | bcm5719-llvm-57abc5d6a6f393f488903c5a35e5a898fc201d3a.tar.gz bcm5719-llvm-57abc5d6a6f393f488903c5a35e5a898fc201d3a.zip | |
<rdar://problem/13854277>
<rdar://problem/13594769>
Main changes in this patch include:
- cleanup plug-in interface and use ConstStrings for plug-in names
- Modfiied the BSD Archive plug-in to be able to pick out the correct .o file when .a files contain multiple .o files with the same name by using the timestamp
- Modified SymbolFileDWARFDebugMap to properly verify the timestamp on .o files it loads to ensure we don't load updated .o files and cause problems when debugging
The plug-in interface changes:
Modified the lldb_private::PluginInterface class that all plug-ins inherit from:
Changed:
virtual const char * GetPluginName() = 0;
To:
virtual ConstString GetPluginName() = 0;
Removed:
virtual const char * GetShortPluginName() = 0;
- Fixed up all plug-in to adhere to the new interface and to return lldb_private::ConstString values for the plug-in names.
- Fixed all plug-ins to return simple names with no prefixes. Some plug-ins had prefixes and most ones didn't, so now they all don't have prefixed names, just simple names like "linux", "gdb-remote", etc.
llvm-svn: 181631
Diffstat (limited to 'lldb/source/Plugins/LanguageRuntime/ObjC')
4 files changed, 31 insertions, 37 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp index 76398f54886..0de4cb9428f 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp @@ -37,11 +37,6 @@ using namespace lldb; using namespace lldb_private; -static const char *pluginName = "AppleObjCRuntimeV1"; -static const char *pluginDesc = "Apple Objective C Language Runtime - Version 1"; -static const char *pluginShort = "language.apple.objc.v1"; - - AppleObjCRuntimeV1::AppleObjCRuntimeV1(Process *process) : AppleObjCRuntime (process), m_hash_signature (), @@ -96,8 +91,8 @@ AppleObjCRuntimeV1::CreateInstance (Process *process, lldb::LanguageType languag void AppleObjCRuntimeV1::Initialize() { - PluginManager::RegisterPlugin (pluginName, - pluginDesc, + PluginManager::RegisterPlugin (GetPluginNameStatic(), + "Apple Objective C Language Runtime - Version 1", CreateInstance); } @@ -107,19 +102,20 @@ AppleObjCRuntimeV1::Terminate() PluginManager::UnregisterPlugin (CreateInstance); } +lldb_private::ConstString +AppleObjCRuntimeV1::GetPluginNameStatic() +{ + static ConstString g_name("apple-objc-v1"); + return g_name; +} + //------------------------------------------------------------------ // PluginInterface protocol //------------------------------------------------------------------ -const char * +ConstString AppleObjCRuntimeV1::GetPluginName() { - return pluginName; -} - -const char * -AppleObjCRuntimeV1::GetShortPluginName() -{ - return pluginShort; + return GetPluginNameStatic(); } uint32_t diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h index af58ac7e768..ba8ecc2bbcb 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h @@ -114,15 +114,15 @@ public: static lldb_private::LanguageRuntime * CreateInstance (Process *process, lldb::LanguageType language); + static lldb_private::ConstString + GetPluginNameStatic(); + //------------------------------------------------------------------ // PluginInterface protocol //------------------------------------------------------------------ - virtual const char * + virtual ConstString GetPluginName(); - virtual const char * - GetShortPluginName(); - virtual uint32_t GetPluginVersion(); diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp index daa566eb2bc..2df1ac9d03b 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp @@ -50,10 +50,6 @@ using namespace lldb; using namespace lldb_private; -static const char *pluginName = "AppleObjCRuntimeV2"; -static const char *pluginDesc = "Apple Objective C Language Runtime - Version 2"; -static const char *pluginShort = "language.apple.objc.v2"; - // 2 second timeout when running utility functions #define UTILITY_FUNCTION_TIMEOUT_USEC 2*1000*1000 @@ -427,8 +423,8 @@ AppleObjCRuntimeV2::CreateInstance (Process *process, LanguageType language) void AppleObjCRuntimeV2::Initialize() { - PluginManager::RegisterPlugin (pluginName, - pluginDesc, + PluginManager::RegisterPlugin (GetPluginNameStatic(), + "Apple Objective C Language Runtime - Version 2", CreateInstance); } @@ -438,19 +434,21 @@ AppleObjCRuntimeV2::Terminate() PluginManager::UnregisterPlugin (CreateInstance); } +lldb_private::ConstString +AppleObjCRuntimeV2::GetPluginNameStatic() +{ + static ConstString g_name("apple-objc-v2"); + return g_name; +} + + //------------------------------------------------------------------ // PluginInterface protocol //------------------------------------------------------------------ -const char * +lldb_private::ConstString AppleObjCRuntimeV2::GetPluginName() { - return pluginName; -} - -const char * -AppleObjCRuntimeV2::GetShortPluginName() -{ - return pluginShort; + return GetPluginNameStatic(); } uint32_t diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h index ae2e6f35ab0..54cc3b86b1a 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h @@ -55,15 +55,15 @@ public: static lldb_private::LanguageRuntime * CreateInstance (Process *process, lldb::LanguageType language); + static lldb_private::ConstString + GetPluginNameStatic(); + //------------------------------------------------------------------ // PluginInterface protocol //------------------------------------------------------------------ - virtual const char * + virtual ConstString GetPluginName(); - virtual const char * - GetShortPluginName(); - virtual uint32_t GetPluginVersion(); |

