[PATCH v3 4/5] Implement "set cwd" command on GDB

Eli Zaretskii eliz@gnu.org
Sat Sep 23 05:55:00 GMT 2017


> Cc: gdb-patches@sourceware.org
> From: Pedro Alves <palves@redhat.com>
> Date: Fri, 22 Sep 2017 21:37:49 +0100
> 
> That would mean keep both non-expanded, and expanded paths around,
> which is what I was suggesting with:
> 
>  (gdb) set cwd ~foo/bar
>  (gdb) show cwd
>  The current directory is ~foo/bar (/home/foo/bar)
>                                     ^^^^^^^^^^^^^

Keeping both is also OK, although I don't see how it would solve the
problems Pedro mentioned earlier, and also now:

> But that's not what I understood Eli suggesting.  I understood
> it as gdb expanding whatever's the value set on connection.
> But I don't see how that could work, because before gdb connects
> to a remote target explicitly, it's as if gdb was connected to
> the native target (that's how "run" works without typing
> "target native" explicitly, though you can type that), so
> by the time you connect to the remote target, it's already
> too late, gdb has already expanded on the host, and there's
> nothing left to expand.

I don't understand this description, which is not surprising, since my
knowledge of the machinery involved in this is very superficial.



More information about the Gdb-patches mailing list