[PATCH] Fix "PC register is not available" issue
Eli Zaretskii
eliz@gnu.org
Mon Apr 7 18:25:00 GMT 2014
> 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?
More information about the Gdb-patches
mailing list