From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 126771 invoked by alias); 12 May 2016 13:14:01 -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 126744 invoked by uid 89); 12 May 2016 13:14:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1286, H*Ad:U*palves X-HELO: mail-pa0-f66.google.com Received: from mail-pa0-f66.google.com (HELO mail-pa0-f66.google.com) (209.85.220.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 12 May 2016 13:13:48 +0000 Received: by mail-pa0-f66.google.com with SMTP id zy2so7208104pac.2 for ; Thu, 12 May 2016 06:13:48 -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=jg6o1TNYWYG5Ua65gy1cdn85xLikR9FWadkrvmayIPg=; b=lU5IHTAAy1WFHUaD2qjyGtL1tCgO4j70I0kc1SrZP3oJnxrcaL3I6CoTf+8nfPyxwu a2GAiDDnLp6DIL9ag4ieaDFibZE2I+bfsfYKJG2xec/lojfeYIuJuyn4P+AEg6JG8SlU TOuLuanxOnRJ84A9Ugc7nNQJSuTxq8ZrenHZRJjToSfe70wG0r05dV2V4YOSzyfaKJ9K a6yjpZVBw5K+yst3OO5+CKlQCPq7MI2CaFdszxpRufxmkAQlu28A8rI4yRWKY9bXt/eg R4pGtL654wYQWKzc7buwTWUh5QD0RyBa3PcMD3cAGNOc/Z4Ym0bXJ3HLQ430J5o0VNuu ybqQ== X-Gm-Message-State: AOPr4FV+iYz5Op2+4EDG0/oYEsg5YFkww+DAOFXVo9dFKfiG68RBo37XzIcDkSUbBkQMiA== X-Received: by 10.66.52.112 with SMTP id s16mr13983674pao.35.1463058826604; Thu, 12 May 2016 06:13:46 -0700 (PDT) Received: from E107787-LIN (gcc113.osuosl.org. [140.211.9.71]) by smtp.gmail.com with ESMTPSA id bk8sm19998813pac.3.2016.05.12.06.13.43 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Thu, 12 May 2016 06:13:45 -0700 (PDT) From: Yao Qi To: Markus Metzger Cc: gdb-patches@sourceware.org, palves@redhat.com, ak@linux.intel.com, jan.kratochvil@redhat.com Subject: Re: [PATCH] record: automatically start recording References: <1459866845-28423-1-git-send-email-markus.t.metzger@intel.com> Date: Thu, 12 May 2016 13:14:00 -0000 In-Reply-To: <1459866845-28423-1-git-send-email-markus.t.metzger@intel.com> (Markus Metzger's message of "Tue, 5 Apr 2016 16:34:05 +0200") Message-ID: <8637pnctbv.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-05/txt/msg00195.txt.bz2 Markus Metzger writes: Hi Markus, > Is the added convenience worth a new option or do we want to point users = to the > breakpoint-command solution? > I don't think it can justify adding a option in GDB to do that, but I am open to others' thought. If people think it is useful to have such option, see my comments below on the patch, > +/* The inferior-created observer implementing "set auto-record". */ > + > +static void > +record_inferior_created (struct target_ops *ops, int from_tty) > +{ > + if (auto_record_string =3D=3D auto_record_off) > + return; > + > + TRY > + { > + char command[64]; > + > + snprintf (command, sizeof(command), "record %s", auto_record_strin= g); > + xsnprintf > + execute_command (command, from_tty); > + } > + CATCH (exception, RETURN_MASK_ALL) > + { > + warning (_("Could not enable record %s: %s"), auto_record_string, > + exception.message); > + } > + END_CATCH > +} > + > + > +# check for btrace support > +if { [skip_btrace_tests] } { return -1 } > + Can we test this option on the target without btrace? I think we can. The command/option itself is about restarting recording automatically, but the record type (full/btrace/bts/pt/) doesn't matter. --=20 Yao (=E9=BD=90=E5=B0=A7)