From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10044 invoked by alias); 16 Apr 2007 21:37:33 -0000 Received: (qmail 10030 invoked by uid 22791); 16 Apr 2007 21:37:32 -0000 X-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_05,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 16 Apr 2007 22:37:29 +0100 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l3GLbRGR031717 for ; Mon, 16 Apr 2007 17:37:27 -0400 Received: from pobox.hsv.redhat.com (pobox.hsv.redhat.com [172.16.16.12]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l3GLbRnd027547 for ; Mon, 16 Apr 2007 17:37:27 -0400 Received: from [10.11.14.61] (vpn-14-61.rdu.redhat.com [10.11.14.61]) by pobox.hsv.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id l3GLbQcF032234 for ; Mon, 16 Apr 2007 17:37:26 -0400 Message-ID: <4623EC95.2070806@redhat.com> Date: Mon, 16 Apr 2007 21:37:00 -0000 From: Phil Muldoon User-Agent: Thunderbird 1.5.0.10 (X11/20070302) MIME-Version: 1.0 To: frysk@sourceware.org Subject: (CorefileByteBuffer) Re: frysk-core/frysk/proc/corefile ChangeLog Coref ... References: <20070414015627.6316.qmail@sourceware.org> In-Reply-To: <20070414015627.6316.qmail@sourceware.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact frysk-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: frysk-owner@sourceware.org X-SW-Source: 2007-q2/txt/msg00060.txt.bz2 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 > > * 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 > >