From: Philippe Waroquiers <philippe.waroquiers@skynet.be>
To: Sergio Durigan Junior <sergiodj@redhat.com>
Cc: Eli Zaretskii <eliz@gnu.org>,
gdb-patches@sourceware.org, palves@redhat.com
Subject: Re: [PATCH/RFC] Implement the ability to set the current working directory in GDBserver
Date: Fri, 01 Sep 2017 12:32:00 -0000 [thread overview]
Message-ID: <1504269215.1537.123.camel@skynet.be> (raw)
In-Reply-To: <8737875sbb.fsf@redhat.com>
On Thu, 2017-08-31 at 17:40 -0400, Sergio Durigan Junior wrote:
> >> + This is done by using the "cd" command in GDB, which instructs it
> >> + to tell GDBserver about this directory change the next time an
> >> + inferior is run. If you want to make GDBserver enter the
> >> + directory your GDB is currently in, you can do a "cd ." in GDB.
> >
> > Couldn't GDB do this "cd ." step under the hood, without bothering
> > users with that?
>
> The problem is that we don't really know if the user will want to change
> gdbserver's current directory or not. If we always assume so, this will
> lead to many breakages as the directory tree will not be always the same
> on host and target. That's why 'user_set_cwd' is initially false.
> However, there's the case when the user may want to change gdbserver's
> directory to the same directory GDB is in. That's why I included this
> explanation in the docs.
>
> The more I think about this, the less I'm satisfied with the current
> solution. But I can't really think of a better alternative that doesn't
> involve having a separate command to manipulate gdbserver's cwd.
Why not have options such as:
cd -s xxxx
only change the gdb server directory
cd -g xxxx
only change the gdb directory
cd xxxx
change both gdb and gdb server directory
(synonym of cd -s -g xxxx)
Philippe
next prev parent reply other threads:[~2017-09-01 12:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-30 4:38 Sergio Durigan Junior
2017-08-30 14:29 ` Eli Zaretskii
2017-08-31 21:41 ` Sergio Durigan Junior
2017-09-01 12:32 ` Philippe Waroquiers [this message]
2017-09-01 18:40 ` Sergio Durigan Junior
2017-08-31 22:01 ` Pedro Alves
2017-08-31 22:42 ` John Baldwin
2017-09-05 17:45 ` Sergio Durigan Junior
2017-09-06 14:20 ` Pedro Alves
2017-09-06 18:18 ` Sergio Durigan Junior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1504269215.1537.123.camel@skynet.be \
--to=philippe.waroquiers@skynet.be \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
--cc=sergiodj@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox