public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
* [SCM]  master: Add -noexe option to fhpd command line
@ 2007-11-16 11:42 pmuldoon
  0 siblings, 0 replies; only message in thread
From: pmuldoon @ 2007-11-16 11:42 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  91ea7094b8352cb974509d5790a80c96a0de648e (commit)
      from  d4080f5cc94e2364b34b9e30c9cba19070d30c98 (commit)

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

- Log -----------------------------------------------------------------
commit 91ea7094b8352cb974509d5790a80c96a0de648e
Author: Phil Muldoon <pmuldoon@redhat.com>
Date:   Fri Nov 16 11:42:40 2007 +0000

    Add -noexe option to fhpd command line
    
    2007-11-16  Phil Muldoon  <pmuldoon@redhat.com>
    
    	* fhpd.java(main): Add option -noexe. Append
    	-noexe on no executable and option specified.

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

Summary of changes:
 frysk-core/frysk/bindir/ChangeLog |    5 +++++
 frysk-core/frysk/bindir/fhpd.java |   25 +++++++++++++++++++++++--
 2 files changed, 28 insertions(+), 2 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/bindir/ChangeLog b/frysk-core/frysk/bindir/ChangeLog
index 534330e..3280ca7 100644
--- a/frysk-core/frysk/bindir/ChangeLog
+++ b/frysk-core/frysk/bindir/ChangeLog
@@ -1,3 +1,8 @@
+2007-11-16  Phil Muldoon  <pmuldoon@redhat.com>
+
+	* fhpd.java(main): Add option -noexe. Append
+	-noexe on no executable and option specified. 
+
 2007-11-13  Sami Wagiaalla  <swagiaal@redhat.com>
 
 	* TestFstack.java (testBackTraceWithParams): Removed value
diff --git a/frysk-core/frysk/bindir/fhpd.java b/frysk-core/frysk/bindir/fhpd.java
index fcc98d8..167adde 100644
--- a/frysk-core/frysk/bindir/fhpd.java
+++ b/frysk-core/frysk/bindir/fhpd.java
@@ -52,6 +52,8 @@ import frysk.proc.Manager;
 import frysk.proc.ProcId;
 import frysk.util.CommandlineParser;
 import frysk.util.PtyTerminal;
+import gnu.classpath.tools.getopt.Option;
+import gnu.classpath.tools.getopt.OptionException;
 
 public class fhpd 
 {
@@ -59,6 +61,7 @@ public class fhpd
   static File execFile;
   static File core;
   static File exeFile;
+  static boolean noExe = false;
 
   final static class FhpdCompletor implements Completor
   {
@@ -101,12 +104,28 @@ public class fhpd
 	core = corePairs[0].coreFile;
 	exeFile = corePairs[0].exeFile;
     }
+    
+  
       
       
-      
-    };    
+    };
+    
+    parser.add(new Option("noexe", 
+				" Do not attempt to read an executable for a corefile") {
+			public void parsed(String exeValue) throws OptionException {
+				try {
+					noExe = true;
+
+				} catch (IllegalArgumentException e) {
+					throw new OptionException("Invalid noexe parameter "
+							+ exeValue);
+				}
+
+			}
+		});
     parser.setHeader("Usage: fhpd <PID> || fhpd <COREFILE> [<EXEFILE>]");
     parser.parse(args);
+    
     Manager.eventLoop.start();
     String line = "";
     
@@ -120,6 +139,8 @@ public class fhpd
 	  line = "core " + core.getCanonicalPath();      
 	  if (exeFile != null)
 	      line += " " + exeFile.getCanonicalPath();
+	  else if (noExe)
+		  line +=" -noexe";
       }
     }
     catch (IOException ignore) {}


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


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

only message in thread, other threads:[~2007-11-16 11:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-16 11:42 [SCM] master: Add -noexe option to fhpd command line pmuldoon

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