Handle media instructions in arm software single step.

Message ID 1435595516-17404-1-git-send-email-yao.qi@linaro.org
State New, archived
Headers

Commit Message

Yao Qi June 29, 2015, 4:31 p.m. UTC
  This patch fixes PR 18605 which is about incorrectly decoding media
instructions in software single step.

gdb:

2015-06-29  Yao Qi  <yao.qi@linaro.org>

	PR tdep/18605
	* arm-tdep.c (arm_get_next_pc_raw): Break for media
	instructions.
---
 gdb/arm-tdep.c | 7 +++++++
 1 file changed, 7 insertions(+)
  

Patch

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 */