minor cleanups to update_current_target
[deliverable/binutils-gdb.git] / gdb / amd64-windows-tdep.c
index 359173affbb4586d8c19d3e724582e6eaf794a5d..59a960a99e3b01d24751ef95b700ad53e8e1d54f 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2009-2013 Free Software Foundation, Inc.
+/* Copyright (C) 2009-2014 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -649,7 +649,8 @@ amd64_windows_frame_decode_insns (struct frame_info *this_frame,
           ex_ui.CountOfCodes, ex_ui.FrameRegisterOffset);
 
       /* Check version.  */
-      if (PEX64_UWI_VERSION (ex_ui.Version_Flags) != 1)
+      if (PEX64_UWI_VERSION (ex_ui.Version_Flags) != 1
+         && PEX64_UWI_VERSION (ex_ui.Version_Flags) != 2)
        return;
 
       if (j == 0
@@ -696,7 +697,17 @@ amd64_windows_frame_decode_insns (struct frame_info *this_frame,
        return;
 
       end_insns = &insns[codes_count * 2];
-      for (p = insns; p < end_insns; p += 2)
+      p = insns;
+
+      /* Skip opcodes 6 of version 2.  This opcode is not documented.  */
+      if (PEX64_UWI_VERSION (ex_ui.Version_Flags) == 2)
+       {
+         for (; p < end_insns; p += 2)
+           if (PEX64_UNWCODE_CODE (p[1]) != 6)
+             break;
+       }
+
+      for (; p < end_insns; p += 2)
        {
          int reg;
 
This page took 0.02362 seconds and 4 git commands to generate.