Menu

#56 patch for bug #449808: cscope.in.out doesn't migrate

open
None
5
2005-11-22
2005-11-17
Huomenta
No

Makes on-the-fly conversion of the inverted index
byteorder if cscope detects that index file has been
written on architecture with different endianess. This
patch meant for 32-bit machines, but it can be easily
extended to handle 64 bits too.

Tested on Linux 2.6 and Solaris 2.7

Discussion

  • Huomenta

    Huomenta - 2005-11-17

    patch for sf cscope-15.5

     
  • Hans-Bernhard Broeker

    • assigned_to: nobody --> broeker
     
  • Hans-Bernhard Broeker

    Logged In: YES
    user_id=27517

    I can't test this patch myself for lack of any big-endian
    machine where it would make a difference.

    It seems to be going in the right direction. It's probably
    worth checking in as-is, but I'd like to see confirmation
    that it actually works, before we embark on such a
    potentially dangerous journey. My main concern is that this
    introduces an incompatible change to the file format. I.e.
    it could break situations that used to work, even if they
    did so more by luck than by design.

     
  • Huomenta

    Huomenta - 2005-11-22

    Logged In: YES
    user_id=1338047

    I think incompatible change to file format you are talking
    about is not really needed. It was added mostly for
    debugging and as a hopeless try to make inverted index
    header more suitable for portability. I will change this and
    post updated patch here. In this shape, index file produced
    by patched cscope will be 100% identical to file build by
    stable one.

     
  • Huomenta

    Huomenta - 2005-11-27

    Logged In: YES
    user_id=1338047

    Here is the updated patch for cscope 15.5. This time the
    patch has been cleaned out of incompatible and unrelated
    changes.

     
  • Huomenta

    Huomenta - 2005-11-27

    convert byteorder of inverted index

     
  • Huomenta

    Huomenta - 2005-11-27

    convert byteorder of inverted index, cvs20051122

     
  • Huomenta

    Huomenta - 2005-11-27

    Logged In: YES
    user_id=1338047

    Same patch against cvs20051122

     
  • Hans-Bernhard Broeker

    Logged In: YES
    user_id=27517

    Patch is looking good, except for two details:

    1) we don't need patches to 15.5 --- if this goes into any
    cscope release, it'll be the next one, based on current CVS
    head.

    2) A technicality: write_params() is using the contents of a
    block-scoped variable after that block has been quit.
    That's undefined behaviour.

     

Log in to post a comment.