Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tcf-dev] Quick expressions support in TCF

Benoit,

to me, the "Display" of "string" has redundant info (aka the value).

Also, would it make sense to limit the Display to json only value/types
: object, array, number, string, true, false, null.

BTW, what about objects/object pointers ?

Thanks

DERF

On 08/22/2016 12:47 PM, Benoit Perrin wrote:
Hello TCF dev,

I would like to contribute a new service to the TCF agent. This service
can be used by client instead of the Expressions service to get basic
information about expressions with few TCF requests. So, in the context
of a connection with high network latencies, a client can visualize
expressions quicker.

The service returns less information than the Expressions service;
instead, it returns high level data that a UI client can display
directly without extra requests. For example, it returns the value of
the expression as a string and gives a quick access to the children of
the expression (e.g. pointer, array, structure for C language).

For example, for a C structure like:

|test.integer = 1234;|

|test.string = "A string";|

|test.floating = 3.14;|

|test.array[0] = 'A';|

Evaluating the expressions with this service, it returns the info:

 {"Error":null,"TypeName":"struct
TEST","TypeKind":6,"Value":"0x00007FFF9CFB81A0","HasChildren":true,"ID":"WREXPR.10.FP0.P18456.18456.48.@M0.@S4%28.B708DE.57BACF34.1C.79*28.B708DE.57BACF34.1C.EA+2.0.0.0.P18456.1.7FFF9CFB81A0","Label":"test","Display":"test
: 0x00007FFF9CFB81A0"}

The "Display" field is a proposition of a display of the expression
'test' that the client can use directly.

Getting the children of the expressions, it returns a list of info:

 [{"Error":null,"SymbolName":"integer","TypeName":"int","TypeKind":2,"Value":"1234","ID":"WREXPR.10.FP0.P18456.18456.48.@M0.@S4%28.B708DE.57BACF34.1C.57*28.B708DE.57BACF34.1C.EA+2.0.0.0.P18456.1.7FFF9CFB81A0","Label":"integer","Display":"integer : 1234"},
{"Error":null,"SymbolName":"string","TypeName":"char *","TypeKind":4,"Value":"0x0000000000400634","HasChildren":true,"ID":"WREXPR.10.FP0.P18456.18456.48.@M0.@S4%28.B708DE.57BACF34.1C.6C*28.B708DE.57BACF34.1C.EA+2.0.0.0.P18456.1.400634","Label":"string","Display":"string : 0x0000000000400634 \"A string\""},
{"Error":null,"SymbolName":"floating","TypeName":"double","TypeKind":3,"Value":"3.140000000000000","ID":"WREXPR.10.FP0.P18456.18456.48.@M0.@S4%28.B708DE.57BACF34.1C.B6*28.B708DE.57BACF34.1C.EA+2.0.0.0.P18456.1.7FFF9CFB81B0","Label":"floating","Display":"floating : 3.140000000000000"},
{"Error":null,"SymbolName":"array","TypeName":"char [10]","TypeKind":5,"Value":"0x00007FFF9CFB81B8","HasChildren":true,"ID":"WREXPR.10.FP0.P18456.18456.48.@M0.@S4%28.B708DE.57BACF34.1C.BD*28.B708DE.57BACF34.1C.EA+2.0.0.0.P18456.1.7FFF9CFB81B8","Label":"array","Display":"array : 0x00007FFF9CFB81B8 \"A\\u0004@\""}]

With only two requests to the agent, the client is able to display basic
information about a frame variable.


Do you think there is an interest by this contribution to the core TCF?

Any comment/suggestion is welcome.

Benoit

--
Benoit Perrin, Senior Member of Technical Staff, Wind River



_______________________________________________
tcf-dev mailing list
tcf-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tcf-dev



Back to the top