From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22829 invoked by alias); 27 Apr 2008 14:24:46 -0000 Received: (qmail 22813 invoked by uid 22791); 27 Apr 2008 14:24:45 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 27 Apr 2008 14:24:28 +0000 Received: from brahms.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by brahms.sibelius.xs4all.nl (8.14.1/8.14.1) with ESMTP id m3REN0oD015165; Sun, 27 Apr 2008 16:23:00 +0200 (CEST) Received: (from kettenis@localhost) by brahms.sibelius.xs4all.nl (8.14.1/8.14.1/Submit) id m3REMxVF009472; Sun, 27 Apr 2008 16:22:59 +0200 (CEST) Date: Sun, 27 Apr 2008 16:07:00 -0000 Message-Id: <200804271422.m3REMxVF009472@brahms.sibelius.xs4all.nl> From: Mark Kettenis To: drow@false.org CC: nickrob@snap.net.nz, vladimir@codesourcery.com, gdb-patches@sources.redhat.com In-reply-to: <20080427135246.GA9333@caradoc.them.org> (message from Daniel Jacobowitz on Sun, 27 Apr 2008 09:52:46 -0400) Subject: Re: [RFA] Report the main thread. References: <200804262005.18646.vladimir@codesourcery.com> <200804261617.m3QGH9dv027362@brahms.sibelius.xs4all.nl> <20080426185448.GA14511@caradoc.them.org> <18451.43847.127294.906184@kahikatea.snap.net.nz> <20080426224211.GA26195@caradoc.them.org> <18451.45857.500742.342261@kahikatea.snap.net.nz> <20080427135246.GA9333@caradoc.them.org> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-04/txt/msg00621.txt.bz2 > Date: Sun, 27 Apr 2008 09:52:46 -0400 > From: Daniel Jacobowitz > > On Sun, Apr 27, 2008 at 10:56:33AM +1200, Nick Roberts wrote: > > > > I still don't see the point in reporting the main thread. If there's more > > > > than one thread the user can switch between them but what course of action > > > > is available with just one thread? > > > > > > The GUI might have a thread list, for instance. > > > > But my question was "what could a user do with it?". AFAICS a thread list with > > just one thread in it just looks like the output of the "frame" command. > > Well, for example, Eclipse's stack panel is organized as a multi-level > list. It's got expanding items for each debug session, thread, and > stack frame. So the main thread's backtrace is inside of an item > containing the thread ID. So Eclipse assumes that all programs are threaded? That's so ... Java. 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?