microfmt
Zero-allocation C++ formatting for constrained environments
Loading...
Searching...
No Matches
Public Types | Static Public Member Functions | Static Public Attributes | List of all members
microfmt::riscv32_abi_traits Struct Reference

DWARF unwind ABI traits for RISC-V 32-bit (RV32). More...

#include <dwarf_abi.hpp>

Public Types

using register_type = uint32_t
 Register value width.
 
using register_traits = dwarf::riscv::register_traits
 Architecture register name/index catalog.
 
using gdb_register_traits = gdb::register_traits< gdb::tags::riscv32 >
 GDB-to-DWARF register mapping.
 

Static Public Member Functions

static constexpr bool is_return_address_register (uint32_t reg) noexcept
 Reports whether a register holds the return address.
 
static constexpr bool is_frame_pointer_register (uint32_t reg) noexcept
 Reports whether a register is a frame pointer.
 
static constexpr uintptr_t normalize_pc (uintptr_t raw_ra) noexcept
 

Static Public Attributes

static constexpr size_t pointer_size = 4
 Pointer size in bytes.
 
static constexpr uint32_t sp_reg = dwarf::riscv::sp
 SP register number.
 
static constexpr uint32_t ra_reg = dwarf::riscv::ra
 RA register number.
 
static constexpr uint32_t fp_reg = dwarf::riscv::fp
 FP register number.
 
static constexpr ptrdiff_t fp_slot_offset = 0
 
static constexpr ptrdiff_t ra_slot_offset = 4
 

Detailed Description

DWARF unwind ABI traits for RISC-V 32-bit (RV32).

Member Typedef Documentation

◆ gdb_register_traits

GDB-to-DWARF register mapping.

◆ register_traits

Architecture register name/index catalog.

◆ register_type

Register value width.

Member Function Documentation

◆ is_frame_pointer_register()

static constexpr bool microfmt::riscv32_abi_traits::is_frame_pointer_register ( uint32_t  reg)
inlinestaticconstexprnoexcept

Reports whether a register is a frame pointer.

Parameters
regDWARF register number.
Returns
true for x8 (s0/fp).

◆ is_return_address_register()

static constexpr bool microfmt::riscv32_abi_traits::is_return_address_register ( uint32_t  reg)
inlinestaticconstexprnoexcept

Reports whether a register holds the return address.

Parameters
regDWARF register number.
Returns
true for x1 (ra).

◆ normalize_pc()

static constexpr uintptr_t microfmt::riscv32_abi_traits::normalize_pc ( uintptr_t  raw_ra)
inlinestaticconstexprnoexcept

Member Data Documentation

◆ fp_reg

constexpr uint32_t microfmt::riscv32_abi_traits::fp_reg = dwarf::riscv::fp
staticconstexpr

FP register number.

◆ fp_slot_offset

constexpr ptrdiff_t microfmt::riscv32_abi_traits::fp_slot_offset = 0
staticconstexpr

◆ pointer_size

constexpr size_t microfmt::riscv32_abi_traits::pointer_size = 4
staticconstexpr

Pointer size in bytes.

◆ ra_reg

constexpr uint32_t microfmt::riscv32_abi_traits::ra_reg = dwarf::riscv::ra
staticconstexpr

RA register number.

◆ ra_slot_offset

constexpr ptrdiff_t microfmt::riscv32_abi_traits::ra_slot_offset = 4
staticconstexpr

◆ sp_reg

constexpr uint32_t microfmt::riscv32_abi_traits::sp_reg = dwarf::riscv::sp
staticconstexpr

SP register number.


The documentation for this struct was generated from the following file: