Skip to content

debug stream: fix a function name#10640

Open
lyakh wants to merge 2 commits intothesofproject:mainfrom
lyakh:dbgstream
Open

debug stream: fix a function name#10640
lyakh wants to merge 2 commits intothesofproject:mainfrom
lyakh:dbgstream

Conversation

@lyakh
Copy link
Collaborator

@lyakh lyakh commented Mar 20, 2026

Update to the current Zephyr "main" and reduce logging verbosity

lyakh added 2 commits March 20, 2026 17:15
The latest version of
zephyrproject-rtos/zephyr#103449 has changed
the name of set_exception_dump_hook() to
arch_exception_set_dump_hook(). The PR is now merged, so we should
update the function name.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reduce logging verbosity and improve line formatting.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
@lyakh lyakh requested a review from lgirdwood as a code owner March 20, 2026 16:19
Copilot AI review requested due to automatic review settings March 20, 2026 16:19
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the debug stream implementation to align with current Zephyr APIs and lowers runtime log verbosity in debug stream initialization paths.

Changes:

  • Replace the exception dump hook registration function with Zephyr’s arch_exception_set_dump_hook().
  • Reduce log verbosity from LOG_INF to LOG_DBG for several initialization logs.
  • Minor formatting adjustments in debug_stream_slot_init().

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/debug/debug_stream/debug_stream_text_msg.c Switches to the current Zephyr exception dump hook API and reduces init log level.
src/debug/debug_stream/debug_stream_slot.c Reduces init log verbosity and performs small formatting cleanups in slot initialization.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

hdr->section_desc[i].offset = offset;
LOG_INF("sections %u, size %u, offset %u",
i, section_size, offset);
LOG_DBG("sections %u, size %u, offset %u", i, section_size, offset);
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOG_DBG uses "%u" for section_size and offset, which are size_t. This can lead to incorrect output (and warnings/UB on platforms where size_t != unsigned int). Use %zu for size_t values (and cast i appropriately or use an unsigned type).

Suggested change
LOG_DBG("sections %u, size %u, offset %u", i, section_size, offset);
LOG_DBG("sections %d, size %zu, offset %zu", i, section_size, offset);

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants