public inbox for frysk-cvs@sourceware.org help / color / mirror / Atom feed
From: pmuldoon@sourceware.org To: frysk-cvs@sourceware.org Subject: [SCM] master: Use CanonicalFile Date: Fri, 08 Feb 2008 11:54:00 -0000 [thread overview] Message-ID: <20080208115439.20613.qmail@sourceware.org> (raw) The branch, master has been updated via 12ad3f3bda382725291d9d8d5bed2f26ae2f4282 (commit) from 5db106debc079cc8005316d5b2b6ce5806921994 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 12ad3f3bda382725291d9d8d5bed2f26ae2f4282 Author: Phil Muldoon <pmuldoon@redhat.com> Date: Fri Feb 8 11:54:33 2008 +0000 Use CanonicalFile 2008-02-08 Phil Muldoon <pmuldoon@redhat.com> * LinuxCoreHost.java: Use CanonicalFile() througout. ----------------------------------------------------------------------- Summary of changes: frysk-core/frysk/proc/dead/ChangeLog | 4 +++ frysk-core/frysk/proc/dead/LinuxCoreHost.java | 26 ++++++++++++++++++------ 2 files changed, 23 insertions(+), 7 deletions(-) First 500 lines of diff: diff --git a/frysk-core/frysk/proc/dead/ChangeLog b/frysk-core/frysk/proc/dead/ChangeLog index cbb951b..35fb5b6 100644 --- a/frysk-core/frysk/proc/dead/ChangeLog +++ b/frysk-core/frysk/proc/dead/ChangeLog @@ -1,3 +1,7 @@ +2008-02-08 Phil Muldoon <pmuldoon@redhat.com> + + * LinuxCoreHost.java: Use CanonicalFile() througout. + 2008-02-07 Andrew Cagney <cagney@redhat.com> * DeadHost.java (requestRefreshXXX()): Delete. diff --git a/frysk-core/frysk/proc/dead/LinuxCoreHost.java b/frysk-core/frysk/proc/dead/LinuxCoreHost.java index b0c2870..10078d3 100644 --- a/frysk-core/frysk/proc/dead/LinuxCoreHost.java +++ b/frysk-core/frysk/proc/dead/LinuxCoreHost.java @@ -1,6 +1,6 @@ // This file is part of the program FRYSK. // -// Copyright 2007 Red Hat Inc. +// Copyright 2007, 2008 Red Hat Inc. // // FRYSK is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by @@ -43,6 +43,7 @@ import frysk.event.EventLoop; import java.util.LinkedList; import java.util.List; import java.io.File; +import java.io.IOException; import java.util.Iterator; import lib.dwfl.Elf; @@ -71,7 +72,12 @@ public class LinuxCoreHost extends DeadHost { EventLoop eventLoop; private LinuxCoreHost(EventLoop eventLoop, File coreFile, boolean doRefresh) { - this.coreFile = coreFile; + + try { + this.coreFile = coreFile.getCanonicalFile(); + } catch (IOException e) { + throw new RuntimeException(e); + } this.eventLoop = eventLoop; try { this.corefileElf = new Elf(coreFile.getPath(), @@ -84,7 +90,7 @@ public class LinuxCoreHost extends DeadHost { if ((corefileElf.getEHeader() == null) || (corefileElf.getEHeader().type != ElfEHeader.PHEADER_ET_CORE)) { this.corefileElf.close(); - throw new RuntimeException("'" + this.coreFile.getAbsolutePath() + throw new RuntimeException("'" + this.getName() + "' is not a corefile."); } @@ -103,15 +109,21 @@ public class LinuxCoreHost extends DeadHost { if (exeSetToNull == false) if (exeFile.canRead() && exeFile.exists()) { - this.exeFile = exeFile; + try { + this.exeFile = exeFile.getCanonicalFile(); + } catch (IOException e) { + status.hasExe = false; + status.hasExeProblem = true; + } status.hasExe = true; status.hasExeProblem = false; } else { status.hasExe = false; status.hasExeProblem = true; status.message = "The user provided executable: " - + exeFile.getAbsolutePath() + " could not be accessed"; + + exeFile.getName() + " could not be accessed"; } + this.sendRefresh(); } @@ -143,7 +155,7 @@ public class LinuxCoreHost extends DeadHost { DeconstructCoreFile(Elf coreFileElf) { this.coreFileElf = coreFileElf; - status.coreName = coreFile.getAbsolutePath(); + status.coreName = coreFile.getName(); ElfEHeader eHeader = this.coreFileElf.getEHeader(); // Get number of program header entries. @@ -183,7 +195,7 @@ public class LinuxCoreHost extends DeadHost { status.hasExe = false; else { status.hasExe = true; - status.exeName = exeFile.getAbsolutePath(); + status.exeName = exeFile.getName(); } return proc; } hooks/post-receive -- frysk system monitor/debugger
reply other threads:[~2008-02-08 11:54 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=20080208115439.20613.qmail@sourceware.org \ --to=pmuldoon@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: linkBe 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).