LLDB  mainline
Classes | Macros | Functions | Variables
CommandObjectBreakpoint.cpp File Reference
#include "CommandObjectBreakpoint.h"
#include "CommandObjectBreakpointCommand.h"
#include "lldb/Breakpoint/Breakpoint.h"
#include "lldb/Breakpoint/BreakpointIDList.h"
#include "lldb/Breakpoint/BreakpointLocation.h"
#include "lldb/Host/OptionParser.h"
#include "lldb/Interpreter/CommandCompletions.h"
#include "lldb/Interpreter/CommandInterpreter.h"
#include "lldb/Interpreter/CommandReturnObject.h"
#include "lldb/Interpreter/OptionArgParser.h"
#include "lldb/Interpreter/OptionValueBoolean.h"
#include "lldb/Interpreter/OptionValueString.h"
#include "lldb/Interpreter/OptionValueUInt64.h"
#include "lldb/Interpreter/Options.h"
#include "lldb/Target/Language.h"
#include "lldb/Target/StackFrame.h"
#include "lldb/Target/Target.h"
#include "lldb/Target/Thread.h"
#include "lldb/Target/ThreadSpec.h"
#include "lldb/Utility/RegularExpression.h"
#include "lldb/Utility/StreamString.h"
#include <memory>
#include <vector>
Include dependency graph for CommandObjectBreakpoint.cpp:

Go to the source code of this file.

Classes

class  lldb_private::BreakpointOptionGroup
 
class  BreakpointDummyOptionGroup
 
class  CommandObjectBreakpointSet
 
class  CommandObjectBreakpointSet::CommandOptions
 
class  CommandObjectBreakpointModify
 
class  CommandObjectBreakpointEnable
 
class  CommandObjectBreakpointDisable
 
class  CommandObjectBreakpointList
 
class  CommandObjectBreakpointList::CommandOptions
 
class  CommandObjectBreakpointClear
 
class  CommandObjectBreakpointClear::CommandOptions
 
class  CommandObjectBreakpointDelete
 
class  CommandObjectBreakpointDelete::CommandOptions
 
class  BreakpointNameOptionGroup
 
class  BreakpointAccessOptionGroup
 
class  CommandObjectBreakpointNameConfigure
 
class  CommandObjectBreakpointNameAdd
 
class  CommandObjectBreakpointNameDelete
 
class  CommandObjectBreakpointNameList
 
class  CommandObjectBreakpointName
 
class  CommandObjectBreakpointRead
 
class  CommandObjectBreakpointRead::CommandOptions
 
class  CommandObjectBreakpointWrite
 
class  CommandObjectBreakpointWrite::CommandOptions
 

Macros

#define LLDB_OPT_NOT_10   (LLDB_OPT_SET_FROM_TO(1, 11) & ~LLDB_OPT_SET_10)
 
#define LLDB_OPT_SKIP_PROLOGUE   (LLDB_OPT_SET_1 | LLDB_OPT_SET_FROM_TO(3, 8))
 
#define LLDB_OPT_FILE   (LLDB_OPT_SET_FROM_TO(1, 11) & ~LLDB_OPT_SET_2 & ~LLDB_OPT_SET_10)
 
#define LLDB_OPT_OFFSET_APPLIES   (LLDB_OPT_SET_FROM_TO(1, 8) & ~LLDB_OPT_SET_2)
 
#define LLDB_OPT_MOVE_TO_NEAREST_CODE   (LLDB_OPT_SET_1 | LLDB_OPT_SET_9)
 
#define LLDB_OPT_EXPR_LANGUAGE   (LLDB_OPT_SET_FROM_TO(3, 8))
 

Functions

static void AddBreakpointDescription (Stream *s, Breakpoint *bp, lldb::DescriptionLevel level)
 

Variables

static constexpr OptionDefinition g_breakpoint_modify_options []
 
static constexpr OptionDefinition g_breakpoint_dummy_options []
 
static constexpr OptionDefinition g_breakpoint_set_options []
 
