]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Unbreak mips native build
authorYao Qi <yao@codesourcery.com>
Mon, 24 Feb 2014 04:03:05 +0000 (12:03 +0800)
committerYao Qi <yao@codesourcery.com>
Mon, 24 Feb 2014 04:03:05 +0000 (12:03 +0800)
When I build mips native gdb today, I get the follow error,

../../../git/gdb/mips-linux-nat.c: In function '_initialize_mips_linux_nat':
../../../git/gdb/mips-linux-nat.c:792:15: error: assignment from incompatible pointer type [-Werror]
cc1: all warnings being treated as errors

It looks an oversight of recent target_ops delegation patches.  This
patch is to fix the build error.

gdb:

2014-02-24  Yao Qi  <yao@codesourcery.com>

* mips-linux-nat.c (super_close): Update its type.
(mips_linux_close): Pass 'self' to super_close.

gdb/ChangeLog
gdb/mips-linux-nat.c

index 01be0a305550ab725c2831cb969ec0abf015407b..1135fdcdf719eac218f4df2ac763cb8251e093ca 100644 (file)
@@ -1,3 +1,8 @@
+2014-02-24  Yao Qi  <yao@codesourcery.com>
+
+       * mips-linux-nat.c (super_close): Update its type.
+       (mips_linux_close): Pass 'self' to super_close.
+
 2014-02-24  Yao Qi  <yao@codesourcery.com>
 
        * target.h (TARGET_XFER_STATUS_ERROR_P): Remove.
index 4c28733a2b8bd53e1f3e0d221761562235ae77b5..5594e108b8e45e90683f1052f22727989d133c89 100644 (file)
@@ -63,7 +63,7 @@ static void (*super_fetch_registers) (struct target_ops *,
 static void (*super_store_registers) (struct target_ops *,
                                      struct regcache *, int);
 
-static void (*super_close) (void);
+static void (*super_close) (struct target_ops *);
 
 /* Map gdb internal register number to ptrace ``address''.
    These ``addresses'' are normally defined in <asm/ptrace.h>. 
@@ -764,7 +764,7 @@ mips_linux_close (struct target_ops *self)
   current_watches = NULL;
 
   if (super_close)
-    super_close ();
+    super_close (self);
 }
 
 void _initialize_mips_linux_nat (void);