* Outline Proposal: add getMaps() to abstract Proc.java
@ 2007-05-14 17:36 Phil Muldoon
2007-05-14 18:01 ` Phil Muldoon
0 siblings, 1 reply; 3+ messages in thread
From: Phil Muldoon @ 2007-05-14 17:36 UTC (permalink / raw)
To: Frysk Hackers
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
............
............
}
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Outline Proposal: add getMaps() to abstract Proc.java
2007-05-14 17:36 Outline Proposal: add getMaps() to abstract Proc.java Phil Muldoon
@ 2007-05-14 18:01 ` Phil Muldoon
2007-05-15 21:12 ` Andrew Cagney
0 siblings, 1 reply; 3+ messages in thread
From: Phil Muldoon @ 2007-05-14 18:01 UTC (permalink / raw)
Cc: Frysk Hackers
Phil Muldoon wrote:
In addition, I just realized that we might as well give the name of the
map while "we are there", otherwise the user will just have to go to the
same spot to find it. So add a String name; to the data of the maps class.
>
>
> 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
> ............
> ............
> }
> }
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Outline Proposal: add getMaps() to abstract Proc.java
2007-05-14 18:01 ` Phil Muldoon
@ 2007-05-15 21:12 ` Andrew Cagney
0 siblings, 0 replies; 3+ messages in thread
From: Andrew Cagney @ 2007-05-15 21:12 UTC (permalink / raw)
To: Phil Muldoon; +Cc: Frysk Hackers
Phil,
Like the idea. While the purest might suggest that for every field
there should be a getter, I've found that having the fields "public
final" is more pragmatic.
Andrew
Phil Muldoon wrote:
> Phil Muldoon wrote:
>
> In addition, I just realized that we might as well give the name of
> the map while "we are there", otherwise the user will just have to go
> to the same spot to find it. So add a String name; to the data of the
> maps class.
>
>>
>>
>> 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
>> ............
>> ............
>> }
>> }
>>
>>
>>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-05-14 20:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-14 17:36 Outline Proposal: add getMaps() to abstract Proc.java Phil Muldoon
2007-05-14 18:01 ` Phil Muldoon
2007-05-15 21:12 ` Andrew Cagney
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).