Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Feb 2000 09:44:30 -0500
From:      nadas@torrentnet.com
To:        Castor Fu <castor@alumni.caltech.edu>, freebsd-ports@freebsd.org
Cc:        Bill Fumerola <billf@chc-chimes.com>, Chris Piazza <cpiazza@jaxon.net>
Subject:   cscope issues
Message-ID:  <200002251444.JAA22080@castillo.torrentnet.com>

next in thread | raw e-mail | index | archive | help
<color><param>0100,0100,0100</param><FontFamily><param>Courier New</param>Hi,


I am using cscope, and I have found a couple of 
problems that I can work around, but I think should get 
fixed.  I can pick away at these problems, but probably 
someone who knows the cscope code/theory would be 
better, certainly faster than me.  I've very willing to 
help test or provide added information, etc.  However, 
I don't follow the freebsd ports mailing list.


1) We use the -b -q options to build the database and   
   the -d to examine it for faster searches.  On the    
   FreeBSD (2.2.2 & 2.2.8 vintage) /sys tree the        
   inverted index build fails(!) because, in invlib.c   
   near line 181, s is sometimes null.  When this is    
   the case, the assignment of the trailing '\0'        
   abends.  My *workaround* follows, but this is not    
	a fix.


	/* now loop as long as more to read (till eof)  */

	while (fgets(line, LINEMAX, infile) != NULL) {

  #if DEBUG || STATS

		++totpost;

  #endif

		s = (unsigned char *) strchr(line, SEP);


		if (!s) /*s sjn*/

		  {

		    fprintf(stderr,"%d %s",strlen(line),line); 
/*debug*/   

		    s=line+(strlen(line)-1);

		  }    /*e sjn*/

                

		*s = '\0';


  When I run cscope, this fragment produces: 

  18 isa/isa_device.h>

  18 isa/isa_device.h>


  Which I've tracked back to these 2 files that are   
causing the problem: 

 


  src/sys/pc98/i386/trap.c   

  src/sys/i386/i386/trap.c 


  because they both have this statement: 


  #include <<machine/../isa/isa_device.h>

 


  (which btw, I don't really understand, but, hey) I    
  think this include is screwing up cscope's parsing    
  somehow. 


2) This next problem can be my non-understanding of how 
   one is to do this, but I suspect it has to do with   
   lex/flex differences.  cscope is really a lex        
   application, right? 

   

   I need to enlarge YY_BUF_SIZE and YYLMAX.  right     
   now, I make the code then manually recreate          
   scanner.tmp.c, edit it to up the sizes, and 

   then recompile it, and then relink.  I tried various 
   other approaches involving compile time flags and so 
   on, to no avail. 


Thanks, and let me know what I can to to help resolve 
these. <FontFamily><param>Arial</param>

<nofill>
Regards,
Steve 

Stephen Nadas				Ericsson IP Infrastructure
nadas@torrentnet.com 			920 Main Campus Drive, Suite 500 
Voice: +1-919-472-9935 Fax: x/9999	Raleigh, NC 27606


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200002251444.JAA22080>