SlickEdit Community

SlickEdit Product Discussion => SlickEdit® => Topic started by: joecar on August 15, 2018, 04:38:10 pm

Title: References does not show function definition...
Post by: joecar on August 15, 2018, 04:38:10 pm
See attached screenshot...

function definition qla27xx_skip_entry() is missing from the references list

( other functions seem to be ok when I show references on those; for example qla27xx_next_entry() )

Also, sometimes I see this popup when I try to show references (notice the symbol is truncated...):
Quote
Symbol 'qla27xx_ski' not found.
 Do you want to search for word matches?

Source files are attached (Linux Kernel GPL license applies).

I'm running hotfix_se2202_11_cumulative.


Title: Re: References does not show function definition...
Post by: Clark on August 15, 2018, 06:13:23 pm
I couldn't reproduce this by just creating a workspace and adding these files.

Something definitely looks wrong though. References didn't find the function definition.

Do you ever see all the references for this? If not, try creating a stand-alone workspace with just the two files. I'm curious if that works for you.
Title: Re: References does not show function definition...
Post by: joecar on August 16, 2018, 05:05:35 pm
...
Do you ever see all the references for this? If not, try creating a stand-alone workspace with just the two files. I'm curious if that works for you.

I created a standalone workspace with only these two files, and same thing happens

Quote
Symbol 'qla27xx_ski' not found.
 Do you want to search for word matches?
Title: Re: References does not show function definition...
Post by: joecar on August 16, 2018, 05:06:49 pm
( BTW: the Find Symbol gui finds this symbol ok )
Title: Re: References does not show function definition...
Post by: rowbearto on August 16, 2018, 06:40:38 pm
joecar: Try giving Slick team your configuration file - user.cfg.xml in your config directory - that may be needed to reproduce the issue. Also provide them with your workspace/project of your standalone workspace. Upload to support.slickedit.com.
Title: Re: References does not show function definition...
Post by: Dennis on August 20, 2018, 04:55:30 pm
I can not reproduce this with just those two files.  Perhaps you have a C/C++ tag file with another definition of this same symbol?

When you initiate the references search, are you prompted to select from multiple symbol definitions/declarations? (Select a Symbol dialog)

If so, you need to be sure to select the one in your file.  Otherwise, it's going to be looking for another version of the symbol, and the static inline symbol definition will be filtered out, because it can be easily proven to be itself, and not another version of the symbol (unlike the function calls where we tend to be a bit more flexible when there are multiple definitions of a symbol).
Title: Re: References does not show function definition...
Post by: joecar on August 20, 2018, 06:01:35 pm
joecar: Try giving Slick team your configuration file - user.cfg.xml in your config directory - that may be needed to reproduce the issue. Also provide them with your workspace/project of your standalone workspace. Upload to support.slickedit.com.
Ok, I can do this... it has a space for a case number...
Title: Re: References does not show function definition...
Post by: joecar on August 20, 2018, 06:07:43 pm
I can not reproduce this with just those two files.  Perhaps you have a C/C++ tag file with another definition of this same symbol?
I searched (text search) for qla27xx_skip_entry and it shows up here only:

Code: [Select]
Find all "qla27xx_skip_entry", Regular expression (Perl), "<Workspace>", "*.*"
File C:\Users\jcarnuccio\Working\Linux\qla2xxx\qla2xxx-v2632-devel\qla2xxx\qla_tmpl.c
 Function qla27xx_skip_entry(struct qla27xx_fwdt_entry *ent, void *buf) : 124
  125 1:qla27xx_skip_entry(struct qla27xx_fwdt_entry *ent, void *buf)
 Function qla27xx_fwdt_entry_t0(struct scsi_qla_host *vha, struct qla27xx_fwdt_entry *ent, void *buf, ulong *len) : 138
  144 2:        qla27xx_skip_entry(ent, buf);
 Function qla27xx_fwdt_entry_t255(struct scsi_qla_host *vha, struct qla27xx_fwdt_entry *ent, void *buf, ulong *len) : 149
  155 2:        qla27xx_skip_entry(ent, buf);
 Function qla27xx_fwdt_entry_t262(struct scsi_qla_host *vha, struct qla27xx_fwdt_entry *ent, void *buf, ulong *len) : 259
  300 3:                qla27xx_skip_entry(ent, buf);
  308 3:                qla27xx_skip_entry(ent, buf);
 Function qla27xx_fwdt_entry_t263(struct scsi_qla_host *vha, struct qla27xx_fwdt_entry *ent, void *buf, ulong *len) : 322
  362 3:                qla27xx_skip_entry(ent, buf);
  368 4:                        qla27xx_skip_entry(ent, buf);
 Function qla27xx_fwdt_entry_t264(struct scsi_qla_host *vha, struct qla27xx_fwdt_entry *ent, void *buf, ulong *len) : 375
  397 3:                qla27xx_skip_entry(ent, buf);
 Function qla27xx_fwdt_entry_t268(struct scsi_qla_host *vha, struct qla27xx_fwdt_entry *ent, void *buf, ulong *len) : 443
  461 4:                        qla27xx_skip_entry(ent, buf);
  466 3:                qla27xx_skip_entry(ent, buf);
 Function qla27xx_fwdt_entry_t274(struct scsi_qla_host *vha, struct qla27xx_fwdt_entry *ent, void *buf, ulong *len) : 570
  605 3:                qla27xx_skip_entry(ent, buf);
  611 4:                        qla27xx_skip_entry(ent, buf);
 Function qla27xx_fwdt_entry_t275(struct scsi_qla_host *vha, struct qla27xx_fwdt_entry *ent, void *buf, ulong *len) : 618
  632 3:                qla27xx_skip_entry(ent, buf);
 Function qla27xx_fwdt_entry_t276(struct scsi_qla_host *vha, struct qla27xx_fwdt_entry *ent, void *buf, ulong *len) : 647
  664 4:                        qla27xx_skip_entry(ent, buf);
 Function qla27xx_fwdt_entry_t279(struct scsi_qla_host *vha, struct qla27xx_fwdt_entry *ent, void *buf, ulong *len) : 705
  724 4:                        qla27xx_skip_entry(ent, buf);
 Function qla27xx_fwdt_entry_t280(struct scsi_qla_host *vha, struct qla27xx_fwdt_entry *ent, void *buf, ulong *len) : 731
  749 4:                        qla27xx_skip_entry(ent, buf);
 Function qla27xx_fwdt_entry_other(struct scsi_qla_host *vha, struct qla27xx_fwdt_entry *ent, void *buf, ulong *len) : 756
  764 2:        qla27xx_skip_entry(ent, buf);
