Author: ribrdb
Date: Tue Oct 6 15:29:31 2015
New Revision: 249456
URL: http://llvm.org/viewvc/llvm-project?rev=249456&view=rev
Log:
Create GoLanguageRuntime.
GoLanguageRuntime supports finding the runtime type for Go interfaces.
Modified:
lldb/trunk/cmake/LLDBDependencies.cmake
lldb/trunk/lldb.xcodeproj/project.pbxproj
lldb/trunk/source/API/SystemInitializerFull.cpp
lldb/trunk/source/Plugins/LanguageRuntime/CMakeLists.txt
lldb/trunk/source/Symbol/GoASTContext.cpp
Modified: lldb/trunk/cmake/LLDBDependencies.cmake
URL:
http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/LLDBDependencies.cmake?rev=249456&r1=249455&r2=249456&view=diff
==============================================================================
--- lldb/trunk/cmake/LLDBDependencies.cmake (original)
+++ lldb/trunk/cmake/LLDBDependencies.cmake Tue Oct 6 15:29:31 2015
@@ -47,6 +47,7 @@ set( LLDB_USED_LIBS
lldbPluginUnwindAssemblyX86
lldbPluginAppleObjCRuntime
lldbPluginRenderScriptRuntime
+ lldbPluginLanguageRuntimeGo
lldbPluginCXXItaniumABI
lldbPluginABIMacOSX_arm
lldbPluginABIMacOSX_arm64
Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL:
http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=249456&r1=249455&r2=249456&view=diff
==============================================================================
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Tue Oct 6 15:29:31 2015
@@ -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 */,
Modified: lldb/trunk/source/API/SystemInitializerFull.cpp
URL:
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SystemInitializerFull.cpp?rev=249456&r1=249455&r2=249456&view=diff
==============================================================================
--- lldb/trunk/source/API/SystemInitializerFull.cpp (original)
+++ lldb/trunk/source/API/SystemInitializerFull.cpp Tue Oct 6 15:29:31 2015
@@ -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();
Modified: lldb/trunk/source/Plugins/LanguageRuntime/CMakeLists.txt
URL:
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/CMakeLists.txt?rev=249456&r1=249455&r2=249456&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/CMakeLists.txt (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/CMakeLists.txt Tue Oct 6
15:29:31 2015
@@ -1,3 +1,4 @@
add_subdirectory(CPlusPlus)
add_subdirectory(ObjC)
+add_subdirectory(Go)
add_subdirectory(RenderScript)
Modified: lldb/trunk/source/Symbol/GoASTContext.cpp
URL:
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/GoASTContext.cpp?rev=249456&r1=249455&r2=249456&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/GoASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/GoASTContext.cpp Tue Oct 6 15:29:31 2015
@@ -1184,6 +1184,9 @@ GoASTContext::GetChildCompilerTypeAtInde
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)
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits