From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21041 invoked by alias); 7 Apr 2014 21:39:15 -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 21030 invoked by uid 89); 7 Apr 2014 21:39:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Mon, 07 Apr 2014 21:39:14 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 2C8511160C9; Mon, 7 Apr 2014 17:39:12 -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 iIqiNwdbWVdN; Mon, 7 Apr 2014 17:39:12 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id E050B1160A7; Mon, 7 Apr 2014 17:39:11 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 24FC9E0BF1; Mon, 7 Apr 2014 14:39:13 -0700 (PDT) Date: Mon, 07 Apr 2014 21:39:00 -0000 From: Joel Brobecker To: Eli Zaretskii Cc: Pedro Alves , gdb-patches@sourceware.org Subject: Re: [PATCH] Fix "PC register is not available" issue Message-ID: <20140407213913.GE4250@adacore.com> References: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83lhvh6lqi.fsf@gnu.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2014-04/txt/msg00088.txt.bz2 > 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? This code not going to be used at all if you debug through GDBserver (it's the code in remote.c that does). But if the GDBserver code does the same thing as windows-nat in terms of inferior management, it might trigger the same error and output them on GDBserver's stdout/stderr if --debug is enabled. Usually, we try to keep the GDB and GDBserver code in sync, and that means that we fix a problem in inferior management, it's a good bet that the same problem exists on both sides. I might be able to take a look sometime next week. I think the issue we'll have is with testing, since the problem is not necessarily always reproduceable in Eli's scenario, and he would need to debug repeatedly with GDBserver in order to gain a good level of confidence that the problem is gone for good. -- Joel