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.
This commit is contained in:
parent
0f43089073
commit
4265112d20
@ -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)
|
||||
|
@ -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_entries) {
|
||||
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<ObjectFileMachO>(module_sp->GetObjectFile())) {
|
||||
const SectionList *section_list = image_object_file->GetSectionList();
|
||||
@ -347,7 +350,9 @@ bool JITLoaderGDB::ReadJITDescriptorImpl(bool all_entries) {
|
||||
symbolfile_size, vmaddrheuristic, lower,
|
||||
upper);
|
||||
}
|
||||
} else {
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
bool changed = false;
|
||||
module_sp->SetLoadAddress(target, 0, true, changed);
|
||||
}
|
||||
|
@ -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 */
|
||||
|
||||
|
@ -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.cpp
|
||||
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/ClangModulesDeclVendor.cpp
|
||||
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.cpp
|
||||
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/}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
409
usr.bin/clang/lldb/lldb.1
Normal file
409
usr.bin/clang/lldb/lldb.1
Normal file
@ -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 <name>
|
||||
Tells the debugger to attach to a process with the given name.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-attach\-pid <pid>
|
||||
Tells the debugger to attach to a process with the given pid.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-n <value>
|
||||
Alias for –attach\-name
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-p <value>
|
||||
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 <value>
|
||||
Alias for –source\-on\-crash
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-k <value>
|
||||
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 <command>
|
||||
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 <command>
|
||||
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 <command>
|
||||
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 <value>
|
||||
Alias for –one\-line\-before\-file
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-o <value>
|
||||
Alias for –one\-line
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-Q
|
||||
Alias for –source\-quietly
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-source\-before\-file <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 <file>
|
||||
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 <file>
|
||||
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 <value>
|
||||
Alias for –source\-before\-file
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-s <value>
|
||||
Alias for –source
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-x
|
||||
Alias for –no\-lldbinit
|
||||
.UNINDENT
|
||||
.SH OPTIONS
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-arch <architecture>
|
||||
Tells the debugger to use the specified architecture when starting and running the program.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-a <value>
|
||||
Alias for –arch
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-capture\-path <filename>
|
||||
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 <filename>
|
||||
Tells the debugger to use the full path to <filename> as the core file.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-c <value>
|
||||
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 <filename>
|
||||
Tells the debugger to use the file <filename> as the program to be debugged.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-f <value>
|
||||
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 <filename>
|
||||
Tells the debugger to replay a reproducer from <filename>.
|
||||
.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=<flags>
|
||||
Alias for –repl=<flags>
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-repl\-language <language>
|
||||
Chooses the language for the REPL.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-repl=<flags>
|
||||
Runs lldb in REPL mode with a stub process with the given flags.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-R <value>
|
||||
Alias for –repl\-language
|
||||
.UNINDENT
|
||||
.SH SCRIPTING
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-l <value>
|
||||
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 <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 <pid>
|
||||
lldb \-n <process\-name>
|
||||
.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.
|
||||
.
|
Loading…
Reference in New Issue
Block a user