This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: A question about All-stop and Non-stop
- From: Pedro Alves <pedro at codesourcery dot com>
- To: xingxing pan <forandom at gmail dot com>, gdb at sourceware dot org
- Date: Tue, 4 May 2010 19:48:33 +0100
- Subject: Re: A question about All-stop and Non-stop
On Tuesday 04 May 2010 10:25:28, xingxing pan wrote:
> Hi, Pedro.
> Dose GDB use syscall ptrace to single-step the thread while other
> threads are still stopped?
On archs that support it, yes.
> I've read ARM's codes, it seems ARM's codes
> don't use ptrace to single-step, but just set a internal breakpoint
> and let all threads run.
Close. On linux (and a couple of other OSs, where gdb knows the
backend doesn't support native single-step), it sets an internal
breakpoint, but only lets _one_ thread run. For other random
targets, GDB leaves the target in charge of implementing single-step
however it wants (maybe with hardware support, maybe with internal
breakpoints, gdb doesn't need to know).
--
Pedro Alves