From patchwork Thu Aug 18 00:03:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Edjunior Barbosa Machado X-Patchwork-Id: 14729 Received: (qmail 120007 invoked by alias); 18 Aug 2016 00:04:08 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 116722 invoked by uid 89); 18 Aug 2016 00:04:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.3 required=5.0 tests=AWL, BAYES_05, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=FALLTHROUGH, Immediate, 1014, Word X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 18 Aug 2016 00:04:04 +0000 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u7I041nZ140192 for ; Wed, 17 Aug 2016 20:04:02 -0400 Received: from e24smtp05.br.ibm.com (e24smtp05.br.ibm.com [32.104.18.26]) by mx0a-001b2d01.pphosted.com with ESMTP id 24v4cm1mwf-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 17 Aug 2016 20:04:02 -0400 Received: from localhost by e24smtp05.br.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 17 Aug 2016 21:03:58 -0300 Received: from d24dlp02.br.ibm.com (9.18.248.206) by e24smtp05.br.ibm.com (10.172.0.141) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 17 Aug 2016 21:03:56 -0300 X-IBM-Helo: d24dlp02.br.ibm.com X-IBM-MailFrom: emachado@linux.vnet.ibm.com X-IBM-RcptTo: gdb-patches@sourceware.org Received: from d24relay02.br.ibm.com (d24relay02.br.ibm.com [9.13.184.26]) by d24dlp02.br.ibm.com (Postfix) with ESMTP id 77CFC1DC0051 for ; Wed, 17 Aug 2016 20:03:46 -0400 (EDT) Received: from d24av02.br.ibm.com (d24av02.br.ibm.com [9.8.31.93]) by d24relay02.br.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u7I03tnk34079056 for ; Wed, 17 Aug 2016 21:03:55 -0300 Received: from d24av02.br.ibm.com (localhost [127.0.0.1]) by d24av02.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u7I03tFT028682 for ; Wed, 17 Aug 2016 21:03:55 -0300 Received: from dawn.ibm.com (macs.br.ibm.com [9.18.203.25] (may be forged)) by d24av02.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id u7I03tFQ028679; Wed, 17 Aug 2016 21:03:55 -0300 From: Edjunior Barbosa Machado To: gdb-patches@sourceware.org Cc: Edjunior Barbosa Machado , Ulrich Weigand Subject: [PATCH] ppc: Fix record of HTM instructions Date: Wed, 17 Aug 2016 21:03:30 -0300 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16081800-0032-0000-0000-00000276BEEA X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16081800-0033-0000-0000-00000EBD8355 Message-Id: <1471478610-31468-1-git-send-email-emachado@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2016-08-17_14:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1608180000 X-IsSubscribed: yes Hi, the patch below fixes the record support of Hardware Transactional Memory instructions on Power. It also solves a large number of unexpected failures from gdb.reverse testcases sigall-precsave.exp and sigall-reverse.exp that occur on distros which glibc uses HTM instructions. Ok? Thanks, --- Edjunior gdb/ChangeLog 2016-08-17 Edjunior Barbosa Machado * rs6000-tdep.c (ppc_process_record_op31): Handle HTM instructions. --- gdb/rs6000-tdep.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index a616cbe..eb12c5d 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -4613,17 +4613,17 @@ ppc_process_record_op31 (struct gdbarch *gdbarch, struct regcache *regcache, case 654: /* Transaction Begin */ case 686: /* Transaction End */ - case 718: /* Transaction Check */ case 750: /* Transaction Suspend or Resume */ case 782: /* Transaction Abort Word Conditional */ case 814: /* Transaction Abort Doubleword Conditional */ case 846: /* Transaction Abort Word Conditional Immediate */ case 878: /* Transaction Abort Doubleword Conditional Immediate */ case 910: /* Transaction Abort */ - fprintf_unfiltered (gdb_stdlog, "Cannot record Transaction instructions. " - "%08x at %s, 31-%d.\n", - insn, paddress (gdbarch, addr), ext); - return -1; + record_full_arch_list_add_reg (regcache, tdep->ppc_ps_regnum); + /* FALL-THROUGH */ + case 718: /* Transaction Check */ + record_full_arch_list_add_reg (regcache, tdep->ppc_cr_regnum); + return 0; case 1014: /* Data Cache Block set to Zero */ if (target_auxv_search (¤t_target, AT_DCACHEBSIZE, &at_dcsz) <= 0