From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21193 invoked by alias); 14 Mar 2008 15:19:19 -0000 Received: (qmail 20705 invoked by uid 22791); 14 Mar 2008 15:19:18 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 14 Mar 2008 15:18:38 +0000 Received: (qmail 11675 invoked from network); 14 Mar 2008 15:18:36 -0000 Received: from unknown (HELO orlando) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 14 Mar 2008 15:18:36 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: In async mode, use target_stop to stop the inferior Date: Fri, 14 Mar 2008 15:19:00 -0000 User-Agent: KMail/1.9.6 (enterprise 0.20070907.709405) References: <200803140802.01625.pedro@codesourcery.com> <20080314143845.GB18511@caradoc.them.org> In-Reply-To: <20080314143845.GB18511@caradoc.them.org> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_Wdp2H6C2yQ15OHl" Message-Id: <200803141518.46530.pedro@codesourcery.com> 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 X-SW-Source: 2008-03/txt/msg00175.txt.bz2 --Boundary-00=_Wdp2H6C2yQ15OHl Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Content-length: 1116 A Friday 14 March 2008 14:38:45, Daniel Jacobowitz wrote: > On Fri, Mar 14, 2008 at 08:02:01AM +0000, Pedro Alves wrote: > > We do have a target method for this now. Obviouly for every > > async target other than "target (extended-)async", this wasn't > > working. > > > > Installed as obvious (after testing with a local gdbserver with > > the testsuite and manually). > > Sorry, but I don't think this is right. Or else it deserves a better > explanation :-) async_remote_interrupt_twice didn't stop the target; > it was used to escape from a hung remote target (see interrupt_query). > > You can trace the twisty path that got here through > sigint_remote_twice_token. I'm not sure what INF_QUIT_REQ should do, > or if it's necessary - I find inferior_event_handler a bit weird. Uuugh, I'm the one who has to say sorry. In fact, the twisted maze that got me to needing this was a local hack I used to have that is no longer needed. My patch was definitelly wrong. I reverted the patch with the attached. (I even had missed Makefile.in that's why you don't see it in this patch. Sigh...) -- Pedro Alves --Boundary-00=_Wdp2H6C2yQ15OHl Content-Type: text/x-diff; charset="iso-8859-1"; name="target_stop_revert.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="target_stop_revert.diff" Content-length: 1945 2008-03-14 Pedro Alves revert: 2008-03-14 Pedro Alves * inf-loop.c (inferior_event_handler): Don't include remote.h. Call target_stop in the INF_QUIT_REQ case. * Makefile.in (inf-loop.o): Update. --- gdb/Makefile.in | 2 +- gdb/inf-loop.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) Index: src/gdb/Makefile.in =================================================================== --- src.orig/gdb/Makefile.in 2008-03-14 15:09:18.000000000 +0000 +++ src/gdb/Makefile.in 2008-03-14 15:09:34.000000000 +0000 @@ -2293,7 +2293,7 @@ infcmd.o: infcmd.c $(defs_h) $(gdb_strin $(solib_h) $(gdb_assert_h) $(observer_h) $(target_descriptions_h) \ $(user_regs_h) inf-loop.o: inf-loop.c $(defs_h) $(inferior_h) $(target_h) $(event_loop_h) \ - $(event_top_h) $(inf_loop_h) $(exceptions_h) + $(event_top_h) $(inf_loop_h) $(remote_h) $(exceptions_h) inflow.o: inflow.c $(defs_h) $(frame_h) $(inferior_h) $(command_h) \ $(serial_h) $(terminal_h) $(target_h) $(gdbthread_h) $(gdb_string_h) \ $(inflow_h) $(gdb_select_h) Index: src/gdb/inf-loop.c =================================================================== --- src.orig/gdb/inf-loop.c 2008-03-14 15:09:15.000000000 +0000 +++ src/gdb/inf-loop.c 2008-03-14 15:09:34.000000000 +0000 @@ -23,6 +23,7 @@ #include "event-loop.h" #include "event-top.h" #include "inf-loop.h" +#include "remote.h" #include "exceptions.h" static int fetch_inferior_event_wrapper (gdb_client_data client_data); @@ -82,8 +83,11 @@ inferior_event_handler (enum inferior_ev do_all_intermediate_continuations (); break; - case INF_QUIT_REQ: - target_stop (); + case INF_QUIT_REQ: + /* FIXME: ezannoni 1999-10-04. This call should really be a + target vector entry, so that it can be used for any kind of + targets. */ + async_remote_interrupt_twice (NULL); break; case INF_TIMER: --Boundary-00=_Wdp2H6C2yQ15OHl--