* printcmd.c (print_address_demangle): Add 'opts' argument.
[deliverable/binutils-gdb.git] / gdb / valprint.c
index 738fef43719ec713abac15c74053b5fc86af21d5..507aeb587b8324fc0ca8c3434d7264f2d85989c7 100644 (file)
@@ -384,8 +384,7 @@ generic_val_print (struct type *type, const gdb_byte *valaddr,
          if (TYPE_CODE (elttype) == TYPE_CODE_FUNC)
            {
              /* Try to print what function it points to.  */
-             print_function_pointer_address (gdbarch, addr, stream,
-                                             options->addressprint);
+             print_function_pointer_address (options, gdbarch, addr, stream);
              return;
            }
 
@@ -445,7 +444,7 @@ generic_val_print (struct type *type, const gdb_byte *valaddr,
       for (i = 0; i < len; i++)
        {
          QUIT;
-         if (val == TYPE_FIELD_BITPOS (type, i))
+         if (val == TYPE_FIELD_ENUMVAL (type, i))
            {
              break;
            }
@@ -466,13 +465,13 @@ generic_val_print (struct type *type, const gdb_byte *valaddr,
            {
              QUIT;
 
-             if ((val & TYPE_FIELD_BITPOS (type, i)) != 0)
+             if ((val & TYPE_FIELD_ENUMVAL (type, i)) != 0)
                {
                  if (!first)
                    fputs_filtered (" | ", stream);
                  first = 0;
 
-                 val &= ~TYPE_FIELD_BITPOS (type, i);
+                 val &= ~TYPE_FIELD_ENUMVAL (type, i);
                  fputs_filtered (TYPE_FIELD_NAME (type, i), stream);
                }
            }
@@ -515,7 +514,7 @@ generic_val_print (struct type *type, const gdb_byte *valaddr,
       type_print (type, "", stream, -1);
       fprintf_filtered (stream, "} ");
       /* Try to print what function it points to, and its address.  */
-      print_address_demangle (gdbarch, address, stream, demangle);
+      print_address_demangle (options, gdbarch, address, stream, demangle);
       break;
 
     case TYPE_CODE_BOOL:
@@ -1501,10 +1500,10 @@ print_char_chars (struct ui_file *stream, struct type *type,
    stream STREAM.  */
 
 void
-print_function_pointer_address (struct gdbarch *gdbarch,
+print_function_pointer_address (const struct value_print_options *options,
+                               struct gdbarch *gdbarch,
                                CORE_ADDR address,
-                               struct ui_file *stream,
-                               int addressprint)
+                               struct ui_file *stream)
 {
   CORE_ADDR func_addr
     = gdbarch_convert_from_func_ptr_addr (gdbarch, address,
@@ -1512,13 +1511,13 @@ print_function_pointer_address (struct gdbarch *gdbarch,
 
   /* If the function pointer is represented by a description, print
      the address of the description.  */
-  if (addressprint && func_addr != address)
+  if (options->addressprint && func_addr != address)
     {
       fputs_filtered ("@", stream);
       fputs_filtered (paddress (gdbarch, address), stream);
       fputs_filtered (": ", stream);
     }
-  print_address_demangle (gdbarch, func_addr, stream, demangle);
+  print_address_demangle (options, gdbarch, func_addr, stream, demangle);
 }
 
 
This page took 0.026885 seconds and 4 git commands to generate.