Add LLDB bmake infrastructure

This connects LLDB to the build, but it is disabled by default.  Add
WITH_LLDB= to src.conf to build it.

Note that LLDB requires a C++11 compiler so is disabled on platforms
using GCC.

Approved by:	re (gjb)
Sponsored by:	DARPA, AFRL
This commit is contained in:
Ed Maste 2013-09-20 01:52:02 +00:00
parent 34ff737fae
commit e8f1392d95
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=255722
42 changed files with 1112 additions and 10 deletions

View File

@ -3,17 +3,22 @@
.include <bsd.own.mk>
.if !make(install)
.if !defined(EARLY_BUILD) && defined(MK_CLANG_FULL) && ${MK_CLANG_FULL} != "no"
.if !defined(EARLY_BUILD)
.if defined(MK_CLANG_FULL) && ${MK_CLANG_FULL} != "no"
_libclangstaticanalyzer= \
libclangstaticanalyzercheckers \
libclangstaticanalyzercore \
libclangstaticanalyzerfrontend
_libclangarcmigrate= \
libclangarcmigrate
.endif # MK_CLANG_FULL
.if (defined(MK_CLANG_FULL) && ${MK_CLANG_FULL} != "no") || \
(defined(MK_LLDB) && ${MK_LLDB} != "no")
_libclangrewriter= \
libclangrewritecore \
libclangrewritefrontend
.endif # !EARLY_BUILD && MK_CLANG_FULL
.endif # (MK_CLANG_FULL || MK_LLDB)
.endif # !EARLY_BUILD
SUBDIR= libclanganalysis \
${_libclangarcmigrate} \
@ -82,14 +87,55 @@ SUBDIR= libclanganalysis \
libllvmx86utils
.if ${MK_CLANG_EXTRAS} != "no"
SUBDIR+=libllvmdebuginfo \
libllvmexecutionengine \
SUBDIR+=libllvmdebuginfo
.endif # MK_CLANG_EXTRAS
.if ${MK_CLANG_EXTRAS} != "no" || ${MK_LLDB} != "no"
SUBDIR+=libllvmexecutionengine \
libllvminterpreter \
libllvmjit \
libllvmmcdisassembler \
libllvmmcjit \
libllvmruntimedyld
.endif # MK_CLANG_EXTRAS
.endif # MK_CLANG_EXTRAS | LLDB
.if !defined(EARLY_BUILD) && ${MK_LLDB} != "no"
SUBDIR+=liblldb \
\
liblldbAPI \
liblldbBreakpoint \
liblldbCommands \
liblldbCore \
liblldbDataFormatters \
liblldbExpression \
liblldbHostCommon \
liblldbHostFreeBSD \
liblldbInterpreter \
liblldbSymbol \
liblldbTarget \
liblldbUtility \
\
liblldbPluginABISysV_x86_64 \
liblldbPluginCXXItaniumABI \
liblldbPluginDisassemblerLLVM \
liblldbPluginDynamicLoaderStatic \
liblldbPluginDynamicLoaderPosixDYLD \
liblldbPluginInstructionARM \
liblldbPluginObjectContainerBSDArchive \
liblldbPluginObjectFileELF \
liblldbPluginPlatformFreeBSD \
liblldbPluginPlatformGDB \
liblldbPluginProcessElfCore \
liblldbPluginProcessFreeBSD \
liblldbPluginProcessGDBRemote \
liblldbPluginProcessPOSIX \
liblldbPluginProcessUtility \
liblldbPluginSymbolFileDWARF \
liblldbPluginSymbolFileSymtab \
liblldbPluginSymbolVendorELF \
liblldbPluginUnwindAssemblyInstEmulation \
liblldbPluginUnwindAssemblyX86
.endif # !EARLY_BUILD && MK_LLDB
.endif # !make(install)
SUBDIR+= include

View File

@ -0,0 +1,18 @@
# $FreeBSD$
.include <bsd.own.mk>
LIB= lldb
CFLAGS+=-I${.CURDIR}/../../../contrib/llvm/tools/lldb/source/Plugins/Process/POSIX
SRCDIR= tools/lldb/source
SRCS= lldb.cpp \
lldb-log.cpp
TGHDRS= DiagnosticCommonKinds \
DeclNodes \
StmtNodes \
CommentCommandList
.include "../lldb.lib.mk"

View File