static constexpr OptionDefinition g_breakpoint_list_options []
 
static constexpr OptionDefinition g_breakpoint_clear_options []
 
static constexpr OptionDefinition g_breakpoint_delete_options []
 
static constexpr OptionDefinition g_breakpoint_name_options []
 
static constexpr OptionDefinition g_breakpoint_access_options []
 
static constexpr OptionDefinition g_breakpoint_read_options []
 
static constexpr OptionDefinition g_breakpoint_write_options []
 

Macro Definition Documentation

◆ LLDB_OPT_EXPR_LANGUAGE

#define LLDB_OPT_EXPR_LANGUAGE   (LLDB_OPT_SET_FROM_TO(3, 8))

Definition at line 247 of file CommandObjectBreakpoint.cpp.

◆ LLDB_OPT_FILE

#define LLDB_OPT_FILE   (LLDB_OPT_SET_FROM_TO(1, 11) & ~LLDB_OPT_SET_2 & ~LLDB_OPT_SET_10)

Definition at line 244 of file CommandObjectBreakpoint.cpp.

◆ LLDB_OPT_MOVE_TO_NEAREST_CODE

#define LLDB_OPT_MOVE_TO_NEAREST_CODE   (LLDB_OPT_SET_1 | LLDB_OPT_SET_9)

Definition at line 246 of file CommandObjectBreakpoint.cpp.

◆ LLDB_OPT_NOT_10

#define LLDB_OPT_NOT_10   (LLDB_OPT_SET_FROM_TO(1, 11) & ~LLDB_OPT_SET_10)

Definition at line 242 of file CommandObjectBreakpoint.cpp.

◆ LLDB_OPT_OFFSET_APPLIES

#define LLDB_OPT_OFFSET_APPLIES   (LLDB_OPT_SET_FROM_TO(1, 8) & ~LLDB_OPT_SET_2)

Definition at line 245 of file CommandObjectBreakpoint.cpp.

◆ LLDB_OPT_SKIP_PROLOGUE

#define LLDB_OPT_SKIP_PROLOGUE   (LLDB_OPT_SET_1 | LLDB_OPT_SET_FROM_TO(3, 8))

Definition at line 243 of file CommandObjectBreakpoint.cpp.

Function Documentation

◆ AddBreakpointDescription()

static void AddBreakpointDescription ( Stream s,
Breakpoint bp,
lldb::DescriptionLevel  level 
)
static

Variable Documentation

◆ g_breakpoint_access_options

constexpr OptionDefinition g_breakpoint_access_options[]
static
Initial value:
= {
{LLDB_OPT_SET_1, false, "allow-list", 'L', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeBoolean, "Determines whether the breakpoint will show up in break list if not referred to explicitly."},
{LLDB_OPT_SET_2, false, "allow-disable", 'A', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeBoolean, "Determines whether the breakpoint can be disabled by name or when all breakpoints are disabled."},
{LLDB_OPT_SET_3, false, "allow-delete", 'D', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeBoolean, "Determines whether the breakpoint can be deleted by name or when all breakpoints are deleted."},
}
#define LLDB_OPT_SET_3
Definition: lldb-defines.h:113
#define LLDB_OPT_SET_2
Definition: lldb-defines.h:112
#define LLDB_OPT_SET_1
Definition: lldb-defines.h:111

Definition at line 1792 of file CommandObjectBreakpoint.cpp.

Referenced by BreakpointAccessOptionGroup::GetDefinitions(), and BreakpointAccessOptionGroup::SetOptionValue().

◆ g_breakpoint_clear_options

constexpr OptionDefinition g_breakpoint_clear_options[]
static
Initial value:
= {
{ LLDB_OPT_SET_1, false, "file", 'f', OptionParser::eRequiredArgument, nullptr, {}, CommandCompletions::eSourceFileCompletion, eArgTypeFilename, "Specify the breakpoint by source location in this particular file." },
{ LLDB_OPT_SET_1, true, "line", 'l', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeLineNum, "Specify the breakpoint by source location at this particular line." }
}
#define LLDB_OPT_SET_1
Definition: lldb-defines.h:111

