From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7838 invoked by alias); 8 Apr 2014 11:32:28 -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 7823 invoked by uid 89); 8 Apr 2014 11:32:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 08 Apr 2014 11:32:27 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s38BWNou002063 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 8 Apr 2014 07:32:23 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id s38BWL01010018; Tue, 8 Apr 2014 07:32:22 -0400 Message-ID: <5343DE45.5050707@redhat.com> Date: Tue, 08 Apr 2014 11:32:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Eli Zaretskii CC: brobecker@adacore.com, gdb-patches@sourceware.org Subject: Re: [PATCH] Fix "PC register is not available" issue References: <83txawa9wk.fsf@gnu.org> <20140318161608.GD4282@adacore.com> <83pplja2h9.fsf@gnu.org> <20140318165413.GE4282@adacore.com> <834n2kztfw.fsf@gnu.org> <53358C37.9050907@redhat.com> <83a9cafcpz.fsf@gnu.org> <5335B619.6040605@redhat.com> <8361myfa6l.fsf@gnu.org> <83ioqucrkw.fsf@gnu.org> <5342DBBC.4090500@redhat.com> <83lhvh6lqi.fsf@gnu.org> In-Reply-To: <83lhvh6lqi.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-04/txt/msg00095.txt.bz2 On 04/07/2014 07:24 PM, Eli Zaretskii wrote: >> Date: Mon, 07 Apr 2014 18:09:16 +0100 >> From: Pedro Alves >> CC: brobecker@adacore.com, gdb-patches@sourceware.org >> >>> Funnily enough, I cannot get GDBserver to emit similar warnings in the >>> same situation. I don't understand the reasons for that, since the >>> code is very similar, and with a single exception, we do check the >>> return values of calls to GetThreadContext, SetThreadContext, and >>> SuspendThread in GDBserver. But the fact remains that no warnings >>> about these threads are ever seen when debugging remotely. I do see >>> the extra threads under GDBserver as well. >> >> GDBserver's warnings are guarded by 'if (debug_threads)' (see OUTMSG2). > > But the warnings I was talking about are output with OUTMSG, which > doesn't depend on debug_threads. Here's an example: > > static void > suspend_one_thread (struct inferior_list_entry *entry) > { > struct thread_info *thread = (struct thread_info *) entry; > win32_thread_info *th = inferior_target_data (thread); > > if (!th->suspended) > { > if (SuspendThread (th->h) == (DWORD) -1) > { > DWORD err = GetLastError (); > OUTMSG (("warning: SuspendThread failed in suspend_one_thread, " > "(error %d): %s\n", (int) err, strwinerror (err))); > > Did I miss something? No, it was I who missed that. I found a Windows machine and am taking a look. -- Pedro Alves