From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28242 invoked by alias); 10 Apr 2012 19:19:33 -0000 Received: (qmail 28232 invoked by uid 22791); 10 Apr 2012 19:19:31 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 10 Apr 2012 19:19:12 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q3AJJBft004115 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 10 Apr 2012 15:19:11 -0400 Received: from host2.jankratochvil.net (ovpn-116-23.ams2.redhat.com [10.36.116.23]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q3AJJ7YR014229 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Tue, 10 Apr 2012 15:19:10 -0400 Date: Tue, 10 Apr 2012 19:20:00 -0000 From: Jan Kratochvil To: gdb-patches@sourceware.org Subject: [patch] More suggestive error_is_running message Message-ID: <20120410191907.GA31331@host2.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) 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-04/txt/msg00190.txt.bz2 Hi, I was debugging some testsuite race before I figured out in non-stop mode one has to wait first for [Thread N] #1 stopped. before executing any commands otherwise one gets: Cannot execute this command while the selected thread is running. Not sure if this error message would help me or not but I found it tricky. No regressions on {x86_64,x86_64-m32,i686}-fedora17-linux-gnu. I am not going to check it in on my own. Thanks, Jan gdb/ 2012-04-10 Jan Kratochvil Provide more specific error_is_running error message. * infrun.c (error_is_running): Extend the error message text. --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -3038,7 +3045,9 @@ void error_is_running (void) { error (_("Cannot execute this command while " - "the selected thread is running.")); + "the selected thread is running. " + "(You may want to use 'interrupt' " + "and wait for '[Thread N] #1 stopped.'.)")); } void