@ -0,0 +1,61 @@
# $FreeBSD$
.include <bsd.own.mk>
LIB= lldbAPI
SRCDIR= tools/lldb/source/API
SRCS= SBAddress.cpp \
SBBlock.cpp \
SBBreakpoint.cpp \
SBBreakpointLocation.cpp \
SBBroadcaster.cpp \
SBCommandInterpreter.cpp \
SBCommandReturnObject.cpp \
SBCommunication.cpp \
SBCompileUnit.cpp \
SBData.cpp \
SBDebugger.cpp \
SBDeclaration.cpp \
SBError.cpp \
SBEvent.cpp \
SBExpressionOptions.cpp \
SBFileSpec.cpp \
SBFileSpecList.cpp \
SBFrame.cpp \
SBFunction.cpp \
SBHostOS.cpp \
SBInputReader.cpp \
SBInstruction.cpp \
SBInstructionList.cpp \
SBLineEntry.cpp \
SBListener.cpp \
SBModule.cpp \
SBModuleSpec.cpp \
SBProcess.cpp \
SBSection.cpp \
SBSourceManager.cpp \
SBStream.cpp \
SBStringList.cpp \
SBSymbol.cpp \
SBSymbolContext.cpp \
SBSymbolContextList.cpp \
SBTarget.cpp \
SBThread.cpp \
SBType.cpp \
SBTypeCategory.cpp \
SBTypeFilter.cpp \
SBTypeFormat.cpp \
SBTypeNameSpecifier.cpp \
SBTypeSummary.cpp \
SBTypeSynthetic.cpp \
SBValue.cpp \
SBValueList.cpp \
SBWatchpoint.cpp
TGHDRS= DiagnosticCommonKinds \
DeclNodes \
StmtNodes \
CommentCommandList
.include "../lldb.lib.mk"

View File

@ -0,0 +1,35 @@
# $FreeBSD$
.include <bsd.own.mk>
LIB= lldbBreakpoint
SRCDIR= tools/lldb/source/Breakpoint
SRCS= Breakpoint.cpp \
BreakpointID.cpp \
BreakpointIDList.cpp \
BreakpointList.cpp \
BreakpointLocation.cpp \
BreakpointLocationCollection.cpp \
BreakpointLocationList.cpp \
BreakpointOptions.cpp \
BreakpointResolver.cpp \
BreakpointResolverAddress.cpp \
BreakpointResolverFileLine.cpp \
BreakpointResolverFileRegex.cpp \
BreakpointResolverName.cpp \
BreakpointSite.cpp \
BreakpointSiteList.cpp \
Stoppoint.cpp \
StoppointCallbackContext.cpp \
StoppointLocation.cpp \
Watchpoint.cpp \
WatchpointList.cpp \
WatchpointOptions.cpp
TGHDRS= DiagnosticCommonKinds \
DeclNodes \
StmtNodes \
CommentCommandList
.include "../lldb.lib.mk"

View File

@ -0,0 +1,41 @@
# $FreeBSD$
.include <bsd.own.mk>
LIB= lldbCommands
SRCDIR= tools/lldb/source/Commands
SRCS= CommandCompletions.cpp \
CommandObjectApropos.cpp \
CommandObjectArgs.cpp \
CommandObjectBreakpoint.cpp \
CommandObjectBreakpointCommand.cpp \
CommandObjectCommands.cpp \
CommandObjectDisassemble.cpp \
CommandObjectExpression.cpp \
CommandObjectFrame.cpp \
CommandObjectHelp.cpp \
CommandObjectLog.cpp \
CommandObjectMemory.cpp \
CommandObjectMultiword.cpp \
CommandObjectPlatform.cpp \
CommandObjectPlugin.cpp \
CommandObjectProcess.cpp \
CommandObjectQuit.cpp \
CommandObjectRegister.cpp \
CommandObjectSettings.cpp \
CommandObjectSource.cpp \
CommandObjectSyntax.cpp \
CommandObjectTarget.cpp \
CommandObjectThread.cpp \
CommandObjectType.cpp \
CommandObjectVersion.cpp \
CommandObjectWatchpoint.cpp \
CommandObjectWatchpointCommand.cpp
TGHDRS= DiagnosticCommonKinds \
DeclNodes \
StmtNodes \
CommentCommandList
.include "../lldb.lib.mk"

View File

