blob: c58a3c9a3832f849000caa0571ffb908b46a901a [file] [log] [blame]
Chris Lattner30fdc8d2010-06-08 16:52:24 +00001//===-- CommandObjectBreakpoint.h -------------------------------*- C++ -*-===//
2//
Chandler Carruth2946cd72019-01-19 08:50:56 +00003// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
Chris Lattner30fdc8d2010-06-08 16:52:24 +00006//
7//===----------------------------------------------------------------------===//
8
9#ifndef liblldb_CommandObjectBreakpoint_h_
10#define liblldb_CommandObjectBreakpoint_h_
11
Chris Lattner30fdc8d2010-06-08 16:52:24 +000012
13#include <utility>
14#include <vector>
15
Jim Inghamb842f2e2017-09-14 20:22:49 +000016#include "lldb/lldb-private.h"
17#include "lldb/Breakpoint/BreakpointName.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000018#include "lldb/Core/Address.h"
Kate Stoneb9c1b512016-09-06 20:57:50 +000019#include "lldb/Core/STLUtils.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000020#include "lldb/Interpreter/CommandObjectMultiword.h"
Jim Ingham40af72e2010-06-15 19:49:27 +000021#include "lldb/Interpreter/Options.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000022
Jim Inghamb842f2e2017-09-14 20:22:49 +000023
Chris Lattner30fdc8d2010-06-08 16:52:24 +000024namespace lldb_private {
25
26//-------------------------------------------------------------------------
27// CommandObjectMultiwordBreakpoint
28//-------------------------------------------------------------------------
29
Kate Stoneb9c1b512016-09-06 20:57:50 +000030class CommandObjectMultiwordBreakpoint : public CommandObjectMultiword {
Chris Lattner30fdc8d2010-06-08 16:52:24 +000031public:
Kate Stoneb9c1b512016-09-06 20:57:50 +000032 CommandObjectMultiwordBreakpoint(CommandInterpreter &interpreter);
Chris Lattner30fdc8d2010-06-08 16:52:24 +000033
Kate Stoneb9c1b512016-09-06 20:57:50 +000034 ~CommandObjectMultiwordBreakpoint() override;
Chris Lattner30fdc8d2010-06-08 16:52:24 +000035
Kate Stoneb9c1b512016-09-06 20:57:50 +000036 static void VerifyBreakpointOrLocationIDs(Args &args, Target *target,
37 CommandReturnObject &result,
Jim Inghamb842f2e2017-09-14 20:22:49 +000038 BreakpointIDList *valid_ids,
39 BreakpointName::Permissions
40 ::PermissionKinds purpose) {
41 VerifyIDs(args, target, true, result, valid_ids, purpose);
Kate Stoneb9c1b512016-09-06 20:57:50 +000042 }
Chris Lattner30fdc8d2010-06-08 16:52:24 +000043
Kate Stoneb9c1b512016-09-06 20:57:50 +000044 static void VerifyBreakpointIDs(Args &args, Target *target,
45 CommandReturnObject &result,
Jim Inghamb842f2e2017-09-14 20:22:49 +000046 BreakpointIDList *valid_ids,
47 BreakpointName::Permissions::PermissionKinds
48 purpose) {
49 VerifyIDs(args, target, false, result, valid_ids, purpose);
Kate Stoneb9c1b512016-09-06 20:57:50 +000050 }
Jim Ingham5e09c8c2014-12-16 23:40:14 +000051
52private:
Kate Stoneb9c1b512016-09-06 20:57:50 +000053 static void VerifyIDs(Args &args, Target *target, bool allow_locations,
54 CommandReturnObject &result,
Jim Inghamb842f2e2017-09-14 20:22:49 +000055 BreakpointIDList *valid_ids,
56 BreakpointName::Permissions::PermissionKinds
57 purpose);
Chris Lattner30fdc8d2010-06-08 16:52:24 +000058};
59
Chris Lattner30fdc8d2010-06-08 16:52:24 +000060} // namespace lldb_private
61
Pavel Labath1fb7e202015-09-02 09:33:09 +000062#endif // liblldb_CommandObjectBreakpoint_h_