This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH/RFC] Implement the ability to set the current working directory in GDBserver


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]