@ -0,0 +1,84 @@
# $FreeBSD$
.include <bsd.own.mk>
LIB= lldbCore
SRCDIR= tools/lldb/source/Core
SRCS= Address.cpp \
AddressRange.cpp \
AddressResolver.cpp \
AddressResolverFileLine.cpp \
AddressResolverName.cpp \
ArchSpec.cpp \
Baton.cpp \
Broadcaster.cpp \
Communication.cpp \
Connection.cpp \
ConnectionFileDescriptor.cpp \
ConnectionMachPort.cpp \
ConnectionSharedMemory.cpp \
ConstString.cpp \
DataBufferHeap.cpp \
DataBufferMemoryMap.cpp \
DataEncoder.cpp \
DataExtractor.cpp \
Debugger.cpp \
Disassembler.cpp \
DynamicLoader.cpp \
EmulateInstruction.cpp \
Error.cpp \
Event.cpp \
FileLineResolver.cpp \
FileSpecList.cpp \
History.cpp \
InputReader.cpp \
InputReaderEZ.cpp \
InputReaderStack.cpp \
Language.cpp \
Listener.cpp \
Log.cpp \
Mangled.cpp \
Module.cpp \
ModuleChild.cpp \
ModuleList.cpp \
Opcode.cpp \
PluginManager.cpp \
RegisterValue.cpp \
RegularExpression.cpp \
Scalar.cpp \
SearchFilter.cpp \
Section.cpp \
SourceManager.cpp \
State.cpp \
Stream.cpp \
StreamAsynchronousIO.cpp \
StreamCallback.cpp \
StreamFile.cpp \
StreamString.cpp \
StringList.cpp \
Timer.cpp \
UserID.cpp \
UserSettingsController.cpp \
UUID.cpp \
Value.cpp \
ValueObject.cpp \
ValueObjectCast.cpp \
ValueObjectChild.cpp \
ValueObjectConstResult.cpp \
ValueObjectConstResultChild.cpp \
ValueObjectConstResultImpl.cpp \
ValueObjectDynamicValue.cpp \
ValueObjectList.cpp \
ValueObjectMemory.cpp \
ValueObjectRegister.cpp \
ValueObjectSyntheticFilter.cpp \
ValueObjectVariable.cpp \
VMRange.cpp
TGHDRS= DiagnosticCommonKinds \
DeclNodes \
StmtNodes \
CommentCommandList
.include "../lldb.lib.mk"

View File

@ -0,0 +1,33 @@
# $FreeBSD$
.include <bsd.own.mk>
LIB= lldbDataFormatters
SRCDIR= tools/lldb/source/DataFormatters
SRCS= CF.cpp \
Cocoa.cpp \
CXXFormatterFunctions.cpp \
DataVisualization.cpp \
FormatCache.cpp \
FormatClasses.cpp \
FormatManager.cpp \
LibCxx.cpp \
LibCxxList.cpp \
LibCxxMap.cpp \
LibStdcpp.cpp \
NSArray.cpp \
NSDictionary.cpp \
NSSet.cpp \
TypeCategory.cpp \
TypeCategoryMap.cpp \
TypeFormat.cpp \
TypeSummary.cpp \
TypeSynthetic.cpp
TGHDRS= DiagnosticCommonKinds \
DeclNodes \
StmtNodes \
CommentCommandList
.include "../lldb.lib.mk"

View File

@ -0,0 +1,39 @@
# $FreeBSD$
.include <bsd.own.mk>
LIB= lldbExpression
SRCDIR= tools/lldb/source/Expression
SRCS= ASTDumper.cpp \
ASTResultSynthesizer.cpp \
ASTStructExtractor.cpp \
ClangASTSource.cpp \
ClangExpressionDeclMap.cpp \
ClangExpressionParser.cpp \
ClangExpressionVariable.cpp \
ClangFunction.cpp \
ClangPersistentVariables.cpp \
ClangUserExpression.cpp \
ClangUtilityFunction.cpp \
DWARFExpression.cpp \
ExpressionSourceCode.cpp \
IRDynamicChecks.cpp \
IRExecutionUnit.cpp \
IRForTarget.cpp \
IRInterpreter.cpp \
IRMemoryMap.cpp \
Materializer.cpp
TGHDRS= DiagnosticCommonKinds \
DeclNodes \
StmtNodes \
CommentCommandList \
AttrList \
Attrs \
AttrParsedAttrList \
DiagnosticFrontendKinds \
DiagnosticSemaKinds \
Intrinsics
.include "../lldb.lib.mk"

View File

@ -0,0 +1,24 @@
# $FreeBSD$
.include <bsd.own.mk>
LIB= lldbHostCommon
SRCDIR= tools/lldb/source/Host/common
SRCS= Condition.cpp \
DynamicLibrary.cpp \
File.cpp \
FileSpec.cpp \
Host.cpp \
Mutex.cpp \
SocketAddress.cpp \
Symbols.cpp \
Terminal.cpp \
TimeValue.cpp
TGHDRS= DiagnosticCommonKinds \
DeclNodes \
StmtNodes \
CommentCommandList
.include "../lldb.lib.mk"

View File

@ -0,0 +1,15 @@
# $FreeBSD$
.include <bsd.own.mk>
LIB= lldbHostFreeBSD
SRCDIR= tools/lldb/source/Host/freebsd
SRCS= Host.cpp
TGHDRS= DiagnosticCommonKinds \
DeclNodes \
StmtNodes \
CommentCommandList
.include "../lldb.lib.mk"

View File

