Really remove file.
[deliverable/binutils-gdb.git] / gdb / cp-valprint.c
index 9a32e9c80b930c3db7e39f50503faf4a9c7e5780..53e3ce9b2ec64eee9fb345144a3b1914e0d9f515 100644 (file)
 #include "c-lang.h"
 #include "target.h"
 #include "cp-abi.h"
-
-/* Indication of presence of HP-compiled object files */
-extern int hp_som_som_object_present;  /* defined in symtab.c */
-
+#include "valprint.h"
 
 int vtblprint;                 /* Controls printing of vtbl's */
 int objectprint;               /* Controls looking up an object's derived type
@@ -114,7 +111,7 @@ cp_print_class_method (char *valaddr,
       if (sym == 0)
        {
          /* 1997-08-01 Currently unsupported with HP aCC */
-         if (hp_som_som_object_present)
+         if (deprecated_hp_som_som_object_present)
            {
              fputs_filtered ("?? <not supported with HP aCC>", stream);
              return;
@@ -142,7 +139,7 @@ cp_print_class_method (char *valaddr,
       char *demangled_name;
 
       fprintf_filtered (stream, "&");
-      fprintf_filtered (stream, kind);
+      fputs_filtered (kind, stream);
       demangled_name = cplus_demangle (TYPE_FN_FIELD_PHYSNAME (f, j),
                                       DMGL_ANSI | DMGL_PARAMS);
       if (demangled_name == NULL)
@@ -266,8 +263,6 @@ cp_print_value_fields (struct type *type, struct type *real_type, char *valaddr,
     fprintf_filtered (stream, "<No data fields>");
   else
     {
-      extern int inspect_it;
-
       if (dont_print_statmem == 0)
        {
          /* If we're at top level, carve out a completely fresh
@@ -555,7 +550,7 @@ cp_print_value (struct type *type, struct type *real_type, char *valaddr,
        {
          boffset = baseclass_offset (type, i,
                                      valaddr + offset,
-                                     address + offset);
+                                     address);
          skip = ((boffset == -1) || (boffset + offset) < 0) ? 1 : -1;
 
          if (BASETYPE_VIA_VIRTUAL (type, i))
@@ -570,9 +565,10 @@ cp_print_value (struct type *type, struct type *real_type, char *valaddr,
                {
                  /* FIXME (alloca): unsafe if baseclass is really really large. */
                  base_valaddr = (char *) alloca (TYPE_LENGTH (baseclass));
-                 if (target_read_memory (address + offset + boffset, base_valaddr,
+                 if (target_read_memory (address + boffset, base_valaddr,
                                          TYPE_LENGTH (baseclass)) != 0)
                    skip = 1;
+                 address = address + boffset;
                  thisoffset = 0;
                  boffset = 0;
                  thistype = baseclass;
@@ -601,7 +597,8 @@ cp_print_value (struct type *type, struct type *real_type, char *valaddr,
        fprintf_filtered (stream, "<invalid address>");
       else
        cp_print_value_fields (baseclass, thistype, base_valaddr,
-                              thisoffset + boffset, address, stream, format,
+                              thisoffset + boffset, address + boffset,
+                              stream, format,
                               recurse, pretty,
                               ((struct type **)
                                obstack_base (&dont_print_vb_obstack)),
@@ -685,7 +682,7 @@ cp_print_class_member (char *valaddr, struct type *domain,
      print it.  */
   int extra = 0;
   int bits = 0;
-  register unsigned int i;
+  unsigned int i;
   unsigned len = TYPE_NFIELDS (domain);
 
   /* @@ Make VAL into bit offset */
@@ -719,7 +716,7 @@ cp_print_class_member (char *valaddr, struct type *domain,
   if (i < len)
     {
       char *name;
-      fprintf_filtered (stream, prefix);
+      fputs_filtered (prefix, stream);
       name = type_name_no_tag (domain);
       if (name)
        fputs_filtered (name, stream);
This page took 0.025163 seconds and 4 git commands to generate.