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 258160

Summary: Call Graph not showing calls made through function pointers
Product: cnd Reporter: georgepauley
Component: NavigationAssignee: Alexander Simon <alexvsimon>
Status: RESOLVED WONTFIX    
Severity: normal CC: georgepauley
Priority: P3    
Version: 8.0.2   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:
Attachments: Sample code and screen shots to illustrate bug
Screenshot showing function pointers erroneously showing up in call graph
Code used in first example, function pointers not in call graph
Code used in second example, function pointers erroneously in call graph

Description georgepauley 2016-02-26 16:51:54 UTC
The call graph does not appear to show functions called through C function pointers.  (See attached code1.c and capture.jpg)

Even stranger, call graph will show functions contained in function pointers that are declared inside a function, even if those functions are never actually called.  (See attached code2.c and capture2.jpg)
Comment 1 georgepauley 2016-02-26 16:53:06 UTC
Created attachment 158657 [details]
Sample code and screen shots to illustrate bug

Screenshot showing function pointers not appearing in call graph
Comment 2 georgepauley 2016-02-26 16:54:38 UTC
Created attachment 158658 [details]
Screenshot showing function pointers erroneously showing up in call graph
Comment 3 georgepauley 2016-02-26 16:55:11 UTC
Created attachment 158659 [details]
Code used in first example, function pointers not in call graph
Comment 4 georgepauley 2016-02-26 16:55:45 UTC
Created attachment 158660 [details]
Code used in second example, function pointers erroneously in call graph
Comment 5 Alexander Simon 2016-07-11 14:38:48 UTC
First code example (code1.c) requires a data flow analysis.
It is a feature that does not implemented in IDE. You can file a separate enhancement for this.

Second code example (code2.c) cannot distinguish call and reference.
It is a limitation of current code model. It cannot be fixed without reworking code model. Probably this will be fixed when IDE migrates on new code model.
So close as do not fix.