Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 315185

Summary: [hover] When hovering over a macro argument the expansion as a whole is evaluated
Product: [Tools] CDT Reporter: Anton Leherbauer <aleherb+eclipse>
Component: cdt-debugAssignee: Anton Leherbauer <aleherb+eclipse>
Status: RESOLVED FIXED QA Contact: Ken Ryall <ken.ryall>
Severity: normal    
Priority: P3 CC: pawel.1.piech
Version: 7.0   
Target Milestone: 7.0.1   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Solution aleherb+eclipse: iplog-

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.