From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18418 invoked by alias); 6 Jun 2016 13:03:33 -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 18406 invoked by uid 89); 6 Jun 2016 13:03:32 -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-f54.google.com Received: from mail-pa0-f54.google.com (HELO mail-pa0-f54.google.com) (209.85.220.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 06 Jun 2016 13:03:22 +0000 Received: by mail-pa0-f54.google.com with SMTP id ec8so29637822pac.0 for ; Mon, 06 Jun 2016 06:03:22 -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=HVcY0WCuhacbVdOcRzG556zqbvzXi/0LX0EQc2a8+3Q=; b=Q2l15IRCmWkO7sivWoz+pUJ5NqGOaS4w71NG+wSFsSoRfClgwQPAxEKBdhe2DUu+p+ JvF+Q9A7ItCT3/Yyw0ySx+dBjtCWP/+spYQ2DVUT507Gm92uFnzivVS10TZ+/rFiBvTf KcVRihZGWMzMA4sgw7XI+cHxVCJwLHI65SlQBSxfiia9GcHNQ4VkXLDk0kalcDyge/fv zqeTlQ11PYsJa68eSI4Z/UxG5gFRpyNWLTIHEUCotQM934dXUaCwjR24Vx1dppzRRamr ipG6Z8n0CgVCzjTzUlmUWGL8H638jQc4knDM/6bQI93TUZx4xq2aKE/Yvwj03rBGEub8 2mTA== X-Gm-Message-State: ALyK8tI1pmTwo2+5nTUQkvQ8RcTjMdqKDlbI0UaDhrDzTFKfd7SSABOnhOOv4N/xZ+bHfg== X-Received: by 10.66.180.49 with SMTP id dl17mr24646472pac.131.1465218200676; Mon, 06 Jun 2016 06:03:20 -0700 (PDT) Received: from E107787-LIN (gcc113.osuosl.org. [140.211.9.71]) by smtp.gmail.com with ESMTPSA id f191sm27778193pfa.26.2016.06.06.06.03.18 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Mon, 06 Jun 2016 06:03:20 -0700 (PDT) From: Yao Qi To: "Metzger\, Markus T" Cc: Simon Marchi , "gdb-patches\@sourceware.org" Subject: Re: [PATCH] Add method/format information to =record-started References: <20160603155220.22286-1-simon.marchi@ericsson.com> Date: Mon, 06 Jun 2016 13:03:00 -0000 In-Reply-To: (Markus T. Metzger's message of "Mon, 6 Jun 2016 06:37:51 +0000") Message-ID: <86ziqywju7.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/msg00079.txt.bz2 "Metzger, Markus T" writes: Hi Markus, Thanks for reviewing the patch.... >> + if (format !=3D NULL) >> + { > > Do we really need braces, here... > Yes, two or more lines in code should be wrapped in braces. https://sourceware.org/gdb/wiki/Internals%20GDB-C-Coding-Standards >> @@ -234,7 +235,8 @@ record_btrace_open (const char *args, int from_tty) >> NULL); >> record_btrace_generating_corefile =3D 0; >>=20 >> - observer_notify_record_changed (current_inferior (), 1); >> + format =3D record_btrace_conf.format =3D=3D BTRACE_FORMAT_PT ? "pt" := "bts"; > > I'd use a switch here and not assume that format !=3D pt means bts. If w= e added > another format (LBR maybe?) we might miss this. I agree, otherwise, the patch is good to me. --=20 Yao (=E9=BD=90=E5=B0=A7)