]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/source/Plugins/Architecture/Mips/ArchitectureMips.h
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / source / Plugins / Architecture / Mips / ArchitectureMips.h
1 //===-- ArchitectureMips.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_PLUGIN_ARCHITECTURE_MIPS_H
10 #define LLDB_PLUGIN_ARCHITECTURE_MIPS_H
11
12 #include "lldb/Core/Architecture.h"
13 #include "lldb/Utility/ArchSpec.h"
14
15 namespace lldb_private {
16
17 class ArchitectureMips : public Architecture {
18 public:
19   static ConstString GetPluginNameStatic();
20   static void Initialize();
21   static void Terminate();
22
23   ConstString GetPluginName() override;
24   uint32_t GetPluginVersion() override;
25
26   void OverrideStopInfo(Thread &thread) const override {}
27
28   lldb::addr_t GetBreakableLoadAddress(lldb::addr_t addr,
29                                        Target &) const override;
30
31   lldb::addr_t GetCallableLoadAddress(lldb::addr_t load_addr,
32                                       AddressClass addr_class) const override;
33
34   lldb::addr_t GetOpcodeLoadAddress(lldb::addr_t load_addr,
35                                     AddressClass addr_class) const override;
36
37 private:
38   Instruction *GetInstructionAtAddress(const ExecutionContext &exe_ctx,
39                                        const Address &resolved_addr,
40                                        lldb::addr_t symbol_offset) const;
41
42
43   static std::unique_ptr<Architecture> Create(const ArchSpec &arch);
44   ArchitectureMips(const ArchSpec &arch) : m_arch(arch) {}
45
46   ArchSpec m_arch;
47 };
48
49 } // namespace lldb_private
50
51 #endif // LLDB_PLUGIN_ARCHITECTURE_MIPS_H