[06/11] Support displaced stepping in aarch64-linux

Message ID 86lhb54zhk.fsf@gmail.com
State New, archived
Headers

Commit Message

Yao Qi Oct. 14, 2015, 8:37 a.m. UTC
  Sergio Durigan Junior <sergiodj@redhat.com> writes:

> This patch broke GDB when compiling with --enable-build-with-cxx:
>
>   <http://gdb-build.sergiodj.net/builders/Fedora-x86_64-cxx-build-m64/builds/1046/steps/compile%20gdb/logs/stdio>
>
> You should also have received a message from the BuildBot, but I decided
> to send this one just to be safe.

Hi Sergio,
I don't see such message in my linaro box.  I only saw one message
before, and I've fixed this build failure.

"Your commit '[aarch64] use aarch64_decode_insn to decode instructions in GDB' broke GDB"

Anyway, patch below fixes the build failure.  I've pushed it in.
  

Patch

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index cabfe36..4b8ffb7 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@ 
+2015-10-14  Yao Qi  <yao.qi@linaro.org>
+
+	* arch/aarch64-insn.h (struct aarch64_memory_operand): Move enum
+	out of it.
+	(enum aarch64_memory_operand_type): New.
+
 2015-10-13  David Edelsohn  <dje.gcc@gmail.com>
 
 	* xcoffread.c (dwarf2_xcoff_names): Add .dwmac and .dwpbtyp.
diff --git a/gdb/arch/aarch64-insn.h b/gdb/arch/aarch64-insn.h
index d51cabc..cc7ec48 100644
--- a/gdb/arch/aarch64-insn.h
+++ b/gdb/arch/aarch64-insn.h
@@ -117,6 +117,13 @@  struct aarch64_register
   int is64;
 };
 
+enum aarch64_memory_operand_type
+{
+  MEMORY_OPERAND_OFFSET,
+  MEMORY_OPERAND_PREINDEX,
+  MEMORY_OPERAND_POSTINDEX,
+};
+
 /* Representation of a memory operand, used for load and store
    instructions.
 
@@ -129,12 +136,8 @@  struct aarch64_register
 struct aarch64_memory_operand
 {
   /* Type of the operand.  */
-  enum
-    {
-      MEMORY_OPERAND_OFFSET,
-      MEMORY_OPERAND_PREINDEX,
-      MEMORY_OPERAND_POSTINDEX,
-    } type;
+  enum aarch64_memory_operand_type type;
+
   /* Index from the base register.  */
   int32_t index;
 };