LLDB mainline
BreakpointIDList.h
Go to the documentation of this file.
1//===-- BreakpointIDList.h --------------------------------------*- C++ -*-===//
2//
3// 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
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLDB_BREAKPOINT_BREAKPOINTIDLIST_H
10#define LLDB_BREAKPOINT_BREAKPOINTIDLIST_H
11
12#include <utility>
13#include <vector>
14
18#include "lldb/lldb-private.h"
19
20#include "llvm/Support/Error.h"
21
22namespace lldb_private {
23
24// class BreakpointIDList
25
27public:
28 // TODO: Convert this class to StringRef.
29 typedef std::vector<BreakpointID> BreakpointIDArray;
30
32
34
35 size_t GetSize() const;
36
37 BreakpointID GetBreakpointIDAtIndex(size_t index) const;
38
39 bool RemoveBreakpointIDAtIndex(size_t index);
40
41 void Clear();
42
43 bool AddBreakpointID(BreakpointID bp_id);
44
45 bool Contains(BreakpointID bp_id) const;
46
47 // Returns a pair consisting of the beginning and end of a breakpoint
48 // ID range expression. If the input string is not a valid specification,
49 // returns an empty pair.
50 static std::pair<llvm::StringRef, llvm::StringRef>
51 SplitIDRangeExpression(llvm::StringRef in_string);
52
53 static llvm::Error
54 FindAndReplaceIDRanges(Args &old_args, Target *target, bool allow_locations,
55 BreakpointName::Permissions ::PermissionKinds purpose,
56 Args &new_args);
57
58private:
60
63};
64
65} // namespace lldb_private
66
67#endif // LLDB_BREAKPOINT_BREAKPOINTIDLIST_H
A command line argument class.
Definition: Args.h:33
BreakpointIDArray m_breakpoint_ids
std::vector< BreakpointID > BreakpointIDArray
const BreakpointIDList & operator=(const BreakpointIDList &)=delete
BreakpointIDList(const BreakpointIDList &)=delete
bool AddBreakpointID(BreakpointID bp_id)
bool RemoveBreakpointIDAtIndex(size_t index)
static std::pair< llvm::StringRef, llvm::StringRef > SplitIDRangeExpression(llvm::StringRef in_string)
BreakpointID GetBreakpointIDAtIndex(size_t index) const
static llvm::Error FindAndReplaceIDRanges(Args &old_args, Target *target, bool allow_locations, BreakpointName::Permissions ::PermissionKinds purpose, Args &new_args)
A class that represents a running process on the host machine.