LLDB mainline
ABISysV_arc.h
Go to the documentation of this file.
1//===-- ABISysV_arc.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 liblldb_ABISysV_arc_h_
10#define liblldb_ABISysV_arc_h_
11
12// Other libraries and framework includes
13#include <optional>
14
15// Project includes
16#include "lldb/Target/ABI.h"
17#include "lldb/lldb-private.h"
18
20public:
21 ~ABISysV_arc() override = default;
22
23 size_t GetRedZoneSize() const override;
24
26 lldb::addr_t functionAddress,
27 lldb::addr_t returnAddress,
28 llvm::ArrayRef<lldb::addr_t> args) const override;
29
30 // Special thread plan for GDB style non-jit function calls.
31 bool
33 lldb::addr_t functionAddress, lldb::addr_t returnAddress,
34 llvm::Type &prototype,
35 llvm::ArrayRef<ABI::CallArgument> args) const override;
36
38 lldb_private::ValueList &values) const override;
39
42 lldb::ValueObjectSP &new_value) override;
43
46 lldb_private::CompilerType &type) const override;
47
48 // Specialized to work with llvm IR types.
50 llvm::Type &type) const override;
51
52 bool
54
55 bool CreateDefaultUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
56
57 bool RegisterIsVolatile(const lldb_private::RegisterInfo *reg_info) override;
58
60 // Stack call frame address must be 4 byte aligned.
61 return (cfa & 0x3ull) == 0;
62 }
63
65 // Code addresse must be 2 byte aligned.
66 return (pc & 1ull) == 0;
67 }
68
70 GetRegisterInfoArray(uint32_t &count) override;
71
72 //------------------------------------------------------------------
73 // Static Functions
74 //------------------------------------------------------------------
75
76 static void Initialize();
77
78 static void Terminate();
79
81 const lldb_private::ArchSpec &arch);
82
83 static llvm::StringRef GetPluginNameStatic() { return "sysv-arc"; }
84
85 //------------------------------------------------------------------
86 // PluginInterface protocol
87 //------------------------------------------------------------------
88
89 llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
90
91private:
94 lldb_private::CompilerType &ast_type) const;
95
97
98 using lldb_private::RegInfoBasedABI::RegInfoBasedABI; // Call CreateInstance instead.
99
100 using RegisterFileFlag = std::optional<bool>;
102};
103
104#endif // liblldb_ABISysV_arc_h_
lldb::ValueObjectSP GetReturnValueObjectSimple(lldb_private::Thread &thread, lldb_private::CompilerType &ast_type) const
bool GetArgumentValues(lldb_private::Thread &thread, lldb_private::ValueList &values) const override
bool CallFrameAddressIsValid(lldb::addr_t cfa) override
Definition: ABISysV_arc.h:59
bool CodeAddressIsValid(lldb::addr_t pc) override
Definition: ABISysV_arc.h:64
RegisterFileFlag m_is_reg_file_reduced
Definition: ABISysV_arc.h:101
bool RegisterIsVolatile(const lldb_private::RegisterInfo *reg_info) override
const lldb_private::RegisterInfo * GetRegisterInfoArray(uint32_t &count) override
static lldb::ABISP CreateInstance(lldb::ProcessSP process_sp, const lldb_private::ArchSpec &arch)
llvm::StringRef GetPluginName() override
Definition: ABISysV_arc.h:89
static void Initialize()
bool CreateFunctionEntryUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override
bool PrepareTrivialCall(lldb_private::Thread &thread, lldb::addr_t sp, lldb::addr_t functionAddress, lldb::addr_t returnAddress, llvm::ArrayRef< lldb::addr_t > args) const override
~ABISysV_arc() override=default
bool PrepareTrivialCall(lldb_private::Thread &thread, lldb::addr_t sp, lldb::addr_t functionAddress, lldb::addr_t returnAddress, llvm::Type &prototype, llvm::ArrayRef< ABI::CallArgument > args) const override
lldb_private::Status SetReturnValueObject(lldb::StackFrameSP &frame_sp, lldb::ValueObjectSP &new_value) override
size_t GetRedZoneSize() const override
bool CreateDefaultUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override
lldb::ValueObjectSP GetReturnValueObjectImpl(lldb_private::Thread &thread, lldb_private::CompilerType &type) const override
static llvm::StringRef GetPluginNameStatic()
Definition: ABISysV_arc.h:83
bool IsRegisterFileReduced(lldb_private::RegisterContext &reg_ctx) const
std::optional< bool > RegisterFileFlag
Definition: ABISysV_arc.h:100
static void Terminate()
An architecture specification class.
Definition: ArchSpec.h:31
Generic representation of a type in a programming language.
Definition: CompilerType.h:36
An error handling class.
Definition: Status.h:44
std::shared_ptr< lldb_private::ABI > ABISP
Definition: lldb-forward.h:315
std::shared_ptr< lldb_private::StackFrame > StackFrameSP
Definition: lldb-forward.h:420
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP
Definition: lldb-forward.h:480
std::shared_ptr< lldb_private::Process > ProcessSP
Definition: lldb-forward.h:387
uint64_t addr_t
Definition: lldb-types.h:80
Every register is described in detail including its name, alternate name (optional),...