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: Eli Zaretskii <eliz at gnu dot org>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: palves at redhat dot com, gdb-patches at sourceware dot org
- Date: Fri, 28 Mar 2014 20:29:35 +0300
- 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> <20140327125646 dot GA4030 at adacore dot com> <83k3bfy1ws dot fsf at gnu dot org> <20140328125955 dot GC4030 at adacore dot com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Fri, 28 Mar 2014 05:59:55 -0700
> From: Joel Brobecker <brobecker@adacore.com>
> Cc: palves@redhat.com, gdb-patches@sourceware.org
>
> > + if (killed)
> > + SetThreadContext (th->h, &th->context);
> > + else
> > + CHECK (SetThreadContext (th->h, &th->context));
>
> Rather than duplicate the call to SetThreadContext, perhaps
> another way of doing it would be:
>
> DWORD status;
>
> status = SetThreadContext (th->h, &th->context);
> if (!killed)
> CHECK (status)
Fine with me.