-
-
Notifications
You must be signed in to change notification settings - Fork 781
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Missing RISC-V debug guard #1684
Conversation
…ROTO()` lines in `riscv32_mem_write()`
Explanation:
target/riscv32.c: In function 'riscv32_mem_write':
target/riscv32.c:580:30: error: unused variable 'data' [-Werror=unused-variable]
580 | const uint8_t *const data = (const uint8_t *)src;
| ^~~~ which this PR fixes by gating the code block with mentioned variable and DEBUG_PROTO on
target/riscv32.c: In function 'riscv32_mem_read':
target/riscv32.c:565:30: error: unused variable 'data' [-Werror=unused-variable]
565 | const uint8_t *const data = (const uint8_t *)dest;
| ^~~~
target/riscv32.c: In function 'riscv32_mem_write':
target/riscv32.c:580:30: error: unused variable 'data' [-Werror=unused-variable]
580 | const uint8_t *const data = (const uint8_t *)src;
| ^~~~ because DEBUG_PROTO is a no-op on adapters. This no longer allows emitting up to DEBUG_INFO verbosity messages from adapters for diagnosing issues specific to BMF and not BMDA. Putting a Note that all prior use of DEBUG_PROTO was contained in |
Yes, guarding on What we're going to do now we understand the nature of those second two build failures is to create new macros that define if their respective DEBUG_* macro is defined to be a no-op or not, and guard the assignments using those. (It was not made clear on Discord that you meant you'd done a firmware build with those two enables, so we didn't twig that the guard this provides is insufficient due to how DEBUG_PROTO() is defined for the firmware.) |
…led and DEBUG_PROTO() is still defined to do nothing
That case should now be handled with the new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Detailed description
This PR addresses an oversight of #1683 resulting in a build error when
ENABLE_DEBUG
is not true.Your checklist for this pull request
make PROBE_HOST=native
)make PROBE_HOST=hosted
)Closing issues