This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[FYI] 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  <tromey@redhat.com>

	* 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/varobj.h b/gdb/varobj.h
index e4007bf..1199e0b 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 */
-- 
1.8.1.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]