From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28487 invoked by alias); 10 Jan 2006 12:35:44 -0000 Received: (qmail 28480 invoked by uid 22791); 10 Jan 2006 12:35:43 -0000 X-Spam-Check-By: sourceware.org Received: from svr68.ehostpros.com (HELO svr68.ehostpros.com) (67.15.48.48) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 10 Jan 2006 12:35:42 +0000 Received: from [59.95.13.114] (helo=titan.linsyssoft.com) by svr68.ehostpros.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.52) id 1EwIiu-0005BB-Jb for gdb-patches@sources.redhat.com; Tue, 10 Jan 2006 04:35:37 -0800 Received: from pythagoras.linsyssoft.com (pythagoras [192.168.1.3] (may be forged)) by titan.linsyssoft.com (8.13.1/8.13.1) with ESMTP id k0ACMHEM000893 for ; Tue, 10 Jan 2006 17:52:17 +0530 From: Amit Kale To: GDB patches Subject: [PATCH] preventing resuming of threads in gdbserver Date: Tue, 10 Jan 2006 12:35:00 -0000 User-Agent: KMail/1.8 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_To6wDAxwRTntdPL" Message-Id: <200601101805.31069.amitkale@linsyssoft.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-01/txt/msg00099.txt.bz2 --Boundary-00=_To6wDAxwRTntdPL Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Content-length: 291 Hi, gdb lets other threads continue execution during single stepping when doing a single step in remote mode. This behavior causes thread switches during step or next commands. Native mode behavior is opposite of it. Attached patch changes it and makes it similar to native mode. -Amit --Boundary-00=_To6wDAxwRTntdPL Content-Type: text/x-diff; charset="us-ascii"; name="gdb-noresumeallthreads.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="gdb-noresumeallthreads.patch" Content-length: 784 Index: gdb-cvs/gdb/remote.c =================================================================== --- gdb-cvs.orig/gdb/remote.c 2006-01-03 11:24:35.000000000 +0530 +++ gdb-cvs/gdb/remote.c 2006-01-10 18:00:05.000000000 +0530 @@ -2519,10 +2519,10 @@ { /* Resume all threads, with preference for INFERIOR_PTID. */ if (step && siggnal != TARGET_SIGNAL_0) - outbuf = xstrprintf ("vCont;S%02x:%x;c", siggnal, + outbuf = xstrprintf ("vCont;S%02x:%x", siggnal, PIDGET (inferior_ptid)); else if (step) - outbuf = xstrprintf ("vCont;s:%x;c", PIDGET (inferior_ptid)); + outbuf = xstrprintf ("vCont;s:%x", PIDGET (inferior_ptid)); else if (siggnal != TARGET_SIGNAL_0) outbuf = xstrprintf ("vCont;C%02x:%x;c", siggnal, PIDGET (inferior_ptid)); --Boundary-00=_To6wDAxwRTntdPL--