S Boucher | 3 Mar 2010 21:20
Picon
Favicon

How do I set up to use ebrowse?

Greetings,

I'm new to the list.  But have been using emacs since 18.59 or some such version, so I'm not a complete emacs
newbie :-)  I'm however a complete newbie with cedet...

All is fine up to and including (load "cedet.elc").  After that, I'm not clear where to go (the "gentle
introduction" is too generic).

What I'd like to do is to use semantic with ebrowse.  I currently generate a single BROWSE file for the entire
project hierarchie.  So, as I see it I need to:

1) tell semantic where to get the single giant database
2) tell semantic how to keep that database up to date

I'm not clear how to go about doing this.  A quick cursory look at semanticdb seem to suggest that semanticdb
work with many small ebrowse DB files?  So, right there, I'm confused.

Any help would be appreciated.

BTW, setting up projects with EDE is pretty much a no go for me.  The build environment I have is just too
dynamic, and different files have different lists of include dir that are not always provided explicitly
(e.g. pkg-config --cflags).  One thing that I've done with flymake is to generate, for each .c/.cpp file, a
script that contains the command to compile it, and then I configure flymake to load use that script.  I
don't know if this can be of any use with regards to cedet.

But for CEDET, I do not understand what's needed to load/update the DB.

Thanks in advance,

      __________________________________________________________________
(Continue reading)

S Boucher | 4 Mar 2010 17:04
Picon
Favicon

Thanks

Thanks for all the help.  That convinced me Semantic is not for me :-)

Best regards,

      __________________________________________________________________
Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now
http://ca.toolbar.yahoo.com.

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
Justin Delegard | 5 Mar 2010 22:17
Picon
Favicon

semantic-symref results options?

Hello,

I recently discovered the usefulness of CEDET, but I'm wondering if 
there's a way to change the results of a semantic-symref call.  Instead 
of a collapsed list of functions, is it possible to have all of the 
lists be uncollapsed right away?  Or even better merging all the 
function lists into one, rather than each function having its own list?

eg instead of

/path/to/tcp.c

  [+] static int tcp_unacked_stream (const class uint32_t _srcp,const class uint32_t _dstp,unsigned
short sport,unsigned short dport,int client,int max,int af,class scatter_t ptr)

  [+] static class uint32_t tcp_known (const void _srcp,const void _dstp,unsigned short sport,unsigned
short dport,int type)

  [+] int ip_compare (class ip_addr_t src,class ip_addr_t dst)

  [+] void tcp_bpf_recv (struct pkt_context pktc,int proto)

/path/to/tcp-inline.c

  [+] void tcp_inline_recv (struct pkt_context pktc,int proto)

/path/to/tcp.h

  [+] extern int ip_compare (class ip_addr_t,class ip_addr_t)

(Continue reading)

Eric M. Ludlam | 6 Mar 2010 03:11
Gravatar

Re: How do I set up to use ebrowse?

Hi,

Unfortunately, the CEDET/EBROWSE integration is not one where the 
ebrowse functionality and CEDET can share the same database.  I've also 
found that the ebrowse parsing is not quite good enough to be a full 
substitute for Semantic parsing, but it is pretty good as a first pass 
at parsing when you want it all right away without waiting long.

You start by using the command semanticdb-create-ebrowse-database, and 
specify some directory.  It will run ebrowse with the right flags, and 
make a DB for that directory which Semantic will use.

I recommend against using ebrowse database with Semantic for files you 
edit a lot.  Those files will have regular Semantic databases for them 
while you edit, making the ebrowse database redundant.  Ebrowse is good 
for directories full of files you never intend to reference, but may 
refer to.

For EDE, you don't need to use it to manage your project, but it is 
helpful to use ede-cpp-root.  You can read about it in the manual here:

(ede.info)Top:: > Project types:: > Simple projects:: > ede-cpp-root

or in ede-cpp-root.el itself.

This acts as a marker, and makes it easier for some tools to identify 
code groups, include paths, etc, but doesn't deal with build process.

There is more basic setup advice in cedet/common/cedet.info

(Continue reading)

Eric M. Ludlam | 6 Mar 2010 03:37
Gravatar

Re: semantic-symref results options?

Hi Justin,

That seems like a fine idea.  It should be easy to add a keybinding to 
semantic-symref-list.el to open every node, and to also make that some 
sort of default.  If someone would like to tackle that project, that 
would be spiffy.

As a bit of background, the symref list system has two parts in CEDET. 
The core bit is a system for querying for symbol references from a range 
of different kinds of tools, with find/grep being a baseline.  The 
purpose is to provide a simple caching system for doing searches in more 
complex applications.  The list mode you refer to is a baseline example 
of such an application.  I'm not aware of any other symref apps built on 
top if this system.

If you just want a flat list of hits, you can use rgrep, gnu/global, or 
idutils with their Emacs interface directly.

