public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
From: scox@sourceware.org
To: frysk-cvs@sourceware.org
Subject: [SCM]  master: Make reloading sysroot aware.
Date: Thu, 10 Apr 2008 18:38:00 -0000	[thread overview]
Message-ID: <20080410183847.13682.qmail@sourceware.org> (raw)

The branch, master has been updated
       via  8a1b13060520fedf83f77e2f87075995c4722922 (commit)
      from  c1c9ca07e98bf3b6c93ce970c09c7612634a7a97 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 8a1b13060520fedf83f77e2f87075995c4722922
Author: Stan Cox <scox@redhat.com>
Date:   Thu Apr 10 14:35:45 2008 -0400

    Make reloading sysroot aware.
    
    * KillCommand.java (interpret): Make load sysroot aware.
    * TestLinuxExe.java (testSysRootedProc): Change to use funit-quicksort.
    * TestSysRoot.java: Change to use funit-quicksort.

-----------------------------------------------------------------------

Summary of changes:
 frysk-core/frysk/hpd/ChangeLog               |    4 +++
 frysk-core/frysk/hpd/KillCommand.java        |   15 +++++++---
 frysk-core/frysk/proc/dead/ChangeLog         |    4 +++
 frysk-core/frysk/proc/dead/TestLinuxExe.java |    8 +++---
 frysk-core/frysk/sysroot/ChangeLog           |    4 +++
 frysk-core/frysk/sysroot/TestSysRoot.java    |   36 +++++++++++++-------------
 6 files changed, 44 insertions(+), 27 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/hpd/ChangeLog b/frysk-core/frysk/hpd/ChangeLog
index 87296fb..a4ccf28 100644
--- a/frysk-core/frysk/hpd/ChangeLog
+++ b/frysk-core/frysk/hpd/ChangeLog
@@ -1,3 +1,7 @@
+2008-04-10  Stan Cox  <scox@redhat.com>
+
+	* KillCommand.java (interpret): Make load sysroot aware.
+
 2008-04-08  Stan Cox  <scox@redhat.com>
 
 	* TestSysRoot.java (testHaveSysRoot): Use funit-quicksort instead of 
diff --git a/frysk-core/frysk/hpd/KillCommand.java b/frysk-core/frysk/hpd/KillCommand.java
index 7a90ede..52be750 100644
--- a/frysk-core/frysk/hpd/KillCommand.java
+++ b/frysk-core/frysk/hpd/KillCommand.java
@@ -44,6 +44,8 @@ import java.util.Iterator;
 import java.util.Map;
 import frysk.proc.Proc;
 import frysk.proc.Task;