Definition at line 1412 of file CommandObjectBreakpoint.cpp.

Referenced by CommandObjectBreakpointClear::CommandOptions::GetDefinitions().

◆ g_breakpoint_delete_options

constexpr OptionDefinition g_breakpoint_delete_options[]
static
Initial value:
= {
{ LLDB_OPT_SET_1, false, "force", 'f', OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone, "Delete all breakpoints without querying for confirmation." },
{ LLDB_OPT_SET_1, false, "dummy-breakpoints", 'D', OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone, "Delete Dummy breakpoints - i.e. breakpoints set before a file is provided, which prime new targets." },
}
#define LLDB_OPT_SET_1
Definition: lldb-defines.h:111

Definition at line 1568 of file CommandObjectBreakpoint.cpp.

Referenced by CommandObjectBreakpointDelete::CommandOptions::GetDefinitions().

◆ g_breakpoint_dummy_options

constexpr OptionDefinition g_breakpoint_dummy_options[]
static
Initial value:
= {
{ LLDB_OPT_SET_1, false, "dummy-breakpoints", 'D', OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone, "Act on Dummy breakpoints - i.e. breakpoints set before a file is provided, "
"which prime new targets." },
}
#define LLDB_OPT_SET_1
Definition: lldb-defines.h:111

Definition at line 195 of file CommandObjectBreakpoint.cpp.

Referenced by BreakpointDummyOptionGroup::GetDefinitions().

◆ g_breakpoint_list_options

constexpr OptionDefinition g_breakpoint_list_options[]
static
Initial value:
= {
{ LLDB_OPT_SET_ALL, false, "internal", 'i', OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone, "Show debugger internal breakpoints" },
{ LLDB_OPT_SET_1, false, "brief", 'b', OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone, "Give a brief description of the breakpoint (no location info)." },
{ LLDB_OPT_SET_2, false, "full", 'f', OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone, "Give a full description of the breakpoint and its locations." },
{ LLDB_OPT_SET_3, false, "verbose", 'v', OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone, "Explain everything we know about the breakpoint (for debugging debugger bugs)." },
{ LLDB_OPT_SET_ALL, false, "dummy-breakpoints", 'D', OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone, "List Dummy breakpoints - i.e. breakpoints set before a file is provided, which prime new targets." },
}
#define LLDB_OPT_SET_3
Definition: lldb-defines.h:113
#define LLDB_OPT_SET_2
Definition: lldb-defines.h:112
#define LLDB_OPT_SET_ALL
Definition: lldb-defines.h:110
#define LLDB_OPT_SET_1
Definition: lldb-defines.h:111

Definition at line 1248 of file CommandObjectBreakpoint.cpp.

Referenced by CommandObjectBreakpointList::CommandOptions::GetDefinitions().

◆ g_breakpoint_modify_options

constexpr OptionDefinition g_breakpoint_modify_options[]
static
Initial value:
= {
{ LLDB_OPT_SET_1, false, "ignore-count", 'i', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeCount, "Set the number of times this breakpoint is skipped before stopping." },
{ LLDB_OPT_SET_1, false, "one-shot", 'o', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeBoolean, "The breakpoint is deleted the first time it stop causes a stop." },
{ LLDB_OPT_SET_1, false, "thread-index", 'x', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeThreadIndex, "The breakpoint stops only for the thread whose index matches this argument." },
{ LLDB_OPT_SET_1, false, "thread-id", 't', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeThreadID, "The breakpoint stops only for the thread whose TID matches this argument." },
{ LLDB_OPT_SET_1, false, "thread-name", 'T', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeThreadName, "The breakpoint stops only for the thread whose thread name matches this argument." },
{ LLDB_OPT_SET_1, false, "queue-name", 'q', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeQueueName, "The breakpoint stops only for threads in the queue whose name is given by this argument." },
{ LLDB_OPT_SET_1, false, "condition", 'c', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeExpression, "The breakpoint stops only if this condition expression evaluates to true." },
{ LLDB_OPT_SET_1, false, "auto-continue",'G', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeBoolean, "The breakpoint will auto-continue after running its commands." },
{ LLDB_OPT_SET_2, false, "enable", 'e', OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone, "Enable the breakpoint." },
{ LLDB_OPT_SET_3, false, "disable", 'd', OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone, "Disable the breakpoint." },
{ LLDB_OPT_SET_4, false, "command", 'C', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeCommand, "A command to run when the breakpoint is hit, can be provided more than once, the commands will get run in order left to right." },
}
#define LLDB_OPT_SET_3
Definition: lldb-defines.h:113
#define LLDB_OPT_SET_4
Definition: lldb-defines.h:114
#define LLDB_OPT_SET_2
Definition: lldb-defines.h:112
#define LLDB_OPT_SET_1
Definition: lldb-defines.h:111

