This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH/RFC] Implement the ability to set the current working directory in GDBserver
- From: Pedro Alves <palves at redhat dot com>
- To: Sergio Durigan Junior <sergiodj at redhat dot com>, GDB Patches <gdb-patches at sourceware dot org>
- Cc: Eli Zaretskii <eliz at gnu dot org>
- Date: Fri, 1 Sep 2017 00:01:51 +0200
- Subject: Re: [PATCH/RFC] Implement the ability to set the current working directory in GDBserver
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=palves at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 2AB7361474
- References: <20170830043811.776-1-sergiodj@redhat.com>
On 08/30/2017 06:38 AM, Sergio Durigan Junior wrote:
> I didn't want to implement a gdbserver-specific command (e.g., "set
> remote directory"), which means that my approach has some drawbacks.
> For example, if you want gdbserver to cd to "/abc", but "/abc" doesn't
> exist in the host, then you still won't be able to do this, because
> GDB obviously won't allow you to "cd" into a non-existing dir. So you
> will have to have the same directory structure in both host and target
> if you want to do that.
I'm not sure this is the right approach. I'd like to have a
better understanding of what are the use cases "cd" is used for.
Beyond affecting the inferior's cwd when it is started, what
else is/can "cd" used for? Or IOW, what else does GDB's
current working directory affect?
Thanks,
Pedro Alves