[SCM] master: Check for null elf header, and allow fhpd to handle error printing.
pmuldoon@sourceware.org
pmuldoon@sourceware.org
Thu Nov 8 16:25:00 GMT 2007
The branch, master has been updated
via cc4bec76cd893ccb3be127fbf4748ac34019f392 (commit)
from 67936b53edea993c47c32d70f6190c29aef01cfe (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit cc4bec76cd893ccb3be127fbf4748ac34019f392
Author: Phil Muldoon <pmuldoon@redhat.com>
Date: Thu Nov 8 16:25:13 2007 +0000
Check for null elf header, and allow fhpd to handle error printing.
2007-11-08 Phil Muldoon <pmuldoon@redhat.com>
* CoreCommand.java (interpret): Remove try{} for host building.
Let fhpd error handling print message.
2007-11-08 Phil Muldoon <pmuldoon@redhat.com>
* LinuxHost.java (LinuxHost): Check for null Elf Header
-----------------------------------------------------------------------
Summary of changes:
frysk-core/frysk/hpd/ChangeLog | 5 +++++
frysk-core/frysk/hpd/CoreCommand.java | 9 +--------
frysk-core/frysk/proc/dead/ChangeLog | 3 +++
frysk-core/frysk/proc/dead/LinuxHost.java | 3 ++-
4 files changed, 11 insertions(+), 9 deletions(-)
First 500 lines of diff:
diff --git a/frysk-core/frysk/hpd/ChangeLog b/frysk-core/frysk/hpd/ChangeLog
index a1df095..a4781aa 100644
--- a/frysk-core/frysk/hpd/ChangeLog
+++ b/frysk-core/frysk/hpd/ChangeLog
@@ -1,3 +1,8 @@
+2007-11-08 Phil Muldoon <pmuldoon@redhat.com>
+
+ * CoreCommand.java (interpret): Remove try{} for host building.
+ Let fhpd error handling print message.
+
2007-11-08 Andrew Cagney <cagney@redhat.com>
* ParameterizedCommand.java
diff --git a/frysk-core/frysk/hpd/CoreCommand.java b/frysk-core/frysk/hpd/CoreCommand.java
index 2a7354f..0ffefaf 100644
--- a/frysk-core/frysk/hpd/CoreCommand.java
+++ b/frysk-core/frysk/hpd/CoreCommand.java
@@ -97,14 +97,7 @@ public class CoreCommand extends ParameterizedCommand {
"No core file found, or cannot read corefile");
// Build Core. Move any exceptions up to cli and print to user.
- try {
- coreHost = getHost(coreFile, exeFile, noExeOption);
- } catch (Exception e) {
- cli.addMessage("An error has occured while loading corefile: '"
- + coreFile.getAbsolutePath() + "'. Error message is: "
- + e.getMessage(), Message.TYPE_ERROR);
- return;
- }
+ coreHost = getHost(coreFile, exeFile, noExeOption);
// Get the core proc.
coreProc = getProc(coreHost);
diff --git a/frysk-core/frysk/proc/dead/ChangeLog b/frysk-core/frysk/proc/dead/ChangeLog
index bd3c6f4..620bb64 100644
--- a/frysk-core/frysk/proc/dead/ChangeLog
+++ b/frysk-core/frysk/proc/dead/ChangeLog
@@ -1,7 +1,10 @@
2007-11-08 Phil Muldoon <pmuldoon@redhat.com>
+ * LinuxHost.java (LinuxHost): Check for null Elf Header
+
* LinuxHost.java (LinuxHost): Check in exe is set to
null.
+
2007-11-07 Phil Muldoon <pmuldoon@redhat.com>
diff --git a/frysk-core/frysk/proc/dead/LinuxHost.java b/frysk-core/frysk/proc/dead/LinuxHost.java
index 3052223..37d4f26 100644
--- a/frysk-core/frysk/proc/dead/LinuxHost.java
+++ b/frysk-core/frysk/proc/dead/LinuxHost.java
@@ -84,7 +84,8 @@ public class LinuxHost extends DeadHost {
+ "not a valid ELF core file.");
}
- if (corefileElf.getEHeader().type != ElfEHeader.PHEADER_ET_CORE) {
+ if ((corefileElf.getEHeader() == null) ||
+ (corefileElf.getEHeader().type != ElfEHeader.PHEADER_ET_CORE)) {
this.corefileElf.close();
throw new RuntimeException("'" + this.coreFile.getAbsolutePath()
+ "' is not a corefile.");
hooks/post-receive
--
frysk system monitor/debugger
More information about the Frysk-cvs
mailing list