mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-10 16:31:44 +00:00
add coredump RPC
This commit is contained in:
1 parent
278c4ca116
commit
361a70517e
6 files changed
+204
No files matched your search
+16
@@ -256,6 +256,7 @@ extern "C" {
|
||||
#if MG_ENABLE_HEALTH
|
||||
#include <esp_memory_utils.h>
|
||||
#include <esp_core_dump.h>
|
||||
#include <esp_partition.h>
|
||||
#endif
|
||||
|
||||
#define MG_PATH_MAX 128
|
||||
@@ -4491,6 +4492,9 @@ static inline uint16_t esp2mg(esp_reset_reason_t rr) {
|
||||
#define MG_HEALTH_INIT() mg_health_init()
|
||||
extern size_t mg_print_crash_record(mg_pfn_t, void *, va_list *);
|
||||
extern void mg_health_init(void);
|
||||
extern bool mg_health_coredump_begin(size_t *size);
|
||||
extern bool mg_health_coredump_read(size_t offset, void *buf, size_t *len);
|
||||
extern bool mg_health_coredump_end(void);
|
||||
#else
|
||||
#define MG_HEALTH_INIT()
|
||||
static inline int mg_health_reason(void) {
|
||||
@@ -4505,6 +4509,18 @@ static inline size_t mg_print_crash_record(mg_pfn_t fn, void *arg,
|
||||
(void) ap;
|
||||
return mg_xprintf(fn, arg, "{}");
|
||||
}
|
||||
static inline bool mg_health_coredump_begin(size_t *size) {
|
||||
(void) size;
|
||||
return false;
|
||||
}
|
||||
static inline bool mg_health_coredump_read(size_t offset, void *buf,
|
||||
size_t *len) {
|
||||
(void) offset, (void) buf, (void) len;
|
||||
return false;
|
||||
}
|
||||
static inline bool mg_health_coredump_end(void) {
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif
|
||||
// Cloud connector API to https://mdash.net - device management cloud
|
||||
|
||||
Reference in new issue
Block a user