|
From: | Eric M. Ludlam |
Subject: | Re: [CEDET-devel] ede-linux doesn't work with master emacs repo |
Date: | Tue, 28 Sep 2010 22:39:08 -0400 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.3a1pre) Gecko/20091222 Shredder/3.1a1pre |
On 09/28/2010 07:48 PM, Chong Yidong wrote:
"Eric M. Ludlam"<address@hidden> writes:First, your C file (with Aneesh's example) needs to be parsed correctly. M-x bovinate RET will dump out the results.Here's what I get: (("a" type (:members (("k" variable (:type "int") (reparse-symbol classsubparts) #<overlay from 16 to 22 in foo.c>) ("b" variable (:type "char") (reparse-symbol classsubparts) #<overlay from 27 to 34 in foo.c>)) :type "struct") nil #<overlay from 1 to 39 in foo.c>) ("t" variable (:type ("a" type (:prototype t :type "struct") nil nil)) nil #<overlay from 1 to 39 in foo.c>) ("main" function (:type "int") nil #<overlay from 41 to 113 in foo.c>)) I notice that the unlink-copy-hook entries are not present. The above results are identical to the bovinate output for Emacs 23.2 with built-in CEDET.
That's good. The unlink hooks were because I have a decoration mode turned on which you probably don't have. They are also removed during a save.
This seems spooky in that it cannot find "struct a" when it is right there in this file. Searches for types, however, generally go through the typecache. Does the typecache (from semanticdb-typecache-dump) show a in the cache? If it is there, then I'm lost here, and debugging the analyzer will need to occur.
To do that, you can get the gist of what's going on by using edebug with semantic-analyze-find-tag-sequence-default. It will probably fail in a call to semantic-analyze-type which is a hairy function dealing with inheritance, aliases, typedefs, etc. The last non-doc fix in here was from 2009-04-01.
The only other hint was someone discovered a bug where the 'current buffer' would change in the middle of some calls to the parser. If the buffer changes, then this C file would not be current, and would be excluded from type searches. You can test for that while debugging the above. In that case, there were some recent changes I made in the C parser for that, and also in semanticdb-typecache for that.
Eric Eric
[Prev in Thread] | Current Thread | [Next in Thread] |