From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25876 invoked by alias); 18 Jun 2013 23:43:54 -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 25867 invoked by uid 89); 18 Jun 2013 23:43:53 -0000 X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_NO autolearn=ham version=3.3.1 Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 18 Jun 2013 23:43:52 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 424421C639D; Tue, 18 Jun 2013 19:43:51 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Z2Gk04Hf6LZT; Tue, 18 Jun 2013 19:43:51 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 119151C639A; Tue, 18 Jun 2013 19:43:51 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 33FDFC2B5F; Tue, 18 Jun 2013 16:43:49 -0700 (PDT) Date: Wed, 19 Jun 2013 01:57:00 -0000 From: Joel Brobecker To: gdb-patches@sourceware.org, Eli Zaretskii Subject: Re: [commit/windows] Add thread ID in SuspendThread error warning message. Message-ID: <20130618234349.GH5560@adacore.com> References: <1370946106-7883-1-git-send-email-brobecker@adacore.com> <8338somyrk.fsf@gnu.org> <20130611162738.GN3969@adacore.com> <83ppvslgrq.fsf@gnu.org> <20130618180156.GA7035@ednor.casa.cgf.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130618180156.GA7035@ednor.casa.cgf.cx> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2013-06/txt/msg00468.txt.bz2 > FWIW, I've seen this from time to time and have convinced myself that > it's a red herring. When it happens, it probably should just silently > continue. That's interesting. I have the following patch in AdaCore's tree which I have been uhming and ahming about. Would it apply to your situation as well? - warning (_("SuspendThread failed. (winerr %u)"), - (unsigned) err); - return NULL; + /* If SuspendThread failed with error 5 (access + denied), then ignore the error. It's unclear + where this comes from and how to prevent it. + But in the meantime, ignoring it seems to allow + us to inspect the thread (including fetching + registers) without apparent ill effect. */ + if (err != 5) + { + warning (_("SuspendThread (tid=0x%x) failed." + " (winerr %d)"), + (unsigned) id, (unsigned) err); + return NULL; + } I think there are other situations as well were we emit a warning, and where I've been considering the idea of downgrading them to complaints, so that users don't unnecessarily get concerned. But I wanted to investigate a little bit before doing so, and I've never had the time :-(. -- Joel