This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add "thread-group id" and "id in thread-group" info to -thread-info output


On 02/24/2017 08:22 PM, Simon Marchi wrote:

> While writing the documentation parts, these question popped to mind:
> 
> - The type of the id-in-tg field (a string) assumes that a thread
> belongs to a single group.  Currently, the only kind of "thread-group"
> we have is inferiors.  The thread-group terminology suggests that in the
> future we might have other kinds of thread groups, like user-defined
> arbitrary groups.  Otherwise, why would MI use "thread group" instead of
> "inferior"?  

The concept of MI thread groups was added way before the concept
of "inferiors" and inferior numbers was exposed to the user:

  https://sourceware.org/ml/gdb-patches/2008-11/msg00044.html

Back then the thread list was global, and we were starting to add
multi-process support to GDB.  The OS we were targeting (from Ericsson,
no less) had all processes running the same code (as if a bunch of forks),
which was convenient as it allowed for incremental progress all the
way until we got to real multi-inferior support a few releases later.  Back
then, MI thread groups mapped to "processes", and thread groups were
only created when we'd attach to a process.

Later on, when we added real GNU/Linux multi-inferior support (with the
addition of program spaces), we exposed the "prototype inferior" concept
to the user (i.e., the inferior now exists before the user types "run"), and
"thread groups" were re-purposed.  See:

  https://sourceware.org/ml/gdb-patches/2010-01/msg00358.html

Thanks,
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]