*** empty log message ***
[deliverable/binutils-gdb.git] / gdb / jv-valprint.c
index ef258475fde737629cc2ba2926525ecbe651d30c..3de15ec164d02cdec1440d706cdc6aacfb943757 100644 (file)
@@ -1,5 +1,7 @@
 /* Support for printing Java values for GDB, the GNU debugger.
-   Copyright 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+
+   Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free
+   Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -50,8 +52,8 @@ java_value_print (struct value *val, struct ui_file *stream, int format,
   int i;
   char *name;
 
-  type = VALUE_TYPE (val);
-  address = VALUE_ADDRESS (val) + VALUE_OFFSET (val);
+  type = value_type (val);
+  address = VALUE_ADDRESS (val) + value_offset (val);
 
   if (is_object_type (type))
     {
@@ -66,7 +68,7 @@ java_value_print (struct value *val, struct ui_file *stream, int format,
          type = type_from_class (java_class_from_object (val));
          type = lookup_pointer_type (type);
 
-         val = value_at (type, address, NULL);
+         val = value_at (type, address);
        }
     }
 
@@ -168,15 +170,15 @@ java_value_print (struct value *val, struct ui_file *stream, int format,
              else
                {
                  VALUE_LAZY (v) = 1;
-                 VALUE_OFFSET (v) = 0;
+                 v->offset = 0;
                }
 
-             VALUE_OFFSET (next_v) = VALUE_OFFSET (v);
+             next_v->offset = value_offset (v);
 
              for (reps = 1; i + reps < length; reps++)
                {
                  VALUE_LAZY (next_v) = 1;
-                 VALUE_OFFSET (next_v) += TYPE_LENGTH (el_type);
+                 next_v->offset += TYPE_LENGTH (el_type);
                  if (memcmp (VALUE_CONTENTS (v), VALUE_CONTENTS (next_v),
                              TYPE_LENGTH (el_type)) != 0)
                    break;
@@ -187,7 +189,7 @@ java_value_print (struct value *val, struct ui_file *stream, int format,
              else
                fprintf_filtered (stream, "%d..%d: ", i, i + reps - 1);
 
-             val_print (VALUE_TYPE (v), VALUE_CONTENTS (v), 0, 0,
+             val_print (value_type (v), VALUE_CONTENTS (v), 0, 0,
                         stream, format, 2, 1, pretty);
 
              things_printed++;
@@ -298,9 +300,6 @@ java_print_value_fields (struct type *type, char *valaddr, CORE_ADDR address,
          java_print_value_fields (baseclass, base_valaddr, address + boffset,
                                   stream, format, recurse + 1, pretty);
          fputs_filtered (", ", stream);
-
-       flush_it:
-         ;
        }
 
     }
@@ -409,10 +408,10 @@ java_print_value_fields (struct type *type, char *valaddr, CORE_ADDR address,
                    fputs_filtered ("<optimized out>", stream);
                  else
                    {
-                     struct type *t = check_typedef (VALUE_TYPE (v));
+                     struct type *t = check_typedef (value_type (v));
                      if (TYPE_CODE (t) == TYPE_CODE_STRUCT)
                        v = value_addr (v);
-                     val_print (VALUE_TYPE (v),
+                     val_print (value_type (v),
                                 VALUE_CONTENTS (v), 0, VALUE_ADDRESS (v),
                                 stream, format, 0, recurse + 1, pretty);
                    }
@@ -457,7 +456,7 @@ java_val_print (struct type *type, char *valaddr, int embedded_offset,
                CORE_ADDR address, struct ui_file *stream, int format,
                int deref_ref, int recurse, enum val_prettyprint pretty)
 {
-  register unsigned int i = 0; /* Number of characters printed */
+  unsigned int i = 0;  /* Number of characters printed */
   struct type *target_type;
   CORE_ADDR addr;
 
This page took 0.025406 seconds and 4 git commands to generate.