debug stream: fix a function name#10640
Open
lyakh wants to merge 2 commits intothesofproject:mainfrom
Open
Conversation
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>
Contributor
There was a problem hiding this comment.
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_INFtoLOG_DBGfor 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); |
There was a problem hiding this comment.
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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update to the current Zephyr "main" and reduce logging verbosity