From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 122372 invoked by alias); 29 Sep 2017 22:58:57 -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 121488 invoked by uid 89); 29 Sep 2017 22:58:57 -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,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=inclusion, Hx-languages-length:2213 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 22:58:56 +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 DF4B97E432; Fri, 29 Sep 2017 22:58:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com DF4B97E432 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=sergiodj@redhat.com Received: from psique.yyz.redhat.com (unused-10-15-17-193.yyz.redhat.com [10.15.17.193]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8B4146017C; Fri, 29 Sep 2017 22:58:54 +0000 (UTC) From: Sergio Durigan Junior To: GDB Patches Cc: Pedro Alves , Eli Zaretskii Subject: [PATCH v5 0/3] New "set cwd" command Date: Fri, 29 Sep 2017 22:58:00 -0000 Message-Id: <20170929225852.21872-1-sergiodj@redhat.com> In-Reply-To: <20170912042325.14927-1-sergiodj@redhat.com> References: <20170912042325.14927-1-sergiodj@redhat.com> X-IsSubscribed: yes X-SW-Source: 2017-09/txt/msg00922.txt.bz2 v1: https://sourceware.org/ml/gdb-patches/2017-09/msg00321.html v2: https://sourceware.org/ml/gdb-patches/2017-09/msg00458.html v3: https://sourceware.org/ml/gdb-patches/2017-09/msg00658.html v4: https://sourceware.org/ml/gdb-patches/2017-09/msg00846.html Changes from v4: * Patch #1: - s/HAVE_GDB_TILDE_EXPAND_H/GDB_TILDE_EXPAND_H/ on gdb/common/gdb_tilde_expand.h. * Patch #2: - Include more rationale/details about the "set/show cwd" commands in the commit log. - Improve set cwd code flow on fork_inferior. - Remove inclusion from gdb.base/set-cwd.c - Don't mention "gdbserver" on "untested" message at gdb/set-cwd.exp. Instead, say "remote server". - s/proc + with_test_prefix/proc_with_prefix/ - Fix typos. - Rewrite certain tests to take timeout scenarios into account. - Uniquefy "runto_main" messages. - Rewrite parts of Windows code in order to (a) take into account when "inferior_cwd" is NULL, and (b) create a proper buffer to be filled by "cygwin_conv_path". * Patch #3: - Rewrite gdb/NEWS entry in order to remove the confusion about when gdbserver is able to change the inferior's cwd. - Fix typos. - Rewrite/remove paragraph explaining when the "QSetWorkingDir" packet is sent by GDB. This patch series is a followup of the discussion that happened at: https://sourceware.org/ml/gdb-patches/2017-09/msg00160.html It implements a new GDB command, "set cwd", which is used to set the current working directory of the inferior that will be started. This command works for both native and remote debugging scenarios. The idea here is that "set cwd" will become the de facto way of setting the inferior's cwd. Currently, the user can use "cd" for that, but there are side effects: with "cd", GDB also switches to another directory, and that can impact the loading of scripts and other files. With "set cwd", we separate the logic into a new command. To maintain backward compatibility, if the user issues a "cd" command but doesn't use "set cwd", then the inferior's cwd will still be changed according to what the user specified. However, "set cwd" has precedence over "cd", so it can always be used to override it.