From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 88925 invoked by alias); 7 Apr 2015 09:19:55 -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 88916 invoked by uid 89); 7 Apr 2015 09:19:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 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, 07 Apr 2015 09:19:53 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 2326C2D154E; Tue, 7 Apr 2015 09:19:52 +0000 (UTC) Received: from blade.nx (ovpn-116-118.ams2.redhat.com [10.36.116.118]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t379JpNM008355; Tue, 7 Apr 2015 05:19:51 -0400 Received: by blade.nx (Postfix, from userid 1000) id 9E73F26410B; Tue, 7 Apr 2015 10:19:50 +0100 (BST) Date: Tue, 07 Apr 2015 09:19:00 -0000 From: Gary Benson To: Doug Evans Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 6/7] Implement qXfer:exec-file:read in gdbserver Message-ID: <20150407091950.GC22271@blade.nx> References: <1427887341-31819-1-git-send-email-gbenson@redhat.com> <1427887341-31819-7-git-send-email-gbenson@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg00189.txt.bz2 Doug Evans wrote: > Gary Benson writes: > > diff --git a/gdb/gdbserver/target.h b/gdb/gdbserver/target.h > > index 126c861..dc7802d 100644 > > --- a/gdb/gdbserver/target.h > > +++ b/gdb/gdbserver/target.h > > @@ -394,6 +394,14 @@ struct target_ops > > > > /* Return true if target supports range stepping. */ > > int (*supports_range_stepping) (void); > > + > > + /* Return the pathname of the executable file that was run to > > + create the process PID. If the executable file cannot be > > + determined, NULL is returned. Otherwise, a pointer to a > > + character string containing the pathname is returned. This > > + string should be copied into a buffer by the client if the > > + string will not be immediately used, or if it must persist. */ > > + char *(*pid_to_exec_file) (int pid); > > }; > > > > extern struct target_ops *the_target; > > IWBN to have some clarity on what the pathname result can and cannot be. > > Perhaps nitpicky, but the less ambiguity the better. I think(!) the > intent is that the path name is the full path name, but I could be > wrong. > > Another issue is whether the path has been real-path'd. [all > symlinks resolved] I don't have a strong opinion on that, but I do > think we should at least require full paths to be returned here. I will use the "the full absolute name of the file" as Eli suggested for the documentation. I will also change the gdb/target.h version to match. It's not necessary for all symlinks to be resolved. I think the intention is for the function to return what the operating system says the executable's filename is, but of course non of these old parts of GDB are documented to that extent so I'm guessing. > const char * result? Not const for the same reason as the GDB side. > Also, I was going to say we need to pick a type for "pid" and > consistently use it, but that's a whole 'nother discussion, and > this patch set needn't be bogged down by it. Quite :) Thanks, Gary -- http://gbenson.net/