From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1569 invoked by alias); 29 Sep 2017 18:48:41 -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 1510 invoked by uid 89); 29 Sep 2017 18:48:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-16.9 required=5.0 tests=BAYES_00,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= 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 ESMTP; Fri, 29 Sep 2017 18:48:33 +0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 24CD981DF0; Fri, 29 Sep 2017 18:48:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 24CD981DF0 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=sergiodj@redhat.com Received: from localhost (unused-10-15-17-193.yyz.redhat.com [10.15.17.193]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DBF1117C22; Fri, 29 Sep 2017 18:48:23 +0000 (UTC) From: Sergio Durigan Junior To: Pedro Alves Cc: GDB Patches , Eli Zaretskii Subject: Re: [PATCH v4 3/3] Extend "set cwd" to work on gdbserver References: <20170912042325.14927-1-sergiodj@redhat.com> <20170928041046.5468-1-sergiodj@redhat.com> <20170928041046.5468-4-sergiodj@redhat.com> <199971a4-0bfe-c2a2-ef81-5836a3ab22dc@redhat.com> Date: Fri, 29 Sep 2017 18:48:00 -0000 In-Reply-To: <199971a4-0bfe-c2a2-ef81-5836a3ab22dc@redhat.com> (Pedro Alves's message of "Fri, 29 Sep 2017 16:21:14 +0100") Message-ID: <87poa9e3yg.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2017-09/txt/msg00919.txt.bz2 On Friday, September 29 2017, Pedro Alves wrote: > On 09/28/2017 05:10 AM, Sergio Durigan Junior wrote: >> --- a/gdb/NEWS >> +++ b/gdb/NEWS >> @@ -26,6 +26,14 @@ >> >> * New features in the GDB remote stub, GDBserver >> >> + ** GDBserver is now able to set the inferior's current working >> + directory. > > That's confusing IMO, because it sounds like you're saying > you can change the inferior's current working directory at > any time, even on inferiors that are already running... > > I'd go for: > > ** GDBserver is now able to start inferior processes with a > specified initial working directory. OK, changed. >> + >> + The user can set the desired working directory to be used by the >> + remote inferior on GDB, using the new "set cwd" command, which >> + will instruct GDB to tell GDBserver about this directory change >> + the next time an inferior is run. > > And instead of the above, say: > > The user can set the desired working directory to be used from GDB > using the new "set cwd" command. > > Note "on" -> "from". I think that conveys it better. > > The "which will instruct" part is distracting and unnecessary > implementation detail, IMO. Done. > >> +@item QSetWorkingDir:@r{[}@var{directory}@r{]} >> +@anchor{QSetWorkingDir packet} >> +@cindex set working directory, remote request >> +@cindex @samp{QSetWorkingDir} packet >> +This packet is used to inform the remote server of the intended >> +current working directory for programs that are going to be executed. >> + >> +The packet is composed by @var{directory}, an hex encoded >> +representation of the directory that the remote inferior will use as >> +its current working directory. If @var{directory} is an empty string, >> +the remote server should reset the inferior's current working >> +directory to its original, empty value. >> + >> +This packet is always transmitted when the inferior is run. If the >> +user has not explcitly specified a directory with the @kbd{set cwd} > > typo: explicitly Fixed. >> +command, then an empty packet will be sent to the remote server, which > > Not an empty packet, and empty directory. Really-empty packets are > special in the remote protocol. > >> +will have no effect. > > WDYM will have no effect, when just above you've explained that empty > means reset ? I think you should just remove this paragraph starting > with "This packet is always transmitted". That's implementation > detail. GDB could for example not resend the packet if the value > didn't change between runs, no? What I tried to say is that if the user doesn't make use of the "set cwd" command in a GDB session, the packet will be transmitted anyway. I think I should have been clearer here. I will remove the paragraph as requested. >> Otherwise, the specified inferior's working >> +directory will be transmitted (@pxref{Working Directory, ,Your >> +Program's Working Directory}). > > This too should be tweaked accordingly. Since the whole paragraph has been removed, then this comment doesn't apply anymore, I assume. Thanks, -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/