From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5145 invoked by alias); 7 Dec 2011 16:29:27 -0000 Received: (qmail 5096 invoked by uid 22791); 7 Dec 2011 16:29:25 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 07 Dec 2011 16:29:12 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=EU1-MAIL.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1RYKMp-0007mA-Nz from pedro_alves@mentor.com ; Wed, 07 Dec 2011 08:29:11 -0800 Received: from scottsdale.localnet ([172.30.7.53]) by EU1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 7 Dec 2011 16:29:09 +0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [rfc] Options for "info mappings" etc. (Re: [PATCH] Implement new `info core mappings' command) Date: Wed, 07 Dec 2011 17:24:00 -0000 User-Agent: KMail/1.13.6 (Linux/2.6.38-13-generic; KDE/4.7.2; x86_64; ; ) Cc: "Ulrich Weigand" , jan.kratochvil@redhat.com, sergiodj@redhat.com References: <201112061646.pB6Gk4Hn028028@d06av02.portsmouth.uk.ibm.com> <201112071624.31947.pedro@codesourcery.com> In-Reply-To: <201112071624.31947.pedro@codesourcery.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201112071629.07922.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-12/txt/msg00232.txt.bz2 On Wednesday 07 December 2011 16:24:31, Pedro Alves wrote: > > For remote, we could do something along those lines (we cannot directly > > use "remote:" because this is only implemented for BFD access -- but > > we could use the underlying remote_hostio_pread etc. routines). > > Right, I did not mean to imply "remote:" literally. > I kind of see "remote:/proc/PID/maps" as a target path mounted > on the host, so "remote:/proc/PID/maps" is a really a host path. > The "/proc/PID/maps" path, what the code in question wants to get at, is > a target path. I was trying to say is that the gdbarch hook would always > open/read "/proc/PID/maps" from the target, instead of from the host. On > native targets, that ends up falling back to the host filesystem. For > remote targets, that would use the existing hostio mechanism, the same > as used by "remote:". This suggests e.g., a target method to > fully open/read/close a target path and return the file's contents (like > you say), or, alternatively, wrap the hostio mechanism in a > ui-file (through open/read/write/close/... target methods perhaps), and > use that. BTW, from this perspective, "remote:" would have been better named "target:" IMO. -- Pedro Alves