Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 315185 - [hover] When hovering over a macro argument the expansion as a whole is evaluated
Summary: [hover] When hovering over a macro argument the expansion as a whole is evalu...
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug (show other bugs)
Version: 7.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 7.0.1   Edit
Assignee: Anton Leherbauer CLA
QA Contact: Ken Ryall CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-01 06:36 EDT by Anton Leherbauer CLA
Modified: 2010-08-10 07:23 EDT (History)
1 user (show)

See Also:


Attachments
Solution (7.11 KB, patch)
2010-08-10 03:42 EDT, Anton Leherbauer CLA
aleherb+eclipse: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Leherbauer CLA 2010-06-01 06:36:13 EDT
From bug 293966 comment 1:

#define GVMIN( x, y )  ( (x) < (y) ? (x) : (y) )
#define DBG(x)     printf( "result is %f\n", x );

{
    float f1 = 2.0F;
    float f2 = 1.0F;
    float f3 = GVMIN(f1, f2); // hover f1 or f2: the expression is evaluated
                                  // 1.0F is shown
        DBG(f3)              // hover f3: nothing is shown!
}

The expression hover should be improved such that
- hovering over a macro argument evaluates the argument
- hovering over a macro name evaluates the macro expansion (not all debuggers 
  support that)
Comment 1 Anton Leherbauer CLA 2010-08-10 03:42:06 EDT
Created attachment 176206 [details]
Solution
Comment 2 Anton Leherbauer CLA 2010-08-10 06:45:44 EDT
Committed to HEAD and cdt_7_0.