From owner-svn-src-projects@freebsd.org Mon Jan 27 16:52:46 2020 Return-Path: Delivered-To: svn-src-projects@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C5D4E1FC3BE for ; Mon, 27 Jan 2020 16:52:46 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 485wly56nFz4b6d; Mon, 27 Jan 2020 16:52:46 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 90918D2AB; Mon, 27 Jan 2020 16:52:46 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 00RGqkVI065526; Mon, 27 Jan 2020 16:52:46 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00RGqjDr065519; Mon, 27 Jan 2020 16:52:45 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202001271652.00RGqjDr065519@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 27 Jan 2020 16:52:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r357174 - in projects/clang1000-import: contrib/llvm-project/lldb/source/API contrib/llvm-project/lldb/source/Plugins/JITLoader/GDB lib/clang/include/lldb/Host lib/clang/liblldb lib/cla... X-SVN-Group: projects X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in projects/clang1000-import: contrib/llvm-project/lldb/source/API contrib/llvm-project/lldb/source/Plugins/JITLoader/GDB lib/clang/include/lldb/Host lib/clang/liblldb lib/clang/libllvm usr.bin/clang/... X-SVN-Commit-Revision: 357174 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jan 2020 16:52:46 -0000 Author: dim Date: Mon Jan 27 16:52:44 2020 New Revision: 357174 URL: https://svnweb.freebsd.org/changeset/base/357174 Log: Update build glue for lldb (MK_LLDB=yes). Also update lldb's generated Config.h, disable a few more parts in the code we don't use, and add a pre-generated man page. Added: projects/clang1000-import/usr.bin/clang/lldb/lldb.1 (contents, props changed) Modified: projects/clang1000-import/contrib/llvm-project/lldb/source/API/SystemInitializerFull.cpp projects/clang1000-import/contrib/llvm-project/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp projects/clang1000-import/lib/clang/include/lldb/Host/Config.h projects/clang1000-import/lib/clang/liblldb/Makefile projects/clang1000-import/lib/clang/libllvm/Makefile projects/clang1000-import/usr.bin/clang/lldb/Makefile Modified: projects/clang1000-import/contrib/llvm-project/lldb/source/API/SystemInitializerFull.cpp ============================================================================== --- projects/clang1000-import/contrib/llvm-project/lldb/source/API/SystemInitializerFull.cpp Mon Jan 27 15:09:13 2020 (r357173) +++ projects/clang1000-import/contrib/llvm-project/lldb/source/API/SystemInitializerFull.cpp Mon Jan 27 16:52:44 2020 (r357174) @@ -168,12 +168,22 @@ SystemInitializerFull::SystemInitializerFull() {} SystemInitializerFull::~SystemInitializerFull() {} +#ifdef LLDB_ENABLE_ALL #define LLDB_PROCESS_AArch64(op) \ ABIMacOSX_arm64::op(); \ ABISysV_arm64::op(); +#else // LLDB_ENABLE_ALL +#define LLDB_PROCESS_AArch64(op) \ + ABISysV_arm64::op(); +#endif // LLDB_ENABLE_ALL +#ifdef LLDB_ENABLE_ALL #define LLDB_PROCESS_ARM(op) \ ABIMacOSX_arm::op(); \ ABISysV_arm::op(); +#else // LLDB_ENABLE_ALL +#define LLDB_PROCESS_ARM(op) \ + ABISysV_arm::op(); +#endif // LLDB_ENABLE_ALL #define LLDB_PROCESS_ARC(op) \ ABISysV_arc::op(); #define LLDB_PROCESS_Hexagon(op) ABISysV_hexagon::op(); @@ -184,11 +194,17 @@ SystemInitializerFull::~SystemInitializerFull() {} ABISysV_ppc::op(); \ ABISysV_ppc64::op(); #define LLDB_PROCESS_SystemZ(op) ABISysV_s390x::op(); +#ifdef LLDB_ENABLE_ALL #define LLDB_PROCESS_X86(op) \ ABIMacOSX_i386::op(); \ ABISysV_i386::op(); \ ABISysV_x86_64::op(); \ ABIWindows_x86_64::op(); +#else // LLDB_ENABLE_ALL +#define LLDB_PROCESS_X86(op) \ + ABISysV_i386::op(); \ + ABISysV_x86_64::op(); +#endif // LLDB_ENABLE_ALL #define LLDB_PROCESS_AMDGPU(op) #define LLDB_PROCESS_AVR(op) Modified: projects/clang1000-import/contrib/llvm-project/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp ============================================================================== --- projects/clang1000-import/contrib/llvm-project/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp Mon Jan 27 15:09:13 2020 (r357173) +++ projects/clang1000-import/contrib/llvm-project/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp Mon Jan 27 16:52:44 2020 (r357174) @@ -7,7 +7,9 @@ //===----------------------------------------------------------------------===// #include "JITLoaderGDB.h" +#ifdef LLDB_ENABLE_ALL #include "Plugins/ObjectFile/Mach-O/ObjectFileMachO.h" +#endif #include "lldb/Breakpoint/Breakpoint.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleSpec.h" @@ -336,6 +338,7 @@ bool JITLoaderGDB::ReadJITDescriptorImpl(bool all_entr module_sp->GetObjectFile()->GetSymtab(); m_jit_objects.insert(std::make_pair(symbolfile_addr, module_sp)); +#ifdef LLDB_ENABLE_ALL if (auto image_object_file = llvm::dyn_cast(module_sp->GetObjectFile())) { const SectionList *section_list = image_object_file->GetSectionList(); @@ -347,7 +350,9 @@ bool JITLoaderGDB::ReadJITDescriptorImpl(bool all_entr symbolfile_size, vmaddrheuristic, lower, upper); } - } else { + } else +#endif + { bool changed = false; module_sp->SetLoadAddress(target, 0, true, changed); } Modified: projects/clang1000-import/lib/clang/include/lldb/Host/Config.h ============================================================================== --- projects/clang1000-import/lib/clang/include/lldb/Host/Config.h Mon Jan 27 15:09:13 2020 (r357173) +++ projects/clang1000-import/lib/clang/include/lldb/Host/Config.h Mon Jan 27 16:52:44 2020 (r357174) @@ -41,11 +41,11 @@ #define LLDB_ENABLE_LIBEDIT 1 -#define LLDB_ENABLE_LIBXML2 1 +#define LLDB_ENABLE_LIBXML2 0 -#define LLDB_ENABLE_LUA 1 +#define LLDB_ENABLE_LUA 0 -#define LLDB_ENABLE_PYTHON 1 +#define LLDB_ENABLE_PYTHON 0 /* #undef LLDB_PYTHON_HOME */ Modified: projects/clang1000-import/lib/clang/liblldb/Makefile ============================================================================== --- projects/clang1000-import/lib/clang/liblldb/Makefile Mon Jan 27 15:09:13 2020 (r357173) +++ projects/clang1000-import/lib/clang/liblldb/Makefile Mon Jan 27 16:52:44 2020 (r357174) @@ -13,7 +13,6 @@ CFLAGS+= -I${LLDB_SRCS}/source/Plugins/Process/Utility CFLAGS+= -I${OBJTOP}/lib/clang/libllvm CFLAGS+= -I${OBJTOP}/lib/clang/libclang CFLAGS+= -I${OBJTOP}/lib/clang/liblldb -CFLAGS+= -DLLDB_DISABLE_PYTHON SRCS+= API/SBAddress.cpp SRCS+= API/SBAttachInfo.cpp @@ -34,6 +33,7 @@ SRCS+= API/SBError.cpp SRCS+= API/SBEvent.cpp SRCS+= API/SBExecutionContext.cpp SRCS+= API/SBExpressionOptions.cpp +SRCS+= API/SBFile.cpp SRCS+= API/SBFileSpec.cpp SRCS+= API/SBFileSpecList.cpp SRCS+= API/SBFrame.cpp @@ -110,7 +110,6 @@ SRCS+= Commands/CommandCompletions.cpp SRCS+= Commands/CommandObjectApropos.cpp SRCS+= Commands/CommandObjectBreakpoint.cpp SRCS+= Commands/CommandObjectBreakpointCommand.cpp -SRCS+= Commands/CommandObjectBugreport.cpp SRCS+= Commands/CommandObjectCommands.cpp SRCS+= Commands/CommandObjectDisassemble.cpp SRCS+= Commands/CommandObjectExpression.cpp @@ -153,6 +152,7 @@ SRCS+= Core/FileSpecList.cpp SRCS+= Core/FormatEntity.cpp SRCS+= Core/Highlighter.cpp SRCS+= Core/IOHandler.cpp +SRCS+= Core/IOHandlerCursesGUI.cpp SRCS+= Core/Mangled.cpp SRCS+= Core/Module.cpp SRCS+= Core/ModuleChild.cpp @@ -219,6 +219,7 @@ SRCS+= Host/common/HostInfoBase.cpp SRCS+= Host/common/HostNativeThreadBase.cpp SRCS+= Host/common/HostProcess.cpp SRCS+= Host/common/HostThread.cpp +SRCS+= Host/common/LZMA.cpp SRCS+= Host/common/LockFileBase.cpp SRCS+= Host/common/MainLoop.cpp SRCS+= Host/common/MonitoringProcessLauncher.cpp @@ -241,7 +242,7 @@ SRCS+= Host/freebsd/Host.cpp SRCS+= Host/freebsd/HostInfoFreeBSD.cpp SRCS+= Host/posix/ConnectionFileDescriptorPosix.cpp SRCS+= Host/posix/DomainSocket.cpp -SRCS+= Host/posix/FileSystem.cpp +SRCS+= Host/posix/FileSystemPosix.cpp SRCS+= Host/posix/HostInfoPosix.cpp SRCS+= Host/posix/HostProcessPosix.cpp SRCS+= Host/posix/HostThreadPosix.cpp @@ -266,6 +267,7 @@ SRCS+= Interpreter/OptionGroupFile.cpp SRCS+= Interpreter/OptionGroupFormat.cpp SRCS+= Interpreter/OptionGroupOutputFile.cpp SRCS+= Interpreter/OptionGroupPlatform.cpp +SRCS+= Interpreter/OptionGroupPythonClassWithDict.cpp SRCS+= Interpreter/OptionGroupString.cpp SRCS+= Interpreter/OptionGroupUInt64.cpp SRCS+= Interpreter/OptionGroupUUID.cpp @@ -280,7 +282,7 @@ SRCS+= Interpreter/OptionValueChar.cpp SRCS+= Interpreter/OptionValueDictionary.cpp SRCS+= Interpreter/OptionValueEnumeration.cpp SRCS+= Interpreter/OptionValueFileSpec.cpp -SRCS+= Interpreter/OptionValueFileSpecLIst.cpp +SRCS+= Interpreter/OptionValueFileSpecList.cpp SRCS+= Interpreter/OptionValueFormat.cpp SRCS+= Interpreter/OptionValueFormatEntity.cpp SRCS+= Interpreter/OptionValueLanguage.cpp @@ -309,11 +311,11 @@ SRCS+= Plugins/Disassembler/llvm/DisassemblerLLVMC.cp SRCS+= Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp SRCS+= Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp SRCS+= Plugins/DynamicLoader/Static/DynamicLoaderStatic.cpp -SRCS+= Plugins/ExpressionParser/Clang/ASTDumper.cpp SRCS+= Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp SRCS+= Plugins/ExpressionParser/Clang/ASTStructExtractor.cpp SRCS+= Plugins/ExpressionParser/Clang/ASTUtils.cpp SRCS+= Plugins/ExpressionParser/Clang/ClangASTSource.cpp +SRCS+= Plugins/ExpressionParser/Clang/ClangDeclVendor.cpp SRCS+= Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp SRCS+= Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp SRCS+= Plugins/ExpressionParser/Clang/ClangExpressionSourceCode.cpp @@ -324,6 +326,7 @@ SRCS+= Plugins/ExpressionParser/Clang/ClangModulesDec SRCS+= Plugins/ExpressionParser/Clang/ClangPersistentVariables.cpp SRCS+= Plugins/ExpressionParser/Clang/ClangUserExpression.cpp SRCS+= Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp +SRCS+= Plugins/ExpressionParser/Clang/CppModuleConfiguration.cpp SRCS+= Plugins/ExpressionParser/Clang/IRDynamicChecks.cpp SRCS+= Plugins/ExpressionParser/Clang/IRForTarget.cpp SRCS+= Plugins/Instruction/ARM/EmulateInstructionARM.cpp @@ -477,7 +480,6 @@ SRCS+= Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.c SRCS+= Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp SRCS+= Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp SRCS+= Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp -SRCS+= Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp SRCS+= Plugins/SymbolFile/DWARF/DWARFDebugMacro.cpp SRCS+= Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp SRCS+= Plugins/SymbolFile/DWARF/DWARFDeclContext.cpp @@ -505,8 +507,8 @@ SRCS+= Symbol/ArmUnwindInfo.cpp SRCS+= Symbol/Block.cpp SRCS+= Symbol/ClangASTContext.cpp SRCS+= Symbol/ClangASTImporter.cpp +SRCS+= Symbol/ClangASTMetadata.cpp SRCS+= Symbol/ClangExternalASTSourceCallbacks.cpp -SRCS+= Symbol/ClangExternalASTSourceCommon.cpp SRCS+= Symbol/ClangUtil.cpp SRCS+= Symbol/CompactUnwindInfo.cpp SRCS+= Symbol/CompileUnit.cpp @@ -548,6 +550,7 @@ SRCS+= Target/Language.cpp SRCS+= Target/LanguageRuntime.cpp SRCS+= Target/Memory.cpp SRCS+= Target/MemoryHistory.cpp +SRCS+= Target/MemoryRegionInfo.cpp SRCS+= Target/ModuleCache.cpp SRCS+= Target/OperatingSystem.cpp SRCS+= Target/PathMappingList.cpp @@ -605,10 +608,9 @@ SRCS+= Utility/DataEncoder.cpp SRCS+= Utility/DataExtractor.cpp SRCS+= Utility/Environment.cpp SRCS+= Utility/Event.cpp -SRCS+= Utility/FileCollector.cpp SRCS+= Utility/FileSpec.cpp +SRCS+= Utility/GDBRemote.cpp SRCS+= Utility/IOObject.cpp -SRCS+= Utility/JSON.cpp SRCS+= Utility/LLDBAssert.cpp SRCS+= Utility/Listener.cpp SRCS+= Utility/Log.cpp @@ -626,7 +628,6 @@ SRCS+= Utility/State.cpp SRCS+= Utility/Status.cpp SRCS+= Utility/Stream.cpp SRCS+= Utility/StreamCallback.cpp -SRCS+= Utility/StreamGDBRemote.cpp SRCS+= Utility/StreamString.cpp SRCS+= Utility/StringExtractor.cpp SRCS+= Utility/StringExtractorGDBRemote.cpp @@ -644,13 +645,32 @@ SRCS+= Utility/VMRange.cpp SRCS+= lldb.cpp LLDB_TBLGEN?= lldb-tblgen -INCFILE= CommandOptions.inc -TDFILE= ${LLDB_SRCS}/source/Commands/Options.td -GENOPT= -gen-lldb-option-defs -${INCFILE}: ${TDFILE} - ${LLDB_TBLGEN} ${GENOPT} -I ${LLDB_SRCS}/source/Commands \ - -d ${.TARGET:C/$/.d/} -o ${.TARGET} ${TDFILE} -TGHDRS+= ${INCFILE} + +CommandOptions.inc: ${LLDB_SRCS}/source/Commands/Options.td + ${LLDB_TBLGEN} -gen-lldb-option-defs \ + -I ${LLDB_SRCS}/source/Commands -d ${.TARGET:C/$/.d/} \ + -o ${.TARGET} ${LLDB_SRCS}/source/Commands/Options.td +TGHDRS+= CommandOptions.inc + +.for path in \ + Core/Core \ + Interpreter/Interpreter \ + Plugins/JITLoader/GDB/JITLoaderGDB \ + Plugins/Process/gdb-remote/ProcessGDBRemote \ + Plugins/SymbolFile/DWARF/SymbolFileDWARF \ + Target/Target +${path:T}Properties.inc: ${LLDB_SRCS}/source/${path}Properties.td + ${LLDB_TBLGEN} -gen-lldb-property-defs \ + -I ${LLDB_SRCS}/source/${path:H} -d ${.TARGET:C/$/.d/} \ + -o ${.TARGET} ${LLDB_SRCS}/source/${path}Properties.td +TGHDRS+= ${path:T}Properties.inc + +${path:T}PropertiesEnum.inc: ${LLDB_SRCS}/source/${path}Properties.td + ${LLDB_TBLGEN} -gen-lldb-property-enum-defs \ + -I ${LLDB_SRCS}/source/${path:H} -d ${.TARGET:C/$/.d/} \ + -o ${.TARGET} ${LLDB_SRCS}/source/${path}Properties.td +TGHDRS+= ${path:T}PropertiesEnum.inc +.endfor DPSRCS+= ${TGHDRS} CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} Modified: projects/clang1000-import/lib/clang/libllvm/Makefile ============================================================================== --- projects/clang1000-import/lib/clang/libllvm/Makefile Mon Jan 27 15:09:13 2020 (r357173) +++ projects/clang1000-import/lib/clang/libllvm/Makefile Mon Jan 27 16:52:44 2020 (r357174) @@ -859,6 +859,7 @@ SRCS_MIN+= Support/DynamicLibrary.cpp SRCS_MIN+= Support/Errno.cpp SRCS_MIN+= Support/Error.cpp SRCS_MIN+= Support/ErrorHandling.cpp +SRCS_XDB+= Support/FileCollector.cpp SRCS_EXL+= Support/FileOutputBuffer.cpp SRCS_MIN+= Support/FileUtilities.cpp SRCS_MIN+= Support/FoldingSet.cpp Modified: projects/clang1000-import/usr.bin/clang/lldb/Makefile ============================================================================== --- projects/clang1000-import/usr.bin/clang/lldb/Makefile Mon Jan 27 15:09:13 2020 (r357173) +++ projects/clang1000-import/usr.bin/clang/lldb/Makefile Mon Jan 27 16:52:44 2020 (r357174) @@ -4,8 +4,6 @@ PACKAGE= lldb PROG_CXX= lldb -# Man page directory -.PATH: ${LLDB_SRCS}/docs CFLAGS+= -I${LLDB_SRCS}/include CFLAGS+= -I${.OBJDIR} @@ -38,8 +36,9 @@ CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} LIBADD+= edit LIBADD+= execinfo -LIBADD+= panel +LIBADD+= lzma LIBADD+= ncursesw +LIBADD+= panel LIBADD+= pthread LIBADD+= z Added: projects/clang1000-import/usr.bin/clang/lldb/lldb.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clang1000-import/usr.bin/clang/lldb/lldb.1 Mon Jan 27 16:52:44 2020 (r357174) @@ -0,0 +1,409 @@ +.\" $FreeBSD$ +.\" Man page generated from reStructuredText. +. +.TH "LLDB" "1" "Jan 27, 2020" "8" "LLDB" +.SH NAME +lldb \- LLDB Documentation +. +.nr rst2man-indent-level 0 +. +.de1 rstReportMargin +\\$1 \\n[an-margin] +level \\n[rst2man-indent-level] +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] +- +\\n[rst2man-indent0] +\\n[rst2man-indent1] +\\n[rst2man-indent2] +.. +.de1 INDENT +.\" .rstReportMargin pre: +. RS \\$1 +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] +. nr rst2man-indent-level +1 +.\" .rstReportMargin post: +.. +.de UNINDENT +. RE +.\" indent \\n[an-margin] +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] +.nr rst2man-indent-level -1 +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u +.. +.SH SYNOPSIS +.nf +\fBlldb\fP [\fIoptions\fP] \fIexecutable\fP +.fi +.sp +.SH DESCRIPTION +.sp +\fBlldb\fP is a next generation, high\-performance debugger. It is built as +a set of reusable components which highly leverage existing libraries in the +larger LLVM Project, such as the Clang expression parser and LLVM disassembler. +.sp +\fBlldb\fP is the default debugger in Xcode on macOS and supports +debugging C, Objective\-C and C++ on the desktop and iOS devices and simulator. +.sp +All of the code in the LLDB project is available under the Apache 2.0 License +with LLVM exceptions. +.SH ATTACHING +.INDENT 0.0 +.TP +.B \-\-attach\-name +Tells the debugger to attach to a process with the given name. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-attach\-pid +Tells the debugger to attach to a process with the given pid. +.UNINDENT +.INDENT 0.0 +.TP +.B \-n +Alias for –attach\-name +.UNINDENT +.INDENT 0.0 +.TP +.B \-p +Alias for –attach\-pid +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-wait\-for +Tells the debugger to wait for a process with the given pid or name to launch before attaching. +.UNINDENT +.INDENT 0.0 +.TP +.B \-w +Alias for –wait\-for +.UNINDENT +.SH COMMANDS +.INDENT 0.0 +.TP +.B \-\-batch +Tells the debugger to run the commands from \-s, \-S, \-o & \-O, and then quit. +.UNINDENT +.INDENT 0.0 +.TP +.B \-b +Alias for –batch +.UNINDENT +.INDENT 0.0 +.TP +.B \-K +Alias for –source\-on\-crash +.UNINDENT +.INDENT 0.0 +.TP +.B \-k +Alias for –one\-line\-on\-crash +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-local\-lldbinit +Allow the debugger to parse the .lldbinit files in the current working directory, unless –no\-lldbinit is passed. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-no\-lldbinit +Do not automatically parse any ‘.lldbinit’ files. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-one\-line\-before\-file +Tells the debugger to execute this one\-line lldb command before any file provided on the command line has been loaded. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-one\-line\-on\-crash +When in batch mode, tells the debugger to run this one\-line lldb command if the target crashes. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-one\-line +Tells the debugger to execute this one\-line lldb command after any file provided on the command line has been loaded. +.UNINDENT +.INDENT 0.0 +.TP +.B \-O +Alias for –one\-line\-before\-file +.UNINDENT +.INDENT 0.0 +.TP +.B \-o +Alias for –one\-line +.UNINDENT +.INDENT 0.0 +.TP +.B \-Q +Alias for –source\-quietly +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-source\-before\-file +Tells the debugger to read in and execute the lldb commands in the given file, before any file has been loaded. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-source\-on\-crash +When in batch mode, tells the debugger to source this file of lldb commands if the target crashes. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-source\-quietly +Tells the debugger to execute this one\-line lldb command before any file has been loaded. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-source +Tells the debugger to read in and execute the lldb commands in the given file, after any file has been loaded. +.UNINDENT +.INDENT 0.0 +.TP +.B \-S +Alias for –source\-before\-file +.UNINDENT +.INDENT 0.0 +.TP +.B \-s +Alias for –source +.UNINDENT +.INDENT 0.0 +.TP +.B \-x +Alias for –no\-lldbinit +.UNINDENT +.SH OPTIONS +.INDENT 0.0 +.TP +.B \-\-arch +Tells the debugger to use the specified architecture when starting and running the program. +.UNINDENT +.INDENT 0.0 +.TP +.B \-a +Alias for –arch +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-capture\-path +Tells the debugger to use the given filename for the reproducer. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-capture +Tells the debugger to capture a reproducer. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-core +Tells the debugger to use the full path to as the core file. +.UNINDENT +.INDENT 0.0 +.TP +.B \-c +Alias for –core +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-debug +Tells the debugger to print out extra information for debugging itself. +.UNINDENT +.INDENT 0.0 +.TP +.B \-d +Alias for –debug +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-editor +Tells the debugger to open source files using the host’s “external editor” mechanism. +.UNINDENT +.INDENT 0.0 +.TP +.B \-e +Alias for –editor +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-file +Tells the debugger to use the file as the program to be debugged. +.UNINDENT +.INDENT 0.0 +.TP +.B \-f +Alias for –file +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-help +Prints out the usage information for the LLDB debugger. +.UNINDENT +.INDENT 0.0 +.TP +.B \-h +Alias for –help +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-no\-use\-colors +Do not use colors. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-replay +Tells the debugger to replay a reproducer from . +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-version +Prints out the current version number of the LLDB debugger. +.UNINDENT +.INDENT 0.0 +.TP +.B \-v +Alias for –version +.UNINDENT +.INDENT 0.0 +.TP +.B \-X +Alias for –no\-use\-color +.UNINDENT +.SH REPL +.INDENT 0.0 +.TP +.B \-r= +Alias for –repl= +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-repl\-language +Chooses the language for the REPL. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-repl= +Runs lldb in REPL mode with a stub process with the given flags. +.UNINDENT +.INDENT 0.0 +.TP +.B \-R +Alias for –repl\-language +.UNINDENT +.SH SCRIPTING +.INDENT 0.0 +.TP +.B \-l +Alias for –script\-language +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-python\-path +Prints out the path to the lldb.py file for this version of lldb. +.UNINDENT +.INDENT 0.0 +.TP +.B \-P +Alias for –python\-path +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-script\-language +Tells the debugger to use the specified scripting language for user\-defined scripts. +.UNINDENT +.SH EXAMPLES +.sp +The debugger can be started in several modes. +.sp +Passing an executable as a positional argument prepares \fBlldb\fP to +debug the given executable. Arguments passed after – are considered arguments +to the debugged executable. +.INDENT 0.0 +.INDENT 3.5 +lldb –arch x86_64 /path/to/program – –arch arvm7 +.UNINDENT +.UNINDENT +.sp +Passing one of the attach options causes \fBlldb\fP to immediately attach +to the given process. +.INDENT 0.0 +.INDENT 3.5 +lldb \-p +lldb \-n +.UNINDENT +.UNINDENT +.sp +Passing –repl starts \fBlldb\fP in REPL mode. +.INDENT 0.0 +.INDENT 3.5 +lldb \-r +.UNINDENT +.UNINDENT +.sp +Passing –core causes \fBlldb\fP to debug the core file. +.INDENT 0.0 +.INDENT 3.5 +lldb \-c /path/to/core +.UNINDENT +.UNINDENT +.sp +Command options can be combined with these modes and cause \fBlldb\fP to +run the specified commands before or after events, like loading the file or +crashing, in the order provided on the command line. +.INDENT 0.0 +.INDENT 3.5 +lldb \-O ‘settings set stop\-disassembly\-count 20’ \-o ‘run’ \-o ‘bt’ +lldb \-S /source/before/file \-s /source/after/file +lldb \-K /source/before/crash \-k /source/after/crash +.UNINDENT +.UNINDENT +.sp +Note: In REPL mode no file is loaded, so commands specified to run after +loading the file (via \-o or \-s) will be ignored. +.SH USING LLDB +.sp +In \fBlldb\fP there is a help command which can be used to find +descriptions and examples of all \fBlldb\fP commands. To get help on +“breakpoint set” you would type “help breakpoint set”. +.sp +There is also an apropos command which will search the help text of all +commands for a given term ‐‐ this is useful for locating a command by topic. +For instance, “apropos breakpoint” will list any command that has the word +“breakpoint” in its help text. +.SH CONFIGURATION FILES +.sp +\fBlldb\fP reads things like settings, aliases and commands from the +.lldbinit file. It will first look for ~/.lldbinit and load that first. +Secondly, it will look for an .lldbinit file in the current working directory. +For security reasons, \fBlldb\fP will print a warning and not source this +file by default. This behavior can be changed by changing the +target.load\-cwd\-lldbinit setting. +.sp +To always load the .lldbinit file in the current working directory, add the +following command to ~/.lldbinit: +.INDENT 0.0 +.INDENT 3.5 +settings set target.load\-cwd\-lldbinit true +.UNINDENT +.UNINDENT +.sp +To never load the .lldbinit file in the current working directory and silence +the warning, add the following command to ~/.lldbinit: +.INDENT 0.0 +.INDENT 3.5 +settings set target.load\-cwd\-lldbinit false +.UNINDENT +.UNINDENT +.SH SEE ALSO +.sp +The LLDB project page \fI\%https://lldb.llvm.org\fP has many different resources +for \fBlldb\fP users ‐‐ the gdb/lldb command equivalence page +\fI\%https://lldb.llvm.org/use/map.html\fP can be especially helpful for users +coming from gdb. +.SH AUTHOR +LLVM project +.SH COPYRIGHT +2007-2020, The LLDB Team +.\" Generated by docutils manpage writer. +.