From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30361 invoked by alias); 26 Apr 2007 21:17:26 -0000 Received: (qmail 30354 invoked by uid 22791); 26 Apr 2007 21:17:26 -0000 X-Spam-Status: No, hits=-1.6 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; Thu, 26 Apr 2007 22:17:24 +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 l3QLHMsM008861 for ; Thu, 26 Apr 2007 17:17:22 -0400 Received: from pobox.toronto.redhat.com (pobox.toronto.redhat.com [172.16.14.4]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l3QLHGF5007987 for ; Thu, 26 Apr 2007 17:17:16 -0400 Received: from [172.16.14.160] (tow.toronto.redhat.com [172.16.14.160]) by pobox.toronto.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id l3QLHGBE010018 for ; Thu, 26 Apr 2007 17:17:16 -0400 Message-ID: <463116DC.7000903@redhat.com> Date: Fri, 27 Apr 2007 14:35:00 -0000 From: Nurdin Premji User-Agent: Thunderbird 1.5.0.10 (X11/20070302) MIME-Version: 1.0 To: frysk Subject: frysk/rt/StackAccessors.java#getElfImage() suggestions? 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/msg00105.txt.bz2 The method getElfImage() inside of frysk/rt/StackAccessors.java currently depends on a running process. It is used by libunwind to map an elfImage (or vdso segment) into local memory. It works by finding the elf image file name and mmapping it into memory, also keeping track of the offset into the file that was mapped, and the lowAddress of that segment (as displayed in proc/$$/maps). The question is how to refactor this to account for core processes. One way is by using a Proc.getElfImageInfo method that could return the name, lowAddress, and offset fields to the getElfImage and it would just map that file. The problem comes with the vdso section, mapping this section would be different between core and running processes. There is a method: lib.unwind.Unwind.createElfImageFromVDSO (might be better to call it ...FromRunningProcessVDSO) which will create an elfImage from a running processes vdso so perhaps a similar method for core process VDSO could be created. Any suggestions?