diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2019-08-20 20:51:52 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2019-08-20 20:51:52 +0000 |
commit | 5f29bb8a675e8f96452b632e7129113f7dec850e (patch) | |
tree | 3d3f2a0d3ad10872a4dcaba8ec8d1d20c87ab147 /source/Commands/CommandObjectBreakpoint.cpp | |
parent | 88c643b6fec27eec436c8d138fee6346e92337d6 (diff) | |
download | src-5f29bb8a675e8f96452b632e7129113f7dec850e.tar.gz src-5f29bb8a675e8f96452b632e7129113f7dec850e.zip |
Vendor import of stripped lldb trunk r366426 (just before the release_90
branch point):
https://llvm.org/svn/llvm-project/lldb/trunk@366426
Notes
Notes:
svn path=/vendor/lldb/dist/; revision=351290
Diffstat (limited to 'source/Commands/CommandObjectBreakpoint.cpp')
-rw-r--r-- | source/Commands/CommandObjectBreakpoint.cpp | 64 |
1 files changed, 15 insertions, 49 deletions
diff --git a/source/Commands/CommandObjectBreakpoint.cpp b/source/Commands/CommandObjectBreakpoint.cpp index 8eb6a5fa5a02..c33f3834cb13 100644 --- a/source/Commands/CommandObjectBreakpoint.cpp +++ b/source/Commands/CommandObjectBreakpoint.cpp @@ -1,14 +1,11 @@ //===-- CommandObjectBreakpoint.cpp -----------------------------*- C++ -*-===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -#include <vector> - #include "CommandObjectBreakpoint.h" #include "CommandObjectBreakpointCommand.h" #include "lldb/Breakpoint/Breakpoint.h" @@ -31,6 +28,9 @@ #include "lldb/Utility/RegularExpression.h" #include "lldb/Utility/StreamString.h" +#include <memory> +#include <vector> + using namespace lldb; using namespace lldb_private; @@ -42,9 +42,7 @@ static void AddBreakpointDescription(Stream *s, Breakpoint *bp, s->EOL(); } -//------------------------------------------------------------------------- // Modifiable Breakpoint Options -//------------------------------------------------------------------------- #pragma mark Modify::CommandOptions static constexpr OptionDefinition g_breakpoint_modify_options[] = { // clang-format off @@ -322,13 +320,11 @@ static constexpr OptionDefinition g_breakpoint_set_options[] = { // clang-format on }; -//------------------------------------------------------------------------- // CommandObjectBreakpointSet -//------------------------------------------------------------------------- class CommandObjectBreakpointSet : public CommandObjectParsed { public: - typedef enum BreakpointSetType { + enum BreakpointSetType { eSetTypeInvalid, eSetTypeFileAndLine, eSetTypeAddress, @@ -337,7 +333,7 @@ public: eSetTypeSourceRegexp, eSetTypeException, eSetTypeScripted, - } BreakpointSetType; + }; CommandObjectBreakpointSet(CommandInterpreter &interpreter) : CommandObjectParsed( @@ -616,7 +612,7 @@ public: m_move_to_nearest_code = eLazyBoolCalculate; m_source_regex_func_names.clear(); m_python_class.clear(); - m_extra_args_sp.reset(new StructuredData::Dictionary()); + m_extra_args_sp = std::make_shared<StructuredData::Dictionary>(); m_current_key.clear(); } @@ -901,7 +897,7 @@ protected: const bool show_locations = false; bp_sp->GetDescription(&output_stream, lldb::eDescriptionLevelInitial, show_locations); - if (target == m_interpreter.GetDebugger().GetDummyTarget()) + if (target == GetDebugger().GetDummyTarget()) output_stream.Printf("Breakpoint set in dummy target, will get copied " "into future targets.\n"); else { @@ -962,9 +958,7 @@ private: OptionGroupOptions m_all_options; }; -//------------------------------------------------------------------------- // CommandObjectBreakpointModify -//------------------------------------------------------------------------- #pragma mark Modify class CommandObjectBreakpointModify : public CommandObjectParsed { @@ -1046,9 +1040,7 @@ private: OptionGroupOptions m_options; }; -//------------------------------------------------------------------------- // CommandObjectBreakpointEnable -//------------------------------------------------------------------------- #pragma mark Enable class CommandObjectBreakpointEnable : public CommandObjectParsed { @@ -1137,9 +1129,7 @@ protected: } }; -//------------------------------------------------------------------------- // CommandObjectBreakpointDisable -//------------------------------------------------------------------------- #pragma mark Disable class CommandObjectBreakpointDisable : public CommandObjectParsed { @@ -1252,21 +1242,14 @@ protected: } }; -//------------------------------------------------------------------------- // CommandObjectBreakpointList -//------------------------------------------------------------------------- #pragma mark List::CommandOptions static constexpr OptionDefinition g_breakpoint_list_options[] = { - // clang-format off - { 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)." }, - // FIXME: We need to add an "internal" command, and then add this sort of thing to it. - // But I need to see it for now, and don't want to wait. - { 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." }, - // clang-format on + // FIXME: We need to add an "internal" command, and then add this sort of + // thing to it. But I need to see it for now, and don't want to wait. +#define LLDB_OPTIONS_breakpoint_list +#include "CommandOptions.inc" }; #pragma mark List @@ -1418,9 +1401,7 @@ private: CommandOptions m_options; }; -//------------------------------------------------------------------------- // CommandObjectBreakpointClear -//------------------------------------------------------------------------- #pragma mark Clear::CommandOptions static constexpr OptionDefinition g_breakpoint_clear_options[] = { @@ -1434,10 +1415,7 @@ static constexpr OptionDefinition g_breakpoint_clear_options[] = { class CommandObjectBreakpointClear : public CommandObjectParsed { public: - typedef enum BreakpointClearType { - eClearTypeInvalid, - eClearTypeFileAndLine - } BreakpointClearType; + enum BreakpointClearType { eClearTypeInvalid, eClearTypeFileAndLine }; CommandObjectBreakpointClear(CommandInterpreter &interpreter) : CommandObjectParsed(interpreter, "breakpoint clear", @@ -1578,9 +1556,7 @@ private: CommandOptions m_options; }; -//------------------------------------------------------------------------- // CommandObjectBreakpointDelete -//------------------------------------------------------------------------- static constexpr OptionDefinition g_breakpoint_delete_options[] = { // clang-format off { LLDB_OPT_SET_1, false, "force", 'f', OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone, "Delete all breakpoints without querying for confirmation." }, @@ -1734,9 +1710,7 @@ private: CommandOptions m_options; }; -//------------------------------------------------------------------------- // CommandObjectBreakpointName -//------------------------------------------------------------------------- static constexpr OptionDefinition g_breakpoint_name_options[] = { // clang-format off @@ -2245,9 +2219,7 @@ private: OptionGroupOptions m_option_group; }; -//------------------------------------------------------------------------- // CommandObjectBreakpointName -//------------------------------------------------------------------------- class CommandObjectBreakpointName : public CommandObjectMultiword { public: CommandObjectBreakpointName(CommandInterpreter &interpreter) @@ -2272,9 +2244,7 @@ public: ~CommandObjectBreakpointName() override = default; }; -//------------------------------------------------------------------------- // CommandObjectBreakpointRead -//------------------------------------------------------------------------- #pragma mark Read::CommandOptions static constexpr OptionDefinition g_breakpoint_read_options[] = { // clang-format off @@ -2403,9 +2373,7 @@ private: CommandOptions m_options; }; -//------------------------------------------------------------------------- // CommandObjectBreakpointWrite -//------------------------------------------------------------------------- #pragma mark Write::CommandOptions static constexpr OptionDefinition g_breakpoint_write_options[] = { // clang-format off @@ -2517,9 +2485,7 @@ private: CommandOptions m_options; }; -//------------------------------------------------------------------------- // CommandObjectMultiwordBreakpoint -//------------------------------------------------------------------------- #pragma mark MultiwordBreakpoint CommandObjectMultiwordBreakpoint::CommandObjectMultiwordBreakpoint( |