[RFA] Report the main thread.

Daniel Jacobowitz drow@false.org
Sun Apr 27 18:25:00 GMT 2008


On Sun, Apr 27, 2008 at 04:22:59PM +0200, Mark Kettenis wrote:
> Seriously though, in GDB we've always only populated the threads list
> if a program actually has threads.  An MI client will have to deal
> with that fact.  If it insists on providing a threaded view of the
> world, it needs to fake up a main thread.  Since it already has to do
> that for non-threaded programs, why would having a false thread create
> event for the main thread help?

Personally I think that's a mistake.  And if we don't want to change
the remaining backends - some of them already populated the first
thread, IIRC, and Linux now does - then maybe we should change MI
to fake up the thread.  It seems like a silly thing to make each
client do individually.

The "always a frame" work has made parts of GDB much clearer; I think
"always a thread" would too.  The big win would be exactly what Pedro
mentioned - it would simplify execution control.

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Gdb-patches mailing list