This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 237001 - Provide support for Function pointers within the call graph
Summary: Provide support for Function pointers within the call graph
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Navigation (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: danilasergeyev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-10 18:53 UTC by vincesheard
Modified: 2015-05-27 12:05 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Current call graph rendering when using function pointers (1.63 KB, image/png)
2013-10-10 18:57 UTC, vincesheard
Details
A picture showing a possible solution (3.59 KB, image/png)
2013-10-10 18:58 UTC, vincesheard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vincesheard 2013-10-10 18:53:39 UTC

    
Comment 1 vincesheard 2013-10-10 18:57:43 UTC
Created attachment 140989 [details]
Current call graph rendering when using function pointers

A snipet of the current support of the call graph. No function poiinters even show up.
Comment 2 vincesheard 2013-10-10 18:58:59 UTC
Created attachment 140990 [details]
A picture showing a possible solution

a proposed option of showing the function pointer within a call graph.
Comment 3 vincesheard 2013-10-10 19:01:09 UTC
Description:
Function pointers are currently ignored in call graph generation.

void myFunction(void);
void (*const myFunctionPointer)(void) = &myFunction;

void main(void)
{
    myFunctionPointer();
}

void myFunction(void)
{
    while(1);
}

The generated call graph for the above code is shown in CallGraph-Current.png. The pointer execution is ignored.

Pointers are dynamic, and it may not be possible to show the actual function being called. However, a more accurate graph can be generated by showing the execution of the pointer as shown in CallGraph-Requested.png. A dotted line surrounds the function pointer name to differentiate it from a normal function call. A different icon could also be used in the call tree.
Comment 4 danilasergeyev 2015-05-27 12:05:10 UTC
fixed, change set:
http://hg.netbeans.org/cnd-main/rev/cbac04795d79