Bugzilla will undergo maintenance 2024-03-29 18h00 CET. Bugzilla will be placed in read-only mode at that time.

Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 507285 - Open Declaration on #include in assembly file
Summary: Open Declaration on #include in assembly file
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-indexer (show other bugs)
Version: 8.6.0   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: 9.3.0   Edit
Assignee: Nathan Ridge CLA
QA Contact: Markus Schorn CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-09 06:48 EST by Matthias Eckhart CLA
Modified: 2016-12-31 03:37 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Eckhart CLA 2016-11-09 06:48:14 EST
References from C to assembly code and vice versa are not recognized by the CDT indexer. In addition, comments such as `TODO` and `FIXME` in assembly code are not listed in the Tasks view. Creating an indexer parser log results in an empty file, indicating that the CDT indexer seems to completely ignore assembly files.

This issue is inconvenient for developers since it is not possible to directly navigate to referenced code. Due to the fact that there are many types of assembly languages, this request would probably be difficult to implement. However, the implementation of this feature would likely be feasible for includes as include directives may be easier to identify in a parsing process and they are also already referenced in the Outline view.
Comment 1 Nathan Ridge CLA 2016-11-09 14:36:48 EST
(In reply to Matthias Eckhart from comment #0)
> However, the implementation of this feature would likely be
> feasible for includes as include directives may be easier to identify in a
> parsing process and they are also already referenced in the Outline view.

Could you clarify what you mean by this?

> In addition, comments such as `TODO` and `FIXME` in assembly
> code are not listed in the Tasks view.

It's probably worth filing a separate bug for this, as it might be a lot easier to implement than recognizing code references.
Comment 2 Matthias Eckhart CLA 2016-11-21 05:34:15 EST
(In reply to Nathan Ridge from comment #1)
> (In reply to Matthias Eckhart from comment #0)
> > However, the implementation of this feature would likely be
> > feasible for includes as include directives may be easier to identify in a
> > parsing process and they are also already referenced in the Outline view.
> 
> Could you clarify what you mean by this?

If you include a header file in assembly code, it will be referenced in the Outline view. When you perform a double-click on this particular include in the Outline view, you will even jump right to it. However, this won't happen if you hold <Ctrl> and click on the file name of the include directive in assembly code.

> > In addition, comments such as `TODO` and `FIXME` in assembly
> > code are not listed in the Tasks view.
> 
> It's probably worth filing a separate bug for this, as it might be a lot
> easier to implement than recognizing code references.

I created a separate bug for task tags support in assembly code. Please see Bug 507846.
Comment 3 Nathan Ridge CLA 2016-11-21 18:23:15 EST
(In reply to Matthias Eckhart from comment #2)
> (In reply to Nathan Ridge from comment #1)
> > (In reply to Matthias Eckhart from comment #0)
> > > However, the implementation of this feature would likely be
> > > feasible for includes as include directives may be easier to identify in a
> > > parsing process and they are also already referenced in the Outline view.
> > 
> > Could you clarify what you mean by this?
> 
> If you include a header file in assembly code, it will be referenced in the
> Outline view. When you perform a double-click on this particular include in
> the Outline view, you will even jump right to it. However, this won't happen
> if you hold <Ctrl> and click on the file name of the include directive in
> assembly code.

Thanks for clarifying! You're right that this shouldn't be too difficult to implement given that we already identify includes in assembly files for the Outline view.

Let's use this bug to track that request; I changed the title to reflect this.

For the more general request (Open Declaration on an identifier in an assembly file), could you kindly file a new bug, with an example pair of assembly and C/C++ files, and indicate from where to where should navigation work? Thanks in advance!

> > > In addition, comments such as `TODO` and `FIXME` in assembly
> > > code are not listed in the Tasks view.
> > 
> > It's probably worth filing a separate bug for this, as it might be a lot
> > easier to implement than recognizing code references.
> 
> I created a separate bug for task tags support in assembly code. Please see
> Bug 507846.

Thanks!
Comment 4 Matthias Eckhart CLA 2016-11-22 12:29:17 EST
(In reply to Nathan Ridge from comment #3)
> (In reply to Matthias Eckhart from comment #2)
> > (In reply to Nathan Ridge from comment #1)
> > > (In reply to Matthias Eckhart from comment #0)
> > > > However, the implementation of this feature would likely be
> > > > feasible for includes as include directives may be easier to identify in a
> > > > parsing process and they are also already referenced in the Outline view.
> > > 
> > > Could you clarify what you mean by this?
> > 
> > If you include a header file in assembly code, it will be referenced in the
> > Outline view. When you perform a double-click on this particular include in
> > the Outline view, you will even jump right to it. However, this won't happen
> > if you hold <Ctrl> and click on the file name of the include directive in
> > assembly code.
> 
> Thanks for clarifying! You're right that this shouldn't be too difficult to
> implement given that we already identify includes in assembly files for the
> Outline view.
> 
> Let's use this bug to track that request; I changed the title to reflect
> this.
> 
> For the more general request (Open Declaration on an identifier in an
> assembly file), could you kindly file a new bug, with an example pair of
> assembly and C/C++ files, and indicate from where to where should navigation
> work? Thanks in advance!

Please see Bug 507974.
Comment 5 Nathan Ridge CLA 2016-12-07 19:36:06 EST
(In reply to Nathan Ridge from comment #3)
> > If you include a header file in assembly code, it will be referenced in the
> > Outline view. When you perform a double-click on this particular include in
> > the Outline view, you will even jump right to it. However, this won't happen
> > if you hold <Ctrl> and click on the file name of the include directive in
> > assembly code.
> 
> Thanks for clarifying! You're right that this shouldn't be too difficult to
> implement given that we already identify includes in assembly files for the
> Outline view.

It took a bit more plumbing than I anticipated, but I did get this working.
Comment 6 Eclipse Genie CLA 2016-12-07 19:36:45 EST
New Gerrit change created: https://git.eclipse.org/r/86683
Comment 7 Eclipse Genie CLA 2016-12-07 19:36:46 EST
New Gerrit change created: https://git.eclipse.org/r/86682
Comment 10 Nathan Ridge CLA 2016-12-14 12:25:11 EST
Fixed for 9.3.
Comment 11 Nathan Ridge CLA 2016-12-31 02:37:05 EST
I just realized that what I implemented works for the F3 shortcut or the Open Declaration context menu action, but not for Ctrl+Click, which is what you actually asked about. Filed bug 509798 to track invoking it via Ctrl+Click.
Comment 12 Nathan Ridge CLA 2016-12-31 03:37:51 EST
I mentioned this, along with bug 507974, in the 9.3 N&N: https://wiki.eclipse.org/CDT/User/NewIn93#Open_Declaration_in_assembly_files