LLDB mainline
Namespaces | Macros | Functions
ABISysV_riscv.cpp File Reference
#include "ABISysV_riscv.h"
#include <array>
#include <limits>
#include "llvm/IR/DerivedTypes.h"
#include "Utility/RISCV_DWARF_Registers.h"
#include "lldb/Core/PluginManager.h"
#include "lldb/Core/Value.h"
#include "lldb/Core/ValueObjectConstResult.h"
#include "lldb/Target/RegisterContext.h"
#include "lldb/Target/StackFrame.h"
#include "lldb/Target/Thread.h"
#include "lldb/Utility/RegisterValue.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, str_name, generic_num)
 
#define DEFINE_REGISTER_STUB(dwarf_num, str_name)    DEFINE_GENERIC_REGISTER_STUB(dwarf_num, str_name, LLDB_INVALID_REGNUM)
 

Functions

static size_t AugmentArgSize (bool is_rv64, size_t size_in_bytes)
 
static size_t TotalArgsSizeInWords (bool is_rv64, const llvm::ArrayRef< ABI::CallArgument > &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 &reg_ctx, llvm::Triple::ArchType machine, uint32_t type_flags, uint32_t byte_size)
 
static ValueObjectSP GetValObjFromFPRegs (Thread &thread, const RegisterContextSP &reg_ctx, llvm::Triple::ArchType machine, uint32_t arch_fp_flags, uint32_t type_flags, uint32_t byte_size)
 
static uint32_t GetGenericNum (llvm::StringRef name)
 

Macro Definition Documentation

◆ DEFINE_GENERIC_REGISTER_STUB

#define DEFINE_GENERIC_REGISTER_STUB (   dwarf_num,
  str_name,
  generic_num 
)
Value:
{ \
DEFINE_REG_NAME(dwarf_num), DEFINE_REG_NAME_STR(str_name), 0, 0, \
{dwarf_num, dwarf_num, generic_num, LLDB_INVALID_REGNUM, dwarf_num}, \
nullptr, nullptr, nullptr, \
}
#define DEFINE_REG_NAME_STR(reg_name)
#define LLDB_INVALID_REGNUM
Definition: lldb-defines.h:87
@ eEncodingInvalid

Definition at line 31 of file ABISysV_riscv.cpp.

◆ DEFINE_REG_NAME

#define DEFINE_REG_NAME (   reg_num)    ConstString(#reg_num).GetCString()

Definition at line 25 of file ABISysV_riscv.cpp.

◆ DEFINE_REG_NAME_STR

#define DEFINE_REG_NAME_STR (   reg_name)    ConstString(reg_name).GetCString()

Definition at line 26 of file ABISysV_riscv.cpp.

◆ DEFINE_REGISTER_STUB

#define DEFINE_REGISTER_STUB (   dwarf_num,
  str_name 
)     DEFINE_GENERIC_REGISTER_STUB(dwarf_num, str_name, LLDB_INVALID_REGNUM)

Definition at line 39 of file ABISysV_riscv.cpp.

Function Documentation

◆ AugmentArgSize()

static size_t AugmentArgSize ( bool  is_rv64,
size_t  size_in_bytes 
)
inlinestatic

Definition at line 146 of file ABISysV_riscv.cpp.

References word_size.

Referenced by TotalArgsSizeInWords().

◆ GetGenericNum()

static uint32_t GetGenericNum ( llvm::StringRef  name)
static

◆ GetValObjFromFPRegs()

static ValueObjectSP GetValObjFromFPRegs ( Thread thread,
const RegisterContextSP reg_ctx,
llvm::Triple::ArchType  machine,
uint32_t  arch_fp_flags,
uint32_t  type_flags,
uint32_t  byte_size 
)
static

◆ GetValObjFromIntRegs()

static ValueObjectSP GetValObjFromIntRegs ( Thread thread,
const RegisterContextSP reg_ctx,
llvm::Triple::ArchType  machine,
uint32_t  type_flags,
uint32_t  byte_size 
)
static

◆ SetInteger()

template<typename T >
static void SetInteger ( Scalar scalar,
uint64_t  raw_value,
bool  is_signed 
)
static

Definition at line 360 of file ABISysV_riscv.cpp.

◆ SetSizedFloat()

static bool SetSizedFloat ( Scalar scalar,
uint64_t  raw_value,
uint8_t  size_in_bytes 
)
static

Definition at line 394 of file ABISysV_riscv.cpp.

Referenced by GetValObjFromFPRegs(), and GetValObjFromIntRegs().

◆ SetSizedInteger()

static bool SetSizedInteger ( Scalar scalar,
uint64_t  raw_value,
uint8_t  size_in_bytes,
bool  is_signed 
)
static

Definition at line 368 of file ABISysV_riscv.cpp.

Referenced by GetValObjFromIntRegs().

◆ TotalArgsSizeInWords()

static size_t TotalArgsSizeInWords ( bool  is_rv64,
const llvm::ArrayRef< ABI::CallArgument > &  args 
)
static