qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] fix gdbstub support for multiple threads in use


From: Nathan Froyd
Subject: Re: [Qemu-devel] [PATCH] fix gdbstub support for multiple threads in usermode, v2
Date: Tue, 2 Jun 2009 14:48:28 -0700
User-agent: Mutt/1.5.13 (2006-08-11)

On Tue, Jun 02, 2009 at 10:14:22PM +0100, Paul Brook wrote:
> > > Really? Why doesn't GDB get confused on real machines when the PID wraps?
> > > Is the real bug that we're missing some sort of thread
> > > creation/destruction event reporting?
> >
> > Hm, this is a good point.  I think the bug is that:
> >...
> > I'm also not sure what to do differently that doesn't involve making
> > QEMU remember what happened to all the threads it's seen until GDB asks
> > about them.  Ideas?
> 
> Ok, from Daniel's response it sounds like this bit of gdb is broken.
> 
> Could we use the real TID? Seems silly to invent a new value when the host 
> has 
> already found one for us...

That would work for threaded usermode emulation.  But for multiple-cpu
system-mode emulation, the CPUs are unlikely to have unique TID values
(e.g. r2 on powerpc or what have you).  And if you're going to support
hotplugging someday, you're going to have support generation of unique
IDs somewhere along the way.  Using the same code for usermode and
system mode seems like the better, more robust/future-proof option.

-Nathan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]