2003-05-14 Jeff Johnston <jjohnstn@redhat.com>
[deliverable/binutils-gdb.git] / gdb / cp-valprint.c
index a2ccbdbf77caf680e6dee98b03685757c4c17201..9a32e9c80b930c3db7e39f50503faf4a9c7e5780 100644 (file)
@@ -1,6 +1,6 @@
 /* Support for printing C++ values for GDB, the GNU debugger.
    Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
-   2000, 2001, 2002
+   2000, 2001, 2002, 2003
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -87,7 +87,7 @@ cp_print_class_method (char *valaddr,
       fprintf_filtered (stream, "<unknown>");
       return;
     }
-  addr = unpack_pointer (lookup_pointer_type (builtin_type_void), valaddr);
+  addr = unpack_pointer (type, valaddr);
   if (METHOD_PTR_IS_VIRTUAL (addr))
     {
       offset = METHOD_PTR_TO_VOFFSET (addr);
@@ -130,7 +130,7 @@ cp_print_class_method (char *valaddr,
          check_stub_method_group (domain, i);
          for (j = 0; j < len2; j++)
            {
-             if (strcmp (SYMBOL_NAME (sym), TYPE_FN_FIELD_PHYSNAME (f, j))
+             if (strcmp (DEPRECATED_SYMBOL_NAME (sym), TYPE_FN_FIELD_PHYSNAME (f, j))
                  == 0)
                goto common;
            }
@@ -260,8 +260,8 @@ cp_print_value_fields (struct type *type, struct type *real_type, char *valaddr,
   if ((len == n_baseclasses)
       || ((len - n_baseclasses == 1)
          && TYPE_HAS_VTABLE (type)
-         && STREQN (TYPE_FIELD_NAME (type, n_baseclasses),
-                    hpacc_vtbl_ptr_name, 5))
+         && strncmp (TYPE_FIELD_NAME (type, n_baseclasses),
+                     hpacc_vtbl_ptr_name, 5) == 0)
       || !len)
     fprintf_filtered (stream, "<No data fields>");
   else
@@ -285,7 +285,8 @@ cp_print_value_fields (struct type *type, struct type *real_type, char *valaddr,
 
          /* If a vtable pointer appears, we'll print it out later */
          if (TYPE_HAS_VTABLE (type)
-             && STREQN (TYPE_FIELD_NAME (type, i), hpacc_vtbl_ptr_name, 5))
+             && strncmp (TYPE_FIELD_NAME (type, i), hpacc_vtbl_ptr_name,
+                         5) == 0)
            continue;
 
          if (fields_seen)
@@ -408,9 +409,8 @@ cp_print_value_fields (struct type *type, struct type *real_type, char *valaddr,
     }                          /* if there are data fields */
   /* Now print out the virtual table pointer if there is one */
   if (TYPE_HAS_VTABLE (type)
-      && STREQN (TYPE_FIELD_NAME (type, n_baseclasses),
-                hpacc_vtbl_ptr_name, 
-                5))
+      && strncmp (TYPE_FIELD_NAME (type, n_baseclasses),
+                 hpacc_vtbl_ptr_name, 5) == 0)
     {
       struct value *v;
       /* First get the virtual table pointer and print it out */
This page took 0.027604 seconds and 4 git commands to generate.