This is the mail archive of the gdb-cvs@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]

[binutils-gdb] More redefinition errors in C++ mode


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=bf36a1e7df75608045be60a5d16a1df207df3464

commit bf36a1e7df75608045be60a5d16a1df207df3464
Author: Pedro Alves <palves@redhat.com>
Date:   Thu Feb 26 14:03:47 2015 +0000

    More redefinition errors in C++ mode
    
    In C++, we can't forward declare objects like in C.  The compiler
    complains about symbol redefinition.  Most cases of this were fixed in
    e36122e9, but dtrace probes introduced a new one meanwhile.  This
    patch fixes it the same way e36122e9 fixed the others.
    
    gdb/
    2015-02-27  Pedro Alves  <palves@redhat.com>
    
    	* dtrace-probe.c (dtrace_probe_ops): Make extern.

Diff:
---
 gdb/ChangeLog      | 4 ++++
 gdb/dtrace-probe.c | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 81ee82c..32851c9 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
 2015-02-27  Pedro Alves  <palves@redhat.com>
 
+	* dtrace-probe.c (dtrace_probe_ops): Make extern.
+
+2015-02-27  Pedro Alves  <palves@redhat.com>
+
 	* common/common-exceptions.h (exception_none): Declare.
 	* common/common-exceptions.c (exception_none): Moved from
 	exceptions.c.
diff --git a/gdb/dtrace-probe.c b/gdb/dtrace-probe.c
index b244449..491d853 100644
--- a/gdb/dtrace-probe.c
+++ b/gdb/dtrace-probe.c
@@ -43,7 +43,7 @@
 
 /* Forward declaration.  */
 
-static const struct probe_ops dtrace_probe_ops;
+extern const struct probe_ops dtrace_probe_ops;
 
 /* The following structure represents a single argument for the
    probe.  */
@@ -865,7 +865,7 @@ dtrace_disable_probe (struct probe *probe)
 
 /* DTrace probe_ops.  */
 
-static const struct probe_ops dtrace_probe_ops =
+const struct probe_ops dtrace_probe_ops =
 {
   dtrace_probe_is_linespec,
   dtrace_get_probes,


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