From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13242 invoked by alias); 10 Apr 2008 13:25:13 -0000 Received: (qmail 13214 invoked by uid 9514); 10 Apr 2008 13:25:12 -0000 Date: Thu, 10 Apr 2008 13:25:00 -0000 Message-ID: <20080410132512.13198.qmail@sourceware.org> From: pmuldoon@sourceware.org To: frysk-cvs@sourceware.org Subject: [SCM] master: Fix/Add some comments, correct some indention. X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 2cadcd56c2fd4e1913739994da28f1f8d1f817a4 X-Git-Newrev: c0e8255a2478510d01a4031eb8be43a21becfcee 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: 2008-q2/txt/msg00075.txt.bz2 The branch, master has been updated via c0e8255a2478510d01a4031eb8be43a21becfcee (commit) from 2cadcd56c2fd4e1913739994da28f1f8d1f817a4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit c0e8255a2478510d01a4031eb8be43a21becfcee Author: Phil Muldoon Date: Thu Apr 10 14:24:38 2008 +0100 Fix/Add some comments, correct some indention. 2008-04-10 Phil Muldoon * LinuxPtraceProc.java: Clean up some indention and add/fix comments. * LinuxPtraceTask.java: Ditto. ----------------------------------------------------------------------- Summary of changes: frysk-core/frysk/proc/live/ChangeLog | 6 ++++ frysk-core/frysk/proc/live/LinuxPtraceProc.java | 37 +++++++++------------- frysk-core/frysk/proc/live/LinuxPtraceTask.java | 20 +++++------- 3 files changed, 30 insertions(+), 33 deletions(-) First 500 lines of diff: diff --git a/frysk-core/frysk/proc/live/ChangeLog b/frysk-core/frysk/proc/live/ChangeLog index 1435679..c3c9dec 100644 --- a/frysk-core/frysk/proc/live/ChangeLog +++ b/frysk-core/frysk/proc/live/ChangeLog @@ -1,3 +1,9 @@ +2008-04-10 Phil Muldoon + + * LinuxPtraceProc.java: Clean up some indention and add/fix + comments. + * LinuxPtraceTask.java: Ditto. + 2008-04-09 Mark Wielaard * LinuxPtraceTaskState.java (Running.handleExecedEvent): Mark diff --git a/frysk-core/frysk/proc/live/LinuxPtraceProc.java b/frysk-core/frysk/proc/live/LinuxPtraceProc.java index c4a6853..d376fc2 100644 --- a/frysk-core/frysk/proc/live/LinuxPtraceProc.java +++ b/frysk-core/frysk/proc/live/LinuxPtraceProc.java @@ -619,20 +619,17 @@ public class LinuxPtraceProc extends LiveProc { /** - * Class describing the action to take on the suspended Task - * before adding or deleting a Code observer. + * Watchpoint action class. Describes the action to + * take on a blocked Task before adding or deleting + * a Watchpoint observer. */ final class WatchpointAction implements Runnable { private final TaskObserver.Watch watch; private final Task task; - private final long address; - private final int length; - private final boolean writeOnly; - private final boolean addition; WatchpointAction(TaskObserver.Watch watch, Task task, long address, @@ -665,11 +662,13 @@ public class LinuxPtraceProc extends LiveProc { } } + // List and manager for Watchpoints within a task. + private final WatchpointAddresses watchpoints; /** * (Internal) Tell the process to add the specified Watch * Observation, attaching to the process if necessary. Adds a - * TaskCodeObservation to the eventloop which instructs the task + * TaskWatchObservation to the eventloop which instructs the task * to install the watchpoint if necessary. */ void requestAddWatchObserver(final Task task, TaskObservable observable, @@ -687,14 +686,12 @@ public class LinuxPtraceProc extends LiveProc { public boolean needsSuspendedAction() { return watchpoints.getWatchObservers(task, address, length, writeOnly) == null; } - }; + }; Manager.eventLoop.add(to); - - } /** - * (Internal) Tell the process to delete the specified Code + * (Internal) Tell the process to delete the specified Watch * Observation, detaching from the process if necessary. */ void requestDeleteWatchObserver(final Task task, TaskObservable observable, @@ -707,17 +704,14 @@ public class LinuxPtraceProc extends LiveProc { WatchpointAction wpa = new WatchpointAction(observer, task, address, length, writeOnly, false); TaskObservation to; to = new TaskObservation((LinuxPtraceTask)task, observable, observer, wpa, false) { - public void execute() { - newState = oldState().handleDeleteObservation(LinuxPtraceProc.this, this); - } - - public boolean needsSuspendedAction() { - return watchpoints.getWatchObservers(task, address, length, writeOnly).size() == 1; - } - }; - + public void execute() { + newState = oldState().handleDeleteObservation(LinuxPtraceProc.this, this); + } + public boolean needsSuspendedAction() { + return watchpoints.getWatchObservers(task, address, length, writeOnly).size() == 1; + } + }; Manager.eventLoop.add(to); - } /** @@ -836,7 +830,6 @@ public class LinuxPtraceProc extends LiveProc { * XXX: Should not be public. */ public final BreakpointAddresses breakpoints; - public final WatchpointAddresses watchpoints; // List of available addresses for out of line stepping. // Used a lock in getOutOfLineAddress() and doneOutOfLine(). diff --git a/frysk-core/frysk/proc/live/LinuxPtraceTask.java b/frysk-core/frysk/proc/live/LinuxPtraceTask.java index f1a559b..8f651f3 100644 --- a/frysk-core/frysk/proc/live/LinuxPtraceTask.java +++ b/frysk-core/frysk/proc/live/LinuxPtraceTask.java @@ -542,16 +542,13 @@ public class LinuxPtraceTask extends LiveTask { /** - * Set of Code observers. - * - * FIXME: Should be private only LinuxPtraceTaskState grubs around - * with this variable. - */ - final TaskObservable watchObservers = new TaskObservable(this); + * Set of Watch observers. + **/ + private final TaskObservable watchObservers = new TaskObservable(this); + /** - * Notify all Code observers of the breakpoint. Return the number - * of blocking observers or -1 if no Code observer were installed - * on this address. + * Notify all Watchpoint observers of the triggered watchpoint. + * Return the number of blocking observers, or 0 if nothing blocks. */ int notifyWatchpoint(long address, int length) { for (Iterator i = watchObservers.iterator(); i.hasNext();) { @@ -565,7 +562,7 @@ public class LinuxPtraceTask extends LiveTask { /** * Add a TaskObserver.Watch observer - * (hardware only) + * (hardware data breakpoint only) */ public void requestAddWatchObserver(TaskObserver.Watch o, long address, int length, boolean writeOnly) { fine.log(this,"requestAddWatchObserver"); @@ -573,7 +570,8 @@ public class LinuxPtraceTask extends LiveTask { } /** - * Delete TaskObserver.Code for the TaskObserver pool. + * Delete a TaskObserver.Watch observer + * (hardware data breakpoint only) */ public void requestDeleteWatchObserver(TaskObserver.Watch o, long address, int length, boolean writeOnly) { fine.log(this, "requestDeleteWatcheObserver"); hooks/post-receive -- frysk system monitor/debugger