* Patch to modify initial ProcState setting in Proc.java
@ 2007-02-03 3:45 Phil Muldoon
0 siblings, 0 replies; only message in thread
From: Phil Muldoon @ 2007-02-03 3:45 UTC (permalink / raw)
To: Frysk Hackers
[-- Attachment #1: Type: text/plain, Size: 297 bytes --]
Hi
While working on core file work, I needed to make a quick change to Proc
and any of its sub-classes. Attached is a patch to move the setting of
initial ProcStates from Proc to sub-classes of Proc (eg
LinuxPtraceProc). Some constructors in Proc needed an initial state set.
Regards
Phil
[-- Attachment #2: proc.patch --]
[-- Type: text/x-patch, Size: 3219 bytes --]
Index: ChangeLog
===================================================================
RCS file: /cvs/frysk/frysk-core/frysk/proc/ChangeLog,v
retrieving revision 1.615
diff -u -r1.615 ChangeLog
--- ChangeLog 2 Feb 2007 15:40:12 -0000 1.615
+++ ChangeLog 3 Feb 2007 03:37:48 -0000
@@ -1,3 +1,12 @@
+2007-02-02 Phil Muldoon <pmuldoon@redhat.com>
+
+ * Proc.java (Proc): Remove setting LinuxPtraceState states.
+ Use getInitialState() to find initial states from sub-classes of
+ Proc.
+ (getInitialState): New. Abstract.
+ * LinuxPtraceProc.java (getInitialState): New. Set initial state.
+ * DummyProc.java (getInitialState): Ditto.
+
2007-02-02 Mark Wielaard <mark@klomp.org>
* StressAttachDetachManyTasks.java (test): Remove #2468 blocker.
Index: Proc.java
===================================================================
RCS file: /cvs/frysk/frysk-core/frysk/proc/Proc.java,v
retrieving revision 1.98
diff -u -r1.98 Proc.java
--- Proc.java 22 Jan 2007 18:56:16 -0000 1.98
+++ Proc.java 3 Feb 2007 03:37:48 -0000
@@ -168,6 +168,8 @@
final BreakpointAddresses breakpoints;
+ protected abstract ProcState getInitialState (boolean procStarting);
+
/**
* Create a new Proc skeleton. Since PARENT could be NULL, explicitly specify
* the HOST.
@@ -193,7 +195,7 @@
protected Proc (Host host, Proc parent, ProcId id)
{
this(id, parent, host, null);
- newState = LinuxPtraceProcState.initial(this, false);
+ newState = getInitialState(false);
logger.log(Level.FINEST, "{0} new - create unattached running proc\n", this);
}
@@ -208,7 +210,7 @@
protected Proc (Task task, ProcId forkId)
{
this(forkId, task.proc, task.proc.host, task);
- newState = LinuxPtraceProcState.initial(this, true);
+ newState = getInitialState(true);
logger.log(Level.FINE, "{0} new - create attached running proc\n", this);
}
Index: LinuxPtraceProc.java
===================================================================
RCS file: /cvs/frysk/frysk-core/frysk/proc/LinuxPtraceProc.java,v
retrieving revision 1.4
diff -u -r1.4 LinuxPtraceProc.java
--- LinuxPtraceProc.java 23 Jan 2007 16:24:50 -0000 1.4
+++ LinuxPtraceProc.java 3 Feb 2007 03:37:49 -0000
@@ -76,6 +76,16 @@
}
/**
+ * Some constructors in Proc.java need a starting state.
+ * As Proc is abstract and cannot return a state specific
+ * to its subclass, return here in the subclass
+ */
+ protected ProcState getInitialState (boolean procStarting)
+ {
+ return LinuxPtraceProcState.initial(this, procStarting);
+ }
+
+ /**
* Create a new detached process. RUNNING makes no sense here.
* Since PARENT could be NULL, also explicitly pass in the host.
*/
Index: DummyProc.java
===================================================================
RCS file: /cvs/frysk/frysk-core/frysk/proc/DummyProc.java,v
retrieving revision 1.5
diff -u -r1.5 DummyProc.java
--- DummyProc.java 19 Jan 2007 14:19:21 -0000 1.5
+++ DummyProc.java 3 Feb 2007 03:37:49 -0000
@@ -71,6 +71,10 @@
void sendRefresh() {
}
+
+ protected ProcState getInitialState (boolean procStarting) {
+ return null;
+ }
Auxv[] sendrecAuxv() {
return null;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-02-03 3:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-03 3:45 Patch to modify initial ProcState setting in Proc.java Phil Muldoon
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).