This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Handle media instructions in arm software single step.


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7b9be803fed8f500b512d5685773c84fffcdf63f

commit 7b9be803fed8f500b512d5685773c84fffcdf63f
Author: Yao Qi <yao.qi@linaro.org>
Date:   Tue Jun 30 09:24:43 2015 +0100

    Handle media instructions in arm software single step.
    
    This patch fixes PR 18605 which is about incorrectly decoding media
    instructions in software single step.
    
    gdb:
    
    2015-06-30  Yao Qi  <yao.qi@linaro.org>
    
    	PR tdep/18605
    	* arm-tdep.c (arm_get_next_pc_raw): Break for media
    	instructions.

Diff:
---
 gdb/ChangeLog  | 6 ++++++
 gdb/arm-tdep.c | 7 +++++++
 2 files changed, 13 insertions(+)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 74a88db..8a961c6 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2015-06-30  Yao Qi  <yao.qi@linaro.org>
+
+	PR tdep/18605
+	* arm-tdep.c (arm_get_next_pc_raw): Break for media
+	instructions.
+
 2015-06-29  Kevin Buettner  <kevinb@redhat.com>
 
         * rx-tdep.c (RX_PSW_REGNUM): New enum constant.
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index c99f2a9..527bd01 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -4927,6 +4927,13 @@ arm_get_next_pc_raw (struct frame_info *frame, CORE_ADDR pc)
 	case 0x5:		/* data transfer */
 	case 0x6:
 	case 0x7:
+	  if (bits (this_instr, 25, 27) == 0x3 && bit (this_instr, 4) == 1)
+	    {
+	      /* Media instructions and architecturally undefined
+		 instructions.  */
+	      break;
+	    }
+
 	  if (bit (this_instr, 20))
 	    {
 	      /* load */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]