LLDB mainline
|
#include "ABISysV_loongarch.h"
#include <array>
#include <limits>
#include <sstream>
#include "llvm/IR/DerivedTypes.h"
#include "llvm/Support/MathExtras.h"
#include "Utility/LoongArch_DWARF_Registers.h"
#include "lldb/Core/PluginManager.h"
#include "lldb/Core/Value.h"
#include "lldb/Target/RegisterContext.h"
#include "lldb/Target/StackFrame.h"
#include "lldb/Target/Thread.h"
#include "lldb/Utility/LLDBLog.h"
#include "lldb/Utility/RegisterValue.h"
#include "lldb/ValueObject/ValueObjectConstResult.h"
Go to the source code of this file.
Namespaces | |
namespace | dwarf |
Macros | |
#define | DEFINE_REG_NAME(reg_num) ConstString(#reg_num).GetCString() |
#define | DEFINE_REG_NAME_STR(reg_name) ConstString(reg_name).GetCString() |
#define | DEFINE_GENERIC_REGISTER_STUB(dwarf_num, generic_num) |
#define | DEFINE_REGISTER_STUB(dwarf_num) DEFINE_GENERIC_REGISTER_STUB(dwarf_num, LLDB_INVALID_REGNUM) |
Functions | |
static bool | UpdateRegister (RegisterContext *reg_ctx, const lldb::RegisterKind reg_kind, const uint32_t reg_num, const addr_t value) |
static void | LogInitInfo (Log &log, const Thread &thread, addr_t sp, addr_t func_addr, addr_t return_addr, const llvm::ArrayRef< addr_t > args) |
template<typename T > | |
static void | SetInteger (Scalar &scalar, uint64_t raw_value, bool is_signed) |
static bool | SetSizedInteger (Scalar &scalar, uint64_t raw_value, uint8_t size_in_bytes, bool is_signed) |
static bool | SetSizedFloat (Scalar &scalar, uint64_t raw_value, uint8_t size_in_bytes) |
static ValueObjectSP | GetValObjFromIntRegs (Thread &thread, const RegisterContextSP ®_ctx, llvm::Triple::ArchType machine, uint32_t type_flags, uint32_t byte_size) |
static ValueObjectSP | GetValObjFromFPRegs (Thread &thread, const RegisterContextSP ®_ctx, llvm::Triple::ArchType machine, uint32_t type_flags, uint32_t byte_size) |
static uint32_t | GetGenericNum (llvm::StringRef name) |
Variables | |
static constexpr size_t | g_regs_for_args_count = 8U |
#define DEFINE_GENERIC_REGISTER_STUB | ( | dwarf_num, | |
generic_num | |||
) |
Definition at line 34 of file ABISysV_loongarch.cpp.
#define DEFINE_REG_NAME | ( | reg_num | ) | ConstString(#reg_num).GetCString() |
Definition at line 28 of file ABISysV_loongarch.cpp.
#define DEFINE_REG_NAME_STR | ( | reg_name | ) | ConstString(reg_name).GetCString() |
Definition at line 29 of file ABISysV_loongarch.cpp.
#define DEFINE_REGISTER_STUB | ( | dwarf_num | ) | DEFINE_GENERIC_REGISTER_STUB(dwarf_num, LLDB_INVALID_REGNUM) |
Definition at line 48 of file ABISysV_loongarch.cpp.
|
static |
Definition at line 626 of file ABISysV_loongarch.cpp.
References LLDB_INVALID_REGNUM, LLDB_REGNUM_GENERIC_ARG1, LLDB_REGNUM_GENERIC_ARG2, LLDB_REGNUM_GENERIC_ARG3, LLDB_REGNUM_GENERIC_ARG4, LLDB_REGNUM_GENERIC_ARG5, LLDB_REGNUM_GENERIC_ARG6, LLDB_REGNUM_GENERIC_ARG7, LLDB_REGNUM_GENERIC_ARG8, LLDB_REGNUM_GENERIC_FP, LLDB_REGNUM_GENERIC_PC, LLDB_REGNUM_GENERIC_RA, and LLDB_REGNUM_GENERIC_SP.
Referenced by ABISysV_loongarch::AugmentRegisterInfo(), and ABISysV_riscv::AugmentRegisterInfo().
|
static |
Definition at line 452 of file ABISysV_loongarch.cpp.
References lldb_private::ValueObjectConstResult::Create(), lldb_private::Value::GetScalar(), lldb_private::Thread::GetStackFrameAtIndex(), GetValObjFromIntRegs(), SetSizedFloat(), and lldb_private::Value::SetValueType().
Referenced by ABISysV_riscv::GetReturnValueObjectImpl(), ABISysV_loongarch::GetReturnValueObjectSimple(), and ABISysV_riscv::GetReturnValueObjectSimple().
|
static |
Definition at line 377 of file ABISysV_loongarch.cpp.
References lldb_private::ValueObjectConstResult::Create(), lldb::eRegisterKindGeneric, error(), lldb_private::RegisterValue::GetAsMemoryData(), lldb_private::Thread::GetProcess(), lldb_private::Value::GetRegisterInfo(), lldb_private::Value::GetScalar(), lldb_private::Thread::GetStackFrameAtIndex(), LLDB_REGNUM_GENERIC_ARG1, LLDB_REGNUM_GENERIC_ARG2, lldb_private::Value::SetBytes(), SetSizedFloat(), SetSizedInteger(), lldb_private::Value::SetValueType(), and UINT32_MAX.
Referenced by ABISysV_riscv::GetReturnValueObjectImpl(), ABISysV_loongarch::GetReturnValueObjectSimple(), ABISysV_riscv::GetReturnValueObjectSimple(), and GetValObjFromFPRegs().
|
static |
Definition at line 178 of file ABISysV_loongarch.cpp.
References lldb_private::UserID::GetID(), lldb_private::Log::PutString(), and sp.
Referenced by ABISysV_loongarch::PrepareTrivialCall().
|
static |
Definition at line 324 of file ABISysV_loongarch.cpp.
|
static |
Definition at line 359 of file ABISysV_loongarch.cpp.
Referenced by GetValObjFromFPRegs(), and GetValObjFromIntRegs().
|
static |
Definition at line 333 of file ABISysV_loongarch.cpp.
Referenced by GetValObjFromIntRegs().
|
static |
Definition at line 162 of file ABISysV_loongarch.cpp.
References lldb_private::GetLog(), lldb_private::RegisterContext::GetRegisterInfo(), LLDB_LOG, lldb_private::RegisterInfo::name, and lldb_private::RegisterContext::WriteRegisterFromUnsigned().
Referenced by ABISysV_loongarch::PrepareTrivialCall().
|
staticconstexpr |
Definition at line 136 of file ABISysV_loongarch.cpp.
Referenced by ABISysV_loongarch::PrepareTrivialCall().