* OT:cscope/tags @ 2006-12-04 9:40 Hadron 2006-12-04 10:40 ` OT:cscope/tags Thorsten Bonow ` (2 more replies) 0 siblings, 3 replies; 15+ messages in thread From: Hadron @ 2006-12-04 9:40 UTC (permalink / raw) Anyone here using cscope/etags? I have used cscope-indexer to index my gtk headers and the linux kernel but it is unbelievably slow compared to using emacs tags functionality. Is this how it should be? Which of the many available cscope packages out there is the right one to use with ,---- | GNU Emacs 22.0.50.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of | 2006-09-19 on rothera, modified by Debian `---- ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: OT:cscope/tags 2006-12-04 9:40 OT:cscope/tags Hadron @ 2006-12-04 10:40 ` Thorsten Bonow 2006-12-04 11:52 ` OT:cscope/tags Hadron Quark 2006-12-04 16:31 ` OT:cscope/tags Perry Smith [not found] ` <mailman.1509.1165249894.2155.help-gnu-emacs@gnu.org> 2 siblings, 1 reply; 15+ messages in thread From: Thorsten Bonow @ 2006-12-04 10:40 UTC (permalink / raw) >>>>> "Hadron" == Hadron <hadronquark@gmail.com> writes: Hadron> Anyone here using cscope/etags? Hadron> I have used cscope-indexer to index my gtk headers and the linux Hadron> kernel but it is unbelievably slow compared to using emacs tags Hadron> functionality. Is this how it should be? Which of the many available Hadron> cscope packages out there is the right one to use with Hi, I use the packaged version coming along with Debian Unstable. Did you try other cscope interfaces to decide if it's Emacs or cscope which is slow? If you can be more specific I can try to reproduce it on my box and we can compare the results. Have you given gtags a shot? Toto -- Contact information and PGP key at http://www-users.rwth-aachen.de/thorsten.bonow "... There is a fine line between fiction and non-fiction, which I believe I snorted in 1978 ..." Kinky Friedman: Scuse Me While I Whip This Out ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: OT:cscope/tags 2006-12-04 10:40 ` OT:cscope/tags Thorsten Bonow @ 2006-12-04 11:52 ` Hadron Quark 2006-12-04 14:43 ` OT:cscope/tags Thorsten Bonow 0 siblings, 1 reply; 15+ messages in thread From: Hadron Quark @ 2006-12-04 11:52 UTC (permalink / raw) Thorsten Bonow <thorsten.bonow@post.rwth-aachen.de> writes: >>>>>> "Hadron" == Hadron <hadronquark@gmail.com> writes: > > Hadron> Anyone here using cscope/etags? > > Hadron> I have used cscope-indexer to index my gtk headers and the linux > Hadron> kernel but it is unbelievably slow compared to using emacs tags > Hadron> functionality. Is this how it should be? Which of the many available > Hadron> cscope packages out there is the right one to use with > > Hi, > > I use the packaged version coming along with Debian Unstable. Did you try other > cscope interfaces to decide if it's Emacs or cscope which is slow? Do you have the entire kernel cscope'd? I use xcscope. What cscope.el or equivalent do you use? I use xcscope.el. There are lots of versions around. This was the first one I tried which worked: ; File: xcscope.el ; RCS: $RCSfile: xcscope.el,v $ $Revision: 1.14 $ $Date: 2002/04/10 16:59:00 $ $Author: darrylo $ ; Description: cscope interface for (X)Emacs ; Author: Darryl Okahata ; Created: Wed Apr 19 17:03:38 2000 ; Modified: Thu Apr 4 17:22:22 2002 (Darryl Okahata) darrylo@soco.agilent.com ; Language: Emacs-Lisp There was no emacs package for cscope in /usr/share/doc/cscope/contrib as part of the Ubuntu distro. > > If you can be more specific I can try to reproduce it on my box and we can > compare the results. > > Have you given gtags a shot? Oh no :) Another tool :( So far I have etags, ctags, semantic & senator and now cscope. A quick google shows gtags to be a faster etags : tags are already fast enough just not powerful enough. Semantic is just plain buggy and doesn't seem to have half the options you might need for code navigation. cscope is the way as far as I can see, if I can find out which of the many .el packages I should be using. Thanks for any help. > > Toto -- ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: OT:cscope/tags 2006-12-04 11:52 ` OT:cscope/tags Hadron Quark @ 2006-12-04 14:43 ` Thorsten Bonow 2006-12-04 20:37 ` OT:cscope/tags Thorsten Bonow 0 siblings, 1 reply; 15+ messages in thread From: Thorsten Bonow @ 2006-12-04 14:43 UTC (permalink / raw) >>>>> "Hadron" == Hadron Quark <hadronquark@gmail.com> writes: Hadron> Do you have the entire kernel cscope'd? I use xcscope. Hadron> What cscope.el or equivalent do you use? I use xcscope.el. There are Hadron> lots of versions around. This was the first one I tried which Hadron> worked: Hadron> ; File: xcscope.el RCS: $RCSfile: xcscope.el,v $ $Revision: 1.14 $ Hadron> ; $Date: 2002/04/10 16:59:00 $ $Author: darrylo $ Description: Hadron> ; cscope interface for (X)Emacs Author: Darryl Okahata Created: Wed Hadron> ; Apr 19 17:03:38 2000 Modified: Thu Apr 4 17:22:22 2002 (Darryl Hadron> ; Okahata) darrylo@soco.agilent.com Language: Emacs-Lisp Hadron> There was no emacs package for cscope in Hadron> /usr/share/doc/cscope/contrib as part of the Ubuntu distro. Hi, I looked into your problem: I use the same xcscope.el. And yes, doing so makes cscope *extremely* slow (> 20(0) seconds respond time). >> If you can be more specific I can try to reproduce it on my box and we >> can compare the results. Here is what I did: I got the new kernel source 2.6.19, unzipped it into a directory and told xcscope to generate it's files in this directory. I then searched for the global definition of "adb_request": --------------------------------------- Finding global definition: adb_request Database directory: /home/toto/42/kernel-source/ ------------------------------------------------------------------------------- *** linux-2.6.19/include/asm-m68k/adb.h: adb_request[54] struct adb_request { adb_request[62] void (*done)(struct adb_request *); *** linux-2.6.19/include/linux/adb.h: adb_request[45] struct adb_request { adb_request[53] void (*done)(struct adb_request *); *** /usr/include/linux/adb.h: adb_request[45] struct adb_request { adb_request[53] void (*done)(struct adb_request *); ------------------------------------------------------------------------------- Search complete. Search time = 21.80 seconds. --------------------------------------- Then I tried to be extremely clever and told xcscope (via customize) to make use of my own version of cscope-indexer(.xxx) which added the "-k -q" options to the cscope call: this enables "kernel mode" in which no other directories are searched and "-q" creates two extra files which allows for a faster searching algorithm to be used (as described in the cscope man page). I had to write a wrapper script for cscope, too (cscope.xxx) to pass these options to all cscope calls and customized emacs to actually use it ;-) As reward for my troubles the searching times exploded to more than 200 seconds. Sigh. Than I put on my thinking cap and realized that now the database was rebuild *every* time before actually doing the look-up (although obviously no file had *changed in the source tree). Changing my wrapper scripts to include the "-d" option, which forces cscope *not* to rebuild the database, search times went down to 0.5 seconds, which is---in the emacs world---instantaneous :-) --------------------------------------- Finding global definition: adb_request Database directory: /home/toto/42/kernel-source/ ------------------------------------------------------------------------------- *** linux-2.6.19/include/asm-m68k/adb.h: adb_request[54] struct adb_request { adb_request[62] void (*done)(struct adb_request *); *** linux-2.6.19/include/linux/adb.h: adb_request[45] struct adb_request { adb_request[53] void (*done)(struct adb_request *); ------------------------------------------------------------------------------- Search complete. Search time = 0.50 seconds. --------------------------------------- See that the "-k" option prevented cscope from searching (and finding anything) in "/usr/include/linux/adb.h". So I think what's wrong with xscope.el is the "do I need to update the database" algorithm. Working with much smaller projects, the problem didn't occur to me up to now. I will look into it. You could start with http://www.emacswiki.org/cgi-bin/wiki/CScopeAndEmacs where the problem is mentioned and an alternative "bscope" (http://groups.google.de/group/gnu.emacs.sources/browse_frm/thread/6e087f36c31336b8/92f00c90361f07da?lnk=st&q=bscope&rnum=1#92f00c90361f07da) is mentioned (and which I should have read before trying out myself) ... >> Have you given gtags a shot? Hadron> Oh no :) Another tool :( So far I have etags, ctags, semantic & Hadron> senator and now cscope. Hadron> A quick google shows gtags to be a faster etags : tags are already Hadron> fast enough just not powerful enough. Semantic is just plain buggy Hadron> and doesn't seem to have half the options you might need for code Hadron> navigation. Hadron> cscope is the way as far as I can see, if I can find out which of Hadron> the many .el packages I should be using. I like it best, too. About the only good thing coming from SCO these days ;-) Hadron> Thanks for any help. Hope this helps... Toto -- Contact information and PGP key at http://www-users.rwth-aachen.de/thorsten.bonow [...] the dangerous role of the troublemakers in history has often fallen to the Jewish people. Anne Frankly, it should be noted, in passing, that a great deal of good for the advancement of mankind has been accomplished between circumcision, where they cut off the tip of your dick, to crucifixion, where they throw the whole Jew away. Friedman, Kinky (1995), "God Bless John Wayne", Simon and Shuster, New York ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: OT:cscope/tags 2006-12-04 14:43 ` OT:cscope/tags Thorsten Bonow @ 2006-12-04 20:37 ` Thorsten Bonow 2006-12-05 19:01 ` OT:cscope/tags Hadron Quark 2006-12-05 22:37 ` OT:cscope/tags Hadron Quark 0 siblings, 2 replies; 15+ messages in thread From: Thorsten Bonow @ 2006-12-04 20:37 UTC (permalink / raw) >>>>> "Toto" == Thorsten Bonow <thorsten.bonow@post.rwth-aachen.de> writes: [...] Toto> So I think what's wrong with xscope.el is the "do I need to update the Toto> database" algorithm. I made some additional tests which led to confusing results. Nevertheless I think they are useful if somebody wants to tackle the original problem of speeding up cscope for large projects as the linux kernel source. 1.) Trying to add the "-q" option to xcscope in my opinion is a step in the wrong direction: First of all I didn't manage to patch xcscope/cscope-indexer without performance going to hell, but then I tried using cscope *without* Emacs/xcscope and realised the following: If the database is build with the "-q" switch, after loading it cscope searches much faster in it compared to a database created without it, *but* exiting and restarting cscope would take much, much longer. Since xcscope.el uses cscope with the "one shot" option (-L), it has to restart and load the database for every search request: That is the reason why performance went down so badly. 2.) Trying to keep cscope running all the time (e.g. with the "-l" option) as discussed in the EmacsWiki (http://www.emacswiki.org/cgi-bin/wiki/CScopeAndEmacs) and put to test in bscope.el (http://groups.google.de/group/gnu.emacs.sources/browse_thread/thread/6e087f36c31336b8/92f00c90361f07da?hl=en) has the major drawback that the database is not updated between search requests. But in this case I have to compare search times to xcscope's behaviour when the `cscope-do-not-update-database' variable is set to a non-nil value (you can do this manually, via customise or in the "options" sub-menu of the xcscope menu): On my Athlon 700 box, searching for the global definition of a symbol took less than 2 seconds---in my opinion an acceptable time which should be even smaller on a more modern system. So, the way I see it your best bet is to disable automatic updating of the database and do it manually in your coffee breaks ;-) GNU global/gtags supports incremental updates, is sporting a nice Emacs interface with xgtags.el (http://home.tiscali.de/mgidde/source/xgtags.el) but---alas---handles only the search for symbols, nothing fancy like cscope's search for global definitions etc. Hope that helps. Toto -- Contact information and PGP key at http://www-users.rwth-aachen.de/thorsten.bonow You will pay for your sins. If you have already paid, please disregard this message. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: OT:cscope/tags 2006-12-04 20:37 ` OT:cscope/tags Thorsten Bonow @ 2006-12-05 19:01 ` Hadron Quark 2006-12-05 21:37 ` OT:cscope/tags Thorsten Bonow 2006-12-05 22:37 ` OT:cscope/tags Hadron Quark 1 sibling, 1 reply; 15+ messages in thread From: Hadron Quark @ 2006-12-05 19:01 UTC (permalink / raw) Thorsten Bonow <thorsten.bonow@post.rwth-aachen.de> writes: >>>>>> "Toto" == Thorsten Bonow <thorsten.bonow@post.rwth-aachen.de> writes: > > [...] > > Toto> So I think what's wrong with xscope.el is the "do I need to update the > Toto> database" algorithm. > > I made some additional tests which led to confusing results. Nevertheless I > think they are useful if somebody wants to tackle the original problem of > speeding up cscope for large projects as the linux kernel source. Firstly thanks for the help- > > 1.) Trying to add the "-q" option to xcscope in my opinion is a step in the > wrong direction: First of all I didn't manage to patch > xcscope/cscope-indexer without performance going to hell, but then I tried > using cscope *without* Emacs/xcscope and realised the following: If the > database is build with the "-q" switch, after loading it cscope searches > much faster in it compared to a database created without it, *but* exiting > and restarting cscope would take much, much longer. Since xcscope.el uses > cscope with the "one shot" option (-L), it has to restart and load the > database for every search request: That is the reason why performance went > down so badly. > > 2.) Trying to keep cscope running all the time (e.g. with the "-l" option) as > discussed in the EmacsWiki > (http://www.emacswiki.org/cgi-bin/wiki/CScopeAndEmacs) and put to test in > bscope.el > (http://groups.google.de/group/gnu.emacs.sources/browse_thread/thread/6e087f36c31336b8/92f00c90361f07da?hl=en) Is there an easy way to use bscope with all the cscope keybindings? > has the major drawback that the database is not updated between search > requests. But in this case I have to compare search times to xcscope's > behaviour when the `cscope-do-not-update-database' variable is set to a > non-nil value (you can do this manually, via customise or in the "options" > sub-menu of the xcscope menu): On my Athlon 700 box, searching for the > global definition of a symbol took less than 2 seconds---in my opinion an > acceptable time which should be even smaller on a more modern system. > > So, the way I see it your best bet is to disable automatic updating of the > database and do it manually in your coffee breaks ;-) > > GNU global/gtags supports incremental updates, is sporting a nice Emacs > interface with xgtags.el (http://home.tiscali.de/mgidde/source/xgtags.el) > but---alas---handles only the search for symbols, nothing fancy like cscope's > search for global definitions etc. > > Hope that helps. > > Toto -- ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: OT:cscope/tags 2006-12-05 19:01 ` OT:cscope/tags Hadron Quark @ 2006-12-05 21:37 ` Thorsten Bonow 0 siblings, 0 replies; 15+ messages in thread From: Thorsten Bonow @ 2006-12-05 21:37 UTC (permalink / raw) >>>>> "Hadron" == Hadron Quark <hadronquark@gmail.com> writes: Hadron> Thorsten Bonow <thorsten.bonow@post.rwth-aachen.de> writes: >> 2.) Trying to keep cscope running all the time (e.g. with the "-l" >> option) as discussed in the EmacsWiki >> (http://www.emacswiki.org/cgi-bin/wiki/CScopeAndEmacs) and put to test in >> bscope.el >> (http://groups.google.de/group/gnu.emacs.sources/browse_thread/thread/6e087f36c31336b8/92f00c90361f07da?hl=en) Hadron> Is there an easy way to use bscope with all the cscope keybindings? No, because bscope lacks most of the functionality of cscope. So it is not just a matter of rebinding keys. But my tests with bscope weren't much faster than running xcscope without updating the database (which bscope does not do, too). So I would recommend that you compare that on your machine first. There is a *new* cscope.el out there (http://www.mail-archive.com/gnu-emacs-sources@gnu.org/msg00205.html) which doesn't need an additional bash script and looks promising. Gave it a quick look and it could not open some of the files it showed as search results on my XEmacs. Toto -- Contact information and PGP key at http://www-users.rwth-aachen.de/thorsten.bonow It was a nice neighborhood. If you liked neighborhoods. Friedman, Kinky (1993), A case of Lone Star. New York (Wings Books), 302 ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: OT:cscope/tags 2006-12-04 20:37 ` OT:cscope/tags Thorsten Bonow 2006-12-05 19:01 ` OT:cscope/tags Hadron Quark @ 2006-12-05 22:37 ` Hadron Quark 1 sibling, 0 replies; 15+ messages in thread From: Hadron Quark @ 2006-12-05 22:37 UTC (permalink / raw) Thorsten Bonow <thorsten.bonow@post.rwth-aachen.de> writes: > requests. But in this case I have to compare search times to xcscope's > behaviour when the `cscope-do-not-update-database' variable is set to a > non-nil value (you can do this manually, via customise or in the "options" I set this to true and *bing* : fast enough. Thank you for your patient help. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: OT:cscope/tags 2006-12-04 9:40 OT:cscope/tags Hadron 2006-12-04 10:40 ` OT:cscope/tags Thorsten Bonow @ 2006-12-04 16:31 ` Perry Smith [not found] ` <mailman.1509.1165249894.2155.help-gnu-emacs@gnu.org> 2 siblings, 0 replies; 15+ messages in thread From: Perry Smith @ 2006-12-04 16:31 UTC (permalink / raw) Cc: help-gnu-emacs [-- Attachment #1.1: Type: text/plain, Size: 882 bytes --] There is a -q flag to cscope. WIthout that its pretty slow. On Dec 4, 2006, at 3:40 AM, Hadron wrote: > > Anyone here using cscope/etags? > > I have used cscope-indexer to index my gtk headers and the linux > kernel > but it is unbelievably slow compared to using emacs tags > functionality. Is this how it should be? Which of the many available > cscope packages out there is the right one to use with > > ,---- > | GNU Emacs 22.0.50.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll > bars) of > | 2006-09-19 on rothera, modified by Debian > `---- > _______________________________________________ > help-gnu-emacs mailing list > help-gnu-emacs@gnu.org > http://lists.gnu.org/mailman/listinfo/help-gnu-emacs > Perry Smith ( pedz@easesoftware.com ) Ease Software, Inc. ( http://www.easesoftware.com ) Low cost SATA Disk Systems for IBMs p5, pSeries, and RS/6000 AIX systems [-- Attachment #1.2: Type: text/html, Size: 6376 bytes --] [-- Attachment #2: Type: text/plain, Size: 152 bytes --] _______________________________________________ help-gnu-emacs mailing list help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <mailman.1509.1165249894.2155.help-gnu-emacs@gnu.org>]
* Re: OT:cscope/tags [not found] ` <mailman.1509.1165249894.2155.help-gnu-emacs@gnu.org> @ 2006-12-05 18:58 ` Hadron Quark 2006-12-05 20:19 ` OT:cscope/tags Perry Smith [not found] ` <mailman.1572.1165349985.2155.help-gnu-emacs@gnu.org> 0 siblings, 2 replies; 15+ messages in thread From: Hadron Quark @ 2006-12-05 18:58 UTC (permalink / raw) Perry Smith <pedz@easesoftware.com> writes: > There is a -q flag to cscope. WIthout that its pretty slow. > cscope? or cscope-indexer? > On Dec 4, 2006, at 3:40 AM, Hadron wrote: > > Anyone here using cscope/etags? > > I have used cscope-indexer to index my gtk headers and the linux kernel > but it is unbelievably slow compared to using emacs tags > functionality. Is this how it should be? Which of the many available > cscope packages out there is the right one to use with > > ,---- > | GNU Emacs 22.0.50.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of > | 2006-09-19 on rothera, modified by Debian > `---- > _______________________________________________ > help-gnu-emacs mailing list > help-gnu-emacs@gnu.org > http://lists.gnu.org/mailman/listinfo/help-gnu-emacs > > Perry Smith ( pedz@easesoftware.com ) > Ease Software, Inc. ( http://www.easesoftware.com ) > > Low cost SATA Disk Systems for IBMs p5, pSeries, and RS/6000 AIX systems > -- ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: OT:cscope/tags 2006-12-05 18:58 ` OT:cscope/tags Hadron Quark @ 2006-12-05 20:19 ` Perry Smith [not found] ` <mailman.1572.1165349985.2155.help-gnu-emacs@gnu.org> 1 sibling, 0 replies; 15+ messages in thread From: Perry Smith @ 2006-12-05 20:19 UTC (permalink / raw) Cc: help-gnu-emacs cscope. To make the db I use -q. To invoke it via emacs, I use -q and -d: -d Do not update the cross-reference. -q Enable fast symbol lookup via an inverted index. This option causes cscope to create 2 more files (default names ``cscope.in.out'' and ``cscope.po.out'') in addition to the nor- mal database. This allows a faster symbol search algorithm that provides noticeably faster lookup performance for large projects. On Dec 5, 2006, at 12:58 PM, Hadron Quark wrote: > Perry Smith <pedz@easesoftware.com> writes: > >> There is a -q flag to cscope. WIthout that its pretty slow. >> > > cscope? or cscope-indexer? > >> On Dec 4, 2006, at 3:40 AM, Hadron wrote: >> >> Anyone here using cscope/etags? >> >> I have used cscope-indexer to index my gtk headers and the >> linux kernel >> but it is unbelievably slow compared to using emacs tags >> functionality. Is this how it should be? Which of the many >> available >> cscope packages out there is the right one to use with >> >> ,---- >> | GNU Emacs 22.0.50.1 (i486-pc-linux-gnu, X toolkit, Xaw3d >> scroll bars) of >> | 2006-09-19 on rothera, modified by Debian >> `---- >> _______________________________________________ >> help-gnu-emacs mailing list >> help-gnu-emacs@gnu.org >> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs >> >> Perry Smith ( pedz@easesoftware.com ) >> Ease Software, Inc. ( http://www.easesoftware.com ) >> >> Low cost SATA Disk Systems for IBMs p5, pSeries, and RS/6000 AIX >> systems >> > > -- > _______________________________________________ > help-gnu-emacs mailing list > help-gnu-emacs@gnu.org > http://lists.gnu.org/mailman/listinfo/help-gnu-emacs > Perry Smith ( pedz@easesoftware.com ) Ease Software, Inc. ( http://www.easesoftware.com ) Low cost SATA Disk Systems for IBMs p5, pSeries, and RS/6000 AIX systems ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <mailman.1572.1165349985.2155.help-gnu-emacs@gnu.org>]
* Re: OT:cscope/tags [not found] ` <mailman.1572.1165349985.2155.help-gnu-emacs@gnu.org> @ 2006-12-05 22:39 ` Hadron Quark 2006-12-06 0:31 ` OT:cscope/tags Perry Smith [not found] ` <mailman.1581.1165365122.2155.help-gnu-emacs@gnu.org> 0 siblings, 2 replies; 15+ messages in thread From: Hadron Quark @ 2006-12-05 22:39 UTC (permalink / raw) Perry Smith <pedz@easesoftware.com> writes: > cscope. To make the db I use -q. To invoke it via emacs, I use -q > and -d: > > -d Do not update the cross-reference. > > -q Enable fast symbol lookup via an inverted Just for thread completeness, how do you add these options when inviking cscope from emacs? How are you accessing cscope from emacs? Which el package do you use? > index. This option > causes cscope to create 2 more files (default > names > ``cscope.in.out'' and ``cscope.po.out'') in addition to > the nor- > mal database. This allows a faster symbol search > algorithm that > provides noticeably faster lookup performance > for large > projects. > > On Dec 5, 2006, at 12:58 PM, Hadron Quark wrote: > >> Perry Smith <pedz@easesoftware.com> writes: >> >>> There is a -q flag to cscope. WIthout that its pretty slow. >>> >> >> cscope? or cscope-indexer? >> >>> On Dec 4, 2006, at 3:40 AM, Hadron wrote: >>> >>> Anyone here using cscope/etags? >>> >>> I have used cscope-indexer to index my gtk headers and the >>> linux kernel >>> but it is unbelievably slow compared to using emacs tags >>> functionality. Is this how it should be? Which of the many >>> available >>> cscope packages out there is the right one to use with >>> >>> ,---- >>> | GNU Emacs 22.0.50.1 (i486-pc-linux-gnu, X toolkit, Xaw3d >>> scroll bars) of >>> | 2006-09-19 on rothera, modified by Debian >>> `---- >>> _______________________________________________ >>> help-gnu-emacs mailing list >>> help-gnu-emacs@gnu.org >>> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs >>> >>> Perry Smith ( pedz@easesoftware.com ) >>> Ease Software, Inc. ( http://www.easesoftware.com ) >>> >>> Low cost SATA Disk Systems for IBMs p5, pSeries, and RS/6000 AIX >>> systems >>> >> >> -- >> _______________________________________________ >> help-gnu-emacs mailing list >> help-gnu-emacs@gnu.org >> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs >> > > Perry Smith ( pedz@easesoftware.com ) > Ease Software, Inc. ( http://www.easesoftware.com ) > > Low cost SATA Disk Systems for IBMs p5, pSeries, and RS/6000 AIX systems > > > > -- ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: OT:cscope/tags 2006-12-05 22:39 ` OT:cscope/tags Hadron Quark @ 2006-12-06 0:31 ` Perry Smith [not found] ` <mailman.1581.1165365122.2155.help-gnu-emacs@gnu.org> 1 sibling, 0 replies; 15+ messages in thread From: Perry Smith @ 2006-12-06 0:31 UTC (permalink / raw) Cc: help-gnu-emacs On Dec 5, 2006, at 4:39 PM, Hadron Quark wrote: > Perry Smith <pedz@easesoftware.com> writes: > >> cscope. To make the db I use -q. To invoke it via emacs, I use -q >> and -d: >> >> -d Do not update the cross-reference. >> >> -q Enable fast symbol lookup via an inverted > > Just for thread completeness, how do you add these options when > inviking > cscope from emacs? How are you accessing cscope from emacs? Which el > package do you use? Well, its a long story. I created my own cscope.el back in 1990. I'm happy to share it but it has lots of weird twisted gunk in it. I have the concept of an "inherited buffer". Each buffer has a buffer local variable that points back to its inherited buffer. In this way, different buffers can use different cscope's and not get confused between them. At the time, there was a lot of other things that were inherited besides just the cscope information (like build information and that sort of thing). I also have a script called cscope-front (I've appended it to the bottom). I doubt if it will do you much good either except just as a thought of calling cscope via a script and then that script can add and subtract arguments based upon a number of variables. This keeps the lisp code simpler -- I was more comfortable writing shell scripts than lisp code at the time. I create the cscope database via make. The makefile creates a list of files called cscope.files, (usually based upon various make variables), then it calls cscope as: cscope -q -b (The cscope I'm using defaults to looking in cscope.files for the list of files.) From emacs, I call cscope-front (using my cscope.el routines). As you can see, the script has debug output to /tmp/doggy. Here are some sample lines from doggy: /home/pedz/Eclipse/SATA/src a='' p='/home/pedz/Eclipse/SATA/src' /usr/local/bin/cscope -d -q -l -P /home/pedz/Eclipse/SATA/src -f cscope.out The last line is all the args I use to call cscope with. Hopefully, something in here will be useful to you. #!/usr/local/bin/bash # # First arg is the string to pass to setup, second arg is the # directory where the cscope should behave from # a=$1 p=$( echo $2 | sed -e 's%/$%%' ) CSCOPE=/usr/local/bin/cscope shift shift /bin/pwd >> /tmp/doggy echo "a='$a' p='$p'" >> /tmp/doggy if [ -n "$a" ] ; then source ~/.setup $a fi # # DFS permissions are weird and I can execute things even though the # file system says I can not. So I only check to see if the file # exists or not. # if [ -e cscope/bin/cscope ] ; then CSCOPE=cscope/bin/cscope elif [ -e ../cscope/bin/cscope ] ; then CSCOPE=../cscope/bin/cscope elif [ -e ../../cscope/bin/cscope ] ; then CSCOPE=../../cscope/bin/cscope fi echo $CSCOPE -d -q -l -P "$p" "$@" >> /tmp/doggy exec $CSCOPE -d -q -l -P "$p" "$@" 2>>/tmp/doggy # echo $CSCOPE -q -l -P "'$p'" "$@" >> /tmp/doggy # exec $CSCOPE -q -l -P "'$p'" "$@" 2>> /tmp/doggy # echo $CSCOPE -q -l >> /tmp/doggy # $CSCOPE -q -l 2>> /tmp/doggy # /afs/austin/aix/project/aix41C/cscope/bin/cscope -d -q -l \ # -f /afs/austin/aix/project/aix41C/cscope/bos.db # # -P /afs/austin/aix/project/aix41C/build/base ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <mailman.1581.1165365122.2155.help-gnu-emacs@gnu.org>]
* Re: OT:cscope/tags [not found] ` <mailman.1581.1165365122.2155.help-gnu-emacs@gnu.org> @ 2006-12-06 1:32 ` Hadron Quark 2006-12-06 3:19 ` OT:cscope/tags Perry Smith 0 siblings, 1 reply; 15+ messages in thread From: Hadron Quark @ 2006-12-06 1:32 UTC (permalink / raw) Perry Smith <pedz@easesoftware.com> writes: > On Dec 5, 2006, at 4:39 PM, Hadron Quark wrote: > >> Perry Smith <pedz@easesoftware.com> writes: >> >>> cscope. To make the db I use -q. To invoke it via emacs, I use -q >>> and -d: >>> >>> -d Do not update the cross-reference. >>> >>> -q Enable fast symbol lookup via an inverted >> >> Just for thread completeness, how do you add these options when >> inviking >> cscope from emacs? How are you accessing cscope from emacs? Which el >> package do you use? > > Well, its a long story. I created my own cscope.el back in 1990. I'm > happy to share it > but it has lots of weird twisted gunk in it. I have the concept of an > "inherited buffer". Each > buffer has a buffer local variable that points back to its inherited > buffer. In this way, > different buffers can use different cscope's and not get confused > between them. At the Can you expand on this? I dont understand. Did you try xcscope previously referenced? With auto database update turned off, it works great. > time, there was a lot of other things that were inherited besides just > the cscope information > (like build information and that sort of thing). > > I also have a script called cscope-front (I've appended it to the > bottom). I doubt if it > will do you much good either except just as a thought of calling > cscope via a script > and then that script can add and subtract arguments based upon a > number of > variables. This keeps the lisp code simpler -- I was more comfortable > writing shell > scripts than lisp code at the time. > > I create the cscope database via make. The makefile creates a list of > files called cscope.files, > (usually based upon various make variables), then it calls cscope as: > > cscope -q -b > > (The cscope I'm using defaults to looking in cscope.files for the list > of files.) > > From emacs, I call cscope-front (using my cscope.el routines). As you > can see, the script > has debug output to /tmp/doggy. Here are some sample lines from doggy: > > /home/pedz/Eclipse/SATA/src > a='' p='/home/pedz/Eclipse/SATA/src' > /usr/local/bin/cscope -d -q -l -P /home/pedz/Eclipse/SATA/src -f > cscope.out > > The last line is all the args I use to call cscope with. > > Hopefully, something in here will be useful to you. > > #!/usr/local/bin/bash > # > # First arg is the string to pass to setup, second arg is the > # directory where the cscope should behave from > # > a=$1 > p=$( echo $2 | sed -e 's%/$%%' ) > CSCOPE=/usr/local/bin/cscope > > shift > shift > > /bin/pwd >> /tmp/doggy > echo "a='$a' p='$p'" >> /tmp/doggy > if [ -n "$a" ] ; then > source ~/.setup $a > fi > # > # DFS permissions are weird and I can execute things even though the > # file system says I can not. So I only check to see if the file > # exists or not. > # > if [ -e cscope/bin/cscope ] ; then > CSCOPE=cscope/bin/cscope > elif [ -e ../cscope/bin/cscope ] ; then > CSCOPE=../cscope/bin/cscope > elif [ -e ../../cscope/bin/cscope ] ; then > CSCOPE=../../cscope/bin/cscope > fi > > echo $CSCOPE -d -q -l -P "$p" "$@" >> /tmp/doggy > exec $CSCOPE -d -q -l -P "$p" "$@" 2>>/tmp/doggy > # echo $CSCOPE -q -l -P "'$p'" "$@" >> /tmp/doggy > # exec $CSCOPE -q -l -P "'$p'" "$@" 2>> /tmp/doggy > # echo $CSCOPE -q -l >> /tmp/doggy > # $CSCOPE -q -l 2>> /tmp/doggy > > # /afs/austin/aix/project/aix41C/cscope/bin/cscope -d -q -l \ > # -f /afs/austin/aix/project/aix41C/cscope/bos.db > # > # -P /afs/austin/aix/project/aix41C/build/base > > > -- ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: OT:cscope/tags 2006-12-06 1:32 ` OT:cscope/tags Hadron Quark @ 2006-12-06 3:19 ` Perry Smith 0 siblings, 0 replies; 15+ messages in thread From: Perry Smith @ 2006-12-06 3:19 UTC (permalink / raw) Cc: help-gnu-emacs On Dec 5, 2006, at 7:32 PM, Hadron Quark wrote: > Perry Smith <pedz@easesoftware.com> writes: > >> On Dec 5, 2006, at 4:39 PM, Hadron Quark wrote: >> >>> Perry Smith <pedz@easesoftware.com> writes: >>> >>>> cscope. To make the db I use -q. To invoke it via emacs, I use -q >>>> and -d: >>>> >>>> -d Do not update the cross-reference. >>>> >>>> -q Enable fast symbol lookup via an inverted >>> >>> Just for thread completeness, how do you add these options when >>> inviking >>> cscope from emacs? How are you accessing cscope from emacs? Which el >>> package do you use? >> >> Well, its a long story. I created my own cscope.el back in 1990. >> I'm >> happy to share it >> but it has lots of weird twisted gunk in it. I have the concept >> of an >> "inherited buffer". Each >> buffer has a buffer local variable that points back to its inherited >> buffer. In this way, >> different buffers can use different cscope's and not get confused >> between them. At the > > Can you expand on this? I dont understand. I was working on debugging the entire OS. Once at Tandem, the other at IBM. At the time, it was not practical to have one cscope database for the entire OS. So I had separate cscope files for the particular areas I would be working in. So if I was editing a group of files down the path /a/b/c/d which had a cscope database in d, then all the files in d would point back to the cscope buffer using the database in d. At the same time, I might be editing and looking at files down the path /u/v/w/x which would have its own separate cscope db. All the files in x would point back to the cscope buffer using the db in x. I could look at various things in separate files and do symbol lookups, etc. There was also the problem of various build versions of the OS. Again, I could have separate db's in the various directories so foodog.h from build 1 would look at the cscope db file from build 1 while foodog.h from build 2 would look at the cscope db from build 2. This is also where I had "inherited" buffer local variables. So if I did a make in foodog.h of build 1, it would use the proper commands for build level 1. > Did you try xcscope previously referenced? With auto database update > turned off, it works great. I like what I have very much except that cscope does not actually truly understand C++ so it can not really find me all the references to a particular method of a particular class. >> time, there was a lot of other things that were inherited besides >> just >> the cscope information >> (like build information and that sort of thing). >> >> I also have a script called cscope-front (I've appended it to the >> bottom). I doubt if it >> will do you much good either except just as a thought of calling >> cscope via a script >> and then that script can add and subtract arguments based upon a >> number of >> variables. This keeps the lisp code simpler -- I was more >> comfortable >> writing shell >> scripts than lisp code at the time. >> >> I create the cscope database via make. The makefile creates a >> list of >> files called cscope.files, >> (usually based upon various make variables), then it calls cscope as: >> >> cscope -q -b >> >> (The cscope I'm using defaults to looking in cscope.files for the >> list >> of files.) >> >> From emacs, I call cscope-front (using my cscope.el routines). As >> you >> can see, the script >> has debug output to /tmp/doggy. Here are some sample lines from >> doggy: >> >> /home/pedz/Eclipse/SATA/src >> a='' p='/home/pedz/Eclipse/SATA/src' >> /usr/local/bin/cscope -d -q -l -P /home/pedz/Eclipse/SATA/src -f >> cscope.out >> >> The last line is all the args I use to call cscope with. >> >> Hopefully, something in here will be useful to you. >> >> #!/usr/local/bin/bash >> # >> # First arg is the string to pass to setup, second arg is the >> # directory where the cscope should behave from >> # >> a=$1 >> p=$( echo $2 | sed -e 's%/$%%' ) >> CSCOPE=/usr/local/bin/cscope >> >> shift >> shift >> >> /bin/pwd >> /tmp/doggy >> echo "a='$a' p='$p'" >> /tmp/doggy >> if [ -n "$a" ] ; then >> source ~/.setup $a >> fi >> # >> # DFS permissions are weird and I can execute things even though the >> # file system says I can not. So I only check to see if the file >> # exists or not. >> # >> if [ -e cscope/bin/cscope ] ; then >> CSCOPE=cscope/bin/cscope >> elif [ -e ../cscope/bin/cscope ] ; then >> CSCOPE=../cscope/bin/cscope >> elif [ -e ../../cscope/bin/cscope ] ; then >> CSCOPE=../../cscope/bin/cscope >> fi >> >> echo $CSCOPE -d -q -l -P "$p" "$@" >> /tmp/doggy >> exec $CSCOPE -d -q -l -P "$p" "$@" 2>>/tmp/doggy >> # echo $CSCOPE -q -l -P "'$p'" "$@" >> /tmp/doggy >> # exec $CSCOPE -q -l -P "'$p'" "$@" 2>> /tmp/doggy >> # echo $CSCOPE -q -l >> /tmp/doggy >> # $CSCOPE -q -l 2>> /tmp/doggy >> >> # /afs/austin/aix/project/aix41C/cscope/bin/cscope -d -q -l \ >> # -f /afs/austin/aix/project/aix41C/cscope/bos.db >> # >> # -P /afs/austin/aix/project/aix41C/build/base >> >> >> > > -- > _______________________________________________ > help-gnu-emacs mailing list > help-gnu-emacs@gnu.org > http://lists.gnu.org/mailman/listinfo/help-gnu-emacs > Perry Smith ( pedz@easesoftware.com ) Ease Software, Inc. ( http://www.easesoftware.com ) Low cost SATA Disk Systems for IBMs p5, pSeries, and RS/6000 AIX systems ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2006-12-06 3:19 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2006-12-04 9:40 OT:cscope/tags Hadron 2006-12-04 10:40 ` OT:cscope/tags Thorsten Bonow 2006-12-04 11:52 ` OT:cscope/tags Hadron Quark 2006-12-04 14:43 ` OT:cscope/tags Thorsten Bonow 2006-12-04 20:37 ` OT:cscope/tags Thorsten Bonow 2006-12-05 19:01 ` OT:cscope/tags Hadron Quark 2006-12-05 21:37 ` OT:cscope/tags Thorsten Bonow 2006-12-05 22:37 ` OT:cscope/tags Hadron Quark 2006-12-04 16:31 ` OT:cscope/tags Perry Smith [not found] ` <mailman.1509.1165249894.2155.help-gnu-emacs@gnu.org> 2006-12-05 18:58 ` OT:cscope/tags Hadron Quark 2006-12-05 20:19 ` OT:cscope/tags Perry Smith [not found] ` <mailman.1572.1165349985.2155.help-gnu-emacs@gnu.org> 2006-12-05 22:39 ` OT:cscope/tags Hadron Quark 2006-12-06 0:31 ` OT:cscope/tags Perry Smith [not found] ` <mailman.1581.1165365122.2155.help-gnu-emacs@gnu.org> 2006-12-06 1:32 ` OT:cscope/tags Hadron Quark 2006-12-06 3:19 ` OT:cscope/tags Perry Smith
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.