From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31271 invoked by alias); 22 Apr 2013 09:22:29 -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 31262 invoked by uid 89); 22 Apr 2013 09:22:29 -0000 X-Spam-SWARE-Status: No, score=-4.7 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, 22 Apr 2013 09:22:28 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1UUCx8-0003zC-9c from Hafiz_Abid@mentor.com ; Mon, 22 Apr 2013 02:22:26 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Mon, 22 Apr 2013 02:22:25 -0700 Received: from abidh-ubunto1104 (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server (TLS) id 14.2.247.3; Mon, 22 Apr 2013 10:22:24 +0100 Date: Mon, 22 Apr 2013 14:54:00 -0000 From: "Abid, Hafiz" Subject: Re: [PATCH] Fix for 15072: stopped response missing for reverse-finish To: Andreas Kaufmann CC: "gdb-patches@sourceware.org" References: <5570CCEF7886EE48BAAD632645A58FDA12829B3A@DE02WEMBXB.internal.synopsys.com> In-Reply-To: <5570CCEF7886EE48BAAD632645A58FDA12829B3A@DE02WEMBXB.internal.synopsys.com> (from Andreas.Kaufmann@synopsys.com on Mon Apr 22 08:33:51 2013) Message-ID: <1366622544.3366.0@abidh-ubunto1104> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; delsp=Yes; format=Flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable X-SW-Source: 2013-04/txt/msg00660.txt.bz2 On 22/04/13 08:33:51, Andreas Kaufmann wrote: > Hi! >=20 > The following patch fixes the issue with "*stopped" response missing=20=20 > (for MI interface) when > "reverse-finish" command hits a breakpoint. Please see=20=20 > http://sourceware.org/bugzilla/show_bug.cgi?id=3D15072 > This is quite nasty bug when using reverse debugging with Eclipse.=20=20 > Basically, without "*stopped" > response Eclipse will show state as "running" and the user has to=20=20 > restart the debug session. >=20 > Here is explanation why this change is needed. > GDB code has special handling for "forward finish", since returned=20=20 > value is included in the response: > static void > finish_forward (struct symbol *function, struct frame_info *frame) > { > . . . > add_continuation (tp, finish_command_continuation, cargs, > finish_command_continuation_free_arg); > . . . >=20 > static void > finish_command_continuation (void *arg, int err) > { > . . . > observer_notify_normal_stop (bs, 1 /* print frame */); >=20 > The above is not done (and nor needed) for "reverse-finish". So I=20=20 > added additional > check "execution_direction !=3D EXEC_REVERSE" to ensure that=20=20 > observer_notify_normal_stop() > is called for "reverse-finish" from normal_stop() in gdb/infrun.c. >=20 > Please let me know if you have any comments! >=20 > Thanks, > Andreas Kaufmann > Synopsys Inc >=20 >=20 >=20 > 2013-04-18 Andreas Kaufmann nit: Please add one more space before and after the name. >=20 > PR gdb/15072 > * infrun.c (normal_stop): Ensure "observer_notify_normal_stop" is=20= =20 > called > when "reverse-finish" command hits a breakpoint. >=20 >=20 > Index: infrun.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /cvs/src/src/gdb/infrun.c,v > retrieving revision 1.577 > diff -u -p -r1.577 infrun.c > --- infrun.c 13 Mar 2013 18:34:53 -0000 1.577 > +++ infrun.c 18 Apr 2013 13:45:09 -0000 > @@ -6149,7 +6149,8 @@ done: > || (!(inferior_thread ()->step_multi > && inferior_thread ()->control.stop_step) > && !(inferior_thread ()->control.stop_bpstat > - && inferior_thread=20=20 > ()->control.proceed_to_finish) > + && inferior_thread ()->control.proceed_to_finish > + && execution_direction !=3D EXEC_REVERSE) > && !inferior_thread ()->control.in_infcall)) > { > if (!ptid_equal (inferior_ptid, null_ptid)) >=20 >=20 >=20