Menu

#54 cscope.in.out doesn't migrate

open-accepted
None
5
2001-08-10
2001-08-10
Anonymous
No

I've built cscope 15.3 for Solaris and for RH Linux.

While the cscope.out database migrates between the
two systems, meaning I can build on one system and
read it on the other, the same is not true for the
reverse lookup files. If I build with -q on Linux,
Solairs can't take advantage of the reverse index
files it built and vice-versa. Could there be an
endian problem in the file format?

Discussion

  • Hans-Bernhard Broeker

    Logged In: YES
    user_id=27517

    Could easily be, yes. The reverse index created by -q mode
    is a native binary file. The code dealing with it (invlib.c)
    is so convoluted that there's hardly a chance anybody will
    be going over it and make it endian-safe. It took several
    tries (and massive changes to a private copy of the sources)
    to make it even work at all on a non-VAX-o-centric type of
    machine (Alpha CPU).

    Indeed, there's a plan waiting for action that we dump this
    module altogether and replace it by a proper database
    library (Berkeley DB or similar).

     
  • Hans-Bernhard Broeker

    • assigned_to: nobody --> broeker
    • status: open --> open-accepted
     
  • Jason Duell

    Jason Duell - 2002-03-01

    Logged In: YES
    user_id=125727

    I'd like to take a look at this at some point. There are
    some other problems I've discovered with the -q index files.

    A good first step might be to make the -q index files work
    with the '-c' option: right now they are still compressed
    even if you pass that flag.

     
  • Hans-Bernhard Broeker

    Logged In: YES
    user_id=27517

    Storing the additional .po.out, and .in.out files in ASCII
    mode is really not feasible. These files are stock full of
    internal references to binary file positions, and all those
    numbers are themselves stored in binary format. Mapping
    this structure to an ASCII format may very well be harder
    than just tracking down any problems you observed directly
    in an interactive debugging session.

    I.e. it's not "compression" as in the cscope.out file that
    makes these files have non-ASCII contents, it's the nature
    of the files
    themselves.

    There really isn't much point in fiddling with -q mode (i.e.
    invlib.[ch]) --- it has be rewritten from scratch, or
    replaced by a database library that stores portable files.

    If you know of any problems with -q mode right now, please
    describe them (mail to the list, or file them as bug reports
    here --- you choose).

     
  • Neil Horman

    Neil Horman - 2005-11-17

    Logged In: YES
    user_id=827328

    If you're interested in estimating the extent of the problem
    in the inverted index, build an inverted index on both
    solaris and linux, and then run cmp on the two indicies.
    The offsets and differences will give you a decent hint as
    to what (at least a subset of) the problems are.

     

Log in to post a comment.