@ -0,0 +1,56 @@
# $FreeBSD$
.include <bsd.own.mk>
LIB= lldbInterpreter
SRCDIR= tools/lldb/source/Interpreter
SRCS= Args.cpp \
CommandHistory.cpp \
CommandInterpreter.cpp \
CommandObject.cpp \
CommandObjectRegexCommand.cpp \
CommandObjectScript.cpp \
CommandReturnObject.cpp \
OptionGroupArchitecture.cpp \
OptionGroupBoolean.cpp \
OptionGroupFile.cpp \
OptionGroupFormat.cpp \
OptionGroupOutputFile.cpp \
OptionGroupPlatform.cpp \
OptionGroupString.cpp \
OptionGroupUInt64.cpp \
OptionGroupUUID.cpp \
OptionGroupValueObjectDisplay.cpp \
OptionValue.cpp \
OptionValueArch.cpp \
OptionValueArgs.cpp \
OptionValueArray.cpp \
OptionValueBoolean.cpp \
OptionValueDictionary.cpp \
OptionValueEnumeration.cpp \
OptionValueFileSpec.cpp \
OptionValueFileSpecLIst.cpp \
OptionValueFormat.cpp \
OptionValuePathMappings.cpp \
OptionValueProperties.cpp \
OptionValueRegex.cpp \
OptionValueSInt64.cpp \
OptionValueString.cpp \
OptionValueUInt64.cpp \
OptionValueUUID.cpp \
OptionGroupVariable.cpp \
OptionGroupWatchpoint.cpp \
Options.cpp \
Property.cpp \
PythonDataObjects.cpp \
ScriptInterpreter.cpp \
ScriptInterpreterNone.cpp \
ScriptInterpreterPython.cpp
TGHDRS= DiagnosticCommonKinds \
DeclNodes \
StmtNodes \
CommentCommandList
.include "../lldb.lib.mk"

View File

@ -0,0 +1,15 @@
# $FreeBSD$
.include <bsd.own.mk>
LIB= lldbPluginABISysV_x86_64
SRCDIR= tools/lldb/source/Plugins/ABI/SysV-x86_64
SRCS= ABISysV_x86_64.cpp
TGHDRS= DiagnosticCommonKinds \
DeclNodes \
StmtNodes \
CommentCommandList
.include "../lldb.lib.mk"

View File

@ -0,0 +1,15 @@
# $FreeBSD$
.include <bsd.own.mk>
LIB= lldbPluginCXXItaniumABI
SRCDIR= tools/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI
SRCS= ItaniumABILanguageRuntime.cpp
TGHDRS= DiagnosticCommonKinds \
DeclNodes \
StmtNodes \
CommentCommandList
.include "../lldb.lib.mk"

View File

@ -0,0 +1,15 @@
# $FreeBSD$
.include <bsd.own.mk>
LIB= lldbPluginDisassemblerLLVM
SRCDIR= tools/lldb/source/Plugins/Disassembler/llvm
SRCS= DisassemblerLLVMC.cpp
TGHDRS= DiagnosticCommonKinds \
DeclNodes \
StmtNodes \
CommentCommandList
.include "../lldb.lib.mk"

View File

@ -0,0 +1,17 @@
# $FreeBSD$
.include <bsd.own.mk>
LIB= lldbPluginDynamicLoaderPosixDYLD
SRCDIR= tools/lldb/source/Plugins/DynamicLoader/POSIX-DYLD
SRCS= AuxVector.cpp \
DYLDRendezvous.cpp \
DynamicLoaderPOSIXDYLD.cpp
TGHDRS= DiagnosticCommonKinds \
DeclNodes \
StmtNodes \
CommentCommandList
.include "../lldb.lib.mk"

View File

@ -0,0 +1,15 @@
# $FreeBSD$
.include <bsd.own.mk>
LIB= lldbPluginDynamicLoaderStatic
SRCDIR= tools/lldb/source/Plugins/DynamicLoader/Static
SRCS= DynamicLoaderStatic.cpp
TGHDRS= DiagnosticCommonKinds \
DeclNodes \
StmtNodes \
CommentCommandList
.include "../lldb.lib.mk"

View File

@ -0,0 +1,16 @@
# $FreeBSD$
.include <bsd.own.mk>
LIB= lldbPluginInstructionARM
SRCDIR= tools/lldb/source/Plugins/Instruction/ARM
SRCS= EmulateInstructionARM.cpp \
EmulationStateARM.cpp
TGHDRS= DiagnosticCommonKinds \
DeclNodes \
StmtNodes \
CommentCommandList
.include "../lldb.lib.mk"

View File

@ -0,0 +1,15 @@
# $FreeBSD$
.include <bsd.own.mk>
LIB= lldbPluginObjectContainerBSDArchive
SRCDIR= tools/lldb/source/Plugins/ObjectContainer/BSD-Archive
SRCS= ObjectContainerBSDArchive.cpp
TGHDRS= DiagnosticCommonKinds \
DeclNodes \
StmtNodes \
CommentCommandList
.include "../lldb.lib.mk"

View File

