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
15
19#include "lldb/lldb-private.h"
20
21namespace lldb_private {
22
23// class BreakpointIDList
24
26public:
27 // TODO: Convert this class to StringRef.
28 typedef std::vector<BreakpointID> BreakpointIDArray;
29
31
33
34 size_t GetSize() const;
35
36 const BreakpointID &GetBreakpointIDAtIndex(size_t index) const;
37
38 bool RemoveBreakpointIDAtIndex(size_t index);
39
40 void Clear();
41
42 bool AddBreakpointID(BreakpointID bp_id);
43
44 bool AddBreakpointID(const char *bp_id);
45
46 // TODO: This should take a const BreakpointID.
47 bool FindBreakpointID(BreakpointID &bp_id, size_t *position) const;
48
49 bool FindBreakpointID(const char *bp_id, size_t *position) const;
50
51 void InsertStringArray(llvm::ArrayRef<const char *> string_array,
52 CommandReturnObject &result);
53
54 // Returns a pair consisting of the beginning and end of a breakpoint
55 // ID range expression. If the input string is not a valid specification,
56 // returns an empty pair.
57 static std::pair<llvm::StringRef, llvm::StringRef>
58 SplitIDRangeExpression(llvm::StringRef in_string);
59
60 static void FindAndReplaceIDRanges(Args &old_args, Target *target,
61 bool allow_locations,
63 ::PermissionKinds purpose,
64 CommandReturnObject &result,
65 Args &new_args);
66
67private:
70
73};
74
75} // namespace lldb_private
76
77#endif // LLDB_BREAKPOINT_BREAKPOINTIDLIST_H
A command line argument class.
Definition: Args.h:33
const BreakpointID & GetBreakpointIDAtIndex(size_t index) const
BreakpointIDArray m_breakpoint_ids
std::vector< BreakpointID > BreakpointIDArray
static void FindAndReplaceIDRanges(Args &old_args, Target *target, bool allow_locations, BreakpointName::Permissions ::PermissionKinds purpose, CommandReturnObject &result, Args &new_args)
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)
bool FindBreakpointID(BreakpointID &bp_id, size_t *position) const
void InsertStringArray(llvm::ArrayRef< const char * > string_array, CommandReturnObject &result)
A class that represents a running process on the host machine.
Definition: SBAttachInfo.h:14