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 
16 #include "lldb/lldb-enumerations.h"
19 #include "lldb/lldb-private.h"
20 
21 namespace lldb_private {
22 
23 // class BreakpointIDList
24 
26 public:
27  // TODO: Convert this class to StringRef.
28  typedef std::vector<BreakpointID> BreakpointIDArray;
29 
31 
32  virtual ~BreakpointIDList();
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 
67 private:
70 
71  BreakpointIDList(const BreakpointIDList &) = delete;
72  const BreakpointIDList &operator=(const BreakpointIDList &) = delete;
73 };
74 
75 } // namespace lldb_private
76 
77 #endif // LLDB_BREAKPOINT_BREAKPOINTIDLIST_H
BreakpointName.h
lldb_private::BreakpointIDList::BreakpointIDArray
std::vector< BreakpointID > BreakpointIDArray
Definition: BreakpointIDList.h:28
lldb_private::BreakpointIDList::~BreakpointIDList
virtual ~BreakpointIDList()
lldb_private::Args
Definition: Args.h:33
lldb_private::Target
Definition: Target.h:454
lldb_private::BreakpointIDList::operator=
const BreakpointIDList & operator=(const BreakpointIDList &)=delete
lldb_private::BreakpointName::Permissions
Definition: BreakpointName.h:32
lldb-enumerations.h
lldb_private::BreakpointIDList::InsertStringArray
void InsertStringArray(llvm::ArrayRef< const char * > string_array, CommandReturnObject &result)
Definition: BreakpointIDList.cpp:85
lldb_private::BreakpointIDList::RemoveBreakpointIDAtIndex
bool RemoveBreakpointIDAtIndex(size_t index)
Definition: BreakpointIDList.cpp:36
lldb-private.h
lldb_private::BreakpointIDList::m_invalid_id
BreakpointID m_invalid_id
Definition: BreakpointIDList.h:69
lldb_private::CommandReturnObject
Definition: CommandReturnObject.h:25
lldb_private::BreakpointIDList::Clear
void Clear()
Definition: BreakpointIDList.cpp:44
lldb_private::BreakpointID
Definition: BreakpointID.h:22
lldb_private::BreakpointIDList::m_breakpoint_ids
BreakpointIDArray m_breakpoint_ids
Definition: BreakpointIDList.h:68
BreakpointID.h
lldb_private::BreakpointIDList::AddBreakpointID
bool AddBreakpointID(BreakpointID bp_id)
Definition: BreakpointIDList.cpp:46
lldb_private::BreakpointIDList::SplitIDRangeExpression
static std::pair< llvm::StringRef, llvm::StringRef > SplitIDRangeExpression(llvm::StringRef in_string)
Definition: BreakpointIDList.cpp:325
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::BreakpointIDList::GetSize
size_t GetSize() const
Definition: BreakpointIDList.cpp:28
lldb_private::BreakpointIDList::GetBreakpointIDAtIndex
const BreakpointID & GetBreakpointIDAtIndex(size_t index) const
Definition: BreakpointIDList.cpp:31
lldb_private::BreakpointIDList::FindAndReplaceIDRanges
static void FindAndReplaceIDRanges(Args &old_args, Target *target, bool allow_locations, BreakpointName::Permissions ::PermissionKinds purpose, CommandReturnObject &result, Args &new_args)
Definition: BreakpointIDList.cpp:111
lldb_private::BreakpointIDList
Definition: BreakpointIDList.h:25
lldb_private::BreakpointIDList::FindBreakpointID
bool FindBreakpointID(BreakpointID &bp_id, size_t *position) const
Definition: BreakpointIDList.cpp:62
lldb_private::BreakpointIDList::BreakpointIDList
BreakpointIDList()
Definition: BreakpointIDList.cpp:23