From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3475 invoked by alias); 3 May 2012 13:13:32 -0000 Received: (qmail 3305 invoked by uid 22791); 3 May 2012 13:13:30 -0000 X-SWARE-Spam-Status: No, hits=-4.1 required=5.0 tests=AWL,BAYES_00,FROM_12LTRDOM,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 03 May 2012 13:13:17 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1SPvpz-0005MZ-Pd from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Thu, 03 May 2012 06:12:51 -0700 Received: from SVR-ORW-FEM-02.mgc.mentorg.com ([147.34.96.206]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Thu, 3 May 2012 06:12:51 -0700 Received: from localhost.localdomain (147.34.91.1) by svr-orw-fem-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server id 14.1.289.1; Thu, 3 May 2012 06:12:42 -0700 From: Yao Qi To: Subject: [PATCH 09/14] Set thread's state in infcall. Date: Thu, 03 May 2012 13:13:00 -0000 Message-ID: <1336050869-29605-10-git-send-email-yao@codesourcery.com> In-Reply-To: <1336050869-29605-1-git-send-email-yao@codesourcery.com> References: <1336050869-29605-1-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes 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: 2012-05/txt/msg00076.txt.bz2 Split from original V2. Nothing changed. Fix this fail below in both native and remote. -FAIL: gdb.base/step-resume-infcall.exp: next +PASS: gdb.base/step-resume-infcall.exp: next gdb: 2012-04-12 Pedro Alves * infcall.c (run_inferior_call): Set the thread's state to THREAD_STOPPED while calling clear_proceed_status. --- gdb/infcall.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/gdb/infcall.c b/gdb/infcall.c index 6c250e3..d40b7ef 100644 --- a/gdb/infcall.c +++ b/gdb/infcall.c @@ -387,11 +387,21 @@ run_inferior_call (struct thread_info *call_thread, CORE_ADDR real_pc) volatile struct gdb_exception e; int saved_in_infcall = call_thread->control.in_infcall; ptid_t call_thread_ptid = call_thread->ptid; + int state = call_thread->state; call_thread->control.in_infcall = 1; + /* Fudge the thread's state so clear_proceed_status doesn't ignore + it. We may be running an infcall with a THREAD_RUNNING but + !executing thread, e.g., when evaluating a breakpoint's + condition. */ + state = call_thread->state; + call_thread->state = THREAD_STOPPED; + clear_proceed_status (); + call_thread->state = state; + disable_watchpoints_before_interactive_call_start (); /* We want stop_registers, please... */ -- 1.7.0.4