gdb: implement "info proc environ"

Add a new "environ" subcommand to "info proc" to print the initial
environment variables of a given process.  The environment variables
are printed line-by-line and are indented by two spaces, so that they
can be distinguished from the rest of the output in "info proc all".

Note that the information printed by this new command is not
necessarily the same as `show environment`, which lists the
environment variables that will be given to the program next time it
is started under GDB.  The two information may differ in particular
when GDB attached to a running program that was started in an
environment different than GDB's.

Reviewed-By: Eli Zaretskii <eliz@gnu.org>
Approved-By: Andrew Burgess <aburgess@redhat.com>
6 files changed