The purpose of the symref system is, as I mention above, a base library 
for some other tool.  My long term goal is to use it for a refactoring 
system, with a classic "change the name of my function" type feature.  I 
won't get to that for a while though.

Eric

On 03/05/2010 04:17 PM, Justin Delegard wrote:
> Hello,
>
> I recently discovered the usefulness of CEDET, but I'm wondering if
> there's a way to change the results of a semantic-symref call.  Instead
(Continue reading)

Justin Delegard | 12 Mar 2010 07:15
Picon
Gravatar

sedet changes define-generic-mode behavior?

I had written a mode using the define-generic-mode routine.  It worked great until I started using CEDET.  It
changed my custom mode so that every line is a comment.  If I remove all the comment lines, it works alright. 
It's definitely something up with CEDET/semantic, since when I don't load them my major mode works fine.

Does anyone have any ideas what could be up with this?

Here's my CEDET related code at the beginning of my .emacs file:

(load "path/to/cedet.el")
(semantic-load-enable-code-helpers)
(require 'semantic-ia)

Thanks,
Justin
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
Michel LAFON-PUYO | 12 Mar 2010 10:12
Picon

semantic fails to resolve anonymous enum and struct fields completion

Hello,

Here is a possible bug experienced with 1.0pre7 (packaged by Archlinux):

typedef enum
{
   ENUM1,
   ENUM2
} e_toto;

typedef struct
{
   int field_a;
   int field_b;
} t_toto;

int func(void)
{
   t_toto t;
   t.
   return 0;
}

In the example above, if I try to use semantic-complete-self-insert
after "t." in the function, the proposed choices are ENUM1 and ENUM2
instead of field_a and field_b. This problem seems to be caused by the
anonymous typedefs. If I replace them by "typedef enum _e_toto {...}
e_toto" and "typedef struct _t_toto {...} t_toto", the completion is
successful.

(Continue reading)

Rodrigo Canellas | 12 Mar 2010 13:29
Picon

"LL/confname.h" makes 'emacs' freeze

Hi!

I am running "GNU Emacs 22.2.1 (i486-pc-linux-gnu, GTK+ Version
2.18.3)", and 'cedet-1.0pre6'.  'emacs' is freezing every time
"LL/confname.h" is runs.

My '.emacs', regarding 'cedet' is:

"
;; cedet

(load-file "~/emacs/cedet/common/cedet.el")

;; * This enables the database and idle reparse engines
(semantic-load-enable-minimum-features)

(require 'imenu)

;; * This enables even more coding tools such as intellisense mode
;;   decoration mode, and stickyfunc mode (plus regular code helpers)
(semantic-load-enable-gaudy-code-helpers)

;; Enable SRecode (Template management) minor-mode.
(global-srecode-minor-mode 1)

;; Additional features for names completion, and displaying of
information for tags & classes
(require 'semantic-ia)

;; To normal work with system-wide libraries, Semantic should has access to
(Continue reading)

Eric M. Ludlam | 12 Mar 2010 13:44
Gravatar

Re: "LL/confname.h" makes 'emacs' freeze

Hi,

I found a "confname.h" online w/ a copyright of 2004, and it parsed ok 
for me.

I will guess that your cedet 1.0pre6 install is at issue.  There have 
been many enhancements to the C preprocessor support in the last year, 
and cedet 1.0pre7 will probably fix your issue.

Eric

On 03/12/2010 07:29 AM, Rodrigo Canellas wrote:
> Hi!
>
> I am running "GNU Emacs 22.2.1 (i486-pc-linux-gnu, GTK+ Version
> 2.18.3)", and 'cedet-1.0pre6'.  'emacs' is freezing every time
> "LL/confname.h" is runs.
>
> My '.emacs', regarding 'cedet' is:
>
> "
> ;; cedet
>
> (load-file "~/emacs/cedet/common/cedet.el")
>
> ;; * This enables the database and idle reparse engines
> (semantic-load-enable-minimum-features)
>
> (require 'imenu)
>
(Continue reading)

Eric M. Ludlam | 12 Mar 2010 14:05
Gravatar

Re: semantic fails to resolve anonymous enum and struct fields completion

I can reproduce this issue.  I'll see what I can figure out.

Eric

On 03/12/2010 04:12 AM, Michel LAFON-PUYO wrote:
> Hello,
>
> Here is a possible bug experienced with 1.0pre7 (packaged by Archlinux):
>
> typedef enum
> {
>     ENUM1,
>     ENUM2
> } e_toto;
>
> typedef struct
> {
>     int field_a;
>     int field_b;
> } t_toto;
>
>
> int func(void)
> {
>     t_toto t;
>     t.
>     return 0;
> }
>
> In the example above, if I try to use semantic-complete-self-insert
(Continue reading)


Gmane