[SCM] master: Reurn null when cannot get ISA.

rmoseley@sourceware.org rmoseley@sourceware.org
Thu Jan 17 19:57:00 GMT 2008


The branch, master has been updated
       via  0ca8a85014ea151d6fcb01676cacd86841da3af4 (commit)
      from  86fc26f68c285f6f5740351cfffea9cbb96733c4 (commit)

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

- Log -----------------------------------------------------------------
commit 0ca8a85014ea151d6fcb01676cacd86841da3af4
Author: Rick Moseley <rmoseley@dhcp-215.hsv.redhat.com>
Date:   Thu Jan 17 13:56:46 2008 -0600

    Reurn null when cannot get ISA.
    
    * IsaFactory.java: Return null when can't get ISA.

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

Summary of changes:
 frysk-core/frysk/proc/live/ChangeLog       |    1 +
 frysk-core/frysk/proc/live/IsaFactory.java |   18 +++++++++++-------
 2 files changed, 12 insertions(+), 7 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/proc/live/ChangeLog b/frysk-core/frysk/proc/live/ChangeLog
index 2888dee..98df95a 100644
--- a/frysk-core/frysk/proc/live/ChangeLog
+++ b/frysk-core/frysk/proc/live/ChangeLog
@@ -2,6 +2,7 @@
 
 	* LinuxWaitBuilder.java: Catch error when process is gone.
 	* LinuxPtraceTaskState.java: Handle null ISA return.
+	* IsaFactory.java: Return null when can't get ISA.
 
 2008-01-17  Andrew Cagney  <cagney@redhat.com>
 
diff --git a/frysk-core/frysk/proc/live/IsaFactory.java b/frysk-core/frysk/proc/live/IsaFactory.java
index ae454b3..2c262ab 100644
--- a/frysk-core/frysk/proc/live/IsaFactory.java
+++ b/frysk-core/frysk/proc/live/IsaFactory.java
@@ -56,6 +56,7 @@ public class IsaFactory
   private static IsaFactory factory;
   static final Logger logger = Logger.getLogger("frysk");
   private Hashtable isaHash;
+  private String MESSAGE = "getting task's executable";
     
     IsaFactory() {
 	isaHash = new Hashtable();
@@ -96,16 +97,16 @@ public class IsaFactory
     try {
 	exe = new File("/proc/" + pid + "/exe").getCanonicalPath();
     } catch (java.io.IOException e) {
-	throw new RuntimeException("getting task's executable", e);
+	throw new RuntimeException(MESSAGE, e);
     }
     Elf elfFile;
     try {
 	elfFile = new Elf(exe, ElfCommand.ELF_C_READ);
     } catch (ElfFileException e) {
-	throw new RuntimeException ("getting task's executable", e);
+	throw new RuntimeException (MESSAGE, e);
     }
     catch (ElfException e) {
-	throw new RuntimeException ("getting task's executable", e);
+	throw new RuntimeException (MESSAGE, e);
     }
 
     try {
@@ -145,10 +146,13 @@ public class IsaFactory
       return isa;
   }
 
-  public  Isa getIsa(int pid) 
-  {
-    return getIsa(pid, null);
-  }
+  public Isa getIsa(int pid) {
+	try {
+	    return getIsa(pid, null);
+	} catch (Exception e) {
+	    return null;
+	}
+    }
   
   public Isa getIsa(Task task)
   {


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



More information about the Frysk-cvs mailing list