-
Notifications
You must be signed in to change notification settings - Fork 2k
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
macros: RIOT_FILE_RELATIVE printing wrong file name for headers #4053
Comments
Yes... Can anyone think of how to fix this? |
Maybe @Kijewski? |
Bump |
Cantfix? |
For |
Dunno if this even needs a fix. I think the current state is even better than printing the .h file, because when you look at the .c file, you can easily see that this line uses a macro, and follow its macro expansions, but it is extremely difficult to do the reverse, and trace back the expansions that led to this line in the .h file. |
But if you try something like |
(in inline functions I mean) |
Nope, because the debug message will give you the name of the .c file, but the line number from the .h file. |
OK, that's less than optimal :) |
Anyone with a nice solution? |
I fell on a related issue because From my tests, the issue mentioned here is only present for
Another solution is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70268 but only recently added for GCC 8 and as patch for llvm https://reviews.llvm.org/D49466 I tried replacing My solution for this would be to change the way we are currently compiling and always build from
And The downside of this is that
It could remove the need to do This could also help in general to have reproducible builds when different build directories are used, even for the debug symbols and also allow spaces in the path to RIOT. It is something I would be interested to do and would be for more than just the debug macro. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions. |
Judging from the title only, I think @benpicco solved this some time ago |
The macro is gone entirely and I couldn't reproduce the issue any more. |
If
RIOT_FILE_RELATIVE
is located inside a header (e.g. inside a macro or static inline function), it will give the wrong file name, i.e. the name of the including C file instead of the header's file name.The text was updated successfully, but these errors were encountered: