This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit bb2d70fd12abe8363c5158f2f843d9fbf3117db8 Author: Bowen Wang <[email protected]> AuthorDate: Wed May 20 17:01:45 2026 +0800 drivers/syslog/syslog_rpmsg: dump a full buffer and print the header syslog_rpmsg_dump() printed nothing when head == tail, but after an overwrite that is a full buffer, not an empty one. Dump it in that case too, and print the header address, head, tail and size first. Signed-off-by: Bowen Wang <[email protected]> --- include/nuttx/syslog/syslog_rpmsg.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/nuttx/syslog/syslog_rpmsg.h b/include/nuttx/syslog/syslog_rpmsg.h index 8763cb50745..90f90f40fc5 100644 --- a/include/nuttx/syslog/syslog_rpmsg.h +++ b/include/nuttx/syslog/syslog_rpmsg.h @@ -102,11 +102,14 @@ static inline_function void syslog_rpmsg_dump(FAR const void *buffer) uint32_t tail = header->tail; uint32_t size = header->size; + _alert("Dump syslog rpmsg header:%p head:%" PRIu32 " tail:%" PRIu32 + " size:%" PRIu32 "\n", header, head, tail, size); + if (head > tail) { _alert("%.*s\n", (int)(head - tail), &header->buffer[tail]); } - else if (head < tail) + else { _alert("%.*s%.*s\n", (int)(size - tail), &header->buffer[tail], (int)head, &header->buffer[0]);
