From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14627 invoked by alias); 18 Jul 2013 12:58:15 -0000 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 Received: (qmail 14617 invoked by uid 89); 18 Jul 2013 12:58:15 -0000 X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,RDNS_NONE,SPF_PASS autolearn=ham version=3.3.1 Received: from Unknown (HELO mail-oa0-f52.google.com) (209.85.219.52) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 18 Jul 2013 12:58:14 +0000 Received: by mail-oa0-f52.google.com with SMTP id g12so4021376oah.39 for ; Thu, 18 Jul 2013 05:58:07 -0700 (PDT) X-Received: by 10.182.120.132 with SMTP id lc4mr7459868obb.22.1374152287132; Thu, 18 Jul 2013 05:58:07 -0700 (PDT) MIME-Version: 1.0 Received: by 10.60.116.101 with HTTP; Thu, 18 Jul 2013 05:57:27 -0700 (PDT) In-Reply-To: <87r4f6gxfn.fsf@fleche.redhat.com> References: <51D2E749.9020604@codesourcery.com> <51D4030F.6070000@codesourcery.com> <51D42272.20209@codesourcery.com> <87r4f6gxfn.fsf@fleche.redhat.com> From: Hui Zhu Date: Thu, 18 Jul 2013 12:58:00 -0000 Message-ID: Subject: Re: [PATCH] Fix PR 15692 -dprintf-insert does not accept double quotes To: Tom Tromey Cc: Yao Qi , gdb-patches ml Content-Type: text/plain; charset=ISO-8859-1 X-SW-Source: 2013-07/txt/msg00446.txt.bz2 On Thu, Jul 11, 2013 at 1:02 AM, Tom Tromey wrote: >>>>>> "Hui" == Hui Zhu writes: > > Hui> + if { $args == "call" || $args == "fprintf" } { > Hui> + set foobarbazqux "\"foobarbazqux\"" > Hui> + } else { > Hui> + set foobarbazqux "\\\\\"foobarbazqux\\\\\"" > Hui> + } > > Why are different regexps needed for these cases? > I thought the output was supposed to be the same in all situations. With "call" or "fprintf". The dprintf is directly outputted by inferior. So the string is: "foobarbazqux" At foo entry But with others, the dprintf is outputted by GDB. So the string is: ~"\"foobarbazqux\" At foo entry\n" That is why I use different $foobarbazqux. Thanks, Hui > > Other than this issue the patch is ok. > > Tom