arch/risc-v/include/elf.f: Support coredump for rv32 and rv64 targets.
Adds the missing elf_gregset_t type definition so pr_regs field can be resolved. Coredumps can be produced for both 32 and 64 bit targets.
This commit is contained in:
parent
eb860566bb
commit
66df96e384
@ -86,6 +86,9 @@
|
|||||||
#define ARCH_ELFDATA 1
|
#define ARCH_ELFDATA 1
|
||||||
#define ARCH_ELF_RELCNT 8
|
#define ARCH_ELF_RELCNT 8
|
||||||
|
|
||||||
|
#define EM_ARCH EM_RISCV
|
||||||
|
#define EF_FLAG 0
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Types
|
* Public Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@ -103,5 +106,13 @@ struct arch_elfdata_s
|
|||||||
};
|
};
|
||||||
typedef struct arch_elfdata_s arch_elfdata_t;
|
typedef struct arch_elfdata_s arch_elfdata_t;
|
||||||
|
|
||||||
|
struct user_pt_regs
|
||||||
|
{
|
||||||
|
uintreg_t regs[32];
|
||||||
|
};
|
||||||
|
|
||||||
|
#define ELF_NGREG (sizeof(struct user_pt_regs) / sizeof(uintreg_t))
|
||||||
|
typedef uintreg_t elf_gregset_t[ELF_NGREG];
|
||||||
|
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
#endif /* __ARCH_RISCV_INCLUDE_ELF_H */
|
#endif /* __ARCH_RISCV_INCLUDE_ELF_H */
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
static const uint16_t g_reg_offs[] =
|
static const uint16_t g_reg_offs[] =
|
||||||
{
|
{
|
||||||
UINT16_MAX, /* x0 */
|
TCB_REG_OFF(REG_EPC_NDX),
|
||||||
TCB_REG_OFF(REG_X1_NDX),
|
TCB_REG_OFF(REG_X1_NDX),
|
||||||
TCB_REG_OFF(REG_X2_NDX),
|
TCB_REG_OFF(REG_X2_NDX),
|
||||||
TCB_REG_OFF(REG_X3_NDX),
|
TCB_REG_OFF(REG_X3_NDX),
|
||||||
@ -66,7 +66,6 @@ static const uint16_t g_reg_offs[] =
|
|||||||
TCB_REG_OFF(REG_X29_NDX),
|
TCB_REG_OFF(REG_X29_NDX),
|
||||||
TCB_REG_OFF(REG_X30_NDX),
|
TCB_REG_OFF(REG_X30_NDX),
|
||||||
TCB_REG_OFF(REG_X31_NDX),
|
TCB_REG_OFF(REG_X31_NDX),
|
||||||
TCB_REG_OFF(REG_EPC_NDX),
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
# ifdef CONFIG_ARCH_FPU
|
# ifdef CONFIG_ARCH_FPU
|
||||||
|
Loading…
Reference in New Issue
Block a user