From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8437 invoked by alias); 20 Apr 2010 07:55:32 -0000 Received: (qmail 8419 invoked by uid 22791); 20 Apr 2010 07:55:31 -0000 X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SARE_MSGID_LONG45,SPF_HELO_PASS,TW_RG,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 20 Apr 2010 07:55:22 +0000 Received: from kpbe13.cbf.corp.google.com (kpbe13.cbf.corp.google.com [172.25.105.77]) by smtp-out.google.com with ESMTP id o3K7tHPk028676 for ; Tue, 20 Apr 2010 00:55:17 -0700 Received: from pwj7 (pwj7.prod.google.com [10.241.219.71]) by kpbe13.cbf.corp.google.com with ESMTP id o3K7tGKO028940 for ; Tue, 20 Apr 2010 02:55:16 -0500 Received: by pwj7 with SMTP id 7so3562034pwj.16 for ; Tue, 20 Apr 2010 00:55:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.247.17 with HTTP; Tue, 20 Apr 2010 00:55:15 -0700 (PDT) In-Reply-To: <-6536644988877721859@unknownmsgid> References: <20100420072103.179AF8439A@ruffy.mtv.corp.google.com> <-6536644988877721859@unknownmsgid> Date: Tue, 20 Apr 2010 07:55:00 -0000 Received: by 10.141.107.11 with SMTP id j11mr765891rvm.199.1271750115929; Tue, 20 Apr 2010 00:55:15 -0700 (PDT) Message-ID: Subject: Re: [patch] gdbserver: print inferior argv --debug From: Doug Evans To: Pierre Muller Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-04/txt/msg00604.txt.bz2 "works for me" On Tue, Apr 20, 2010 at 12:53 AM, Pierre Muller wrote: > Not an objection, rather a suggestion: > what about wrapping these args into double quotes to > see embedded spaces like this: >> + =A0 =A0 fprintf (stderr, "new_argv[%d] =3D \"%s\"\n", i, new_argv[i]); > > Pierre Muller > >> -----Message d'origine----- >> De=A0: gdb-patches-owner@sourceware.org [mailto:gdb-patches- >> owner@sourceware.org] De la part de Doug Evans >> Envoy=E9=A0: Tuesday, April 20, 2010 9:21 AM >> =C0=A0: gdb-patches@sourceware.org >> Objet=A0: [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 =A0Doug Evans =A0 >> >> =A0 =A0 =A0 * server.c (start_inferior): Print inferior argv if --debug. >> >> Index: server.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> RCS file: /cvs/src/src/gdb/gdbserver/server.c,v >> retrieving revision 1.116 >> diff -u -p -r1.116 server.c >> --- server.c =A016 Apr 2010 07:49:36 -0000 =A0 =A0 =A01.116 >> +++ server.c =A020 Apr 2010 07:14:54 -0000 >> @@ -241,6 +241,14 @@ start_inferior (char **argv) >> =A0 =A0 =A0 =A0new_argv[count] =3D NULL; >> =A0 =A0 =A0} >> >> + =A0if (debug_threads) >> + =A0 =A0{ >> + =A0 =A0 =A0int i; >> + =A0 =A0 =A0for (i =3D 0; new_argv[i]; ++i) >> + =A0 =A0 fprintf (stderr, "new_argv[%d] =3D %s\n", i, new_argv[i]); >> + =A0 =A0 =A0fflush (stderr); >> + =A0 =A0} >> + >> =A0#ifdef SIGTTOU >> =A0 =A0signal (SIGTTOU, SIG_DFL); >> =A0 =A0signal (SIGTTIN, SIG_DFL); > >