-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
New logging breaks eclipse #35286
Comments
as a quick workaround allowing me to work I have inserted this hack at the bottom of #if defined(__CDT_PARSER__)
#undef LOG_ERR
#undef LOG_WRN
#undef LOG_INF
#undef LOG_DBG
#undef LOG_HEXDUMP_ERR
#undef LOG_HEXDUMP_WRN
#undef LOG_HEXDUMP_INF
#undef LOG_HEXDUMP_DBG
#define LOG_ERR(...) (void) 0
#define LOG_WRN(...) (void) 0
#define LOG_DBG(...) (void) 0
#define LOG_INF(...) (void) 0
#define LOG_HEXDUMP_ERR(...) (void) 0
#define LOG_HEXDUMP_WRN(...) (void) 0
#define LOG_HEXDUMP_DBG(...) (void) 0
#define LOG_HEXDUMP_INF(...) (void) 0
#endif |
@xhpohanka can you send a PR with this proposed fix. |
I can, but it's more a workaround than a fix. @nordic-krch can you please confirm, that the example of expanded code in eclipse is somewhat expected? |
@xhpohanka it is expected that logging macros expands in multiple steps, there are macros applied for each argument in the macro message so if this is a problem for eclipse parser then the best would be to suppress that with what you proposed with additional comment explaining why it is being done. |
@xhpohanka ping on sending a PR. |
Describe the bug
With recent changes in logging API (logging v2) using Eclipse IDE for zephyr projects is almost unpossible.
It could be an issue in eclipse parser but AFAIK it is not much maintained these days.
To Reproduce
Steps to reproduce the behavior:
west build -b MY_BOARD -- -G "Eclipse CDT4 - Ninja"
Additional context
After last cleanup for zephyr 2.6 eclipse states that it needs 674 steps to expand
LOG_ERR
macro and results with around 600 lines below.With first commit where I noticed this behaviour (f1bb20f) there was even around 1900 expand steps and 2000 lines. It is regardless of which logging version is selected through Kconfig.
Originaly it was to about 70 lines.
The text was updated successfully, but these errors were encountered: