PebbleOS v4.45.0-162-g88634f016
Loading...
Searching...
No Matches
Image format

Layout of a core dump image, parsed by tools/readcore.py. More...

Data Structures

struct  pbl_coredump_image_hdr
 Start of an image. More...
 
struct  pbl_coredump_chunk_hdr
 Start of a chunk. More...
 
struct  pbl_coredump_memory_hdr
 Start of the payload of a PBL_COREDUMP_CHUNK_MEMORY chunk. More...
 
struct  pbl_coredump_thread
 Payload of a PBL_COREDUMP_CHUNK_THREAD chunk. More...
 
struct  pbl_coredump_extra_regs
 Payload of a PBL_COREDUMP_CHUNK_EXTRA_REG chunk: special registers. More...
 

Macros

#define PBL_COREDUMP_MAGIC   0xF00DCAFE
 Value of pbl_coredump_image_hdr::magic.
 
#define PBL_COREDUMP_VERSION   1
 Value of pbl_coredump_image_hdr::version.
 
#define PBL_COREDUMP_NUM_REGISTERS   17
 Number of core registers in a record: r0-r12, sp, lr, pc and xpsr.
 
#define PBL_COREDUMP_THREAD_NAME_SIZE   16
 Size of pbl_coredump_thread::name in bytes, including the NUL terminator.
 
#define PBL_COREDUMP_CHUNK_TERMINATOR   0xFFFFFFFF
 Ends the image; has no payload.
 
#define PBL_COREDUMP_CHUNK_RAM   1
 Deprecated: RAM, now in PBL_COREDUMP_CHUNK_MEMORY.
 
#define PBL_COREDUMP_CHUNK_THREAD   2
 A pbl_coredump_thread.
 
#define PBL_COREDUMP_CHUNK_EXTRA_REG   3
 A pbl_coredump_extra_regs.
 
#define PBL_COREDUMP_CHUNK_MEMORY   4
 A pbl_coredump_memory_hdr and the memory contents.
 

Detailed Description

Layout of a core dump image, parsed by tools/readcore.py.

An image is a pbl_coredump_image_hdr followed by chunks, each a pbl_coredump_chunk_hdr and a payload, up to one with the key PBL_COREDUMP_CHUNK_TERMINATOR. All fields are little-endian. Registers are stored in the order r0-r12, sp, lr, pc, xpsr, the same order as pbl_thread_reg.


Data Structure Documentation

◆ pbl_coredump_image_hdr

struct pbl_coredump_image_hdr

Start of an image.

Data Fields
uint8_t build_id[64] Firmware build ID, NUL-terminated.
uint32_t core_number: 8 See include/pebbleos/chip_id.h.
uint32_t magic PBL_COREDUMP_MAGIC.
uint8_t serial_number[16] Device serial number, NUL-terminated.
uint32_t time_stamp Wall clock time of the dump, in seconds.
uint32_t version: 24 PBL_COREDUMP_VERSION.

◆ pbl_coredump_chunk_hdr

struct pbl_coredump_chunk_hdr

Start of a chunk.

Data Fields
uint32_t key PBL_COREDUMP_CHUNK_* key.
uint32_t size Size of the payload that follows.

◆ pbl_coredump_memory_hdr

struct pbl_coredump_memory_hdr

Start of the payload of a PBL_COREDUMP_CHUNK_MEMORY chunk.

Data Fields
uint32_t start Address of the memory that follows.

◆ pbl_coredump_thread

struct pbl_coredump_thread

Payload of a PBL_COREDUMP_CHUNK_THREAD chunk.

One per thread, plus an "ISR" pseudo-thread when an exception was running.

Data Fields
uint32_t id Thread identifier: the thread object's address, 1 for the "ISR" pseudo-thread.
int8_t name[PBL_COREDUMP_THREAD_NAME_SIZE] Thread name, NUL-terminated.
uint32_t registers[PBL_COREDUMP_NUM_REGISTERS] Registers r0-r12, sp, lr, pc, xpsr; those that cannot be recovered read 0xa5a5a5a5.
uint8_t running 1 if this thread was running when the dump was taken, else 0.

◆ pbl_coredump_extra_regs

struct pbl_coredump_extra_regs

Payload of a PBL_COREDUMP_CHUNK_EXTRA_REG chunk: special registers.

Data Fields
uint8_t basepri BASEPRI register.
uint8_t control CONTROL register.
uint8_t faultmask FAULTMASK register.
uint32_t msp Main stack pointer.
uint8_t primask PRIMASK register.
uint32_t psp Process stack pointer.

Macro Definition Documentation

◆ PBL_COREDUMP_CHUNK_EXTRA_REG

#define PBL_COREDUMP_CHUNK_EXTRA_REG   3

◆ PBL_COREDUMP_CHUNK_MEMORY

#define PBL_COREDUMP_CHUNK_MEMORY   4

A pbl_coredump_memory_hdr and the memory contents.

◆ PBL_COREDUMP_CHUNK_RAM

#define PBL_COREDUMP_CHUNK_RAM   1

Deprecated: RAM, now in PBL_COREDUMP_CHUNK_MEMORY.

◆ PBL_COREDUMP_CHUNK_TERMINATOR

#define PBL_COREDUMP_CHUNK_TERMINATOR   0xFFFFFFFF

Ends the image; has no payload.

◆ PBL_COREDUMP_CHUNK_THREAD

#define PBL_COREDUMP_CHUNK_THREAD   2

◆ PBL_COREDUMP_MAGIC

#define PBL_COREDUMP_MAGIC   0xF00DCAFE

◆ PBL_COREDUMP_NUM_REGISTERS

#define PBL_COREDUMP_NUM_REGISTERS   17

Number of core registers in a record: r0-r12, sp, lr, pc and xpsr.

◆ PBL_COREDUMP_THREAD_NAME_SIZE

#define PBL_COREDUMP_THREAD_NAME_SIZE   16

Size of pbl_coredump_thread::name in bytes, including the NUL terminator.

◆ PBL_COREDUMP_VERSION

#define PBL_COREDUMP_VERSION   1