public inbox for frysk-cvs@sourceware.org help / color / mirror / Atom feed
From: cagney@sourceware.org To: frysk-cvs@sourceware.org Subject: [SCM] master: frysk.sys.Pid.* returns a ProcessIdentifier. Date: Tue, 12 Feb 2008 23:13:00 -0000 [thread overview] Message-ID: <20080212231332.27880.qmail@sourceware.org> (raw) The branch, master has been updated via 3d895232d71bbdf785a82ea0a0b7d43b6b0f77d6 (commit) from 4dd4ab30dd3aae2c59ad06e9f27a683ce9ce6394 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 3d895232d71bbdf785a82ea0a0b7d43b6b0f77d6 Author: Andrew Cagney <cagney@redhat.com> Date: Tue Feb 12 18:03:58 2008 -0500 frysk.sys.Pid.* returns a ProcessIdentifier. frysk-core/frysk/debuginfo/ChangeLog 2008-02-12 Andrew Cagney <cagney@redhat.com> * TestDebugInfoStackTrace.java: Update to match frysk.sys.Pid. frysk-core/frysk/proc/ChangeLog 2008-02-12 Andrew Cagney <cagney@redhat.com> * TestHostGet.java: Update to match frysk.sys.Pid. * TestTaskTerminateObserver.java: Ditto. * TestTaskSyscallObserver.java: Ditto. frysk-core/frysk/proc/live/ChangeLog 2008-02-12 Andrew Cagney <cagney@redhat.com> * LinuxPtraceHost.java: Update to match frysk.sys.Pid. * TestRefresh.java: Ditto. frysk-core/frysk/stepping/ChangeLog 2008-02-12 Andrew Cagney <cagney@redhat.com> * TestStepping.java: Update to match frysk.sys.Pid. frysk-core/frysk/testbed/ChangeLog 2008-02-12 Andrew Cagney <cagney@redhat.com> * ExecCommand.java: Update to match frysk.sys.Pid. * TestLib.java: Ditto. * SlaveOffspring.java: Ditto. * LegacyOffspring.java: Ditto. * FunitThreadsOffspring.java: Ditto. frysk-sys/frysk/sys/ChangeLog 2008-02-12 Andrew Cagney <cagney@redhat.com> * Pid.java: Return a ProcessIdentifier. frysk-sys/lib/dwfl/ChangeLog 2008-02-12 Andrew Cagney <cagney@redhat.com> * Dwfl.java (Dwfl(ProcessIdentifier,String)): Replace Dwfl(int,String). ----------------------------------------------------------------------- Summary of changes: frysk-core/frysk/debuginfo/ChangeLog | 4 ++++ .../frysk/debuginfo/TestDebugInfoStackTrace.java | 8 ++++---- frysk-core/frysk/proc/ChangeLog | 4 ++++ frysk-core/frysk/proc/TestHostGet.java | 2 +- frysk-core/frysk/proc/TestRun.java | 2 +- frysk-core/frysk/proc/TestTaskSyscallObserver.java | 4 ++-- .../frysk/proc/TestTaskTerminateObserver.java | 4 ++-- frysk-core/frysk/proc/live/ChangeLog | 3 +++ frysk-core/frysk/proc/live/LinuxPtraceHost.java | 2 +- frysk-core/frysk/proc/live/TestRefresh.java | 2 +- frysk-core/frysk/stepping/ChangeLog | 4 ++++ frysk-core/frysk/stepping/TestStepping.java | 6 +++--- frysk-core/frysk/testbed/ChangeLog | 6 ++++++ frysk-core/frysk/testbed/ExecCommand.java | 2 +- .../frysk/testbed/FunitThreadsOffspring.java | 2 +- frysk-core/frysk/testbed/LegacyOffspring.java | 2 +- frysk-core/frysk/testbed/SlaveOffspring.java | 2 +- frysk-core/frysk/testbed/TestLib.java | 4 ++-- frysk-sys/frysk/sys/ChangeLog | 2 ++ frysk-sys/frysk/sys/Pid.java | 15 ++++++++++----- frysk-sys/frysk/sys/cni/Pid.cxx | 11 ++++------- frysk-sys/lib/dwfl/ChangeLog | 5 +++++ frysk-sys/lib/dwfl/Dwfl.java | 7 ++++--- 23 files changed, 67 insertions(+), 36 deletions(-) First 500 lines of diff: diff --git a/frysk-core/frysk/debuginfo/ChangeLog b/frysk-core/frysk/debuginfo/ChangeLog index 83a58f5..f55fd9c 100644 --- a/frysk-core/frysk/debuginfo/ChangeLog +++ b/frysk-core/frysk/debuginfo/ChangeLog @@ -1,3 +1,7 @@ +2008-02-12 Andrew Cagney <cagney@redhat.com> + + * TestDebugInfoStackTrace.java: Update to match frysk.sys.Pid. + 2008-02-04 Teresa Thomas <tthomas@redhat.com> * ValueUavailableException.java: Renamed to... diff --git a/frysk-core/frysk/debuginfo/TestDebugInfoStackTrace.java b/frysk-core/frysk/debuginfo/TestDebugInfoStackTrace.java index b95cdd0..1939bb9 100644 --- a/frysk-core/frysk/debuginfo/TestDebugInfoStackTrace.java +++ b/frysk-core/frysk/debuginfo/TestDebugInfoStackTrace.java @@ -98,7 +98,7 @@ public class TestDebugInfoStackTrace SynchronizedOffspring process = new SynchronizedOffspring (Signal.USR1, new String[] { getExecPath ("funit-rt-looper"), - Integer.toString(Pid.get ()), + Integer.toString(Pid.get().intValue()), Integer.toString(Signal.USR1.intValue()) }); myTask = process.findTaskUsingRefresh(true); @@ -216,7 +216,7 @@ public class TestDebugInfoStackTrace SynchronizedOffspring process = new SynchronizedOffspring (Signal.USR1, new String[] { getExecPath ("funit-rt-threader"), - Integer.toString(Pid.get ()), + Integer.toString(Pid.get().intValue()), Integer.toString(Signal.USR1.intValue()) }); myTask = process.findTaskUsingRefresh(true); @@ -266,7 +266,7 @@ public class TestDebugInfoStackTrace SynchronizedOffspring process = new SynchronizedOffspring (Signal.USR1, new String[] { getExecPath ("funit-rt-stepper"), - Integer.toString(Pid.get()), + Integer.toString(Pid.get().intValue()), Integer.toString(Signal.USR1.intValue()) }); myTask = process.findTaskUsingRefresh(true); @@ -304,7 +304,7 @@ public class TestDebugInfoStackTrace SynchronizedOffspring process = new SynchronizedOffspring (Signal.USR1, new String[] { getExecPath ("funit-rt-stepper"), - Integer.toString(Pid.get ()), + Integer.toString(Pid.get().intValue()), Integer.toString(Signal.USR1.intValue()) }); myTask = process.findTaskUsingRefresh(true); diff --git a/frysk-core/frysk/proc/ChangeLog b/frysk-core/frysk/proc/ChangeLog index 05ffdcc..e6104c5 100644 --- a/frysk-core/frysk/proc/ChangeLog +++ b/frysk-core/frysk/proc/ChangeLog @@ -1,5 +1,9 @@ 2008-02-12 Andrew Cagney <cagney@redhat.com> + * TestHostGet.java: Update to match frysk.sys.Pid. + * TestTaskTerminateObserver.java: Ditto. + * TestTaskSyscallObserver.java: Ditto. + * TestTaskTerminateObserver.java: Update to match frysk.testbed. * TestTaskSyscallObserver.java: Update. * TestProcGet.java: Ditto. diff --git a/frysk-core/frysk/proc/TestHostGet.java b/frysk-core/frysk/proc/TestHostGet.java index 91542c3..46b9cfe 100644 --- a/frysk-core/frysk/proc/TestHostGet.java +++ b/frysk-core/frysk/proc/TestHostGet.java @@ -58,7 +58,7 @@ public class TestHostGet Proc self = host.getSelf (); // Self is a singleton. assertSame ("value from host.getSelf", self, host.getSelf ()); - assertEquals ("self's process id", self.getPid (), Pid.get ()); + assertEquals("self's process id", self.getPid(), Pid.get().intValue()); Proc proc = self; int level = 0; while (proc.getParent () != null) { diff --git a/frysk-core/frysk/proc/TestRun.java b/frysk-core/frysk/proc/TestRun.java index 84ba596..f3d8c08 100644 --- a/frysk-core/frysk/proc/TestRun.java +++ b/frysk-core/frysk/proc/TestRun.java @@ -67,7 +67,7 @@ public class TestRun // Add an observer that counts the number of proc create // events. - ProcCounter procCounter = new ProcCounter(Pid.get()); + ProcCounter procCounter = new ProcCounter(Pid.get().intValue()); // Observe TaskObserver.Attached events; when any occur indicate // that the curresponding task should continue. diff --git a/frysk-core/frysk/proc/TestTaskSyscallObserver.java b/frysk-core/frysk/proc/TestTaskSyscallObserver.java index 5966ae8..9cd9f45 100644 --- a/frysk-core/frysk/proc/TestTaskSyscallObserver.java +++ b/frysk-core/frysk/proc/TestTaskSyscallObserver.java @@ -448,8 +448,8 @@ public class TestTaskSyscallObserver super(START_ACK, new String[] { getExecPath ("funit-syscallint"), - Integer.toString(Pid.get()), - Integer.toString(START_ACK.hashCode()), + Integer.toString(Pid.get().intValue()), + Integer.toString(START_ACK.intValue()), Integer.toString(restart ? 1 : 0) }); } diff --git a/frysk-core/frysk/proc/TestTaskTerminateObserver.java b/frysk-core/frysk/proc/TestTaskTerminateObserver.java index 3d95f79..38c5a96 100644 --- a/frysk-core/frysk/proc/TestTaskTerminateObserver.java +++ b/frysk-core/frysk/proc/TestTaskTerminateObserver.java @@ -214,8 +214,8 @@ public class TestTaskTerminateObserver (SynchronizedOffspring.START_ACK, new String[]{ getExecPath ("funit-threadexit"), - Integer.toString(Pid.get()), - Integer.toString(SynchronizedOffspring.START_ACK.hashCode()), + Integer.toString(Pid.get().intValue()), + Integer.toString(SynchronizedOffspring.START_ACK.intValue()), Integer.toString(timeout), // Seconds }); diff --git a/frysk-core/frysk/proc/live/ChangeLog b/frysk-core/frysk/proc/live/ChangeLog index eef0e9d..127754e 100644 --- a/frysk-core/frysk/proc/live/ChangeLog +++ b/frysk-core/frysk/proc/live/ChangeLog @@ -1,5 +1,8 @@ 2008-02-12 Andrew Cagney <cagney@redhat.com> + * LinuxPtraceHost.java: Update to match frysk.sys.Pid. + * TestRefresh.java: Ditto. + * TestRefresh.java: Update to match frysk.testbed. * TestTaskObserverCode.java: Ditto. * TestRuntimeIsa.java: Ditto. diff --git a/frysk-core/frysk/proc/live/LinuxPtraceHost.java b/frysk-core/frysk/proc/live/LinuxPtraceHost.java index 4aab80e..2c35ee8 100644 --- a/frysk-core/frysk/proc/live/LinuxPtraceHost.java +++ b/frysk-core/frysk/proc/live/LinuxPtraceHost.java @@ -276,7 +276,7 @@ public class LinuxPtraceHost extends LiveHost { public Proc getSelf() { if (self == null) { ProcChanges procChanges = new ProcChanges(); - self = procChanges.update(ProcessIdentifierFactory.create(Pid.get())); + self = procChanges.update(Pid.get()); } return self; } diff --git a/frysk-core/frysk/proc/live/TestRefresh.java b/frysk-core/frysk/proc/live/TestRefresh.java index 45041d4..76386dc 100644 --- a/frysk-core/frysk/proc/live/TestRefresh.java +++ b/frysk-core/frysk/proc/live/TestRefresh.java @@ -114,7 +114,7 @@ public class TestRefresh extends TestLib { return assertFindProc(why, offspring.getPid().intValue()); } Proc assertFindSelf() { - Proc self = findProc(processes, Pid.get()); + Proc self = findProc(processes, Pid.get().intValue()); assertNotNull ("self", self); return self; } diff --git a/frysk-core/frysk/stepping/ChangeLog b/frysk-core/frysk/stepping/ChangeLog index 78b6fda..9f8285d 100644 --- a/frysk-core/frysk/stepping/ChangeLog +++ b/frysk-core/frysk/stepping/ChangeLog @@ -1,3 +1,7 @@ +2008-02-12 Andrew Cagney <cagney@redhat.com> + + * TestStepping.java: Update to match frysk.sys.Pid. + 2008-02-01 Rick Moseley <rmoseley@redhat.com> * SteppingEngine.java (setTaskRunning): New. diff --git a/frysk-core/frysk/stepping/TestStepping.java b/frysk-core/frysk/stepping/TestStepping.java index 6ea8378..def8992 100644 --- a/frysk-core/frysk/stepping/TestStepping.java +++ b/frysk-core/frysk/stepping/TestStepping.java @@ -323,7 +323,7 @@ public class TestStepping extends TestLib { = new SynchronizedOffspring(Signal.USR1, new String[] { getExecPath("funit-rt-siglongjmp"), - Integer.toString(Pid.get()), + Integer.toString(Pid.get().intValue()), Integer.toString(Signal.USR1.intValue()) }); this.testStarted = false; @@ -370,7 +370,7 @@ public class TestStepping extends TestLib { = new SynchronizedOffspring(Signal.USR1, new String[] { getExecPath("funit-rt-goto"), - Integer.toString(Pid.get()), + Integer.toString(Pid.get().intValue()), Integer.toString(Signal.USR1.intValue()) }); this.testStarted = false; @@ -420,7 +420,7 @@ public class TestStepping extends TestLib { = new SynchronizedOffspring(Signal.USR1, new String[] { getExecPath("funit-rt-sigraise"), - Integer.toString(Pid.get()), + Integer.toString(Pid.get().intValue()), Integer.toString(Signal.USR1.intValue()) }); this.testStarted = false; diff --git a/frysk-core/frysk/testbed/ChangeLog b/frysk-core/frysk/testbed/ChangeLog index 1a6b9fd..d05f950 100644 --- a/frysk-core/frysk/testbed/ChangeLog +++ b/frysk-core/frysk/testbed/ChangeLog @@ -1,5 +1,11 @@ 2008-02-12 Andrew Cagney <cagney@redhat.com> + * ExecCommand.java: Update to match frysk.sys.Pid. + * TestLib.java: Ditto. + * SlaveOffspring.java: Ditto. + * LegacyOffspring.java: Ditto. + * FunitThreadsOffspring.java: Ditto. + Replace "int pid" with ProcessIdentifier; use frysk.rsl. * TestLib.java: Update. * TestfileTokenScanner.java: Update. diff --git a/frysk-core/frysk/testbed/ExecCommand.java b/frysk-core/frysk/testbed/ExecCommand.java index 953afc5..3cecd14 100644 --- a/frysk-core/frysk/testbed/ExecCommand.java +++ b/frysk-core/frysk/testbed/ExecCommand.java @@ -77,7 +77,7 @@ public class ExecCommand { args.add("-b"); // Also brand exec } args.add("-m"); - args.add(Integer.toString(Pid.get())); + args.add(Integer.toString(Pid.get().intValue())); args.add("-s"); args.add(Integer.toString(SynchronizedOffspring.START_ACK.hashCode())); args.add("-t"); diff --git a/frysk-core/frysk/testbed/FunitThreadsOffspring.java b/frysk-core/frysk/testbed/FunitThreadsOffspring.java index fb9dbfe..cd867f4 100644 --- a/frysk-core/frysk/testbed/FunitThreadsOffspring.java +++ b/frysk-core/frysk/testbed/FunitThreadsOffspring.java @@ -86,7 +86,7 @@ public class FunitThreadsOffspring command.add("--loop"); // Use getpid as this testsuite always runs the event loop // from the main thread (which has tid==pid). - command.add(Integer.toString(Pid.get())); + command.add(Integer.toString(Pid.get().intValue())); command.add(Integer.toString(START_ACK.hashCode())); command.add(Integer.toString(TestCase.getTimeoutSeconds())); command.add(Integer.toString(threads)); diff --git a/frysk-core/frysk/testbed/LegacyOffspring.java b/frysk-core/frysk/testbed/LegacyOffspring.java index 3f65627..4b85f72 100644 --- a/frysk-core/frysk/testbed/LegacyOffspring.java +++ b/frysk-core/frysk/testbed/LegacyOffspring.java @@ -74,7 +74,7 @@ public class LegacyOffspring command.add(Integer.toString(TestCase.getTimeoutSeconds())); // Use getpid as this testsuite always runs the event loop // from the main thread (which has tid==pid). - command.add(Integer.toString(Pid.get())); + command.add(Integer.toString(Pid.get().intValue())); // Append any arguments. if (argv != null) { for (int n = 0; n < argv.length; n++) diff --git a/frysk-core/frysk/testbed/SlaveOffspring.java b/frysk-core/frysk/testbed/SlaveOffspring.java index 05b4e4e..3243ac1 100644 --- a/frysk-core/frysk/testbed/SlaveOffspring.java +++ b/frysk-core/frysk/testbed/SlaveOffspring.java @@ -77,7 +77,7 @@ public class SlaveOffspring // Use getpid as this testsuite always runs the event loop // from the main thread (which has tid==pid). command.add("-m"); - command.add(Integer.toString(Pid.get())); + command.add(Integer.toString(Pid.get().intValue())); // Append any arguments. if (argv != null) { for (int n = 0; n < argv.length; n++) diff --git a/frysk-core/frysk/testbed/TestLib.java b/frysk-core/frysk/testbed/TestLib.java index c278770..1cae424 100644 --- a/frysk-core/frysk/testbed/TestLib.java +++ b/frysk-core/frysk/testbed/TestLib.java @@ -135,7 +135,7 @@ public class TestLib extends TestCase { * infinite recursion. XXX: Static to avoid gcc bugs. */ static public boolean isChildOfMine (Proc proc) { - return isChildOf(Pid.get(), proc); + return isChildOf(Pid.get().intValue(), proc); } /** @@ -163,7 +163,7 @@ public class TestLib extends TestCase { * infinite recursion. XXX: Static to avoid gcc bugs. */ static public boolean isDescendantOfMine (Proc proc) { - return isDescendantOf(Pid.get(), proc); + return isDescendantOf(Pid.get().intValue(), proc); } /** diff --git a/frysk-sys/frysk/sys/ChangeLog b/frysk-sys/frysk/sys/ChangeLog index dc2487c..1083782 100644 --- a/frysk-sys/frysk/sys/ChangeLog +++ b/frysk-sys/frysk/sys/ChangeLog @@ -1,5 +1,7 @@ 2008-02-12 Andrew Cagney <cagney@redhat.com> + * Pid.java: Return a ProcessIdentifier. + * cni/Ptrace.cxx: Delete. * TestPtrace.java: Delete. * Ptrace.java: Delete. diff --git a/frysk-sys/frysk/sys/Pid.java b/frysk-sys/frysk/sys/Pid.java index 856f983..5c92271 100644 --- a/frysk-sys/frysk/sys/Pid.java +++ b/frysk-sys/frysk/sys/Pid.java @@ -1,6 +1,6 @@ // This file is part of the program FRYSK. // -// Copyright 2005, Red Hat Inc. +// Copyright 2005, 2008, Red Hat Inc. // // FRYSK is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by @@ -43,14 +43,19 @@ package frysk.sys; * Get process information. */ -public final class Pid -{ +public final class Pid { /** * Returns the process ID of this process. */ - public static native int get (); + public static ProcessIdentifier get() { + return ProcessIdentifierFactory.create(pid()); + } + private static native int pid(); /** * Returns the process ID of the parent to this process. */ - public static native int getParent (); + public static ProcessIdentifier getParent () { + return ProcessIdentifierFactory.create(parentPid()); + } + private static native int parentPid(); } diff --git a/frysk-sys/frysk/sys/cni/Pid.cxx b/frysk-sys/frysk/sys/cni/Pid.cxx index bc64e74..9569c25 100644 --- a/frysk-sys/frysk/sys/cni/Pid.cxx +++ b/frysk-sys/frysk/sys/cni/Pid.cxx @@ -1,6 +1,6 @@ // This file is part of the program FRYSK. // -// Copyright 2005, Red Hat Inc. +// Copyright 2005, 2008, Red Hat Inc. // // FRYSK is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by @@ -43,16 +43,13 @@ #include <gcj/cni.h> #include "frysk/sys/Pid.h" -#include "frysk/sys/cni/Errno.hxx" jint -frysk::sys::Pid::get () -{ - return ::getpid (); +frysk::sys::Pid::pid() { + return ::getpid(); } jint -frysk::sys::Pid::getParent () -{ +frysk::sys::Pid::parentPid() { return ::getppid (); } diff --git a/frysk-sys/lib/dwfl/ChangeLog b/frysk-sys/lib/dwfl/ChangeLog index deae9e8..cf6e291 100644 --- a/frysk-sys/lib/dwfl/ChangeLog +++ b/frysk-sys/lib/dwfl/ChangeLog @@ -1,3 +1,8 @@ +2008-02-12 Andrew Cagney <cagney@redhat.com> + + * Dwfl.java (Dwfl(ProcessIdentifier,String)): Replace + Dwfl(int,String). + 2008-02-05 Stan Cox <scox@redhat.com> * cni/Dwfl.cxx (Dwfl::dwflBegin): Check debuginfo CRC. diff --git a/frysk-sys/lib/dwfl/Dwfl.java b/frysk-sys/lib/dwfl/Dwfl.java index 1e34a58..9299c27 100644 --- a/frysk-sys/lib/dwfl/Dwfl.java +++ b/frysk-sys/lib/dwfl/Dwfl.java @@ -1,6 +1,6 @@ // This file is part of the program FRYSK. // -// Copyright 2005, Red Hat Inc. +// Copyright 2005, 2007, 2008, Red Hat Inc. // // FRYSK is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by @@ -41,6 +41,7 @@ package lib.dwfl; import java.util.LinkedList; import gnu.gcj.RawData; +import frysk.sys.ProcessIdentifier; public class Dwfl { @@ -54,8 +55,8 @@ public class Dwfl { pointer = dwflBegin(sysroot); } - Dwfl(int pid, String sysroot) { - pointer = dwflBegin(sysroot, pid); + Dwfl(ProcessIdentifier pid, String sysroot) { + pointer = dwflBegin(sysroot, pid.intValue()); } /** hooks/post-receive -- frysk system monitor/debugger
reply other threads:[~2008-02-12 23:13 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=20080212231332.27880.qmail@sourceware.org \ --to=cagney@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).