| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <html> |
| <!-- Copyright (C) 1988-2015 Free Software Foundation, Inc. |
| |
| Permission is granted to copy, distribute and/or modify this document |
| under the terms of the GNU Free Documentation License, Version 1.3 or |
| any later version published by the Free Software Foundation; with the |
| Invariant Sections being "Free Software" and "Free Software Needs |
| Free Documentation", with the Front-Cover Texts being "A GNU Manual," |
| and with the Back-Cover Texts as in (a) below. |
| |
| (a) The FSF's Back-Cover Text is: "You are free to copy and modify |
| this GNU Manual. Buying copies from GNU Press supports the FSF in |
| developing GNU and promoting software freedom." --> |
| <!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ --> |
| <head> |
| <title>Debugging with GDB: Thread groups</title> |
| |
| <meta name="description" content="Debugging with GDB: Thread groups"> |
| <meta name="keywords" content="Debugging with GDB: Thread groups"> |
| <meta name="resource-type" content="document"> |
| <meta name="distribution" content="global"> |
| <meta name="Generator" content="makeinfo"> |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| <link href="index.html#Top" rel="start" title="Top"> |
| <link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index"> |
| <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> |
| <link href="GDB_002fMI-General-Design.html#GDB_002fMI-General-Design" rel="up" title="GDB/MI General Design"> |
| <link href="GDB_002fMI-Command-Syntax.html#GDB_002fMI-Command-Syntax" rel="next" title="GDB/MI Command Syntax"> |
| <link href="Asynchronous-and-non_002dstop-modes.html#Asynchronous-and-non_002dstop-modes" rel="prev" title="Asynchronous and non-stop modes"> |
| <style type="text/css"> |
| <!-- |
| a.summary-letter {text-decoration: none} |
| blockquote.smallquotation {font-size: smaller} |
| div.display {margin-left: 3.2em} |
| div.example {margin-left: 3.2em} |
| div.indentedblock {margin-left: 3.2em} |
| div.lisp {margin-left: 3.2em} |
| div.smalldisplay {margin-left: 3.2em} |
| div.smallexample {margin-left: 3.2em} |
| div.smallindentedblock {margin-left: 3.2em; font-size: smaller} |
| div.smalllisp {margin-left: 3.2em} |
| kbd {font-style:oblique} |
| pre.display {font-family: inherit} |
| pre.format {font-family: inherit} |
| pre.menu-comment {font-family: serif} |
| pre.menu-preformatted {font-family: serif} |
| pre.smalldisplay {font-family: inherit; font-size: smaller} |
| pre.smallexample {font-size: smaller} |
| pre.smallformat {font-family: inherit; font-size: smaller} |
| pre.smalllisp {font-size: smaller} |
| span.nocodebreak {white-space:nowrap} |
| span.nolinebreak {white-space:nowrap} |
| span.roman {font-family:serif; font-weight:normal} |
| span.sansserif {font-family:sans-serif; font-weight:normal} |
| ul.no-bullet {list-style: none} |
| --> |
| </style> |
| |
| |
| </head> |
| |
| <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"> |
| <a name="Thread-groups"></a> |
| <div class="header"> |
| <p> |
| Previous: <a href="Asynchronous-and-non_002dstop-modes.html#Asynchronous-and-non_002dstop-modes" accesskey="p" rel="prev">Asynchronous and non-stop modes</a>, Up: <a href="GDB_002fMI-General-Design.html#GDB_002fMI-General-Design" accesskey="u" rel="up">GDB/MI General Design</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p> |
| </div> |
| <hr> |
| <a name="Thread-groups-1"></a> |
| <h4 class="subsection">27.1.3 Thread groups</h4> |
| <p><small>GDB</small> may be used to debug several processes at the same time. |
| On some platfroms, <small>GDB</small> may support debugging of several |
| hardware systems, each one having several cores with several different |
| processes running on each core. This section describes the MI |
| mechanism to support such debugging scenarios. |
| </p> |
| <p>The key observation is that regardless of the structure of the |
| target, MI can have a global list of threads, because most commands that |
| accept the ‘<samp>--thread</samp>’ option do not need to know what process that |
| thread belongs to. Therefore, it is not necessary to introduce |
| neither additional ‘<samp>--process</samp>’ option, nor an notion of the |
| current process in the MI interface. The only strictly new feature |
| that is required is the ability to find how the threads are grouped |
| into processes. |
| </p> |
| <p>To allow the user to discover such grouping, and to support arbitrary |
| hierarchy of machines/cores/processes, MI introduces the concept of a |
| <em>thread group</em>. Thread group is a collection of threads and other |
| thread groups. A thread group always has a string identifier, a type, |
| and may have additional attributes specific to the type. A new |
| command, <code>-list-thread-groups</code>, returns the list of top-level |
| thread groups, which correspond to processes that <small>GDB</small> is |
| debugging at the moment. By passing an identifier of a thread group |
| to the <code>-list-thread-groups</code> command, it is possible to obtain |
| the members of specific thread group. |
| </p> |
| <p>To allow the user to easily discover processes, and other objects, he |
| wishes to debug, a concept of <em>available thread group</em> is |
| introduced. Available thread group is an thread group that |
| <small>GDB</small> is not debugging, but that can be attached to, using the |
| <code>-target-attach</code> command. The list of available top-level thread |
| groups can be obtained using ‘<samp>-list-thread-groups --available</samp>’. |
| In general, the content of a thread group may be only retrieved only |
| after attaching to that thread group. |
| </p> |
| <p>Thread groups are related to inferiors (see <a href="Inferiors-and-Programs.html#Inferiors-and-Programs">Inferiors and Programs</a>). Each inferior corresponds to a thread group of a special |
| type ‘<samp>process</samp>’, and some additional operations are permitted on |
| such thread groups. |
| </p> |
| <hr> |
| <div class="header"> |
| <p> |
| Previous: <a href="Asynchronous-and-non_002dstop-modes.html#Asynchronous-and-non_002dstop-modes" accesskey="p" rel="prev">Asynchronous and non-stop modes</a>, Up: <a href="GDB_002fMI-General-Design.html#GDB_002fMI-General-Design" accesskey="u" rel="up">GDB/MI General Design</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p> |
| </div> |
| |
| |
| |
| </body> |
| </html> |