From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25694 invoked by alias); 25 Mar 2013 14:40:13 -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 25637 invoked by uid 89); 25 Mar 2013 14:40:06 -0000 X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from mail-ob0-f181.google.com (HELO mail-ob0-f181.google.com) (209.85.214.181) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 25 Mar 2013 14:39:54 +0000 Received: by mail-ob0-f181.google.com with SMTP id ni5so6005671obc.26 for ; Mon, 25 Mar 2013 07:39:52 -0700 (PDT) X-Received: by 10.60.20.35 with SMTP id k3mr11348268oee.119.1364222392862; Mon, 25 Mar 2013 07:39:52 -0700 (PDT) MIME-Version: 1.0 Received: by 10.60.13.133 with HTTP; Mon, 25 Mar 2013 07:39:12 -0700 (PDT) In-Reply-To: <515051B8.3010801@codesourcery.com> References: <514E8D6C.2010606@mentor.com> <514EEB43.6040101@redhat.com> <515051B8.3010801@codesourcery.com> From: Hui Zhu Date: Mon, 25 Mar 2013 16:27:00 -0000 Message-ID: Subject: Re: [PATCH] Fix create pending breakpoint handle extra_string issue if not parse_condition_and_thread To: Yao Qi Cc: Keith Seitz , Hui Zhu , gdb-patches ml Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2013-03/txt/msg00935.txt.bz2 On Mon, Mar 25, 2013 at 9:31 PM, Yao Qi wrote: > On 03/25/2013 11:45 AM, Hui Zhu wrote: >> >> But my patch is for the issue inside the function create_breakpoint. >> I post the mi commands to show the issue is because it call >> create_breakpoint with parse_condition_and_thread is 0 and easy to >> show how it can affect the behavior of a pending breakpoint. >> I think this issue also affect other functions that call >> create_breakpoint with parse_condition_and_thread is 0. > > > Hui, > The comment of create_breakpoint says something, > > /* Set a breakpoint. This function is shared between CLI and MI > functions for setting a breakpoint. This function has two major > modes of operations, selected by the PARSE_CONDITION_AND_THREAD > parameter. If non-zero, the function will parse arg, extracting > breakpoint location, address and thread. Otherwise, ARG is just > the location of breakpoint, with condition and thread specified by > the COND_STRING and THREAD parameters. If INTERNAL is non-zero, > the breakpoint number will be allocated from the internal > breakpoint count. Returns true if any breakpoint was created; > false otherwise. */ > > in other words, it is invalid to put condition into ARG and set > parse_condition_and_thread 0. Yao, thanks for your remind. And my patch just to make create_breakpoint handle pending breakpoint follow this comments, right? :) *If non-zero, the function will parse arg, extracting breakpoint location, address and thread. * So if it is zero, the function should get arg and anything from argument of this function, right? But "-break-insert -f -c k>0 "pendfunc1 if k =3D=3D 0" " is a example that it is zero, and GDB get condition from arg, it is a right behavior? And extra_string just be dropped even if parse_condition_and_thread is non-zero, is that right? Thanks, Hui > > -- > Yao (=E9=BD=90=E5=B0=A7)