Why clicking on function call navigates to function prototype?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Why clicking on function call navigates to function prototype?

Jump to solution
1,513 Views
anaseem
Contributor IV

My embedded system in based on LPC11E68 Microcontroller.  Language is C / C++.  From MCUXpresso IDE, I click on Ctrl key and left click on function call, and end up at function prototype.  For long time I ended up at the function definition.  What broke my code navigation to function definition?

Labels (1)
Tags (1)
1 Solution
1,352 Views
BlackNight
NXP Employee
NXP Employee

There is a discussion on this here: Re: [cdt-dev] open declaration vs open definition 

But basically it is the same as using 'Open Declaration (F3)' which actually might jump first to the definition depending on the context. Doing F3 then toggles between declaration and definition.

I hope this helps,

Erich

View solution in original post

3 Replies
1,352 Views
BlackNight
NXP Employee
NXP Employee

On another thought: that functionality depends on the 'Index', so if you see problems, I recommend to rebuild it:

pastedImage_1.png

Additionally, I always disable the 'heuristics' mode for better results, see Fixing the Eclipse Index | MCU on Eclipse  for details.

I hope this helps,

Erich

0 Kudos
1,352 Views
anaseem
Contributor IV

After rebuilding index, highlighting function and pressing <F3> twice navigates to function definition.  First press of <F3> only navigates to function prototype.  I always used to navigate to function definition on first press of <F3>.

In my workspace I have Three projects.  Two library projects and One application project.

I right-click on each project  -  Index  -  Rebuild

My indexer window is as follows:

indexer.PNG

On first press of <F3> I can navigate to function definition when function call and function definition reside in application.

But it takes two <F3> presses to navigate to function definition when function call is in application and function definition is in library.

0 Kudos
1,353 Views
BlackNight
NXP Employee
NXP Employee

There is a discussion on this here: Re: [cdt-dev] open declaration vs open definition 

But basically it is the same as using 'Open Declaration (F3)' which actually might jump first to the definition depending on the context. Doing F3 then toggles between declaration and definition.

I hope this helps,

Erich