From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 121427 invoked by alias); 6 Feb 2018 16:28:12 -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 121418 invoked by uid 89); 6 Feb 2018 16:28:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=H*Ad:U*palves X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 06 Feb 2018 16:28:11 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1D2DC73B27; Tue, 6 Feb 2018 16:28:10 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7E50560C4A; Tue, 6 Feb 2018 16:28:09 +0000 (UTC) Subject: Re: [PATCH v2 0/7] improve btrace enable error reporting To: Markus Metzger , gdb-patches@sourceware.org References: <1516976072-19282-1-git-send-email-markus.t.metzger@intel.com> From: Pedro Alves Message-ID: <2c57146a-7111-4381-3851-bd1ff4d610b9@redhat.com> Date: Tue, 06 Feb 2018 16:28:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <1516976072-19282-1-git-send-email-markus.t.metzger@intel.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2018-02/txt/msg00084.txt.bz2 Hi Markus, On 01/26/2018 02:14 PM, Markus Metzger wrote: > Recording may fail for a variety of reasons. Improve the error > messages by stating more clearly what operation failed and try to give > a reason why it failed. > > Further align the error messages for native and remote debugging. > > Changes to v1: > - move helper classes into gdb/common/ > - add unit tests for helpers > - simplify helpers > > Markus Metzger (7): > common: add scoped_fd > common: add scoped_mmap > btrace: prepare for throwing exceptions when enabling btrace > btrace, gdbserver: use exceptions to convey btrace enable/disable > errors > btrace, gdbserver: remove the to_supports_btrace target method > btrace: improve enable error messages > btrace: check perf_event_paranoid This LGTM, though I have a couple questions, and a nit. #1 - Where does this leave up wrt to: 'old gdb' x 'new gdbserver' and 'new gdb' x 'old gdbserver' ? #2 - Where we now say + error (_("GDB does not support Intel PT.")); (and similarly for BTS) shouldn't that say something like "_This_ GDB does not", so that the user can tell that it's a matter of that particular build of gdb, not that GDB-the-project is lacking support for PT? #3 - in patch 7: Instead of: const char *filename = "/proc/sys/kernel/perf_event_paranoid"; write: static const char filename[] = ...; Thanks, Pedro Alves