@ -0,0 +1,16 @@
# $FreeBSD$
.include <bsd.own.mk>
LIB= lldbPluginObjectFileELF
SRCDIR= tools/lldb/source/Plugins/ObjectFile/ELF
SRCS= ELFHeader.cpp \
ObjectFileELF.cpp
TGHDRS= DiagnosticCommonKinds \
DeclNodes \
StmtNodes \
CommentCommandList
.include "../lldb.lib.mk"

View File

@ -0,0 +1,15 @@
# $FreeBSD$
.include <bsd.own.mk>
LIB= lldbPluginPlatformFreeBSD
SRCDIR= tools/lldb/source/Plugins/Platform/FreeBSD
SRCS= PlatformFreeBSD.cpp
TGHDRS= DiagnosticCommonKinds \
DeclNodes \
StmtNodes \
CommentCommandList
.include "../lldb.lib.mk"

View File

@ -0,0 +1,15 @@
# $FreeBSD$
.include <bsd.own.mk>
LIB= lldbPluginPlatformGDB
SRCDIR= tools/lldb/source/Plugins/Platform/gdb-server
SRCS= PlatformRemoteGDBServer.cpp
TGHDRS= DiagnosticCommonKinds \
DeclNodes \
StmtNodes \
CommentCommandList
.include "../lldb.lib.mk"

View File

@ -0,0 +1,21 @@
# $FreeBSD$
.include <bsd.own.mk>
LIB= lldbPluginProcessElfCore
CFLAGS+=-I${.CURDIR}/../../../contrib/llvm/tools/lldb/source/Plugins/Process/POSIX
CFLAGS+=-I${.CURDIR}/../../../contrib/llvm/tools/lldb/source/Plugins/Process/Utility
SRCDIR= tools/lldb/source/Plugins/Process/elf-core
SRCS= ProcessElfCore.cpp \
ThreadElfCore.cpp \
RegisterContextCoreLinux_x86_64.cpp \
RegisterContextCoreFreeBSD_x86_64.cpp
TGHDRS= DiagnosticCommonKinds \
DeclNodes \
StmtNodes \
CommentCommandList
.include "../lldb.lib.mk"

View File

@ -0,0 +1,20 @@
# $FreeBSD$
.include <bsd.own.mk>
LIB= lldbPluginProcessFreeBSD
# include_directories(.)
CFLAGS+=-I${.CURDIR}/../../../contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD
CFLAGS+=-I${.CURDIR}/../../../contrib/llvm/tools/lldb/source/Plugins/Process/POSIX
SRCDIR= tools/lldb/source/Plugins/Process/FreeBSD
SRCS= ProcessFreeBSD.cpp \
ProcessMonitor.cpp
TGHDRS= DiagnosticCommonKinds \
DeclNodes \
StmtNodes \
CommentCommandList
.include "../lldb.lib.mk"

View File

@ -0,0 +1,21 @@
# $FreeBSD$
.include <bsd.own.mk>
LIB= lldbPluginProcessGDBRemote
SRCDIR= tools/lldb/source/Plugins/Process/gdb-remote
SRCS= GDBRemoteCommunication.cpp \
GDBRemoteCommunicationClient.cpp \
GDBRemoteCommunicationServer.cpp \
GDBRemoteRegisterContext.cpp \
ProcessGDBRemote.cpp \
ProcessGDBRemoteLog.cpp \
ThreadGDBRemote.cpp
TGHDRS= DiagnosticCommonKinds \
DeclNodes \
StmtNodes \
CommentCommandList
.include "../lldb.lib.mk"

View File

@ -0,0 +1,28 @@
# $FreeBSD$
.include <bsd.own.mk>
LIB= lldbPluginProcessPOSIX
# include_directories(.)
CFLAGS+=-I${.CURDIR}/../../../contrib/llvm/tools/lldb/source/Plugins/Process/POSIX
CFLAGS+=-I${.CURDIR}/../../../contrib/llvm/tools/lldb/source/Plugins/Process/Utility
CFLAGS+=-I${.CURDIR}/../../../contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD
SRCDIR= tools/lldb/source/Plugins/Process/POSIX
SRCS= POSIXStopInfo.cpp \
POSIXThread.cpp \
ProcessMessage.cpp \
ProcessPOSIX.cpp \
ProcessPOSIXLog.cpp \
RegisterContextFreeBSD_x86_64.cpp \
RegisterContext_i386.cpp \
RegisterContextLinux_x86_64.cpp \
RegisterContext_x86_64.cpp
TGHDRS= DiagnosticCommonKinds \
DeclNodes \
StmtNodes \
CommentCommandList
.include "../lldb.lib.mk"

View File

