From 8838afaf75d0c3fcf43e246e09664219bc5bfc74 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 20 Feb 2014 14:05:32 -0700 Subject: [PATCH] mark *_varobj_ops as "extern" The AIX linker pointed out that gdb had multiple definitions of the various *_varobj_ops objects. This patch fixes the problem by marking the declarations as "extern" in varobj.h. Tested by rebuilding on x86-64 Fedora 18 and on AIX. 2014-02-20 Tom Tromey * varobj.h (c_varobj_ops, cplus_varobj_ops, java_varobj_ops) (ada_varobj_ops): Mark "extern". --- gdb/ChangeLog | 5 +++++ gdb/varobj.h | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4ba4d28fa28..b9a46eb70ef 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2014-02-20 Tom Tromey + + * varobj.h (c_varobj_ops, cplus_varobj_ops, java_varobj_ops) + (ada_varobj_ops): Mark "extern". + 2014-02-20 Tom Tromey * dbxread.c (read_dbx_symtab): Remove last_o_file_start. diff --git a/gdb/varobj.h b/gdb/varobj.h index e4007bffd1d..1199e0b024c 100644 --- a/gdb/varobj.h +++ b/gdb/varobj.h @@ -215,10 +215,10 @@ struct lang_varobj_ops struct type *new_type); }; -const struct lang_varobj_ops c_varobj_ops; -const struct lang_varobj_ops cplus_varobj_ops; -const struct lang_varobj_ops java_varobj_ops; -const struct lang_varobj_ops ada_varobj_ops; +extern const struct lang_varobj_ops c_varobj_ops; +extern const struct lang_varobj_ops cplus_varobj_ops; +extern const struct lang_varobj_ops java_varobj_ops; +extern const struct lang_varobj_ops ada_varobj_ops; #define default_varobj_ops c_varobj_ops /* API functions */ -- 2.30.2