From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8778 invoked by alias); 30 Aug 2017 14:29:15 -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 7224 invoked by uid 89); 30 Aug 2017 14:29:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.1 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=hood, Eli, U*palves, sk:palves X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (208.118.235.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 30 Aug 2017 14:29:13 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dn3zT-0001M3-3O for gdb-patches@sourceware.org; Wed, 30 Aug 2017 10:29:11 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38385) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dn3zN-0001Ka-2B; Wed, 30 Aug 2017 10:29:05 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2073 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dn3zM-0003ch-6U; Wed, 30 Aug 2017 10:29:04 -0400 Date: Wed, 30 Aug 2017 14:29:00 -0000 Message-Id: <83bmmx2kpq.fsf@gnu.org> From: Eli Zaretskii To: Sergio Durigan Junior CC: gdb-patches@sourceware.org, palves@redhat.com In-reply-to: <20170830043811.776-1-sergiodj@redhat.com> (message from Sergio Durigan Junior on Wed, 30 Aug 2017 00:38:11 -0400) Subject: Re: [PATCH/RFC] Implement the ability to set the current working directory in GDBserver Reply-to: Eli Zaretskii References: <20170830043811.776-1-sergiodj@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-IsSubscribed: yes X-SW-Source: 2017-08/txt/msg00529.txt.bz2 > From: Sergio Durigan Junior > Cc: Pedro Alves , > Eli Zaretskii , > Sergio Durigan Junior > Date: Wed, 30 Aug 2017 00:38:11 -0400 > > --- a/gdb/NEWS > +++ b/gdb/NEWS > @@ -17,11 +17,22 @@ > "target remote", you can disable the startup with shell by using the > new "--no-startup-with-shell" GDBserver command line option. > > + ** On Unix systems, GDBserver is now able to enter a directory > + before starting an inferior. Can you tell why this is limited to Unix systems? The chdir function is available much wider than just on Unix. > + This is done by using the "cd" command in GDB, which instructs it > + to tell GDBserver about this directory change the next time an > + inferior is run. If you want to make GDBserver enter the > + directory your GDB is currently in, you can do a "cd ." in GDB. Couldn't GDB do this "cd ." step under the hood, without bothering users with that? > +Whenever you specify a new working directory in @value{GDBN}, and if > +you are performing a remote debug (@pxref{Remote Debugging}), this > +change will be reflected in @command{gdbserver} the next time you run > +the program being debugged (@pxref{QSetWorkingDir packet}). Sometimes > +you may want to make @command{gdbserver} enter a directory in which > +@value{GDBN} is already in; in this case, you can perform a @code{cd > +.} which will not change the current directory in @value{GDBN} but > +will force @command{gdbserver} to enter it. The "@code{cd .}" part should be @kbd{cd .}, and I'd take it in @w{..} for a good measure, to prevent it from being broken between 2 lines. > +This packet is only transmitted when the user issues a @code{cd} > +command in @value{GDBN} (@xref{Working Directory, ,Your Program's > +Working Directory}). The @xref should be @pxref, as the former is not appropriate in parentheses. The documentation parts are okay with these nits fixed. Thanks.