public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
* [SCM]  master: Reurn null when cannot get ISA.
@ 2008-01-17 19:57 rmoseley
  0 siblings, 0 replies; only message in thread
From: rmoseley @ 2008-01-17 19:57 UTC (permalink / raw)
  To: frysk-cvs

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-01-17 19:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-17 19:57 [SCM] master: Reurn null when cannot get ISA rmoseley

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).