Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] debugging index marshalling issues

There are couple places in marshalling and unmarshalling code that cause concerns:

  1. The value of the first byte used for UNSTORABLE_TYPE (0xFD) doesn't collide with UNKNOWN_MEMBER_CLASS_INSTANCE (0x0D) | FLAG1 (0x10) | FLAG2 (0x20) | FLAG3 (0x40) | FLAG4 (0x80) only because marshalling of CPPUnknownClassInstance does not use flags. INDIRECT_TYPE (0xFF) and BINDING_TYPE (0xFE) also nearly avoid collision with ALIAS_TEMPLATE (0x0F) and DEFERRED_CLASS_INSTANCE (0x0E). This looks very fragile.
  2. There is a seemingly unnecessary zero byte in marshalling of IBinding (TypeMarshalBuffer.java line 88). This zero byte is skipped unconditionally during unmarshalling (line 101). Nevertheless an attempt to remove the line 88 and to change the line 101 to fPos++ instead of fPos += 2 leads to numerous unmarshalling errors. Does anybody know why a zero byte after BINDING_TYPE is necessary?
-sergey


On Wed, Dec 12, 2012 at 5:24 PM, Nathan Ridge <zeratul976@xxxxxxxxxxx> wrote:

Hello,

I am trying to debug an issue that arises during the unmarshalling
of some data (types/bindings/evaluations) from the index [1].

It seems that there is some asymmetry between the marshaling and
the unmarshaling, or some data is being corrupted (an
EvalBinaryTypeId is being unmarshalled from the index even though
the parser never created an EvalBinaryTypeId or wrote one to the
index).

I am wondering, does anyone have suggestions/tips for debugging
such an issue? I'm not really sure how to go about it.

Thanks,
Nate

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=395243#c6

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top