blob: 4a8e2d439c7b2098287521528813b8e146549a8c [file] [log] [blame]
<html lang="en">
<head>
<title>GDB/MI Async Records - Debugging with GDB</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Debugging with GDB">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="GDB_002fMI-Output-Records.html#GDB_002fMI-Output-Records" title="GDB/MI Output Records">
<link rel="prev" href="GDB_002fMI-Stream-Records.html#GDB_002fMI-Stream-Records" title="GDB/MI Stream Records">
<link rel="next" href="GDB_002fMI-Frame-Information.html#GDB_002fMI-Frame-Information" title="GDB/MI Frame Information">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
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.''-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
<link rel="stylesheet" type="text/css" href="../cs.css">
</head>
<body>
<div class="node">
<a name="GDB%2fMI-Async-Records"></a>
<a name="GDB_002fMI-Async-Records"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="GDB_002fMI-Frame-Information.html#GDB_002fMI-Frame-Information">GDB/MI Frame Information</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="GDB_002fMI-Stream-Records.html#GDB_002fMI-Stream-Records">GDB/MI Stream Records</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="GDB_002fMI-Output-Records.html#GDB_002fMI-Output-Records">GDB/MI Output Records</a>
<hr>
</div>
<h4 class="subsection">27.5.3 <span class="sc">gdb/mi</span> Async Records</h4>
<p><a name="index-async-records-in-_0040sc_007bgdb_002fmi_007d-2027"></a><a name="index-g_t_0040sc_007bgdb_002fmi_007d_002c-async-records-2028"></a><dfn>Async</dfn> records are used to notify the <span class="sc">gdb/mi</span> client of
additional changes that have occurred. Those changes can either be a
consequence of <span class="sc">gdb/mi</span> commands (e.g., a breakpoint modified) or a result of
target activity (e.g., target stopped).
<p>The following is the list of possible async records:
<dl>
<dt><code>*running,thread-id="</code><var>thread</var><code>"</code><dd>The target is now running. The <var>thread</var> field tells which
specific thread is now running, and can be &lsquo;<samp><span class="samp">all</span></samp>&rsquo; if all threads
are running. The frontend should assume that no interaction with a
running thread is possible after this notification is produced.
The frontend should not assume that this notification is output
only once for any command. <span class="sc">gdb</span> may emit this notification
several times, either for different threads, because it cannot resume
all threads together, or even for a single thread, if the thread must
be stepped though some code before letting it run freely.
<br><dt><code>*stopped,reason="</code><var>reason</var><code>",thread-id="</code><var>id</var><code>",stopped-threads="</code><var>stopped</var><code>",core="</code><var>core</var><code>"</code><dd>The target has stopped. The <var>reason</var> field can have one of the
following values:
<dl>
<dt><code>breakpoint-hit</code><dd>A breakpoint was reached.
<br><dt><code>watchpoint-trigger</code><dd>A watchpoint was triggered.
<br><dt><code>read-watchpoint-trigger</code><dd>A read watchpoint was triggered.
<br><dt><code>access-watchpoint-trigger</code><dd>An access watchpoint was triggered.
<br><dt><code>function-finished</code><dd>An -exec-finish or similar CLI command was accomplished.
<br><dt><code>location-reached</code><dd>An -exec-until or similar CLI command was accomplished.
<br><dt><code>watchpoint-scope</code><dd>A watchpoint has gone out of scope.
<br><dt><code>end-stepping-range</code><dd>An -exec-next, -exec-next-instruction, -exec-step, -exec-step-instruction or
similar CLI command was accomplished.
<br><dt><code>exited-signalled</code><dd>The inferior exited because of a signal.
<br><dt><code>exited</code><dd>The inferior exited.
<br><dt><code>exited-normally</code><dd>The inferior exited normally.
<br><dt><code>signal-received</code><dd>A signal was received by the inferior.
</dl>
<p>The <var>id</var> field identifies the thread that directly caused the stop
&ndash; for example by hitting a breakpoint. Depending on whether all-stop
mode is in effect (see <a href="All_002dStop-Mode.html#All_002dStop-Mode">All-Stop Mode</a>), <span class="sc">gdb</span> may either
stop all threads, or only the thread that directly triggered the stop.
If all threads are stopped, the <var>stopped</var> field will have the
value of <code>"all"</code>. Otherwise, the value of the <var>stopped</var>
field will be a list of thread identifiers. Presently, this list will
always include a single thread, but frontend should be prepared to see
several threads in the list. The <var>core</var> field reports the
processor core on which the stop event has happened. This field may be absent
if such information is not available.
<br><dt><code>=thread-group-added,id="</code><var>id</var><code>"</code><dt><code>=thread-group-removed,id="</code><var>id</var><code>"</code><dd>A thread group was either added or removed. The <var>id</var> field
contains the <span class="sc">gdb</span> identifier of the thread group. When a thread
group is added, it generally might not be associated with a running
process. When a thread group is removed, its id becomes invalid and
cannot be used in any way.
<br><dt><code>=thread-group-started,id="</code><var>id</var><code>",pid="</code><var>pid</var><code>"</code><dd>A thread group became associated with a running program,
either because the program was just started or the thread group
was attached to a program. The <var>id</var> field contains the
<span class="sc">gdb</span> identifier of the thread group. The <var>pid</var> field
contains process identifier, specific to the operating system.
<dt><code>=thread-group-exited,id="</code><var>id</var><code>"</code><dd>A thread group is no longer associated with a running program,
either because the program has exited, or because it was detached
from. The <var>id</var> field contains the <span class="sc">gdb</span> identifier of the
thread group.
<br><dt><code>=thread-created,id="</code><var>id</var><code>",group-id="</code><var>gid</var><code>"</code><dt><code>=thread-exited,id="</code><var>id</var><code>",group-id="</code><var>gid</var><code>"</code><dd>A thread either was created, or has exited. The <var>id</var> field
contains the <span class="sc">gdb</span> identifier of the thread. The <var>gid</var>
field identifies the thread group this thread belongs to.
<br><dt><code>=thread-selected,id="</code><var>id</var><code>"</code><dd>Informs that the selected thread was changed as result of the last
command. This notification is not emitted as result of <code>-thread-select</code>
command but is emitted whenever an MI command that is not documented
to change the selected thread actually changes it. In particular,
invoking, directly or indirectly (via user-defined command), the CLI
<code>thread</code> command, will generate this notification.
<p>We suggest that in response to this notification, front ends
highlight the selected thread and cause subsequent commands to apply to
that thread.
<br><dt><code>=library-loaded,...</code><dd>Reports that a new library file was loaded by the program. This
notification has 4 fields&mdash;<var>id</var>, <var>target-name</var>,
<var>host-name</var>, and <var>symbols-loaded</var>. The <var>id</var> field is an
opaque identifier of the library. For remote debugging case,
<var>target-name</var> and <var>host-name</var> fields give the name of the
library file on the target, and on the host respectively. For native
debugging, both those fields have the same value. The
<var>symbols-loaded</var> field reports if the debug symbols for this
library are loaded. The <var>thread-group</var> field, if present,
specifies the id of the thread group in whose context the library was loaded.
If the field is absent, it means the library was loaded in the context
of all present thread groups.
<br><dt><code>=library-unloaded,...</code><dd>Reports that a library was unloaded by the program. This notification
has 3 fields&mdash;<var>id</var>, <var>target-name</var> and <var>host-name</var> with
the same meaning as for the <code>=library-loaded</code> notification.
The <var>thread-group</var> field, if present, specifies the id of the
thread group in whose context the library was unloaded. If the field is
absent, it means the library was unloaded in the context of all present
thread groups.
</dl>
</body></html>