From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7768 invoked by alias); 20 Nov 2007 15:27:30 -0000 Received: (qmail 7719 invoked by uid 9708); 20 Nov 2007 15:27:29 -0000 Date: Tue, 20 Nov 2007 15:27:00 -0000 Message-ID: <20071120152729.7701.qmail@sourceware.org> From: tthomas@sourceware.org To: frysk-cvs@sourceware.org Subject: [SCM] master: Use word size of machine to create long type, instead of hard coded size of 8 bytes. X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 254811a3ee56ca12371db0ada5fb03187fbe44cd X-Git-Newrev: 3f179370e640e8f156df2f90a48855ed11446e34 Mailing-List: contact frysk-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: frysk-cvs-owner@sourceware.org Reply-To: frysk@sourceware.org X-SW-Source: 2007-q4/txt/msg00402.txt.bz2 The branch, master has been updated via 3f179370e640e8f156df2f90a48855ed11446e34 (commit) from 254811a3ee56ca12371db0ada5fb03187fbe44cd (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 3f179370e640e8f156df2f90a48855ed11446e34 Author: Teresa Thomas Date: Tue Nov 20 10:24:28 2007 -0500 Use word size of machine to create long type, instead of hard coded size of 8 bytes. frysk-core/frysk/expr/ChangeLog 2007-11-20 Teresa Thomas * CExprEvaluator.g: Use word size of machine to create long type. * TestbedSymTab.java (getWordSize): Return machine word size. ----------------------------------------------------------------------- Summary of changes: frysk-core/frysk/expr/CExprEvaluator.g | 2 +- frysk-core/frysk/expr/ChangeLog | 7 +++++++ frysk-core/frysk/expr/TestbedSymTab.java | 6 +++++- 3 files changed, 13 insertions(+), 2 deletions(-) First 500 lines of diff: diff --git a/frysk-core/frysk/expr/CExprEvaluator.g b/frysk-core/frysk/expr/CExprEvaluator.g index 5de32c6..976e8a4 100644 --- a/frysk-core/frysk/expr/CExprEvaluator.g +++ b/frysk-core/frysk/expr/CExprEvaluator.g @@ -111,7 +111,7 @@ options { // FIXME: The ExprSymTab can provide types such as this. shortType = new SignedType("short", ByteOrder.LITTLE_ENDIAN, 2); intType = new SignedType("int", ByteOrder.LITTLE_ENDIAN, 4); - longType = new SignedType("long", ByteOrder.LITTLE_ENDIAN, 8); + longType = new SignedType("long", ByteOrder.LITTLE_ENDIAN, exprSymTab.getWordSize()); floatType = new FloatingPointType("false", ByteOrder.LITTLE_ENDIAN, 4); doubleType = new FloatingPointType("double", ByteOrder.LITTLE_ENDIAN, 8); } diff --git a/frysk-core/frysk/expr/ChangeLog b/frysk-core/frysk/expr/ChangeLog index 08a71da..eb3fbc5 100644 --- a/frysk-core/frysk/expr/ChangeLog +++ b/frysk-core/frysk/expr/ChangeLog @@ -1,3 +1,10 @@ +2007-11-20 Teresa Thomas + + * CExprEvaluator.g: Use word size of machine to + create long type. + * TestbedSymTab.java (getWordSize): Return machine + word size. + 2007-11-18 Andrew Cagney * IncompleteMemberException.java: Update Type.complete renamed to diff --git a/frysk-core/frysk/expr/TestbedSymTab.java b/frysk-core/frysk/expr/TestbedSymTab.java index a39b2b1..9dab515 100644 --- a/frysk-core/frysk/expr/TestbedSymTab.java +++ b/frysk-core/frysk/expr/TestbedSymTab.java @@ -43,6 +43,8 @@ import java.util.Iterator; import inua.eio.ByteBuffer; import inua.eio.ByteOrder; import java.util.List; + +import frysk.Config; import frysk.value.ObjectDeclaration; import frysk.value.Type; import frysk.value.Value; @@ -119,7 +121,9 @@ class TestbedSymTab implements ExprSymTab { * Return the wordsize. */ public int getWordSize() { - throw new RuntimeException("no word size"); + // Since no debugee word size available, return word size of + // debugger. Required for some expression evaluation, test cases. + return Config.getWordSize (); } public void complete(String incomplete, List candidates) { hooks/post-receive -- frysk system monitor/debugger