Layout of a core dump image, parsed by tools/readcore.py.
More...
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.
◆ pbl_coredump_image_hdr
| struct pbl_coredump_image_hdr |
| 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 |
| 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 |
◆ 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. |
◆ PBL_COREDUMP_CHUNK_EXTRA_REG
| #define PBL_COREDUMP_CHUNK_EXTRA_REG 3 |
◆ PBL_COREDUMP_CHUNK_MEMORY
| #define PBL_COREDUMP_CHUNK_MEMORY 4 |
◆ PBL_COREDUMP_CHUNK_RAM
| #define PBL_COREDUMP_CHUNK_RAM 1 |
◆ 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 |
◆ PBL_COREDUMP_VERSION
| #define PBL_COREDUMP_VERSION 1 |