From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5841 invoked by alias); 24 Apr 2010 00:59:30 -0000 Received: (qmail 5826 invoked by uid 22791); 24 Apr 2010 00:59:27 -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) (74.125.121.35) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 24 Apr 2010 00:59:23 +0000 Received: from wpaz13.hot.corp.google.com (wpaz13.hot.corp.google.com [172.24.198.77]) by smtp-out.google.com with ESMTP id o3O0xJxI013724 for ; Sat, 24 Apr 2010 02:59:20 +0200 Received: from pxi1 (pxi1.prod.google.com [10.243.27.1]) by wpaz13.hot.corp.google.com with ESMTP id o3O0xI9i028581 for ; Fri, 23 Apr 2010 17:59:18 -0700 Received: by pxi1 with SMTP id 1so1126385pxi.36 for ; Fri, 23 Apr 2010 17:59:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.141.107.10 with SMTP id j10mr939771rvm.282.1272070757740; Fri, 23 Apr 2010 17:59:17 -0700 (PDT) Received: by 10.141.91.13 with HTTP; Fri, 23 Apr 2010 17:59:17 -0700 (PDT) In-Reply-To: <-6536644988877721859@unknownmsgid> References: <20100420072103.179AF8439A@ruffy.mtv.corp.google.com> <-6536644988877721859@unknownmsgid> Date: Sat, 24 Apr 2010 00:59:00 -0000 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/msg00827.txt.bz2 Thanks. I checked this in with the added double-quotes. 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); > >