From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 108819 invoked by alias); 12 Aug 2019 19:23:20 -0000 Mailing-List: contact gdb-testers-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-testers-owner@sourceware.org Received: (qmail 108597 invoked by uid 89); 12 Aug 2019 19:23:20 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-15.4 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: kwanyin.sergiodj.net Received: from kwanyin.sergiodj.net (HELO kwanyin.sergiodj.net) (158.69.185.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 12 Aug 2019 19:23:17 +0000 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [binutils-gdb] Remove gdb workaround from readline/xfree.c From: gdb-buildbot@sergiodj.net To: gdb-testers@sourceware.org Message-Id: Date: Mon, 12 Aug 2019 19:30:00 -0000 X-SW-Source: 2019-q3/txt/msg02327.txt.bz2 *** TEST RESULTS FOR COMMIT c15a79c78cc0111296b487de3fa59365f13df3bc *** commit c15a79c78cc0111296b487de3fa59365f13df3bc Author: Tom Tromey AuthorDate: Sun Oct 7 15:29:57 2018 -0600 Commit: Tom Tromey CommitDate: Mon Aug 12 10:57:56 2019 -0600 Remove gdb workaround from readline/xfree.c 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 * Makefile.in (xfree.o): Don't depend on readline.h. * xfree.c (xfree): Remove gdb workaround. * xmalloc.h (xfree): Remove #define. diff --git a/readline/ChangeLog.gdb b/readline/ChangeLog.gdb index cecdc5ed9a..69378807e8 100644 --- a/readline/ChangeLog.gdb +++ b/readline/ChangeLog.gdb @@ -1,5 +1,11 @@ 2019-08-12 Tom Tromey + * 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 + * emacs_keymap.c: Remove gdb workaround. 2018-08-12 Tom Tromey diff --git a/readline/Makefile.in b/readline/Makefile.in index 0916d33e06..1adfc286b8 100644 --- a/readline/Makefile.in +++ b/readline/Makefile.in @@ -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 diff --git a/readline/xfree.c b/readline/xfree.c index d3af7d9aef..37a81e6c23 100644 --- a/readline/xfree.c +++ b/readline/xfree.c @@ -31,10 +31,7 @@ # include "ansi_stdlib.h" #endif /* HAVE_STDLIB_H */ -#include - #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); } diff --git a/readline/xmalloc.h b/readline/xmalloc.h index 0fb6a1960e..f40d7a596a 100644 --- a/readline/xmalloc.h +++ b/readline/xmalloc.h @@ -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 *));