Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:42:43

0001 //===-- BreakpointIDList.h --------------------------------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef LLDB_BREAKPOINT_BREAKPOINTIDLIST_H
0010 #define LLDB_BREAKPOINT_BREAKPOINTIDLIST_H
0011 
0012 #include <utility>
0013 #include <vector>
0014 
0015 #include "lldb/Breakpoint/BreakpointID.h"
0016 #include "lldb/Breakpoint/BreakpointName.h"
0017 #include "lldb/lldb-enumerations.h"
0018 #include "lldb/lldb-private.h"
0019 
0020 #include "llvm/Support/Error.h"
0021 
0022 namespace lldb_private {
0023 
0024 // class BreakpointIDList
0025 
0026 class BreakpointIDList {
0027 public:
0028   // TODO: Convert this class to StringRef.
0029   typedef std::vector<BreakpointID> BreakpointIDArray;
0030 
0031   BreakpointIDList();
0032 
0033   virtual ~BreakpointIDList();
0034 
0035   size_t GetSize() const;
0036 
0037   BreakpointID GetBreakpointIDAtIndex(size_t index) const;
0038 
0039   bool RemoveBreakpointIDAtIndex(size_t index);
0040 
0041   void Clear();
0042 
0043   bool AddBreakpointID(BreakpointID bp_id);
0044 
0045   bool Contains(BreakpointID bp_id) const;
0046 
0047   // Returns a pair consisting of the beginning and end of a breakpoint
0048   // ID range expression.  If the input string is not a valid specification,
0049   // returns an empty pair.
0050   static std::pair<llvm::StringRef, llvm::StringRef>
0051   SplitIDRangeExpression(llvm::StringRef in_string);
0052 
0053   static llvm::Error
0054   FindAndReplaceIDRanges(Args &old_args, Target *target, bool allow_locations,
0055                          BreakpointName::Permissions ::PermissionKinds purpose,
0056                          Args &new_args);
0057 
0058 private:
0059   BreakpointIDArray m_breakpoint_ids;
0060 
0061   BreakpointIDList(const BreakpointIDList &) = delete;
0062   const BreakpointIDList &operator=(const BreakpointIDList &) = delete;
0063 };
0064 
0065 } // namespace lldb_private
0066 
0067 #endif // LLDB_BREAKPOINT_BREAKPOINTIDLIST_H