Skip to content

Commit

Permalink
Create GoLanguageRuntime.
Browse files Browse the repository at this point in the history
GoLanguageRuntime supports finding the runtime type for Go interfaces.

llvm-svn: 249456
  • Loading branch information
Ryan Brown committed Oct 6, 2015
1 parent 2afea54 commit 07a1c45
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions lldb/cmake/LLDBDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ set( LLDB_USED_LIBS
lldbPluginUnwindAssemblyX86
lldbPluginAppleObjCRuntime
lldbPluginRenderScriptRuntime
lldbPluginLanguageRuntimeGo
lldbPluginCXXItaniumABI
lldbPluginABIMacOSX_arm
lldbPluginABIMacOSX_arm64
Expand Down
14 changes: 14 additions & 0 deletions lldb/lldb.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */; };
Expand Down Expand Up @@ -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>"; };
Expand Down Expand Up @@ -5129,6 +5132,7 @@
4CCA643A13B40B82003BDF98 /* LanguageRuntime */ = {
isa = PBXGroup;
children = (
AE44FB3B1BB485730033EB62 /* Go */,
49724D961AD6ECFA0033C538 /* RenderScript */,
4CCA643B13B40B82003BDF98 /* CPlusPlus */,
4CCA644013B40B82003BDF98 /* ObjC */,
Expand Down Expand Up @@ -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 = (
Expand Down Expand Up @@ -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 */,
Expand Down
2 changes: 2 additions & 0 deletions lldb/source/API/SystemInitializerFull.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -289,6 +290,7 @@ SystemInitializerFull::Initialize()
AppleObjCRuntimeV1::Initialize();
SystemRuntimeMacOSX::Initialize();
RenderScriptRuntime::Initialize();
GoLanguageRuntime::Initialize();

CPlusPlusLanguage::Initialize();
ObjCLanguage::Initialize();
Expand Down
1 change: 1 addition & 0 deletions lldb/source/Plugins/LanguageRuntime/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
add_subdirectory(CPlusPlus)
add_subdirectory(ObjC)
add_subdirectory(Go)
add_subdirectory(RenderScript)
3 changes: 3 additions & 0 deletions lldb/source/Symbol/GoASTContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 07a1c45

Please sign in to comment.