summaryrefslogtreecommitdiffstats
path: root/lldb
diff options
context:
space:
mode:
authorRyan Brown <ribrdb@google.com>2015-10-06 20:29:31 +0000
committerRyan Brown <ribrdb@google.com>2015-10-06 20:29:31 +0000
commit07a1c459f2631f2ad3e95d4becc0cd38af6a9be4 (patch)
treece9b15c82dd9ec14d103567ec971b4625f2a9c46 /lldb
parent2afea5438f924af932cf62e39daa4a06e298fb37 (diff)
downloadbcm5719-llvm-07a1c459f2631f2ad3e95d4becc0cd38af6a9be4.tar.gz
bcm5719-llvm-07a1c459f2631f2ad3e95d4becc0cd38af6a9be4.zip
Create GoLanguageRuntime.
GoLanguageRuntime supports finding the runtime type for Go interfaces. llvm-svn: 249456
Diffstat (limited to 'lldb')
-rw-r--r--lldb/cmake/LLDBDependencies.cmake1
-rw-r--r--lldb/lldb.xcodeproj/project.pbxproj14
-rw-r--r--lldb/source/API/SystemInitializerFull.cpp2
-rw-r--r--lldb/source/Plugins/LanguageRuntime/CMakeLists.txt1
-rw-r--r--lldb/source/Symbol/GoASTContext.cpp3
5 files changed, 21 insertions, 0 deletions
diff --git a/lldb/cmake/LLDBDependencies.cmake b/lldb/cmake/LLDBDependencies.cmake
index 1aa62a6226f..d984b22e042 100644
--- a/lldb/cmake/LLDBDependencies.cmake
+++ b/lldb/cmake/LLDBDependencies.cmake
@@ -47,6 +47,7 @@ set( LLDB_USED_LIBS
lldbPluginUnwindAssemblyX86
lldbPluginAppleObjCRuntime
lldbPluginRenderScriptRuntime
+ lldbPluginLanguageRuntimeGo
lldbPluginCXXItaniumABI
lldbPluginABIMacOSX_arm
lldbPluginABIMacOSX_arm64
diff --git a/lldb/lldb.xcodeproj/project.pbxproj b/lldb/lldb.xcodeproj/project.pbxproj
index 8e146ee07eb..176c116e35c 100644
--- a/lldb/lldb.xcodeproj/project.pbxproj
+++ b/lldb/lldb.xcodeproj/project.pbxproj
@@ -821,6 +821,7 @@
9AC703AF117675410086C050 /* SBInstruction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9AC703AE117675410086C050 /* SBInstruction.cpp */; };
9AC703B1117675490086C050 /* SBInstructionList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9AC703B0117675490086C050 /* SBInstructionList.cpp */; };
A36FF33C17D8E94600244D40 /* OptionParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A36FF33B17D8E94600244D40 /* OptionParser.cpp */; };
+ AE44FB3E1BB485960033EB62 /* GoLanguageRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AE44FB3D1BB485960033EB62 /* GoLanguageRuntime.cpp */; };
AE6897281B94F6DE0018845D /* DWARFASTParserGo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AE6897261B94F6DE0018845D /* DWARFASTParserGo.cpp */; };
AE7F56291B8FE418001377A8 /* GoASTContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AEFFBA7C1AC4835D0087B932 /* GoASTContext.cpp */; };
AE8F624919EF3E1E00326B21 /* OperatingSystemGo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AE8F624719EF3E1E00326B21 /* OperatingSystemGo.cpp */; };
@@ -2638,6 +2639,8 @@
9AF16CC7114086A1007A7B3F /* SBBreakpointLocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBBreakpointLocation.cpp; path = source/API/SBBreakpointLocation.cpp; sourceTree = "<group>"; };
A36FF33B17D8E94600244D40 /* OptionParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OptionParser.cpp; sourceTree = "<group>"; };
A36FF33D17D8E98800244D40 /* OptionParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionParser.h; path = include/lldb/Host/OptionParser.h; sourceTree = "<group>"; };
+ AE44FB3C1BB4858A0033EB62 /* GoLanguageRuntime.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = GoLanguageRuntime.h; path = Go/GoLanguageRuntime.h; sourceTree = "<group>"; };
+ AE44FB3D1BB485960033EB62 /* GoLanguageRuntime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GoLanguageRuntime.cpp; path = Go/GoLanguageRuntime.cpp; sourceTree = "<group>"; };
AE6897261B94F6DE0018845D /* DWARFASTParserGo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFASTParserGo.cpp; sourceTree = "<group>"; };
AE6897271B94F6DE0018845D /* DWARFASTParserGo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFASTParserGo.h; sourceTree = "<group>"; };
AE8F624719EF3E1E00326B21 /* OperatingSystemGo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OperatingSystemGo.cpp; path = Go/OperatingSystemGo.cpp; sourceTree = "<group>"; };
@@ -5129,6 +5132,7 @@
4CCA643A13B40B82003BDF98 /* LanguageRuntime */ = {
isa = PBXGroup;
children = (
+ AE44FB3B1BB485730033EB62 /* Go */,
49724D961AD6ECFA0033C538 /* RenderScript */,
4CCA643B13B40B82003BDF98 /* CPlusPlus */,
4CCA644013B40B82003BDF98 /* ObjC */,
@@ -5456,6 +5460,15 @@
name = "SysV-mips";
sourceTree = "<group>";
};
+ AE44FB3B1BB485730033EB62 /* Go */ = {
+ isa = PBXGroup;
+ children = (
+ AE44FB3C1BB4858A0033EB62 /* GoLanguageRuntime.h */,
+ AE44FB3D1BB485960033EB62 /* GoLanguageRuntime.cpp */,
+ );
+ name = Go;
+ sourceTree = "<group>";
+ };
AE8F624519EF3DFC00326B21 /* Go */ = {
isa = PBXGroup;
children = (
@@ -6292,6 +6305,7 @@
266E829D1B8E542C008FCA06 /* DWARFAttribute.cpp in Sources */,
2689004613353E0400698AC0 /* ModuleList.cpp in Sources */,
2689004713353E0400698AC0 /* PluginManager.cpp in Sources */,
+ AE44FB3E1BB485960033EB62 /* GoLanguageRuntime.cpp in Sources */,
AF0C112818580CD800C4C45B /* QueueItem.cpp in Sources */,
AF254E31170CCC33007AE5C9 /* PlatformDarwinKernel.cpp in Sources */,
2689004813353E0400698AC0 /* RegularExpression.cpp in Sources */,
diff --git a/lldb/source/API/SystemInitializerFull.cpp b/lldb/source/API/SystemInitializerFull.cpp
index d085d91b5bf..d9fbbf99178 100644
--- a/lldb/source/API/SystemInitializerFull.cpp
+++ b/lldb/source/API/SystemInitializerFull.cpp
@@ -49,6 +49,7 @@
#include "Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h"
#include "Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h"
#include "Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h"
+#include "Plugins/LanguageRuntime/Go/GoLanguageRuntime.h"
#include "Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h"
#include "Plugins/MemoryHistory/asan/MemoryHistoryASan.h"
#include "Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h"
@@ -289,6 +290,7 @@ SystemInitializerFull::Initialize()
AppleObjCRuntimeV1::Initialize();
SystemRuntimeMacOSX::Initialize();
RenderScriptRuntime::Initialize();
+ GoLanguageRuntime::Initialize();
CPlusPlusLanguage::Initialize();
ObjCLanguage::Initialize();
diff --git a/lldb/source/Plugins/LanguageRuntime/CMakeLists.txt b/lldb/source/Plugins/LanguageRuntime/CMakeLists.txt
index c62791445a9..66b17a4af22 100644
--- a/lldb/source/Plugins/LanguageRuntime/CMakeLists.txt
+++ b/lldb/source/Plugins/LanguageRuntime/CMakeLists.txt
@@ -1,3 +1,4 @@
add_subdirectory(CPlusPlus)
add_subdirectory(ObjC)
+add_subdirectory(Go)
add_subdirectory(RenderScript)
diff --git a/lldb/source/Symbol/GoASTContext.cpp b/lldb/source/Symbol/GoASTContext.cpp
index 6ba619087bc..6568b1253e6 100644
--- a/lldb/source/Symbol/GoASTContext.cpp
+++ b/lldb/source/Symbol/GoASTContext.cpp
@@ -1184,6 +1184,9 @@ GoASTContext::GetChildCompilerTypeAtIndex(lldb::opaque_compiler_type_t type, Exe
uint32_t
GoASTContext::GetIndexOfChildWithName(lldb::opaque_compiler_type_t type, const char *name, bool omit_empty_base_classes)
{
+ if (!type || !GetCompleteType(type))
+ return UINT_MAX;
+
GoType *t = static_cast<GoType *>(type);
GoStruct *s = t->GetStruct();
if (s)
OpenPOWER on IntegriCloud