* valprint.c: ... here. Make non-static.
* m2-valprint.c (print_function_pointer_address): Remove.
* valprint.h (print_function_pointer_address): Declare.
+2012-03-01 Tom Tromey <tromey@redhat.com>
+
+ * c-valprint.c (print_function_pointer_address): Move...
+ * valprint.c: ... here. Make non-static.
+ * m2-valprint.c (print_function_pointer_address): Remove.
+ * valprint.h (print_function_pointer_address): Declare.
+
2012-03-01 Joel Brobecker <brobecker@adacore.com>
* NEWS: Document the fact that one can provide a condition when
#include "target.h"
\f
-/* Print function pointer with inferior address ADDRESS onto stdio
- stream STREAM. */
-
-static void
-print_function_pointer_address (struct gdbarch *gdbarch,
- CORE_ADDR address,
- struct ui_file *stream,
- int addressprint)
-{
- CORE_ADDR func_addr
- = gdbarch_convert_from_func_ptr_addr (gdbarch, address,
- ¤t_target);
-
- /* If the function pointer is represented by a description, print
- the address of the description. */
- if (addressprint && func_addr != address)
- {
- fputs_filtered ("@", stream);
- fputs_filtered (paddress (gdbarch, address), stream);
- fputs_filtered (": ", stream);
- }
- print_address_demangle (gdbarch, func_addr, stream, demangle);
-}
-
-
/* A helper for c_textual_element_type. This checks the name of the
typedef. This is bogus but it isn't apparent that the compiler
provides us the help we may need. */
int len);
-/* Print function pointer with inferior address ADDRESS onto stdio
- stream STREAM. */
-
-static void
-print_function_pointer_address (struct gdbarch *gdbarch, CORE_ADDR address,
- struct ui_file *stream, int addressprint)
-{
- CORE_ADDR func_addr = gdbarch_convert_from_func_ptr_addr (gdbarch, address,
- ¤t_target);
-
- /* If the function pointer is represented by a description, print the
- address of the description. */
- if (addressprint && func_addr != address)
- {
- fputs_filtered ("@", stream);
- fputs_filtered (paddress (gdbarch, address), stream);
- fputs_filtered (": ", stream);
- }
- print_address_demangle (gdbarch, func_addr, stream, demangle);
-}
-
/* get_long_set_bounds - assigns the bounds of the long set to low and
high. */
}
}
+/* Print function pointer with inferior address ADDRESS onto stdio
+ stream STREAM. */
+
+void
+print_function_pointer_address (struct gdbarch *gdbarch,
+ CORE_ADDR address,
+ struct ui_file *stream,
+ int addressprint)
+{
+ CORE_ADDR func_addr
+ = gdbarch_convert_from_func_ptr_addr (gdbarch, address,
+ ¤t_target);
+
+ /* If the function pointer is represented by a description, print
+ the address of the description. */
+ if (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 on STREAM using the given OPTIONS the index for the element
at INDEX of an array whose index type is INDEX_TYPE. */
extern void print_char_chars (struct ui_file *, struct type *,
const gdb_byte *, unsigned int, enum bfd_endian);
+extern void print_function_pointer_address (struct gdbarch *gdbarch,
+ CORE_ADDR address,
+ struct ui_file *stream,
+ int addressprint);
+
int read_string (CORE_ADDR addr, int len, int width, unsigned int fetchlimit,
enum bfd_endian byte_order, gdb_byte **buffer,
int *bytes_read);