This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [patch] gdbserver: print inferior argv --debug
- From: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- To: "'Doug Evans'" <dje at google dot com>, <gdb-patches at sourceware dot org>
- Date: Tue, 20 Apr 2010 09:53:41 +0200
- Subject: RE: [patch] gdbserver: print inferior argv --debug
- References: <20100420072103.179AF8439A@ruffy.mtv.corp.google.com>
Not an objection, rather a suggestion:
what about wrapping these args into double quotes to
see embedded spaces like this:
> + fprintf (stderr, "new_argv[%d] = \"%s\"\n", i, new_argv[i]);
Pierre Muller
> -----Message d'origine-----
> De?: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Doug Evans
> Envoyé?: Tuesday, April 20, 2010 9:21 AM
> À?: gdb-patches@sourceware.org
> Objet?: [patch] gdbserver: print inferior argv --debug
>
> Hi.
>
> I found this helpful debugging gdbserver --wrapper.
>
> I will check it in in a few days if there are no objections.
>
> 2010-04-20 Doug Evans <dje@google.com>
>
> * server.c (start_inferior): Print inferior argv if --debug.
>
> Index: server.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/gdbserver/server.c,v
> retrieving revision 1.116
> diff -u -p -r1.116 server.c
> --- server.c 16 Apr 2010 07:49:36 -0000 1.116
> +++ server.c 20 Apr 2010 07:14:54 -0000
> @@ -241,6 +241,14 @@ start_inferior (char **argv)
> new_argv[count] = NULL;
> }
>
> + if (debug_threads)
> + {
> + int i;
> + for (i = 0; new_argv[i]; ++i)
> + fprintf (stderr, "new_argv[%d] = %s\n", i, new_argv[i]);
> + fflush (stderr);
> + }
> +
> #ifdef SIGTTOU
> signal (SIGTTOU, SIG_DFL);
> signal (SIGTTIN, SIG_DFL);