@ -0,0 +1,31 @@
# $FreeBSD$
.include <bsd.own.mk>
LIB= lldbPluginProcessUtility
SRCDIR= tools/lldb/source/Plugins/Process/Utility
SRCS= DynamicRegisterInfo.cpp \
InferiorCallPOSIX.cpp \
RegisterContextDarwin_arm.cpp \
RegisterContextDarwin_i386.cpp \
RegisterContextDarwin_x86_64.cpp \
RegisterContextDummy.cpp \
RegisterContextLLDB.cpp \
RegisterContextMach_arm.cpp \
RegisterContextMach_i386.cpp \
RegisterContextMach_x86_64.cpp \
RegisterContextMacOSXFrameBackchain.cpp \
RegisterContextMemory.cpp \
RegisterContextThreadMemory.cpp \
StopInfoMachException.cpp \
ThreadMemory.cpp \
UnwindLLDB.cpp \
UnwindMacOSXFrameBackchain.cpp
TGHDRS= DiagnosticCommonKinds \
DeclNodes \
StmtNodes \
CommentCommandList
.include "../lldb.lib.mk"

View File

@ -0,0 +1,41 @@
# $FreeBSD$
.include <bsd.own.mk>
LIB= lldbPluginSymbolFileDWARF
SRCDIR= tools/lldb/source/Plugins/SymbolFile/DWARF
SRCS= DWARFAbbreviationDeclaration.cpp \
DWARFCompileUnit.cpp \
DWARFDebugAbbrev.cpp \
DWARFDebugAranges.cpp \
DWARFDebugArangeSet.cpp \
DWARFDebugInfo.cpp \
DWARFDebugInfoEntry.cpp \
DWARFDebugLine.cpp \
DWARFDebugMacinfo.cpp \
DWARFDebugMacinfoEntry.cpp \
DWARFDebugPubnames.cpp \
DWARFDebugPubnamesSet.cpp \
DWARFDebugRanges.cpp \
DWARFDeclContext.cpp \
DWARFDefines.cpp \
DWARFDIECollection.cpp \
DWARFFormValue.cpp \
DWARFLocationDescription.cpp \
DWARFLocationList.cpp \
LogChannelDWARF.cpp \
NameToDIE.cpp \
SymbolFileDWARF.cpp \
SymbolFileDWARFDebugMap.cpp \
UniqueDWARFASTType.cpp
TGHDRS= DiagnosticCommonKinds \
DeclNodes \
StmtNodes \
CommentCommandList \
AttrParsedAttrList \
DiagnosticFrontendKinds \
Intrinsics
.include "../lldb.lib.mk"

View File

@ -0,0 +1,15 @@
# $FreeBSD$
.include <bsd.own.mk>
LIB= lldbPluginSymbolFileSymtab
SRCDIR= tools/lldb/source/Plugins/SymbolFile/Symtab
SRCS= SymbolFileSymtab.cpp
TGHDRS= DiagnosticCommonKinds \
DeclNodes \
StmtNodes \
CommentCommandList
.include "../lldb.lib.mk"

View File

@ -0,0 +1,15 @@
# $FreeBSD$
.include <bsd.own.mk>
LIB= lldbPluginSymbolVendorELF
SRCDIR= tools/lldb/source/Plugins/SymbolVendor/ELF
SRCS= SymbolVendorELF.cpp
TGHDRS= DiagnosticCommonKinds \
DeclNodes \
StmtNodes \
CommentCommandList
.include "../lldb.lib.mk"

View File

@ -0,0 +1,15 @@
# $FreeBSD$
.include <bsd.own.mk>
LIB= lldbPluginUnwindAssemblyInstEmulation
SRCDIR= tools/lldb/source/Plugins/UnwindAssembly/InstEmulation
SRCS= UnwindAssemblyInstEmulation.cpp
TGHDRS= DiagnosticCommonKinds \
DeclNodes \
StmtNodes \
CommentCommandList
.include "../lldb.lib.mk"

View File

@ -0,0 +1,15 @@
# $FreeBSD$
.include <bsd.own.mk>
LIB= lldbPluginUnwindAssemblyX86
SRCDIR= tools/lldb/source/Plugins/UnwindAssembly/x86
SRCS= UnwindAssembly-x86.cpp
TGHDRS= DiagnosticCommonKinds \
DeclNodes \
StmtNodes \
CommentCommandList
.include "../lldb.lib.mk"

View File

@ -0,0 +1,43 @@
# $FreeBSD$
.include <bsd.own.mk>
LIB= lldbSymbol
SRCDIR= tools/lldb/source/Symbol
SRCS= Block.cpp \
ClangASTContext.cpp \
ClangASTImporter.cpp \
ClangASTType.cpp \
ClangExternalASTSourceCallbacks.cpp \
ClangExternalASTSourceCommon.cpp \
ClangNamespaceDecl.cpp \
CompileUnit.cpp \
Declaration.cpp \
DWARFCallFrameInfo.cpp \
Function.cpp \
FuncUnwinders.cpp \
LineEntry.cpp \
LineTable.cpp \
ObjectFile.cpp \
Symbol.cpp \
SymbolContext.cpp \
SymbolFile.cpp \
SymbolVendor.cpp \
Symtab.cpp \
Type.cpp \
TypeList.cpp \
UnwindPlan.cpp \
UnwindTable.cpp \
Variable.cpp \
VariableList.cpp \
VerifyDecl.cpp
TGHDRS= DiagnosticCommonKinds \
DeclNodes \
StmtNodes \
CommentCommandList \
AttrList \
Attrs
.include "../lldb.lib.mk"

