<?xml version="1.0" encoding="utf-8"?>
<page xmlns="http://projectmallard.org/1.0/" type="topic" style="task" id="debug-thread" xml:lang="oc">

  <info xmlns:facet="http://projectmallard.org/facet/1.0/">
    <facet:tag key="all-pages" value="whatever"/> <!--Include page in index-->
    <link type="guide" xref="debug-data" group="fifth"/>
    <revision pkgversion="3.0" version="0.1" date="2011-03-27" status="incomplete"/>
    <desc>
      Examine threads.
    </desc>
    <credit type="author">
      <name>Sébastien Granjoux</name>
      <email>seb.sfo@free.fr</email>
    </credit>
    <credit type="editor">
      <name>Philip Chimento</name>
      <email>philip.chimento@gmail.com</email>
    </credit>
  </info>

  <title>Threads</title>

  <section>
    <title>List threads</title>

    <p>A program can be composed of several threads. All these threads are
    executed independently, having their own registers, stack and local
    variables, but sharing global variables.</p>

    <steps>
      <item>
        <p>From the <gui>main menu</gui>, select <guiseq><gui>View</gui>
        <gui>Thread</gui></guiseq> to open the <gui>Thread</gui>
        window.</p>
      </item>
    </steps>

    <p>The window shows the following information about each thread:</p>

    <terms>
      <item>
        <title>Active</title>
        <p>This contains a yellow arrow that points to the active thread.</p>
      </item>
      <item>
        <title>ID</title>
        <p>This is a number corresponding to each thread.</p>
      </item>
      <item>
        <title>File</title>
        <p>The name of the file containing the function corresponding to
        the current frame of the current thread.</p>
      </item>
      <item>
        <title>Line</title>
        <p>The line number of the function corresponding to the current
        frame of the current thread.</p>
      </item>
      <item>
        <title>Function</title>
        <p>The name of the function corresponding to the frame of the
        current thread.</p>
      </item>
      <item>
        <title>Address</title>
        <p>The address of the function corresponding to the frame of the
        current thread.</p>
      </item>
    </terms>

  </section>

  <section>
    <title>Change current thread</title>

    <p>The current thread is the thread whose stack and local variables are
    currently displayed in the debugger.</p>

    <steps>
      <item>
        <p>In the <gui>Thread</gui> window, select the thread you want.</p>
      </item>
      <item>
        <p>Right-click and select <gui>Set current thread</gui>.</p>
      </item>
    </steps>
  </section>


  <section>
    <title>View current function</title>

    <steps>
      <item>
        <p>In the <gui>Thread</gui> window, select the thread you want.</p>
      </item>
      <item>
        <p>Double-click, or right-click and select <gui>View Source</gui>.</p>
      </item>
    </steps>
  </section>


</page>
