Hi Hans-Bernhard,
Thanks for the work. I have access to a IA64 machine which I'd like to
try this out on as the -q option fails there.
Petr
> Hello, everybody,
>
> in a little discussion about bugs found in fscanner.l, I noticed that
> while I could manage to fix the original bug by a more up-to-date of
> fscanner.l (and modifications to the other files needed by it), one
> similar bug remained, on a 64bit Alpha/DigitalUnix4.0 machine:
> The symbol 'sun' is not found if cscope is in '-q' mode, working
> on its own source tree:
>
> acaxp6-broeker cscope/cscope/src> cscope -V
> cscope: version 15.2b
> acaxp6-broeker cscope/cscope/src> cscope -ulL0 sun
> constants.h <global> 46 #if Linux || BSD && !sun
> constants.h <global> 120 #if !sun
> global.h <global> 53 #if SVR2 || BSD && !sun
> /usr/include/sys/ioctl.h <global> 102 #if defined(_KERNEL) && defined(sun)
> /usr/include/sys/ioctl.h <global> 274 #ifdef sun
> crossref.c putcrossref 235 #if BSD && !sun && !__FreeBSD__
> main.c main 148 #if SVR2 && !BSD && !V9 && !u3b2 && !sun
> main.c main 259 #if !BSD || sun
> main.c main 383 #if SVR2 && !BSD && !V9 && !u3b2 && !sun
> main.c putheader 1150 #if BSD && !sun
> acaxp6-broeker cscope/cscope/src> cscope -qulL0 sun
>
> Note how the last 'cscope' command produced no output at all.
>
> I managed to fix at least this consequence of the quite VAX-o-centric code
> in invlib.c, on this platform. The files will still be twice as large as
> on a 32bit machine, but at least it works, now:
>
> acaxp6-broeker cscope/cscope/src> ../alpha/src/cscope -qulL0 sun
> constants.h <global> 46 #if Linux || BSD && !sun
> constants.h <global> 120 #if !sun
> [...]
>
> The fix is to replace one more magic number by a properly calculated
> term depending upon sizeof(long):
>
> Here's the patch for invlib.c:
>
> @@ -481,8 +538,12 @@ invnewterm(void)
> *supint++ = nextsupfing;
> nextsupfing += strlen(thisterm) + 1;
> }
> - }
> - lastinblk -= (numwilluse - 8);
> + } /* endif (logicalblk full) */
> +
> + /* Fill symbol names into logicalblk from the rear end */
> + /* HBB 20010430: changed this from magic number '8' to
> + * 2*sizeof(long). */
> + lastinblk -= (numwilluse - 2*sizeof(long));
> iteminfo.e.offset = lastinblk;
> iteminfo.e.size = len;
> iteminfo.e.space = 0;
>
> As I still haven't really understood how on earth all this invlib stuff is
> supposed to work (because of lack of any algorithm or data structure
> documentation) I'm not going to check this in immediately. So please try
> it out, and tell me about your findings.
>
> --
> Hans-Bernhard Broeker (broeker@...)
> Even if all the snow were burnt, ashes would remain.
>
> _______________________________________________
> Cscope-devel mailing list
> Cscope-devel@...
> http://lists.sourceforge.net/lists/listinfo/cscope-devel
--
--------------------------------------------------------
Petr Sorfa Senior Software Engineer
Santa Cruz Operation (SCO)
430 Mountain Ave. http://www.sco.com
Murray Hill 07974
NJ, USA
--------------------------------------------------------
Disclaimer: All my comments are my own and nobody else's
----------------------------------------------------------
|