From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31664 invoked by alias); 5 Feb 2009 15:43:27 -0000 Received: (qmail 31656 invoked by uid 22791); 5 Feb 2009 15:43:26 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from ti-out-0910.google.com (HELO ti-out-0910.google.com) (209.85.142.186) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 05 Feb 2009 15:43:20 +0000 Received: by ti-out-0910.google.com with SMTP id a6so397959tib.18 for ; Thu, 05 Feb 2009 07:43:16 -0800 (PST) MIME-Version: 1.0 Received: by 10.110.61.18 with SMTP id j18mr921221tia.17.1233848595950; Thu, 05 Feb 2009 07:43:15 -0800 (PST) In-Reply-To: References: <6D19CA8D71C89C43A057926FE0D4ADAA06CB0F19@ecamlmw720.eamcs.ericsson.se> <6D19CA8D71C89C43A057926FE0D4ADAA04E1BF53@ecamlmw720.eamcs.ericsson.se> <200902051225.41426.vladimir@codesourcery.com> Date: Thu, 05 Feb 2009 15:43:00 -0000 Message-ID: Subject: Re: MI *stopped versus silent breakpoint From: teawater To: Vladimir Prus , Michael Snyder Cc: gdb@sources.redhat.com, Pedro Alves Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-02/txt/msg00041.txt.bz2 On Thu, Feb 5, 2009 at 17:35, Vladimir Prus wrote: > teawater wrote: > >> On Thu, Feb 5, 2009 at 17:25, Vladimir Prus wrote: >>> On Thursday 05 February 2009 11:09:56 teawater wrote: >>>> Hi Marc, >>>> >>>> I read the source code in infcmd.c:finish_backward. >>>> This is because function "proceed" will be call twice in >>>> "finish_backward". Maybe MI output depend some >>>> observer_notify_target_xxx function. So it output twice. >>> >>> The *stopped notification is output as result of call to >>> >>> observer_notify_normal_stop >>> >>> which is done in infrun.c:normal_stop. I do believe that "silent" breakpoint >>> should generate *stopped, since otherwise frontend will assume the target is >>> running. Furthermore, I believe that silent breakpoints, in MI, should behave >>> identically to ordinary breakpoints -- as it stands, we print *stopped without >>> frame information. >>> >>> >>> I don't know why a silent breakpoint is used in implementation of reverse-finish, >>> nor do I understand why normal_stop is called in the middle of reverse-finish when >>> stopping on that temporary breakpoint. I think the first fix it to make reverse-finish >>> not to call normal_stop on that internal breakpoint (just like normal_stop is not >>> called on solib load breakpoint). >> >> The normal_stop is called twice in reverse-finish because >> finish_backward call "proceed" twice, "proceed" call normal_stop. > > Then I presume you get to change that. I don't see any way we can overload > 'silent' breakpoint to output something in most cases, except for reverse-finish. > And if you are going to add some flag to indicate breakpoints used for single-step, > you might as well change handle_inferiour_event to do extra reverse step when such > breakpoint is hit. > I am not very clear about function "finish_backward". But maybe I can try with it. Michael, sorry for forget mail you about this issue, do you have some idea with it? Hui