public inbox for frysk-cvs@sourceware.org help / color / mirror / Atom feed
From: tthomas@sourceware.org To: frysk-cvs@sourceware.org Subject: [SCM] master: Fixes bug# 6623. Use Location.length() for getting expression size. Date: Wed, 11 Jun 2008 18:41:00 -0000 [thread overview] Message-ID: <20080611184125.7144.qmail@sourceware.org> (raw) The branch, master has been updated via db4927f42f3d0c1cef8bba89d588e1de87cdd741 (commit) via 55d2c10388f1546344f5b3fb7c7ea5f03c5f4f93 (commit) from c712fc53a1e5ada9061d4f71990fccd70f4245d7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit db4927f42f3d0c1cef8bba89d588e1de87cdd741 Author: Teresa Thomas <tthomas@redhat.com> Date: Wed Jun 11 14:36:29 2008 -0400 Fixes bug# 6623. Use Location.length() for getting expression size. frysk-core/frysk/hpd/ChangeLog: 2008-06-11 Teresa Thomas <tthomas@redhat.com> * TestWatchCommand.java (testWatchArraySlice): New test. frysk-core/frysk/rt/ChangeLog: 2008-06-11 Teresa Thomas <tthomas@redhat.com> * WatchObserverInstaller.java (install): Use Location.length() instead of Type.getSize(). commit 55d2c10388f1546344f5b3fb7c7ea5f03c5f4f93 Author: Teresa Thomas <tthomas@redhat.com> Date: Wed Jun 11 14:33:38 2008 -0400 Make Location.length() public. frysk-core/frysk/value/ChangeLog: 2008-06-11 Teresa Thomas <tthomas@redhat.com> * Location.java (length): Make public. * ByteBufferLocation.java (length): Ditto. frysk-core/frysk/debuginfo/ChangeLog: 2008-06-11 Teresa Thomas <tthomas@redhat.com> * PieceLocation.java (length): Make public. ----------------------------------------------------------------------- Summary of changes: frysk-core/frysk/debuginfo/ChangeLog | 4 +++ frysk-core/frysk/debuginfo/PieceLocation.java | 2 +- frysk-core/frysk/debuginfo/TestPieceLocation.java | 2 +- frysk-core/frysk/hpd/ChangeLog | 4 +++ frysk-core/frysk/hpd/TestWatchCommand.java | 23 ++++++++++++++++---- frysk-core/frysk/rt/ChangeLog | 7 +++++- frysk-core/frysk/rt/WatchObserverInstaller.java | 4 +- frysk-core/frysk/value/ByteBufferLocation.java | 2 +- frysk-core/frysk/value/ChangeLog | 5 ++++ frysk-core/frysk/value/Location.java | 4 +- 10 files changed, 44 insertions(+), 13 deletions(-) First 500 lines of diff: diff --git a/frysk-core/frysk/debuginfo/ChangeLog b/frysk-core/frysk/debuginfo/ChangeLog index 16d23f3..d3d8577 100644 --- a/frysk-core/frysk/debuginfo/ChangeLog +++ b/frysk-core/frysk/debuginfo/ChangeLog @@ -1,3 +1,7 @@ +2008-06-11 Teresa Thomas <tthomas@redhat.com> + + * PieceLocation.java (length): Make public. + 2008-06-10 Andrew Cagney <cagney@redhat.com> * PrintDebugInfoStackOptions.java (printSourcePaths): New. diff --git a/frysk-core/frysk/debuginfo/PieceLocation.java b/frysk-core/frysk/debuginfo/PieceLocation.java index b129e77..e7864da 100644 --- a/frysk-core/frysk/debuginfo/PieceLocation.java +++ b/frysk-core/frysk/debuginfo/PieceLocation.java @@ -181,7 +181,7 @@ extends Location /** * Returns the number of bytes in location. */ - protected long length() + public long length() { long length = 0; for (Iterator it=pieces.iterator(); it.hasNext(); ) diff --git a/frysk-core/frysk/debuginfo/TestPieceLocation.java b/frysk-core/frysk/debuginfo/TestPieceLocation.java index 1ea10c8..964d878 100644 --- a/frysk-core/frysk/debuginfo/TestPieceLocation.java +++ b/frysk-core/frysk/debuginfo/TestPieceLocation.java @@ -153,7 +153,7 @@ extends TestLib Location simple = PieceLocation.createSimpleLoc (3, 5, new ArrayByteBuffer(new byte[] { 127,127,127, 5, 6, 7, 8, 9, 127, 127 })); assertEquals ("Address", 3, simple.getAddress()); - assertEquals ("Length", 5, ((PieceLocation)simple).length()); + assertEquals ("Length", 5, simple.length()); } private Task getStoppedTask () diff --git a/frysk-core/frysk/hpd/ChangeLog b/frysk-core/frysk/hpd/ChangeLog index 31128ad..b7dd24d 100644 --- a/frysk-core/frysk/hpd/ChangeLog +++ b/frysk-core/frysk/hpd/ChangeLog @@ -1,3 +1,7 @@ +2008-06-11 Teresa Thomas <tthomas@redhat.com> + + * TestWatchCommand.java (testWatchArraySlice): New test. + 2008-06-11 Andrew Cagney <cagney@redhat.com> * TestBreakpoints.java: Update to match backtrace output. diff --git a/frysk-core/frysk/hpd/TestWatchCommand.java b/frysk-core/frysk/hpd/TestWatchCommand.java index dbacbb4..ec271a3 100644 --- a/frysk-core/frysk/hpd/TestWatchCommand.java +++ b/frysk-core/frysk/hpd/TestWatchCommand.java @@ -140,13 +140,26 @@ public class TestWatchCommand extends TestLib { e.close(); } + public void testWatchArraySlice() { + e = new HpdTestbed(); + e.sendCommandExpectPrompt("load " + Prefix.pkgLibFile("funit-ctypes").getPath(), + "Loaded executable file.*"); + e.sendCommandExpectPrompt("start", "Attached to process.*"); + + e.send("watch array[ 0:1]\n"); + e.expect(".*Uses [1-9]+ debug register.*"); + + e.send("quit\n"); + e.expect("Quitting\\.\\.\\."); + e.close(); + } + /* * Test to watch a data type whose size is larger than * that can be watched by all hardware watch registers * put together. - */ - public void testWatchOversized() - { + */ + public void testWatchOversized() { e = new HpdTestbed(); e.sendCommandExpectPrompt("load " + Prefix.pkgLibFile("funit-ctypes").getPath(), "Loaded executable file.*"); @@ -158,8 +171,8 @@ public class TestWatchCommand extends TestLib { e.send("quit\n"); e.expect("Quitting\\.\\.\\."); - e.close(); - } + e.close(); + } /* * Test to watch a variable that is smaller than the max diff --git a/frysk-core/frysk/rt/ChangeLog b/frysk-core/frysk/rt/ChangeLog index 5622595..2962ba9 100644 --- a/frysk-core/frysk/rt/ChangeLog +++ b/frysk-core/frysk/rt/ChangeLog @@ -1,4 +1,9 @@ -2008-06-06 Teresa Thomas <tthomas@redhat.com> +2008-06-11 Teresa Thomas <tthomas@redhat.com> + + * WatchObserverInstaller.java (install): Use Location.length() + instead of Type.getSize(). + +2008-06-06 Teresa Thomas <tthomas@redhat.com> * Breakpoint.java (updateHit): Update log message. diff --git a/frysk-core/frysk/rt/WatchObserverInstaller.java b/frysk-core/frysk/rt/WatchObserverInstaller.java index df0034d..635709c 100644 --- a/frysk-core/frysk/rt/WatchObserverInstaller.java +++ b/frysk-core/frysk/rt/WatchObserverInstaller.java @@ -91,8 +91,8 @@ public class WatchObserverInstaller { (task.getISA()).getWatchpointMaxLength(); long variableAddress = expr.getLocation().getAddress(); - int variableLength = expr.getType().getSize(); - + int variableLength = (int)expr.getLocation().length(); + if (variableLength > (watchpointCount-watchpointsInUse) * maxWatchLength ) { throw new RuntimeException ("Watch error: Available watchpoints not " + "sufficient to watch complete value."); diff --git a/frysk-core/frysk/value/ByteBufferLocation.java b/frysk-core/frysk/value/ByteBufferLocation.java index 4aff9e4..915cad9 100644 --- a/frysk-core/frysk/value/ByteBufferLocation.java +++ b/frysk-core/frysk/value/ByteBufferLocation.java @@ -106,7 +106,7 @@ public class ByteBufferLocation buffer.putByte(offset, value); } - protected long length() { + public long length() { return buffer.capacity(); } } diff --git a/frysk-core/frysk/value/ChangeLog b/frysk-core/frysk/value/ChangeLog index fdf4a5e..14a7ad6 100644 --- a/frysk-core/frysk/value/ChangeLog +++ b/frysk-core/frysk/value/ChangeLog @@ -1,3 +1,8 @@ +2008-06-11 Teresa Thomas <tthomas@redhat.com> + + * Location.java (length): Make public. + * ByteBufferLocation.java (length): Ditto. + 2008-04-30 Stan Cox <scox@redhat.com> * Type.java (toPrintBrief): New. diff --git a/frysk-core/frysk/value/Location.java b/frysk-core/frysk/value/Location.java index 0659547..27b52a0 100644 --- a/frysk-core/frysk/value/Location.java +++ b/frysk-core/frysk/value/Location.java @@ -170,9 +170,9 @@ public abstract class Location /** * The length of the location, in bytes. This MUST be a long (or - * BigIneger) as a value's size could be bigger than 32-bits. + * BigInteger) as a value's size could be bigger than 32-bits. */ - protected abstract long length(); + public abstract long length(); /** * Print this Location. hooks/post-receive -- frysk system monitor/debugger
reply other threads:[~2008-06-11 18:41 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=20080611184125.7144.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).