-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
logging: dictionary: Support unsigned integers #79228
logging: dictionary: Support unsigned integers #79228
Conversation
Add unsigned integer support to the log parser. This does not change the underlying log format, it only allows the log parser to more accurately read the log format. Signed-off-by: Georges Oates_Larsen <[email protected]>
Adding DNM until @plskeggs has a chance to review |
Keeping DNM until I do a little extra testing for good measure |
I experienced some technical difficulties tonight. I will do the thorough testing tomorrow. |
I have now tested the following function with a variety of input numbers: static void test_number(unsigned long long int num) {
LOG_ERR("TEST c: %c", (char)num);
LOG_ERR("TEST d: %d", (int)num);
LOG_ERR("TEST ld: %ld", (long int)num);
LOG_ERR("TEST lld: %lld", (long long int)num);
LOG_ERR("TEST i: %i", (int)num);
LOG_ERR("TEST li: %li", (long int)num);
LOG_ERR("TEST lli: %lli", (long long int)num);
LOG_ERR("TEST o: %o", (int)num);
LOG_ERR("TEST lo: %lo", (long int)num);
LOG_ERR("TEST llo: %llo", (long long int)num);
LOG_ERR("TEST u: %u", (unsigned int)num);
LOG_ERR("TEST lu: %lu", (unsigned long int)num);
LOG_ERR("TEST llu: %llu", (unsigned long long int)num);
LOG_ERR("TEST x: %u", (unsigned int)num);
LOG_ERR("TEST lx: %lu", (unsigned long int)num);
LOG_ERR("TEST llx: %llu", (unsigned long long int)num);
LOG_ERR("TEST X: %u", (unsigned int)num);
LOG_ERR("TEST lX: %lu", (unsigned long int)num);
LOG_ERR("TEST llX: %llu", (unsigned long long int)num);
} Both binary logs and UART logs agree on all inputs I've provided with a single exception: Invalid char values are just printed as Which TBH I think is fine. |
So, to be clear, ready for merge |
Add unsigned integer support to the log parser.
This does not change the underlying log format,
it only allows the log parser to more accurately
read the log format.