public inbox for frysk-cvs@sourceware.org help / color / mirror / Atom feed
From: tthomas@sourceware.org To: frysk-cvs@sourceware.org Subject: [SCM] master: Use task's wordSize for pointer creation. Date: Thu, 08 Nov 2007 18:57:00 -0000 [thread overview] Message-ID: <20071108185721.1716.qmail@sourceware.org> (raw) The branch, master has been updated via f0dd7a1f1381eb180a42ab7ddb9f56d717aa48ff (commit) via f3a2cbd98c35e69810590eee5de0eb0fd4396d5a (commit) from 015e476beb1ca02e5039974f9e8072a5eb631e7b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit f0dd7a1f1381eb180a42ab7ddb9f56d717aa48ff Author: Teresa Thomas <tthomas@redhat.com> Date: Thu Nov 8 13:43:22 2007 -0500 Use task's wordSize for pointer creation. frysk-core/frysk/value/ChangeLog 2007-11-08 Teresa Thomas <tthomas@redhat.com> * AddressUnit.java (wordSize): New. (add): Use wordSize for pointer creation. (AddressUnit): Change AddressUnit(PointerType) to AddressUnit(PointerType,int). * PointerType.java (getALU): Update. * IntegerType.java (getALU): Update. commit f3a2cbd98c35e69810590eee5de0eb0fd4396d5a Author: Teresa Thomas <tthomas@redhat.com> Date: Thu Nov 8 13:41:56 2007 -0500 Return wordsize of the frysk proc if debugee task not found. 2007-11-08 Teresa Thomas <tthomas@redhat.com> * ScratchSymTab.java (getWordSize): Return word size of frysk proc's architecture. ----------------------------------------------------------------------- Summary of changes: frysk-core/frysk/expr/ChangeLog | 5 +++++ frysk-core/frysk/expr/ScratchSymTab.java | 8 ++++---- frysk-core/frysk/value/AddressUnit.java | 12 ++++++++---- frysk-core/frysk/value/ChangeLog | 9 +++++++++ frysk-core/frysk/value/IntegerType.java | 2 +- frysk-core/frysk/value/PointerType.java | 2 +- 6 files changed, 28 insertions(+), 10 deletions(-) First 500 lines of diff: diff --git a/frysk-core/frysk/expr/ChangeLog b/frysk-core/frysk/expr/ChangeLog index a316bff..313f07b 100644 --- a/frysk-core/frysk/expr/ChangeLog +++ b/frysk-core/frysk/expr/ChangeLog @@ -1,3 +1,8 @@ +2007-11-08 Teresa Thomas <tthomas@redhat.com> + + * ScratchSymTab.java (getWordSize): Return word size + of frysk proc's architecture. + 2007-11-06 Teresa Thomas <tthomas@redhat.com> * CExprEvaluator.g (STAR): Use Arithmetic Unit. diff --git a/frysk-core/frysk/expr/ScratchSymTab.java b/frysk-core/frysk/expr/ScratchSymTab.java index 2bfe3b6..4df6397 100644 --- a/frysk-core/frysk/expr/ScratchSymTab.java +++ b/frysk-core/frysk/expr/ScratchSymTab.java @@ -42,6 +42,7 @@ package frysk.expr; import inua.eio.ByteBuffer; import inua.eio.ByteOrder; +import frysk.Config; import frysk.value.ObjectDeclaration; import frysk.value.Type; import frysk.value.Value; @@ -88,9 +89,8 @@ public class ScratchSymTab implements ExprSymTab { * Return the wordsize. */ public int getWordSize() { - // FIXME: ALU's for arithmetic operations require wordsize. - // Send bogus word size when no task attached? - //throw new RuntimeException("no word size"); - return -1; + // Since no debugee word size available, return word size of + // debugger. Required for some expression evaluation. + return Config.getWordSize (); } } diff --git a/frysk-core/frysk/value/AddressUnit.java b/frysk-core/frysk/value/AddressUnit.java index ea9e285..5d61db0 100644 --- a/frysk-core/frysk/value/AddressUnit.java +++ b/frysk-core/frysk/value/AddressUnit.java @@ -46,13 +46,17 @@ import inua.eio.ByteOrder; public class AddressUnit extends ArithmeticUnit { + private final int wordSize; + public AddressUnit (ArrayType t, int wordSize) { retType = new PointerType(t.getName(), ByteOrder.BIG_ENDIAN, wordSize, t.getType()); + this.wordSize = wordSize; } - public AddressUnit (PointerType t) { + public AddressUnit (PointerType t, int wordSize) { retType = t; + this.wordSize = wordSize; } /** @@ -79,12 +83,12 @@ extends ArithmeticUnit intValue = v1; } - // Handle pointers to array types + // Handle address of array types if (ptrType.getType() instanceof ArrayType) { // Create pointer to array element type - Type eType = ((ArrayType)ptrType.getType()).getType(); + Type eType = ((ArrayType)ptrType.getType()).getType(); PointerType pType = new PointerType - (eType.getName(), ptrType.order(), eType.getSize(), eType); + (eType.getName(), ptrType.order(), wordSize, eType); return (pType.createValue (ptrValue.asLong() + eType.getSize()*intValue.asLong())); } diff --git a/frysk-core/frysk/value/ChangeLog b/frysk-core/frysk/value/ChangeLog index 676dae7..0906a1d 100644 --- a/frysk-core/frysk/value/ChangeLog +++ b/frysk-core/frysk/value/ChangeLog @@ -1,3 +1,12 @@ +2007-11-08 Teresa Thomas <tthomas@redhat.com> + + * AddressUnit.java (wordSize): New. + (add): Use wordSize for pointer creation. + (AddressUnit): Change AddressUnit(PointerType) to + AddressUnit(PointerType,int). + * PointerType.java (getALU): Update. + * IntegerType.java (getALU): Update. + 2007-11-07 Sami Wagiaalla <swagiaal@toner.toronto.redhat.com> * CompositeType.java: Changed iterator() to not require diff --git a/frysk-core/frysk/value/IntegerType.java b/frysk-core/frysk/value/IntegerType.java index 73cb5c4..8cf8778 100644 --- a/frysk-core/frysk/value/IntegerType.java +++ b/frysk-core/frysk/value/IntegerType.java @@ -87,7 +87,7 @@ public abstract class IntegerType } public ArithmeticUnit getALU(PointerType type, int wordSize) { - return new AddressUnit((PointerType)type); + return new AddressUnit(type, wordSize); } public ArithmeticUnit getALU(FloatingPointType type, int wordSize) { diff --git a/frysk-core/frysk/value/PointerType.java b/frysk-core/frysk/value/PointerType.java index a0e5743..90a84f7 100644 --- a/frysk-core/frysk/value/PointerType.java +++ b/frysk-core/frysk/value/PointerType.java @@ -135,7 +135,7 @@ public class PointerType } public ArithmeticUnit getALU(IntegerType type, int wordSize) { - return new AddressUnit(this); + return new AddressUnit(this, wordSize); } public ArithmeticUnit getALU(PointerType type, int wordSize) { hooks/post-receive -- frysk system monitor/debugger
reply other threads:[~2007-11-08 18:57 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20071108185721.1716.qmail@sourceware.org \ --to=tthomas@sourceware.org \ --cc=frysk-cvs@sourceware.org \ --cc=frysk@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).