Remove gdb workaround from readline/xfree.c
authorTom Tromey <tom@tromey.com>
Sun, 7 Oct 2018 21:29:57 +0000 (15:29 -0600)
committerTom Tromey <tom@tromey.com>
Mon, 12 Aug 2019 16:57:56 +0000 (10:57 -0600)
There is a gdb-local patch to deal with interrupts during completion.
The original thread adding this patch is here:

https://sourceware.org/ml/gdb-patches/2011-06/msg00147.html

I believe readline now implements the approach suggested by
Chet Ramey:

https://sourceware.org/ml/gdb-patches/2011-06/msg00493.html

So, I believe this patch can be removed.

readline/ChangeLog.gdb
2018-10-07  Tom Tromey  <tom@tromey.com>

* Makefile.in (xfree.o): Don't depend on readline.h.
* xfree.c (xfree): Remove gdb workaround.
* xmalloc.h (xfree): Remove #define.

readline/ChangeLog.gdb
readline/Makefile.in
readline/xfree.c
readline/xmalloc.h

index cecdc5ed9acb905c89e143fef36eb44c9ad64c76..69378807e8e8dc6a13e997025eaae7ea159fb43e 100644 (file)
@@ -1,5 +1,11 @@
 2019-08-12  Tom Tromey  <tom@tromey.com>
 
+       * Makefile.in (xfree.o): Don't depend on readline.h.
+       * xfree.c (xfree): Remove gdb workaround.
+       * xmalloc.h (xfree): Remove #define.
+
+2018-08-12  Tom Tromey  <tom@tromey.com>
+
        * emacs_keymap.c: Remove gdb workaround.
 
 2018-08-12  Tom Tromey  <tom@tromey.com>
index 0916d33e065c4bd4a65007705aa8b210d9f25562..1adfc286b8134fa8f0bc335f19f1444b400ca007 100644 (file)
@@ -437,7 +437,7 @@ vi_mode.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
 vi_mode.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
 vi_mode.o: history.h ansi_stdlib.h rlstdc.h
 xfree.o: ${BUILD_DIR}/config.h
-xfree.o: ansi_stdlib.h readline.h
+xfree.o: ansi_stdlib.h
 xmalloc.o: ${BUILD_DIR}/config.h
 xmalloc.o: ansi_stdlib.h
 
index d3af7d9aef0b9a420dc9d50faaf6041ab9b016f4..37a81e6c236cbd2d4e8f12951cf32ef8b1942410 100644 (file)
 #  include "ansi_stdlib.h"
 #endif /* HAVE_STDLIB_H */
 
-#include <stdio.h>
-
 #include "xmalloc.h"
-#include "readline.h"
 
 /* **************************************************************** */
 /*                                                                 */
@@ -48,10 +45,6 @@ void
 xfree (string)
      PTR_T string;
 {
-  /* Leak a bit.  */
-  if (RL_ISSTATE(RL_STATE_SIGHANDLER))
-    return;
-
   if (string)
     free (string);
 }
index 0fb6a1960e134c64c8999af2aad3028192b16570..f40d7a596a287c3024598f47f769b0694eaf44a5 100644 (file)
@@ -38,9 +38,6 @@
 
 #endif /* !PTR_T */
 
-/* xmalloc and xrealloc should be also protected from RL_STATE_SIGHANDLER.  */
-#define xfree xfree_readline
-
 extern PTR_T xmalloc PARAMS((size_t));
 extern PTR_T xrealloc PARAMS((void *, size_t));
 extern void xfree PARAMS((void *));
This page took 0.027251 seconds and 4 git commands to generate.