View File

@ -0,0 +1,54 @@
# $FreeBSD$
.include <bsd.own.mk>
LIB= lldbTarget
CFLAGS+=-I${.CURDIR}/../../../contrib/llvm/tools/lldb/source/Plugins/Process/Utility
SRCDIR= tools/lldb/source/Target
SRCS= ABI.cpp \
CPPLanguageRuntime.cpp \
ExecutionContext.cpp \
LanguageRuntime.cpp \
Memory.cpp \
ObjCLanguageRuntime.cpp \
OperatingSystem.cpp \
PathMappingList.cpp \
Platform.cpp \
Process.cpp \
RegisterContext.cpp \
SectionLoadList.cpp \
StackFrame.cpp \
StackFrameList.cpp \
StackID.cpp \
StopInfo.cpp \
Target.cpp \
TargetList.cpp \
Thread.cpp \
ThreadList.cpp \
ThreadPlan.cpp \
ThreadPlanBase.cpp \
ThreadPlanCallFunction.cpp \
ThreadPlanCallUserExpression.cpp \
ThreadPlanRunToAddress.cpp \
ThreadPlanShouldStopHere.cpp \
ThreadPlanStepInRange.cpp \
ThreadPlanStepInstruction.cpp \
ThreadPlanStepOut.cpp \
ThreadPlanStepOverBreakpoint.cpp \
ThreadPlanStepOverRange.cpp \
ThreadPlanStepRange.cpp \
ThreadPlanStepThrough.cpp \
ThreadPlanStepUntil.cpp \
ThreadPlanTracer.cpp \
ThreadSpec.cpp \
UnixSignals.cpp \
UnwindAssembly.cpp
TGHDRS= DiagnosticCommonKinds \
DeclNodes \
StmtNodes \
CommentCommandList
.include "../lldb.lib.mk"

View File

@ -0,0 +1,18 @@
# $FreeBSD$
.include <bsd.own.mk>
LIB= lldbUtility
SRCDIR= tools/lldb/source/Utility
SRCS= ARM_DWARF_Registers.cpp \
KQueue.cpp \
PseudoTerminal.cpp \
Range.cpp \
RefCounter.cpp \
SharingPtr.cpp \
StringExtractor.cpp \
StringExtractorGDBRemote.cpp \
TimeSpecTimeout.cpp
.include "../lldb.lib.mk"

View File

@ -48,7 +48,7 @@ SRCS= ELFObjectWriter.cpp \
WinCOFFObjectWriter.cpp \
WinCOFFStreamer.cpp
.if ${MK_CLANG_EXTRAS} != "no"
.if ${MK_CLANG_EXTRAS} != "no" || ${MK_LLDB} != "no"
SRCS+= MCDisassembler.cpp
.endif

View File

@ -84,11 +84,14 @@ SRCS= APFloat.cpp \
regstrlcpy.c \
system_error.cpp
.if ${MK_CLANG_EXTRAS} != "no" || ${MK_LLDB} != "no"
SRCS+= DataExtractor.cpp \
Disassembler.cpp
.endif
.if ${MK_CLANG_EXTRAS} != "no"
SRCS+= Compression.cpp \
DataExtractor.cpp \
DataStream.cpp \
Disassembler.cpp \
FileUtilities.cpp \
SystemUtils.cpp
.endif

View File

@ -8,7 +8,7 @@ SRCDIR= lib/Target/X86/Disassembler
INCDIR= lib/Target/X86
SRCS= X86Disassembler.cpp
.if ${MK_CLANG_EXTRAS} != "no"
.if ${MK_CLANG_EXTRAS} != "no" || ${MK_LLDB} != "no"
SRCS+= X86DisassemblerDecoder.c
.endif

8
lib/clang/lldb.lib.mk Normal file
View File

@ -0,0 +1,8 @@
# $FreeBSD$
LLDB_SRCS= ${.CURDIR}/../../../contrib/llvm/tools/lldb
CFLAGS+=-I${LLDB_SRCS}/include -I${LLDB_SRCS}/source
CXXFLAGS+=-std=c++11 -DLLDB_DISABLE_PYTHON
.include "clang.lib.mk"

View File

@ -381,6 +381,7 @@ __DEFAULT_NO_OPTIONS = \
LIBICONV_COMPAT \
INSTALL_AS_USER \
LDNS_UTILS \
LLDB \
NMTREE \
NAND \
OFED \
@ -590,6 +591,10 @@ MK_CLANG_FULL:= no
MK_CLANG_IS_CC:= no
.endif
.if ${MK_CLANG_IS_CC} == "no"
MK_LLDB:= no
.endif
#
# Set defaults for the MK_*_SUPPORT variables.
#