Definition at line 47 of file CommandObjectBreakpoint.cpp.

Referenced by lldb_private::BreakpointOptionGroup::GetDefinitions(), lldb_private::BreakpointOptionGroup::SetOptionValue(), and BreakpointDummyOptionGroup::SetOptionValue().

◆ g_breakpoint_name_options

constexpr OptionDefinition g_breakpoint_name_options[]
static
Initial value:
= {
{LLDB_OPT_SET_1, false, "name", 'N', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeBreakpointName, "Specifies a breakpoint name to use."},
{LLDB_OPT_SET_2, false, "breakpoint-id", 'B', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeBreakpointID, "Specify a breakpoint ID to use."},
{LLDB_OPT_SET_3, false, "dummy-breakpoints", 'D', OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone, "Operate on Dummy breakpoints - i.e. breakpoints set before a file is provided, which prime new targets."},
{LLDB_OPT_SET_4, false, "help-string", 'H', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeNone, "A help string describing the purpose of this name."},
}
#define LLDB_OPT_SET_3
Definition: lldb-defines.h:113
#define LLDB_OPT_SET_4
Definition: lldb-defines.h:114
#define LLDB_OPT_SET_2
Definition: lldb-defines.h:112
#define LLDB_OPT_SET_1
Definition: lldb-defines.h:111

Definition at line 1723 of file CommandObjectBreakpoint.cpp.

Referenced by BreakpointNameOptionGroup::GetDefinitions(), and BreakpointNameOptionGroup::SetOptionValue().

◆ g_breakpoint_read_options

constexpr OptionDefinition g_breakpoint_read_options[]
static
Initial value:
= {
{LLDB_OPT_SET_ALL, true, "file", 'f', OptionParser::eRequiredArgument, nullptr, {}, CommandCompletions::eDiskFileCompletion, eArgTypeFilename, "The file from which to read the breakpoints." },
{LLDB_OPT_SET_ALL, false, "breakpoint-name", 'N', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeBreakpointName, "Only read in breakpoints with this name."},
}
#define LLDB_OPT_SET_ALL
Definition: lldb-defines.h:110

Definition at line 2257 of file CommandObjectBreakpoint.cpp.

Referenced by CommandObjectBreakpointRead::CommandOptions::GetDefinitions().

◆ g_breakpoint_set_options

constexpr OptionDefinition g_breakpoint_set_options[]
static

◆ g_breakpoint_write_options

constexpr OptionDefinition g_breakpoint_write_options[]
static
Initial value:
= {
{ LLDB_OPT_SET_ALL, true, "file", 'f', OptionParser::eRequiredArgument, nullptr, {}, CommandCompletions::eDiskFileCompletion, eArgTypeFilename, "The file into which to write the breakpoints." },
{ LLDB_OPT_SET_ALL, false, "append",'a', OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone, "Append to saved breakpoints file if it exists."},
}
#define LLDB_OPT_SET_ALL
Definition: lldb-defines.h:110

Definition at line 2386 of file CommandObjectBreakpoint.cpp.

Referenced by CommandObjectBreakpointWrite::CommandOptions::GetDefinitions().