pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Import lldb-4.0.0nb20161216 as wip/lldb-git-netbsd.



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Fri Dec 16 19:39:39 2016 +0100
Changeset:	5ee8f6b1b3d3b08795f34c9196e3f1a60fbeb4e4

Added Files:
	lldb-git-netbsd/DESCR
	lldb-git-netbsd/Makefile
	lldb-git-netbsd/PLIST
	lldb-git-netbsd/TODO
	lldb-git-netbsd/buildlink3.mk
	lldb-git-netbsd/distinfo
	lldb-git-netbsd/patches/patch-cmake_LLDBDependencies.cmake
	lldb-git-netbsd/patches/patch-include_lldb_Host_linux_Personality.h
	lldb-git-netbsd/patches/patch-source_CMakeLists.txt
	lldb-git-netbsd/patches/patch-source_Plugins_Process_CMakeLists.txt
	lldb-git-netbsd/patches/patch-source_Plugins_Process_Linux_CMakeLists.txt
	lldb-git-netbsd/patches/patch-source_Plugins_Process_Linux_NativeProcessLinux.cpp
	lldb-git-netbsd/patches/patch-source_Plugins_Process_Linux_NativeRegisterContextLinux.cpp
	lldb-git-netbsd/patches/patch-source_Plugins_Process_Linux_NativeRegisterContextLinux__x86__64.cpp
	lldb-git-netbsd/patches/patch-source_Plugins_Process_Linux_NativeThreadLinux.cpp
	lldb-git-netbsd/patches/patch-source_Plugins_Process_Linux_NativeThreadLinux.h
	lldb-git-netbsd/patches/patch-source_Plugins_Process_Linux_Procfs.h
	lldb-git-netbsd/patches/patch-tools_lldb-mi_MICmnBase.cpp
	lldb-git-netbsd/patches/patch-tools_lldb-mi_MICmnBase.h
	lldb-git-netbsd/patches/patch-tools_lldb-mi_MIDriver.cpp
	lldb-git-netbsd/patches/patch-tools_lldb-mi_MIUtilString.cpp
	lldb-git-netbsd/patches/patch-tools_lldb-mi_MIUtilString.h
	lldb-git-netbsd/patches/patch-tools_lldb-server_CMakeLists.txt

Log Message:
Import lldb-4.0.0nb20161216 as wip/lldb-git-netbsd.

Next generation, high-performance debugger

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=5ee8f6b1b3d3b08795f34c9196e3f1a60fbeb4e4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 lldb-git-netbsd/DESCR                              |   1 +
 lldb-git-netbsd/Makefile                           |  82 +++
 lldb-git-netbsd/PLIST                              | 603 +++++++++++++++++++++
 lldb-git-netbsd/TODO                               |   7 +
 lldb-git-netbsd/buildlink3.mk                      |  18 +
 lldb-git-netbsd/distinfo                           |  31 ++
 .../patches/patch-cmake_LLDBDependencies.cmake     |  12 +
 .../patch-include_lldb_Host_linux_Personality.h    |  19 +
 .../patches/patch-source_CMakeLists.txt            |  12 +
 .../patch-source_Plugins_Process_CMakeLists.txt    |  12 +
 ...tch-source_Plugins_Process_Linux_CMakeLists.txt |  16 +
 ...ce_Plugins_Process_Linux_NativeProcessLinux.cpp | 278 ++++++++++
 ...ns_Process_Linux_NativeRegisterContextLinux.cpp |  36 ++
 ...s_Linux_NativeRegisterContextLinux__x86__64.cpp |  26 +
 ...rce_Plugins_Process_Linux_NativeThreadLinux.cpp | 123 +++++
 ...ource_Plugins_Process_Linux_NativeThreadLinux.h |  14 +
 .../patch-source_Plugins_Process_Linux_Procfs.h    |  17 +
 .../patches/patch-tools_lldb-mi_MICmnBase.cpp      |  13 +
 .../patches/patch-tools_lldb-mi_MICmnBase.h        |  13 +
 .../patches/patch-tools_lldb-mi_MIDriver.cpp       |  13 +
 .../patches/patch-tools_lldb-mi_MIUtilString.cpp   |  13 +
 .../patches/patch-tools_lldb-mi_MIUtilString.h     |  13 +
 .../patches/patch-tools_lldb-server_CMakeLists.txt |  26 +
 23 files changed, 1398 insertions(+)

