From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 41865 invoked by alias); 7 Jun 2016 09:32:51 -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 41854 invoked by uid 89); 7 Jun 2016 09:32:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-pa0-f41.google.com Received: from mail-pa0-f41.google.com (HELO mail-pa0-f41.google.com) (209.85.220.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 07 Jun 2016 09:32:40 +0000 Received: by mail-pa0-f41.google.com with SMTP id b5so15892828pas.3 for ; Tue, 07 Jun 2016 02:32:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=d0a9qYToiR+qBnnJnPMWvehTP6v8mO5v5wbOYMwLzjo=; b=W63T1iycMg2F8a0k1Go0RK5F/Wzgz/LJHs5mjC9JUW40QsBj4dsnwmJRuYDrCVHo6A DUA4ZJv7Xn0akmspfbL2bkmrWxVEop874ogvSEhQJYrvobQ2FuLsvN54NduWCC602XEI 6dme93LHMXZlMdgwQuOWKC4p3oT6AL6Xc2fIZYOimaKiAiw04AQo4r1hz+09JVFeNgiW kqGv+ILIx+IKtrAYudora7GBVntDE/NFn7oX14ugfFKI1OGekJvg70qkalMGfV10ZRgS NcEth6PWXYthLBP0MCy9AY041WFbrdIfzWWJnUoP64NJbBrOc6VPgoFukZWsOOWgSyJ9 S2JA== X-Gm-Message-State: ALyK8tJwsALqmojPT8/I45CfVRZD1jEYzaBHz9OlqeVpL0z27RS2cg0I6M/osElJCNiByw== X-Received: by 10.66.197.202 with SMTP id iw10mr29951843pac.148.1465291958556; Tue, 07 Jun 2016 02:32:38 -0700 (PDT) Received: from E107787-LIN (gcc113.osuosl.org. [140.211.9.71]) by smtp.gmail.com with ESMTPSA id p1sm33659848pfb.73.2016.06.07.02.32.35 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 07 Jun 2016 02:32:37 -0700 (PDT) From: Yao Qi To: Simon Marchi Cc: Yao Qi , "Metzger\, Markus T" , "gdb-patches\@sourceware.org" Subject: Re: [PATCH] Add method/format information to =record-started References: <20160603155220.22286-1-simon.marchi@ericsson.com> <86ziqywju7.fsf@gmail.com> <57557992.90908@ericsson.com> Date: Tue, 07 Jun 2016 09:32:00 -0000 In-Reply-To: <57557992.90908@ericsson.com> (Simon Marchi's message of "Mon, 6 Jun 2016 09:24:34 -0400") Message-ID: <86inxlwdhv.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2016-06/txt/msg00126.txt.bz2 Simon Marchi writes: > Just to be clear, the inner if/else doesn't need them, but the outer one = does. > No, it is not "GDB C Coding Standard" compliant, IMO. In the quoted url I gave, "Any two or more lines in code should be wrapped in braces, even if they are comments, as they look like separate statements:" so... > Here's the result: > > > if (started) > { > if (format !=3D NULL) brace is needed here... > fprintf_unfiltered ( > mi->event_channel, > "record-started,thread-group=3D\"i%d\",method=3D\"%s\",format=3D\"%s\"= ", > inferior->num, method, format); and here > else > fprintf_unfiltered ( > mi->event_channel, > "record-started,thread-group=3D\"i%d\",method=3D\"%s\"", > inferior->num, method); > } > else > fprintf_unfiltered (mi->event_channel, > "record-stopped,thread-group=3D\"i%d\"", inferior->num); --=20 Yao (=E9=BD=90=E5=B0=A7)