emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH, RFC] etags/ctags v22.0.92 break Linux kernel `make TAGS/tags


From: Francesco Potorti`
Subject: Re: [PATCH, RFC] etags/ctags v22.0.92 break Linux kernel `make TAGS/tags`
Date: Mon, 05 Feb 2007 09:25:52 +0100

Sorry for the delay in my response.  Frank, you had written:

>One case I've just found: For the following class Emacs etags fails to
>tag the class members and adds some strange lines for the template
>parameters while exuberant ctags gives a much nicer result (see below)

In fact, that happens when etags is called without the --members option.
What I usually do is calling it with both --declarations and --members,
whose meaning is:
--declarations
        In C and derived languages, create tags for function declarations,
        and create tags for extern variables unless --no-globals is used.
--members
        Create tag entries for members of structures in some languages.

The reason why these are not the default is for compatibility with the
ancient ctags, because they were new when first introduced, and because
they make the TAGS file bigger.  None of these reasons seems to hold any
more, so maybe I should make these the default and adding --no-members
and --no-declarations options.

I am confident that setting at least --members as the default is good
idea, so in the absence of contrary feedback, I will make --members the
default and leaving --declarations as it is now, but I would gladly
listen for opinions on this matter.

At the end of the message I am including the output of etags with
--members for the code snippet you propose.

>code:
>---------------------------------------------------------------------
>template <typename ipc3dIslandHierarchy, typename ipc3dChannelType, unsigned 
>numOfChannels, typename ipc3dLinkControl, typename ipc3dLinkControlSetup>
>class CMultiChannelCSC19_3D
>{
>private:
>        ipc3dLinkControlSetup setup;
>        
> ipc3dCSC19<ipc3dIslandHierarchy,ipcMultiChannel<ipc3dChannelType,numOfChannels>,ipcMultiChannel<ipc3dChannelType,numOfChannels>,ipc3dLinkControl>
>  mcCSC; 
>        advTimer cscInitTime;
>        advTimer cscSegmentationTime;
>        advTimer outputTime;
>public:
>        void execute(CPluginCSCState& p, int w, int h, int d, const 
> ipcMultiChannel<ipc3dChannelType,numOfChannels>* orgImage, 
> ipcMultiChannel<ipc3dChannelType,numOfChannels>* regionImage, unsigned int* 
> mapImage, ipc3dBlockCompressedLabelImage* compressedMapImage=NULL)
>        {
>                if (orgImage!=NULL)
>                {
>                                  //do something
>                }
>        }
>};
>---------------------------------------------------------------------
>TAGS by emacs etags:
>---------------------------------------------------------------------
>
>foo.h,423
>template <typename ipc3dIslandHierarchy,1,0
>template <typename ipc3dIslandHierarchy, typename ipc3dChannelType,1,0
>template <typename ipc3dIslandHierarchy, typename ipc3dChannelType, unsigned 
>numOfChannels,1,0
>template <typename ipc3dIslandHierarchy, typename ipc3dChannelType, unsigned 
>numOfChannels, typename ipc3dLinkControl,1,0
>class CMultiChannelCSC19_3D2,151
>        void execute(CMultiChannelCSC19_3D::execute11,459
>---------------------------------------------------------------------
>TAGS by exuberant ctags:
>---------------------------------------------------------------------
>
>foo.h,680
>class CMultiChannelCSC19_3DCMultiChannelCSC19_3D2,151
>        ipc3dLinkControlSetup setup;setup5,190
>        
> ipc3dCSC19<ipc3dIslandHierarchy,ipcMultiChannel<ipc3dChannelType,numOfChannels>,ipcMultiChannel<ipc3dChannelType,numOfChannels>,ipc3dLinkControl>
>  mcCSC; mcCSC6,220
>        advTimer cscInitTime;cscInitTime7,375
>        advTimer cscSegmentationTime;cscSegmentationTime8,398
>        advTimer outputTime;outputTime9,429
>        void execute(CPluginCSCState& p, int w, int h, int d, const 
> ipcMultiChannel<ipc3dChannelType,numOfChannels>* orgImage, 
> ipcMultiChannel<ipc3dChannelType,numOfChannels>* regionImage, unsigned int* 
> mapImage, ipc3dBlockCompressedLabelImage* 
> compressedMapImage=NULL)execute11,459

This is the output with --members.  The first four lines make a tag for
the templates, which extags does not do (as far as I know).  A tag for
ipc3dCSC19 is emitted, which exctags does not do.  The tag names are of
the form class::tag, allowing to search tags more easily.

/tmp/t.cc,1293
template <typename ipc3dIslandHierarchy,^?1,0
template <typename ipc3dIslandHierarchy, typename ipc3dChannelType,^?1,0
template <typename ipc3dIslandHierarchy, typename ipc3dChannelType, unsigned 
numOfChannels,^?1,0
template <typename ipc3dIslandHierarchy, typename ipc3dChannelType, unsigned 
numOfChannels, typename ipc3dLinkControl,^?1,0
class CMultiChannelCSC19_3D^?2,151
        ipc3dLinkControlSetup setup;^?CMultiChannelCSC19_3D::setup^A5,190
        ipc3dCSC19<^?CMultiChannelCSC19_3D::ipc3dCSC19^A6,227
        
ipc3dCSC19<ipc3dIslandHierarchy,ipcMultiChannel<ipc3dChannelType,numOfChannels>,ipcMultiChannel<ipc3dChannelType,numOfChannels>,ipc3dLinkControl>
 mcCSC;^?CMultiChannelCSC19_3D::mcCSC^A6,227
        advTimer cscInitTime;^?CMultiChannelCSC19_3D::cscInitTime^A7,388
        advTimer 
cscSegmentationTime;^?CMultiChannelCSC19_3D::cscSegmentationTime^A8,418
        advTimer outputTime;^?CMultiChannelCSC19_3D::outputTime^A9,456
        void execute(^?CMultiChannelCSC19_3D::execute^A11,493




reply via email to

[Prev in Thread] Current Thread [Next in Thread]