Re: Iterative visiting of all source files
Eric Ludlam <[email protected]> Thu, 12 Feb 2015 21:08:56 -0500
| Newsgroups | gmane.emacs.semantic |
|---|---|
| Message-ID | <[email protected]> |
On 02/11/2015 06:36 AM, RJD wrote:
> Eric Ludlam <eric <at> siege-engine.com> writes:
>
>
> I run:
>> M-x semantic-symref RET
> in some function (let's call it someFunction, and I get the buffer:
>> *Symref someFunction
>
> in this buffer I can see:
>
>> d:/a/b/c/header1.h
>> [+] class SomeClass {}
>> d:a/b/c/header2.h
>> [+] class SomeOtherClass {}
>> d:a/b/c/header3.h
>> [+] class SomeOtherOtherClass {}
>> d:a/b/c/source1.cpp
>> [+] void aTotallyDifferentFunction( int a, int b)
>
> Where source1.cpp contains aTotallyDifferentFunction() which actually calls
> someFunction. So, this all seems fine so far.
>
> Then, in that *Symref buffer I run:
>> M-x semantic-symref-data-debug-last-result RET
>
> I get something like this in a new buffer (*Symbol Reference ADEBUG*):
>
>> ] Name: "someFunction"
>> ] Class: #'semantic-symref-result
>> ] :created-by #<semantic-symref-tool-global semantic-symref-tool-global>
>> ] :hit-files #unbound
>> ] :hit-text #unbound
>> ] :hit-lines #<list o' stuff: 4 entries>
>> ] :hit-tags #<TAG LIST: 4 entries>
>
> Is this using GTAGS?
Yes, it is using GTAGS. You can tell because the :created-by is
semantic-symref-tool-global, which calls the "global" command to query
GTAGS.
> *** PS: Notice that I have not manually instantiated a gtags object. I did
> not use:
>> M-: (semantic-symref-instantiate) RET
>
> ^^^^^ Does this matter? If it does, should I put it in my .emacs file.
The instantiation is handled internally as needed. You only need to
call toplevel symref commands. Also, all this function does is find
the right Emacs Lisp object for performing the search.
The way to make the GTAGS file is either by hand outside of emacs, or
M-x cedet-gnu-global-create/update-database
which is probably only used from some of my test suites.
Eric
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/