summaryrefslogtreecommitdiff
path: root/share/doc/gdb/GDB_002fMI-Program-Execution.html
diff options
context:
space:
mode:
authoralk3pInjection <webmaster@raspii.tech>2024-02-04 16:16:35 +0800
committeralk3pInjection <webmaster@raspii.tech>2024-02-04 16:16:35 +0800
commitabdaadbcae30fe0c9a66c7516798279fdfd97750 (patch)
tree00a54a6e25601e43876d03c1a4a12a749d4a914c /share/doc/gdb/GDB_002fMI-Program-Execution.html
Import stripped Arm GNU Toolchain 13.2.Rel1HEADumineko
https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads Change-Id: I7303388733328cd98ab9aa3c30236db67f2e9e9c
Diffstat (limited to 'share/doc/gdb/GDB_002fMI-Program-Execution.html')
-rw-r--r--share/doc/gdb/GDB_002fMI-Program-Execution.html638
1 files changed, 638 insertions, 0 deletions
diff --git a/share/doc/gdb/GDB_002fMI-Program-Execution.html b/share/doc/gdb/GDB_002fMI-Program-Execution.html
new file mode 100644
index 0000000..004d991
--- /dev/null
+++ b/share/doc/gdb/GDB_002fMI-Program-Execution.html
@@ -0,0 +1,638 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<!-- Copyright (C) 1988-2023 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.1, http://www.gnu.org/software/texinfo/ -->
+<head>
+<title>Debugging with GDB: GDB/MI Program Execution</title>
+
+<meta name="description" content="Debugging with GDB: GDB/MI Program Execution">
+<meta name="keywords" content="Debugging with GDB: GDB/MI Program Execution">
+<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.html#GDB_002fMI" rel="up" title="GDB/MI">
+<link href="GDB_002fMI-Stack-Manipulation.html#GDB_002fMI-Stack-Manipulation" rel="next" title="GDB/MI Stack Manipulation">
+<link href="GDB_002fMI-Ada-Tasking-Commands.html#GDB_002fMI-Ada-Tasking-Commands" rel="previous" title="GDB/MI Ada Tasking Commands">
+<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-Program-Execution"></a>
+<div class="header">
+<p>
+Next: <a href="GDB_002fMI-Stack-Manipulation.html#GDB_002fMI-Stack-Manipulation" accesskey="n" rel="next">GDB/MI Stack Manipulation</a>, Previous: <a href="GDB_002fMI-Ada-Tasking-Commands.html#GDB_002fMI-Ada-Tasking-Commands" accesskey="p" rel="previous">GDB/MI Ada Tasking Commands</a>, Up: <a href="GDB_002fMI.html#GDB_002fMI" accesskey="u" rel="up">GDB/MI</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-Program-Execution-1"></a>
+<h3 class="section">27.13 <small>GDB/MI</small> Program Execution</h3>
+
+<p>These are the asynchronous commands which generate the out-of-band
+record &lsquo;<samp>*stopped</samp>&rsquo;. Currently <small>GDB</small> only really executes
+asynchronously with remote targets and this interaction is mimicked in
+other cases.
+</p>
+<a name="The-_002dexec_002dcontinue-Command"></a>
+<h4 class="subheading">The <code>-exec-continue</code> Command</h4>
+<a name="index-_002dexec_002dcontinue"></a>
+
+<a name="Synopsis-30"></a>
+<h4 class="subsubheading">Synopsis</h4>
+
+<div class="smallexample">
+<pre class="smallexample"> -exec-continue [--reverse] [--all|--thread-group N]
+</pre></div>
+
+<p>Resumes the execution of the inferior program, which will continue
+to execute until it reaches a debugger stop event. If the
+&lsquo;<samp>--reverse</samp>&rsquo; option is specified, execution resumes in reverse until
+it reaches a stop event. Stop events may include
+</p><ul>
+<li> breakpoints or watchpoints
+</li><li> signals or exceptions
+</li><li> the end of the process (or its beginning under &lsquo;<samp>--reverse</samp>&rsquo;)
+</li><li> the end or beginning of a replay log if one is being used.
+</li></ul>
+<p>In all-stop mode (see <a href="All_002dStop-Mode.html#All_002dStop-Mode">All-Stop Mode</a>), may resume only one thread, or all threads, depending on the
+value of the &lsquo;<samp>scheduler-locking</samp>&rsquo; variable. If &lsquo;<samp>--all</samp>&rsquo; is
+specified, all threads (in all inferiors) will be resumed. The &lsquo;<samp>--all</samp>&rsquo; option is
+ignored in all-stop mode. If the &lsquo;<samp>--thread-group</samp>&rsquo; options is
+specified, then all threads in that thread group are resumed.
+</p>
+<a name="GDB-Command-29"></a>
+<h4 class="subsubheading"><small>GDB</small> Command</h4>
+
+<p>The corresponding <small>GDB</small> corresponding is &lsquo;<samp>continue</samp>&rsquo;.
+</p>
+<a name="Example-29"></a>
+<h4 class="subsubheading">Example</h4>
+
+<div class="smallexample">
+<pre class="smallexample">-exec-continue
+^running
+(gdb)
+@Hello world
+*stopped,reason=&quot;breakpoint-hit&quot;,disp=&quot;keep&quot;,bkptno=&quot;2&quot;,frame={
+func=&quot;foo&quot;,args=[],file=&quot;hello.c&quot;,fullname=&quot;/home/foo/bar/hello.c&quot;,
+line=&quot;13&quot;,arch=&quot;i386:x86_64&quot;}
+(gdb)
+</pre></div>
+
+<p>For a &lsquo;<samp>breakpoint-hit</samp>&rsquo; stopped reason, when the breakpoint
+encountered has multiple locations, the field &lsquo;<samp>bkptno</samp>&rsquo; is
+followed by the field &lsquo;<samp>locno</samp>&rsquo;.
+</p>
+<div class="smallexample">
+<pre class="smallexample">-exec-continue
+^running
+(gdb)
+@Hello world
+*stopped,reason=&quot;breakpoint-hit&quot;,disp=&quot;keep&quot;,bkptno=&quot;2&quot;,locno=&quot;3&quot;,frame={
+func=&quot;foo&quot;,args=[],file=&quot;hello.c&quot;,fullname=&quot;/home/foo/bar/hello.c&quot;,
+line=&quot;13&quot;,arch=&quot;i386:x86_64&quot;}
+(gdb)
+</pre></div>
+
+<a name="The-_002dexec_002dfinish-Command"></a>
+<h4 class="subheading">The <code>-exec-finish</code> Command</h4>
+<a name="index-_002dexec_002dfinish"></a>
+
+<a name="Synopsis-31"></a>
+<h4 class="subsubheading">Synopsis</h4>
+
+<div class="smallexample">
+<pre class="smallexample"> -exec-finish [--reverse]
+</pre></div>
+
+<p>Resumes the execution of the inferior program until the current
+function is exited. Displays the results returned by the function.
+If the &lsquo;<samp>--reverse</samp>&rsquo; option is specified, resumes the reverse
+execution of the inferior program until the point where current
+function was called.
+</p>
+<a name="GDB-Command-30"></a>
+<h4 class="subsubheading"><small>GDB</small> Command</h4>
+
+<p>The corresponding <small>GDB</small> command is &lsquo;<samp>finish</samp>&rsquo;.
+</p>
+<a name="Example-30"></a>
+<h4 class="subsubheading">Example</h4>
+
+<p>Function returning <code>void</code>.
+</p>
+<div class="smallexample">
+<pre class="smallexample">-exec-finish
+^running
+(gdb)
+@hello from foo
+*stopped,reason=&quot;function-finished&quot;,frame={func=&quot;main&quot;,args=[],
+file=&quot;hello.c&quot;,fullname=&quot;/home/foo/bar/hello.c&quot;,line=&quot;7&quot;,arch=&quot;i386:x86_64&quot;}
+(gdb)
+</pre></div>
+
+<p>Function returning other than <code>void</code>. The name of the internal
+<small>GDB</small> variable storing the result is printed, together with the
+value itself.
+</p>
+<div class="smallexample">
+<pre class="smallexample">-exec-finish
+^running
+(gdb)
+*stopped,reason=&quot;function-finished&quot;,frame={addr=&quot;0x000107b0&quot;,func=&quot;foo&quot;,
+args=[{name=&quot;a&quot;,value=&quot;1&quot;],{name=&quot;b&quot;,value=&quot;9&quot;}},
+file=&quot;recursive2.c&quot;,fullname=&quot;/home/foo/bar/recursive2.c&quot;,line=&quot;14&quot;,
+arch=&quot;i386:x86_64&quot;},
+gdb-result-var=&quot;$1&quot;,return-value=&quot;0&quot;
+(gdb)
+</pre></div>
+
+
+<a name="The-_002dexec_002dinterrupt-Command"></a>
+<h4 class="subheading">The <code>-exec-interrupt</code> Command</h4>
+<a name="index-_002dexec_002dinterrupt"></a>
+
+<a name="Synopsis-32"></a>
+<h4 class="subsubheading">Synopsis</h4>
+
+<div class="smallexample">
+<pre class="smallexample"> -exec-interrupt [--all|--thread-group N]
+</pre></div>
+
+<p>Interrupts the background execution of the target. Note how the token
+associated with the stop message is the one for the execution command
+that has been interrupted. The token for the interrupt itself only
+appears in the &lsquo;<samp>^done</samp>&rsquo; output. If the user is trying to
+interrupt a non-running program, an error message will be printed.
+</p>
+<p>Note that when asynchronous execution is enabled, this command is
+asynchronous just like other execution commands. That is, first the
+&lsquo;<samp>^done</samp>&rsquo; response will be printed, and the target stop will be
+reported after that using the &lsquo;<samp>*stopped</samp>&rsquo; notification.
+</p>
+<p>In non-stop mode, only the context thread is interrupted by default.
+All threads (in all inferiors) will be interrupted if the
+&lsquo;<samp>--all</samp>&rsquo; option is specified. If the &lsquo;<samp>--thread-group</samp>&rsquo;
+option is specified, all threads in that group will be interrupted.
+</p>
+<a name="GDB-Command-31"></a>
+<h4 class="subsubheading"><small>GDB</small> Command</h4>
+
+<p>The corresponding <small>GDB</small> command is &lsquo;<samp>interrupt</samp>&rsquo;.
+</p>
+<a name="Example-31"></a>
+<h4 class="subsubheading">Example</h4>
+
+<div class="smallexample">
+<pre class="smallexample">(gdb)
+111-exec-continue
+111^running
+
+(gdb)
+222-exec-interrupt
+222^done
+(gdb)
+111*stopped,signal-name=&quot;SIGINT&quot;,signal-meaning=&quot;Interrupt&quot;,
+frame={addr=&quot;0x00010140&quot;,func=&quot;foo&quot;,args=[],file=&quot;try.c&quot;,
+fullname=&quot;/home/foo/bar/try.c&quot;,line=&quot;13&quot;,arch=&quot;i386:x86_64&quot;}
+(gdb)
+
+(gdb)
+-exec-interrupt
+^error,msg=&quot;mi_cmd_exec_interrupt: Inferior not executing.&quot;
+(gdb)
+</pre></div>
+
+<a name="The-_002dexec_002djump-Command"></a>
+<h4 class="subheading">The <code>-exec-jump</code> Command</h4>
+<a name="index-_002dexec_002djump"></a>
+
+<a name="Synopsis-33"></a>
+<h4 class="subsubheading">Synopsis</h4>
+
+<div class="smallexample">
+<pre class="smallexample"> -exec-jump <var>locspec</var>
+</pre></div>
+
+<p>Resumes execution of the inferior program at the address to
+which <var>locspec</var> resolves. See <a href="Location-Specifications.html#Location-Specifications">Location Specifications</a>,
+for a description of the different forms of <var>locspec</var>.
+</p>
+<a name="GDB-Command-32"></a>
+<h4 class="subsubheading"><small>GDB</small> Command</h4>
+
+<p>The corresponding <small>GDB</small> command is &lsquo;<samp>jump</samp>&rsquo;.
+</p>
+<a name="Example-32"></a>
+<h4 class="subsubheading">Example</h4>
+
+<div class="smallexample">
+<pre class="smallexample">-exec-jump foo.c:10
+*running,thread-id=&quot;all&quot;
+^running
+</pre></div>
+
+
+<a name="The-_002dexec_002dnext-Command"></a>
+<h4 class="subheading">The <code>-exec-next</code> Command</h4>
+<a name="index-_002dexec_002dnext"></a>
+
+<a name="Synopsis-34"></a>
+<h4 class="subsubheading">Synopsis</h4>
+
+<div class="smallexample">
+<pre class="smallexample"> -exec-next [--reverse]
+</pre></div>
+
+<p>Resumes execution of the inferior program, stopping when the beginning
+of the next source line is reached.
+</p>
+<p>If the &lsquo;<samp>--reverse</samp>&rsquo; option is specified, resumes reverse execution
+of the inferior program, stopping at the beginning of the previous
+source line. If you issue this command on the first line of a
+function, it will take you back to the caller of that function, to the
+source line where the function was called.
+</p>
+
+<a name="GDB-Command-33"></a>
+<h4 class="subsubheading"><small>GDB</small> Command</h4>
+
+<p>The corresponding <small>GDB</small> command is &lsquo;<samp>next</samp>&rsquo;.
+</p>
+<a name="Example-33"></a>
+<h4 class="subsubheading">Example</h4>
+
+<div class="smallexample">
+<pre class="smallexample">-exec-next
+^running
+(gdb)
+*stopped,reason=&quot;end-stepping-range&quot;,line=&quot;8&quot;,file=&quot;hello.c&quot;
+(gdb)
+</pre></div>
+
+
+<a name="The-_002dexec_002dnext_002dinstruction-Command"></a>
+<h4 class="subheading">The <code>-exec-next-instruction</code> Command</h4>
+<a name="index-_002dexec_002dnext_002dinstruction"></a>
+
+<a name="Synopsis-35"></a>
+<h4 class="subsubheading">Synopsis</h4>
+
+<div class="smallexample">
+<pre class="smallexample"> -exec-next-instruction [--reverse]
+</pre></div>
+
+<p>Executes one machine instruction. If the instruction is a function
+call, continues until the function returns. If the program stops at an
+instruction in the middle of a source line, the address will be
+printed as well.
+</p>
+<p>If the &lsquo;<samp>--reverse</samp>&rsquo; option is specified, resumes reverse execution
+of the inferior program, stopping at the previous instruction. If the
+previously executed instruction was a return from another function,
+it will continue to execute in reverse until the call to that function
+(from the current stack frame) is reached.
+</p>
+<a name="GDB-Command-34"></a>
+<h4 class="subsubheading"><small>GDB</small> Command</h4>
+
+<p>The corresponding <small>GDB</small> command is &lsquo;<samp>nexti</samp>&rsquo;.
+</p>
+<a name="Example-34"></a>
+<h4 class="subsubheading">Example</h4>
+
+<div class="smallexample">
+<pre class="smallexample">(gdb)
+-exec-next-instruction
+^running
+
+(gdb)
+*stopped,reason=&quot;end-stepping-range&quot;,
+addr=&quot;0x000100d4&quot;,line=&quot;5&quot;,file=&quot;hello.c&quot;
+(gdb)
+</pre></div>
+
+
+<a name="The-_002dexec_002dreturn-Command"></a>
+<h4 class="subheading">The <code>-exec-return</code> Command</h4>
+<a name="index-_002dexec_002dreturn"></a>
+
+<a name="Synopsis-36"></a>
+<h4 class="subsubheading">Synopsis</h4>
+
+<div class="smallexample">
+<pre class="smallexample"> -exec-return
+</pre></div>
+
+<p>Makes current function return immediately. Doesn&rsquo;t execute the inferior.
+Displays the new current frame.
+</p>
+<a name="GDB-Command-35"></a>
+<h4 class="subsubheading"><small>GDB</small> Command</h4>
+
+<p>The corresponding <small>GDB</small> command is &lsquo;<samp>return</samp>&rsquo;.
+</p>
+<a name="Example-35"></a>
+<h4 class="subsubheading">Example</h4>
+
+<div class="smallexample">
+<pre class="smallexample">(gdb)
+200-break-insert callee4
+200^done,bkpt={number=&quot;1&quot;,addr=&quot;0x00010734&quot;,
+file=&quot;../../../devo/gdb/testsuite/gdb.mi/basics.c&quot;,line=&quot;8&quot;}
+(gdb)
+000-exec-run
+000^running
+(gdb)
+000*stopped,reason=&quot;breakpoint-hit&quot;,disp=&quot;keep&quot;,bkptno=&quot;1&quot;,
+frame={func=&quot;callee4&quot;,args=[],
+file=&quot;../../../devo/gdb/testsuite/gdb.mi/basics.c&quot;,
+fullname=&quot;/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c&quot;,line=&quot;8&quot;,
+arch=&quot;i386:x86_64&quot;}
+(gdb)
+205-break-delete
+205^done
+(gdb)
+111-exec-return
+111^done,frame={level=&quot;0&quot;,func=&quot;callee3&quot;,
+args=[{name=&quot;strarg&quot;,
+value=&quot;0x11940 \&quot;A string argument.\&quot;&quot;}],
+file=&quot;../../../devo/gdb/testsuite/gdb.mi/basics.c&quot;,
+fullname=&quot;/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c&quot;,line=&quot;18&quot;,
+arch=&quot;i386:x86_64&quot;}
+(gdb)
+</pre></div>
+
+
+<a name="The-_002dexec_002drun-Command"></a>
+<h4 class="subheading">The <code>-exec-run</code> Command</h4>
+<a name="index-_002dexec_002drun"></a>
+
+<a name="Synopsis-37"></a>
+<h4 class="subsubheading">Synopsis</h4>
+
+<div class="smallexample">
+<pre class="smallexample"> -exec-run [ --all | --thread-group N ] [ --start ]
+</pre></div>
+
+<p>Starts execution of the inferior from the beginning. The inferior
+executes until either a breakpoint is encountered or the program
+exits. In the latter case the output will include an exit code, if
+the program has exited exceptionally.
+</p>
+<p>When neither the &lsquo;<samp>--all</samp>&rsquo; nor the &lsquo;<samp>--thread-group</samp>&rsquo; option
+is specified, the current inferior is started. If the
+&lsquo;<samp>--thread-group</samp>&rsquo; option is specified, it should refer to a thread
+group of type &lsquo;<samp>process</samp>&rsquo;, and that thread group will be started.
+If the &lsquo;<samp>--all</samp>&rsquo; option is specified, then all inferiors will be started.
+</p>
+<p>Using the &lsquo;<samp>--start</samp>&rsquo; option instructs the debugger to stop
+the execution at the start of the inferior&rsquo;s main subprogram,
+following the same behavior as the <code>start</code> command
+(see <a href="Starting.html#Starting">Starting</a>).
+</p>
+<a name="GDB-Command-36"></a>
+<h4 class="subsubheading"><small>GDB</small> Command</h4>
+
+<p>The corresponding <small>GDB</small> command is &lsquo;<samp>run</samp>&rsquo;.
+</p>
+<a name="Examples-2"></a>
+<h4 class="subsubheading">Examples</h4>
+
+<div class="smallexample">
+<pre class="smallexample">(gdb)
+-break-insert main
+^done,bkpt={number=&quot;1&quot;,addr=&quot;0x0001072c&quot;,file=&quot;recursive2.c&quot;,line=&quot;4&quot;}
+(gdb)
+-exec-run
+^running
+(gdb)
+*stopped,reason=&quot;breakpoint-hit&quot;,disp=&quot;keep&quot;,bkptno=&quot;1&quot;,
+frame={func=&quot;main&quot;,args=[],file=&quot;recursive2.c&quot;,
+fullname=&quot;/home/foo/bar/recursive2.c&quot;,line=&quot;4&quot;,arch=&quot;i386:x86_64&quot;}
+(gdb)
+</pre></div>
+
+<p>Program exited normally:
+</p>
+<div class="smallexample">
+<pre class="smallexample">(gdb)
+-exec-run
+^running
+(gdb)
+x = 55
+*stopped,reason=&quot;exited-normally&quot;
+(gdb)
+</pre></div>
+
+<p>Program exited exceptionally:
+</p>
+<div class="smallexample">
+<pre class="smallexample">(gdb)
+-exec-run
+^running
+(gdb)
+x = 55
+*stopped,reason=&quot;exited&quot;,exit-code=&quot;01&quot;
+(gdb)
+</pre></div>
+
+<p>Another way the program can terminate is if it receives a signal such as
+<code>SIGINT</code>. In this case, <small>GDB/MI</small> displays this:
+</p>
+<div class="smallexample">
+<pre class="smallexample">(gdb)
+*stopped,reason=&quot;exited-signalled&quot;,signal-name=&quot;SIGINT&quot;,
+signal-meaning=&quot;Interrupt&quot;
+</pre></div>
+
+
+
+
+<a name="The-_002dexec_002dstep-Command"></a>
+<h4 class="subheading">The <code>-exec-step</code> Command</h4>
+<a name="index-_002dexec_002dstep"></a>
+
+<a name="Synopsis-38"></a>
+<h4 class="subsubheading">Synopsis</h4>
+
+<div class="smallexample">
+<pre class="smallexample"> -exec-step [--reverse]
+</pre></div>
+
+<p>Resumes execution of the inferior program, stopping when the beginning
+of the next source line is reached, if the next source line is not a
+function call. If it is, stop at the first instruction of the called
+function. If the &lsquo;<samp>--reverse</samp>&rsquo; option is specified, resumes reverse
+execution of the inferior program, stopping at the beginning of the
+previously executed source line.
+</p>
+<a name="GDB-Command-37"></a>
+<h4 class="subsubheading"><small>GDB</small> Command</h4>
+
+<p>The corresponding <small>GDB</small> command is &lsquo;<samp>step</samp>&rsquo;.
+</p>
+<a name="Example-36"></a>
+<h4 class="subsubheading">Example</h4>
+
+<p>Stepping into a function:
+</p>
+<div class="smallexample">
+<pre class="smallexample">-exec-step
+^running
+(gdb)
+*stopped,reason=&quot;end-stepping-range&quot;,
+frame={func=&quot;foo&quot;,args=[{name=&quot;a&quot;,value=&quot;10&quot;},
+{name=&quot;b&quot;,value=&quot;0&quot;}],file=&quot;recursive2.c&quot;,
+fullname=&quot;/home/foo/bar/recursive2.c&quot;,line=&quot;11&quot;,arch=&quot;i386:x86_64&quot;}
+(gdb)
+</pre></div>
+
+<p>Regular stepping:
+</p>
+<div class="smallexample">
+<pre class="smallexample">-exec-step
+^running
+(gdb)
+*stopped,reason=&quot;end-stepping-range&quot;,line=&quot;14&quot;,file=&quot;recursive2.c&quot;
+(gdb)
+</pre></div>
+
+
+<a name="The-_002dexec_002dstep_002dinstruction-Command"></a>
+<h4 class="subheading">The <code>-exec-step-instruction</code> Command</h4>
+<a name="index-_002dexec_002dstep_002dinstruction"></a>
+
+<a name="Synopsis-39"></a>
+<h4 class="subsubheading">Synopsis</h4>
+
+<div class="smallexample">
+<pre class="smallexample"> -exec-step-instruction [--reverse]
+</pre></div>
+
+<p>Resumes the inferior which executes one machine instruction. If the
+&lsquo;<samp>--reverse</samp>&rsquo; option is specified, resumes reverse execution of the
+inferior program, stopping at the previously executed instruction.
+The output, once <small>GDB</small> has stopped, will vary depending on
+whether we have stopped in the middle of a source line or not. In the
+former case, the address at which the program stopped will be printed
+as well.
+</p>
+<a name="GDB-Command-38"></a>
+<h4 class="subsubheading"><small>GDB</small> Command</h4>
+
+<p>The corresponding <small>GDB</small> command is &lsquo;<samp>stepi</samp>&rsquo;.
+</p>
+<a name="Example-37"></a>
+<h4 class="subsubheading">Example</h4>
+
+<div class="smallexample">
+<pre class="smallexample">(gdb)
+-exec-step-instruction
+^running
+
+(gdb)
+*stopped,reason=&quot;end-stepping-range&quot;,
+frame={func=&quot;foo&quot;,args=[],file=&quot;try.c&quot;,
+fullname=&quot;/home/foo/bar/try.c&quot;,line=&quot;10&quot;,arch=&quot;i386:x86_64&quot;}
+(gdb)
+-exec-step-instruction
+^running
+
+(gdb)
+*stopped,reason=&quot;end-stepping-range&quot;,
+frame={addr=&quot;0x000100f4&quot;,func=&quot;foo&quot;,args=[],file=&quot;try.c&quot;,
+fullname=&quot;/home/foo/bar/try.c&quot;,line=&quot;10&quot;,arch=&quot;i386:x86_64&quot;}
+(gdb)
+</pre></div>
+
+
+<a name="The-_002dexec_002duntil-Command"></a>
+<h4 class="subheading">The <code>-exec-until</code> Command</h4>
+<a name="index-_002dexec_002duntil"></a>
+
+<a name="Synopsis-40"></a>
+<h4 class="subsubheading">Synopsis</h4>
+
+<div class="smallexample">
+<pre class="smallexample"> -exec-until [ <var>locspec</var> ]
+</pre></div>
+
+<p>Executes the inferior until it reaches the address to which
+<var>locspec</var> resolves. If there is no argument, the inferior
+executes until it reaches a source line greater than the current one.
+The reason for stopping in this case will be &lsquo;<samp>location-reached</samp>&rsquo;.
+</p>
+<a name="GDB-Command-39"></a>
+<h4 class="subsubheading"><small>GDB</small> Command</h4>
+
+<p>The corresponding <small>GDB</small> command is &lsquo;<samp>until</samp>&rsquo;.
+</p>
+<a name="Example-38"></a>
+<h4 class="subsubheading">Example</h4>
+
+<div class="smallexample">
+<pre class="smallexample">(gdb)
+-exec-until recursive2.c:6
+^running
+(gdb)
+x = 55
+*stopped,reason=&quot;location-reached&quot;,frame={func=&quot;main&quot;,args=[],
+file=&quot;recursive2.c&quot;,fullname=&quot;/home/foo/bar/recursive2.c&quot;,line=&quot;6&quot;,
+arch=&quot;i386:x86_64&quot;}
+(gdb)
+</pre></div>
+
+
+<hr>
+<div class="header">
+<p>
+Next: <a href="GDB_002fMI-Stack-Manipulation.html#GDB_002fMI-Stack-Manipulation" accesskey="n" rel="next">GDB/MI Stack Manipulation</a>, Previous: <a href="GDB_002fMI-Ada-Tasking-Commands.html#GDB_002fMI-Ada-Tasking-Commands" accesskey="p" rel="previous">GDB/MI Ada Tasking Commands</a>, Up: <a href="GDB_002fMI.html#GDB_002fMI" accesskey="u" rel="up">GDB/MI</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>