From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22627 invoked by alias); 26 Mar 2008 16:47:39 -0000 Received: (qmail 22611 invoked by uid 22791); 26 Mar 2008 16:47:37 -0000 X-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_34,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 26 Mar 2008 16:47:19 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m2QGlHTp015595 for ; Wed, 26 Mar 2008 12:47:17 -0400 Received: from pobox-2.corp.redhat.com (pobox-2.corp.redhat.com [10.11.255.15]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m2QGlHMg005000 for ; Wed, 26 Mar 2008 12:47:17 -0400 Received: from localhost.localdomain (vpn-6-6.fab.redhat.com [10.33.6.6]) by pobox-2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m2QGlFLA021014 for ; Wed, 26 Mar 2008 12:47:16 -0400 Message-ID: <47EA7E0E.4030406@redhat.com> Date: Wed, 26 Mar 2008 16:47:00 -0000 From: Phil Muldoon User-Agent: Thunderbird 2.0.0.12 (X11/20080226) MIME-Version: 1.0 To: frysk@sourceware.org Subject: Re: [SCM] master: 2008-03-26 Phil Muldoon References: <20080326130354.5799.qmail@sourceware.org> In-Reply-To: <20080326130354.5799.qmail@sourceware.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 X-IsSubscribed: yes Mailing-List: contact frysk-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: frysk-owner@sourceware.org X-SW-Source: 2008-q1/txt/msg00186.txt.bz2 pmuldoon@sourceware.org wrote: This commit defines the lower level interfaces, via the ISA to the hardware debug register APIs. I committed it a bit early as I have a few fixes (location of the debug status register, 4 instead of 7 accessible registers and so on). The ISA code will abstract the ISA specific knowledge required to massage the individual debug registers, and the debug status register. Regards Phil > The branch, master has been updated > via 00345416a6028de2e659b7a01d3b1c54adca694f (commit) > from 9c6237cfe7385cb4d444a00c92de1a7668cae0ed (commit) > > Those revisions listed above that are new to this repository have > not appeared on any other notification email. > > - Log ----------------------------------------------------------------- > commit 00345416a6028de2e659b7a01d3b1c54adca694f > Author: Phil Muldoon > Date: Wed Mar 26 13:03:25 2008 +0000 > > 2008-03-26 Phil Muldoon > > * Isa.java (setWatchpoint): New Interface > (deleteWatchpoint): Ditto. > (getWatchpointCount): Ditto. > * LinuxX8664.java: Add above interfaces. > * LinuxIA32.java: Ditto. > * IsaPowerPC.java: Ditto. > > ----------------------------------------------------------------------- > > Summary of changes: > frysk-core/frysk/proc/live/ChangeLog | 9 ++++++ > frysk-core/frysk/proc/live/Isa.java | 28 ++++++++++++++++++++ > frysk-core/frysk/proc/live/IsaPowerPC.java | 37 ++++++++++++++++++++++++++ > frysk-core/frysk/proc/live/LinuxIA32.java | 39 +++++++++++++++++++++++++++- > frysk-core/frysk/proc/live/LinuxX8664.java | 35 +++++++++++++++++++++++++ > 5 files changed, 147 insertions(+), 1 deletions(-) > > First 500 lines of diff: > diff --git a/frysk-core/frysk/proc/live/ChangeLog b/frysk-core/frysk/proc/live/ChangeLog > index c269998..0175fca 100644 > --- a/frysk-core/frysk/proc/live/ChangeLog > +++ b/frysk-core/frysk/proc/live/ChangeLog > @@ -1,3 +1,12 @@ > +2008-03-26 Phil Muldoon > + > + * Isa.java (setWatchpoint): New Interface > + (deleteWatchpoint): Ditto. > + (getWatchpointCount): Ditto. > + * LinuxX8664.java: Add above interfaces. > + * LinuxIA32.java: Ditto. > + * IsaPowerPC.java: Ditto. > + > 2008-03-18 Andrew Cagney > > * LinuxPtraceHost.java (removeProc(LinuxPtraceProc)): Replace > diff --git a/frysk-core/frysk/proc/live/Isa.java b/frysk-core/frysk/proc/live/Isa.java > index 41bb1c0..3ea7fba 100644 > --- a/frysk-core/frysk/proc/live/Isa.java > +++ b/frysk-core/frysk/proc/live/Isa.java > @@ -51,6 +51,34 @@ import inua.eio.ByteBuffer; > > public interface Isa { > > + > + /** > + * Builds a watchpoint. Takes a task, an address, a > + * range and a register index. > + * > + * @return boolean whether the watchpoint > + * was set succesfully. > + */ > + boolean setWatchpoint(Task task, long addr, > + long range, int index); > + > + /** > + * Deletes a watchpoint. Takes a task, and a > + * register index. > + * > + * @return boolean whether the watchpoint > + * was deleted succesfully. > + */ > + boolean deleteWatchpoint(Task task, int index); > + > + > + /** > + * Returns number of watchpoints for this architecture > + * > + * @return int number of usable watchpoints. > + */ > + int getWatchpointCount(); > + > /** > * Get the breakpoint instruction. > * > diff --git a/frysk-core/frysk/proc/live/IsaPowerPC.java b/frysk-core/frysk/proc/live/IsaPowerPC.java > index a69ca46..39120cf 100644 > --- a/frysk-core/frysk/proc/live/IsaPowerPC.java > +++ b/frysk-core/frysk/proc/live/IsaPowerPC.java > @@ -58,6 +58,43 @@ abstract class IsaPowerPC implements Isa { > new Instruction(new byte[] { (byte)0x7d, (byte)0x82, > (byte)0x10, (byte)0x08 }, false); > > + > + // Architecture Watchpoint Count > + private final int NoOfWatchpoints = 1; > + > + /** > + * Builds a watchpoint. Takes a task, an address a > + * range and a register index. > + * > + * @return boolean whether the watchpoint > + * was set succesfully. > + */ > + public final boolean setWatchpoint(Task task, long addr, > + long range, int index) { > + throw new RuntimeException("Watchpoints not supported on this arch"); > + } > + > + /** > + * Deletes a watchpoint. Takes a task and a > + * range. > + * > + * @return boolean whether the watchpoint > + * was deleted succesfully. > + */ > + public final boolean deleteWatchpoint(Task task, int index) { > + throw new RuntimeException("Watchpoints not supported on this arch"); > + } > + > + /** > + * Returns number of watchpoints for this architecture > + * > + * @return int number of usable watchpoints. > + */ > + public final int getWatchpointCount() { > + return NoOfWatchpoints; > + } > + > + > /** > * Get the breakpoint instruction of the PowerPC platform. > */ > diff --git a/frysk-core/frysk/proc/live/LinuxIA32.java b/frysk-core/frysk/proc/live/LinuxIA32.java > index fe11aa5..184a5d9 100644 > --- a/frysk-core/frysk/proc/live/LinuxIA32.java > +++ b/frysk-core/frysk/proc/live/LinuxIA32.java > @@ -51,7 +51,41 @@ class LinuxIA32 implements Isa { > > private static final Instruction IA32Breakpoint > = new Instruction(new byte[] { (byte)0xcc }, false); > - > + > + // Architecture Watchpoint Count > + private final int NoOfWatchpoints = 7; > + > + /** > + * Builds a watchpoint. Takes a task, an address, a > + * range and a register index. > + * > + * @return boolean whether the watchpoint > + * was set succesfully. > + */ > + public final boolean setWatchpoint(Task task, long addr, > + long range, int index) { > + throw new RuntimeException("Watchpoints not supported on this arch"); > + } > + > + /** > + * Deletes a watchpoint. Takes a task, and a range. > + * > + * @return boolean whether the watchpoint > + * was deleted succesfully. > + */ > + public final boolean deleteWatchpoint(Task task, int index) { > + throw new RuntimeException("Watchpoints not supported on this arch"); > + } > + > + /** > + * Returns number of watchpoints for this architecture > + * > + * @return int number of usable watchpoints. > + */ > + public final int getWatchpointCount() { > + return NoOfWatchpoints; > + } > + > /** > * Get the breakpoint instruction for IA32. > */ > @@ -154,10 +188,13 @@ class LinuxIA32 implements Isa { > return result; > } > > + > private static LinuxIA32 isa; > static LinuxIA32 isaSingleton () { > if (isa == null) > isa = new LinuxIA32 (); > return isa; > } > + > + > } > diff --git a/frysk-core/frysk/proc/live/LinuxX8664.java b/frysk-core/frysk/proc/live/LinuxX8664.java > index 8ee4876..3dd3dfc 100644 > --- a/frysk-core/frysk/proc/live/LinuxX8664.java > +++ b/frysk-core/frysk/proc/live/LinuxX8664.java > @@ -50,6 +50,41 @@ import frysk.proc.Auxv; > class LinuxX8664 implements Isa { > private static final Instruction X8664Breakpoint > = new Instruction(new byte[] { (byte)0xcc }, false); > + > + > + // Architecture Watchpoint Count > + private final int NoOfWatchpoints = 7; > + > + /** > + * Builds a watchpoint. Takes a task, an address, a > + * range and a register index. > + * > + * @return boolean whether the watchpoint > + * was set succesfully. > + */ > + public final boolean setWatchpoint(Task task, long addr, > + long range, int index) { > + throw new RuntimeException("Watchpoints not supported on this arch"); > + } > + > + /** > + * Deletes a watchpoint. Takes a task, and a range. > + * > + * @return boolean whether the watchpoint > + * was deleted succesfully. > + */ > + public final boolean deleteWatchpoint(Task task, int index) { > + throw new RuntimeException("Watchpoints not supported on this arch"); > + } > + > + /** > + * Returns number of watchpoints for this architecture > + * > + * @return int number of usable watchpoints. > + */ > + public final int getWatchpointCount() { > + return NoOfWatchpoints; > + } > > /** > * Get the breakpoint instruction for X8664. > > > hooks/post-receive > -- > frysk system monitor/debugger >