From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12849 invoked by alias); 7 Apr 2014 18:25:09 -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 12833 invoked by uid 89); 7 Apr 2014 18:25:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: mtaout20.012.net.il Received: from mtaout20.012.net.il (HELO mtaout20.012.net.il) (80.179.55.166) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 07 Apr 2014 18:25:05 +0000 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0N3O00500AXLGS00@a-mtaout20.012.net.il> for gdb-patches@sourceware.org; Mon, 07 Apr 2014 21:25:03 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N3O005CGB5QBS20@a-mtaout20.012.net.il>; Mon, 07 Apr 2014 21:25:03 +0300 (IDT) Date: Mon, 07 Apr 2014 18:25:00 -0000 From: Eli Zaretskii Subject: Re: [PATCH] Fix "PC register is not available" issue In-reply-to: <5342DBBC.4090500@redhat.com> To: Pedro Alves Cc: brobecker@adacore.com, gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83lhvh6lqi.fsf@gnu.org> 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> X-IsSubscribed: yes X-SW-Source: 2014-04/txt/msg00082.txt.bz2 > 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?