public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
From: pmuldoon@sourceware.org
To: frysk-cvs@sourceware.org
Subject: [SCM]  master: maps/auxv null data checks and handling.
Date: Thu, 13 Dec 2007 11:58:00 -0000	[thread overview]
Message-ID: <20071213115751.3766.qmail@sourceware.org> (raw)

The branch, master has been updated
       via  e6384876e3801336d0ae446a434c6ca1c0949d8d (commit)
      from  6e336c8e877a60dc82d621ae7f06f0c8dcb01099 (commit)

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

- Log -----------------------------------------------------------------
commit e6384876e3801336d0ae446a434c6ca1c0949d8d
Author: Phil Muldoon <pmuldoon@redhat.com>
Date:   Thu Dec 13 11:57:34 2007 +0000

    maps/auxv null data checks and handling.
    
    2007-12-13  Phil Muldoon  <pmuldoon@redhat.com>
    
            * AuxvCommand.java (interpret): Check for null auxv data.
            * MapsCommand.java (interpret): Check for null maps data.

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

Summary of changes:
 frysk-core/frysk/hpd/AuxvCommand.java |   11 ++++++++---
 frysk-core/frysk/hpd/ChangeLog        |    5 +++++
 frysk-core/frysk/hpd/MapsCommand.java |   12 ++++++++----
 3 files changed, 21 insertions(+), 7 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/hpd/AuxvCommand.java b/frysk-core/frysk/hpd/AuxvCommand.java
index 33b6554..5f59145 100644
--- a/frysk-core/frysk/hpd/AuxvCommand.java
+++ b/frysk-core/frysk/hpd/AuxvCommand.java
@@ -65,14 +65,19 @@ public class AuxvCommand extends ParameterizedCommand {
   void interpret(CLI cli, Input cmd, Object options) {
     PTSet ptset = cli.getCommandPTSet(cmd);
     Iterator taskDataIterator = ptset.getTaskData();
-    if (taskDataIterator.hasNext() == false)
-    {
+    if (taskDataIterator.hasNext() == false) {
       cli.addMessage("Cannot find main task. Cannot print out auxv", Message.TYPE_ERROR);
       return;
     }
     Proc mainProc = ((TaskData) taskDataIterator.next()).getTask().getProc();
     Auxv[] liveAux = mainProc.getAuxv();
-    
+
+    if (liveAux == null) {
+	cli.addMessage("No Auxv data to print for this process",
+		       Message.TYPE_WARNING);
+	
+	return;
+    }
     class BuildAuxv extends AuxvStringBuilder {
       
       public StringBuffer auxvData = new StringBuffer();
diff --git a/frysk-core/frysk/hpd/ChangeLog b/frysk-core/frysk/hpd/ChangeLog
index 4313944..eca9cb0 100644
--- a/frysk-core/frysk/hpd/ChangeLog
+++ b/frysk-core/frysk/hpd/ChangeLog
@@ -1,3 +1,8 @@
+2007-12-13  Phil Muldoon  <pmuldoon@redhat.com>
+
+	* AuxvCommand.java (interpret): Check for null auxv data.
+	* MapsCommand.java (interpret): Check for null maps data.
+
 2007-12-12  Rick Moseley  <rmoseley@redhat.com>
 
 	* TestHpdTestHarness.java: New for testing bz #5480.
diff --git a/frysk-core/frysk/hpd/MapsCommand.java b/frysk-core/frysk/hpd/MapsCommand.java
index 1c1b212..278c9dc 100644
--- a/frysk-core/frysk/hpd/MapsCommand.java
+++ b/frysk-core/frysk/hpd/MapsCommand.java
@@ -57,14 +57,18 @@ public class MapsCommand extends ParameterizedCommand {
   void interpret(CLI cli, Input cmd, Object options) {
     PTSet ptset = cli.getCommandPTSet(cmd);
     Iterator taskDataIterator = ptset.getTaskData();
-    if (taskDataIterator.hasNext() == false)
-    {
+    if (taskDataIterator.hasNext() == false)  {
       cli.addMessage("Cannot find main task. Cannot print out process maps.", Message.TYPE_ERROR);
       return;
     }
     Proc mainProc = ((TaskData) taskDataIterator.next()).getTask().getProc();
     MemoryMap[] maps = mainProc.getMaps();
-    
+
+    if (maps == null) {
+	cli.addMessage("No maps data to print for this process", 
+		       Message.TYPE_WARNING);
+	return;
+    }
     for (int i=0; i<maps.length; i++)
     	cli.outWriter.println(maps[i].toString());
   }
@@ -73,4 +77,4 @@ public class MapsCommand extends ParameterizedCommand {
     return -1;
   }
   
-}
\ No newline at end of file
+}


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


                 reply	other threads:[~2007-12-13 11:58 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=20071213115751.3766.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: link
Be 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).