Zephyr API 3.6.99
|
Coredump APIs More...
Data Structures | |
struct | coredump_cmd_copy_arg |
Coredump copy command (COREDUMP_CMD_COPY_STORED_DUMP) argument definition. More... | |
Enumerations | |
enum | coredump_query_id { COREDUMP_QUERY_GET_ERROR , COREDUMP_QUERY_HAS_STORED_DUMP , COREDUMP_QUERY_GET_STORED_DUMP_SIZE , COREDUMP_QUERY_MAX } |
Query ID. More... | |
enum | coredump_cmd_id { COREDUMP_CMD_CLEAR_ERROR , COREDUMP_CMD_VERIFY_STORED_DUMP , COREDUMP_CMD_ERASE_STORED_DUMP , COREDUMP_CMD_COPY_STORED_DUMP , COREDUMP_CMD_INVALIDATE_STORED_DUMP , COREDUMP_CMD_MAX } |
Command ID. More... | |
Functions | |
static void | coredump (unsigned int reason, const struct arch_esf *esf, struct k_thread *thread) |
Perform coredump. | |
static void | coredump_memory_dump (uintptr_t start_addr, uintptr_t end_addr) |
Dump memory region. | |
static void | coredump_buffer_output (uint8_t *buf, size_t buflen) |
Output the buffer via coredump. | |
static int | coredump_query (enum coredump_query_id query_id, void *arg) |
Perform query on coredump subsystem. | |
static int | coredump_cmd (enum coredump_cmd_id query_id, void *arg) |
Perform command on coredump subsystem. | |
Coredump APIs
enum coredump_cmd_id |
#include <zephyr/debug/coredump.h>
Command ID.
enum coredump_query_id |
#include <zephyr/debug/coredump.h>
Query ID.
|
inlinestatic |
#include <zephyr/debug/coredump.h>
Perform coredump.
Normally, this is called inside z_fatal_error() to generate coredump when a fatal error is encountered. This can also be called on demand whenever a coredump is desired.
reason | Reason for the fatal error |
esf | Exception context |
thread | Thread information to dump |
#include <zephyr/debug/coredump.h>
Output the buffer via coredump.
This outputs the buffer of byte array to the coredump backend. For example, this can be called to output the coredump section containing registers, or a section for memory dump.
buf | Buffer to be send to coredump output |
buflen | Buffer length |
|
inlinestatic |
#include <zephyr/debug/coredump.h>
Perform command on coredump subsystem.
Perform command on coredump subsystem, for example, output the stored coredump via logging.
[in] | cmd_id | Command ID |
[in,out] | arg | Pointer to argument for exchanging information |
#include <zephyr/debug/coredump.h>
Dump memory region.
start_addr | Start address of memory region to be dumped |
end_addr | End address of memory region to be dumped |
|
inlinestatic |
#include <zephyr/debug/coredump.h>
Perform query on coredump subsystem.
Query the coredump subsystem for information, for example, if there is an error.
[in] | query_id | Query ID |
[in,out] | arg | Pointer to argument for exchanging information |