This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v3 07/17] Misc switch_back_to_stepped_thread cleanups
- From: Doug Evans <dje at google dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 21 Apr 2015 22:21:35 -0700
- Subject: Re: [PATCH v3 07/17] Misc switch_back_to_stepped_thread cleanups
- Authentication-results: sourceware.org; auth=none
- References: <1429267521-21047-1-git-send-email-palves at redhat dot com> <1429267521-21047-8-git-send-email-palves at redhat dot com>
Pedro Alves writes:
> [...] it isn't ever correct to pass step=1 to target_resume
> on software single-step targets [...]
Sounds like a good thing to document in a comment or assert.
Can do?
> , and currently_stepping works at a
> conceptual higher level, it returns step=true even on software step
> targets. It doesn't really matter on hardware step targets, as the
> breakpoint will be hit immediately, but it's just wrong on software
> step targets. I tested it against my x86 software single-step branch,
> and it indeed fixes failed assertions (that catch spurious
> PTRACE_SINGLESTEP requests) there.
>
> gdb/ChangeLog:
> 2015-04-17 Pedro Alves <palves@redhat.com>
>
> * infrun.c (switch_back_to_stepped_thread): Use ecs->ptid instead
> pf inferior_ptid. If the stepped thread vanished, return 0
> instead of resuming here. Use reset_ecs. Print the prev_pc and
> the current stop_pc in log message. Clear trap_expected if the
> thread advanced. Don't pass currently_stepping to
> do_target_resume.
>...