From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26534 invoked by alias); 5 Apr 2016 16:32:14 -0000 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 Received: (qmail 26453 invoked by uid 89); 5 Apr 2016 16:32:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=002, Hx-languages-length:1493, Suggest, metal X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 05 Apr 2016 16:32:08 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F3F66C00126D for ; Tue, 5 Apr 2016 16:32:06 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u35GW5Ir010148; Tue, 5 Apr 2016 12:32:06 -0400 Subject: Re: [patch] Suggest newer gdbserver if it has no qXfer:exec-file:read To: Jan Kratochvil References: <20160319201842.GA16540@host1.jankratochvil.net> <56F13963.9040204@redhat.com> <20160322131604.GA24312@host1.jankratochvil.net> <56F14F1E.5010606@redhat.com> <20160323211547.GA17400@host1.jankratochvil.net> Cc: gdb-patches@sourceware.org, Gary Benson From: Pedro Alves Message-ID: <5703E885.3090309@redhat.com> Date: Tue, 05 Apr 2016 16:32:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 MIME-Version: 1.0 In-Reply-To: <20160323211547.GA17400@host1.jankratochvil.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2016-04/txt/msg00088.txt.bz2 Closing the loop on this one: On 03/23/2016 09:15 PM, Jan Kratochvil wrote: > On Tue, 22 Mar 2016 14:56:46 +0100, Pedro Alves wrote: >> - Random stubs may not know at all the executable that is running -- the >> remote end is often just bare metal raw memory, no concept of elf, etc. >> So it's not just a matter of implementing a packet - more tooling might >> and I suspect will, be necessary. OTOH, there are OSs where it's just not >> possible, by design, to retrieve the name of the executable a process >> is running, like OpenBSD (I find it odd not to allow a ptracer access >> to that, but, alas). > > IIUC for such an embedded target without any filesystem qXfer:exec-file:read > would need to generate a bogus filename which would be then > recognized/accepted by vFile:open. > > Sending packet: $qXfer:exec-file:read:67:0,fff#f7...Packet received: l/root/redhat/threadit > Reading /root/redhat/threadit from remote target... > Sending packet: $vFile:open:2f726f6f742f7265646861742f7468726561646974,0,0#7e...Packet received: F5 > Sending packet: $vFile:pread:5,3fff,0#98...Packet received: F27f8;\177ELF\002\001\001\000 > > Just stating that, nothing interesting. That'd assume that there's a structured elf on the target, while on bare metal, you don't have that; no sections, no segments, etc. Nothing other than unstructured raw memory, much like what the "dump memory" would give you. Thanks, Pedro Alves