Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tcf-dev] Handling of storage size in Expressions service

Hi all,

this question is related to a bug I filed recently (#489742).

I am using the expression service from a python script to
assign a value to a variable. The variable is an int (4 bytes).
So, I use "Expressions create" (which confirms "Size":4),
and then "Expressions assign" with a 4 bytes value encoded (e.g. "AAAACg==").

The issue is that my variable is stored in a 64 bits register,
and because of the endianess, the wrong part of the register is updated.

Although I can propose a fix for this, I wondered if it was the right approach...

Indeed, I checked the behavior of the TCF code in Eclipse/CDT, and
it works fine, only because the java client does things differently.

The eclipse.tcf.debug.ui will first "evaluate" the variable.
This returns a 64-bit buffer (e.g "AAAAAAAAAAo=") bigger than the variable.
It will use the size of the returned buffer for the new value encoding,
then pass it to "Expressions assign".

So, my question is : Shall the expression service cope with such size mismatch
(it does seem to handle the reverse case : big value into small register)
or shall the client support the burden of checking value size and perform
and padding/over-sizing  ?

Any feedback is welcome

Regards,

Vincent


Back to the top