]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/i386-tdep.c
Turn value_type into method
[thirdparty/binutils-gdb.git] / gdb / i386-tdep.c
index 580664d2ce54cf8ec7d89fa9b50607ee2775d8f2..b799ac5ee27de65ec5d05ce0314d6986df009a1a 100644 (file)
@@ -3389,7 +3389,7 @@ i386_pseudo_register_read_into_value (struct gdbarch *gdbarch,
       status = regcache->raw_read (fpnum, raw_buf);
       if (status != REG_VALID)
        mark_value_bytes_unavailable (result_value, 0,
-                                     value_type (result_value)->length ());
+                                     result_value->type ()->length ());
       else
        memcpy (buf, raw_buf, register_size (gdbarch, regnum));
     }
@@ -3526,7 +3526,7 @@ i386_pseudo_register_read_into_value (struct gdbarch *gdbarch,
          status = regcache->raw_read (gpnum, raw_buf);
          if (status != REG_VALID)
            mark_value_bytes_unavailable (result_value, 0,
-                                         value_type (result_value)->length ());
+                                         result_value->type ()->length ());
          else
            memcpy (buf, raw_buf, 2);
        }
@@ -3539,7 +3539,7 @@ i386_pseudo_register_read_into_value (struct gdbarch *gdbarch,
          status = regcache->raw_read (gpnum % 4, raw_buf);
          if (status != REG_VALID)
            mark_value_bytes_unavailable (result_value, 0,
-                                         value_type (result_value)->length ());
+                                         result_value->type ()->length ());
          else if (gpnum >= 4)
            memcpy (buf, raw_buf + 1, 1);
          else
@@ -8613,7 +8613,8 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
      appended to the list first, so that it supercedes the DWARF
      unwinder in function epilogues (where the DWARF unwinder
      currently fails).  */
-  frame_unwind_append_unwinder (gdbarch, &i386_epilogue_frame_unwind);
+  if (info.bfd_arch_info->bits_per_word == 32)
+    frame_unwind_append_unwinder (gdbarch, &i386_epilogue_frame_unwind);
 
   /* Hook in the DWARF CFI frame unwinder.  This unwinder is appended
      to the list before the prologue-based unwinders, so that DWARF
@@ -8792,9 +8793,12 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
     tdep-> bnd0_regnum = -1;
 
   /* Hook in the legacy prologue-based unwinders last (fallback).  */
-  frame_unwind_append_unwinder (gdbarch, &i386_stack_tramp_frame_unwind);
-  frame_unwind_append_unwinder (gdbarch, &i386_sigtramp_frame_unwind);
-  frame_unwind_append_unwinder (gdbarch, &i386_frame_unwind);
+  if (info.bfd_arch_info->bits_per_word == 32)
+    {
+      frame_unwind_append_unwinder (gdbarch, &i386_stack_tramp_frame_unwind);
+      frame_unwind_append_unwinder (gdbarch, &i386_sigtramp_frame_unwind);
+      frame_unwind_append_unwinder (gdbarch, &i386_frame_unwind);
+    }
 
   /* If we have a register mapping, enable the generic core file
      support, unless it has already been enabled.  */