From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17798 invoked by alias); 26 Sep 2012 20:44:02 -0000 Received: (qmail 17790 invoked by uid 22791); 26 Sep 2012 20:44:01 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 26 Sep 2012 20:43:42 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q8QKhf4m029684 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 26 Sep 2012 16:43:41 -0400 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q8QKhdkx027386 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 26 Sep 2012 16:43:40 -0400 From: Tom Tromey To: Giuseppe MONTALTO Cc: "Abid\, Hafiz" , "gdb-patches\@sourceware.org" Subject: Re: [PATCH] enhancement of mi_cmd_data_write_memory_bytes for filling memory regions (was [PATCH] new MI command for pattern filling of memory regions) References: <76FE3225DF13124EA2D05B290B624C95E65F2D466E@SAFEX1MAIL1.st.com> <87sjf9rzr0.fsf@fleche.redhat.com> <76FE3225DF13124EA2D05B290B624C95E65FECE356@SAFEX1MAIL1.st.com> <871umsqgu8.fsf@fleche.redhat.com> <76FE3225DF13124EA2D05B290B624C95E65FECE48F@SAFEX1MAIL1.st.com> <87397624b9.fsf@fleche.redhat.com> <76FE3225DF13124EA2D05B290B624C95E662A6921F@SAFEX1MAIL1.st.com> <76FE3225DF13124EA2D05B290B624C95E6632A4256@SAFEX1MAIL1.st.com> <878vcc1s9f.fsf@fleche.redhat.com> <76FE3225DF13124EA2D05B290B624C95E66B003EA8@SAFEX1MAIL1.st.com> Date: Wed, 26 Sep 2012 20:44:00 -0000 In-Reply-To: <76FE3225DF13124EA2D05B290B624C95E66B003EA8@SAFEX1MAIL1.st.com> (Giuseppe MONTALTO's message of "Tue, 18 Sep 2012 17:18:20 +0200") Message-ID: <87wqzgwm4k.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-09/txt/msg00606.txt.bz2 >>>>> "Giuseppe" == Giuseppe MONTALTO writes: Giuseppe> Thanks for your comments: I've reworked the patch taking them Giuseppe> into account. I have also updated it, so that it should now Giuseppe> fit the current HEAD Thanks. Giuseppe> + * mi/mi-main.c (mi_cmd_data_write_memory): additional Giuseppe> + parameter for pattern filling of memory regions Capital "A" in "additional" here. Your patch has a ^M character on each line... Giuseppe> + else Giuseppe> + { Giuseppe> + /* Pattern is equal to count: Giuseppe> + we can just use databuf. */ Giuseppe> + back_to = make_cleanup (xfree, data); Giuseppe> + data = databuf; This makes a cleanup referencing a garbage value of 'data' -- before 'data' is assigned. Giuseppe> + r = target_write_memory (addr, data, count); There was a recent patch to change this line, so you may need to rebase again. Giuseppe> + xfree (databuf); If you fix the above cleanup issue, then this will double-free databuf. Giuseppe> - if (parse->cmd->suppress_notification != NULL) Giuseppe> + if (strncmp (parse->command, "break-", sizeof ("break-") - 1 ) == 0) Giuseppe> { Giuseppe> - make_cleanup_restore_integer (parse->cmd->suppress_notification); Giuseppe> - *parse->cmd->suppress_notification = 1; Giuseppe> + make_cleanup_restore_integer (&mi_suppress_breakpoint_notifications); Giuseppe> + mi_suppress_breakpoint_notifications = 1; Giuseppe> } This looks like an unintentional change. Tom