Hi,
A good place to start is to use the command:
M-x semanticdb-find-test-translate-path RET
which will list all the databases that will be searched when you do
completion. The symref stuff is forced to look for a database like
cscope, where smart completion is optional.
You can also try this:
M-x semantic-adebug-searchdb RET scanf RET
and see where semanticdb goes and finds symbols. If it finds a scanf,
but the smart completion does not, then it is because of some filter
that may be removing that scanf as a hit.
Semantic should be able to find scanf without cscope, since all your
headers will be parsed. As such, you can try:
M-x semantic-c-describe-environment RET
in your C file to find out where it might be finding stdio.h, and after
that, you can also right-click on stdio.h, and select 'visit include' to
see what's there.
Good Luck
Eric
On 11/17/2010 07:59 PM, Leonardo Gomes wrote:
> Hi all,
>
> Someone know how to make the semantic use the cscope to find and
> complete tags, symbols or whatever terminology used to describe
> variables, functions and so on ???
>
> In my emacs configuration file, i use this and other stuff to load CEDET.
>
> (require 'semanticdb-cscope)
> (semanticdb-enable-cscope-databases)
>
> But some CEDET "commands" don't show the cscope results or don't use them.
>
> I searching for CEDET and cscope i found this link in chinese and i
> apply he:
>
> http://mmmyddd.freeshell.net/blog/Computer/Emacs/usecscopesemanticdbbackend
>
> And the problem not solved.
>
>
> I use this C code sample to test the integration CEDET and Cscope.
>
> #include<stdio.h>
>
> main()
> {
> int numn;
> printf ("Hello World\n");
> scanf ("%d",numn);
> }
>
> The command semantic-ia-fast-jump and semantic-ia-show-summary don't
> show nothing about the scanf, but if i use the xcscope.el i find
> declarations for he. The CEDET engine work great with printf, after the
> cursor stay some seconds in printf he show in status bar the printf
> declaration, but nothing about scanf.
>
> But when i run semantic-symref-find-tags-by-name searching for scanf i
> got this:
>
> ] Name: "scanf"
> ] Class: #'semantic-symref-result
> ] :created-by #<semantic-symref-tool-cscope semantic-symref-tool-cscope>
> ] :hit-files #unbound
> ] :hit-text #unbound
> ] :hit-lines #<list o' stuff: 2 entries>
> > #<list o' stuff: 1 entries>
> > 433
> > "/usr/include/stdio.h"
> > #<list o' stuff: 1 entries>
> > 460
> > "/usr/include/stdio.h"
> ] :hit-tags #unbound
>
> The another CEDET command i tested for search scanf is
> semanticdb-test-cscope and he output is:
>
> ?#<TAG LIST: 2 entries>
> * scanf
> | Name: "scanf"
> | Class: 'function
> | Attributes:
> # :faux : 't
> > value 't
> > event-symbol-element-mask : #<list o' stuff: 2 entries>
> > event-symbol-elements : #<list o' stuff: 1 entries>
> > modifier-cache : #<list o' stuff: 1 entries>
> | Properties:
> * scanf
> | Name: "scanf"
> | Class: 'function
> | Attributes:
> # :faux : 't
> > value 't
> > event-symbol-element-mask : #<list o' stuff: 2 entries>
> > event-symbol-elements : #<list o' stuff: 1 entries>
> > modifier-cache : #<list o' stuff: 1 entries>
> | Properties:
>
>
> I think that cscope work but for some reason the table, list or whatever
> don't have the cscope symbols.
>
> Exist some way to load the cscope symbols in the semantic to be used by
> he commands ?
>
> Cscope symbols would be nice to complete or navigate symbols.
>
> xcscope.el have good commands that be good if he implemented in CEDET.
>
> I don't know lisp or elisp to try to fix or identify this. Someone know
> a url to good syntax reference to this language( is lisp or elisp?)?
>
> Sorry my english.
>
> Thanks !!!
>
> ------------------------------------------------------------------------------
> Beautiful is writing same markup. Internet Explorer 9 supports
> standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2& L3.
> Spend less time writing and rewriting code and more time creating great
> experiences on the web. Be a part of the beta today
> http://p.sf.net/sfu/msIE9-sfdev2dev
> _______________________________________________
> Cedet-devel mailing list
> Cedet-devel@...
> https://lists.sourceforge.net/lists/listinfo/cedet-devel
>
|