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]

[commit HEAD+BRANCH] Extraneous NULL in linux_target_ops when HAVE_LINUX_BTRACE not defined


Hello,

This fixes the followin error when HAVE_LINUX_BTRACE is not defined:

    linux-low.c:5943: error: excess elements in struct initializer
    linux-low.c:5943: error: (near initialization for 'linux_target_ops')

Indeed, there was one NULL too many:

    #ifdef HAVE_LINUX_BTRACE
      linux_supports_btrace,
      linux_low_enable_btrace,
      linux_disable_btrace,
      linux_low_read_btrace,
    #else
      NULL,
      NULL,
      NULL,
      NULL,
      NULL,
    #endif

Fixed thusly.

gdb/gdbserver/ChangeLog:

        * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
        Remove extraneous NULL element.

Tested by rebuilding gdbserver on that version of GNU/Linux
where HAVE_LINUX_BTRACE is not defined (ELinOS 5.1).

Checked in HEAD. I will port the patch to the branch as well
momentarily.

---
 gdb/gdbserver/ChangeLog   |    5 +++++
 gdb/gdbserver/linux-low.c |    1 -
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index a7289fd..057133f 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,8 @@
+2013-03-13  Joel Brobecker  <brobecker@adacore.com>
+
+	* linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
+	Remove extraneous NULL element.
+
 2013-03-13  Yao Qi  <yao@codesourcery.com>
 
 	* tracepoint.c (traceframe_read_tsv): Look for the last matched
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index b5084c9..523926d 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -5940,7 +5940,6 @@ static struct target_ops linux_target_ops = {
   NULL,
   NULL,
   NULL,
-  NULL,
 #endif
 };
 
-- 
1.7.10.4


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