public inbox for frysk@sourceware.org
 help / color / mirror / Atom feed
* (CorefileByteBuffer) Re: frysk-core/frysk/proc/corefile ChangeLog  Coref ...
       [not found] <20070414015627.6316.qmail@sourceware.org>
@ 2007-04-16 21:37 ` Phil Muldoon
  0 siblings, 0 replies; only message in thread
From: Phil Muldoon @ 2007-04-16 21:37 UTC (permalink / raw)
  To: frysk

This patch creates a CorefileByteBuffer class, which extends Bytebuffer 
(so all the normal/useful get() functions in the ByteBuffer class are 
replicated here).

This class allows you to access a Corefile's dumped memory section in 
much the same way you access "live" task memory. Example:

CorefileByteBuffer coreBuffer = new CorefileByteBuffer(new 
File(core.1234));

// Set the corefile carat to memory address 0x00170000L
coreBuffer.position(0x00170000L);
System.out.println("Byte at 0x00170000L " , coreBuffer.get());

The position of the byte in the buffer is actually the memory offset 
when the process was "alive", the CorefileByteBuffer will take care of 
translating that to the correct corefile offset for the right map.

The second part of this is forthcoming. This allows you to access elided 
parts of the dumped process memory, by mapping in those sections at 
access time.

This CorefileByteBuffer has already been wired into LinuxCoreFileTask 
and Proc, which will allow transparent memory access/functions to 
corefiles through the task.getMemory() function.

Regards

Phil

> CVSROOT:	/cvs/frysk
> Module name:	frysk-core
> Changes by:	pmuldoon@sourceware.org	2007-04-14 02:56:27
>
> Added files:
> 	frysk/proc/corefile: ChangeLog CorefileByteBuffer.java 
> 	                     TestCorefileByteBuffer.java 
>
> Log message:
> 	2007-04-13  Phil Muldoon  <pmuldoon@redhat.com>
> 	
> 	* corefile/: Created.
> 	* TestCorefileByteBuffer.java: New.
> 	* CorefileByteBuffer.java: New.
>
> Patches:
> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/proc/corefile/ChangeLog.diff?cvsroot=frysk&r1=NONE&r2=1.1
> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/proc/corefile/CorefileByteBuffer.java.diff?cvsroot=frysk&r1=NONE&r2=1.1
> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/proc/corefile/TestCorefileByteBuffer.java.diff?cvsroot=frysk&r1=NONE&r2=1.1
>
>   

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-04-16 21:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20070414015627.6316.qmail@sourceware.org>
2007-04-16 21:37 ` (CorefileByteBuffer) Re: frysk-core/frysk/proc/corefile ChangeLog Coref Phil Muldoon

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).