Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
To: gdb-patches@sourceware.org
Cc: Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>,
	       Ulrich Weigand <uweigand@de.ibm.com>
Subject: [PATCH] ppc: Fix record of HTM instructions
Date: Thu, 18 Aug 2016 00:04:00 -0000	[thread overview]
Message-ID: <1471478610-31468-1-git-send-email-emachado@linux.vnet.ibm.com> (raw)

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  <emachado@linux.vnet.ibm.com>

	* 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 (&current_target, AT_DCACHEBSIZE, &at_dcsz) <= 0
-- 
2.5.5


             reply	other threads:[~2016-08-18  0:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-18  0:04 Edjunior Barbosa Machado [this message]
2016-08-18 12:49 ` Ulrich Weigand
2016-08-18 14:21   ` Edjunior Barbosa Machado

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1471478610-31468-1-git-send-email-emachado@linux.vnet.ibm.com \
    --to=emachado@linux.vnet.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=uweigand@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox