From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5678 invoked by alias); 18 Aug 2011 02:54:03 -0000 Received: (qmail 5667 invoked by uid 22791); 18 Aug 2011 02:54:02 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-fx0-f41.google.com (HELO mail-fx0-f41.google.com) (209.85.161.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 18 Aug 2011 02:53:48 +0000 Received: by fxg9 with SMTP id 9so1284964fxg.0 for ; Wed, 17 Aug 2011 19:53:47 -0700 (PDT) Received: by 10.223.10.15 with SMTP id n15mr307452fan.95.1313636027118; Wed, 17 Aug 2011 19:53:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.120.207 with HTTP; Wed, 17 Aug 2011 19:53:07 -0700 (PDT) In-Reply-To: References: From: Hui Zhu Date: Thu, 18 Aug 2011 02:54:00 -0000 Message-ID: Subject: Re: [PATCH] printcmd.c (ui_printf): make internalvar string can be printf and eval when inferior cannot alloc memory To: Tom Tromey Cc: gdb-patches ml Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 2011-08/txt/msg00352.txt.bz2 On Wed, Aug 17, 2011 at 22:38, Tom Tromey wrote: >>>>>> ">" =3D=3D Hui Zhu writes: > >>> I don't know howto input a =A0wide-string to GDB command line. >>> Could you help me with that and let me write a separate patch special >>> for wide-string case? > > I think you can't make one directly without an inferior, but you can > make an array of integers using the {...} syntax. =A0Then, I think, you > can print this using "%ls". > >>> + =A0 =A0 =A0 =A0 =A0 =A0if ((VALUE_LVAL (val_args[i]) =3D=3D lval_inte= rnalvar >>> + =A0 =A0 =A0 =A0 =A0 =A0 || VALUE_LVAL (val_args[i]) =3D=3D not_lval) > > This test seems odd to me. =A0Why does the lvalue-ness of the value > matter? I don't understand your means, could you do some explain? Thanks, Hui > > Tom >