Bug 4234

Summary: print array[x][y]
Product: frysk Reporter: Andrew Cagney <cagney>
Component: generalAssignee: Teresa Thomas <tthomas>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:
Bug Depends on:    
Bug Blocks: 2246    

Description Andrew Cagney 2007-03-21 13:59:38 UTC
 
Comment 1 Stan Cox 2007-04-20 16:37:11 UTC
Actually ArrayType already implements this.  Tested in TestValue.java.
Comment 2 Andrew Cagney 2007-11-19 17:42:02 UTC
or more complex cases such as print arr[1].foo[2]
Comment 3 Teresa Thomas 2007-11-19 18:06:27 UTC
Should work.
eg. from funit-address:

(fhpd) print (*my_cars_list[0]).skoda    
[0.0]
{2,3}
(fhpd) print (*my_cars_list[0]).skoda[0]
[0.0]
2
Comment 4 Teresa Thomas 2007-11-19 21:48:55 UTC
    [] implemented as a Type Operator.
    
    frysk-core/frysk/expr/ChangeLog
    2007-10-26  Teresa Thomas  <tthomas@redhat.com>
    
    	* CExprEvaluator.g (INDEX): New.
    	* CExpr.g (INDEX): New.
    
    frysk-core/frysk/value/ChangeLog
    2007-10-26  Teresa Thomas  <tthomas@redhat.com>
    
    	* TestArray.java (testIndexOneD): New.
    	(testIndexTwoD): New.
    	* ArrayType.java (index): New.
    	* Type.java (index): New.
    	* TypeDecorator.java (index): New.