This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA 7/8] Avoid crashes when stepping through ravenscar context-switching


On 3/26/19 7:44 AM, Tom Tromey wrote:
> When stepping through the ravenscar context-switching code, gdb will
> try to single-step the current thread, while leaving the other threads
> stopped.  This results in an assertion failure in finish_step_over,
> because the event thread is not the request thread.
> 
> This patch introduces a new target method so that infrun can ask the
> target whether this can happen; and then changes infrun to handle this
> case.  When the target can have an unexpected thread switch,
> single-stepping may also switch threads.

I think single-stepping kernels via debug server stubs in things like
qemu can also do this, so it will be useful in those contexts as well.
I'm trying to think if the target is the right place to do this rather
than gdbarch, but I think you are right to do it in the target.  We
might want a way to forward this request to remote targets (FreeBSD's
gdb server for the kernel is a remote target that would probably want
to say that this is true).

-- 
John Baldwin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]