public inbox for frysk@sourceware.org
 help / color / mirror / Atom feed
From: Phil Muldoon <pmuldoon@redhat.com>
To: Frysk Hackers <frysk@sourceware.org>
Subject: Outline Proposal: add getMaps() to abstract Proc.java
Date: Mon, 14 May 2007 17:36:00 -0000	[thread overview]
Message-ID: <46489393.2000600@redhat.com> (raw)


This api will allow the direct access to map information via the 
abstract class Proc. This api will provide the maps for the Proc instead 
of the user constructing them manually via MapsBuilder for live 
processes, and CorefileByteBuffer for core file processes. Maps would 
not be stored in Proc as they are subject to change. This api would be 
demand based only (not via refresh).

Rough outline:

In Proc.java:

  /**
   * Return the Maps of the Proc.
   */
  public int getMaps ()
  {
    Map[] maps = sendrecMaps();
    return maps;
  }

  protected abstract Map[] sendrecMaps ();


in LinuxPtraceProc.java

protected Map[] sendrecMaps()
{
   // Implement frysk.sys.proc.MapsBuilder here
}

in LinuxCoreFileProc.java

protected Map[] sendrecMaps()
{
   return coreFileByteBuffer.getConstructedMaps()
}

in Maps.java

// Think of a different name for this class
public class Map
{
    public long addressLow;
    public long addressHigh;
    public boolean permRead;
    public boolean permWrite;
    public boolean permExecute;
    public boolean shared;
    public long offset;
    public int devMajor;
    public int devMinor;
    public int inode;    
    public int pathnameOffset;
    public int pathnameLength;

    public void Map(....)
    {
       // implement constructor setters here
        ............
        ............
    }
}



             reply	other threads:[~2007-05-14 16:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-14 17:36 Phil Muldoon [this message]
2007-05-14 18:01 ` Phil Muldoon
2007-05-15 21:12   ` Andrew Cagney

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=46489393.2000600@redhat.com \
    --to=pmuldoon@redhat.com \
    --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).