Add support for disassembling WebAssembly opcodes.
[deliverable/binutils-gdb.git] / gdb / p-valprint.c
index f639e29b6258668f8c8d56e856bd421037e54e95..2c802336e326bc43e1609c332c13b84a3f79f060 100644 (file)
@@ -1,6 +1,6 @@
 /* Support for printing Pascal values for GDB, the GNU debugger.
 
-   Copyright (C) 2000-2016 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -58,10 +58,10 @@ static const struct generic_val_print_decorations p_decorations =
    function; they are identical.  */
 
 void
-pascal_val_print (struct type *type, const gdb_byte *valaddr,
+pascal_val_print (struct type *type,
                  int embedded_offset, CORE_ADDR address,
                  struct ui_file *stream, int recurse,
-                 const struct value *original_value,
+                 struct value *original_value,
                  const struct value_print_options *options)
 {
   struct gdbarch *gdbarch = get_type_arch (type);
@@ -75,6 +75,7 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr,
   struct type *char_type;
   CORE_ADDR addr;
   int want_space = 0;
+  const gdb_byte *valaddr = value_contents_for_printing (original_value);
 
   type = check_typedef (type);
   switch (TYPE_CODE (type))
@@ -132,7 +133,7 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr,
                {
                  i = 0;
                }
-             val_print_array_elements (type, valaddr, embedded_offset,
+             val_print_array_elements (type, embedded_offset,
                                        address, stream, recurse,
                                        original_value, options, i);
              fprintf_filtered (stream, "}");
@@ -146,7 +147,7 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr,
     case TYPE_CODE_PTR:
       if (options->format && options->format != 's')
        {
-         val_print_scalar_formatted (type, valaddr, embedded_offset,
+         val_print_scalar_formatted (type, embedded_offset,
                                      original_value, options, 0, stream);
          break;
        }
@@ -287,7 +288,7 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr,
     case TYPE_CODE_UNDEF:
     case TYPE_CODE_BOOL:
     case TYPE_CODE_CHAR:
-      generic_val_print (type, valaddr, embedded_offset, address,
+      generic_val_print (type, embedded_offset, address,
                         stream, recurse, original_value, options,
                         &p_decorations);
       break;
@@ -471,7 +472,7 @@ static void pascal_object_print_static_field (struct value *,
 static void pascal_object_print_value (struct type *, const gdb_byte *,
                                       LONGEST,
                                       CORE_ADDR, struct ui_file *, int,
-                                      const struct value *,
+                                      struct value *,
                                       const struct value_print_options *,
                                       struct type **);
 
@@ -531,7 +532,7 @@ pascal_object_print_value_fields (struct type *type, const gdb_byte *valaddr,
                                  LONGEST offset,
                                  CORE_ADDR address, struct ui_file *stream,
                                  int recurse,
-                                 const struct value *val,
+                                 struct value *val,
                                  const struct value_print_options *options,
                                  struct type **dont_print_vb,
                                  int dont_print_statmem)
@@ -670,7 +671,7 @@ pascal_object_print_value_fields (struct type *type, const gdb_byte *valaddr,
                     address + TYPE_FIELD_BITPOS (type, i) / 8, 0,
                     stream, format, 0, recurse + 1, pretty); */
                  val_print (TYPE_FIELD_TYPE (type, i),
-                            valaddr, offset + TYPE_FIELD_BITPOS (type, i) / 8,
+                            offset + TYPE_FIELD_BITPOS (type, i) / 8,
                             address, stream, recurse + 1, val, &opts,
                             current_language);
                }
@@ -703,7 +704,7 @@ pascal_object_print_value (struct type *type, const gdb_byte *valaddr,
                           LONGEST offset,
                           CORE_ADDR address, struct ui_file *stream,
                           int recurse,
-                          const struct value *val,
+                          struct value *val,
                           const struct value_print_options *options,
                           struct type **dont_print_vb)
 {
This page took 0.037162 seconds and 4 git commands to generate.