Back to home page

EIC code displayed by LXR

 
 

    


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

0001 //===-- BreakpointResolverAddress.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_BREAKPOINTRESOLVERADDRESS_H
0010 #define LLDB_BREAKPOINT_BREAKPOINTRESOLVERADDRESS_H
0011 
0012 #include "lldb/Breakpoint/BreakpointResolver.h"
0013 #include "lldb/Core/ModuleSpec.h"
0014 
0015 namespace lldb_private {
0016 
0017 /// \class BreakpointResolverAddress BreakpointResolverAddress.h
0018 /// "lldb/Breakpoint/BreakpointResolverAddress.h" This class sets breakpoints
0019 /// on a given Address.  This breakpoint only takes once, and then it won't
0020 /// attempt to reset itself.
0021 
0022 class BreakpointResolverAddress : public BreakpointResolver {
0023 public:
0024   BreakpointResolverAddress(const lldb::BreakpointSP &bkpt,
0025                             const Address &addr);
0026 
0027   BreakpointResolverAddress(const lldb::BreakpointSP &bkpt,
0028                             const Address &addr,
0029                             const FileSpec &module_spec);
0030 
0031   ~BreakpointResolverAddress() override = default;
0032 
0033   static lldb::BreakpointResolverSP
0034   CreateFromStructuredData(const StructuredData::Dictionary &options_dict,
0035                            Status &error);
0036 
0037   StructuredData::ObjectSP SerializeToStructuredData() override;
0038 
0039   void ResolveBreakpoint(SearchFilter &filter) override;
0040 
0041   void ResolveBreakpointInModules(SearchFilter &filter,
0042                                   ModuleList &modules) override;
0043 
0044   Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
0045                                           SymbolContext &context,
0046                                           Address *addr) override;
0047 
0048   lldb::SearchDepth GetDepth() override;
0049 
0050   void GetDescription(Stream *s) override;
0051 
0052   void Dump(Stream *s) const override;
0053 
0054   /// Methods for support type inquiry through isa, cast, and dyn_cast:
0055   static inline bool classof(const BreakpointResolverAddress *) { return true; }
0056   static inline bool classof(const BreakpointResolver *V) {
0057     return V->getResolverID() == BreakpointResolver::AddressResolver;
0058   }
0059 
0060   lldb::BreakpointResolverSP
0061   CopyForBreakpoint(lldb::BreakpointSP &breakpoint) override;
0062 
0063 protected:
0064   Address m_addr;               // The address - may be Section Offset or
0065                                 // may be just an offset
0066   lldb::addr_t m_resolved_addr; // The current value of the resolved load
0067                                 // address for this breakpoint,
0068   FileSpec m_module_filespec;   // If this filespec is Valid, and m_addr is an
0069                                 // offset, then it will be converted
0070   // to a Section+Offset address in this module, whenever that module gets
0071   // around to being loaded.
0072 private:
0073   BreakpointResolverAddress(const BreakpointResolverAddress &) = delete;
0074   const BreakpointResolverAddress &
0075   operator=(const BreakpointResolverAddress &) = delete;
0076 };
0077 
0078 } // namespace lldb_private
0079 
0080 #endif // LLDB_BREAKPOINT_BREAKPOINTRESOLVERADDRESS_H