[PATCH 0/4] New "set cwd" command
Sergio Durigan Junior
sergiodj@redhat.com
Tue Sep 12 04:23:00 GMT 2017
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.
More information about the Gdb-patches
mailing list