From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12305 invoked by alias); 28 Nov 2006 18:42:10 -0000 Received: (qmail 12295 invoked by uid 22791); 28 Nov 2006 18:42:09 -0000 X-Spam-Check-By: sourceware.org Received: from gateway-1237.mvista.com (HELO gateway-1237.mvista.com) (63.81.120.158) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 28 Nov 2006 18:42:02 +0000 Received: from [10.0.4.48] (gupta1.mvista.com [10.0.4.48]) by hermes.mvista.com (Postfix) with ESMTP id 0BB831C33D; Tue, 28 Nov 2006 10:42:00 -0800 (PST) Message-ID: <456C82F7.4030903@mvista.com> Date: Tue, 28 Nov 2006 18:42:00 -0000 From: Nitin Gupta User-Agent: Thunderbird 1.5.0.7 (X11/20060913) MIME-Version: 1.0 To: gdb@sourceware.org Cc: Jim Blandy , Rob Quill Subject: [PATCH] Fix for thread debugging in the presence of software single step Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: 2006-11/txt/msg00196.txt.bz2 Following patch fixes for thread debugging in the presence of software single step: Only allow one thread to single-step if SOFTWARE_SINGLE_STEP_P () If it looks OK, Could someone please check it in? Index: gdb-6.5/gdb/infrun.c =================================================================== --- gdb-6.5.orig/gdb/infrun.c +++ gdb-6.5/gdb/infrun.c @@ -618,10 +618,11 @@ } if ((scheduler_mode == schedlock_on) - || (scheduler_mode == schedlock_step - && (step || singlestep_breakpoints_inserted_p))) + || (scheduler_mode == schedlock_step && step) + || singlestep_breakpoints_inserted_p) { /* User-settable 'scheduler' mode requires solo thread resume. */ + /* Software single-step doesn't work right with multiple threads. */ resume_ptid = inferior_ptid; }