+import frysk.sysroot.SysRootFile;
+
 import java.util.List;
 
 /**
@@ -108,8 +110,13 @@ public class KillCommand extends ParameterizedCommand {
 	Iterator bar = saveProcs.keySet().iterator();
 	while (bar.hasNext()) {
 	    Integer procId = (Integer) bar.next();
-	    String cmdline = (String) saveProcs.get(procId);
+	    SysRootFile sysRootFile = (SysRootFile) saveProcs.get(procId);
+	    String cmdline = sysRootFile.getFile().getAbsolutePath();
+	    if (sysRootFile.getSysRoot().getAbsolutePath().compareTo("/") != 0) {
+		cmdline += " -sysroot " + sysRootFile.getSysRoot().getAbsolutePath();
+	    }
 	    cli.taskID = procId.intValue();
+	    System.out.println("XXX " + cmdline);
 	    cli.execCommand("load " + cmdline + "\n");
 	}
 	saveProcs.clear();
@@ -146,8 +153,7 @@ public class KillCommand extends ParameterizedCommand {
 			+ " that was created from " + proc.getExeFile().getSysRootedPath(),
 			Message.TYPE_NORMAL);
 		// Save the procs we are killing so we can re-load them later
-		saveProcs.put(new Integer(taskData.getParentID()), proc
-			.getExeFile().getSysRootedPath());
+		saveProcs.put(new Integer(taskData.getParentID()), proc.getExeFile());
 		procPID = proc.getPid();
 		// Now, call the Proc object to kill off the executable(s)
 		proc.requestKill();
@@ -192,8 +198,7 @@ public class KillCommand extends ParameterizedCommand {
 		Proc taskProc = taskData.getTask().getProc();
 		procId = taskProc.getPid();
 		if (taskProc == proc && tempId != procId) {
-		    saveProcs.put(new Integer(taskData.getParentID()), proc
-				.getExeFile().getSysRootedPath());
+		    saveProcs.put(new Integer(taskData.getParentID()), proc.getExeFile());
 		    cli.addMessage("Killing process " + proc.getPid()
 			+ " that was created from " + proc.getExeFile().getSysRootedPath(),
 			Message.TYPE_NORMAL);
diff --git a/frysk-core/frysk/proc/dead/ChangeLog b/frysk-core/frysk/proc/dead/ChangeLog
index 0699be9..0bee9bf 100644
--- a/frysk-core/frysk/proc/dead/ChangeLog
+++ b/frysk-core/frysk/proc/dead/ChangeLog
@@ -1,3 +1,7 @@
+2008-04-10  Stan Cox  <scox@redhat.com>
+
+	* TestLinuxExe.java (testSysRootedProc): Change to use funit-quicksort.
+
 2008-04-02  Phil Muldoon  <pmuldoon@redhat.com>
 
 	* DeadTask.java (requestAddWatchObserver): Add
diff --git a/frysk-core/frysk/proc/dead/TestLinuxExe.java b/frysk-core/frysk/proc/dead/TestLinuxExe.java
index c2025d6..4e94183 100644
--- a/frysk-core/frysk/proc/dead/TestLinuxExe.java
+++ b/frysk-core/frysk/proc/dead/TestLinuxExe.java
@@ -114,12 +114,12 @@ public class TestLinuxExe extends TestLib {
     }
     
     public void testSysRootedProc() {
-	SysRootCache.setSysroot("funit-addresses", Config.getPkgLibFile("test-sysroot").getAbsolutePath());
-	Proc proc = LinuxExeFactory.createProc(new String[] {"funit-addresses", ""});
+	SysRootCache.setSysroot("funit-quicksort", Config.getPkgLibFile("test-sysroot").getAbsolutePath());
+	Proc proc = LinuxExeFactory.createProc(new String[] {"funit-quicksort", ""});
 	int testValue = proc.getExeFile().getSysRootedPath().compareTo(Config.getPkgLibFile("test-sysroot").getAbsolutePath()
-		+ "/usr/bin/funit-addresses");
+		+ "/usr/bin/funit-quicksort");
 	assertEquals("exe", 0, testValue); 
-	testValue = proc.getExeFile().getFile().getAbsolutePath().compareTo("/usr/bin/funit-addresses");
+	testValue = proc.getExeFile().getFile().getAbsolutePath().compareTo("/usr/bin/funit-quicksort");
 	assertEquals("exeFile", 0, testValue);
     }
 }
diff --git a/frysk-core/frysk/sysroot/ChangeLog b/frysk-core/frysk/sysroot/ChangeLog
index 0a21d10..81d66fe 100644
--- a/frysk-core/frysk/sysroot/ChangeLog
+++ b/frysk-core/frysk/sysroot/ChangeLog
@@ -1,3 +1,7 @@
+2008-04-10  Stan Cox  <scox@redhat.com>
+
+	* TestSysRoot.java: Change to use funit-quicksort.
+
 2008-04-07  Stan Cox  <scox@redhat.com>
 
 	* SysRoot.java (getLibPathViaSysRoot): New.
diff --git a/frysk-core/frysk/sysroot/TestSysRoot.java b/frysk-core/frysk/sysroot/TestSysRoot.java
index ceb3060..1b6512b 100644
--- a/frysk-core/frysk/sysroot/TestSysRoot.java
+++ b/frysk-core/frysk/sysroot/TestSysRoot.java
@@ -48,19 +48,19 @@ public class TestSysRoot extends TestLib {
     public void testGetPathViaDefaultRoot() {
 	String pkgLibDir = Config.getPkgLibFile(null).getPath();
 	SysRoot sysroot = new SysRoot(new File("/"));
-	SysRootFile testPath = sysroot.getPathViaSysRoot("funit-addresses", 
+	SysRootFile testPath = sysroot.getPathViaSysRoot("funit-quicksort", 
 		"/alpha/dir:/beta/dir:/gamma/dir:" + pkgLibDir);
-	int testValue = testPath.getSysRootedFile().getPath().compareTo(pkgLibDir + "/funit-addresses");
+	int testValue = testPath.getSysRootedFile().getPath().compareTo(pkgLibDir + "/funit-quicksort");
 	assertEquals("getPathViaSysRoot default root relative via PATH", 0, testValue);
 	testPath = sysroot.getPathViaSysRoot(
-		"frysk/pkglibdir/funit-addresses", 
+		"frysk/pkglibdir/funit-quicksort", 
 		"/alpha/dir:/beta/dir:/gamma/dir:" + pkgLibDir);
-	testValue = testPath.getSysRootedFile().getPath().compareTo("frysk/pkglibdir/funit-addresses");
+	testValue = testPath.getSysRootedFile().getPath().compareTo("frysk/pkglibdir/funit-quicksort");
 	assertEquals("getPathViaSysRoot default root relative", 0, testValue);
 	testPath = sysroot.getPathViaSysRoot(
-		pkgLibDir + "/funit-addresses", 
+		pkgLibDir + "/funit-quicksort", 
 		"/alpha/dir:/beta/dir:/gamma/dir:" + pkgLibDir);
-	testValue = testPath.getSysRootedFile().getPath().compareTo(pkgLibDir + "/funit-addresses");
+	testValue = testPath.getSysRootedFile().getPath().compareTo(pkgLibDir + "/funit-quicksort");
 	assertEquals("getPathViaSysRoot default root absolute", 0, testValue);
     }
 
@@ -68,30 +68,30 @@ public class TestSysRoot extends TestLib {
 	String sysRootPath = Config.getPkgLibFile(".").getParent()
 		+ "/test-sysroot";
 	SysRoot sysRoot = new SysRoot(new File(sysRootPath));
-	SysRootFile testPath = sysRoot.getPathViaSysRoot("funit-addresses", 
+	SysRootFile testPath = sysRoot.getPathViaSysRoot("funit-quicksort", 
 		"/alpha/dir:/beta/dir:/gamma/dir:/usr/bin");
-	int testValue = testPath.getSysRootedFile().compareTo(new File(sysRootPath + "/usr/bin/funit-addresses"));
+	int testValue = testPath.getSysRootedFile().compareTo(new File(sysRootPath + "/usr/bin/funit-quicksort"));
 	assertEquals("getPathViaSysroot relative via PATH", 0, testValue);
-	testPath = sysRoot.getPathViaSysRoot("frysk/pkglibdir/funit-addresses", 
+	testPath = sysRoot.getPathViaSysRoot("frysk/pkglibdir/funit-quicksort", 
 		"/alpha/dir:/beta/dir:/gamma/dir:/usr/bin");
-	testValue = testPath.getSysRootedFile().compareTo(new File("frysk/pkglibdir/funit-addresses"));
+	testValue = testPath.getSysRootedFile().compareTo(new File("frysk/pkglibdir/funit-quicksort"));
 	assertEquals("getPathViaSysRoot relative", 0, testValue);
-	testPath = sysRoot.getPathViaSysRoot(sysRootPath + "/funit-addresses", 
+	testPath = sysRoot.getPathViaSysRoot(sysRootPath + "/funit-quicksort", 
 		"/alpha/dir:/beta/dir:/gamma/dir:/usr/bin");
-	testValue = testPath.getSysRootedFile().compareTo(new File(sysRootPath + "/funit-addresses"));
+	testValue = testPath.getSysRootedFile().compareTo(new File(sysRootPath + "/funit-quicksort"));
 	assertEquals("getPathViaSysRoot absolute including SysRoot", 0, testValue);
-	testPath = sysRoot.getPathViaSysRoot("/usr/bin/funit-addresses", 
+	testPath = sysRoot.getPathViaSysRoot("/usr/bin/funit-quicksort", 
 		"/alpha/dir:/beta/dir:/gamma/dir:/usr/bin");
-	testValue = testPath.getFile().compareTo(new File("/usr/bin/funit-addresses"));
+	testValue = testPath.getFile().compareTo(new File("/usr/bin/funit-quicksort"));
 	assertEquals("getPathViaSysRoot absolute", 0, testValue);
     }
 
     public void testGetSourcePathViaDefaultRoot() {
 	SysRoot sysRoot = new SysRoot(new File("/"));
 	File absoluteSourcePath = new File(
-		"/frysk/src/frysk-core/frysk/pkglibdir/funit-addresses.c");
+		"/frysk/src/frysk-core/frysk/pkglibdir/funit-quicksort.c");
 	File relativeSourcePath = new File(
-		"../../src/frysk-core/frysk/pkglibdir/funit-addresses.c");
+		"../../src/frysk-core/frysk/pkglibdir/funit-quicksort.c");
 	File compilationDir = new File("/frysk/bld/frysk-core");
 	SysRootFile testPath = sysRoot.getSourcePathViaSysRoot(compilationDir,
 		absoluteSourcePath);
@@ -110,9 +110,9 @@ public class TestSysRoot extends TestLib {
 		+ "/test-sysroot";
 	SysRoot sysRoot = new SysRoot(new File(sysRootPath));
 	File absoluteSourcePath = new File(
-		"/frysk/src/frysk-core/frysk/pkglibdir/funit-addresses.c");
+		"/frysk/src/frysk-core/frysk/pkglibdir/funit-quicksort.c");
 	File relativeSourcePath = new File(
-		"../../src/frysk-core/frysk/pkglibdir/funit-addresses.c");
+		"../../src/frysk-core/frysk/pkglibdir/funit-quicksort.c");
 	File compilationDir = new File("/frysk/bld/frysk-core");
 	File correctPath = new File(sysRootPath + absoluteSourcePath.getPath());
 	SysRootFile testPath = sysRoot.getSourcePathViaSysRoot(compilationDir,


hooks/post-receive
--
frysk system monitor/debugger


                 reply	other threads:[~2008-04-10 18:38 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=20080410183847.13682.qmail@sourceware.org \
    --to=scox@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: link
Be 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).