LLDB mainline
ABISysV_msp430.h
Go to the documentation of this file.
1//===-- ABISysV_msp430.h ----------------------------------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#ifndef LLDB_SOURCE_PLUGINS_ABI_MSP430_ABISYSV_MSP430_H
11#define LLDB_SOURCE_PLUGINS_ABI_MSP430_ABISYSV_MSP430_H
12
13#include "lldb/Target/ABI.h"
14#include "lldb/lldb-private.h"
15
17public:
18 ~ABISysV_msp430() override = default;
19
20 size_t GetRedZoneSize() const override;
21
23 lldb::addr_t functionAddress,
24 lldb::addr_t returnAddress,
25 llvm::ArrayRef<lldb::addr_t> args) const override;
26
28 lldb_private::ValueList &values) const override;
29
32 lldb::ValueObjectSP &new_value) override;
33
36 lldb_private::CompilerType &type) const override;
37
38 bool
40
41 bool CreateDefaultUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
42
43 bool RegisterIsVolatile(const lldb_private::RegisterInfo *reg_info) override;
44
46 // Make sure the stack call frame addresses are 2 byte aligned
47 // and not zero
48 if (cfa & 0x01 || cfa == 0)
49 return false;
50 return true;
51 }
52
53 bool CodeAddressIsValid(lldb::addr_t pc) override { return true; }
54
56 GetRegisterInfoArray(uint32_t &count) override;
57
58 uint64_t GetStackFrameSize() override { return 512; }
59
60 //------------------------------------------------------------------
61 // Static Functions
62 //------------------------------------------------------------------
63
64 static void Initialize();
65
66 static void Terminate();
67
69 const lldb_private::ArchSpec &arch);
70
71 static llvm::StringRef GetPluginNameStatic() { return "sysv-msp430"; }
72
73 // PluginInterface protocol
74
75 llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
76
77protected:
79
82 lldb_private::CompilerType &ast_type) const;
83
85
86private:
87 using lldb_private::RegInfoBasedABI::RegInfoBasedABI;
88};
89
90#endif // LLDB_SOURCE_PLUGINS_ABI_MSP430_ABISYSV_MSP430_H
lldb::ValueObjectSP GetReturnValueObjectSimple(lldb_private::Thread &thread, lldb_private::CompilerType &ast_type) const
lldb_private::Status SetReturnValueObject(lldb::StackFrameSP &frame_sp, lldb::ValueObjectSP &new_value) override
bool RegisterIsCalleeSaved(const lldb_private::RegisterInfo *reg_info)
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
bool GetArgumentValues(lldb_private::Thread &thread, lldb_private::ValueList &values) const override
llvm::StringRef GetPluginName() override
static llvm::StringRef GetPluginNameStatic()
~ABISysV_msp430() override=default
uint64_t GetStackFrameSize() override
bool CreateFunctionEntryUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override
bool RegisterIsVolatile(const lldb_private::RegisterInfo *reg_info) override
static lldb::ABISP CreateInstance(lldb::ProcessSP process_sp, const lldb_private::ArchSpec &arch)
lldb::ValueObjectSP GetReturnValueObjectImpl(lldb_private::Thread &thread, lldb_private::CompilerType &type) const override
const lldb_private::RegisterInfo * GetRegisterInfoArray(uint32_t &count) override
size_t GetRedZoneSize() const override
bool CodeAddressIsValid(lldb::addr_t pc) override
bool CallFrameAddressIsValid(lldb::addr_t cfa) override
void CreateRegisterMapIfNeeded()
bool CreateDefaultUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override
static void Initialize()
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:115
std::shared_ptr< lldb_private::ABI > ABISP
Definition: lldb-forward.h:317
std::shared_ptr< lldb_private::StackFrame > StackFrameSP
Definition: lldb-forward.h:424
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP
Definition: lldb-forward.h:484
std::shared_ptr< lldb_private::Process > ProcessSP
Definition: lldb-forward.h:389
uint64_t addr_t
Definition: lldb-types.h:80
Every register is described in detail including its name, alternate name (optional),...