From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12251 invoked by alias); 25 Mar 2013 03:46:36 -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 12229 invoked by uid 89); 25 Mar 2013 03:46:24 -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-f171.google.com (HELO mail-ob0-f171.google.com) (209.85.214.171) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 25 Mar 2013 03:46:21 +0000 Received: by mail-ob0-f171.google.com with SMTP id x4so5578225obh.30 for ; Sun, 24 Mar 2013 20:46:19 -0700 (PDT) X-Received: by 10.60.1.34 with SMTP id 2mr9504759oej.47.1364183179785; Sun, 24 Mar 2013 20:46:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.60.13.133 with HTTP; Sun, 24 Mar 2013 20:45:38 -0700 (PDT) In-Reply-To: <514EEB43.6040101@redhat.com> References: <514E8D6C.2010606@mentor.com> <514EEB43.6040101@redhat.com> From: Hui Zhu Date: Mon, 25 Mar 2013 07:54:00 -0000 Message-ID: Subject: Re: [PATCH] Fix create pending breakpoint handle extra_string issue if not parse_condition_and_thread To: Keith Seitz Cc: Hui Zhu , gdb-patches ml Content-Type: text/plain; charset=ISO-8859-1 X-SW-Source: 2013-03/txt/msg00909.txt.bz2 Hi Keith, Thanks for your review. On Sun, Mar 24, 2013 at 8:02 PM, Keith Seitz wrote: > On 03/23/2013 10:21 PM, Hui Zhu wrote: > >> -break-insert -f -c k>0 "pendfunc1 if k == 0" >> &"Function \"pendfunc1\" not defined.\n" >> >> ^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="",pending="pendfunc1 >> if k == 0",cond="k>0",times="0",original-location="pendfunc1 if k == 0"} > > > IMO, this should not be permitted at all. Two reasons: > > 1) We could argue about which condition is correct to keep. > 2) The MI specification does not say anything about permitting this type of > usage. [I would therefore argue it is illegal.] > > Likewise for "thread" (and "task", but there is no task parameter for > create_breakpoint for some reason). > > Ideally an error should be issued when the breakpoint is set: > > -break-insert -c "argc > 1" "main if argc > 2" > ^error,msg="Garbage 'if argc > 2' at end of command" I am sorry that what you care about is the issue that affect the mi. 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. So if you don't mind, please let us focus on create_breakpoint first. And we also can do some work in: -break-insert -c "argc > 1" "main if argc > 2" > ^error,msg="Garbage 'if argc > 2' at end of command" > > Please remember to submit a test case (or cases) with patches whenever > possible. Thanks for you mind. I will do it later. Best, Hui > > Keith