From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 117765 invoked by alias); 26 Jan 2018 14:14:37 -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 117738 invoked by uid 89); 26 Jan 2018 14:14:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.3 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: mga14.intel.com Received: from mga14.intel.com (HELO mga14.intel.com) (192.55.52.115) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 26 Jan 2018 14:14:35 +0000 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jan 2018 06:14:34 -0800 X-ExtLoop1: 1 Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga007.fm.intel.com with ESMTP; 26 Jan 2018 06:14:33 -0800 Received: from ulvlx001.iul.intel.com (ulvlx001.iul.intel.com [172.28.207.17]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id w0QEEW5M020615; Fri, 26 Jan 2018 14:14:32 GMT Received: from ulvlx001.iul.intel.com (localhost [127.0.0.1]) by ulvlx001.iul.intel.com with ESMTP id w0QEEWLn019563; Fri, 26 Jan 2018 15:14:32 +0100 Received: (from mmetzger@localhost) by ulvlx001.iul.intel.com with LOCAL id w0QEEWM5019559; Fri, 26 Jan 2018 15:14:32 +0100 From: Markus Metzger To: gdb-patches@sourceware.org Subject: [PATCH v2 0/7] improve btrace enable error reporting Date: Fri, 26 Jan 2018 14:14:00 -0000 Message-Id: <1516976072-19282-1-git-send-email-markus.t.metzger@intel.com> X-IsSubscribed: yes X-SW-Source: 2018-01/txt/msg00549.txt.bz2 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 gdb/Makefile.in | 2 + gdb/btrace.c | 3 - gdb/common/scoped_fd.h | 60 +++++ gdb/common/scoped_mmap.h | 76 ++++++ gdb/gdbserver/linux-low.c | 2 - gdb/gdbserver/nto-low.c | 1 - gdb/gdbserver/server.c | 80 +++---- gdb/gdbserver/spu-low.c | 1 - gdb/gdbserver/target.h | 7 - gdb/gdbserver/win32-low.c | 1 - gdb/nat/linux-btrace.c | 427 ++++++++-------------------------- gdb/nat/linux-btrace.h | 3 - gdb/remote.c | 32 --- gdb/target-delegates.c | 33 --- gdb/target.c | 8 - gdb/target.h | 7 - gdb/unittests/scoped_fd-selftests.c | 90 +++++++ gdb/unittests/scoped_mmap-selftests.c | 92 ++++++++ gdb/x86-linux-nat.c | 20 +- 19 files changed, 458 insertions(+), 487 deletions(-) create mode 100644 gdb/common/scoped_fd.h create mode 100644 gdb/common/scoped_mmap.h create mode 100644 gdb/unittests/scoped_fd-selftests.c create mode 100644 gdb/unittests/scoped_mmap-selftests.c -- 1.8.3.1