PebbleOS v4.45.0-162-g88634f016
Loading...
Searching...
No Matches
Architecture interface

What an architecture implements to support core dumps. More...

Functions

void arch_coredump_trigger (void)
 Stop the system and enter pbl_coredump_arch_handler().
 
void arch_coredump_thread_regs (uint32_t regs[PBL_THREAD_REG_COUNT])
 Get the registers of the thread that was running.
 
bool arch_coredump_exception_regs (uint32_t regs[PBL_THREAD_REG_COUNT])
 Get the registers of the exception that was running, if any.
 
const struct pbl_coredump_extra_regs * arch_coredump_extra_regs (void)
 Get the special registers at the time of the dump.
 
void pbl_coredump_arch_handler (void)
 Write the core dump and reset.
 

Detailed Description

What an architecture implements to support core dumps.

An architecture selects ARCH_HAS_COREDUMP and implements these functions. Except for arch_coredump_trigger(), they are called from pbl_coredump_arch_handler().

Function Documentation

◆ arch_coredump_exception_regs()

bool arch_coredump_exception_regs ( uint32_t  regs[PBL_THREAD_REG_COUNT])

Get the registers of the exception that was running, if any.

If it faulted, these are its registers at the fault, not those of the fault handler.

Parameters
[out]regsRegisters, indexed by pbl_thread_reg.
Returns
true if an exception was running.

◆ arch_coredump_extra_regs()

const struct pbl_coredump_extra_regs * arch_coredump_extra_regs ( void  )

Get the special registers at the time of the dump.

◆ arch_coredump_thread_regs()

void arch_coredump_thread_regs ( uint32_t  regs[PBL_THREAD_REG_COUNT])

Get the registers of the thread that was running.

If the thread faulted, these are its registers at the fault, not those of the fault handler.

Parameters
[out]regsRegisters, indexed by pbl_thread_reg.

◆ arch_coredump_trigger()

void arch_coredump_trigger ( void  )

Stop the system and enter pbl_coredump_arch_handler().

Returns only if that failed.

◆ pbl_coredump_arch_handler()

void pbl_coredump_arch_handler ( void  )

Write the core dump and reset.

Called by the architecture once its state is captured, with OS services unavailable.