[PATCH 0/6] Implement the ability to start inferiors with a shell on gdbserver

Sergio Durigan Junior sergiodj@redhat.com
Fri Dec 23 03:39:00 GMT 2016

Hi there,

This patch series took a long time to complete due to many and varied
reasons, but finally here it is.

It implements the "startup-with-shell" feature on gdbserver.  This
means that it will be possible to start inferiors using the shell
(instead of calling execv*), which brings many advantages.

First of all, it will be possible to use I/O redirection, variable
substitution and globbing expansion on gdbserver just like we do today
on GDB.  This is great because, among other things, it brings
gdbserver on a pair with GDB when considering the Feature Parity

Secondly, a great deal of code had to be shared between GDB and
gdbserver, especially the fork_inferior function, which means that now
both programs are using virtually the same code to start inferiors.
I've also had to touch on other areas, like terminal.h, inflow.c and
gdbthread.h, and even though only the APIs were shared (i.e.,
gdbserver's version of a gdbthread.h function may differ from GDB's
version), this is also beneficial in the long run when we start to
unify the code more deeply.  But I'm "raining in the wet" here; all
this has been explained in better terms before.

I did my best to split the patches, but unfortunately the
fork_inferior patch is big and I couldn't see a better way to do that.
But it shouldn't be very hard to review them, because most of it is
just "code movement".

Thank you, and happy holidays!

More information about the Gdb-patches mailing list