This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Thread awareness in remote serial protocol Z packet
On Wed, Sep 11, 2002 at 11:38:25AM -0700, Earl Chew wrote:
> Daniel Jacobowitz wrote:
> > Earl wrote:
> > > Perhaps extended the Z protocol to allow Zt,addr,length,id
> > > (plus the corresponding change in breakpoint.c) would be sufficient
> > > to allow this. Old targets presumably would ignore the ,id
> > > argument and proceed as before.
> >
> > Either that or we'd need to specify a different packet type for
> > this... gdbserver doesn't support the Z packet right now, so it
> > wouldn't care; it could easily be extended to support the Z packet
> > and to support thread-specific breakpoints but I haven't had a chance.
>
> As to whether extending the Z packet is possible, I suppose it
> depends on whether targets that support it explicitly check
> for end-of-packet after reading the existing length field.
>
> Do you know of any remote agents implementing Z and their behaviours?
I believe RedBoot does, but I'm not familiar with it. Someone else on
this list probably is though.
> Another related question I'm pondering is how to have the remote
> agent react when one thread hits a breakpoint. My browsing of
> the documentation and source suggests that gdb expects all threads
> to stop when any one thread hits a breakpoint.
>
> Is this correct?
>
> I think that this means that mult-threaded embedded targets would
> have to suspend related threads when a thread-specific breakpoint hits.
Yes. It's not always desirable but GDB does not like to have some
threads running and some stopped at the moment; this requires changes
to core GDB. GDB assumes that if you send a stopped-status response
all threads are stopped.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer