Author Topic: How to debug issues about tags  (Read 3137 times)

lusu2004

  • Community Member
  • Posts: 39
  • Hero Points: 1
How to debug issues about tags
« on: November 11, 2016, 06:07:47 AM »
Hi Expert,

   any one know how to debug issues about tags, here is my problem,
I have a header file with 40K lines, and for a class, it is

class mysGeoShape {

.....
unsigned int      getPartialPlaceBlkDensity() const;
  void              setPartialPlaceBlkDensity(unsigned int v);
  unsigned int      getPartialRouteBlkDensity() const;
  void              setPartialRouteBlkDensity(unsigned int v);
  String            getInstName() const;
  void              setInstName(String name);
};

there are inline defintion for this method in the same header file, e.g.
inline void
mysGeoShape ::setPartialRouteBlkDensity(unsigned int den)
{
    density = den & 0x00ff;
}


but when the cursor is on the declaration, and click CTRL+. ,  slickedit 21.0.0.12 doesn't jump the corresponding definition of method.

the most strange thing is , for other methods except for the methods I listed above, CTRL+. works well.

any comment on how to debug this strange issue?

Thanks
Lusu

Graeme

  • Senior Community Member
  • Posts: 2793
  • Hero Points: 347
Re: How to debug issues about tags
« Reply #1 on: November 11, 2016, 10:50:03 AM »
Ctrl dot is working for me with the code you posted.  Can you post the entire header file?

Dennis

  • Senior Community Member
  • Posts: 3954
  • Hero Points: 515
Re: How to debug issues about tags
« Reply #2 on: November 11, 2016, 05:31:32 PM »
First step.  Look at the Defs tool window.  Go to the method definition that you could not jump to, and see if it shows up in Defs correctly.  If it doesn't, look at the previous symbol that was identified, and watch for preprocessing.

lusu2004

  • Community Member
  • Posts: 39
  • Hero Points: 1
Re: How to debug issues about tags
« Reply #3 on: November 14, 2016, 07:34:47 AM »
Hi Dennis & Graeme,

    Thanks!!! I follow Dennis's idea to look at the Defs windows to get the cause, (Sorry, I can not upload the entire header file as I am working for a company and that header file should not be disclosed. and I also have to to change the names to avoid any IP issues)

     Actually , class/method definition in header file are

class mysGeoShape;
typedef mysGeoShape mysShape;
class mysGeoShape {
public:
  ...
  unsigned int      getPartialPlaceBlkDensity() const;
  ...
protected:

};

inline unsigned int
mysShape::getPartialPlaceBlkDensity() const
{
}

you can see the method definition is mysShape::* , but the declaration is in class mysGeoShape. 

how about VS to support this kind of syntax?

Thanks
Lusu.

   

TKasparek

  • Senior Community Member
  • Posts: 246
  • Hero Points: 29
Re: How to debug issues about tags
« Reply #4 on: November 14, 2016, 04:00:00 PM »
I have had this issue for a long time as well but have been too busy to post. I would love to see this resolved.

Dennis

  • Senior Community Member
  • Posts: 3954
  • Hero Points: 515
Re: How to debug issues about tags
« Reply #5 on: November 14, 2016, 04:42:02 PM »
Thanks for the precise example.  I will file a Defect report on the issue and think about how we can remedy this.  It is a very tricky one, because it is difficult to efficiently trace backwards through a typedef to seek out the definition (not knowing that such a definition exists in the first place, it could create a performance hit for other normal cases).

Quote
A man walks into a doctor's office and says, "Doctor, it hurts when I do this." "Then don't do that!"  -- Henny Youngman

TKasparek

  • Senior Community Member
  • Posts: 246
  • Hero Points: 29
Re: How to debug issues about tags
« Reply #6 on: November 14, 2016, 08:13:58 PM »
I will say that references do works for these, so you do still have access to the implementation that way. You just can't use push-tag to get to it. :/ It can be extremely inconvenient...

lusu2004

  • Community Member
  • Posts: 39
  • Hero Points: 1
Re: How to debug issues about tags
« Reply #7 on: November 15, 2016, 01:18:22 AM »
Hi Dennis,

     looks like if  keep a list of "equivalent" classes/structures which are defined by typedef, once engine search the definition of a method , it can go through the list of equivalent class one by one and get the correct method definition.  the pesudo codes like

get the method's class, suppose its name is A
foreach equ_class in equivalent classes of A
     if has any method-definition in equ_class
           foreach method in equ_class and compare the name of method.


it should be efficient since
1) number of typdef of a specific class is small, it is zero for most of cases
2) number of method definition explicitly in the scope of alias class (defined by typedef) is very small, I believe most of them are written down casually by careless engineer

Thanks
Lusu