PebbleOS v4.45.0-162-g88634f016
Loading...
Searching...
No Matches
coredump.h File Reference
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <pbl/kernel/compiler.h>
#include <pbl/kernel/section.h>

Data Structures

struct  pbl_coredump_region
 Memory region to dump. More...
 
struct  pbl_coredump_stored
 Dump stored by a backend. More...
 

Macros

#define PBL_COREDUMP__REGION_SECTION(_name)    PBL_ALIGNED(4) PBL_SECTION(".pbl_coredump_regions." #_name)
 
#define PBL_COREDUMP_REGION_DEFINE(_name, _start, _size)
 Define a memory region to dump.
 
#define PBL_COREDUMP_LATE_REGION_DEFINE(_name, _start, _size, _prepare)
 Define a memory region that is dumped after the threads.
 

Functions

void pbl_coredump_trigger (bool forced)
 Write a core dump and reset.
 
void pbl_coredump_platform_prepare (struct pbl_coredump_metadata *metadata)
 Prepare the system for a dump, implemented by the platform.
 
int pbl_coredump_stored_find (bool unread_only, struct pbl_coredump_stored *stored)
 Find the most recent stored dump of the first backend that has one.
 
int pbl_coredump_stored_size (const struct pbl_coredump_stored *stored, uint32_t *size)
 Get the size of a stored dump.
 
int pbl_coredump_stored_read (const struct pbl_coredump_stored *stored, uint32_t offset, void *buf, size_t len)
 Read a stored dump.
 
int pbl_coredump_stored_mark_read (const struct pbl_coredump_stored *stored)
 Mark a stored dump as read, so it can be replaced.