From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14092 invoked by alias); 6 Mar 2011 23:53:34 -0000 Received: (qmail 14083 invoked by uid 22791); 6 Mar 2011 23:53:32 -0000 X-SWARE-Spam-Status: No, hits=-0.6 required=5.0 tests=AWL,BAYES_50,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from caibbdcaaaaf.dreamhost.com (HELO homiemail-a51.g.dreamhost.com) (208.113.200.5) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 06 Mar 2011 23:52:54 +0000 Received: from homiemail-a51.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a51.g.dreamhost.com (Postfix) with ESMTP id 3B1742E8062 for ; Sun, 6 Mar 2011 15:52:53 -0800 (PST) Received: from redwood.eagercon.com (c-98-210-161-13.hsd1.ca.comcast.net [98.210.161.13]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: eager@eagerm.com) by homiemail-a51.g.dreamhost.com (Postfix) with ESMTPSA id 20A312E8058 for ; Sun, 6 Mar 2011 15:52:53 -0800 (PST) Message-ID: <4D741E53.2090104@eagerm.com> Date: Sun, 06 Mar 2011 23:53:00 -0000 From: Michael Eager User-Agent: Thunderbird 2.0.0.23 (X11/20090825) MIME-Version: 1.0 To: gdb@sourceware.org Subject: Translate memory addresses Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-03/txt/msg00048.txt.bz2 Hi -- I'm working with a target which needs to translate a virtual memory addresses to a physical address before accessing the target's memory or the core file. I added a new field to target_ops to specify the translation function and added the following to target_xfer_partial(): /* Translate address if needed. */ if (ops->to_translate_address) offset = ops->to_translate_address (ops, offset); So far, so good. I can add this to the target definition for the live targets. But this doesn't work for core files. Core_ops is defined in corelow.c, and there doesn't appear to be an obvious hook for the target code to modify it to add the translation routine. Any suggestions on the best way to add a hook or how to specify a target routine to do address translations for core files? -- Michael Eager eager@eagercon.com 1960 Park Blvd., Palo Alto, CA 94306 650-325-8077