+2019-10-07 Christian Biesinger <cbiesinger@google.com>
+
+ * c-lang.h (vtbl_ptr_name): Declare.
+ * cp-valprint.c (vtbl_ptr_name): Remove "extern" now that we get
+ it from the header.
+ * stabsread.c (define_symbol): Remove declaration of vtbl_ptr_name.
+
2019-10-07 Christian Biesinger <cbiesinger@google.com>
* charset.c (your_gdb_wchar_t_is_bogus): Replace with a
const struct value_print_options *,
struct type **, int);
+/* gcc-2.6 or later (when using -fvtable-thunks)
+ emits a unique named type for a vtable entry.
+ Some gdb code depends on that specific name. */
+
+extern const char vtbl_ptr_name[];
+
extern int cp_is_vtbl_ptr_type (struct type *);
extern int cp_is_vtbl_member (struct type *);
/* GCC versions after 2.4.5 use this. */
-extern const char vtbl_ptr_name[] = "__vtbl_ptr_type";
+const char vtbl_ptr_name[] = "__vtbl_ptr_type";
/* Return truth value for assertion that TYPE is of the type
"pointer to virtual function". */
#include "gdb-demangle.h"
#include "language.h"
#include "target-float.h"
+#include "c-lang.h"
#include "cp-abi.h"
#include "cp-support.h"
#include <ctype.h>
if (TYPE_NAME (SYMBOL_TYPE (sym)) == NULL)
{
- /* gcc-2.6 or later (when using -fvtable-thunks)
- emits a unique named type for a vtable entry.
- Some gdb code depends on that specific name. */
- extern const char vtbl_ptr_name[];
-
if ((TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_PTR
&& strcmp (SYMBOL_LINKAGE_NAME (sym), vtbl_ptr_name))
|| TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_FUNC)