blob: cba1f3f774eee5c1674a489700158576974ae824 [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
Chris Lattner30fdc8d2010-06-08 16:52:24 +000026// CommandObjectMultiwordBreakpoint
Chris Lattner30fdc8d2010-06-08 16:52:24 +000027
Kate Stoneb9c1b512016-09-06 20:57:50 +000028class CommandObjectMultiwordBreakpoint : public CommandObjectMultiword {
Chris Lattner30fdc8d2010-06-08 16:52:24 +000029public:
Kate Stoneb9c1b512016-09-06 20:57:50 +000030 CommandObjectMultiwordBreakpoint(CommandInterpreter &interpreter);
Chris Lattner30fdc8d2010-06-08 16:52:24 +000031
Kate Stoneb9c1b512016-09-06 20:57:50 +000032 ~CommandObjectMultiwordBreakpoint() override;
Chris Lattner30fdc8d2010-06-08 16:52:24 +000033
Kate Stoneb9c1b512016-09-06 20:57:50 +000034 static void VerifyBreakpointOrLocationIDs(Args &args, Target *target,
35 CommandReturnObject &result,
Jim Inghamb842f2e2017-09-14 20:22:49 +000036 BreakpointIDList *valid_ids,
37 BreakpointName::Permissions
38 ::PermissionKinds purpose) {
39 VerifyIDs(args, target, true, result, valid_ids, purpose);
Kate Stoneb9c1b512016-09-06 20:57:50 +000040 }
Chris Lattner30fdc8d2010-06-08 16:52:24 +000041
Kate Stoneb9c1b512016-09-06 20:57:50 +000042 static void VerifyBreakpointIDs(Args &args, Target *target,
43 CommandReturnObject &result,
Jim Inghamb842f2e2017-09-14 20:22:49 +000044 BreakpointIDList *valid_ids,
45 BreakpointName::Permissions::PermissionKinds
46 purpose) {
47 VerifyIDs(args, target, false, result, valid_ids, purpose);
Kate Stoneb9c1b512016-09-06 20:57:50 +000048 }
Jim Ingham5e09c8c2014-12-16 23:40:14 +000049
50private:
Kate Stoneb9c1b512016-09-06 20:57:50 +000051 static void VerifyIDs(Args &args, Target *target, bool allow_locations,
52 CommandReturnObject &result,
Jim Inghamb842f2e2017-09-14 20:22:49 +000053 BreakpointIDList *valid_ids,
54 BreakpointName::Permissions::PermissionKinds
55 purpose);
Chris Lattner30fdc8d2010-06-08 16:52:24 +000056};
57
Chris Lattner30fdc8d2010-06-08 16:52:24 +000058} // namespace lldb_private
59
Pavel Labath1fb7e202015-09-02 09:33:09 +000060#endif // liblldb_CommandObjectBreakpoint_h_