This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 0/4] New "set cwd" command
- From: Sergio Durigan Junior <sergiodj at redhat dot com>
- To: GDB Patches <gdb-patches at sourceware dot org>
- Cc: Pedro Alves <palves at redhat dot com>
- Date: Tue, 12 Sep 2017 00:23:21 -0400
- Subject: [PATCH 0/4] New "set cwd" command
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=sergiodj at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com C03D28553E
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
is a GDB-only command for now; its gdbserver counterpart will come
later.
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.
This has been regtested on BuildBot, and the only failures I'm seeing
are related to a (very strange) stack overflow on guile, which just
happens on certain builders. I don't think this series has anything
to do about it, but if I find something related later I'll let you
know.