This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix "PC register is not available" issue
- From: Pedro Alves <palves at redhat dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: brobecker at adacore dot com, gdb-patches at sourceware dot org
- Date: Tue, 08 Apr 2014 12:32:21 +0100
- Subject: Re: [PATCH] Fix "PC register is not available" issue
- Authentication-results: sourceware.org; auth=none
- References: <83txawa9wk dot fsf at gnu dot org> <20140318161608 dot GD4282 at adacore dot com> <83pplja2h9 dot fsf at gnu dot org> <20140318165413 dot GE4282 at adacore dot com> <834n2kztfw dot fsf at gnu dot org> <53358C37 dot 9050907 at redhat dot com> <83a9cafcpz dot fsf at gnu dot org> <5335B619 dot 6040605 at redhat dot com> <8361myfa6l dot fsf at gnu dot org> <83ioqucrkw dot fsf at gnu dot org> <5342DBBC dot 4090500 at redhat dot com> <83lhvh6lqi dot fsf at gnu dot org>
On 04/07/2014 07:24 PM, Eli Zaretskii wrote:
>> Date: Mon, 07 Apr 2014 18:09:16 +0100
>> From: Pedro Alves <palves@redhat.com>
>> 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