From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23027 invoked by alias); 13 May 2013 07:13:02 -0000 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 Received: (qmail 23016 invoked by uid 89); 13 May 2013 07:13:02 -0000 X-Spam-SWARE-Status: No, score=-4.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL autolearn=ham version=3.3.1 Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 13 May 2013 07:13:00 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1UbmwN-00029j-CC from Yao_Qi@mentor.com ; Mon, 13 May 2013 00:12:59 -0700 Received: from SVR-ORW-FEM-03.mgc.mentorg.com ([147.34.97.39]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Mon, 13 May 2013 00:12:58 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.2.247.3; Mon, 13 May 2013 00:12:58 -0700 Message-ID: <51909285.6070008@codesourcery.com> Date: Mon, 13 May 2013 07:13:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Hui Zhu CC: gdb-patches ml Subject: Re: [PATCH] Fix bug 15433 - GDB crashes when using agent dprintf, %s format, and an in-line string References: In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2013-05/txt/msg00424.txt.bz2 On 05/11/2013 01:54 PM, Hui Zhu wrote: > @@ -2302,6 +2302,9 @@ build_target_command_list (struct bp_loc > need to parse the command to bytecodes again. */ > aexpr = parse_cmd_to_aexpr (bl->address, > loc->owner->extra_string); > + if (aexpr == NULL) > + error (_("Agent is not support commands of breakpoint %d."), > + bl->owner->number); > loc->cmd_bytecode = aexpr; > > if (!aexpr) The existing code has considered the situation that we have a NULL bytecode expression. Several lines of code below this line of patch do something, /* If we have a NULL bytecode expression, it means something went wrong or we have a null command expression. */ if (!loc->cmd_bytecode) { null_command_or_parse_error = 1; break; } } } /* If anything failed, then we're not doing target-side commands, and so clean up. */ if (null_command_or_parse_error) Your patch doesn't look right, and probably we need to examine why dprintf breakpoint is not handled well in this part. -- Yao (齐尧)