While debugging, moving the mouse over a text item makes CB show the evaluation result of the text item in a tooltip - if selected so. #define's are expanded to 'No symbol <symbolname> in current context', whereas CB appears to know the definition of the #define as it shows it for less than a tiny second in the tooltip until it is overridden as described.
Expectation: If the definition of a #define is known to CB, then while debugging the tooltip shows the definition instead of the default text (no symbol ... in the current context).
In-fact, we have discussed this issue already in our C::B forum. (If I remember correctly, some years ago) Because we have two different tooltips from two different plugins(the debugger plugin and the codecompletion plugin), a former tooltip will be overwritten by a new tip.
You are wrong. This has not been discussed.
For the record this is probably possible with the info macro commands of gdb.
This has nothing to do with CodeCompletion.
The text "No symbol <symbolname> in current context" comes from the GDB debugger plugin. While "CB appears to know the definition of the #define as it shows it for less than a tiny second in the tooltip" This tooltip is shown by the CC plugin.
When debugging, for example:
When the mouse hover on the "AAA" of the statement "b=AAA;", does GDB debugger plugin knows the "AAA" is a macro definition, then query some "macro info" command to GDB?
Not yet, but probably it could be done. I don't know why they do no print this information directly with the print command.
Issue still persisting in current version svn 11499 (Sep 30, 2018). Any chance that it will be solved or is there an easy workaround for this? Many thanks.
What do you mean by an easy work around? A workaround for the tooltip isn't really possible, probably if something could be done using the gdb's python apis, but I've not used it much...
You can manually execute the commands listed in this page: https://sourceware.org/gdb/current/onlinedocs/gdb/Macros.html
Here something really light solving the issue: Compile with
-gdwarf-2 -g3
to ensure the compiler includes information about preprocessor macros in the debugging information which then can be passed to CB for display (from the link above).Probably good to have these compiler flags in the default compiler flag list to avoid looking for it.
Apparently this is not a CB issue, but rather a question about the compiled objects passed on to CB. This ticket could be closed from my side.