-
Notifications
You must be signed in to change notification settings - Fork 22
Debug macro fix #250
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
base: main
Are you sure you want to change the base?
Debug macro fix #250
Conversation
src/wh_utils.c
Outdated
| if ((count % HEXDUMP_BYTES_PER_LINE) == 0) { | ||
| linePos = 0; | ||
| } | ||
| linePos += snprintf(line + linePos, sizeof(line) - linePos, "%02X ", *ptr); |
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.
so you are reintroducing printfs here? Seems to defeat the purpose of having the WOLFHSM_CFG_PRINTF macro
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.
The snprintf was for formatting, I will change it. There are some other snprintf occurrences as well still in the code base for smilier reasons. Working on change now.
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.
Changing to manually converting bytes instead of relying on snprintf
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.
I think if we use them in other places and they are legit needed then we should probably have our own internal macro for it. Preference to removing the need for it unless absolutely necessary but it might be a bigger change
Fix test verbose macros to use WOLFHSM_CFG_DEBUG_VERBOSE
in all test files to match Makefile DEBUG_VERBOSE=1 variable
to prevent interleaved output