View File

@ -0,0 +1,2 @@
.\" $FreeBSD$
Set to build the LLDB debugger.

View File

@ -4,7 +4,8 @@
SUBDIR= clang clang-tblgen tblgen
.if ${MK_CLANG_EXTRAS} != "no" && !defined(TOOLS_PREFIX)
.if !defined(TOOLS_PREFIX)
.if ${MK_CLANG_EXTRAS} != "no"
SUBDIR+=bugpoint \
llc \
lli \
@ -25,4 +26,9 @@ SUBDIR+=bugpoint \
opt
.endif
.if ${MK_LLDB} != "no"
SUBDIR+=lldb
.endif
.endif # TOOLS_PREFIX
.include <bsd.subdir.mk>

135
usr.bin/clang/lldb/Makefile Normal file
View File

@ -0,0 +1,135 @@
# $FreeBSD$
.include <bsd.own.mk>
PROG_CXX=lldb
LLDB_SRCS=${.CURDIR}/../../../contrib/llvm/tools/lldb
CFLAGS+= -I${LLDB_SRCS}/include
CXXFLAGS+= -std=c++11
SRCDIR= tools/lldb/tools/driver
SRCS= Driver.cpp \
IOChannel.cpp
lldb.1:
ln -fs ${LLDB_SRCS}/docs/lldb.1 ${.TARGET}
DPADD= ${LIBEDIT} ${LIBCURSES} ${LIBEXECINFO}
LDADD= -ledit -lcurses -lexecinfo
LLDB_LIBS=\
lldb \
\
lldbAPI \
lldbBreakpoint \
lldbCommands \
lldbCore \
lldbDataFormatters \
lldbExpression \
lldbHostFreeBSD \
lldbHostCommon \
lldbInterpreter \
lldbSymbol \
lldbTarget \
lldbUtility \
\
lldbPluginABISysV_x86_64 \
lldbPluginCXXItaniumABI \
lldbPluginDisassemblerLLVM \
lldbPluginInstructionARM \
lldbPluginSymbolFileDWARF \
lldbPluginSymbolFileSymtab \
lldbPluginDynamicLoaderStatic \
lldbPluginDynamicLoaderPosixDYLD \
lldbPluginObjectContainerBSDArchive \
lldbPluginObjectFileELF \
lldbPluginSymbolVendorELF \
lldbPluginPlatformFreeBSD \
lldbPluginPlatformGDB \
lldbPluginProcessElfCore \
lldbPluginProcessFreeBSD \
lldbPluginProcessGDBRemote \
lldbPluginProcessUtility \
lldbPluginProcessPOSIX \
lldbPluginUnwindAssemblyInstEmulation \
lldbPluginUnwindAssemblyX86
LDADD+= -Wl,--start-group
.for lib in ${LLDB_LIBS}
DPADD+= ${.OBJDIR}/../../../lib/clang/lib${lib}/lib${lib}.a
LDADD+= ${.OBJDIR}/../../../lib/clang/lib${lib}/lib${lib}.a
.endfor
LDADD+= -Wl,--end-group
# Clang and LLVM libraries
LIBDEPS=\
clangfrontend \
clangdriver \
clangserialization \
clangcodegen \
clangparse \
clangsema \
clanganalysis \
clangedit \
clangast \
clangbasic \
clanglex \
\
llvmarmasmparser \
llvmarmcodegen \
llvminstrumentation \
llvmirreader \
llvmlinker \
llvmmipsasmparser \
llvmmipscodegen \
llvmmipsdisassembler \
llvmobjcarcopts \
llvmpowerpccodegen \
llvmx86asmparser \
llvmx86codegen \
llvmx86disassembler \
llvmmcjit \
llvmmcdisassembler \
llvmarmdisassembler \
llvmselectiondag \
llvmipo \
llvmbitwriter \
llvmbitreader \
llvmasmparser \
llvminterpreter \
llvmjit \
llvmarmdesc \
llvmasmprinter \
llvmmipsdesc \
llvmmipsinstprinter \
llvmpowerpcdesc \
llvmpowerpcinstprinter \
llvmruntimedyld \
llvmvectorize \
llvmx86desc \
llvmx86instprinter \
llvmexecutionengine \
llvmcodegen \
llvmscalaropts \
llvmarminfo \
llvmarminstprinter \
llvmmcparser \
llvmmipsinfo \
llvmpowerpcinfo \
llvmx86info \
llvmx86utils \
llvmobject \
llvminstcombine \
llvmtransformutils \
llvmipa \
llvmanalysis \
llvmtarget \
llvmcore \
llvmmc \
llvmsupport
.include "../clang.prog.mk"
LDADD+= -lpthread