Bug 454913 - Missing "Offset" field in Symbols getContext in some cases.
Summary: Missing "Offset" field in Symbols getContext in some cases.
Status: NEW
Alias: None
Product: TCF
Classification: Tools
Component: Agent (show other bugs)
Version: 1.3   Edit
Hardware: PC Linux
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Eugene Tarassov CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-11 11:39 EST by xavier pouyollon CLA
Modified: 2014-12-11 11:39 EST (History)
0 users

See Also:


Attachments
TCF Log (352.32 KB, text/x-log)
2014-12-11 11:39 EST, xavier pouyollon CLA
no flags Details
Binary / Sources (112.45 KB, application/gzip)
2014-12-11 11:39 EST, xavier pouyollon CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description xavier pouyollon CLA 2014-12-11 11:39:10 EST
Hi Eugene,

We are debugging the attached Ada program, in a vxWorks context.
We are stopped at line 29 in foo.adb and want to display r3.

We have a client tool that will send some TCF queries to display r3.
Please see the ada.log file.

From ada.log, line 1893 is the dump for command:
(wrdbg) print r3
$1 = {l1 = 0, l2 = 1, i1 = 1, a1 = <no value>, i2 = <no value>, a2 = <no value>, i3 = <no value>}

Let's study what's happening for "print r3"
C 401 Expressions create "FP0.P2.2284235992" null "r3" <eom>
C 408 Symbols getChildren "@S4.801.FA3746.546609D0%B.938*B.873+3.0.0.0.P2.2284235992" <eom>

There, we have a list of children.
Please look at the result of getContext for these children : Some of them have the "Offset" field. Great. Our tool is using this to retrieve the value.
You'll see the "a1" field has the Offset field.
TCF 16:11:24.995: 2: <--- R 414  {"ID":"@S2.801.FA3746.546609D0%B.994*B.873+3.0.0.0.P2.2284235992","OwnerID":"P2.2284235992","UpdatePolicy":1,"Name":"a1","TypeClass":5,"TypeID":"@S4.801.FA3746.546609D0%B.96C*B.873+3.0.0.0.P2.2284235992","BaseTypeID":"@S4.801.FA3746.546609D0%B.A33*B.873+2.0.0.0.P2","IndexTypeID":"@S4.801.FA3746.546609D0%B.97D*B.873+3.0.0.0.P2.2284235992","ContainerID":"@S4.801.FA3746.546609D0%B.938+3.0.0.0.P2.2284235992","Size":0,"Length":0,"LowerBound":1,"UpperBound":0,"Offset":12,"Flags":8192,"Frame":0,"Class":2} <eom>

But "a2" has no "Offset" field.
TCF 16:11:24.995: 2: <--- R 418  {"ID":"@S2.801.FA3746.546609D0%B.9DC*B.873+3.0.0.0.P2.2284235992","OwnerID":"P2.2284235992","UpdatePolicy":1,"Name":"a2","TypeClass":5,"TypeID":"@S4.801.FA3746.546609D0%B.9B4*B.873+3.0.0.0.P2.2284235992","BaseTypeID":"@S4.801.FA3746.546609D0%B.A33*B.873+2.0.0.0.P2","IndexTypeID":"@S4.801.FA3746.546609D0%B.9C5*B.873+3.0.0.0.P2.2284235992","ContainerID":"@S4.801.FA3746.546609D0%B.938+3.0.0.0.P2.2284235992","Size":4,"Length":1,"LowerBound":1,"UpperBound":1,"Flags":8192,"Frame":0,"Class":2} <eom>

To us, this is a problem and that's why our tool can not retrieve r3 correctly.

PS : From line 1939, this is the result of 
print r3.a2 : Here, value is correctly displayed because we don't need the Offset field because we ask to directly display the array, so "Offset" has no meaning here.

PS2 : From line 1980, I see the expression view tries to do something like <var>.{field ID}. 
However, we think a client tool should be able to rely totally on the children list returned by getChildren and have the "Offset" returned by getContext for all these children.

Thanks !
Comment 1 xavier pouyollon CLA 2014-12-11 11:39:31 EST
Created attachment 249357 [details]
TCF Log
Comment 2 xavier pouyollon CLA 2014-12-11 11:39:49 EST
Created attachment 249358 [details]
Binary / Sources