* elf32-m68k.c (elf_m68k_relocate_section): Allow
[binutils-gdb.git] / gdb / jv-valprint.c
index 648dbc7a3b52a4ce5fa17287c47c90f082a671a3..12a960f09d8e10d6f417a4ba1fd008448c25f856 100644 (file)
@@ -51,10 +51,13 @@ java_value_print (struct value *val, struct ui_file *stream,
   if (is_object_type (type))
     {
       CORE_ADDR obj_addr;
+      struct value *tem = val;
 
       /* Get the run-time type, and cast the object into that.  */
+      while (TYPE_CODE (value_type (tem)) == TYPE_CODE_PTR)
+       tem = value_ind (tem);
 
-      obj_addr = unpack_pointer (type, value_contents (val));
+      obj_addr = value_address (tem);
 
       if (obj_addr != 0)
        {