Total found: 17     Matching files: 1     Total files searched: 29

Quote
When you initiate the references search, are you prompted to select from multiple symbol definitions/declarations? (Select a Symbol dialog)
No, I am not.



The Find Symbol gui finds the definition of this symbol.

Can I send you a tarball of the whole project...?
Title: Re: References does not show function definition...
Post by: rowbearto on August 20, 2018, 06:31:01 pm
Upload your tarball with workspace,project,source and user.cfg.xml file to support.slickedit.com.

For case number, I usually put the name of my tarball file. Then I reply to the forum asking slick team to look for the tarball file name on support, they will be able to find it.
Title: Re: References does not show function definition...
Post by: joecar on August 21, 2018, 05:20:05 pm
Ok, uploaded file qla2xxx-v2632-devel.zip which contains the following:
a. qla2xxx-v2632-devel workspace/project/source directory tree.
b. kernel 2.6.32 include subtree and tag file (referenced by a.).
c. user.cfg.xml.

Case # is qla2xxx-v2632-devel.zip

Thanks.
Title: Re: References does not show function definition...
Post by: Dennis on August 21, 2018, 05:56:04 pm
Still no repro, even with our user.cfg.xml and your workspace.

Try this.  Place your cursor on one of the instances of qla27xx_skip_entry(), and then go to the SlickEdit command line and type "codehelp-trace-push-refs"  Then go to the SlickEdit debug output window and hit Ctrl+X to copy the contents to the clipboard, paste it into an empty text file, and attach it to this list.  That will help me debug what is different in your specific case.

Also, verify that you do not have any filters enabled in the References tool window by right-clicking, navigating to the Quick Filters submenu, and verifying that "Show all tags" is checked.
Title: Re: References does not show function definition...
Post by: joecar on August 21, 2018, 06:21:16 pm
Where is the SlickEdit debug window (I saw it flash by)...?

References quick filters has Show All Tags checked.
Title: Re: References does not show function definition...
Post by: joecar on August 21, 2018, 06:24:05 pm
I found it, see attached.


In the debug text, line 7 shows 'qla27xx_ski' which is a truncation of 'qla27xx_skip_entry'.



Title: Re: References does not show function definition...
Post by: Dennis on August 21, 2018, 08:07:56 pm
What C/C++ prepreprocessing defines do you have set up ?

Document > C/C++ Options... > C/C++ Preprocessing...
Project > Workspace Properties... > C/C++ Preprocessing...

Title: Re: References does not show function definition...
Post by: joecar on August 21, 2018, 10:35:20 pm
See attached.

Title: Re: References does not show function definition...
Post by: Dennis on August 21, 2018, 10:38:41 pm
That might be the key.  Not sure why yet though.  Could you post your usercpp.h (from your config directory).
Title: Re: References does not show function definition...
Post by: joecar on August 21, 2018, 11:00:23 pm
Attached.
Title: Re: References does not show function definition...
Post by: joecar on August 22, 2018, 05:48:02 pm
Observation:

when I place the text cursor on a character to the right of the 'p' in qla27xx_skip_entry, and I do push-ref, all the references to this symbol, except for the definition of this symbol, are found (shown in References tab);

when I place the text cursor to the left of the 'p', the following message pops up:
Quote from: Symbol Not Found
Symbol 'qla27xx_ski' not found.
 Do you want to search for word matches?



( and, also (already mentioned somewhere in this thread), gui-push-tag finds the definition of this symbol )
Title: Re: References does not show function definition...
Post by: joecar on August 24, 2018, 06:39:52 pm
I installed v23 beta 2... and it appears that this problem is fixed, the definition of qla2xxx_skip_entry now shows up in the references.

Thanks.
Title: Re: References does not show function definition...
Post by: Dennis on August 24, 2018, 07:06:33 pm
Good to hear, I had placed this problem on the backburner, glad it is working for you now.