nRF Connect SDK API 3.3.99
Loading...
Searching...
No Matches

◆ log_rpc_get_crash_dump()

int log_rpc_get_crash_dump ( size_t offset,
uint8_t * buffer,
size_t buffer_length )

#include <include/logging/log_rpc.h>

Retrieves the crash dump saved on the remote device.

This function issues an nRF RPC command to obtain a subsequent chunk of the last crash dump saved on the remote device, and then it puts the received chunk into the provided buffer.

The remote may either send the entire dump in one go, if it fits within the output buffer, or it may send a chunk of the log. Therefore, the caller should repeatedly call this function, with an increasing offset, until it returns 0 (indicating no more data), or a negative value (indicated an error).

Parameters
offsetCrash log offset.
bufferOutput buffer to copy the received log chunk.
buffer_lengthOutput buffer length.
Returns
The number of characters copied into the output buffer.
-errno Indicates failure.