From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11112 invoked by alias); 28 Jan 2004 01:36:33 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 11105 invoked from network); 28 Jan 2004 01:36:32 -0000 Received: from unknown (HELO localhost.redhat.com) (66.187.230.200) by sources.redhat.com with SMTP; 28 Jan 2004 01:36:32 -0000 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id DB19B2B8F; Tue, 27 Jan 2004 20:33:04 -0500 (EST) Message-ID: <40171150.5080708@gnu.org> Date: Wed, 28 Jan 2004 01:36:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030820 MIME-Version: 1.0 To: Paul Hilfinger Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] breakpoint.c: Avoid double freeing in breakpoint_re_set_one References: <20040113100600.42C1FF2D70@nile.gnat.com> Content-Type: multipart/mixed; boundary="------------090603060306090609060106" X-SW-Source: 2004-01/txt/msg00713.txt.bz2 This is a multi-part message in MIME format. --------------090603060306090609060106 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 384 > Here is a follow-up on my earlier patch. I found a couple of other > instances of potential double freeing in the same routine. You wouldn't have a test case - at least something that causes this code to go through the motions? That way on systems with pedantic memory managers there'd bee some sort of error. Anyway, I've committed the attached (slightly tweaked). Andrew --------------090603060306090609060106 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 3176 2004-01-27 Andrew Cagney * source.c (ambiguous_line_spec): Delete undefined declaration. * m32r-rom.c (m32r_set_board_address): Delete unused function. (m32r_set_server_address, m32r_set_download_path): Ditto. * remote-fileio.c (remote_fileio_to_fio_int): Ditto. Index: m32r-rom.c =================================================================== RCS file: /cvs/src/src/gdb/m32r-rom.c,v retrieving revision 1.13 diff -u -r1.13 m32r-rom.c --- m32r-rom.c 1 Aug 2003 21:14:33 -0000 1.13 +++ m32r-rom.c 27 Jan 2004 23:18:57 -0000 @@ -398,63 +398,6 @@ monitor_open (args, &mon2000_cmds, from_tty); } -/* Function: set_board_address - Tell the BootOne monitor what it's ethernet IP address is. */ - -static void -m32r_set_board_address (char *args, int from_tty) -{ - int resp_len; - char buf[1024]; - - if (args && *args) - { - monitor_printf ("ulip %s\n", args); - resp_len = monitor_expect_prompt (buf, sizeof (buf)); - /* now parse the result for success */ - } - else - error ("Requires argument (IP address for M32R-EVA board)"); -} - -/* Function: set_server_address - Tell the BootOne monitor what gdb's ethernet IP address is. */ - -static void -m32r_set_server_address (char *args, int from_tty) -{ - int resp_len; - char buf[1024]; - - if (args && *args) - { - monitor_printf ("uhip %s\n", args); - resp_len = monitor_expect_prompt (buf, sizeof (buf)); - /* now parse the result for success */ - } - else - error ("Requires argument (IP address of GDB's host computer)"); -} - -/* Function: set_download_path - Tell the BootOne monitor the default path for downloadable SREC files. */ - -static void -m32r_set_download_path (char *args, int from_tty) -{ - int resp_len; - char buf[1024]; - - if (args && *args) - { - monitor_printf ("up %s\n", args); - resp_len = monitor_expect_prompt (buf, sizeof (buf)); - /* now parse the result for success */ - } - else - error ("Requires argument (default path for downloadable SREC files)"); -} - static void m32r_upload_command (char *args, int from_tty) { Index: remote-fileio.c =================================================================== RCS file: /cvs/src/src/gdb/remote-fileio.c,v retrieving revision 1.5 diff -u -r1.5 remote-fileio.c --- remote-fileio.c 30 Dec 2003 06:52:09 -0000 1.5 +++ remote-fileio.c 27 Jan 2004 23:18:57 -0000 @@ -364,12 +364,6 @@ } static void -remote_fileio_to_fio_int (long num, fio_int_t fnum) -{ - remote_fileio_to_be ((LONGEST) num, (char *) fnum, 4); -} - -static void remote_fileio_to_fio_uint (long num, fio_uint_t fnum) { remote_fileio_to_be ((LONGEST) num, (char *) fnum, 4); Index: source.c =================================================================== RCS file: /cvs/src/src/gdb/source.c,v retrieving revision 1.48 diff -u -r1.48 source.c --- source.c 19 Jan 2004 01:20:11 -0000 1.48 +++ source.c 27 Jan 2004 23:18:57 -0000 @@ -80,8 +80,6 @@ static void line_info (char *, int); -static void ambiguous_line_spec (struct symtabs_and_lines *); - static void source_info (char *, int); static void show_directories (char *, int); --------------090603060306090609060106--