Summary: | print pointer[0] | ||
---|---|---|---|
Product: | frysk | Reporter: | Andrew Cagney <cagney> |
Component: | general | Assignee: | 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, 5292 |
Description
Andrew Cagney
2007-11-02 16:17:24 UTC
Dereferencing arrays with * requires word size, word size passed to ALU from expression evaluator. Commit: Implement *(array + index), Call add(), plusEquals() directly from expression evaluator. frysk-core/frysk/value/ChangeLog 2007-11-05 Teresa Thomas <tthomas@redhat.com> * TestValue.java: Update. * ArithmeticUnit.java (plusEqual): New. * ArithmeticType.java (add): Delete. (plusEqual): Delete. * Type.java (add): Delete. (plusEqual): Delete. * TestArray.java (testAdd): New test. * AddressUnit.java (AddressUnit(ArrayType, int wordSize)): New. (addArray): New. * ArrayType.java (getALU): Give wordSize to ALU. * FloatingPointType.java (getALU): Ditto. * IntegerType.java (getALU): Ditto. * PointerType.java (getALU): Ditto. * Type.java (getALU): Ditto. * TypeDecorator.java (add): Delete. (plusEqual): Delete. frysk-core/frysk/expr/ChangeLog 2007-11-05 Teresa Thomas <tthomas@redhat.com> * CExprEvaluator.g (PLUS): Use getALU. (PLUSEQUAL): Use getALU. * ScratchSymTab.java (getWordSize): Return bogus word size when no task attached. Implement [] operator for pointers to string. frysk-core/frysk/value/ChangeLog 2007-11-05 Teresa Thomas <tthomas@redhat.com> * Type.java (index): Task memory added to parameter list. * PointerType.java (index): New. * TypeDecorator.java (index): Updated. * TestArray.java (testIndexOneD): Updated. (testIndexTwoD): Updated. * TestPointer.java (testCharPointerIndex): New test. * ArrayType.java (dereference): Comments added. frysk-core/frysk/expr/ChangeLog 2007-11-05 Teresa Thomas <tthomas@redhat.com> * CExprEvaluator.g (INDEX): Update. Fixed. |