From: Phil Muldoon <pmuldoon@redhat.com>
To: frysk@sourceware.org
Subject: (CorefileByteBuffer) Re: frysk-core/frysk/proc/corefile ChangeLog Coref ...
Date: Mon, 16 Apr 2007 21:37:00 -0000 [thread overview]
Message-ID: <4623EC95.2070806@redhat.com> (raw)
In-Reply-To: <20070414015627.6316.qmail@sourceware.org>
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
>
>
parent reply other threads:[~2007-04-16 21:37 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20070414015627.6316.qmail@sourceware.org>]
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=4623EC95.2070806@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).