This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 4/6] Fix for even more missed events; eliminate thread-hop code.
- From: Pedro Alves <palves at redhat dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 05 Mar 2014 15:45:11 +0000
- Subject: Re: [PATCH 4/6] Fix for even more missed events; eliminate thread-hop code.
- Authentication-results: sourceware.org; auth=none
- References: <1393360363-5603-1-git-send-email-palves at redhat dot com> <1393360363-5603-5-git-send-email-palves at redhat dot com>
On 02/25/2014 08:32 PM, Pedro Alves wrote:
> But in order to do that, we need to make bpstat aware of single-step
> breakpoints. So this patch starts convering the single-step
> breakpoints to real breakpoints. It doesn't put them in the regular
> breakpoint chain yet though. More changes would be needed for that.
Unfortunately we're still not ready for this. watch-cond-infcall.exp
revealed that we need to remove single-step breakpoints before running
the infcall for the condition, otherwise nasty things happen, like
GDB referencing already deleted breakpoints following the bpstat
struct. I didn't notice this before as the failure is intermittent,
but valgrind showed it clearly. Also, patch #5's thread_still_needs_step_over
function call from keep_going meant that the end result of the series
would be that we'd no longer move the thread past the single-step
breakpoint, actually, as the single-step breakpoint (for the other
thread) was always removed before keep_going was reached...
int
thread_still_needs_step_over (struct thread_info *tp)
{
if (tp->stepping_over_breakpoint)
{
struct regcache *regcache = get_thread_regcache (tp->ptid);
if (breakpoint_here_p (get_regcache_aspace (regcache),
regcache_read_pc (regcache)))
v2 simplifies the patch further, and no longer needs to convert
single-step breakpoints to real breakpoints. I'll get back to
that separately...
--
Pedro Alves