Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

624 lines
22KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Copyright (C) 1988-2020 Free Software Foundation, Inc.
  4. Permission is granted to copy, distribute and/or modify this document
  5. under the terms of the GNU Free Documentation License, Version 1.3 or
  6. any later version published by the Free Software Foundation; with the
  7. Invariant Sections being "Free Software" and "Free Software Needs
  8. Free Documentation", with the Front-Cover Texts being "A GNU Manual,"
  9. and with the Back-Cover Texts as in (a) below.
  10. (a) The FSF's Back-Cover Text is: "You are free to copy and modify
  11. this GNU Manual. Buying copies from GNU Press supports the FSF in
  12. developing GNU and promoting software freedom." -->
  13. <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
  14. <head>
  15. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  16. <title>GDB/MI Program Execution (Debugging with GDB)</title>
  17. <meta name="description" content="GDB/MI Program Execution (Debugging with GDB)">
  18. <meta name="keywords" content="GDB/MI Program Execution (Debugging with GDB)">
  19. <meta name="resource-type" content="document">
  20. <meta name="distribution" content="global">
  21. <meta name="Generator" content="makeinfo">
  22. <link href="index.html#Top" rel="start" title="Top">
  23. <link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index">
  24. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  25. <link href="GDB_002fMI.html#GDB_002fMI" rel="up" title="GDB/MI">
  26. <link href="GDB_002fMI-Stack-Manipulation.html#GDB_002fMI-Stack-Manipulation" rel="next" title="GDB/MI Stack Manipulation">
  27. <link href="GDB_002fMI-Ada-Tasking-Commands.html#GDB_002fMI-Ada-Tasking-Commands" rel="prev" title="GDB/MI Ada Tasking Commands">
  28. <style type="text/css">
  29. <!--
  30. a.summary-letter {text-decoration: none}
  31. blockquote.indentedblock {margin-right: 0em}
  32. blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
  33. blockquote.smallquotation {font-size: smaller}
  34. div.display {margin-left: 3.2em}
  35. div.example {margin-left: 3.2em}
  36. div.lisp {margin-left: 3.2em}
  37. div.smalldisplay {margin-left: 3.2em}
  38. div.smallexample {margin-left: 3.2em}
  39. div.smalllisp {margin-left: 3.2em}
  40. kbd {font-style: oblique}
  41. pre.display {font-family: inherit}
  42. pre.format {font-family: inherit}
  43. pre.menu-comment {font-family: serif}
  44. pre.menu-preformatted {font-family: serif}
  45. pre.smalldisplay {font-family: inherit; font-size: smaller}
  46. pre.smallexample {font-size: smaller}
  47. pre.smallformat {font-family: inherit; font-size: smaller}
  48. pre.smalllisp {font-size: smaller}
  49. span.nolinebreak {white-space: nowrap}
  50. span.roman {font-family: initial; font-weight: normal}
  51. span.sansserif {font-family: sans-serif; font-weight: normal}
  52. ul.no-bullet {list-style: none}
  53. -->
  54. </style>
  55. </head>
  56. <body lang="en">
  57. <a name="GDB_002fMI-Program-Execution"></a>
  58. <div class="header">
  59. <p>
  60. 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="prev">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>
  61. </div>
  62. <hr>
  63. <a name="GDB_002fMI-Program-Execution-1"></a>
  64. <h3 class="section">27.13 <small>GDB/MI</small> Program Execution</h3>
  65. <p>These are the asynchronous commands which generate the out-of-band
  66. record &lsquo;<samp>*stopped</samp>&rsquo;. Currently <small>GDB</small> only really executes
  67. asynchronously with remote targets and this interaction is mimicked in
  68. other cases.
  69. </p>
  70. <a name="The-_002dexec_002dcontinue-Command"></a>
  71. <h4 class="subheading">The <code>-exec-continue</code> Command</h4>
  72. <a name="index-_002dexec_002dcontinue"></a>
  73. <a name="Synopsis-30"></a>
  74. <h4 class="subsubheading">Synopsis</h4>
  75. <div class="smallexample">
  76. <pre class="smallexample"> -exec-continue [--reverse] [--all|--thread-group N]
  77. </pre></div>
  78. <p>Resumes the execution of the inferior program, which will continue
  79. to execute until it reaches a debugger stop event. If the
  80. &lsquo;<samp>--reverse</samp>&rsquo; option is specified, execution resumes in reverse until
  81. it reaches a stop event. Stop events may include
  82. </p><ul>
  83. <li> breakpoints or watchpoints
  84. </li><li> signals or exceptions
  85. </li><li> the end of the process (or its beginning under &lsquo;<samp>--reverse</samp>&rsquo;)
  86. </li><li> the end or beginning of a replay log if one is being used.
  87. </li></ul>
  88. <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
  89. value of the &lsquo;<samp>scheduler-locking</samp>&rsquo; variable. If &lsquo;<samp>--all</samp>&rsquo; is
  90. specified, all threads (in all inferiors) will be resumed. The &lsquo;<samp>--all</samp>&rsquo; option is
  91. ignored in all-stop mode. If the &lsquo;<samp>--thread-group</samp>&rsquo; options is
  92. specified, then all threads in that thread group are resumed.
  93. </p>
  94. <a name="GDB-Command-29"></a>
  95. <h4 class="subsubheading"><small>GDB</small> Command</h4>
  96. <p>The corresponding <small>GDB</small> corresponding is &lsquo;<samp>continue</samp>&rsquo;.
  97. </p>
  98. <a name="Example-29"></a>
  99. <h4 class="subsubheading">Example</h4>
  100. <div class="smallexample">
  101. <pre class="smallexample">-exec-continue
  102. ^running
  103. (gdb)
  104. @Hello world
  105. *stopped,reason=&quot;breakpoint-hit&quot;,disp=&quot;keep&quot;,bkptno=&quot;2&quot;,frame={
  106. func=&quot;foo&quot;,args=[],file=&quot;hello.c&quot;,fullname=&quot;/home/foo/bar/hello.c&quot;,
  107. line=&quot;13&quot;,arch=&quot;i386:x86_64&quot;}
  108. (gdb)
  109. </pre></div>
  110. <a name="The-_002dexec_002dfinish-Command"></a>
  111. <h4 class="subheading">The <code>-exec-finish</code> Command</h4>
  112. <a name="index-_002dexec_002dfinish"></a>
  113. <a name="Synopsis-31"></a>
  114. <h4 class="subsubheading">Synopsis</h4>
  115. <div class="smallexample">
  116. <pre class="smallexample"> -exec-finish [--reverse]
  117. </pre></div>
  118. <p>Resumes the execution of the inferior program until the current
  119. function is exited. Displays the results returned by the function.
  120. If the &lsquo;<samp>--reverse</samp>&rsquo; option is specified, resumes the reverse
  121. execution of the inferior program until the point where current
  122. function was called.
  123. </p>
  124. <a name="GDB-Command-30"></a>
  125. <h4 class="subsubheading"><small>GDB</small> Command</h4>
  126. <p>The corresponding <small>GDB</small> command is &lsquo;<samp>finish</samp>&rsquo;.
  127. </p>
  128. <a name="Example-30"></a>
  129. <h4 class="subsubheading">Example</h4>
  130. <p>Function returning <code>void</code>.
  131. </p>
  132. <div class="smallexample">
  133. <pre class="smallexample">-exec-finish
  134. ^running
  135. (gdb)
  136. @hello from foo
  137. *stopped,reason=&quot;function-finished&quot;,frame={func=&quot;main&quot;,args=[],
  138. file=&quot;hello.c&quot;,fullname=&quot;/home/foo/bar/hello.c&quot;,line=&quot;7&quot;,arch=&quot;i386:x86_64&quot;}
  139. (gdb)
  140. </pre></div>
  141. <p>Function returning other than <code>void</code>. The name of the internal
  142. <small>GDB</small> variable storing the result is printed, together with the
  143. value itself.
  144. </p>
  145. <div class="smallexample">
  146. <pre class="smallexample">-exec-finish
  147. ^running
  148. (gdb)
  149. *stopped,reason=&quot;function-finished&quot;,frame={addr=&quot;0x000107b0&quot;,func=&quot;foo&quot;,
  150. args=[{name=&quot;a&quot;,value=&quot;1&quot;],{name=&quot;b&quot;,value=&quot;9&quot;}},
  151. file=&quot;recursive2.c&quot;,fullname=&quot;/home/foo/bar/recursive2.c&quot;,line=&quot;14&quot;,
  152. arch=&quot;i386:x86_64&quot;},
  153. gdb-result-var=&quot;$1&quot;,return-value=&quot;0&quot;
  154. (gdb)
  155. </pre></div>
  156. <a name="The-_002dexec_002dinterrupt-Command"></a>
  157. <h4 class="subheading">The <code>-exec-interrupt</code> Command</h4>
  158. <a name="index-_002dexec_002dinterrupt"></a>
  159. <a name="Synopsis-32"></a>
  160. <h4 class="subsubheading">Synopsis</h4>
  161. <div class="smallexample">
  162. <pre class="smallexample"> -exec-interrupt [--all|--thread-group N]
  163. </pre></div>
  164. <p>Interrupts the background execution of the target. Note how the token
  165. associated with the stop message is the one for the execution command
  166. that has been interrupted. The token for the interrupt itself only
  167. appears in the &lsquo;<samp>^done</samp>&rsquo; output. If the user is trying to
  168. interrupt a non-running program, an error message will be printed.
  169. </p>
  170. <p>Note that when asynchronous execution is enabled, this command is
  171. asynchronous just like other execution commands. That is, first the
  172. &lsquo;<samp>^done</samp>&rsquo; response will be printed, and the target stop will be
  173. reported after that using the &lsquo;<samp>*stopped</samp>&rsquo; notification.
  174. </p>
  175. <p>In non-stop mode, only the context thread is interrupted by default.
  176. All threads (in all inferiors) will be interrupted if the
  177. &lsquo;<samp>--all</samp>&rsquo; option is specified. If the &lsquo;<samp>--thread-group</samp>&rsquo;
  178. option is specified, all threads in that group will be interrupted.
  179. </p>
  180. <a name="GDB-Command-31"></a>
  181. <h4 class="subsubheading"><small>GDB</small> Command</h4>
  182. <p>The corresponding <small>GDB</small> command is &lsquo;<samp>interrupt</samp>&rsquo;.
  183. </p>
  184. <a name="Example-31"></a>
  185. <h4 class="subsubheading">Example</h4>
  186. <div class="smallexample">
  187. <pre class="smallexample">(gdb)
  188. 111-exec-continue
  189. 111^running
  190. (gdb)
  191. 222-exec-interrupt
  192. 222^done
  193. (gdb)
  194. 111*stopped,signal-name=&quot;SIGINT&quot;,signal-meaning=&quot;Interrupt&quot;,
  195. frame={addr=&quot;0x00010140&quot;,func=&quot;foo&quot;,args=[],file=&quot;try.c&quot;,
  196. fullname=&quot;/home/foo/bar/try.c&quot;,line=&quot;13&quot;,arch=&quot;i386:x86_64&quot;}
  197. (gdb)
  198. (gdb)
  199. -exec-interrupt
  200. ^error,msg=&quot;mi_cmd_exec_interrupt: Inferior not executing.&quot;
  201. (gdb)
  202. </pre></div>
  203. <a name="The-_002dexec_002djump-Command"></a>
  204. <h4 class="subheading">The <code>-exec-jump</code> Command</h4>
  205. <a name="index-_002dexec_002djump"></a>
  206. <a name="Synopsis-33"></a>
  207. <h4 class="subsubheading">Synopsis</h4>
  208. <div class="smallexample">
  209. <pre class="smallexample"> -exec-jump <var>location</var>
  210. </pre></div>
  211. <p>Resumes execution of the inferior program at the location specified by
  212. parameter. See <a href="Specify-Location.html#Specify-Location">Specify Location</a>, for a description of the
  213. different forms of <var>location</var>.
  214. </p>
  215. <a name="GDB-Command-32"></a>
  216. <h4 class="subsubheading"><small>GDB</small> Command</h4>
  217. <p>The corresponding <small>GDB</small> command is &lsquo;<samp>jump</samp>&rsquo;.
  218. </p>
  219. <a name="Example-32"></a>
  220. <h4 class="subsubheading">Example</h4>
  221. <div class="smallexample">
  222. <pre class="smallexample">-exec-jump foo.c:10
  223. *running,thread-id=&quot;all&quot;
  224. ^running
  225. </pre></div>
  226. <a name="The-_002dexec_002dnext-Command"></a>
  227. <h4 class="subheading">The <code>-exec-next</code> Command</h4>
  228. <a name="index-_002dexec_002dnext"></a>
  229. <a name="Synopsis-34"></a>
  230. <h4 class="subsubheading">Synopsis</h4>
  231. <div class="smallexample">
  232. <pre class="smallexample"> -exec-next [--reverse]
  233. </pre></div>
  234. <p>Resumes execution of the inferior program, stopping when the beginning
  235. of the next source line is reached.
  236. </p>
  237. <p>If the &lsquo;<samp>--reverse</samp>&rsquo; option is specified, resumes reverse execution
  238. of the inferior program, stopping at the beginning of the previous
  239. source line. If you issue this command on the first line of a
  240. function, it will take you back to the caller of that function, to the
  241. source line where the function was called.
  242. </p>
  243. <a name="GDB-Command-33"></a>
  244. <h4 class="subsubheading"><small>GDB</small> Command</h4>
  245. <p>The corresponding <small>GDB</small> command is &lsquo;<samp>next</samp>&rsquo;.
  246. </p>
  247. <a name="Example-33"></a>
  248. <h4 class="subsubheading">Example</h4>
  249. <div class="smallexample">
  250. <pre class="smallexample">-exec-next
  251. ^running
  252. (gdb)
  253. *stopped,reason=&quot;end-stepping-range&quot;,line=&quot;8&quot;,file=&quot;hello.c&quot;
  254. (gdb)
  255. </pre></div>
  256. <a name="The-_002dexec_002dnext_002dinstruction-Command"></a>
  257. <h4 class="subheading">The <code>-exec-next-instruction</code> Command</h4>
  258. <a name="index-_002dexec_002dnext_002dinstruction"></a>
  259. <a name="Synopsis-35"></a>
  260. <h4 class="subsubheading">Synopsis</h4>
  261. <div class="smallexample">
  262. <pre class="smallexample"> -exec-next-instruction [--reverse]
  263. </pre></div>
  264. <p>Executes one machine instruction. If the instruction is a function
  265. call, continues until the function returns. If the program stops at an
  266. instruction in the middle of a source line, the address will be
  267. printed as well.
  268. </p>
  269. <p>If the &lsquo;<samp>--reverse</samp>&rsquo; option is specified, resumes reverse execution
  270. of the inferior program, stopping at the previous instruction. If the
  271. previously executed instruction was a return from another function,
  272. it will continue to execute in reverse until the call to that function
  273. (from the current stack frame) is reached.
  274. </p>
  275. <a name="GDB-Command-34"></a>
  276. <h4 class="subsubheading"><small>GDB</small> Command</h4>
  277. <p>The corresponding <small>GDB</small> command is &lsquo;<samp>nexti</samp>&rsquo;.
  278. </p>
  279. <a name="Example-34"></a>
  280. <h4 class="subsubheading">Example</h4>
  281. <div class="smallexample">
  282. <pre class="smallexample">(gdb)
  283. -exec-next-instruction
  284. ^running
  285. (gdb)
  286. *stopped,reason=&quot;end-stepping-range&quot;,
  287. addr=&quot;0x000100d4&quot;,line=&quot;5&quot;,file=&quot;hello.c&quot;
  288. (gdb)
  289. </pre></div>
  290. <a name="The-_002dexec_002dreturn-Command"></a>
  291. <h4 class="subheading">The <code>-exec-return</code> Command</h4>
  292. <a name="index-_002dexec_002dreturn"></a>
  293. <a name="Synopsis-36"></a>
  294. <h4 class="subsubheading">Synopsis</h4>
  295. <div class="smallexample">
  296. <pre class="smallexample"> -exec-return
  297. </pre></div>
  298. <p>Makes current function return immediately. Doesn&rsquo;t execute the inferior.
  299. Displays the new current frame.
  300. </p>
  301. <a name="GDB-Command-35"></a>
  302. <h4 class="subsubheading"><small>GDB</small> Command</h4>
  303. <p>The corresponding <small>GDB</small> command is &lsquo;<samp>return</samp>&rsquo;.
  304. </p>
  305. <a name="Example-35"></a>
  306. <h4 class="subsubheading">Example</h4>
  307. <div class="smallexample">
  308. <pre class="smallexample">(gdb)
  309. 200-break-insert callee4
  310. 200^done,bkpt={number=&quot;1&quot;,addr=&quot;0x00010734&quot;,
  311. file=&quot;../../../devo/gdb/testsuite/gdb.mi/basics.c&quot;,line=&quot;8&quot;}
  312. (gdb)
  313. 000-exec-run
  314. 000^running
  315. (gdb)
  316. 000*stopped,reason=&quot;breakpoint-hit&quot;,disp=&quot;keep&quot;,bkptno=&quot;1&quot;,
  317. frame={func=&quot;callee4&quot;,args=[],
  318. file=&quot;../../../devo/gdb/testsuite/gdb.mi/basics.c&quot;,
  319. fullname=&quot;/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c&quot;,line=&quot;8&quot;,
  320. arch=&quot;i386:x86_64&quot;}
  321. (gdb)
  322. 205-break-delete
  323. 205^done
  324. (gdb)
  325. 111-exec-return
  326. 111^done,frame={level=&quot;0&quot;,func=&quot;callee3&quot;,
  327. args=[{name=&quot;strarg&quot;,
  328. value=&quot;0x11940 \&quot;A string argument.\&quot;&quot;}],
  329. file=&quot;../../../devo/gdb/testsuite/gdb.mi/basics.c&quot;,
  330. fullname=&quot;/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c&quot;,line=&quot;18&quot;,
  331. arch=&quot;i386:x86_64&quot;}
  332. (gdb)
  333. </pre></div>
  334. <a name="The-_002dexec_002drun-Command"></a>
  335. <h4 class="subheading">The <code>-exec-run</code> Command</h4>
  336. <a name="index-_002dexec_002drun"></a>
  337. <a name="Synopsis-37"></a>
  338. <h4 class="subsubheading">Synopsis</h4>
  339. <div class="smallexample">
  340. <pre class="smallexample"> -exec-run [ --all | --thread-group N ] [ --start ]
  341. </pre></div>
  342. <p>Starts execution of the inferior from the beginning. The inferior
  343. executes until either a breakpoint is encountered or the program
  344. exits. In the latter case the output will include an exit code, if
  345. the program has exited exceptionally.
  346. </p>
  347. <p>When neither the &lsquo;<samp>--all</samp>&rsquo; nor the &lsquo;<samp>--thread-group</samp>&rsquo; option
  348. is specified, the current inferior is started. If the
  349. &lsquo;<samp>--thread-group</samp>&rsquo; option is specified, it should refer to a thread
  350. group of type &lsquo;<samp>process</samp>&rsquo;, and that thread group will be started.
  351. If the &lsquo;<samp>--all</samp>&rsquo; option is specified, then all inferiors will be started.
  352. </p>
  353. <p>Using the &lsquo;<samp>--start</samp>&rsquo; option instructs the debugger to stop
  354. the execution at the start of the inferior&rsquo;s main subprogram,
  355. following the same behavior as the <code>start</code> command
  356. (see <a href="Starting.html#Starting">Starting</a>).
  357. </p>
  358. <a name="GDB-Command-36"></a>
  359. <h4 class="subsubheading"><small>GDB</small> Command</h4>
  360. <p>The corresponding <small>GDB</small> command is &lsquo;<samp>run</samp>&rsquo;.
  361. </p>
  362. <a name="Examples-2"></a>
  363. <h4 class="subsubheading">Examples</h4>
  364. <div class="smallexample">
  365. <pre class="smallexample">(gdb)
  366. -break-insert main
  367. ^done,bkpt={number=&quot;1&quot;,addr=&quot;0x0001072c&quot;,file=&quot;recursive2.c&quot;,line=&quot;4&quot;}
  368. (gdb)
  369. -exec-run
  370. ^running
  371. (gdb)
  372. *stopped,reason=&quot;breakpoint-hit&quot;,disp=&quot;keep&quot;,bkptno=&quot;1&quot;,
  373. frame={func=&quot;main&quot;,args=[],file=&quot;recursive2.c&quot;,
  374. fullname=&quot;/home/foo/bar/recursive2.c&quot;,line=&quot;4&quot;,arch=&quot;i386:x86_64&quot;}
  375. (gdb)
  376. </pre></div>
  377. <p>Program exited normally:
  378. </p>
  379. <div class="smallexample">
  380. <pre class="smallexample">(gdb)
  381. -exec-run
  382. ^running
  383. (gdb)
  384. x = 55
  385. *stopped,reason=&quot;exited-normally&quot;
  386. (gdb)
  387. </pre></div>
  388. <p>Program exited exceptionally:
  389. </p>
  390. <div class="smallexample">
  391. <pre class="smallexample">(gdb)
  392. -exec-run
  393. ^running
  394. (gdb)
  395. x = 55
  396. *stopped,reason=&quot;exited&quot;,exit-code=&quot;01&quot;
  397. (gdb)
  398. </pre></div>
  399. <p>Another way the program can terminate is if it receives a signal such as
  400. <code>SIGINT</code>. In this case, <small>GDB/MI</small> displays this:
  401. </p>
  402. <div class="smallexample">
  403. <pre class="smallexample">(gdb)
  404. *stopped,reason=&quot;exited-signalled&quot;,signal-name=&quot;SIGINT&quot;,
  405. signal-meaning=&quot;Interrupt&quot;
  406. </pre></div>
  407. <a name="The-_002dexec_002dstep-Command"></a>
  408. <h4 class="subheading">The <code>-exec-step</code> Command</h4>
  409. <a name="index-_002dexec_002dstep"></a>
  410. <a name="Synopsis-38"></a>
  411. <h4 class="subsubheading">Synopsis</h4>
  412. <div class="smallexample">
  413. <pre class="smallexample"> -exec-step [--reverse]
  414. </pre></div>
  415. <p>Resumes execution of the inferior program, stopping when the beginning
  416. of the next source line is reached, if the next source line is not a
  417. function call. If it is, stop at the first instruction of the called
  418. function. If the &lsquo;<samp>--reverse</samp>&rsquo; option is specified, resumes reverse
  419. execution of the inferior program, stopping at the beginning of the
  420. previously executed source line.
  421. </p>
  422. <a name="GDB-Command-37"></a>
  423. <h4 class="subsubheading"><small>GDB</small> Command</h4>
  424. <p>The corresponding <small>GDB</small> command is &lsquo;<samp>step</samp>&rsquo;.
  425. </p>
  426. <a name="Example-36"></a>
  427. <h4 class="subsubheading">Example</h4>
  428. <p>Stepping into a function:
  429. </p>
  430. <div class="smallexample">
  431. <pre class="smallexample">-exec-step
  432. ^running
  433. (gdb)
  434. *stopped,reason=&quot;end-stepping-range&quot;,
  435. frame={func=&quot;foo&quot;,args=[{name=&quot;a&quot;,value=&quot;10&quot;},
  436. {name=&quot;b&quot;,value=&quot;0&quot;}],file=&quot;recursive2.c&quot;,
  437. fullname=&quot;/home/foo/bar/recursive2.c&quot;,line=&quot;11&quot;,arch=&quot;i386:x86_64&quot;}
  438. (gdb)
  439. </pre></div>
  440. <p>Regular stepping:
  441. </p>
  442. <div class="smallexample">
  443. <pre class="smallexample">-exec-step
  444. ^running
  445. (gdb)
  446. *stopped,reason=&quot;end-stepping-range&quot;,line=&quot;14&quot;,file=&quot;recursive2.c&quot;
  447. (gdb)
  448. </pre></div>
  449. <a name="The-_002dexec_002dstep_002dinstruction-Command"></a>
  450. <h4 class="subheading">The <code>-exec-step-instruction</code> Command</h4>
  451. <a name="index-_002dexec_002dstep_002dinstruction"></a>
  452. <a name="Synopsis-39"></a>
  453. <h4 class="subsubheading">Synopsis</h4>
  454. <div class="smallexample">
  455. <pre class="smallexample"> -exec-step-instruction [--reverse]
  456. </pre></div>
  457. <p>Resumes the inferior which executes one machine instruction. If the
  458. &lsquo;<samp>--reverse</samp>&rsquo; option is specified, resumes reverse execution of the
  459. inferior program, stopping at the previously executed instruction.
  460. The output, once <small>GDB</small> has stopped, will vary depending on
  461. whether we have stopped in the middle of a source line or not. In the
  462. former case, the address at which the program stopped will be printed
  463. as well.
  464. </p>
  465. <a name="GDB-Command-38"></a>
  466. <h4 class="subsubheading"><small>GDB</small> Command</h4>
  467. <p>The corresponding <small>GDB</small> command is &lsquo;<samp>stepi</samp>&rsquo;.
  468. </p>
  469. <a name="Example-37"></a>
  470. <h4 class="subsubheading">Example</h4>
  471. <div class="smallexample">
  472. <pre class="smallexample">(gdb)
  473. -exec-step-instruction
  474. ^running
  475. (gdb)
  476. *stopped,reason=&quot;end-stepping-range&quot;,
  477. frame={func=&quot;foo&quot;,args=[],file=&quot;try.c&quot;,
  478. fullname=&quot;/home/foo/bar/try.c&quot;,line=&quot;10&quot;,arch=&quot;i386:x86_64&quot;}
  479. (gdb)
  480. -exec-step-instruction
  481. ^running
  482. (gdb)
  483. *stopped,reason=&quot;end-stepping-range&quot;,
  484. frame={addr=&quot;0x000100f4&quot;,func=&quot;foo&quot;,args=[],file=&quot;try.c&quot;,
  485. fullname=&quot;/home/foo/bar/try.c&quot;,line=&quot;10&quot;,arch=&quot;i386:x86_64&quot;}
  486. (gdb)
  487. </pre></div>
  488. <a name="The-_002dexec_002duntil-Command"></a>
  489. <h4 class="subheading">The <code>-exec-until</code> Command</h4>
  490. <a name="index-_002dexec_002duntil"></a>
  491. <a name="Synopsis-40"></a>
  492. <h4 class="subsubheading">Synopsis</h4>
  493. <div class="smallexample">
  494. <pre class="smallexample"> -exec-until [ <var>location</var> ]
  495. </pre></div>
  496. <p>Executes the inferior until the <var>location</var> specified in the
  497. argument is reached. If there is no argument, the inferior executes
  498. until a source line greater than the current one is reached. The
  499. reason for stopping in this case will be &lsquo;<samp>location-reached</samp>&rsquo;.
  500. </p>
  501. <a name="GDB-Command-39"></a>
  502. <h4 class="subsubheading"><small>GDB</small> Command</h4>
  503. <p>The corresponding <small>GDB</small> command is &lsquo;<samp>until</samp>&rsquo;.
  504. </p>
  505. <a name="Example-38"></a>
  506. <h4 class="subsubheading">Example</h4>
  507. <div class="smallexample">
  508. <pre class="smallexample">(gdb)
  509. -exec-until recursive2.c:6
  510. ^running
  511. (gdb)
  512. x = 55
  513. *stopped,reason=&quot;location-reached&quot;,frame={func=&quot;main&quot;,args=[],
  514. file=&quot;recursive2.c&quot;,fullname=&quot;/home/foo/bar/recursive2.c&quot;,line=&quot;6&quot;,
  515. arch=&quot;i386:x86_64&quot;}
  516. (gdb)
  517. </pre></div>
  518. <hr>
  519. <div class="header">
  520. <p>
  521. 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="prev">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>
  522. </div>
  523. </body>
  524. </html>