diffs:
diff --git a/lldb-git-netbsd/DESCR b/lldb-git-netbsd/DESCR
new file mode 100644
index 0000000..2a231b4
--- /dev/null
+++ b/lldb-git-netbsd/DESCR
@@ -0,0 +1 @@
+Next generation, high-performance debugger
diff --git a/lldb-git-netbsd/Makefile b/lldb-git-netbsd/Makefile
new file mode 100644
index 0000000..3a9208b
--- /dev/null
+++ b/lldb-git-netbsd/Makefile
@@ -0,0 +1,82 @@
+# $NetBSD: Makefile.common,v 1.7 2015/07/20 05:49:53 adam Exp $
+
+PKGNAME=	lldb-4.0.0
+CATEGORIES=	lang devel
+
+GIT_REPOSITORIES=	lldb
+GIT_REPO.lldb=		git://github.com/llvm-mirror/lldb.git
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	http://lldb.org/
+COMMENT=	Next generation, high-performance debugger
+LICENSE=	modified-bsd
+
+#DEPENDS+=	${PYPKGPREFIX}-six-[0-9]*:../../lang/py-six
+
+WRKSRC=			${WRKDIR}/${PKGBASE}
+CONFIGURE_DIRS=		${WRKDIR}/build
+CMAKE_ARG_PATH=		${WRKSRC}
+
+USE_LANGUAGES=		c c++
+USE_CMAKE=		yes
+GCC_REQD+=		4.8
+PY_PATCHPLIST=		yes
+
+CMAKE_ARGS+=	-DLLVM_CONFIG=${LLVM_CONFIG_PATH}
+CMAKE_ARGS+=	-DCMAKE_BUILD_TYPE=Release
+CMAKE_ARGS+=	-DCMAKE_C_COMPILER=${CC:Q}
+CMAKE_ARGS+=	-DCMAKE_CXX_COMPILER=${CXX:Q}
+
+CHECK_PORTABILITY_SKIP=	utils/buildit/build_llvm
+
+REPLACE_PERL+=		*.pl
+REPLACE_PERL+=		*/*.pl
+REPLACE_PERL+=		*/*/*.pl
+REPLACE_PERL+=		*/*/*/*.pl
+REPLACE_PERL+=		*/*/*/*/*.pl
+REPLACE_PERL+=		*/*/*/*/*/*.pl
+REPLACE_PERL+=		scripts/sed-sources
+
+REPLACE_PYTHON+=	*.py
+REPLACE_PYTHON+=	*/*.py
+REPLACE_PYTHON+=	*/*/*.py
+REPLACE_PYTHON+=	*/*/*/*.py
+REPLACE_PYTHON+=	*/*/*/*/*.py
+REPLACE_PYTHON+=	*/*/*/*/*/*.py
+REPLACE_PYTHON+=	*/*/*/*/*/*/*.py
+REPLACE_PYTHON+=	*/*/*/*/*/*/*/*.py
+REPLACE_PYTHON+=	scripts/shush
+
+TEST_TARGET=		check-lldb
+TEST_ENV+=		LD_LIBRARY_PATH=${WRKDIR}/build/lib
+
+.if exists(/usr/include/panel.h)
+CMAKE_ARGS+=	-DLLDB_DISABLE_CURSES:BOOL=FALSE
+.else
+CMAKE_ARGS+=	-DLLDB_DISABLE_CURSES:BOOL=TRUE
+.endif
+
+post-extract:
+	${RUN} mkdir -p ${WRKDIR}/build
+	# Temporary hack to nullify !amd64 platforms
+	# Required to port the process plugin from linux to NetBSD
+	# amd64/NetBSD goes first
+	${RM} ${WRKSRC}/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp
+	${RM} ${WRKSRC}/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
+	${RM} ${WRKSRC}/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp
+	${RM} ${WRKSRC}/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.cpp
+
+.include "../../textproc/libxml2/buildlink3.mk"
+DEPENDS+=	llvm-${PKGVERSION_NOREV}{,nb*}:../../wip/llvm-git
+.include "../../wip/llvm-git/buildlink3.mk"
+DEPENDS+=	clang-${PKGVERSION_NOREV}{,nb*}:../../wip/clang-git
+.include "../../wip/clang-git/buildlink3.mk"
+.include "../../wip/mk/git-package.mk"
+PYTHON_VERSIONS_ACCEPTED=	27
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../lang/python/extension.mk"
+.include "../../lang/python/pyversion.mk"
+.include "../../lang/python/application.mk"
+.include "../../lang/python/tool.mk"
+.include "../../devel/swig/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/lldb-git-netbsd/PLIST b/lldb-git-netbsd/PLIST
new file mode 100644
index 0000000..9d8b906
--- /dev/null
+++ b/lldb-git-netbsd/PLIST
@@ -0,0 +1,603 @@
+@comment $NetBSD$
+${PYSITELIB}/lldb/__init__.py
+${PYSITELIB}/lldb/_lldb.so
+${PYSITELIB}/lldb/embedded_interpreter.py
+${PYSITELIB}/lldb/formatters/Logger.py
+${PYSITELIB}/lldb/formatters/__init__.py
+${PYSITELIB}/lldb/formatters/attrib_fromdict.py
+${PYSITELIB}/lldb/formatters/cache.py
+${PYSITELIB}/lldb/formatters/cpp/__init__.py
+${PYSITELIB}/lldb/formatters/cpp/gnu_libstdcpp.py
+${PYSITELIB}/lldb/formatters/cpp/libcxx.py
+${PYSITELIB}/lldb/formatters/metrics.py
+${PYSITELIB}/lldb/formatters/synth.py
+${PYSITELIB}/lldb/lldb-argdumper
+${PYSITELIB}/lldb/runtime/__init__.py
+${PYSITELIB}/lldb/utils/__init__.py
+${PYSITELIB}/lldb/utils/symbolication.py
+${PYSITELIB}/six.py
+bin/${PKGNAME}
+bin/lldb
+bin/lldb-argdumper
+bin/lldb-mi
+bin/lldb-mi-${PKGVERSION}
+bin/lldb-server
+bin/lldb-server-${PKGVERSION}
+include/lldb/API/LLDB.h
+include/lldb/API/SBAddress.h
+include/lldb/API/SBAttachInfo.h
+include/lldb/API/SBBlock.h
+include/lldb/API/SBBreakpoint.h
+include/lldb/API/SBBreakpointLocation.h
+include/lldb/API/SBBroadcaster.h
+include/lldb/API/SBCommandInterpreter.h
+include/lldb/API/SBCommandReturnObject.h
+include/lldb/API/SBCommunication.h
+include/lldb/API/SBCompileUnit.h
+include/lldb/API/SBData.h
+include/lldb/API/SBDebugger.h
+include/lldb/API/SBDeclaration.h
+include/lldb/API/SBDefines.h
+include/lldb/API/SBError.h
+include/lldb/API/SBEvent.h
+include/lldb/API/SBExecutionContext.h
+include/lldb/API/SBExpressionOptions.h
+include/lldb/API/SBFileSpec.h
+include/lldb/API/SBFileSpecList.h
+include/lldb/API/SBFrame.h
+include/lldb/API/SBFunction.h
+include/lldb/API/SBHostOS.h
+include/lldb/API/SBInstruction.h
+include/lldb/API/SBInstructionList.h
+include/lldb/API/SBLanguageRuntime.h
+include/lldb/API/SBLaunchInfo.h
+include/lldb/API/SBLineEntry.h
+include/lldb/API/SBListener.h
+include/lldb/API/SBMemoryRegionInfo.h
+include/lldb/API/SBMemoryRegionInfoList.h
+include/lldb/API/SBModule.h
+include/lldb/API/SBModuleSpec.h
+include/lldb/API/SBPlatform.h
+include/lldb/API/SBProcess.h
+include/lldb/API/SBQueue.h
+include/lldb/API/SBQueueItem.h
+include/lldb/API/SBSection.h
+include/lldb/API/SBSourceManager.h
+include/lldb/API/SBStream.h
+include/lldb/API/SBStringList.h
+include/lldb/API/SBStructuredData.h
+include/lldb/API/SBSymbol.h
+include/lldb/API/SBSymbolContext.h
+include/lldb/API/SBSymbolContextList.h
+include/lldb/API/SBTarget.h
+include/lldb/API/SBThread.h
+include/lldb/API/SBThreadCollection.h
+include/lldb/API/SBThreadPlan.h
+include/lldb/API/SBType.h
+include/lldb/API/SBTypeCategory.h
+include/lldb/API/SBTypeEnumMember.h
+include/lldb/API/SBTypeFilter.h
+include/lldb/API/SBTypeFormat.h
+include/lldb/API/SBTypeNameSpecifier.h
+include/lldb/API/SBTypeSummary.h
+include/lldb/API/SBTypeSynthetic.h
+include/lldb/API/SBUnixSignals.h
+include/lldb/API/SBValue.h
+include/lldb/API/SBValueList.h
+include/lldb/API/SBVariablesOptions.h
+include/lldb/API/SBWatchpoint.h
+include/lldb/API/SystemInitializerFull.h
+include/lldb/Breakpoint/Breakpoint.h
+include/lldb/Breakpoint/BreakpointID.h
+include/lldb/Breakpoint/BreakpointIDList.h
+include/lldb/Breakpoint/BreakpointList.h
+include/lldb/Breakpoint/BreakpointLocation.h
+include/lldb/Breakpoint/BreakpointLocationCollection.h
+include/lldb/Breakpoint/BreakpointLocationList.h
+include/lldb/Breakpoint/BreakpointOptions.h
+include/lldb/Breakpoint/BreakpointResolver.h
+include/lldb/Breakpoint/BreakpointResolverAddress.h
+include/lldb/Breakpoint/BreakpointResolverFileLine.h
+include/lldb/Breakpoint/BreakpointResolverFileRegex.h
+include/lldb/Breakpoint/BreakpointResolverName.h
+include/lldb/Breakpoint/BreakpointSite.h
+include/lldb/Breakpoint/BreakpointSiteList.h
+include/lldb/Breakpoint/Stoppoint.h
+include/lldb/Breakpoint/StoppointCallbackContext.h
+include/lldb/Breakpoint/StoppointLocation.h
+include/lldb/Breakpoint/Watchpoint.h
+include/lldb/Breakpoint/WatchpointList.h
+include/lldb/Breakpoint/WatchpointOptions.h
+include/lldb/Core/Address.h
+include/lldb/Core/AddressRange.h
+include/lldb/Core/AddressResolver.h
+include/lldb/Core/AddressResolverFileLine.h
+include/lldb/Core/AddressResolverName.h
+include/lldb/Core/ArchSpec.h
+include/lldb/Core/Baton.h
+include/lldb/Core/Broadcaster.h
+include/lldb/Core/ClangForward.h
+include/lldb/Core/Communication.h
+include/lldb/Core/Connection.h
+include/lldb/Core/ConstString.h
+include/lldb/Core/DataBuffer.h
+include/lldb/Core/DataBufferHeap.h
+include/lldb/Core/DataBufferMemoryMap.h
+include/lldb/Core/DataEncoder.h
+include/lldb/Core/DataExtractor.h
+include/lldb/Core/Debugger.h
+include/lldb/Core/Disassembler.h
+include/lldb/Core/EmulateInstruction.h
+include/lldb/Core/Error.h
+include/lldb/Core/Event.h
+include/lldb/Core/FastDemangle.h
+include/lldb/Core/FileLineResolver.h
+include/lldb/Core/FileSpecList.h
+include/lldb/Core/Flags.h
+include/lldb/Core/FormatEntity.h
+include/lldb/Core/History.h
+include/lldb/Core/IOHandler.h
+include/lldb/Core/IOStreamMacros.h
+include/lldb/Core/Listener.h
+include/lldb/Core/LoadedModuleInfoList.h
+include/lldb/Core/Log.h
+include/lldb/Core/Logging.h
+include/lldb/Core/Mangled.h
+include/lldb/Core/MappedHash.h
+include/lldb/Core/Module.h
+include/lldb/Core/ModuleChild.h
+include/lldb/Core/ModuleList.h
+include/lldb/Core/ModuleSpec.h
+include/lldb/Core/Opcode.h
+include/lldb/Core/PluginInterface.h
+include/lldb/Core/PluginManager.h
+include/lldb/Core/RangeMap.h
+include/lldb/Core/RegisterValue.h
+include/lldb/Core/RegularExpression.h
+include/lldb/Core/STLUtils.h
+include/lldb/Core/Scalar.h
+include/lldb/Core/SearchFilter.h
+include/lldb/Core/Section.h
+include/lldb/Core/SourceManager.h
+include/lldb/Core/State.h
+include/lldb/Core/Stream.h
+include/lldb/Core/StreamAsynchronousIO.h
+include/lldb/Core/StreamBuffer.h
+include/lldb/Core/StreamCallback.h
+include/lldb/Core/StreamFile.h
+include/lldb/Core/StreamGDBRemote.h
+include/lldb/Core/StreamString.h
+include/lldb/Core/StreamTee.h
+include/lldb/Core/StringList.h
+include/lldb/Core/StructuredData.h
+include/lldb/Core/ThreadSafeDenseMap.h
+include/lldb/Core/ThreadSafeDenseSet.h
+include/lldb/Core/ThreadSafeSTLMap.h
+include/lldb/Core/ThreadSafeSTLVector.h
+include/lldb/Core/ThreadSafeValue.h
+include/lldb/Core/Timer.h
+include/lldb/Core/UUID.h
+include/lldb/Core/UniqueCStringMap.h
+include/lldb/Core/UserID.h
+include/lldb/Core/UserSettingsController.h
+include/lldb/Core/VMRange.h
+include/lldb/Core/Value.h
+include/lldb/Core/ValueObject.h
+include/lldb/Core/ValueObjectCast.h
+include/lldb/Core/ValueObjectChild.h
+include/lldb/Core/ValueObjectConstResult.h
+include/lldb/Core/ValueObjectConstResultCast.h
+include/lldb/Core/ValueObjectConstResultChild.h
+include/lldb/Core/ValueObjectConstResultImpl.h
+include/lldb/Core/ValueObjectDynamicValue.h
+include/lldb/Core/ValueObjectList.h
+include/lldb/Core/ValueObjectMemory.h
+include/lldb/Core/ValueObjectRegister.h
+include/lldb/Core/ValueObjectSyntheticFilter.h
+include/lldb/Core/ValueObjectVariable.h
+include/lldb/Core/dwarf.h
+include/lldb/DataFormatters/CXXFunctionPointer.h
+include/lldb/DataFormatters/DataVisualization.h
+include/lldb/DataFormatters/DumpValueObjectOptions.h
+include/lldb/DataFormatters/FormatCache.h
+include/lldb/DataFormatters/FormatClasses.h
+include/lldb/DataFormatters/FormatManager.h
+include/lldb/DataFormatters/FormattersContainer.h
+include/lldb/DataFormatters/FormattersHelpers.h
+include/lldb/DataFormatters/LanguageCategory.h
+include/lldb/DataFormatters/StringPrinter.h
+include/lldb/DataFormatters/TypeCategory.h
+include/lldb/DataFormatters/TypeCategoryMap.h
+include/lldb/DataFormatters/TypeFormat.h
+include/lldb/DataFormatters/TypeSummary.h
+include/lldb/DataFormatters/TypeSynthetic.h
+include/lldb/DataFormatters/TypeValidator.h
+include/lldb/DataFormatters/ValueObjectPrinter.h
+include/lldb/DataFormatters/VectorIterator.h
+include/lldb/DataFormatters/VectorType.h
+include/lldb/Expression/DWARFExpression.h
+include/lldb/Expression/DiagnosticManager.h
+include/lldb/Expression/Expression.h
+include/lldb/Expression/ExpressionParser.h
+include/lldb/Expression/ExpressionSourceCode.h
+include/lldb/Expression/ExpressionTypeSystemHelper.h
+include/lldb/Expression/ExpressionVariable.h
+include/lldb/Expression/FunctionCaller.h
+include/lldb/Expression/IRDynamicChecks.h
+include/lldb/Expression/IRExecutionUnit.h
+include/lldb/Expression/IRInterpreter.h
+include/lldb/Expression/IRMemoryMap.h
+include/lldb/Expression/LLVMUserExpression.h
+include/lldb/Expression/Materializer.h
+include/lldb/Expression/REPL.h
+include/lldb/Expression/UserExpression.h
+include/lldb/Expression/UtilityFunction.h
+include/lldb/Host/Config.h
+include/lldb/Host/ConnectionFileDescriptor.h
+include/lldb/Host/Debug.h
+include/lldb/Host/Editline.h
+include/lldb/Host/Endian.h
+include/lldb/Host/File.h
+include/lldb/Host/FileCache.h
+include/lldb/Host/FileSpec.h
+include/lldb/Host/FileSystem.h
+include/lldb/Host/Host.h
+include/lldb/Host/HostGetOpt.h
+include/lldb/Host/HostInfo.h
+include/lldb/Host/HostInfoBase.h
+include/lldb/Host/HostNativeProcess.h
+include/lldb/Host/HostNativeProcessBase.h
+include/lldb/Host/HostNativeThread.h
+include/lldb/Host/HostNativeThreadBase.h
+include/lldb/Host/HostNativeThreadForward.h
+include/lldb/Host/HostProcess.h
+include/lldb/Host/HostThread.h
+include/lldb/Host/IOObject.h
+include/lldb/Host/LockFile.h
+include/lldb/Host/LockFileBase.h
+include/lldb/Host/MainLoop.h
+include/lldb/Host/MainLoopBase.h
+include/lldb/Host/MonitoringProcessLauncher.h
+include/lldb/Host/OptionParser.h
+include/lldb/Host/Pipe.h
+include/lldb/Host/PipeBase.h
+include/lldb/Host/PosixApi.h
+include/lldb/Host/Predicate.h
+include/lldb/Host/ProcessLauncher.h
+include/lldb/Host/ProcessRunLock.h
+include/lldb/Host/Socket.h
+include/lldb/Host/SocketAddress.h
+include/lldb/Host/StringConvert.h
+include/lldb/Host/Symbols.h
+include/lldb/Host/Terminal.h
+include/lldb/Host/ThisThread.h
+include/lldb/Host/ThreadLauncher.h
+include/lldb/Host/Time.h
+include/lldb/Host/XML.h
+include/lldb/Host/android/Config.h
+include/lldb/Host/android/HostInfoAndroid.h
+include/lldb/Host/common/GetOptInc.h
+include/lldb/Host/common/NativeBreakpoint.h
+include/lldb/Host/common/NativeBreakpointList.h
+include/lldb/Host/common/NativeProcessProtocol.h
+include/lldb/Host/common/NativeRegisterContext.h
+include/lldb/Host/common/NativeRegisterContextRegisterInfo.h
+include/lldb/Host/common/NativeThreadProtocol.h
+include/lldb/Host/common/NativeWatchpointList.h
+include/lldb/Host/common/SoftwareBreakpoint.h
+include/lldb/Host/common/TCPSocket.h
+include/lldb/Host/common/UDPSocket.h
+include/lldb/Host/freebsd/Config.h
+include/lldb/Host/freebsd/HostInfoFreeBSD.h
+include/lldb/Host/freebsd/HostThreadFreeBSD.h
+include/lldb/Host/linux/AbstractSocket.h
+include/lldb/Host/linux/Config.h
+include/lldb/Host/linux/HostInfoLinux.h
+include/lldb/Host/linux/HostThreadLinux.h
+include/lldb/Host/linux/Personality.h
+include/lldb/Host/linux/ProcessLauncherLinux.h
+include/lldb/Host/linux/Ptrace.h
+include/lldb/Host/linux/Uio.h
+include/lldb/Host/macosx/Config.h
+include/lldb/Host/macosx/HostInfoMacOSX.h
+include/lldb/Host/macosx/HostThreadMacOSX.h
+include/lldb/Host/mingw/Config.h
+include/lldb/Host/msvc/Config.h
+include/lldb/Host/netbsd/Config.h
+include/lldb/Host/netbsd/HostInfoNetBSD.h
+include/lldb/Host/netbsd/HostThreadNetBSD.h
+include/lldb/Host/posix/ConnectionFileDescriptorPosix.h
+include/lldb/Host/posix/DomainSocket.h
+include/lldb/Host/posix/Fcntl.h
+include/lldb/Host/posix/HostInfoPosix.h
+include/lldb/Host/posix/HostProcessPosix.h
+include/lldb/Host/posix/HostThreadPosix.h
+include/lldb/Host/posix/LockFilePosix.h
+include/lldb/Host/posix/MainLoopPosix.h
+include/lldb/Host/posix/PipePosix.h
+include/lldb/Host/posix/ProcessLauncherPosix.h
+include/lldb/Host/windows/AutoHandle.h
+include/lldb/Host/windows/ConnectionGenericFileWindows.h
+include/lldb/Host/windows/HostInfoWindows.h
+include/lldb/Host/windows/HostProcessWindows.h
+include/lldb/Host/windows/HostThreadWindows.h
+include/lldb/Host/windows/LockFileWindows.h
+include/lldb/Host/windows/PipeWindows.h
+include/lldb/Host/windows/PosixApi.h
+include/lldb/Host/windows/ProcessLauncherWindows.h
+include/lldb/Host/windows/editlinewin.h
+include/lldb/Host/windows/windows.h
+include/lldb/Initialization/SystemInitializer.h
+include/lldb/Initialization/SystemInitializerCommon.h
+include/lldb/Initialization/SystemLifetimeManager.h
+include/lldb/Interpreter/Args.h
+include/lldb/Interpreter/CommandAlias.h
+include/lldb/Interpreter/CommandCompletions.h
+include/lldb/Interpreter/CommandHistory.h
+include/lldb/Interpreter/CommandInterpreter.h
+include/lldb/Interpreter/CommandObject.h
+include/lldb/Interpreter/CommandObjectMultiword.h
+include/lldb/Interpreter/CommandObjectRegexCommand.h
+include/lldb/Interpreter/CommandOptionValidators.h
+include/lldb/Interpreter/CommandReturnObject.h
+include/lldb/Interpreter/OptionGroupArchitecture.h
+include/lldb/Interpreter/OptionGroupBoolean.h
+include/lldb/Interpreter/OptionGroupFile.h
+include/lldb/Interpreter/OptionGroupFormat.h
+include/lldb/Interpreter/OptionGroupOutputFile.h
+include/lldb/Interpreter/OptionGroupPlatform.h
+include/lldb/Interpreter/OptionGroupString.h
+include/lldb/Interpreter/OptionGroupUInt64.h
+include/lldb/Interpreter/OptionGroupUUID.h
+include/lldb/Interpreter/OptionGroupValueObjectDisplay.h
+include/lldb/Interpreter/OptionGroupVariable.h
+include/lldb/Interpreter/OptionGroupWatchpoint.h
+include/lldb/Interpreter/OptionValue.h
+include/lldb/Interpreter/OptionValueArch.h
+include/lldb/Interpreter/OptionValueArgs.h
+include/lldb/Interpreter/OptionValueArray.h
+include/lldb/Interpreter/OptionValueBoolean.h
+include/lldb/Interpreter/OptionValueChar.h
+include/lldb/Interpreter/OptionValueDictionary.h
+include/lldb/Interpreter/OptionValueEnumeration.h
+include/lldb/Interpreter/OptionValueFileSpec.h
+include/lldb/Interpreter/OptionValueFileSpecList.h
+include/lldb/Interpreter/OptionValueFormat.h
+include/lldb/Interpreter/OptionValueFormatEntity.h
+include/lldb/Interpreter/OptionValueLanguage.h
+include/lldb/Interpreter/OptionValuePathMappings.h
+include/lldb/Interpreter/OptionValueProperties.h
+include/lldb/Interpreter/OptionValueRegex.h
+include/lldb/Interpreter/OptionValueSInt64.h
+include/lldb/Interpreter/OptionValueString.h
+include/lldb/Interpreter/OptionValueUInt64.h
+include/lldb/Interpreter/OptionValueUUID.h
+include/lldb/Interpreter/OptionValues.h
+include/lldb/Interpreter/Options.h
+include/lldb/Interpreter/Property.h
+include/lldb/Interpreter/ScriptInterpreter.h
+include/lldb/Symbol/ArmUnwindInfo.h
+include/lldb/Symbol/Block.h
+include/lldb/Symbol/ClangASTContext.h
+include/lldb/Symbol/ClangASTImporter.h
+include/lldb/Symbol/ClangExternalASTSourceCallbacks.h
+include/lldb/Symbol/ClangExternalASTSourceCommon.h
+include/lldb/Symbol/ClangUtil.h
+include/lldb/Symbol/CompactUnwindInfo.h
+include/lldb/Symbol/CompileUnit.h
+include/lldb/Symbol/CompilerDecl.h
+include/lldb/Symbol/CompilerDeclContext.h
+include/lldb/Symbol/CompilerType.h
+include/lldb/Symbol/DWARFCallFrameInfo.h
+include/lldb/Symbol/DebugMacros.h
+include/lldb/Symbol/DeclVendor.h
+include/lldb/Symbol/Declaration.h
+include/lldb/Symbol/FuncUnwinders.h
+include/lldb/Symbol/Function.h
+include/lldb/Symbol/GoASTContext.h
+include/lldb/Symbol/JavaASTContext.h
+include/lldb/Symbol/LineEntry.h
+include/lldb/Symbol/LineTable.h
+include/lldb/Symbol/OCamlASTContext.h
+include/lldb/Symbol/ObjectContainer.h
+include/lldb/Symbol/ObjectFile.h
+include/lldb/Symbol/Symbol.h
+include/lldb/Symbol/SymbolContext.h
+include/lldb/Symbol/SymbolContextScope.h
+include/lldb/Symbol/SymbolFile.h
+include/lldb/Symbol/SymbolVendor.h
+include/lldb/Symbol/Symtab.h
+include/lldb/Symbol/TaggedASTType.h
+include/lldb/Symbol/Type.h
+include/lldb/Symbol/TypeList.h
+include/lldb/Symbol/TypeMap.h
+include/lldb/Symbol/TypeSystem.h
+include/lldb/Symbol/UnwindPlan.h
+include/lldb/Symbol/UnwindTable.h
+include/lldb/Symbol/Variable.h
+include/lldb/Symbol/VariableList.h
+include/lldb/Symbol/VerifyDecl.h
+include/lldb/Target/ABI.h
+include/lldb/Target/CPPLanguageRuntime.h
+include/lldb/Target/DynamicLoader.h
+include/lldb/Target/ExecutionContext.h
+include/lldb/Target/ExecutionContextScope.h
+include/lldb/Target/FileAction.h
+include/lldb/Target/InstrumentationRuntime.h
+include/lldb/Target/InstrumentationRuntimeStopInfo.h
+include/lldb/Target/JITLoader.h
+include/lldb/Target/JITLoaderList.h
+include/lldb/Target/Language.h
+include/lldb/Target/LanguageRuntime.h
+include/lldb/Target/Memory.h
+include/lldb/Target/MemoryHistory.h
+include/lldb/Target/MemoryRegionInfo.h
+include/lldb/Target/ObjCLanguageRuntime.h
+include/lldb/Target/OperatingSystem.h
+include/lldb/Target/PathMappingList.h
+include/lldb/Target/Platform.h
+include/lldb/Target/Process.h
+include/lldb/Target/ProcessInfo.h
+include/lldb/Target/ProcessLaunchInfo.h
+include/lldb/Target/Queue.h
+include/lldb/Target/QueueItem.h
+include/lldb/Target/QueueList.h
+include/lldb/Target/RegisterCheckpoint.h
+include/lldb/Target/RegisterContext.h
+include/lldb/Target/SectionLoadHistory.h
+include/lldb/Target/SectionLoadList.h
+include/lldb/Target/StackFrame.h
+include/lldb/Target/StackFrameList.h
+include/lldb/Target/StackID.h
+include/lldb/Target/StopInfo.h
+include/lldb/Target/StructuredDataPlugin.h
+include/lldb/Target/SystemRuntime.h
+include/lldb/Target/Target.h
+include/lldb/Target/TargetList.h
+include/lldb/Target/Thread.h
+include/lldb/Target/ThreadCollection.h
+include/lldb/Target/ThreadList.h
+include/lldb/Target/ThreadPlan.h
+include/lldb/Target/ThreadPlanBase.h
+include/lldb/Target/ThreadPlanCallFunction.h
+include/lldb/Target/ThreadPlanCallFunctionUsingABI.h
+include/lldb/Target/ThreadPlanCallOnFunctionExit.h
+include/lldb/Target/ThreadPlanCallUserExpression.h
+include/lldb/Target/ThreadPlanPython.h
+include/lldb/Target/ThreadPlanRunToAddress.h
+include/lldb/Target/ThreadPlanShouldStopHere.h
+include/lldb/Target/ThreadPlanStepInRange.h
+include/lldb/Target/ThreadPlanStepInstruction.h
+include/lldb/Target/ThreadPlanStepOut.h
+include/lldb/Target/ThreadPlanStepOverBreakpoint.h
+include/lldb/Target/ThreadPlanStepOverRange.h
+include/lldb/Target/ThreadPlanStepRange.h
+include/lldb/Target/ThreadPlanStepThrough.h
+include/lldb/Target/ThreadPlanStepUntil.h
+include/lldb/Target/ThreadPlanTracer.h
+include/lldb/Target/ThreadSpec.h
+include/lldb/Target/UnixSignals.h
+include/lldb/Target/Unwind.h
+include/lldb/Target/UnwindAssembly.h
+include/lldb/Utility/AnsiTerminal.h
+include/lldb/Utility/CleanUp.h
+include/lldb/Utility/ConvertEnum.h
+include/lldb/Utility/Either.h
+include/lldb/Utility/Iterable.h
+include/lldb/Utility/JSON.h
+include/lldb/Utility/LLDBAssert.h
+include/lldb/Utility/NameMatches.h
+include/lldb/Utility/PriorityPointerPair.h
+include/lldb/Utility/ProcessStructReader.h
+include/lldb/Utility/PseudoTerminal.h
+include/lldb/Utility/Range.h
+include/lldb/Utility/RegisterNumber.h
+include/lldb/Utility/SafeMachO.h
+include/lldb/Utility/SelectHelper.h
+include/lldb/Utility/SharedCluster.h
+include/lldb/Utility/SharingPtr.h
+include/lldb/Utility/StringExtractor.h
+include/lldb/Utility/StringLexer.h
+include/lldb/Utility/TaskPool.h
+include/lldb/Utility/Timeout.h
+include/lldb/Utility/Utils.h
+include/lldb/lldb-defines.h
+include/lldb/lldb-enumerations.h
+include/lldb/lldb-forward.h
+include/lldb/lldb-private-defines.h
+include/lldb/lldb-private-enumerations.h
+include/lldb/lldb-private-forward.h
+include/lldb/lldb-private-interfaces.h
+include/lldb/lldb-private-types.h
+include/lldb/lldb-private.h
+include/lldb/lldb-public.h
+include/lldb/lldb-types.h
+include/lldb/lldb-versioning.h
+lib/liblldb.so
+lib/liblldb.so.${PKGVERSION}
+lib/liblldb.so.40
+lib/liblldbBase.a
+lib/liblldbBreakpoint.a
+lib/liblldbCommands.a
+lib/liblldbCore.a
+lib/liblldbDataFormatters.a
+lib/liblldbExpression.a
+lib/liblldbHost.a
+lib/liblldbInitialization.a
+lib/liblldbInterpreter.a
+lib/liblldbPluginABIMacOSX_arm.a
+lib/liblldbPluginABIMacOSX_arm64.a
+lib/liblldbPluginABIMacOSX_i386.a
+lib/liblldbPluginABISysV_arm.a
+lib/liblldbPluginABISysV_arm64.a
+lib/liblldbPluginABISysV_hexagon.a
+lib/liblldbPluginABISysV_i386.a
+lib/liblldbPluginABISysV_mips.a
+lib/liblldbPluginABISysV_mips64.a
+lib/liblldbPluginABISysV_ppc.a
+lib/liblldbPluginABISysV_ppc64.a
+lib/liblldbPluginABISysV_s390x.a
+lib/liblldbPluginABISysV_x86_64.a
+lib/liblldbPluginAppleObjCRuntime.a
+lib/liblldbPluginCPlusPlusLanguage.a
+lib/liblldbPluginCXXItaniumABI.a
+lib/liblldbPluginDisassemblerLLVM.a
+lib/liblldbPluginDynamicLoaderHexagonDYLD.a
+lib/liblldbPluginDynamicLoaderMacOSXDYLD.a
+lib/liblldbPluginDynamicLoaderPosixDYLD.a
+lib/liblldbPluginDynamicLoaderStatic.a
+lib/liblldbPluginDynamicLoaderWindowsDYLD.a
+lib/liblldbPluginExpressionParserClang.a
+lib/liblldbPluginExpressionParserGo.a
+lib/liblldbPluginGoLanguage.a
+lib/liblldbPluginInstructionARM.a
+lib/liblldbPluginInstructionARM64.a
+lib/liblldbPluginInstructionMIPS.a
+lib/liblldbPluginInstructionMIPS64.a
+lib/liblldbPluginInstrumentationRuntimeAddressSanitizer.a
+lib/liblldbPluginInstrumentationRuntimeThreadSanitizer.a
+lib/liblldbPluginJITLoaderGDB.a
+lib/liblldbPluginJavaLanguage.a
+lib/liblldbPluginLanguageRuntimeGo.a
+lib/liblldbPluginLanguageRuntimeJava.a
+lib/liblldbPluginMemoryHistoryASan.a
+lib/liblldbPluginOCamlLanguage.a
+lib/liblldbPluginOSGo.a
+lib/liblldbPluginOSPython.a
+lib/liblldbPluginObjCLanguage.a
+lib/liblldbPluginObjCPlusPlusLanguage.a
+lib/liblldbPluginObjectContainerBSDArchive.a
+lib/liblldbPluginObjectContainerMachOArchive.a
+lib/liblldbPluginObjectFileELF.a
+lib/liblldbPluginObjectFileJIT.a
+lib/liblldbPluginObjectFileMachO.a
+lib/liblldbPluginObjectFilePECOFF.a
+lib/liblldbPluginPlatformAndroid.a
+lib/liblldbPluginPlatformFreeBSD.a
+lib/liblldbPluginPlatformGDB.a
+lib/liblldbPluginPlatformKalimba.a
+lib/liblldbPluginPlatformLinux.a
+lib/liblldbPluginPlatformMacOSX.a
+lib/liblldbPluginPlatformNetBSD.a
+lib/liblldbPluginPlatformPOSIX.a
+lib/liblldbPluginPlatformWindows.a
+lib/liblldbPluginProcessElfCore.a
+lib/liblldbPluginProcessGDBRemote.a
+lib/liblldbPluginProcessMachCore.a
+lib/liblldbPluginProcessMinidump.a
+lib/liblldbPluginProcessPOSIX.a
+lib/liblldbPluginProcessUtility.a
+lib/liblldbPluginRenderScriptRuntime.a
+lib/liblldbPluginScriptInterpreterNone.a
+lib/liblldbPluginScriptInterpreterPython.a
+lib/liblldbPluginStructuredDataDarwinLog.a
+lib/liblldbPluginSymbolFileDWARF.a
+lib/liblldbPluginSymbolFilePDB.a
+lib/liblldbPluginSymbolFileSymtab.a
+lib/liblldbPluginSymbolVendorELF.a
+lib/liblldbPluginSystemRuntimeMacOSX.a
+lib/liblldbPluginUnwindAssemblyInstEmulation.a
+lib/liblldbPluginUnwindAssemblyX86.a
+lib/liblldbSymbol.a
+lib/liblldbTarget.a
+lib/liblldbUtility.a
diff --git a/lldb-git-netbsd/TODO b/lldb-git-netbsd/TODO
new file mode 100644
index 0000000..cad052e
--- /dev/null
+++ b/lldb-git-netbsd/TODO
@@ -0,0 +1,7 @@
+Installs a bundled copy of lang/py-six, and conflicts with it.
+
+warning: /tmp/pkgsrc-tmp/wip/lldb-git/work/.destdir/usr/pkg/share/clang/clang-format-bbedit.applescript: executable bit is set on non-executable file.
+warning: /tmp/pkgsrc-tmp/wip/lldb-git/work/.destdir/usr/pkg/share/clang/clang-format-sublime.py: executable bit is set on non-executable file.
+warning: /tmp/pkgsrc-tmp/wip/lldb-git/work/.destdir/usr/pkg/share/clang/clang-format.el: executable bit is set on non-executable file.
+warning: /tmp/pkgsrc-tmp/wip/lldb-git/work/.destdir/usr/pkg/share/clang/clang-format.py: executable bit is set on non-executable file.
+warning: /tmp/pkgsrc-tmp/wip/lldb-git/work/.destdir/usr/pkg/share/man/man1/scan-build.1: executable bit is set on non-executable file.
diff --git a/lldb-git-netbsd/buildlink3.mk b/lldb-git-netbsd/buildlink3.mk
new file mode 100644
index 0000000..dd2271a
--- /dev/null
+++ b/lldb-git-netbsd/buildlink3.mk
@@ -0,0 +1,18 @@
+# $NetBSD$
+
+BUILDLINK_TREE+=	lldb
+
+.if !defined(LLDB_BUILDLINK3_MK)
+LLDB_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.lldb+=	lldb>=3.9.0nb20160121
+BUILDLINK_PKGSRCDIR.lldb?=	../../wip/lldb-git
+
+.include "../../textproc/libxml2/buildlink3.mk"
+.include "../../wip/llvm-git/buildlink3.mk"
+.include "../../wip/clang-git/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../devel/swig/buildlink3.mk"
+.endif	# LLDB_BUILDLINK3_MK
+
+BUILDLINK_TREE+=	-lldb
diff --git a/lldb-git-netbsd/distinfo b/lldb-git-netbsd/distinfo
new file mode 100644
index 0000000..f8eb080
--- /dev/null
+++ b/lldb-git-netbsd/distinfo
@@ -0,0 +1,31 @@
+$NetBSD: distinfo,v 1.35 2015/09/11 01:21:57 tnn Exp $
+
+SHA1 (cfe-3.6.2.src.tar.xz) = 7ba809c9c17819a16b668640a642ed134d7052f0
+RMD160 (cfe-3.6.2.src.tar.xz) = 10d913b4d5317f8c2520e5fc6117df30937317a8
+Size (cfe-3.6.2.src.tar.xz) = 8617576 bytes
+SHA1 (compiler-rt-3.6.2.src.tar.xz) = c6c52d2923a60f1a2ca2f22fea1770fd2e25728d
+RMD160 (compiler-rt-3.6.2.src.tar.xz) = 9b68a32d49d4bef4603d550934192f39fea42895
+Size (compiler-rt-3.6.2.src.tar.xz) = 1128080 bytes
+SHA1 (libcxx-3.6.2.src.tar.xz) = 6c5aee9f05ecf17d1e3ecb1add34a33a5a904469
+RMD160 (libcxx-3.6.2.src.tar.xz) = 42b8832d01d4e6b553babc93cb5dbd4ce2bb1931
+Size (libcxx-3.6.2.src.tar.xz) = 944020 bytes
+SHA1 (llvm-3.6.2.src.tar.xz) = 7a00257eb2bc9431e4c77c3a36b033072c54bc7e
+RMD160 (llvm-3.6.2.src.tar.xz) = 521cbc5fe2925ea3c6e90c7a31f752a04045c972
+Size (llvm-3.6.2.src.tar.xz) = 12802380 bytes
+SHA1 (patch-cmake_LLDBDependencies.cmake) = c74b2e92695bd5e0ef2f6aca2b1157024c20e89e
+SHA1 (patch-include_lldb_Host_linux_Personality.h) = c9bb2773987b871c000043a9fd3ac143110f79a4
+SHA1 (patch-source_CMakeLists.txt) = d280b1a64b272c4bbdcdab838e69301eb17af732
+SHA1 (patch-source_Plugins_Process_CMakeLists.txt) = be993a6f54da5b09a44e0ca9e4dea96012e539d9
+SHA1 (patch-source_Plugins_Process_Linux_CMakeLists.txt) = a3b5431f8b52d04c838c3a12eaa1fd66cc521c68
+SHA1 (patch-source_Plugins_Process_Linux_NativeProcessLinux.cpp) = 97e0338ef52ce243dda3875ec5e5c218ddff1929
+SHA1 (patch-source_Plugins_Process_Linux_NativeRegisterContextLinux.cpp) = 755cf9dce3aa8d1c32cff9fe3281a09f6d0e6c69
+SHA1 (patch-source_Plugins_Process_Linux_NativeRegisterContextLinux__x86__64.cpp) = f5219581c97d6179222e437122449673eac1cf59
+SHA1 (patch-source_Plugins_Process_Linux_NativeThreadLinux.cpp) = 7d72c5be16304bf2a2cd7b2441828c513e2e8160
+SHA1 (patch-source_Plugins_Process_Linux_NativeThreadLinux.h) = d3685ac9995b4b0c98a94c5a6b2383f386c3fff6
+SHA1 (patch-source_Plugins_Process_Linux_Procfs.h) = 9621cc9494a96d5d4c4fef06dcd9a85bd018f5a1
+SHA1 (patch-tools_lldb-mi_MICmnBase.cpp) = 851c82ac61e1241018755fbd7236af00379ac986
+SHA1 (patch-tools_lldb-mi_MICmnBase.h) = f550d5e10bcf02fb46472733acdbb820791f22e5
+SHA1 (patch-tools_lldb-mi_MIDriver.cpp) = bf1b5399e82bcfe54d6d852f64ed155328f2064d
+SHA1 (patch-tools_lldb-mi_MIUtilString.cpp) = 200d9712753b5559da79c2e16fa0889fea1e9432
+SHA1 (patch-tools_lldb-mi_MIUtilString.h) = 7e7befec383f88502a97aec509ba39477efde37d
+SHA1 (patch-tools_lldb-server_CMakeLists.txt) = ce9c14973f98fe3669b56886d6bf2033630c5aa7
diff --git a/lldb-git-netbsd/patches/patch-cmake_LLDBDependencies.cmake b/lldb-git-netbsd/patches/patch-cmake_LLDBDependencies.cmake
new file mode 100644
index 0000000..2eec517
--- /dev/null
+++ b/lldb-git-netbsd/patches/patch-cmake_LLDBDependencies.cmake
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- cmake/LLDBDependencies.cmake.orig	2016-12-14 14:10:24.000000000 +0000
++++ cmake/LLDBDependencies.cmake
+@@ -115,6 +115,7 @@ endif ()
+ # NetBSD-only libraries
+ if ( CMAKE_SYSTEM_NAME MATCHES "NetBSD" )
+   list(APPEND LLDB_USED_LIBS
++    lldbPluginProcessLinux
+     lldbPluginProcessPOSIX
+     )
+ endif ()
diff --git a/lldb-git-netbsd/patches/patch-include_lldb_Host_linux_Personality.h b/lldb-git-netbsd/patches/patch-include_lldb_Host_linux_Personality.h
new file mode 100644
index 0000000..3bdda69
--- /dev/null
+++ b/lldb-git-netbsd/patches/patch-include_lldb_Host_linux_Personality.h
@@ -0,0 +1,19 @@
+$NetBSD$
+
+--- include/lldb/Host/linux/Personality.h.orig	2016-12-14 14:10:24.000000000 +0000
++++ include/lldb/Host/linux/Personality.h
+@@ -12,6 +12,7 @@
+ #ifndef liblldb_Host_linux_Personality_h_
+ #define liblldb_Host_linux_Personality_h_
+ 
++#if !defined(__NetBSD__)
+ #ifdef __ANDROID__
+ #include <android/api-level.h>
+ #endif
+@@ -21,5 +22,6 @@
+ #else
+ #include <sys/personality.h>
+ #endif
++#endif
+ 
+ #endif // liblldb_Host_linux_Personality_h_
diff --git a/lldb-git-netbsd/patches/patch-source_CMakeLists.txt b/lldb-git-netbsd/patches/patch-source_CMakeLists.txt
new file mode 100644
index 0000000..dccf5ff
--- /dev/null
+++ b/lldb-git-netbsd/patches/patch-source_CMakeLists.txt
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- source/CMakeLists.txt.orig	2016-12-14 14:10:24.000000000 +0000
++++ source/CMakeLists.txt
+@@ -16,6 +16,7 @@ endif ()
+ 
+ if ( CMAKE_SYSTEM_NAME MATCHES "NetBSD" )
+ include_directories(
++  Plugins/Process/Linux
+   Plugins/Process/POSIX
+   )
+ endif ()
diff --git a/lldb-git-netbsd/patches/patch-source_Plugins_Process_CMakeLists.txt b/lldb-git-netbsd/patches/patch-source_Plugins_Process_CMakeLists.txt
new file mode 100644
index 0000000..c7bb39c
--- /dev/null
+++ b/lldb-git-netbsd/patches/patch-source_Plugins_Process_CMakeLists.txt
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- source/Plugins/Process/CMakeLists.txt.orig	2016-12-14 14:10:24.000000000 +0000
++++ source/Plugins/Process/CMakeLists.txt
+@@ -5,6 +5,7 @@ elseif (CMAKE_SYSTEM_NAME MATCHES "FreeB
+   add_subdirectory(FreeBSD)
+   add_subdirectory(POSIX)
+ elseif (CMAKE_SYSTEM_NAME MATCHES "NetBSD")
++  add_subdirectory(Linux)
+   add_subdirectory(POSIX)
+ elseif (CMAKE_SYSTEM_NAME MATCHES "Windows")
+   add_subdirectory(Windows/Common)
diff --git a/lldb-git-netbsd/patches/patch-source_Plugins_Process_Linux_CMakeLists.txt b/lldb-git-netbsd/patches/patch-source_Plugins_Process_Linux_CMakeLists.txt
new file mode 100644
index 0000000..5a4b3dc
--- /dev/null
+++ b/lldb-git-netbsd/patches/patch-source_Plugins_Process_Linux_CMakeLists.txt
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- source/Plugins/Process/Linux/CMakeLists.txt.orig	2016-05-01 10:39:36.000000000 +0000
++++ source/Plugins/Process/Linux/CMakeLists.txt
+@@ -5,11 +5,7 @@ include_directories(../Utility)
+ add_lldb_library(lldbPluginProcessLinux
+   NativeProcessLinux.cpp
+   NativeRegisterContextLinux.cpp
+-  NativeRegisterContextLinux_arm.cpp
+-  NativeRegisterContextLinux_arm64.cpp
+   NativeRegisterContextLinux_x86_64.cpp
+-  NativeRegisterContextLinux_mips64.cpp
+-  NativeRegisterContextLinux_s390x.cpp
+   NativeThreadLinux.cpp
+   ProcFileReader.cpp
+   SingleStepCheck.cpp
diff --git a/lldb-git-netbsd/patches/patch-source_Plugins_Process_Linux_NativeProcessLinux.cpp b/lldb-git-netbsd/patches/patch-source_Plugins_Process_Linux_NativeProcessLinux.cpp
new file mode 100644
index 0000000..d4fdb42
--- /dev/null
+++ b/lldb-git-netbsd/patches/patch-source_Plugins_Process_Linux_NativeProcessLinux.cpp
@@ -0,0 +1,278 @@
+$NetBSD$
+
+--- source/Plugins/Process/Linux/NativeProcessLinux.cpp.orig	2016-12-14 14:10:24.000000000 +0000
++++ source/Plugins/Process/Linux/NativeProcessLinux.cpp
+@@ -50,7 +50,9 @@
+ // System includes - They have to be included after framework includes because
+ // they define some
+ // macros which collide with variable names in other modules
++#if !defined(__NetBSD__)
+ #include <linux/unistd.h>
++#endif
+ #include <sys/socket.h>
+ 
+ #include <sys/syscall.h>
+@@ -74,6 +76,7 @@ using namespace llvm;
+ 
+ // Private bits we only need internally.
+ 
++#if !defined(__NetBSD__)
+ static bool ProcessVmReadvSupported() {
+   static bool is_supported;
+   static std::once_flag flag;
+@@ -107,6 +110,7 @@ static bool ProcessVmReadvSupported() {
+ 
+   return is_supported;
+ }
++#endif
+ 
+ namespace {
+ void MaybeLogLaunchInfo(const ProcessLaunchInfo &info) {
+@@ -155,6 +159,7 @@ void PtraceDisplayBytes(int &req, void *
+ 
+   if (verbose_log) {
+     switch (req) {
++#if !defined(__NetBSD__)
+     case PTRACE_POKETEXT: {
+       DisplayBytes(buf, &data, 8);
+       verbose_log->Printf("PTRACE_POKETEXT %s", buf.GetData());
+@@ -170,6 +175,7 @@ void PtraceDisplayBytes(int &req, void *
+       verbose_log->Printf("PTRACE_POKEUSER %s", buf.GetData());
+       break;
+     }
++#endif
+     case PTRACE_SETREGS: {
+       DisplayBytes(buf, data, data_size);
+       verbose_log->Printf("PTRACE_SETREGS %s", buf.GetData());
+@@ -180,6 +186,7 @@ void PtraceDisplayBytes(int &req, void *
+       verbose_log->Printf("PTRACE_SETFPREGS %s", buf.GetData());
+       break;
+     }
++#if !defined(__NetBSD__)
+     case PTRACE_SETSIGINFO: {
+       DisplayBytes(buf, data, sizeof(siginfo_t));
+       verbose_log->Printf("PTRACE_SETSIGINFO %s", buf.GetData());
+@@ -191,6 +198,7 @@ void PtraceDisplayBytes(int &req, void *
+       verbose_log->Printf("PTRACE_SETREGSET %s", buf.GetData());
+       break;
+     }
++#endif
+     default: {}
+     }
+   }
+@@ -224,6 +232,7 @@ static Error EnsureFDFlags(int fd, int f
+ // Public Static Methods
+ // -----------------------------------------------------------------------------
+ 
++#if !defined(__NetBSD__)
+ Error NativeProcessProtocol::Launch(
+     ProcessLaunchInfo &launch_info,
+     NativeProcessProtocol::NativeDelegate &native_delegate, MainLoop &mainloop,
+@@ -266,7 +275,9 @@ Error NativeProcessProtocol::Launch(
+ 
+   return error;
+ }
++#endif
+ 
++#if !defined(__NetBSD__)
+ Error NativeProcessProtocol::Attach(
+     lldb::pid_t pid, NativeProcessProtocol::NativeDelegate &native_delegate,
+     MainLoop &mainloop, NativeProcessProtocolSP &native_process_sp) {
+@@ -295,6 +306,7 @@ Error NativeProcessProtocol::Attach(
+   native_process_sp = native_process_linux_sp;
+   return error;
+ }
++#endif
+ 
+ // -----------------------------------------------------------------------------
+ // Public Instance Methods
+@@ -346,7 +358,11 @@ Error NativeProcessLinux::LaunchInferior
+   MaybeLogLaunchInfo(launch_info);
+ 
+   ::pid_t pid =
++#if !defined(__NetBSD__)
+       ProcessLauncherLinux().LaunchProcess(launch_info, error).GetProcessId();
++#else
++      0;
++#endif
+   if (error.Fail())
+     return error;
+ 
+@@ -458,7 +474,9 @@ Error NativeProcessLinux::LaunchInferior
+ 
+         // Attach to the requested process.
+         // An attach will cause the thread to stop with a SIGSTOP.
++#if !defined(__NetBSD__)
+         error = PtraceWrapper(PTRACE_ATTACH, tid);
++#endif
+         if (error.Fail()) {
+           // No such thread. The thread may have exited.
+           // More error handling may be needed.
+@@ -528,6 +546,7 @@ Error NativeProcessLinux::SetDefaultPtra
+ 
+   // Have the child raise an event on exit.  This is used to keep the child in
+   // limbo until it is destroyed.
++#if !defined(__NetBSD__)
+   ptrace_opts |= PTRACE_O_TRACEEXIT;
+ 
+   // Have the tracer trace threads which spawn in the inferior process.
+@@ -540,6 +559,7 @@ Error NativeProcessLinux::SetDefaultPtra
+   ptrace_opts |= PTRACE_O_TRACEEXEC;
+ 
+   return PtraceWrapper(PTRACE_SETOPTIONS, pid, nullptr, (void *)ptrace_opts);
++#endif
+ }
+ 
+ static ExitType convert_pid_status_to_exit_type(int status) {
+@@ -835,6 +855,7 @@ void NativeProcessLinux::MonitorSIGTRAP(
+ 
+   assert(info.si_signo == SIGTRAP && "Unexpected child signal!");
+ 
++#if !defined(__NetBSD__)
+   switch (info.si_code) {
+   // TODO: these two cases are required if we want to support tracing of the
+   // inferiors' children.  We'd need this to debug a monitor.
+@@ -1038,6 +1059,7 @@ void NativeProcessLinux::MonitorSIGTRAP(
+                   __FUNCTION__, GetID(), thread.GetID(), info.si_code);
+     break;
+   }
++#endif
+ }
+ 
+ void NativeProcessLinux::MonitorTrace(NativeThreadLinux &thread) {
+@@ -1110,6 +1132,7 @@ void NativeProcessLinux::MonitorSignal(c
+   //
+   // Similarly, ACK signals generated by this monitor.
+ 
++#if !defined(__NetBSD__)
+   // Handle the signal.
+   if (info.si_code == SI_TKILL || info.si_code == SI_USER) {
+     if (log)
+@@ -1194,6 +1217,7 @@ void NativeProcessLinux::MonitorSignal(c
+     // Done handling.
+     return;
+   }
++#endif
+ 
+   if (log)
+     log->Printf("NativeProcessLinux::%s() received signal %s", __FUNCTION__,
+@@ -2132,7 +2156,11 @@ NativeProcessLinux::GetCrashReasonForSIG
+ 
+ Error NativeProcessLinux::ReadMemory(lldb::addr_t addr, void *buf, size_t size,
+                                      size_t &bytes_read) {
++#if !defined(__NetBSD__)
+   if (ProcessVmReadvSupported()) {
++#else
++  {
++#endif
+     // The process_vm_readv path is about 50 times faster than ptrace api. We
+     // want to use
+     // this syscall if it is supported.
+@@ -2145,7 +2173,11 @@ Error NativeProcessLinux::ReadMemory(lld
+     remote_iov.iov_base = reinterpret_cast<void *>(addr);
+     remote_iov.iov_len = size;
+ 
++#if !defined(__NetBSD__)
+     bytes_read = process_vm_readv(pid, &local_iov, 1, &remote_iov, 1, 0);
++#else
++    bytes_read = 0;
++#endif
+     const bool success = bytes_read == size;
+ 
+     Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
+@@ -2175,6 +2207,7 @@ Error NativeProcessLinux::ReadMemory(lld
+                 (void *)addr, buf, size);
+ 
+   for (bytes_read = 0; bytes_read < size; bytes_read += remainder) {
++#if !defined(__NetBSD__)
+     Error error = NativeProcessLinux::PtraceWrapper(
+         PTRACE_PEEKDATA, GetID(), (void *)addr, nullptr, 0, &data);
+     if (error.Fail()) {
+@@ -2182,6 +2215,7 @@ Error NativeProcessLinux::ReadMemory(lld
+         ProcessPOSIXLog::DecNestLevel();
+       return error;
+     }
++#endif
+ 
+     remainder = size - bytes_read;
+     remainder = remainder > k_ptrace_word_size ? k_ptrace_word_size : remainder;
+@@ -2248,6 +2282,7 @@ Error NativeProcessLinux::WriteMemory(ll
+         log->Printf("NativeProcessLinux::%s() [%p]:0x%lx (0x%lx)", __FUNCTION__,
+                     (void *)addr, *(const unsigned long *)src, data);
+ 
++#if !defined(__NetBSD__)
+       error = NativeProcessLinux::PtraceWrapper(PTRACE_POKEDATA, GetID(),
+                                                 (void *)addr, (void *)data);
+       if (error.Fail()) {
+@@ -2255,6 +2290,7 @@ Error NativeProcessLinux::WriteMemory(ll
+           ProcessPOSIXLog::DecNestLevel();
+         return error;
+       }
++#endif
+     } else {
+       unsigned char buff[8];
+       size_t bytes_read;
+@@ -2293,19 +2329,33 @@ Error NativeProcessLinux::WriteMemory(ll
+ }
+ 
+ Error NativeProcessLinux::GetSignalInfo(lldb::tid_t tid, void *siginfo) {
++#if !defined(__NetBSD__)
+   return PtraceWrapper(PTRACE_GETSIGINFO, tid, nullptr, siginfo);
++#else
++  Error error;
++  return error;
++#endif
+ }
+ 
+ Error NativeProcessLinux::GetEventMessage(lldb::tid_t tid,
+                                           unsigned long *message) {
++#if !defined(__NetBSD__)
+   return PtraceWrapper(PTRACE_GETEVENTMSG, tid, nullptr, message);
++#else
++  Error error;
++  return error;
++#endif
+ }
+ 
+ Error NativeProcessLinux::Detach(lldb::tid_t tid) {
+   if (tid == LLDB_INVALID_THREAD_ID)
+     return Error();
+-
++#if !defined(__NetBSD__)
+   return PtraceWrapper(PTRACE_DETACH, tid);
++#else
++  Error error;
++  return error;
++#endif
+ }
+ 
+ bool NativeProcessLinux::HasThreadNoLock(lldb::tid_t thread_id) {
+@@ -2649,7 +2699,11 @@ void NativeProcessLinux::SigchldHandler(
+   // Process all pending waitpid notifications.
+   while (true) {
+     int status = -1;
++#if !defined(__NetBSD__)
+     ::pid_t wait_pid = waitpid(-1, &status, __WALL | __WNOTHREAD | WNOHANG);
++#else
++    ::pid_t wait_pid = waitpid(-1, &status, /* __WALL | __WNOTHREAD | */ WNOHANG);
++#endif
+ 
+     if (wait_pid == 0)
+       break; // We are done.
+@@ -2713,12 +2767,16 @@ Error NativeProcessLinux::PtraceWrapper(
+   PtraceDisplayBytes(req, data, data_size);
+ 
+   errno = 0;
++#if !defined(__NetBSD__)
+   if (req == PTRACE_GETREGSET || req == PTRACE_SETREGSET)
+     ret = ptrace(static_cast<__ptrace_request>(req), static_cast<::pid_t>(pid),
+                  *(unsigned int *)addr, data);
+   else
+     ret = ptrace(static_cast<__ptrace_request>(req), static_cast<::pid_t>(pid),
+                  addr, data);
++#else
++  ret = 0;
++#endif
+ 
+   if (ret == -1)
+     error.SetErrorToErrno();
diff --git a/lldb-git-netbsd/patches/patch-source_Plugins_Process_Linux_NativeRegisterContextLinux.cpp b/lldb-git-netbsd/patches/patch-source_Plugins_Process_Linux_NativeRegisterContextLinux.cpp
new file mode 100644
index 0000000..b6ebac8
--- /dev/null
+++ b/lldb-git-netbsd/patches/patch-source_Plugins_Process_Linux_NativeRegisterContextLinux.cpp
@@ -0,0 +1,36 @@
+$NetBSD$
+
+--- source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp.orig	2016-10-19 22:25:12.000000000 +0000
++++ source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp
+@@ -163,6 +163,7 @@ Error NativeRegisterContextLinux::DoRead
+   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_REGISTERS));
+ 
+   long data;
++#if !defined(__NetBSD__)
+   Error error = NativeProcessLinux::PtraceWrapper(
+       PTRACE_PEEKUSER, m_thread.GetID(), reinterpret_cast<void *>(offset),
+       nullptr, 0, &data);
+@@ -170,6 +171,9 @@ Error NativeRegisterContextLinux::DoRead
+   if (error.Success())
+     // First cast to an unsigned of the same size to avoid sign extension.
+     value.SetUInt(static_cast<unsigned long>(data), size);
++#else
++  Error error;
++#endif
+ 
+   if (log)
+     log->Printf("NativeRegisterContextLinux::%s() reg %s: 0x%lx", __FUNCTION__,
+@@ -188,8 +192,13 @@ Error NativeRegisterContextLinux::DoWrit
+     log->Printf("NativeRegisterContextLinux::%s() reg %s: %p", __FUNCTION__,
+                 reg_name, buf);
+ 
++#if !defined(__NetBSD__)
+   return NativeProcessLinux::PtraceWrapper(
+       PTRACE_POKEUSER, m_thread.GetID(), reinterpret_cast<void *>(offset), buf);
++#else
++  Error error;
++  return error;
++#endif
+ }
+ 
+ Error NativeRegisterContextLinux::DoReadGPR(void *buf, size_t buf_size) {
diff --git a/lldb-git-netbsd/patches/patch-source_Plugins_Process_Linux_NativeRegisterContextLinux__x86__64.cpp b/lldb-git-netbsd/patches/patch-source_Plugins_Process_Linux_NativeRegisterContextLinux__x86__64.cpp
new file mode 100644
index 0000000..3e0a1be
--- /dev/null
+++ b/lldb-git-netbsd/patches/patch-source_Plugins_Process_Linux_NativeRegisterContextLinux__x86__64.cpp
@@ -0,0 +1,26 @@
+$NetBSD$
+
+--- source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp.orig	2016-12-14 14:10:24.000000000 +0000
++++ source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp
+@@ -20,7 +20,9 @@
+ #include "Plugins/Process/Utility/RegisterContextLinux_i386.h"
+ #include "Plugins/Process/Utility/RegisterContextLinux_x86_64.h"
+ 
++#if !defined(__NetBSD__)
+ #include <linux/elf.h>
++#endif
+ 
+ using namespace lldb_private;
+ using namespace lldb_private::process_linux;
+@@ -223,7 +225,11 @@ static const RegisterSet g_reg_sets_x86_
+ // On x86_64 NT_PRFPREG is used to access the FXSAVE area. On i386, we need to
+ // use NT_PRXFPREG.
+ static inline unsigned int fxsr_regset(const ArchSpec &arch) {
++#if !defined(__NetBSD__)
+   return arch.GetAddressByteSize() == 8 ? NT_PRFPREG : NT_PRXFPREG;
++#else
++  return 0;
++#endif
+ }
+ 
+ // ----------------------------------------------------------------------------
diff --git a/lldb-git-netbsd/patches/patch-source_Plugins_Process_Linux_NativeThreadLinux.cpp b/lldb-git-netbsd/patches/patch-source_Plugins_Process_Linux_NativeThreadLinux.cpp
new file mode 100644
index 0000000..ee87079
--- /dev/null
+++ b/lldb-git-netbsd/patches/patch-source_Plugins_Process_Linux_NativeThreadLinux.cpp
@@ -0,0 +1,123 @@
+$NetBSD$
+
+--- source/Plugins/Process/Linux/NativeThreadLinux.cpp.orig	2016-10-19 22:25:12.000000000 +0000
++++ source/Plugins/Process/Linux/NativeThreadLinux.cpp
+@@ -29,9 +29,13 @@
+ 
+ #include <sys/syscall.h>
+ // Try to define a macro to encapsulate the tgkill syscall
++#if !defined(__NetBSD__)
+ #define tgkill(pid, tid, sig)                                                  \
+   syscall(__NR_tgkill, static_cast<::pid_t>(pid), static_cast<::pid_t>(tid),   \
+           sig)
++#else
++#define tgkill(pid, tid, sig) 0
++#endif
+ 
+ using namespace lldb;
+ using namespace lldb_private;
+@@ -97,7 +101,11 @@ std::string NativeThreadLinux::GetName()
+   // const NativeProcessLinux *const process =
+   // reinterpret_cast<NativeProcessLinux*> (process_sp->get ());
+   llvm::SmallString<32> thread_name;
++#if !defined(__NetBSD__)
+   HostNativeThread::GetName(GetID(), thread_name);
++#else
++  // error: invalid conversion from 'lldb::tid_t {aka long unsigned int}' to 'lldb::thread_t {aka __pthread_st*}' [-fpermissive]
++#endif
+   return thread_name.c_str();
+ }
+ 
+@@ -216,8 +224,13 @@ Error NativeThreadLinux::Resume(uint32_t
+   if (signo != LLDB_INVALID_SIGNAL_NUMBER)
+     data = signo;
+ 
++#if !defined(__NetBSD__)
+   return NativeProcessLinux::PtraceWrapper(PTRACE_CONT, GetID(), nullptr,
+                                            reinterpret_cast<void *>(data));
++#else
++  Error error;
++  return error;
++#endif
+ }
+ 
+ void NativeThreadLinux::MaybePrepareSingleStepWorkaround() {
+@@ -226,6 +239,7 @@ void NativeThreadLinux::MaybePrepareSing
+ 
+   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_THREAD));
+ 
++#if !defined(__NetBSD__)
+   if (sched_getaffinity(static_cast<::pid_t>(m_tid), sizeof m_original_cpu_set,
+                         &m_original_cpu_set) != 0) {
+     // This should really not fail. But, just in case...
+@@ -253,12 +267,14 @@ void NativeThreadLinux::MaybePrepareSing
+         ": %s",
+         __FUNCTION__, m_tid, error.AsCString());
+   }
++#endif
+ }
+ 
+ void NativeThreadLinux::MaybeCleanupSingleStepWorkaround() {
+   if (!SingleStepWorkaroundNeeded())
+     return;
+ 
++#if !defined(__NetBSD__)
+   if (sched_setaffinity(static_cast<::pid_t>(m_tid), sizeof m_original_cpu_set,
+                         &m_original_cpu_set) != 0) {
+     Error error(errno, eErrorTypePOSIX);
+@@ -268,6 +284,7 @@ void NativeThreadLinux::MaybeCleanupSing
+         ": %s",
+         __FUNCTION__, m_tid, error.AsCString());
+   }
++#endif
+ }
+ 
+ Error NativeThreadLinux::SingleStep(uint32_t signo) {
+@@ -285,10 +302,15 @@ Error NativeThreadLinux::SingleStep(uint
+   // If hardware single-stepping is not supported, we just do a continue. The
+   // breakpoint on the
+   // next instruction has been setup in NativeProcessLinux::Resume.
++#if !defined(__NetBSD__)
+   return NativeProcessLinux::PtraceWrapper(
+       GetProcess().SupportHardwareSingleStepping() ? PTRACE_SINGLESTEP
+                                                    : PTRACE_CONT,
+       m_tid, nullptr, reinterpret_cast<void *>(data));
++#else
++  Error error;
++  return error;
++#endif
+ }
+ 
+ void NativeThreadLinux::SetStoppedBySignal(uint32_t signo,
+@@ -310,6 +332,7 @@ void NativeThreadLinux::SetStoppedBySign
+     case SIGBUS:
+     case SIGFPE:
+     case SIGILL:
++#if !defined(__NetBSD__)
+       // In case of MIPS64 target, SI_KERNEL is generated for invalid 64bit
+       // address.
+       const auto reason =
+@@ -317,6 +340,7 @@ void NativeThreadLinux::SetStoppedBySign
+               ? CrashReason::eInvalidAddress
+               : GetCrashReason(*info);
+       m_stop_description = GetCrashReasonString(reason, *info);
++#endif
+       break;
+     }
+   }
+@@ -440,6 +464,7 @@ Error NativeThreadLinux::RequestStop() {
+ 
+   Error err;
+   errno = 0;
++#if !defined(__NetBSD__)
+   if (::tgkill(pid, tid, SIGSTOP) != 0) {
+     err.SetErrorToErrno();
+     if (log)
+@@ -447,6 +472,7 @@ Error NativeThreadLinux::RequestStop() {
+                   ", SIGSTOP) failed: %s",
+                   __FUNCTION__, pid, tid, err.AsCString());
+   }
++#endif
+ 
+   return err;
+ }
diff --git a/lldb-git-netbsd/patches/patch-source_Plugins_Process_Linux_NativeThreadLinux.h b/lldb-git-netbsd/patches/patch-source_Plugins_Process_Linux_NativeThreadLinux.h
new file mode 100644
index 0000000..2cff18b
--- /dev/null
+++ b/lldb-git-netbsd/patches/patch-source_Plugins_Process_Linux_NativeThreadLinux.h
@@ -0,0 +1,14 @@
+$NetBSD$
+
+--- source/Plugins/Process/Linux/NativeThreadLinux.h.orig	2016-09-10 17:36:23.000000000 +0000
++++ source/Plugins/Process/Linux/NativeThreadLinux.h
+@@ -107,7 +107,9 @@ private:
+   std::string m_stop_description;
+   using WatchpointIndexMap = std::map<lldb::addr_t, uint32_t>;
+   WatchpointIndexMap m_watchpoint_index_map;
++#if !defined(__NetBSD__)
+   cpu_set_t m_original_cpu_set; // For single-step workaround.
++#endif
+ };
+ 
+ typedef std::shared_ptr<NativeThreadLinux> NativeThreadLinuxSP;
diff --git a/lldb-git-netbsd/patches/patch-source_Plugins_Process_Linux_Procfs.h b/lldb-git-netbsd/patches/patch-source_Plugins_Process_Linux_Procfs.h
new file mode 100644
index 0000000..d5e98d5
--- /dev/null
+++ b/lldb-git-netbsd/patches/patch-source_Plugins_Process_Linux_Procfs.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+--- source/Plugins/Process/Linux/Procfs.h.orig	2016-09-10 17:36:23.000000000 +0000
++++ source/Plugins/Process/Linux/Procfs.h
+@@ -12,6 +12,7 @@
+ 
+ #include <sys/ptrace.h>
+ 
++#if !defined(__NetBSD__)
+ #ifdef __ANDROID__
+ #if defined(__arm64__) || defined(__aarch64__)
+ typedef unsigned long elf_greg_t;
+@@ -29,3 +30,4 @@ typedef struct user_fpsimd_state elf_fpr
+ #else // __ANDROID__
+ #include <sys/procfs.h>
+ #endif // __ANDROID__
++#endif
diff --git a/lldb-git-netbsd/patches/patch-tools_lldb-mi_MICmnBase.cpp b/lldb-git-netbsd/patches/patch-tools_lldb-mi_MICmnBase.cpp
new file mode 100644
index 0000000..f30ad21
--- /dev/null
+++ b/lldb-git-netbsd/patches/patch-tools_lldb-mi_MICmnBase.cpp
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- tools/lldb-mi/MICmnBase.cpp.orig	2016-09-10 17:36:23.000000000 +0000
++++ tools/lldb-mi/MICmnBase.cpp
+@@ -122,7 +122,7 @@ void CMICmnBase::ClrErrorDescription() c
+ // Return:  None.
+ // Throws:  None.
+ //--
+-void CMICmnBase::SetErrorDescriptionn(const CMIUtilString vFormat, ...) const {
++void CMICmnBase::SetErrorDescriptionn(const char *vFormat, ...) const {
+   va_list args;
+   va_start(args, vFormat);
+   CMIUtilString strResult = CMIUtilString::FormatValist(vFormat, args);
diff --git a/lldb-git-netbsd/patches/patch-tools_lldb-mi_MICmnBase.h b/lldb-git-netbsd/patches/patch-tools_lldb-mi_MICmnBase.h
new file mode 100644
index 0000000..6212245
--- /dev/null
+++ b/lldb-git-netbsd/patches/patch-tools_lldb-mi_MICmnBase.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- tools/lldb-mi/MICmnBase.h.orig	2016-09-10 17:36:23.000000000 +0000
++++ tools/lldb-mi/MICmnBase.h
+@@ -28,7 +28,7 @@ public:
+   bool HaveErrorDescription() const;
+   const CMIUtilString &GetErrorDescription() const;
+   void SetErrorDescription(const CMIUtilString &vrTxt) const;
+-  void SetErrorDescriptionn(const CMIUtilString vFormat, ...) const;
++  void SetErrorDescriptionn(const char *vFormat, ...) const;
+   void SetErrorDescriptionNoLog(const CMIUtilString &vrTxt) const;
+   void ClrErrorDescription() const;
+ 
diff --git a/lldb-git-netbsd/patches/patch-tools_lldb-mi_MIDriver.cpp b/lldb-git-netbsd/patches/patch-tools_lldb-mi_MIDriver.cpp
new file mode 100644
index 0000000..a96e7fa
--- /dev/null
+++ b/lldb-git-netbsd/patches/patch-tools_lldb-mi_MIDriver.cpp
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- tools/lldb-mi/MIDriver.cpp.orig	2016-09-10 17:36:23.000000000 +0000
++++ tools/lldb-mi/MIDriver.cpp
+@@ -509,7 +509,7 @@ bool CMIDriver::StartWorkerThreads() {
+     const CMIUtilString errMsg = CMIUtilString::Format(
+         MIRSRC(IDS_THREADMGR_ERR_THREAD_FAIL_CREATE),
+         CMICmnThreadMgrStd::Instance().GetErrorDescription().c_str());
+-    SetErrorDescriptionn(errMsg);
++    SetErrorDescriptionn(errMsg.c_str());
+     return MIstatus::failure;
+   }
+ 
diff --git a/lldb-git-netbsd/patches/patch-tools_lldb-mi_MIUtilString.cpp b/lldb-git-netbsd/patches/patch-tools_lldb-mi_MIUtilString.cpp
new file mode 100644
index 0000000..2df0237
--- /dev/null
+++ b/lldb-git-netbsd/patches/patch-tools_lldb-mi_MIUtilString.cpp
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- tools/lldb-mi/MIUtilString.cpp.orig	2016-09-10 17:36:23.000000000 +0000
++++ tools/lldb-mi/MIUtilString.cpp
+@@ -156,7 +156,7 @@ CMIUtilString CMIUtilString::FormatPriv(
+ // Return:  CMIUtilString - Number of splits found in the string data.
+ // Throws:  None.
+ //--
+-CMIUtilString CMIUtilString::Format(const CMIUtilString vFormating, ...) {
++CMIUtilString CMIUtilString::Format(const char *vFormating, ...) {
+   va_list args;
+   va_start(args, vFormating);
+   CMIUtilString strResult = CMIUtilString::FormatPriv(vFormating, args);
diff --git a/lldb-git-netbsd/patches/patch-tools_lldb-mi_MIUtilString.h b/lldb-git-netbsd/patches/patch-tools_lldb-mi_MIUtilString.h
new file mode 100644
index 0000000..c352662
--- /dev/null
+++ b/lldb-git-netbsd/patches/patch-tools_lldb-mi_MIUtilString.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- tools/lldb-mi/MIUtilString.h.orig	2016-09-10 17:36:23.000000000 +0000
++++ tools/lldb-mi/MIUtilString.h
+@@ -30,7 +30,7 @@ public:
+ 
+   // Static method:
+ public:
+-  static CMIUtilString Format(const CMIUtilString vFormating, ...);
++  static CMIUtilString Format(const char *vFormating, ...);
+   static CMIUtilString FormatBinary(const MIuint64 vnDecimal);
+   static CMIUtilString FormatValist(const CMIUtilString &vrFormating,
+                                     va_list vArgs);
diff --git a/lldb-git-netbsd/patches/patch-tools_lldb-server_CMakeLists.txt b/lldb-git-netbsd/patches/patch-tools_lldb-server_CMakeLists.txt
new file mode 100644
index 0000000..f93d142
--- /dev/null
+++ b/lldb-git-netbsd/patches/patch-tools_lldb-server_CMakeLists.txt
@@ -0,0 +1,26 @@
+$NetBSD$
+
+--- tools/lldb-server/CMakeLists.txt.orig	2016-12-14 14:10:24.000000000 +0000
++++ tools/lldb-server/CMakeLists.txt
+@@ -17,6 +17,7 @@ endif ()
+ if ( CMAKE_SYSTEM_NAME MATCHES "NetBSD" )
+ include_directories(
+   ../../../../llvm/include
++  ../../source/Plugins/Process/Linux
+   ../../source/Plugins/Process/POSIX
+   )
+ endif ()
+@@ -84,6 +85,13 @@ if ( CMAKE_SYSTEM_NAME MATCHES "Linux" )
+    )
+ endif ()
+ 
++if ( CMAKE_SYSTEM_NAME MATCHES "NetBSD" )
++  list(APPEND LLDB_USED_LIBS
++    lldbPluginProcessLinux
++    lldbPluginProcessPOSIX
++   )
++endif ()
++
+ # Darwin-only libraries
+ if ( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
+   list(APPEND LLDB_USED_LIBS


Home | Main Index | Thread Index | Old Index