This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] "gdbserver ... BASENAME_EXE" no longer works
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Sergio Durigan Junior <sergiodj at redhat dot com>
- Cc: GDB Patches <gdb-patches at sourceware dot org>, palves at redhat dot com, Simon Marchi <simon dot marchi at ericsson dot com>
- Date: Wed, 21 Feb 2018 11:37:50 +0400
- Subject: Re: [RFC] "gdbserver ... BASENAME_EXE" no longer works
- Authentication-results: sourceware.org; auth=none
- References: <1482464361-4068-1-git-send-email-sergiodj@redhat.com> <1482464361-4068-6-git-send-email-sergiodj@redhat.com> <20180221035827.ae265ol4k5jthhp2@adacore.com> <87sh9u50nn.fsf@redhat.com>
Hi Sergio,
Thanks for your preliminary answer and the pointers to your own
set of patches. I considered doing it for gdbserver only, but
thought it was less code doing it there than in in gdbserver
directly (you have to handle the case both when the executable
is passed via the command-line and the case when it's passed
via the remote protocol).
But I'm happy with your approach, as it avoids some unnecessary
work in the case of GDB (the overhead is a call to lbasename,
which is guaranteed to always return a different string than
the origin exec_file).
I'll send my comments for your patches...
--
Joel