* dwarf2read.c (follow_die_ref): Add comment.
[deliverable/binutils-gdb.git] / gdb / mt-tdep.c
index 0a78f0fe1609f7926824db03420aa5e64165fae4..28f8b46fa1d3abc48f90de8e8d45d382cd9d955d 100644 (file)
@@ -1,6 +1,6 @@
 /* Target-dependent code for Morpho mt processor, for GDB.
 
-   Copyright (C) 2005, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -37,6 +37,7 @@
 #include "infcall.h"
 #include "gdb_assert.h"
 #include "language.h"
+#include "valprint.h"
 
 enum mt_arch_constants
 {
@@ -226,9 +227,9 @@ mt_copro_register_type (struct gdbarch *arch, int regnum)
     case MT_MAC_REGNUM:
       return builtin_type_uint32;
     case MT_CONTEXT_REGNUM:
-      return builtin_type_long_long;
+      return builtin_type (arch)->builtin_long_long;
     case MT_FLAG_REGNUM:
-      return builtin_type_unsigned_char;
+      return builtin_type (arch)->builtin_unsigned_char;
     default:
       if (regnum >= MT_CPR0_REGNUM && regnum <= MT_CPR15_REGNUM)
        return builtin_type_int16;
@@ -258,7 +259,7 @@ mt_register_type (struct gdbarch *arch, int regnum)
       if (copro_type == NULL)
        {
          struct type *temp;
-         temp = create_range_type (NULL, builtin_type_unsigned_int, 0, 1);
+         temp = create_range_type (NULL, builtin_type_int32, 0, 1);
          copro_type = create_array_type (NULL, builtin_type_int16, temp);
        }
       switch (regnum)
@@ -675,6 +676,7 @@ mt_registers_info (struct gdbarch *gdbarch,
        {
          /* Special output handling for the 'coprocessor' register.  */
          gdb_byte *buf;
+         struct value_print_options opts;
 
          buf = alloca (register_size (gdbarch, MT_COPRO_REGNUM));
          frame_register_read (frame, MT_COPRO_REGNUM, buf);
@@ -685,8 +687,10 @@ mt_registers_info (struct gdbarch *gdbarch,
          print_spaces_filtered (15 - strlen (gdbarch_register_name
                                                (gdbarch, regnum)),
                                 file);
+         get_raw_print_options (&opts);
+         opts.deref_ref = 1;
          val_print (register_type (gdbarch, regnum), buf,
-                    0, 0, file, 0, 1, 0, Val_no_prettyprint,
+                    0, 0, file, 0, &opts,
                     current_language);
          fputs_filtered ("\n", file);
        }
@@ -1165,6 +1169,9 @@ mt_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   return gdbarch;
 }
 
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_mt_tdep;
+
 void
 _initialize_mt_tdep (void)
 {
This page took 0.025616 seconds and 4 git commands to generate.