Back to home page

EIC code displayed by LXR

 
 

    


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

0001 //===-- SBInstructionList.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_API_SBINSTRUCTIONLIST_H
0010 #define LLDB_API_SBINSTRUCTIONLIST_H
0011 
0012 #include "lldb/API/SBDefines.h"
0013 
0014 #include <cstdio>
0015 
0016 namespace lldb {
0017 
0018 class LLDB_API SBInstructionList {
0019 public:
0020   SBInstructionList();
0021 
0022   SBInstructionList(const SBInstructionList &rhs);
0023 
0024   const SBInstructionList &operator=(const SBInstructionList &rhs);
0025 
0026   ~SBInstructionList();
0027 
0028   explicit operator bool() const;
0029 
0030   bool IsValid() const;
0031 
0032   size_t GetSize();
0033 
0034   lldb::SBInstruction GetInstructionAtIndex(uint32_t idx);
0035 
0036   // Returns the number of instructions between the start and end address. If
0037   // canSetBreakpoint is true then the count will be the number of
0038   // instructions on which a breakpoint can be set.
0039   size_t GetInstructionsCount(const SBAddress &start,
0040                               const SBAddress &end,
0041                               bool canSetBreakpoint = false);                                   
0042 
0043   void Clear();
0044 
0045   void AppendInstruction(lldb::SBInstruction inst);
0046 
0047 #ifndef SWIG
0048   void Print(FILE *out);
0049 #endif
0050 
0051   void Print(SBFile out);
0052 
0053   void Print(FileSP BORROWED);
0054 
0055   bool GetDescription(lldb::SBStream &description);
0056 
0057   bool DumpEmulationForAllInstructions(const char *triple);
0058 
0059 protected:
0060   friend class SBFunction;
0061   friend class SBSymbol;
0062   friend class SBTarget;
0063 
0064   void SetDisassembler(const lldb::DisassemblerSP &opaque_sp);
0065   bool GetDescription(lldb_private::Stream &description);
0066 
0067 
0068 private:
0069   lldb::DisassemblerSP m_opaque_sp;
0070 };
0071 
0072 } // namespace lldb
0073 
0074 #endif // LLDB_API_SBINSTRUCTIONLIST_H