From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6661 invoked by alias); 5 Feb 2009 22:30:11 -0000 Received: (qmail 6577 invoked by uid 22791); 5 Feb 2009 22:30:09 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from imr2.ericy.com (HELO imr2.ericy.com) (198.24.6.3) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 05 Feb 2009 22:30:02 +0000 Received: from eusrcmw751.eamcs.ericsson.se (eusrcmw751.exu.ericsson.se [138.85.77.51]) by imr2.ericy.com (8.13.1/8.13.1) with ESMTP id n15MTk6g005248; Thu, 5 Feb 2009 16:29:58 -0600 Received: from ecamlmw720.eamcs.ericsson.se ([142.133.1.72]) by eusrcmw751.eamcs.ericsson.se with Microsoft SMTPSVC(6.0.3790.1830); Thu, 5 Feb 2009 16:29:27 -0600 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: Re: MI *stopped versus silent breakpoint Date: Thu, 05 Feb 2009 22:30:00 -0000 Message-ID: <6D19CA8D71C89C43A057926FE0D4ADAA04E1BF6C@ecamlmw720.eamcs.ericsson.se> References: <6D19CA8D71C89C43A057926FE0D4ADAA06CB0F19@ecamlmw720.eamcs.ericsson.se> <6D19CA8D71C89C43A057926FE0D4ADAA04E1BF53@ecamlmw720.eamcs.ericsson.se> <200902051225.41426.vladimir@codesourcery.com> A From: "Marc Khouzam" To: "Vladimir Prus" , 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/msg00049.txt.bz2 Hi, I'm curious as to the motivation behind silent breakpoints. I'm trying to understand why a frontend would need to know of a silent bp hit, but not a user? For instance, in async mode, if a silent bp is used, how would the user ever know it is hit? And if the user need not know, why would a frontend? I do see that a frontend would probably 'hang' if it thought the inferior was running when it wasn't. However, if silent bp are aimed at allowing GDB to resume execution without it being visible to the user/frontend, then we may want to re-think the *stopped event in that case. Again, I fixed it for Eclipse, so this is more of a question towards improving GDB, if needed. Thanks -----Original Message----- From: gdb-owner@sourceware.org on behalf of Vladimir Prus Sent: Thu 2/5/2009 4:35 AM To: gdb@sources.redhat.com Subject: Re: MI *stopped versus silent breakpoint =20 teawater wrote: > On Thu, Feb 5, 2009 at 17:25, Vladimir Prus w= rote: >> 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" breakp= oint >> should generate *stopped, since otherwise frontend will assume the targe= t is >> running. Furthermore, I believe that silent breakpoints, in MI, should b= ehave >> identically to ordinary breakpoints -- as it stands, we print *stopped w= ithout >> frame information. >> >> >> I don't know why a silent breakpoint is used in implementation of revers= e-finish, >> nor do I understand why normal_stop is called in the middle of reverse-f= inish 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_st= op is not >> called on solib load breakpoint). >=20 > 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-f= inish. And if you are going to add some flag to indicate breakpoints used for sing= le-step, you might as well change handle_inferiour_event to do extra reverse step wh= en such breakpoint is hit. - Volodya