Bug 473766 - Getting wrong part of the 64-bits register during expression evaluation
Summary: Getting wrong part of the 64-bits register during expression evaluation
Status: RESOLVED FIXED
Alias: None
Product: TCF
Classification: Tools
Component: Agent (show other bugs)
Version: 1.3   Edit
Hardware: Power PC All
: P3 normal (vote)
Target Milestone: 1.4   Edit
Assignee: Project Inbox CLA
QA Contact: Eugene Tarassov CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-28 10:29 EDT by Vincent Hue CLA
Modified: 2016-03-18 08:21 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Hue CLA 2015-07-28 10:29:22 EDT
I am debugging a PowerPC 64 application, Big Endian. 

My unsigned short (16 bits) variable is stored in a register. 
The expression evaluator does not return the right value for this variable, 
it takes the 16 upper bits of the 64 bits register instead of the lower 16b-bits.

0x0000
Hex: 0000, Dec: 0, Oct: 0
Bin: 0000,0000,0000,0000
Size: 2 bytes, Type: UINT16
Register: r3
r3	00000000000000ab	171	


If I modify R3 manually to another value : 

r3	00780000000000ab	33776997205278891	

The variable value becomes :

0x0078
Hex: 0078, Dec: 120, Oct: 0170
Bin: 0000,0000,0111,1000
Size: 2 bytes, Type: UINT16
Register: r3

The same thing happens with 8 (uchar) and 32 (uint) variables. 

TCF 13:39:42.015: 2: ---> C RR108704 Expressions create "FP0.P2.18446603336225700272" null "va" <eom>
TCF 13:39:42.024: 2: <--- R RR108704  {"ID":"EXPR23","ParentID":"FP0.P2.18446603336225700272","Expression":"va","CanAssign":true,"Class":1,"Type":"@S4.801.312CDE9.55B77EA9%14.27AB*14.1CC1+2.0.0.0.P2","Size":2} <eom>
TCF 13:39:42.024: 2: ---> C RR108705 Expressions evaluate "EXPR23" <eom>
TCF 13:39:42.026: 2: <--- R RR108705 "AAA="  {"Class":1,"Type":"@S4.801.312CDE9.55B77EA9%14.27AB*14.1CC1+2.0.0.0.P2","Symbol":"@S2.801.312CDE9.55B77EA9%14.1CC1&+3.0.0.0.P2.18446603336225700272","Register":"R3@0.P2.18446603336225700272","BigEndian":true} <eom>
Comment 1 Eugene Tarassov CLA 2015-07-28 16:25:49 EDT
The Expressions service incorrectly reduces value size from 4 to 2 bytes.
Fixed.
Thanks!