Skip to content
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

Print overhaul #373

Merged
merged 5 commits into from
Jan 2, 2024
Merged

Conversation

oyvindronningstad
Copy link
Collaborator

No description provided.

#endif

#ifdef ZCBOR_VERBOSE
#define zcbor_trace() (zcbor_do_print("bytes left: %zu, byte: 0x%x, elem_count: 0x%zx, err: %d, %s:%d\n",\
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it should have a state param.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added two new commits where this (and more) is changed. The previous commits are unchanged.

zcbor_do_print("%x ", str1[j] != str2[j]);
}
zcbor_do_print("\r\n");
zcbor_do_print("\r\n");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does it intentionally print "\r\n" twice?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, to make it visually separate from the next thing to be printed.

From zcbor_debug.h (deleted) and zcbor_common.h

Signed-off-by: Øyvind Rønningstad <[email protected]>
and zcbor_print_assert() to zcbor_log_assert()

Signed-off-by: Øyvind Rønningstad <[email protected]>
Needs cleaning up of format strings.

Signed-off-by: Øyvind Rønningstad <[email protected]>
Make printout more terse, and make the most printed instance
(value_extract) not print the whole path.
Pass state parameter to macro.
Add more trace printing to zcbor_decode.c, and to errors.

Signed-off-by: Øyvind Rønningstad <[email protected]>
Print from generated code, and include function name

Signed-off-by: Øyvind Rønningstad <[email protected]>
@oyvindronningstad oyvindronningstad merged commit e9ee55e into NordicSemiconductor:main Jan 2, 2024
17 checks passed
@oyvindronningstad oyvindronningstad deleted the print branch January 2, 2024 10:51
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