blob: 97ed5482d8ccd27d3e890a5583ac8e5fae55465e [file] [log] [blame]
<!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: GDB/MI Async Records</title>
<meta name="description" content="Debugging with GDB: GDB/MI Async Records">
<meta name="keywords" content="Debugging with GDB: GDB/MI Async Records">
<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-Output-Records.html#GDB_002fMI-Output-Records" rel="up" title="GDB/MI Output Records">
<link href="GDB_002fMI-Breakpoint-Information.html#GDB_002fMI-Breakpoint-Information" rel="next" title="GDB/MI Breakpoint Information">
<link href="GDB_002fMI-Stream-Records.html#GDB_002fMI-Stream-Records" rel="prev" title="GDB/MI Stream Records">
<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="GDB_002fMI-Async-Records"></a>
<div class="header">
<p>
Next: <a href="GDB_002fMI-Breakpoint-Information.html#GDB_002fMI-Breakpoint-Information" accesskey="n" rel="next">GDB/MI Breakpoint Information</a>, Previous: <a href="GDB_002fMI-Stream-Records.html#GDB_002fMI-Stream-Records" accesskey="p" rel="prev">GDB/MI Stream Records</a>, Up: <a href="GDB_002fMI-Output-Records.html#GDB_002fMI-Output-Records" accesskey="u" rel="up">GDB/MI Output Records</a> &nbsp; [<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="GDB_002fMI-Async-Records-1"></a>
<h4 class="subsection">27.5.3 <small>GDB/MI</small> Async Records</h4>
<a name="index-async-records-in-GDB_002fMI"></a>
<a name="index-GDB_002fMI_002c-async-records"></a>
<p><em>Async</em> records are used to notify the <small>GDB/MI</small> client of
additional changes that have occurred. Those changes can either be a
consequence of <small>GDB/MI</small> commands (e.g., a breakpoint modified) or a result of
target activity (e.g., target stopped).
</p>
<p>The following is the list of possible async records:
</p>
<dl compact="compact">
<dt><code>*running,thread-id=&quot;<var>thread</var>&quot;</code></dt>
<dd><p>The target is now running. The <var>thread</var> field tells which
specific thread is now running, and can be &lsquo;<samp>all</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. <small>GDB</small> 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.
</p>
</dd>
<dt><code>*stopped,reason=&quot;<var>reason</var>&quot;,thread-id=&quot;<var>id</var>&quot;,stopped-threads=&quot;<var>stopped</var>&quot;,core=&quot;<var>core</var>&quot;</code></dt>
<dd><p>The target has stopped. The <var>reason</var> field can have one of the
following values:
</p>
<dl compact="compact">
<dt><code>breakpoint-hit</code></dt>
<dd><p>A breakpoint was reached.
</p></dd>
<dt><code>watchpoint-trigger</code></dt>
<dd><p>A watchpoint was triggered.
</p></dd>
<dt><code>read-watchpoint-trigger</code></dt>
<dd><p>A read watchpoint was triggered.
</p></dd>
<dt><code>access-watchpoint-trigger</code></dt>
<dd><p>An access watchpoint was triggered.
</p></dd>
<dt><code>function-finished</code></dt>
<dd><p>An -exec-finish or similar CLI command was accomplished.
</p></dd>
<dt><code>location-reached</code></dt>
<dd><p>An -exec-until or similar CLI command was accomplished.
</p></dd>
<dt><code>watchpoint-scope</code></dt>
<dd><p>A watchpoint has gone out of scope.
</p></dd>
<dt><code>end-stepping-range</code></dt>
<dd><p>An -exec-next, -exec-next-instruction, -exec-step, -exec-step-instruction or
similar CLI command was accomplished.
</p></dd>
<dt><code>exited-signalled</code></dt>
<dd><p>The inferior exited because of a signal.
</p></dd>
<dt><code>exited</code></dt>
<dd><p>The inferior exited.
</p></dd>
<dt><code>exited-normally</code></dt>
<dd><p>The inferior exited normally.
</p></dd>
<dt><code>signal-received</code></dt>
<dd><p>A signal was received by the inferior.
</p></dd>
<dt><code>solib-event</code></dt>
<dd><p>The inferior has stopped due to a library being loaded or unloaded.
This can happen when <code>stop-on-solib-events</code> (see <a href="Files.html#Files">Files</a>) is
set or when a <code>catch load</code> or <code>catch unload</code> catchpoint is
in use (see <a href="Set-Catchpoints.html#Set-Catchpoints">Set Catchpoints</a>).
</p></dd>
<dt><code>fork</code></dt>
<dd><p>The inferior has forked. This is reported when <code>catch fork</code>
(see <a href="Set-Catchpoints.html#Set-Catchpoints">Set Catchpoints</a>) has been used.
</p></dd>
<dt><code>vfork</code></dt>
<dd><p>The inferior has vforked. This is reported in when <code>catch vfork</code>
(see <a href="Set-Catchpoints.html#Set-Catchpoints">Set Catchpoints</a>) has been used.
</p></dd>
<dt><code>syscall-entry</code></dt>
<dd><p>The inferior entered a system call. This is reported when <code>catch
syscall</code> (see <a href="Set-Catchpoints.html#Set-Catchpoints">Set Catchpoints</a>) has been used.
</p></dd>
<dt><code>syscall-return</code></dt>
<dd><p>The inferior returned from a system call. This is reported when
<code>catch syscall</code> (see <a href="Set-Catchpoints.html#Set-Catchpoints">Set Catchpoints</a>) has been used.
</p></dd>
<dt><code>exec</code></dt>
<dd><p>The inferior called <code>exec</code>. This is reported when <code>catch exec</code>
(see <a href="Set-Catchpoints.html#Set-Catchpoints">Set Catchpoints</a>) has been used.
</p></dd>
</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>), <small>GDB</small> 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>&quot;all&quot;</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.
</p>
</dd>
<dt><code>=thread-group-added,id=&quot;<var>id</var>&quot;</code></dt>
<dt><code>=thread-group-removed,id=&quot;<var>id</var>&quot;</code></dt>
<dd><p>A thread group was either added or removed. The <var>id</var> field
contains the <small>GDB</small> 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.
</p>
</dd>
<dt><code>=thread-group-started,id=&quot;<var>id</var>&quot;,pid=&quot;<var>pid</var>&quot;</code></dt>
<dd><p>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
<small>GDB</small> identifier of the thread group. The <var>pid</var> field
contains process identifier, specific to the operating system.
</p>
</dd>
<dt><code>=thread-group-exited,id=&quot;<var>id</var>&quot;[,exit-code=&quot;<var>code</var>&quot;]</code></dt>
<dd><p>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 <small>GDB</small> identifier of the
thread group. The <var>code</var> field is the exit code of the inferior; it exists
only when the inferior exited with some code.
</p>
</dd>
<dt><code>=thread-created,id=&quot;<var>id</var>&quot;,group-id=&quot;<var>gid</var>&quot;</code></dt>
<dt><code>=thread-exited,id=&quot;<var>id</var>&quot;,group-id=&quot;<var>gid</var>&quot;</code></dt>
<dd><p>A thread either was created, or has exited. The <var>id</var> field
contains the <small>GDB</small> identifier of the thread. The <var>gid</var>
field identifies the thread group this thread belongs to.
</p>
</dd>
<dt><code>=thread-selected,id=&quot;<var>id</var>&quot;</code></dt>
<dd><p>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>
<p>We suggest that in response to this notification, front ends
highlight the selected thread and cause subsequent commands to apply to
that thread.
</p>
</dd>
<dt><code>=library-loaded,...</code></dt>
<dd><p>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 is emitted only for backward compatibility
and should not be relied on to convey any useful information. 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.
</p>
</dd>
<dt><code>=library-unloaded,...</code></dt>
<dd><p>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.
</p>
</dd>
<dt><code>=traceframe-changed,num=<var>tfnum</var>,tracepoint=<var>tpnum</var></code></dt>
<dt><code>=traceframe-changed,end</code></dt>
<dd><p>Reports that the trace frame was changed and its new number is
<var>tfnum</var>. The number of the tracepoint associated with this trace
frame is <var>tpnum</var>.
</p>
</dd>
<dt><code>=tsv-created,name=<var>name</var>,initial=<var>initial</var></code></dt>
<dd><p>Reports that the new trace state variable <var>name</var> is created with
initial value <var>initial</var>.
</p>
</dd>
<dt><code>=tsv-deleted,name=<var>name</var></code></dt>
<dt><code>=tsv-deleted</code></dt>
<dd><p>Reports that the trace state variable <var>name</var> is deleted or all
trace state variables are deleted.
</p>
</dd>
<dt><code>=tsv-modified,name=<var>name</var>,initial=<var>initial</var>[,current=<var>current</var>]</code></dt>
<dd><p>Reports that the trace state variable <var>name</var> is modified with
the initial value <var>initial</var>. The current value <var>current</var> of
trace state variable is optional and is reported if the current
value of trace state variable is known.
</p>
</dd>
<dt><code>=breakpoint-created,bkpt={...}</code></dt>
<dt><code>=breakpoint-modified,bkpt={...}</code></dt>
<dt><code>=breakpoint-deleted,id=<var>number</var></code></dt>
<dd><p>Reports that a breakpoint was created, modified, or deleted,
respectively. Only user-visible breakpoints are reported to the MI
user.
</p>
<p>The <var>bkpt</var> argument is of the same form as returned by the various
breakpoint commands; See <a href="GDB_002fMI-Breakpoint-Commands.html#GDB_002fMI-Breakpoint-Commands">GDB/MI Breakpoint Commands</a>. The
<var>number</var> is the ordinal number of the breakpoint.
</p>
<p>Note that if a breakpoint is emitted in the result record of a
command, then it will not also be emitted in an async record.
</p>
</dd>
<dt><code>=record-started,thread-group=&quot;<var>id</var>&quot;</code></dt>
<dt><code>=record-stopped,thread-group=&quot;<var>id</var>&quot;</code></dt>
<dd><p>Execution log recording was either started or stopped on an
inferior. The <var>id</var> is the <small>GDB</small> identifier of the thread
group corresponding to the affected inferior.
</p>
</dd>
<dt><code>=cmd-param-changed,param=<var>param</var>,value=<var>value</var></code></dt>
<dd><p>Reports that a parameter of the command <code>set <var>param</var></code> is
changed to <var>value</var>. In the multi-word <code>set</code> command,
the <var>param</var> is the whole parameter list to <code>set</code> command.
For example, In command <code>set check type on</code>, <var>param</var>
is <code>check type</code> and <var>value</var> is <code>on</code>.
</p>
</dd>
<dt><code>=memory-changed,thread-group=<var>id</var>,addr=<var>addr</var>,len=<var>len</var>[,type=&quot;code&quot;]</code></dt>
<dd><p>Reports that bytes from <var>addr</var> to <var>data</var> + <var>len</var> were
written in an inferior. The <var>id</var> is the identifier of the
thread group corresponding to the affected inferior. The optional
<code>type=&quot;code&quot;</code> part is reported if the memory written to holds
executable code.
</p></dd>
</dl>
<hr>
<div class="header">
<p>
Next: <a href="GDB_002fMI-Breakpoint-Information.html#GDB_002fMI-Breakpoint-Information" accesskey="n" rel="next">GDB/MI Breakpoint Information</a>, Previous: <a href="GDB_002fMI-Stream-Records.html#GDB_002fMI-Stream-Records" accesskey="p" rel="prev">GDB/MI Stream Records</a>, Up: <a href="GDB_002fMI-Output-Records.html#GDB_002fMI-Output-Records" accesskey="u" rel="up">GDB/MI Output Records</a> &nbsp; [<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>