coredump:support arm64 coredump
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
This commit is contained in:
parent
dedb563322
commit
90517b9f11
@ -71,6 +71,7 @@ config ARCH_CHIP_GOLDFISH
|
||||
select ARCH_HAVE_POWEROFF
|
||||
select ARCH_HAVE_RESET
|
||||
select ARCH_NEED_ADDRENV_MAPPING
|
||||
select LIBC_ARCH_ELF_64BIT if LIBC_ARCH_ELF
|
||||
---help---
|
||||
Android GoldFish platform for NuttX (ARMv8a),
|
||||
based on ARM virt board
|
||||
|
@ -25,6 +25,12 @@
|
||||
#ifndef __ARCH_ARM64_INCLUDE_ELF_H
|
||||
#define __ARCH_ARM64_INCLUDE_ELF_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Prototypes
|
||||
****************************************************************************/
|
||||
@ -206,10 +212,24 @@
|
||||
#define PT_AARCH64_ARCHEXT 0x70000000 /* Reserved for architecture compatibility information */
|
||||
#define PT_AARCH64_UNWIND 0x70000001 /* Reserved for exception unwinding tables */
|
||||
|
||||
#define EF_FLAG 0
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
typedef unsigned long elf_greg_t;
|
||||
struct user_pt_regs
|
||||
{
|
||||
uint64_t regs[31];
|
||||
uint64_t sp;
|
||||
uint64_t pc;
|
||||
uint64_t pstate;
|
||||
};
|
||||
|
||||
#define ELF_NGREG (sizeof(struct user_pt_regs) / sizeof(elf_greg_t))
|
||||
typedef elf_greg_t elf_gregset_t[ELF_NGREG];
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
@ -231,7 +231,7 @@ static void elf_emit_tcb_note(FAR struct elf_dumpinfo_s *cinfo,
|
||||
char name[ROUNDUP(CONFIG_TASK_NAME_SIZE, 8)];
|
||||
elf_prstatus_t status;
|
||||
elf_prpsinfo_t info;
|
||||
FAR uint32_t *regs;
|
||||
FAR uintptr_t *regs;
|
||||
Elf_Nhdr nhdr;
|
||||
int i;
|
||||
|
||||
@ -267,17 +267,17 @@ static void elf_emit_tcb_note(FAR struct elf_dumpinfo_s *cinfo,
|
||||
{
|
||||
if (up_interrupt_context())
|
||||
{
|
||||
regs = (FAR uint32_t *)CURRENT_REGS;
|
||||
regs = (FAR uintptr_t *)CURRENT_REGS;
|
||||
}
|
||||
else
|
||||
{
|
||||
up_saveusercontext(g_running_regs);
|
||||
regs = (FAR uint32_t *)g_running_regs;
|
||||
regs = (FAR uintptr_t *)g_running_regs;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
regs = tcb->xcp.regs;
|
||||
regs = (uintptr_t *)tcb->xcp.regs;
|
||||
}
|
||||
|
||||
if (regs != NULL)
|
||||
|
Loading…
x
Reference in New Issue
Block a user