From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11386 invoked by alias); 29 Mar 2013 14:03:02 -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 11217 invoked by uid 89); 29 Mar 2013 14:02:55 -0000 X-Spam-SWARE-Status: No, score=-7.0 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 29 Mar 2013 14:02:52 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r2TE2oe5024284 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 29 Mar 2013 10:02:50 -0400 Received: from host2.jankratochvil.net (ovpn-116-39.ams2.redhat.com [10.36.116.39]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r2TE2j1a023319 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Fri, 29 Mar 2013 10:02:48 -0400 Date: Fri, 29 Mar 2013 16:26:00 -0000 From: Jan Kratochvil To: Pedro Alves Cc: Gareth McMullin , gdb-patches@sourceware.org Subject: Re: Include putpkt in TRY_CATCH. PR gdb/15275 Message-ID: <20130329140245.GA16492@host2.jankratochvil.net> References: <20130325195832.GA15218@host2.jankratochvil.net> <515478BE.3030801@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <515478BE.3030801@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2013-03/txt/msg01107.txt.bz2 On Thu, 28 Mar 2013 18:07:10 +0100, Pedro Alves wrote: > And detaching should > delete breakpoints from the target before sending "D" (although detach > command does, a detach caused by "quit" doesn't (if you "gdbserver --attach", I see it working: #0 remote_remove_breakpoint at remote.c:8113 #1 in target_remove_breakpoint at target.c:2462 #2 in bkpt_remove_location at breakpoint.c:12983 #3 in remove_breakpoint_1 at breakpoint.c:3590 #4 in remove_breakpoint at breakpoint.c:3696 #5 in remove_breakpoints_pid at breakpoint.c:2955 #6 in target_detach at target.c:2595 #7 in kill_or_detach at top.c:1212 #8 in iterate_over_inferiors at inferior.c:395 #9 in quit_target at top.c:1293 #10 in catch_errors at exceptions.c:546 #11 in quit_force at top.c:1331 #12 in quit_command at ./cli/cli-cmds.c:327 > "quit" will offer to detach instead of kill), and that's a bug...)), It will but I do not see where is a bug: (gdb) q A debugging session is active. Inferior 1 [process 11571] will be detached. Quit anyway? (y or n) y > gdb/ > 2013-03-28 Pedro Alves > > PR gdb/15275 > > * remote.c (send_interrupt_sequence): Use remote_serial_write. > (remote_serial_write): New function. > (putpkt_binary, getpkt_or_notif_sane_1): Use remote_serial_write. I agree this fix is better. I will revert the previous check-in after this check-in. Thanks, Jan