-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
1 lines (1 loc) · 777 KB
/
index.html
1
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta http-equiv="Content-Style-Type" content="text/css" /><meta name="description" content="GDB/MI Program Context (Debugging with GDB)" /><meta name="keywords" content="GDB/MI Program Context (Debugging with GDB)" /><meta name="generator" content="Aspose.Words for .NET 22.1.0" /><title>GDB/MI Program Context (Debugging with GDB)</title><style type="text/css">body { font-family:'Times New Roman'; font-size:12pt }h1, h2, h3, h4, h5, h6, p { margin:0pt }li, table { margin-top:0pt; margin-bottom:0pt }h1 { margin-top:12pt; margin-bottom:0pt; page-break-inside:avoid; page-break-after:avoid; font-family:Calibri; font-size:24pt; font-weight:bold; font-style:normal; color:#2f5496 }h2 { margin-top:2pt; margin-bottom:0pt; page-break-inside:avoid; page-break-after:avoid; font-family:Calibri; font-size:18pt; font-weight:bold; font-style:normal; color:#2f5496 }h3 { margin-top:2pt; margin-bottom:0pt; page-break-inside:avoid; page-break-after:avoid; font-family:Calibri; font-size:14pt; font-weight:bold; font-style:normal; color:#1f3763 }h4 { margin-top:2pt; margin-bottom:0pt; page-break-inside:avoid; page-break-after:avoid; font-family:Calibri; font-size:12pt; font-weight:bold; font-style:normal; color:#2f5496 }h5 { margin-top:2pt; margin-bottom:0pt; page-break-inside:avoid; page-break-after:avoid; font-family:Calibri; font-size:10pt; font-weight:bold; font-style:normal; color:#2f5496 }h6 { margin-top:2pt; margin-bottom:0pt; page-break-inside:avoid; page-break-after:avoid; font-family:Calibri; font-size:8pt; font-weight:bold; font-style:normal; color:#1f3763 }.li { font-family:'Times New Roman'; font-size:12pt }.li0 { font-family:'Times New Roman'; font-size:12pt }.p { font-family:'Times New Roman'; font-size:12pt }.p0 { font-family:'Times New Roman'; font-size:12pt }.presmallexample1 { font-family:'Times New Roman'; font-size:10pt }.presmallexample { font-family:'Times New Roman'; font-size:10pt }.presmallexample0 { font-family:'Times New Roman'; font-size:10pt }span.Heading1Char { font-family:'Calibri Light'; font-size:16pt; color:#2f5496 }span.Heading2Char { font-family:'Calibri Light'; font-size:13pt; color:#2f5496 }span.Heading3Char { font-family:'Calibri Light'; font-size:12pt; color:#1f3763 }span.Heading4Char { font-family:'Calibri Light'; font-style:italic; color:#2f5496 }span.Heading5Char { font-family:'Calibri Light'; color:#2f5496 }span.Heading6Char { font-family:'Calibri Light'; color:#1f3763 }span.spanroman { font-weight:normal }span.spanspanspanroman { font-weight:normal }.menu { }.table { }</style></head><body><div><p class="p" style="margin-bottom:12pt"><a name="GDB_002fMI-Program-Context"></a><span>Next: </span><a href="GDB_002fMI-Thread-Commands.html#GDB_002fMI-Thread-Commands" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Thread Commands</span></a><span>, Previous: </span><a href="GDB_002fMI-Catchpoint-Commands.html#GDB_002fMI-Catchpoint-Commands" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Catchpoint Commands</span></a><span>, Up: </span><a href="GDB_002fMI.html#GDB_002fMI" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><h3 style="margin-top:14.05pt; margin-bottom:14.05pt; page-break-inside:auto; page-break-after:auto"><a name="GDB_002fMI-Program-Context-1"></a><span style="font-family:'Times New Roman'; color:#000000">27.10 </span><span style="font-family:'Times New Roman'; font-size:11.5pt; color:#000000">GDB/MI</span><span style="font-family:'Times New Roman'; color:#000000"> Program Context</span><a name="The-_002dexec_002darguments-Command"></a></h3><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-exec-arguments</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dexec_002darguments"></a><a name="Synopsis-21"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-exec-arguments </span><span style="font-family:'Consolas'; font-style:italic">args</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Set the inferior program arguments, to be used in the next ‘</span><span style="font-family:'Consolas'; font-size:10pt">-exec-run</span><span>’. </span><a name="GDB-Command-20"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">set args</span><span>’. </span><a name="Example-20"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-exec-arguments -v word</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002denvironment_002dcd-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-environment-cd</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002denvironment_002dcd"></a><a name="Synopsis-22"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-environment-cd </span><span style="font-family:'Consolas'; font-style:italic">pathdir</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Set </span><span style="font-size:10pt">GDB</span><span>’s working directory. </span><a name="GDB-Command-21"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">cd</span><span>’. </span><a name="Example-21"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-environment-cd /kwikemart/marge/ezannoni/flathead-dev/devo/gdb</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002denvironment_002ddirectory-Comma"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-environment-directory</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002denvironment_002ddirectory"></a><a name="Synopsis-23"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-environment-directory [ -r ] [ </span><span style="font-family:'Consolas'; font-style:italic">pathdir</span><span style="font-family:'Consolas'"> ]+</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Add directories </span><span style="font-style:italic">pathdir</span><span> to beginning of search path for source files. If the ‘</span><span style="font-family:'Consolas'; font-size:10pt">-r</span><span>’ option is used, the search path is reset to the default search path. If directories </span><span style="font-style:italic">pathdir</span><span> are supplied in addition to the ‘</span><span style="font-family:'Consolas'; font-size:10pt">-r</span><span>’ option, the search path is first reset and then addition occurs as normal. Multiple directories may be specified, separated by blanks. Specifying multiple directories in a single command results in the directories added to the beginning of the search path in the same order they were presented in the command. If blanks are needed as part of a directory name, double-quotes should be used around the name. In the command output, the path will show up separated by the system directory-separator character. The directory-separator character must not be used in any directory name. If no directories are specified, the current search path is displayed. </span><a name="GDB-Command-22"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">dir</span><span>’. </span><a name="Example-22"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-environment-directory /kwikemart/marge/ezannoni/flathead-dev/devo/gdb</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,source-path="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb:$cdir:$cwd"</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-environment-directory ""</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,source-path="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb:$cdir:$cwd"</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-environment-directory -r /home/jjohnstn/src/gdb /usr/src</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,source-path="/home/jjohnstn/src/gdb:/usr/src:$cdir:$cwd"</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-environment-directory -r</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,source-path="$cdir:$cwd"</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002denvironment_002dpath-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-environment-path</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002denvironment_002dpath"></a><a name="Synopsis-24"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-environment-path [ -r ] [ </span><span style="font-family:'Consolas'; font-style:italic">pathdir</span><span style="font-family:'Consolas'"> ]+</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Add directories </span><span style="font-style:italic">pathdir</span><span> to beginning of search path for object files. If the ‘</span><span style="font-family:'Consolas'; font-size:10pt">-r</span><span>’ option is used, the search path is reset to the original search path that existed at gdb start-up. If directories </span><span style="font-style:italic">pathdir</span><span> are supplied in addition to the ‘</span><span style="font-family:'Consolas'; font-size:10pt">-r</span><span>’ option, the search path is first reset and then addition occurs as normal. Multiple directories may be specified, separated by blanks. Specifying multiple directories in a single command results in the directories added to the beginning of the search path in the same order they were presented in the command. If blanks are needed as part of a directory name, double-quotes should be used around the name. In the command output, the path will show up separated by the system directory-separator character. The directory-separator character must not be used in any directory name. If no directories are specified, the current path is displayed. </span><a name="GDB-Command-23"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">path</span><span>’. </span><a name="Example-23"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-environment-path</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,path="/usr/bin"</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-environment-path /kwikemart/marge/ezannoni/flathead-dev/ppc-eabi/gdb /bin</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,path="/kwikemart/marge/ezannoni/flathead-dev/ppc-eabi/gdb:/bin:/usr/bin"</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-environment-path -r /usr/local/bin</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,path="/usr/local/bin:/usr/bin"</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002denvironment_002dpwd-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-environment-pwd</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002denvironment_002dpwd"></a><a name="Synopsis-25"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-environment-pwd</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Show the current working directory. </span><a name="GDB-Command-24"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">pwd</span><span>’. </span><a name="Example-24"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-environment-pwd</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,cwd="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb"</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Next: </span><a href="GDB_002fMI-Thread-Commands.html#GDB_002fMI-Thread-Commands" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Thread Commands</span></a><span>, Previous: </span><a href="GDB_002fMI-Catchpoint-Commands.html#GDB_002fMI-Catchpoint-Commands" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Catchpoint Commands</span></a><span>, Up: </span><a href="GDB_002fMI.html#GDB_002fMI" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p></div><br style="page-break-before:always; clear:both; mso-break-type:section-break" /><div><p class="p" style="margin-bottom:12pt"><a name="GDB_002fMI-Program-Execution"></a><span>Next: </span><a href="GDB_002fMI-Stack-Manipulation.html#GDB_002fMI-Stack-Manipulation" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Stack Manipulation</span></a><span>, Previous: </span><a href="GDB_002fMI-Ada-Tasking-Commands.html#GDB_002fMI-Ada-Tasking-Commands" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Ada Tasking Commands</span></a><span>, Up: </span><a href="GDB_002fMI.html#GDB_002fMI" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><h3 style="margin-top:14.05pt; margin-bottom:14.05pt; page-break-inside:auto; page-break-after:auto"><a name="GDB_002fMI-Program-Execution-1"></a><span style="font-family:'Times New Roman'; color:#000000">27.13 </span><span style="font-family:'Times New Roman'; font-size:11.5pt; color:#000000">GDB/MI</span><span style="font-family:'Times New Roman'; color:#000000"> Program Execution</span></h3><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>These are the asynchronous commands which generate the out-of-band record ‘</span><span style="font-family:'Consolas'; font-size:10pt">*stopped</span><span>’. Currently </span><span style="font-size:10pt">GDB</span><span> only really executes asynchronously with remote targets and this interaction is mimicked in other cases. </span><a name="The-_002dexec_002dcontinue-Command"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-exec-continue</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dexec_002dcontinue"></a><a name="Synopsis-30"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-exec-continue [--reverse] [--all|--thread-group N]</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Resumes the execution of the inferior program, which will continue to execute until it reaches a debugger stop event. If the ‘</span><span style="font-family:'Consolas'; font-size:10pt">--reverse</span><span>’ option is specified, execution resumes in reverse until it reaches a stop event. Stop events may include </span></p><ul type="disc" style="margin:0pt; padding-left:0pt"><li class="li" style="margin-top:12pt; margin-left:36pt; font-family:serif; -aw-font-family:'Symbol'; -aw-font-weight:normal; -aw-number-format:''"><span style="font-family:'Times New Roman'">breakpoints or watchpoints </span></li><li class="li" style="margin-left:36pt; font-family:serif; -aw-font-family:'Symbol'; -aw-font-weight:normal; -aw-number-format:''"><span style="font-family:'Times New Roman'">signals or exceptions </span></li><li class="li" style="margin-left:36pt; font-family:serif; -aw-font-family:'Symbol'; -aw-font-weight:normal; -aw-number-format:''"><span style="font-family:'Times New Roman'">the end of the process (or its beginning under ‘</span><span style="font-family:'Consolas'; font-size:10pt">--reverse</span><span style="font-family:'Times New Roman'">’) </span></li><li class="li" style="margin-left:36pt; margin-bottom:12pt; font-family:serif; -aw-font-family:'Symbol'; -aw-font-weight:normal; -aw-number-format:''"><span style="font-family:'Times New Roman'">the end or beginning of a replay log if one is being used. </span></li></ul><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>In all-stop mode (see </span><a href="All_002dStop-Mode.html#All_002dStop-Mode" style="text-decoration:none"><span style="text-decoration:underline">All-Stop Mode</span></a><span>), may resume only one thread, or all threads, depending on the value of the ‘</span><span style="font-family:'Consolas'; font-size:10pt">scheduler-locking</span><span>’ variable. If ‘</span><span style="font-family:'Consolas'; font-size:10pt">--all</span><span>’ is specified, all threads (in all inferiors) will be resumed. The ‘</span><span style="font-family:'Consolas'; font-size:10pt">--all</span><span>’ option is ignored in all-stop mode. If the ‘</span><span style="font-family:'Consolas'; font-size:10pt">--thread-group</span><span>’ options is specified, then all threads in that thread group are resumed. </span><a name="GDB-Command-29"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> corresponding is ‘</span><span style="font-family:'Consolas'; font-size:10pt">continue</span><span>’. </span><a name="Example-29"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">-exec-continue</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^running</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">@Hello world</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">*stopped,reason="breakpoint-hit",disp="keep",bkptno="2",frame={</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">func="foo",args=[],file="hello.c",fullname="/home/foo/bar/hello.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">line="13",arch="i386:x86_64"}</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dexec_002dfinish-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-exec-finish</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dexec_002dfinish"></a><a name="Synopsis-31"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-exec-finish [--reverse]</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Resumes the execution of the inferior program until the current function is exited. Displays the results returned by the function. If the ‘</span><span style="font-family:'Consolas'; font-size:10pt">--reverse</span><span>’ option is specified, resumes the reverse execution of the inferior program until the point where current function was called. </span><a name="GDB-Command-30"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">finish</span><span>’. </span><a name="Example-30"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Function returning </span><span style="font-family:'Consolas'; font-size:10pt">void</span><span>. </span></p><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">-exec-finish</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^running</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">@hello from foo</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">*stopped,reason="function-finished",frame={func="main",args=[],</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">file="hello.c",fullname="/home/foo/bar/hello.c",line="7",arch="i386:x86_64"}</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Function returning other than </span><span style="font-family:'Consolas'; font-size:10pt">void</span><span>. The name of the internal </span><span style="font-size:10pt">GDB</span><span> variable storing the result is printed, together with the value itself. </span></p><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">-exec-finish</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^running</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">*stopped,reason="function-finished",frame={addr="0x000107b0",func="foo",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">args=[{name="a",value="1"],{name="b",value="9"}},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">arch="i386:x86_64"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">gdb-result-var="$1",return-value="0"</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dexec_002dinterrupt-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-exec-interrupt</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dexec_002dinterrupt"></a><a name="Synopsis-32"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-exec-interrupt [--all|--thread-group N]</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>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 ‘</span><span style="font-family:'Consolas'; font-size:10pt">^done</span><span>’ output. If the user is trying to interrupt a non-running program, an error message will be printed. </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Note that when asynchronous execution is enabled, this command is asynchronous just like other execution commands. That is, first the ‘</span><span style="font-family:'Consolas'; font-size:10pt">^done</span><span>’ response will be printed, and the target stop will be reported after that using the ‘</span><span style="font-family:'Consolas'; font-size:10pt">*stopped</span><span>’ notification. </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>In non-stop mode, only the context thread is interrupted by default. All threads (in all inferiors) will be interrupted if the ‘</span><span style="font-family:'Consolas'; font-size:10pt">--all</span><span>’ option is specified. If the ‘</span><span style="font-family:'Consolas'; font-size:10pt">--thread-group</span><span>’ option is specified, all threads in that group will be interrupted. </span><a name="GDB-Command-31"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">interrupt</span><span>’. </span><a name="Example-31"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">111-exec-continue</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">111^running</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:ignore"> </span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">222-exec-interrupt</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">222^done</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">111*stopped,signal-name="SIGINT",signal-meaning="Interrupt",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">frame={addr="0x00010140",func="foo",args=[],file="try.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">fullname="/home/foo/bar/try.c",line="13",arch="i386:x86_64"}</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:ignore"> </span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-exec-interrupt</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^error,msg="mi_cmd_exec_interrupt: Inferior not executing."</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dexec_002djump-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-exec-jump</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dexec_002djump"></a><a name="Synopsis-33"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-exec-jump </span><span style="font-family:'Consolas'; font-style:italic">location</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Resumes execution of the inferior program at the location specified by parameter. See </span><a href="Specify-Location.html#Specify-Location" style="text-decoration:none"><span style="text-decoration:underline">Specify Location</span></a><span>, for a description of the different forms of </span><span style="font-style:italic">location</span><span>. </span><a name="GDB-Command-32"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">jump</span><span>’. </span><a name="Example-32"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">-exec-jump foo.c:10</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">*running,thread-id="all"</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^running</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dexec_002dnext-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-exec-next</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dexec_002dnext"></a><a name="Synopsis-34"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-exec-next [--reverse]</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Resumes execution of the inferior program, stopping when the beginning of the next source line is reached. </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>If the ‘</span><span style="font-family:'Consolas'; font-size:10pt">--reverse</span><span>’ 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. </span><a name="GDB-Command-33"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">next</span><span>’. </span><a name="Example-33"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">-exec-next</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^running</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">*stopped,reason="end-stepping-range",line="8",file="hello.c"</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dexec_002dnext_002dinstruction-C"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-exec-next-instruction</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dexec_002dnext_002dinstruction"></a><a name="Synopsis-35"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-exec-next-instruction [--reverse]</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>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. </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>If the ‘</span><span style="font-family:'Consolas'; font-size:10pt">--reverse</span><span>’ 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. </span><a name="GDB-Command-34"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">nexti</span><span>’. </span><a name="Example-34"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-exec-next-instruction</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^running</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:ignore"> </span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">*stopped,reason="end-stepping-range",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">addr="0x000100d4",line="5",file="hello.c"</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dexec_002dreturn-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-exec-return</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dexec_002dreturn"></a><a name="Synopsis-36"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-exec-return</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Makes current function return immediately. Doesn’t execute the inferior. Displays the new current frame. </span><a name="GDB-Command-35"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">return</span><span>’. </span><a name="Example-35"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">200-break-insert callee4</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">200^done,bkpt={number="1",addr="0x00010734",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8"}</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">000-exec-run</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">000^running</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">000*stopped,reason="breakpoint-hit",disp="keep",bkptno="1",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">frame={func="callee4",args=[],</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">file="../../../devo/gdb/testsuite/gdb.mi/basics.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="8",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">arch="i386:x86_64"}</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">205-break-delete</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">205^done</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">111-exec-return</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">111^done,frame={level="0",func="callee3",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">args=[{name="strarg",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">value="0x11940 \"A string argument.\""}],</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">file="../../../devo/gdb/testsuite/gdb.mi/basics.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="18",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">arch="i386:x86_64"}</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dexec_002drun-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-exec-run</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dexec_002drun"></a><a name="Synopsis-37"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-exec-run [ --all | --thread-group N ] [ --start ]</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>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. </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>When neither the ‘</span><span style="font-family:'Consolas'; font-size:10pt">--all</span><span>’ nor the ‘</span><span style="font-family:'Consolas'; font-size:10pt">--thread-group</span><span>’ option is specified, the current inferior is started. If the ‘</span><span style="font-family:'Consolas'; font-size:10pt">--thread-group</span><span>’ option is specified, it should refer to a thread group of type ‘</span><span style="font-family:'Consolas'; font-size:10pt">process</span><span>’, and that thread group will be started. If the ‘</span><span style="font-family:'Consolas'; font-size:10pt">--all</span><span>’ option is specified, then all inferiors will be started. </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Using the ‘</span><span style="font-family:'Consolas'; font-size:10pt">--start</span><span>’ option instructs the debugger to stop the execution at the start of the inferior’s main subprogram, following the same behavior as the </span><span style="font-family:'Consolas'; font-size:10pt">start</span><span> command (see </span><a href="Starting.html#Starting" style="text-decoration:none"><span style="text-decoration:underline">Starting</span></a><span>). </span><a name="GDB-Command-36"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">run</span><span>’. </span><a name="Examples-2"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Examples</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-break-insert main</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,bkpt={number="1",addr="0x0001072c",file="recursive2.c",line="4"}</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-exec-run</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^running</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">*stopped,reason="breakpoint-hit",disp="keep",bkptno="1",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">frame={func="main",args=[],file="recursive2.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">fullname="/home/foo/bar/recursive2.c",line="4",arch="i386:x86_64"}</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Program exited normally: </span></p><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-exec-run</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^running</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">x = 55</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">*stopped,reason="exited-normally"</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Program exited exceptionally: </span></p><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-exec-run</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^running</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">x = 55</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">*stopped,reason="exited",exit-code="01"</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Another way the program can terminate is if it receives a signal such as </span><span style="font-family:'Consolas'; font-size:10pt">SIGINT</span><span>. In this case, </span><span style="font-size:10pt">GDB/MI</span><span> displays this: </span></p><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">*stopped,reason="exited-signalled",signal-name="SIGINT",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">signal-meaning="Interrupt"</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dexec_002dstep-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-exec-step</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dexec_002dstep"></a><a name="Synopsis-38"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-exec-step [--reverse]</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>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 ‘</span><span style="font-family:'Consolas'; font-size:10pt">--reverse</span><span>’ option is specified, resumes reverse execution of the inferior program, stopping at the beginning of the previously executed source line. </span><a name="GDB-Command-37"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">step</span><span>’. </span><a name="Example-36"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Stepping into a function: </span></p><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">-exec-step</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^running</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">*stopped,reason="end-stepping-range",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">frame={func="foo",args=[{name="a",value="10"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{name="b",value="0"}],file="recursive2.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">fullname="/home/foo/bar/recursive2.c",line="11",arch="i386:x86_64"}</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Regular stepping: </span></p><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">-exec-step</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^running</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">*stopped,reason="end-stepping-range",line="14",file="recursive2.c"</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dexec_002dstep_002dinstruction-C"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-exec-step-instruction</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dexec_002dstep_002dinstruction"></a><a name="Synopsis-39"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-exec-step-instruction [--reverse]</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Resumes the inferior which executes one machine instruction. If the ‘</span><span style="font-family:'Consolas'; font-size:10pt">--reverse</span><span>’ option is specified, resumes reverse execution of the inferior program, stopping at the previously executed instruction. The output, once </span><span style="font-size:10pt">GDB</span><span> 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. </span><a name="GDB-Command-38"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">stepi</span><span>’. </span><a name="Example-37"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-exec-step-instruction</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^running</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:ignore"> </span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">*stopped,reason="end-stepping-range",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">frame={func="foo",args=[],file="try.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">fullname="/home/foo/bar/try.c",line="10",arch="i386:x86_64"}</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-exec-step-instruction</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^running</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:ignore"> </span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">*stopped,reason="end-stepping-range",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">frame={addr="0x000100f4",func="foo",args=[],file="try.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">fullname="/home/foo/bar/try.c",line="10",arch="i386:x86_64"}</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dexec_002duntil-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-exec-until</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dexec_002duntil"></a><a name="Synopsis-40"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-exec-until [ </span><span style="font-family:'Consolas'; font-style:italic">location</span><span style="font-family:'Consolas'"> ]</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Executes the inferior until the </span><span style="font-style:italic">location</span><span> specified in the argument is reached. If there is no argument, the inferior executes until a source line greater than the current one is reached. The reason for stopping in this case will be ‘</span><span style="font-family:'Consolas'; font-size:10pt">location-reached</span><span>’. </span><a name="GDB-Command-39"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">until</span><span>’. </span><a name="Example-38"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-exec-until recursive2.c:6</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^running</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">x = 55</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">*stopped,reason="location-reached",frame={func="main",args=[],</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="6",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">arch="i386:x86_64"}</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Next: </span><a href="GDB_002fMI-Stack-Manipulation.html#GDB_002fMI-Stack-Manipulation" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Stack Manipulation</span></a><span>, Previous: </span><a href="GDB_002fMI-Ada-Tasking-Commands.html#GDB_002fMI-Ada-Tasking-Commands" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Ada Tasking Commands</span></a><span>, Up: </span><a href="GDB_002fMI.html#GDB_002fMI" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p></div><br style="page-break-before:always; clear:both; mso-break-type:section-break" /><div><p class="p" style="margin-bottom:12pt"><a name="GDB_002fMI-Result-Records"></a><span>Next: </span><a href="GDB_002fMI-Stream-Records.html#GDB_002fMI-Stream-Records" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Stream Records</span></a><span>, Up: </span><a href="GDB_002fMI-Output-Records.html#GDB_002fMI-Output-Records" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Output Records</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="GDB_002fMI-Result-Records-1"></a><span style="font-family:'Times New Roman'; color:#000000">27.5.1 </span><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB/MI</span><span style="font-family:'Times New Roman'; color:#000000"> Result Records</span><a name="index-result-records-in-GDB_002fMI"></a><a name="index-GDB_002fMI_002c-result-records"></a></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>In addition to a number of out-of-band notifications, the response to a </span><span style="font-size:10pt">GDB/MI</span><span> command includes one of the following result indications: </span></p><p class="p" style="font-size:10pt"><a name="index-_005edone"></a><span style="font-family:'Consolas'">"^done" [ "," </span><span style="font-family:'Consolas'; font-style:italic">results</span><span style="font-family:'Consolas'"> ]</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The synchronous operation was successful, </span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">results</span><span> are the return values. </span></p><p class="p" style="font-size:10pt"><span style="font-family:'Consolas'">"^running"</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><a name="index-_005erunning"></a><span>This result record is equivalent to ‘</span><span style="font-family:'Consolas'; font-size:10pt">^done</span><span>’. Historically, it was output instead of ‘</span><span style="font-family:'Consolas'; font-size:10pt">^done</span><span>’ if the command has resumed the target. This behaviour is maintained for backward compatibility, but all frontends should treat ‘</span><span style="font-family:'Consolas'; font-size:10pt">^done</span><span>’ and ‘</span><span style="font-family:'Consolas'; font-size:10pt">^running</span><span>’ identically and rely on the ‘</span><span style="font-family:'Consolas'; font-size:10pt">*running</span><span>’ output record to determine which threads are resumed. </span></p><p class="p" style="font-size:10pt"><span style="font-family:'Consolas'">"^connected"</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><a name="index-_005econnected"></a><span style="font-size:10pt">GDB</span><span> has connected to a remote target. </span></p><p class="p" style="font-size:10pt"><span style="font-family:'Consolas'">"^error" "," "msg=" </span><span style="font-family:'Consolas'; font-style:italic">c-string</span><span style="font-family:'Consolas'"> [ "," "code=" </span><span style="font-family:'Consolas'; font-style:italic">c-string</span><span style="font-family:'Consolas'"> ]</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><a name="index-_005eerror"></a><span>The operation failed. The </span><span style="font-family:'Consolas'; font-size:10pt">msg=</span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">c-string</span><span> variable contains the corresponding error message. </span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>If present, the </span><span style="font-family:'Consolas'; font-size:10pt">code=</span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">c-string</span><span> variable provides an error code on which consumers can rely on to detect the corresponding error condition. At present, only one error code is defined: </span></p><p class="p" style="margin-left:30pt"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">"undefined-command"</span><span>’</span></p><p class="p" style="margin-top:12pt; margin-left:60pt; margin-bottom:12pt"><span>Indicates that the command causing the error does not exist. </span></p><p class="p" style="font-size:10pt"><span style="font-family:'Consolas'">"^exit"</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><a name="index-_005eexit"></a><span style="font-size:10pt">GDB</span><span> has terminated. </span></p></div><br style="page-break-before:always; clear:both; mso-break-type:section-break" /><div><p class="p" style="margin-bottom:12pt"><a name="GDB_002fMI-Stack-Manipulation"></a><span>Next: </span><a href="GDB_002fMI-Variable-Objects.html#GDB_002fMI-Variable-Objects" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Variable Objects</span></a><span>, Previous: </span><a href="GDB_002fMI-Program-Execution.html#GDB_002fMI-Program-Execution" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Program Execution</span></a><span>, Up: </span><a href="GDB_002fMI.html#GDB_002fMI" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><h3 style="margin-top:14.05pt; margin-bottom:14.05pt; page-break-inside:auto; page-break-after:auto"><a name="GDB_002fMI-Stack-Manipulation-Commands"></a><span style="font-family:'Times New Roman'; color:#000000">27.14 </span><span style="font-family:'Times New Roman'; font-size:11.5pt; color:#000000">GDB/MI</span><span style="font-family:'Times New Roman'; color:#000000"> Stack Manipulation Commands</span><a name="The-_002denable_002dframe_002dfilters-Co"></a></h3><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-enable-frame-filters</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002denable_002dframe_002dfilters"></a></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">-enable-frame-filters</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span style="font-size:10pt">GDB</span><span> allows Python-based frame filters to affect the output of the MI commands relating to stack traces. As there is no way to implement this in a fully backward-compatible way, a front end must request that this functionality be enabled. </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Once enabled, this feature cannot be disabled. </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Note that if Python support has not been compiled into </span><span style="font-size:10pt">GDB</span><span>, this command will still succeed (and do nothing). </span><a name="The-_002dstack_002dinfo_002dframe-Comman"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-stack-info-frame</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dstack_002dinfo_002dframe"></a><a name="Synopsis-41"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-stack-info-frame</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Get info on the selected frame. </span><a name="GDB-Command-40"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">info frame</span><span>’ or ‘</span><span style="font-family:'Consolas'; font-size:10pt">frame</span><span>’ (without arguments). </span><a name="Example-39"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-stack-info-frame</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,frame={level="1",addr="0x0001076c",func="callee3",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">file="../../../devo/gdb/testsuite/gdb.mi/basics.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="17",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">arch="i386:x86_64"}</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dstack_002dinfo_002ddepth-Comman"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-stack-info-depth</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dstack_002dinfo_002ddepth"></a><a name="Synopsis-42"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-stack-info-depth [ </span><span style="font-family:'Consolas'; font-style:italic">max-depth</span><span style="font-family:'Consolas'"> ]</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Return the depth of the stack. If the integer argument </span><span style="font-style:italic">max-depth</span><span> is specified, do not count beyond </span><span style="font-style:italic">max-depth</span><span> frames. </span><a name="GDB-Command-41"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>There’s no equivalent </span><span style="font-size:10pt">GDB</span><span> command. </span><a name="Example-40"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>For a stack with frame levels 0 through 11: </span></p><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-stack-info-depth</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,depth="12"</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-stack-info-depth 4</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,depth="4"</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-stack-info-depth 12</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,depth="12"</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-stack-info-depth 11</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,depth="11"</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-stack-info-depth 13</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,depth="12"</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="g_t_002dstack_002dlist_002darguments"></a><a name="The-_002dstack_002dlist_002darguments-Co"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-stack-list-arguments</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dstack_002dlist_002darguments"></a><a name="Synopsis-43"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-stack-list-arguments [ --no-frame-filters ] [ --skip-unavailable ] </span><span style="font-family:'Consolas'; font-style:italic">print-values</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">    </span><span style="font-family:'Consolas'">[ </span><span style="font-family:'Consolas'; font-style:italic">low-frame</span><span style="font-family:'Consolas'"> </span><span style="font-family:'Consolas'; font-style:italic">high-frame</span><span style="font-family:'Consolas'"> ]</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Display a list of the arguments for the frames between </span><span style="font-style:italic">low-frame</span><span> and </span><span style="font-style:italic">high-frame</span><span> (inclusive). If </span><span style="font-style:italic">low-frame</span><span> and </span><span style="font-style:italic">high-frame</span><span> are not provided, list the arguments for the whole call stack. If the two arguments are equal, show the single frame at the corresponding level. It is an error if </span><span style="font-style:italic">low-frame</span><span> is larger than the actual number of frames. On the other hand, </span><span style="font-style:italic">high-frame</span><span> may be larger than the actual number of frames, in which case only existing frames will be returned. </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>If </span><span style="font-style:italic">print-values</span><span> is 0 or </span><span style="font-family:'Consolas'; font-size:10pt">--no-values</span><span>, print only the names of the variables; if it is 1 or </span><span style="font-family:'Consolas'; font-size:10pt">--all-values</span><span>, print also their values; and if it is 2 or </span><span style="font-family:'Consolas'; font-size:10pt">--simple-values</span><span>, print the name, type and value for simple data types, and the name and type for arrays, structures and unions. If the option </span><span style="font-family:'Consolas'; font-size:10pt">--no-frame-filters</span><span> is supplied, then Python frame filters will not be executed. </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>If the </span><span style="font-family:'Consolas'; font-size:10pt">--skip-unavailable</span><span> option is specified, arguments that are not available are not listed. Partially available arguments are still displayed, however. </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Use of this command to obtain arguments in a single frame is deprecated in favor of the ‘</span><span style="font-family:'Consolas'; font-size:10pt">-stack-list-variables</span><span>’ command. </span><a name="GDB-Command-42"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span style="font-size:10pt">GDB</span><span> does not have an equivalent command. </span><span style="font-family:'Consolas'; font-size:10pt">gdbtk</span><span> has a ‘</span><span style="font-family:'Consolas'; font-size:10pt">gdb_get_args</span><span>’ command which partially overlaps with the functionality of ‘</span><span style="font-family:'Consolas'; font-size:10pt">-stack-list-arguments</span><span>’. </span><a name="Example-41"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-stack-list-frames</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">stack=[</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">frame={level="0",addr="0x00010734",func="callee4",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">file="../../../devo/gdb/testsuite/gdb.mi/basics.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="8",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">arch="i386:x86_64"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">frame={level="1",addr="0x0001076c",func="callee3",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">file="../../../devo/gdb/testsuite/gdb.mi/basics.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="17",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">arch="i386:x86_64"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">frame={level="2",addr="0x0001078c",func="callee2",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">file="../../../devo/gdb/testsuite/gdb.mi/basics.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="22",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">arch="i386:x86_64"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">frame={level="3",addr="0x000107b4",func="callee1",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">file="../../../devo/gdb/testsuite/gdb.mi/basics.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="27",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">arch="i386:x86_64"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">frame={level="4",addr="0x000107e0",func="main",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">file="../../../devo/gdb/testsuite/gdb.mi/basics.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="32",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">arch="i386:x86_64"}]</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-stack-list-arguments 0</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">stack-args=[</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">frame={level="0",args=[]},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">frame={level="1",args=[name="strarg"]},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">frame={level="2",args=[name="intarg",name="strarg"]},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">frame={level="3",args=[name="intarg",name="strarg",name="fltarg"]},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">frame={level="4",args=[]}]</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-stack-list-arguments 1</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">stack-args=[</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">frame={level="0",args=[]},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">frame={level="1",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">args=[{name="strarg",value="0x11940 \"A string argument.\""}]},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">frame={level="2",args=[</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{name="intarg",value="2"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{name="strarg",value="0x11940 \"A string argument.\""}]},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{frame={level="3",args=[</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{name="intarg",value="2"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{name="strarg",value="0x11940 \"A string argument.\""},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{name="fltarg",value="3.5"}]},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">frame={level="4",args=[]}]</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-stack-list-arguments 0 2 2</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,stack-args=[frame={level="2",args=[name="intarg",name="strarg"]}]</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-stack-list-arguments 1 2 2</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,stack-args=[frame={level="2",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">args=[{name="intarg",value="2"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{name="strarg",value="0x11940 \"A string argument.\""}]}]</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="g_t_002dstack_002dlist_002dframes"></a><a name="The-_002dstack_002dlist_002dframes-Comma"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-stack-list-frames</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dstack_002dlist_002dframes"></a><a name="Synopsis-44"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-stack-list-frames [ --no-frame-filters </span><span style="font-family:'Consolas'; font-style:italic">low-frame</span><span style="font-family:'Consolas'"> </span><span style="font-family:'Consolas'; font-style:italic">high-frame</span><span style="font-family:'Consolas'"> ]</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>List the frames currently on the stack. For each frame it displays the following info: </span></p><p class="p"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">level</span><span>’</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The frame number, 0 being the topmost frame, i.e., the innermost function. </span></p><p class="p"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">addr</span><span>’</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The </span><span style="font-family:'Consolas'; font-size:10pt">$pc</span><span> value for that frame. </span></p><p class="p"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">func</span><span>’</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Function name. </span></p><p class="p"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">file</span><span>’</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>File name of the source file where the function lives. </span></p><p class="p"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">fullname</span><span>’</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The full file name of the source file where the function lives. </span></p><p class="p"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">line</span><span>’</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Line number corresponding to the </span><span style="font-family:'Consolas'; font-size:10pt">$pc</span><span>. </span></p><p class="p"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">from</span><span>’</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The shared library where this function is defined. This is only given if the frame’s function is not known. </span></p><p class="p"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">arch</span><span>’</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Frame’s architecture. </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>If invoked without arguments, this command prints a backtrace for the whole stack. If given two integer arguments, it shows the frames whose levels are between the two arguments (inclusive). If the two arguments are equal, it shows the single frame at the corresponding level. It is an error if </span><span style="font-style:italic">low-frame</span><span> is larger than the actual number of frames. On the other hand, </span><span style="font-style:italic">high-frame</span><span> may be larger than the actual number of frames, in which case only existing frames will be returned. If the option </span><span style="font-family:'Consolas'; font-size:10pt">--no-frame-filters</span><span> is supplied, then Python frame filters will not be executed. </span><a name="GDB-Command-43"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> commands are ‘</span><span style="font-family:'Consolas'; font-size:10pt">backtrace</span><span>’ and ‘</span><span style="font-family:'Consolas'; font-size:10pt">where</span><span>’. </span><a name="Example-42"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Full stack backtrace: </span></p><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-stack-list-frames</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,stack=</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">[frame={level="0",addr="0x0001076c",func="foo",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="11",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">arch="i386:x86_64"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">frame={level="1",addr="0x000107a4",func="foo",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">arch="i386:x86_64"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">frame={level="2",addr="0x000107a4",func="foo",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">arch="i386:x86_64"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">frame={level="3",addr="0x000107a4",func="foo",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">arch="i386:x86_64"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">frame={level="4",addr="0x000107a4",func="foo",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">arch="i386:x86_64"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">frame={level="5",addr="0x000107a4",func="foo",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">arch="i386:x86_64"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">frame={level="6",addr="0x000107a4",func="foo",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">arch="i386:x86_64"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">frame={level="7",addr="0x000107a4",func="foo",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">arch="i386:x86_64"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">frame={level="8",addr="0x000107a4",func="foo",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">arch="i386:x86_64"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">frame={level="9",addr="0x000107a4",func="foo",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">arch="i386:x86_64"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">frame={level="10",addr="0x000107a4",func="foo",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">arch="i386:x86_64"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">frame={level="11",addr="0x00010738",func="main",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="4",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">arch="i386:x86_64"}]</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Show frames between </span><span style="font-style:italic">low_frame</span><span> and </span><span style="font-style:italic">high_frame</span><span>: </span></p><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-stack-list-frames 3 5</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,stack=</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">[frame={level="3",addr="0x000107a4",func="foo",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">arch="i386:x86_64"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">frame={level="4",addr="0x000107a4",func="foo",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">arch="i386:x86_64"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">frame={level="5",addr="0x000107a4",func="foo",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">arch="i386:x86_64"}]</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Show a single frame: </span></p><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-stack-list-frames 3 3</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,stack=</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">[frame={level="3",addr="0x000107a4",func="foo",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">arch="i386:x86_64"}]</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dstack_002dlist_002dlocals-Comma"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-stack-list-locals</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dstack_002dlist_002dlocals"></a><a name="g_t_002dstack_002dlist_002dlocals"></a><a name="Synopsis-45"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-stack-list-locals [ --no-frame-filters ] [ --skip-unavailable ] </span><span style="font-family:'Consolas'; font-style:italic">print-values</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Display the local variable names for the selected frame. If </span><span style="font-style:italic">print-values</span><span> is 0 or </span><span style="font-family:'Consolas'; font-size:10pt">--no-values</span><span>, print only the names of the variables; if it is 1 or </span><span style="font-family:'Consolas'; font-size:10pt">--all-values</span><span>, print also their values; and if it is 2 or </span><span style="font-family:'Consolas'; font-size:10pt">--simple-values</span><span>, print the name, type and value for simple data types, and the name and type for arrays, structures and unions. In this last case, a frontend can immediately display the value of simple data types and create variable objects for other data types when the user wishes to explore their values in more detail. If the option </span><span style="font-family:'Consolas'; font-size:10pt">--no-frame-filters</span><span> is supplied, then Python frame filters will not be executed. </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>If the </span><span style="font-family:'Consolas'; font-size:10pt">--skip-unavailable</span><span> option is specified, local variables that are not available are not listed. Partially available local variables are still displayed, however. </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>This command is deprecated in favor of the ‘</span><span style="font-family:'Consolas'; font-size:10pt">-stack-list-variables</span><span>’ command. </span><a name="GDB-Command-44"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">info locals</span><span>’ in </span><span style="font-size:10pt">GDB</span><span>, ‘</span><span style="font-family:'Consolas'; font-size:10pt">gdb_get_locals</span><span>’ in </span><span style="font-family:'Consolas'; font-size:10pt">gdbtk</span><span>. </span><a name="Example-43"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-stack-list-locals 0</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,locals=[name="A",name="B",name="C"]</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-stack-list-locals --all-values</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,locals=[{name="A",value="1"},{name="B",value="2"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">{name="C",value="{1, 2, 3}"}]</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-stack-list-locals --simple-values</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,locals=[{name="A",type="int",value="1"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">{name="B",type="int",value="2"},{name="C",type="int [3]"}]</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="g_t_002dstack_002dlist_002dvariables"></a><a name="The-_002dstack_002dlist_002dvariables-Co"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-stack-list-variables</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dstack_002dlist_002dvariables"></a><a name="Synopsis-46"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-stack-list-variables [ --no-frame-filters ] [ --skip-unavailable ] </span><span style="font-family:'Consolas'; font-style:italic">print-values</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Display the names of local variables and function arguments for the selected frame. If </span><span style="font-style:italic">print-values</span><span> is 0 or </span><span style="font-family:'Consolas'; font-size:10pt">--no-values</span><span>, print only the names of the variables; if it is 1 or </span><span style="font-family:'Consolas'; font-size:10pt">--all-values</span><span>, print also their values; and if it is 2 or </span><span style="font-family:'Consolas'; font-size:10pt">--simple-values</span><span>, print the name, type and value for simple data types, and the name and type for arrays, structures and unions. If the option </span><span style="font-family:'Consolas'; font-size:10pt">--no-frame-filters</span><span> is supplied, then Python frame filters will not be executed. </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>If the </span><span style="font-family:'Consolas'; font-size:10pt">--skip-unavailable</span><span> option is specified, local variables and arguments that are not available are not listed. Partially available arguments and local variables are still displayed, however. </span><a name="Example-44"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-stack-list-variables --thread 1 --frame 0 --all-values</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,variables=[{name="x",value="11"},{name="s",value="{a = 1, b = 2}"}]</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dstack_002dselect_002dframe-Comm"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-stack-select-frame</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dstack_002dselect_002dframe"></a><a name="Synopsis-47"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-stack-select-frame </span><span style="font-family:'Consolas'; font-style:italic">framenum</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Change the selected frame. Select a different frame </span><span style="font-style:italic">framenum</span><span> on the stack. </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>This command in deprecated in favor of passing the ‘</span><span style="font-family:'Consolas'; font-size:10pt">--frame</span><span>’ option to every command. </span><a name="GDB-Command-45"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> commands are ‘</span><span style="font-family:'Consolas'; font-size:10pt">frame</span><span>’, ‘</span><span style="font-family:'Consolas'; font-size:10pt">up</span><span>’, ‘</span><span style="font-family:'Consolas'; font-size:10pt">down</span><span>’, ‘</span><span style="font-family:'Consolas'; font-size:10pt">select-frame</span><span>’, ‘</span><span style="font-family:'Consolas'; font-size:10pt">up-silent</span><span>’, and ‘</span><span style="font-family:'Consolas'; font-size:10pt">down-silent</span><span>’. </span><a name="Example-45"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-stack-select-frame 2</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Next: </span><a href="GDB_002fMI-Variable-Objects.html#GDB_002fMI-Variable-Objects" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Variable Objects</span></a><span>, Previous: </span><a href="GDB_002fMI-Program-Execution.html#GDB_002fMI-Program-Execution" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Program Execution</span></a><span>, Up: </span><a href="GDB_002fMI.html#GDB_002fMI" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p></div><br style="page-break-before:always; clear:both; mso-break-type:section-break" /><div><p class="p" style="margin-bottom:12pt"><a name="GDB_002fMI-Stream-Records"></a><span>Next: </span><a href="GDB_002fMI-Async-Records.html#GDB_002fMI-Async-Records" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Async Records</span></a><span>, Previous: </span><a href="GDB_002fMI-Result-Records.html#GDB_002fMI-Result-Records" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Result Records</span></a><span>, Up: </span><a href="GDB_002fMI-Output-Records.html#GDB_002fMI-Output-Records" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Output Records</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="GDB_002fMI-Stream-Records-1"></a><span style="font-family:'Times New Roman'; color:#000000">27.5.2 </span><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB/MI</span><span style="font-family:'Times New Roman'; color:#000000"> Stream Records</span><a name="index-GDB_002fMI_002c-stream-records"></a><a name="index-stream-records-in-GDB_002fMI"></a></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span style="font-size:10pt">GDB</span><span> internally maintains a number of output streams: the console, the target, and the log. The output intended for each of these streams is funneled through the </span><span style="font-size:10pt">GDB/MI</span><span> interface using </span><span style="font-style:italic">stream records</span><span>. </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Each stream record begins with a unique </span><span style="font-style:italic">prefix character</span><span> which identifies its stream (see </span><a href="GDB_002fMI-Output-Syntax.html#GDB_002fMI-Output-Syntax" style="text-decoration:none"><span style="font-size:10pt; text-decoration:underline">GDB/MI</span><span style="text-decoration:underline"> Output Syntax</span></a><span>). In addition to the prefix, each stream record contains a </span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">string-output</span><span>. This is either raw text (with an implicit new line) or a quoted C string (which does not contain an implicit newline). </span></p><p class="p" style="font-size:10pt"><span style="font-family:'Consolas'">"~" </span><span style="font-family:'Consolas'; font-style:italic">string-output</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The console output stream contains text that should be displayed in the CLI console window. It contains the textual responses to CLI commands. </span></p><p class="p" style="font-size:10pt"><span style="font-family:'Consolas'">"@" </span><span style="font-family:'Consolas'; font-style:italic">string-output</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The target output stream contains any textual output from the running target. This is only present when GDB’s event loop is truly asynchronous, which is currently only the case for remote targets. </span></p><p class="p" style="font-size:10pt"><span style="font-family:'Consolas'">"&" </span><span style="font-family:'Consolas'; font-style:italic">string-output</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The log stream contains debugging messages being produced by </span><span style="font-size:10pt">GDB</span><span>’s internals. </span></p></div><br style="page-break-before:always; clear:both; mso-break-type:section-break" /><div><p class="p" style="margin-bottom:12pt"><a name="GDB_002fMI-Support-Commands"></a><span>Next: </span><a href="GDB_002fMI-Miscellaneous-Commands.html#GDB_002fMI-Miscellaneous-Commands" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Miscellaneous Commands</span></a><span>, Previous: </span><a href="GDB_002fMI-Ada-Exceptions-Commands.html#GDB_002fMI-Ada-Exceptions-Commands" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Ada Exceptions Commands</span></a><span>, Up: </span><a href="GDB_002fMI.html#GDB_002fMI" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><h3 style="margin-top:14.05pt; margin-bottom:14.05pt; page-break-inside:auto; page-break-after:auto"><a name="GDB_002fMI-Support-Commands-1"></a><span style="font-family:'Times New Roman'; color:#000000">27.23 </span><span style="font-family:'Times New Roman'; font-size:11.5pt; color:#000000">GDB/MI</span><span style="font-family:'Times New Roman'; color:#000000"> Support Commands</span></h3><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Since new commands and features get regularly added to </span><span style="font-size:10pt">GDB/MI</span><span>, some commands are available to help front-ends query the debugger about support for these capabilities. Similarly, it is also possible to query </span><span style="font-size:10pt">GDB</span><span> about target support of certain features. </span><a name="The-_002dinfo_002dgdb_002dmi_002dcommand"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-info-gdb-mi-command</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dinfo_002dgdb_002dmi_002dcomma"></a><a name="Synopsis-103"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-info-gdb-mi-command </span><span style="font-family:'Consolas'; font-style:italic">cmd_name</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Query support for the </span><span style="font-size:10pt">GDB/MI</span><span> command named </span><span style="font-style:italic">cmd_name</span><span>. </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Note that the dash (</span><span style="font-family:'Consolas'; font-size:10pt">-</span><span>) starting all </span><span style="font-size:10pt">GDB/MI</span><span> commands is technically not part of the command name (see </span><a href="GDB_002fMI-Input-Syntax.html#GDB_002fMI-Input-Syntax" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Input Syntax</span></a><span>), and thus should be omitted in </span><span style="font-style:italic">cmd_name</span><span>. However, for ease of use, this command also accepts the form with the leading dash. </span><a name="GDB-Command-85"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>There is no corresponding </span><span style="font-size:10pt">GDB</span><span> command. </span><a name="Result-8"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Result</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The result is a tuple. There is currently only one field: </span></p><p class="p"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">exists</span><span>’</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>This field is equal to </span><span style="font-family:'Consolas'; font-size:10pt">"true"</span><span> if the </span><span style="font-size:10pt">GDB/MI</span><span> command exists, </span><span style="font-family:'Consolas'; font-size:10pt">"false"</span><span> otherwise. </span><a name="Example-85"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Here is an example where the </span><span style="font-size:10pt">GDB/MI</span><span> command does not exist: </span></p><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">-info-gdb-mi-command unsupported-command</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,command={exists="false"}</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>And here is an example where the </span><span style="font-size:10pt">GDB/MI</span><span> command is known to the debugger: </span></p><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">-info-gdb-mi-command symbol-list-lines</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,command={exists="true"}</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dlist_002dfeatures-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-list-features</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dlist_002dfeatures"></a><a name="index-supported-GDB_002fMI-features_002c"></a></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Returns a list of particular features of the MI protocol that this version of gdb implements. A feature can be a command, or a new field in an output of some command, or even an important bugfix. While a frontend can sometimes detect presence of a feature at runtime, it is easier to perform detection at debugger startup. </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The command returns a list of strings, with each string naming an available feature. Each returned string is just a name, it does not have any internal structure. The list of possible feature names is given below. </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Example output: </span></p><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb) -list-features</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,result=["feature1","feature2"]</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The current list of features is: </span></p><p class="p"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">frozen-varobjs</span><span>’ </span><a name="index-frozen_002dvarobjs"></a></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Indicates support for the </span><span style="font-family:'Consolas'; font-size:10pt">-var-set-frozen</span><span> command, as well as possible presence of the </span><span style="font-family:'Consolas'; font-size:10pt">frozen</span><span> field in the output of </span><span style="font-family:'Consolas'; font-size:10pt">-varobj-create</span><span>. </span></p><p class="p"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">pending-breakpoints</span><span>’ </span><a name="index-pending_002dbreakpoints"></a></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Indicates support for the </span><span style="font-family:'Consolas'; font-size:10pt">-f</span><span> option to the </span><span style="font-family:'Consolas'; font-size:10pt">-break-insert</span><span> command. </span></p><p class="p"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">python</span><span>’ </span><a name="index-python"></a></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Indicates Python scripting support, Python-based pretty-printing commands, and possible presence of the ‘</span><span style="font-family:'Consolas'; font-size:10pt">display_hint</span><span>’ field in the output of </span><span style="font-family:'Consolas'; font-size:10pt">-var-list-children</span></p><p class="p"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">thread-info</span><span>’ </span><a name="index-thread_002dinfo"></a></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Indicates support for the </span><span style="font-family:'Consolas'; font-size:10pt">-thread-info</span><span> command. </span></p><p class="p"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">data-read-memory-bytes</span><span>’ </span><a name="index-data_002dread_002dmemory_002dbytes"></a></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Indicates support for the </span><span style="font-family:'Consolas'; font-size:10pt">-data-read-memory-bytes</span><span> and the </span><span style="font-family:'Consolas'; font-size:10pt">-data-write-memory-bytes</span><span> commands. </span></p><p class="p"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">breakpoint-notifications</span><span>’ </span><a name="index-breakpoint_002dnotifications"></a></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Indicates that changes to breakpoints and breakpoints created via the CLI will be announced via async records. </span></p><p class="p"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">ada-task-info</span><span>’ </span><a name="index-ada_002dtask_002dinfo"></a></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Indicates support for the </span><span style="font-family:'Consolas'; font-size:10pt">-ada-task-info</span><span> command. </span></p><p class="p"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">language-option</span><span>’ </span><a name="index-language_002doption"></a></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Indicates that all </span><span style="font-size:10pt">GDB/MI</span><span> commands accept the </span><span style="font-family:'Consolas'; font-size:10pt">--language</span><span> option (see </span><a href="Context-management.html#Context-management" style="text-decoration:none"><span style="text-decoration:underline">Context management</span></a><span>). </span></p><p class="p"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">info-gdb-mi-command</span><span>’ </span><a name="index-info_002dgdb_002dmi_002dcommand"></a></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Indicates support for the </span><span style="font-family:'Consolas'; font-size:10pt">-info-gdb-mi-command</span><span> command. </span></p><p class="p"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">undefined-command-error-code</span><span>’ </span><a name="index-undefined_002dcommand_002derror_00"></a></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Indicates support for the "undefined-command" error code in error result records, produced when trying to execute an undefined </span><span style="font-size:10pt">GDB/MI</span><span> command (see </span><a href="GDB_002fMI-Result-Records.html#GDB_002fMI-Result-Records" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Result Records</span></a><span>). </span></p><p class="p"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">exec-run-start-option</span><span>’ </span><a name="index-exec_002drun_002dstart_002doption"></a></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Indicates that the </span><span style="font-family:'Consolas'; font-size:10pt">-exec-run</span><span> command supports the </span><span style="font-family:'Consolas'; font-size:10pt">--start</span><span> option (see </span><a href="GDB_002fMI-Program-Execution.html#GDB_002fMI-Program-Execution" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Program Execution</span></a><span>). </span></p><p class="p"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">data-disassemble-a-option</span><span>’ </span><a name="index-data_002ddisassemble_002da_002dopt"></a></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Indicates that the </span><span style="font-family:'Consolas'; font-size:10pt">-data-disassemble</span><span> command supports the </span><span style="font-family:'Consolas'; font-size:10pt">-a</span><span> option (see </span><a href="GDB_002fMI-Data-Manipulation.html#GDB_002fMI-Data-Manipulation" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Data Manipulation</span></a><span>). </span><a name="The-_002dlist_002dtarget_002dfeatures-Co"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-list-target-features</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dlist_002dtarget_002dfeatures"></a></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Returns a list of particular features that are supported by the target. Those features affect the permitted MI commands, but unlike the features reported by the </span><span style="font-family:'Consolas'; font-size:10pt">-list-features</span><span> command, the features depend on which target GDB is using at the moment. Whenever a target can change, due to commands such as </span><span style="font-family:'Consolas'; font-size:10pt">-target-select</span><span>, </span><span style="font-family:'Consolas'; font-size:10pt">-target-attach</span><span> or </span><span style="font-family:'Consolas'; font-size:10pt">-exec-run</span><span>, the list of target features may change, and the frontend should obtain it again. Example output: </span></p><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb) -list-target-features</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,result=["async"]</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The current list of features is: </span></p><p class="p"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">async</span><span>’</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Indicates that the target is capable of asynchronous command execution, which means that </span><span style="font-size:10pt">GDB</span><span> will accept further commands while the target is running. </span></p><p class="p"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">reverse</span><span>’</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Indicates that the target is capable of reverse execution. See </span><a href="Reverse-Execution.html#Reverse-Execution" style="text-decoration:none"><span style="text-decoration:underline">Reverse Execution</span></a><span>, for more information. </span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Next: </span><a href="GDB_002fMI-Miscellaneous-Commands.html#GDB_002fMI-Miscellaneous-Commands" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Miscellaneous Commands</span></a><span>, Previous: </span><a href="GDB_002fMI-Ada-Exceptions-Commands.html#GDB_002fMI-Ada-Exceptions-Commands" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Ada Exceptions Commands</span></a><span>, Up: </span><a href="GDB_002fMI.html#GDB_002fMI" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p></div><br style="page-break-before:always; clear:both; mso-break-type:section-break" /><div><p class="p" style="margin-bottom:12pt"><a name="GDB_002fMI-Symbol-Query"></a><span>Next: </span><a href="GDB_002fMI-File-Commands.html#GDB_002fMI-File-Commands" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI File Commands</span></a><span>, Previous: </span><a href="GDB_002fMI-Tracepoint-Commands.html#GDB_002fMI-Tracepoint-Commands" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Tracepoint Commands</span></a><span>, Up: </span><a href="GDB_002fMI.html#GDB_002fMI" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><h3 style="margin-top:14.05pt; margin-bottom:14.05pt; page-break-inside:auto; page-break-after:auto"><a name="GDB_002fMI-Symbol-Query-Commands"></a><span style="font-family:'Times New Roman'; color:#000000">27.18 </span><span style="font-family:'Times New Roman'; font-size:11.5pt; color:#000000">GDB/MI</span><span style="font-family:'Times New Roman'; color:#000000"> Symbol Query Commands</span><a name="The-_002dsymbol_002dinfo_002dfunctions-C"></a></h3><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-symbol-info-functions</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dsymbol_002dinfo_002dfunctions"></a><a name="g_t_002dsymbol_002dinfo_002dfunctions"></a><a name="Synopsis-80"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-symbol-info-functions [--include-nondebug]</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                        </span><span style="font-family:'Consolas'">[--type </span><span style="font-family:'Consolas'; font-style:italic">type_regexp</span><span style="font-family:'Consolas'">]</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                        </span><span style="font-family:'Consolas'">[--name </span><span style="font-family:'Consolas'; font-style:italic">name_regexp</span><span style="font-family:'Consolas'">]</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                        </span><span style="font-family:'Consolas'">[--max-results </span><span style="font-family:'Consolas'; font-style:italic">limit</span><span style="font-family:'Consolas'">]</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Return a list containing the names and types for all global functions taken from the debug information. The functions are grouped by source file, and shown with the line number on which each function is defined. </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The </span><span style="font-family:'Consolas'; font-size:10pt">--include-nondebug</span><span> option causes the output to include code symbols from the symbol table. </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The options </span><span style="font-family:'Consolas'; font-size:10pt">--type</span><span> and </span><span style="font-family:'Consolas'; font-size:10pt">--name</span><span> allow the symbols returned to be filtered based on either the name of the function, or the type signature of the function. </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The option </span><span style="font-family:'Consolas'; font-size:10pt">--max-results</span><span> restricts the command to return no more than </span><span style="font-style:italic">limit</span><span> results. If exactly </span><span style="font-style:italic">limit</span><span> results are returned then there might be additional results available if a higher limit is used. </span><a name="GDB-Command-62"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">info functions</span><span>’. </span><a name="Example-62"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-symbol-info-functions</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,symbols=</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">{debug=</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">    </span><span style="font-family:'Consolas'">[{filename="/project/gdb/testsuite/gdb.mi/mi-sym-info-1.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">fullname="/project/gdb/testsuite/gdb.mi/mi-sym-info-1.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">symbols=[{line="36", name="f4", type="void (int *)",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                </span><span style="font-family:'Consolas'">description="void f4(int *);"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">               </span><span style="font-family:'Consolas'">{line="42", name="main", type="int ()",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                </span><span style="font-family:'Consolas'">description="int main();"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">               </span><span style="font-family:'Consolas'">{line="30", name="f1", type="my_int_t (int, int)",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                </span><span style="font-family:'Consolas'">description="static my_int_t f1(int, int);"}]},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">     </span><span style="font-family:'Consolas'">{filename="/project/gdb/testsuite/gdb.mi/mi-sym-info-2.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">fullname="/project/gdb/testsuite/gdb.mi/mi-sym-info-2.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">symbols=[{line="33", name="f2", type="float (another_float_t)",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                </span><span style="font-family:'Consolas'">description="float f2(another_float_t);"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">               </span><span style="font-family:'Consolas'">{line="39", name="f3", type="int (another_int_t)",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                </span><span style="font-family:'Consolas'">description="int f3(another_int_t);"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">               </span><span style="font-family:'Consolas'">{line="27", name="f1", type="another_float_t (int)",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                </span><span style="font-family:'Consolas'">description="static another_float_t f1(int);"}]}]}</span></p><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-symbol-info-functions --name f1</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,symbols=</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">{debug=</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">    </span><span style="font-family:'Consolas'">[{filename="/project/gdb/testsuite/gdb.mi/mi-sym-info-1.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">fullname="/project/gdb/testsuite/gdb.mi/mi-sym-info-1.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">symbols=[{line="30", name="f1", type="my_int_t (int, int)",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                </span><span style="font-family:'Consolas'">description="static my_int_t f1(int, int);"}]},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">     </span><span style="font-family:'Consolas'">{filename="/project/gdb/testsuite/gdb.mi/mi-sym-info-2.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">fullname="/project/gdb/testsuite/gdb.mi/mi-sym-info-2.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">symbols=[{line="27", name="f1", type="another_float_t (int)",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                </span><span style="font-family:'Consolas'">description="static another_float_t f1(int);"}]}]}</span></p><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-symbol-info-functions --type void</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,symbols=</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">{debug=</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">    </span><span style="font-family:'Consolas'">[{filename="/project/gdb/testsuite/gdb.mi/mi-sym-info-1.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">fullname="/project/gdb/testsuite/gdb.mi/mi-sym-info-1.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">symbols=[{line="36", name="f4", type="void (int *)",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                </span><span style="font-family:'Consolas'">description="void f4(int *);"}]}]}</span></p><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-symbol-info-functions --include-nondebug</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,symbols=</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">{debug=</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">    </span><span style="font-family:'Consolas'">[{filename="/project/gdb/testsuite/gdb.mi/mi-sym-info-1.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">fullname="/project/gdb/testsuite/gdb.mi/mi-sym-info-1.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">symbols=[{line="36", name="f4", type="void (int *)",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                </span><span style="font-family:'Consolas'">description="void f4(int *);"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">               </span><span style="font-family:'Consolas'">{line="42", name="main", type="int ()",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                </span><span style="font-family:'Consolas'">description="int main();"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">               </span><span style="font-family:'Consolas'">{line="30", name="f1", type="my_int_t (int, int)",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                </span><span style="font-family:'Consolas'">description="static my_int_t f1(int, int);"}]},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">     </span><span style="font-family:'Consolas'">{filename="/project/gdb/testsuite/gdb.mi/mi-sym-info-2.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">fullname="/project/gdb/testsuite/gdb.mi/mi-sym-info-2.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">symbols=[{line="33", name="f2", type="float (another_float_t)",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                </span><span style="font-family:'Consolas'">description="float f2(another_float_t);"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">               </span><span style="font-family:'Consolas'">{line="39", name="f3", type="int (another_int_t)",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                </span><span style="font-family:'Consolas'">description="int f3(another_int_t);"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">               </span><span style="font-family:'Consolas'">{line="27", name="f1", type="another_float_t (int)",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                </span><span style="font-family:'Consolas'">description="static another_float_t f1(int);"}]}],</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">   </span><span style="font-family:'Consolas'">nondebug=</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">    </span><span style="font-family:'Consolas'">[{address="0x0000000000400398",name="_init"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">     </span><span style="font-family:'Consolas'">{address="0x00000000004003b0",name="_start"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">...</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">    </span><span style="font-family:'Consolas'">]}</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dsymbol_002dinfo_002dmodule_002d"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-symbol-info-module-functions</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dsymbol_002dinfo_002dmodule_00"></a><a name="g_t_002dsymbol_002dinfo_002dmodule_002df"></a><a name="Synopsis-81"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-symbol-info-module-functions [--module </span><span style="font-family:'Consolas'; font-style:italic">module_regexp</span><span style="font-family:'Consolas'">]</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                               </span><span style="font-family:'Consolas'">[--name </span><span style="font-family:'Consolas'; font-style:italic">name_regexp</span><span style="font-family:'Consolas'">]</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                               </span><span style="font-family:'Consolas'">[--type </span><span style="font-family:'Consolas'; font-style:italic">type_regexp</span><span style="font-family:'Consolas'">]</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Return a list containing the names of all known functions within all know Fortran modules. The functions are grouped by source file and containing module, and shown with the line number on which each function is defined. </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The option </span><span style="font-family:'Consolas'; font-size:10pt">--module</span><span> only returns results for modules matching </span><span style="font-style:italic">module_regexp</span><span>. The option </span><span style="font-family:'Consolas'; font-size:10pt">--name</span><span> only returns functions whose name matches </span><span style="font-style:italic">name_regexp</span><span>, and </span><span style="font-family:'Consolas'; font-size:10pt">--type</span><span> only returns functions whose type matches </span><span style="font-style:italic">type_regexp</span><span>. </span><a name="GDB-Command-63"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">info module functions</span><span>’. </span><a name="Example-63"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-symbol-info-module-functions</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,symbols=</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">[{module="mod1",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">    </span><span style="font-family:'Consolas'">files=[{filename="/project/gdb/testsuite/gdb.mi/mi-fortran-modules-2.f90",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">            </span><span style="font-family:'Consolas'">fullname="/project/gdb/testsuite/gdb.mi/mi-fortran-modules-2.f90",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">            </span><span style="font-family:'Consolas'">symbols=[{line="21",name="mod1::check_all",type="void (void)",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                      </span><span style="font-family:'Consolas'">description="void mod1::check_all(void);"}]}]},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">    </span><span style="font-family:'Consolas'">{module="mod2",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">     </span><span style="font-family:'Consolas'">files=[{filename="/project/gdb/testsuite/gdb.mi/mi-fortran-modules-2.f90",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">             </span><span style="font-family:'Consolas'">fullname="/project/gdb/testsuite/gdb.mi/mi-fortran-modules-2.f90",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">             </span><span style="font-family:'Consolas'">symbols=[{line="30",name="mod2::check_var_i",type="void (void)",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                       </span><span style="font-family:'Consolas'">description="void mod2::check_var_i(void);"}]}]},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">    </span><span style="font-family:'Consolas'">{module="mod3",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">     </span><span style="font-family:'Consolas'">files=[{filename="/projec/gdb/testsuite/gdb.mi/mi-fortran-modules.f90",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">             </span><span style="font-family:'Consolas'">fullname="/projec/gdb/testsuite/gdb.mi/mi-fortran-modules.f90",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">             </span><span style="font-family:'Consolas'">symbols=[{line="21",name="mod3::check_all",type="void (void)",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                       </span><span style="font-family:'Consolas'">description="void mod3::check_all(void);"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                      </span><span style="font-family:'Consolas'">{line="27",name="mod3::check_mod2",type="void (void)",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                       </span><span style="font-family:'Consolas'">description="void mod3::check_mod2(void);"}]}]},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">    </span><span style="font-family:'Consolas'">{module="modmany",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">     </span><span style="font-family:'Consolas'">files=[{filename="/project/gdb/testsuite/gdb.mi/mi-fortran-modules.f90",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">             </span><span style="font-family:'Consolas'">fullname="/project/gdb/testsuite/gdb.mi/mi-fortran-modules.f90",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">             </span><span style="font-family:'Consolas'">symbols=[{line="35",name="modmany::check_some",type="void (void)",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                       </span><span style="font-family:'Consolas'">description="void modmany::check_some(void);"}]}]},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">    </span><span style="font-family:'Consolas'">{module="moduse",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">     </span><span style="font-family:'Consolas'">files=[{filename="/project/gdb/testsuite/gdb.mi/mi-fortran-modules.f90",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">             </span><span style="font-family:'Consolas'">fullname="/project/gdb/testsuite/gdb.mi/mi-fortran-modules.f90",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">             </span><span style="font-family:'Consolas'">symbols=[{line="44",name="moduse::check_all",type="void (void)",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                       </span><span style="font-family:'Consolas'">description="void moduse::check_all(void);"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                      </span><span style="font-family:'Consolas'">{line="49",name="moduse::check_var_x",type="void (void)",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                       </span><span style="font-family:'Consolas'">description="void moduse::check_var_x(void);"}]}]}]</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-symbol-info-module-variables</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="g_t_002dsymbol_002dinfo_002dmodule_002dv"></a><a name="Synopsis-82"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-symbol-info-module-variables [--module </span><span style="font-family:'Consolas'; font-style:italic">module_regexp</span><span style="font-family:'Consolas'">]</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                               </span><span style="font-family:'Consolas'">[--name </span><span style="font-family:'Consolas'; font-style:italic">name_regexp</span><span style="font-family:'Consolas'">]</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                               </span><span style="font-family:'Consolas'">[--type </span><span style="font-family:'Consolas'; font-style:italic">type_regexp</span><span style="font-family:'Consolas'">]</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Return a list containing the names of all known variables within all know Fortran modules. The variables are grouped by source file and containing module, and shown with the line number on which each variable is defined. </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The option </span><span style="font-family:'Consolas'; font-size:10pt">--module</span><span> only returns results for modules matching </span><span style="font-style:italic">module_regexp</span><span>. The option </span><span style="font-family:'Consolas'; font-size:10pt">--name</span><span> only returns variables whose name matches </span><span style="font-style:italic">name_regexp</span><span>, and </span><span style="font-family:'Consolas'; font-size:10pt">--type</span><span> only returns variables whose type matches </span><span style="font-style:italic">type_regexp</span><span>. </span><a name="GDB-Command-64"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">info module variables</span><span>’. </span><a name="Example-64"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-symbol-info-module-variables</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,symbols=</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">[{module="mod1",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">    </span><span style="font-family:'Consolas'">files=[{filename="/project/gdb/testsuite/gdb.mi/mi-fortran-modules-2.f90",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">            </span><span style="font-family:'Consolas'">fullname="/project/gdb/testsuite/gdb.mi/mi-fortran-modules-2.f90",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">            </span><span style="font-family:'Consolas'">symbols=[{line="18",name="mod1::var_const",type="integer(kind=4)",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                      </span><span style="font-family:'Consolas'">description="integer(kind=4) mod1::var_const;"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                     </span><span style="font-family:'Consolas'">{line="17",name="mod1::var_i",type="integer(kind=4)",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                      </span><span style="font-family:'Consolas'">description="integer(kind=4) mod1::var_i;"}]}]},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">   </span><span style="font-family:'Consolas'">{module="mod2",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">    </span><span style="font-family:'Consolas'">files=[{filename="/project/gdb/testsuite/gdb.mi/mi-fortran-modules-2.f90",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">            </span><span style="font-family:'Consolas'">fullname="/project/gdb/testsuite/gdb.mi/mi-fortran-modules-2.f90",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">            </span><span style="font-family:'Consolas'">symbols=[{line="28",name="mod2::var_i",type="integer(kind=4)",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                      </span><span style="font-family:'Consolas'">description="integer(kind=4) mod2::var_i;"}]}]},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">   </span><span style="font-family:'Consolas'">{module="mod3",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">    </span><span style="font-family:'Consolas'">files=[{filename="/project/gdb/testsuite/gdb.mi/mi-fortran-modules.f90",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">            </span><span style="font-family:'Consolas'">fullname="/project/gdb/testsuite/gdb.mi/mi-fortran-modules.f90",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">            </span><span style="font-family:'Consolas'">symbols=[{line="18",name="mod3::mod1",type="integer(kind=4)",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                      </span><span style="font-family:'Consolas'">description="integer(kind=4) mod3::mod1;"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                     </span><span style="font-family:'Consolas'">{line="17",name="mod3::mod2",type="integer(kind=4)",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                      </span><span style="font-family:'Consolas'">description="integer(kind=4) mod3::mod2;"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                     </span><span style="font-family:'Consolas'">{line="19",name="mod3::var_i",type="integer(kind=4)",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                      </span><span style="font-family:'Consolas'">description="integer(kind=4) mod3::var_i;"}]}]},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">   </span><span style="font-family:'Consolas'">{module="modmany",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">    </span><span style="font-family:'Consolas'">files=[{filename="/project/gdb/testsuite/gdb.mi/mi-fortran-modules.f90",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">            </span><span style="font-family:'Consolas'">fullname="/project/gdb/testsuite/gdb.mi/mi-fortran-modules.f90",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">            </span><span style="font-family:'Consolas'">symbols=[{line="33",name="modmany::var_a",type="integer(kind=4)",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                      </span><span style="font-family:'Consolas'">description="integer(kind=4) modmany::var_a;"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                     </span><span style="font-family:'Consolas'">{line="33",name="modmany::var_b",type="integer(kind=4)",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                      </span><span style="font-family:'Consolas'">description="integer(kind=4) modmany::var_b;"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                     </span><span style="font-family:'Consolas'">{line="33",name="modmany::var_c",type="integer(kind=4)",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                      </span><span style="font-family:'Consolas'">description="integer(kind=4) modmany::var_c;"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                     </span><span style="font-family:'Consolas'">{line="33",name="modmany::var_i",type="integer(kind=4)",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                      </span><span style="font-family:'Consolas'">description="integer(kind=4) modmany::var_i;"}]}]},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">   </span><span style="font-family:'Consolas'">{module="moduse",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">    </span><span style="font-family:'Consolas'">files=[{filename="/project/gdb/testsuite/gdb.mi/mi-fortran-modules.f90",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">            </span><span style="font-family:'Consolas'">fullname="/project/gdb/testsuite/gdb.mi/mi-fortran-modules.f90",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">            </span><span style="font-family:'Consolas'">symbols=[{line="42",name="moduse::var_x",type="integer(kind=4)",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                      </span><span style="font-family:'Consolas'">description="integer(kind=4) moduse::var_x;"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                     </span><span style="font-family:'Consolas'">{line="42",name="moduse::var_y",type="integer(kind=4)",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                      </span><span style="font-family:'Consolas'">description="integer(kind=4) moduse::var_y;"}]}]}]</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dsymbol_002dinfo_002dmodules-Com"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-symbol-info-modules</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dsymbol_002dinfo_002dmodules"></a><a name="g_t_002dsymbol_002dinfo_002dmodules"></a><a name="Synopsis-83"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-symbol-info-modules [--name </span><span style="font-family:'Consolas'; font-style:italic">name_regexp</span><span style="font-family:'Consolas'">]</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                      </span><span style="font-family:'Consolas'">[--max-results </span><span style="font-family:'Consolas'; font-style:italic">limit</span><span style="font-family:'Consolas'">]</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:ignore"> </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Return a list containing the names of all known Fortran modules. The modules are grouped by source file, and shown with the line number on which each modules is defined. </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The option </span><span style="font-family:'Consolas'; font-size:10pt">--name</span><span> allows the modules returned to be filtered based the name of the module. </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The option </span><span style="font-family:'Consolas'; font-size:10pt">--max-results</span><span> restricts the command to return no more than </span><span style="font-style:italic">limit</span><span> results. If exactly </span><span style="font-style:italic">limit</span><span> results are returned then there might be additional results available if a higher limit is used. </span><a name="GDB-Command-65"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">info modules</span><span>’. </span><a name="Example-65"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-symbol-info-modules</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,symbols=</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">{debug=</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">    </span><span style="font-family:'Consolas'">[{filename="/project/gdb/testsuite/gdb.mi/mi-fortran-modules-2.f90",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">fullname="/project/gdb/testsuite/gdb.mi/mi-fortran-modules-2.f90",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">symbols=[{line="16",name="mod1"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">               </span><span style="font-family:'Consolas'">{line="22",name="mod2"}]},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">     </span><span style="font-family:'Consolas'">{filename="/project/gdb/testsuite/gdb.mi/mi-fortran-modules.f90",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">fullname="/project/gdb/testsuite/gdb.mi/mi-fortran-modules.f90",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">symbols=[{line="16",name="mod3"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">               </span><span style="font-family:'Consolas'">{line="22",name="modmany"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">               </span><span style="font-family:'Consolas'">{line="26",name="moduse"}]}]}</span></p><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-symbol-info-modules --name mod[123]</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,symbols=</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">{debug=</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">    </span><span style="font-family:'Consolas'">[{filename="/project/gdb/testsuite/gdb.mi/mi-fortran-modules-2.f90",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">fullname="/project/gdb/testsuite/gdb.mi/mi-fortran-modules-2.f90",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">symbols=[{line="16",name="mod1"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">               </span><span style="font-family:'Consolas'">{line="22",name="mod2"}]},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">     </span><span style="font-family:'Consolas'">{filename="/project/gdb/testsuite/gdb.mi/mi-fortran-modules.f90",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">fullname="/project/gdb/testsuite/gdb.mi/mi-fortran-modules.f90",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">symbols=[{line="16",name="mod3"}]}]}</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dsymbol_002dinfo_002dtypes-Comma"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-symbol-info-types</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dsymbol_002dinfo_002dtypes"></a><a name="g_t_002dsymbol_002dinfo_002dtypes"></a><a name="Synopsis-84"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-symbol-info-types [--name </span><span style="font-family:'Consolas'; font-style:italic">name_regexp</span><span style="font-family:'Consolas'">]</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                    </span><span style="font-family:'Consolas'">[--max-results </span><span style="font-family:'Consolas'; font-style:italic">limit</span><span style="font-family:'Consolas'">]</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:ignore"> </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Return a list of all defined types. The types are grouped by source file, and shown with the line number on which each user defined type is defined. Some base types are not defined in the source code but are added to the debug information by the compiler, for example </span><span style="font-family:'Consolas'; font-size:10pt">int</span><span>, </span><span style="font-family:'Consolas'; font-size:10pt">float</span><span>, etc.; these types do not have an associated line number. </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The option </span><span style="font-family:'Consolas'; font-size:10pt">--name</span><span> allows the list of types returned to be filtered by name. </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The option </span><span style="font-family:'Consolas'; font-size:10pt">--max-results</span><span> restricts the command to return no more than </span><span style="font-style:italic">limit</span><span> results. If exactly </span><span style="font-style:italic">limit</span><span> results are returned then there might be additional results available if a higher limit is used. </span><a name="GDB-Command-66"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">info types</span><span>’. </span><a name="Example-66"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-symbol-info-types</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,symbols=</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">{debug=</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">     </span><span style="font-family:'Consolas'">[{filename="gdb.mi/mi-sym-info-1.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">       </span><span style="font-family:'Consolas'">fullname="/project/gdb/testsuite/gdb.mi/mi-sym-info-1.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">       </span><span style="font-family:'Consolas'">symbols=[{name="float"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                </span><span style="font-family:'Consolas'">{name="int"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                </span><span style="font-family:'Consolas'">{line="27",name="typedef int my_int_t;"}]},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">{filename="gdb.mi/mi-sym-info-2.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">       </span><span style="font-family:'Consolas'">fullname="/project/gdb.mi/mi-sym-info-2.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">       </span><span style="font-family:'Consolas'">symbols=[{line="24",name="typedef float another_float_t;"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                </span><span style="font-family:'Consolas'">{line="23",name="typedef int another_int_t;"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                </span><span style="font-family:'Consolas'">{name="float"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                </span><span style="font-family:'Consolas'">{name="int"}]}]}</span></p><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-symbol-info-types --name _int_</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,symbols=</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">{debug=</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">     </span><span style="font-family:'Consolas'">[{filename="gdb.mi/mi-sym-info-1.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">       </span><span style="font-family:'Consolas'">fullname="/project/gdb/testsuite/gdb.mi/mi-sym-info-1.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">       </span><span style="font-family:'Consolas'">symbols=[{line="27",name="typedef int my_int_t;"}]},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">{filename="gdb.mi/mi-sym-info-2.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">       </span><span style="font-family:'Consolas'">fullname="/project/gdb.mi/mi-sym-info-2.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">       </span><span style="font-family:'Consolas'">symbols=[{line="23",name="typedef int another_int_t;"}]}]}</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dsymbol_002dinfo_002dvariables-C"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-symbol-info-variables</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dsymbol_002dinfo_002dvariables"></a><a name="g_t_002dsymbol_002dinfo_002dvariables"></a><a name="Synopsis-85"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-symbol-info-variables [--include-nondebug]</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                        </span><span style="font-family:'Consolas'">[--type </span><span style="font-family:'Consolas'; font-style:italic">type_regexp</span><span style="font-family:'Consolas'">]</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                        </span><span style="font-family:'Consolas'">[--name </span><span style="font-family:'Consolas'; font-style:italic">name_regexp</span><span style="font-family:'Consolas'">]</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                        </span><span style="font-family:'Consolas'">[--max-results </span><span style="font-family:'Consolas'; font-style:italic">limit</span><span style="font-family:'Consolas'">]</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:ignore"> </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Return a list containing the names and types for all global variables taken from the debug information. The variables are grouped by source file, and shown with the line number on which each variable is defined. </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The </span><span style="font-family:'Consolas'; font-size:10pt">--include-nondebug</span><span> option causes the output to include data symbols from the symbol table. </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The options </span><span style="font-family:'Consolas'; font-size:10pt">--type</span><span> and </span><span style="font-family:'Consolas'; font-size:10pt">--name</span><span> allow the symbols returned to be filtered based on either the name of the variable, or the type of the variable. </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The option </span><span style="font-family:'Consolas'; font-size:10pt">--max-results</span><span> restricts the command to return no more than </span><span style="font-style:italic">limit</span><span> results. If exactly </span><span style="font-style:italic">limit</span><span> results are returned then there might be additional results available if a higher limit is used. </span><a name="GDB-Command-67"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">info variables</span><span>’. </span><a name="Example-67"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-symbol-info-variables</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,symbols=</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">{debug=</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">    </span><span style="font-family:'Consolas'">[{filename="/project/gdb/testsuite/gdb.mi/mi-sym-info-1.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">fullname="/project/gdb/testsuite/gdb.mi/mi-sym-info-1.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">symbols=[{line="25",name="global_f1",type="float",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                </span><span style="font-family:'Consolas'">description="static float global_f1;"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">               </span><span style="font-family:'Consolas'">{line="24",name="global_i1",type="int",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                </span><span style="font-family:'Consolas'">description="static int global_i1;"}]},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">     </span><span style="font-family:'Consolas'">{filename="/project/gdb/testsuite/gdb.mi/mi-sym-info-2.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">fullname="/project/gdb/testsuite/gdb.mi/mi-sym-info-2.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">symbols=[{line="21",name="global_f2",type="int",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                </span><span style="font-family:'Consolas'">description="int global_f2;"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">               </span><span style="font-family:'Consolas'">{line="20",name="global_i2",type="int",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                </span><span style="font-family:'Consolas'">description="int global_i2;"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">               </span><span style="font-family:'Consolas'">{line="19",name="global_f1",type="float",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                </span><span style="font-family:'Consolas'">description="static float global_f1;"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">               </span><span style="font-family:'Consolas'">{line="18",name="global_i1",type="int",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                </span><span style="font-family:'Consolas'">description="static int global_i1;"}]}]}</span></p><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-symbol-info-variables --name f1</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,symbols=</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">{debug=</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">    </span><span style="font-family:'Consolas'">[{filename="/project/gdb/testsuite/gdb.mi/mi-sym-info-1.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">fullname="/project/gdb/testsuite/gdb.mi/mi-sym-info-1.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">symbols=[{line="25",name="global_f1",type="float",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                </span><span style="font-family:'Consolas'">description="static float global_f1;"}]},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">     </span><span style="font-family:'Consolas'">{filename="/project/gdb/testsuite/gdb.mi/mi-sym-info-2.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">fullname="/project/gdb/testsuite/gdb.mi/mi-sym-info-2.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">symbols=[{line="19",name="global_f1",type="float",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                </span><span style="font-family:'Consolas'">description="static float global_f1;"}]}]}</span></p><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-symbol-info-variables --type float</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,symbols=</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">{debug=</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">    </span><span style="font-family:'Consolas'">[{filename="/project/gdb/testsuite/gdb.mi/mi-sym-info-1.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">fullname="/project/gdb/testsuite/gdb.mi/mi-sym-info-1.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">symbols=[{line="25",name="global_f1",type="float",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                </span><span style="font-family:'Consolas'">description="static float global_f1;"}]},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">     </span><span style="font-family:'Consolas'">{filename="/project/gdb/testsuite/gdb.mi/mi-sym-info-2.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">fullname="/project/gdb/testsuite/gdb.mi/mi-sym-info-2.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">symbols=[{line="19",name="global_f1",type="float",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                </span><span style="font-family:'Consolas'">description="static float global_f1;"}]}]}</span></p><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-symbol-info-variables --include-nondebug</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,symbols=</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">{debug=</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">    </span><span style="font-family:'Consolas'">[{filename="/project/gdb/testsuite/gdb.mi/mi-sym-info-1.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">fullname="/project/gdb/testsuite/gdb.mi/mi-sym-info-1.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">symbols=[{line="25",name="global_f1",type="float",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                </span><span style="font-family:'Consolas'">description="static float global_f1;"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">               </span><span style="font-family:'Consolas'">{line="24",name="global_i1",type="int",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                </span><span style="font-family:'Consolas'">description="static int global_i1;"}]},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">     </span><span style="font-family:'Consolas'">{filename="/project/gdb/testsuite/gdb.mi/mi-sym-info-2.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">fullname="/project/gdb/testsuite/gdb.mi/mi-sym-info-2.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">symbols=[{line="21",name="global_f2",type="int",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                </span><span style="font-family:'Consolas'">description="int global_f2;"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">               </span><span style="font-family:'Consolas'">{line="20",name="global_i2",type="int",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                </span><span style="font-family:'Consolas'">description="int global_i2;"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">               </span><span style="font-family:'Consolas'">{line="19",name="global_f1",type="float",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                </span><span style="font-family:'Consolas'">description="static float global_f1;"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">               </span><span style="font-family:'Consolas'">{line="18",name="global_i1",type="int",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                </span><span style="font-family:'Consolas'">description="static int global_i1;"}]}],</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">   </span><span style="font-family:'Consolas'">nondebug=</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">    </span><span style="font-family:'Consolas'">[{address="0x00000000004005d0",name="_IO_stdin_used"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">     </span><span style="font-family:'Consolas'">{address="0x00000000004005d8",name="__dso_handle"}</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">...</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">    </span><span style="font-family:'Consolas'">]}</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dsymbol_002dlist_002dlines-Comma"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-symbol-list-lines</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dsymbol_002dlist_002dlines"></a><a name="Synopsis-86"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-symbol-list-lines </span><span style="font-family:'Consolas'; font-style:italic">filename</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Print the list of lines that contain code and their associated program addresses for the given source filename. The entries are sorted in ascending PC order. </span><a name="GDB-Command-68"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>There is no corresponding </span><span style="font-size:10pt">GDB</span><span> command. </span><a name="Example-68"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-symbol-list-lines basics.c</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,lines=[{pc="0x08048554",line="7"},{pc="0x0804855a",line="8"}]</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Next: </span><a href="GDB_002fMI-File-Commands.html#GDB_002fMI-File-Commands" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI File Commands</span></a><span>, Previous: </span><a href="GDB_002fMI-Tracepoint-Commands.html#GDB_002fMI-Tracepoint-Commands" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Tracepoint Commands</span></a><span>, Up: </span><a href="GDB_002fMI.html#GDB_002fMI" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p></div><br style="page-break-before:always; clear:both; mso-break-type:section-break" /><div><p class="p0" style="margin-bottom:12pt"><a name="C_002b_002b-Exception-GDB_002fMI-Catchpo"></a><span>Previous: </span><a href="Ada-Exception-GDB_002fMI-Catchpoint-Commands.html#Ada-Exception-GDB_002fMI-Catchpoint-Commands" style="text-decoration:none"><span style="text-decoration:underline">Ada Exception GDB/MI Catchpoint Commands</span></a><span>, Up: </span><a href="GDB_002fMI-Catchpoint-Commands.html#GDB_002fMI-Catchpoint-Commands" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Catchpoint Commands</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">27.9.3 C</span><span style="font-family:'Consolas'; color:#000000">++</span><span style="font-family:'Times New Roman'; color:#000000"> Exception </span><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB/MI</span><span style="font-family:'Times New Roman'; color:#000000"> Catchpoints</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The following </span><span style="font-size:10pt">GDB/MI</span><span> commands can be used to create catchpoints that stop the execution when C</span><span style="font-family:'Consolas'; font-size:10pt">++</span><span> exceptions are being throw, rethrown, or caught. </span><a name="The-_002dcatch_002dthrow-Command"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-catch-throw</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dcatch_002dthrow"></a><a name="Synopsis-18"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-catch-throw [ -t ] [ -r </span><span style="font-family:'Consolas'; font-style:italic">regexp</span><span style="font-family:'Consolas'">]</span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Stop when the debuggee throws a C</span><span style="font-family:'Consolas'; font-size:10pt">++</span><span> exception. If </span><span style="font-style:italic">regexp</span><span> is given, then only exceptions whose type matches the regular expression will be caught. </span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>If ‘</span><span style="font-family:'Consolas'; font-size:10pt">-t</span><span>’ is given, then the catchpoint is enabled only for one stop, the catchpoint is automatically deleted after stopping once for the event. </span><a name="GDB-Command-17"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> commands are ‘</span><span style="font-family:'Consolas'; font-size:10pt">catch throw</span><span>’ and ‘</span><span style="font-family:'Consolas'; font-size:10pt">tcatch throw</span><span>’ (see </span><a href="Set-Catchpoints.html#Set-Catchpoints" style="text-decoration:none"><span style="text-decoration:underline">Set Catchpoints</span></a><span>). </span><a name="Example-17"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">-catch-throw -r exception_type</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,bkpt={number="1",type="catchpoint",disp="keep",enabled="y",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">what="exception throw",catch-type="throw",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">thread-groups=["i1"],</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">regexp="exception_type",times="0"}</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-exec-run</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^running</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">~"\n"</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">~"Catchpoint 1 (exception thrown), 0x00007ffff7ae00ed</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">in __cxa_throw () from /lib64/libstdc++.so.6\n"</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">*stopped,bkptno="1",reason="breakpoint-hit",disp="keep",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">frame={addr="0x00007ffff7ae00ed",func="__cxa_throw",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">args=[],from="/lib64/libstdc++.so.6",arch="i386:x86-64"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">thread-id="1",stopped-threads="all",core="6"</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dcatch_002drethrow-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-catch-rethrow</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dcatch_002drethrow"></a><a name="Synopsis-19"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-catch-rethrow [ -t ] [ -r </span><span style="font-family:'Consolas'; font-style:italic">regexp</span><span style="font-family:'Consolas'">]</span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Stop when a C</span><span style="font-family:'Consolas'; font-size:10pt">++</span><span> exception is re-thrown. If </span><span style="font-style:italic">regexp</span><span> is given, then only exceptions whose type matches the regular expression will be caught. </span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>If ‘</span><span style="font-family:'Consolas'; font-size:10pt">-t</span><span>’ is given, then the catchpoint is enabled only for one stop, the catchpoint is automatically deleted after the first event is caught. </span><a name="GDB-Command-18"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> commands are ‘</span><span style="font-family:'Consolas'; font-size:10pt">catch rethrow</span><span>’ and ‘</span><span style="font-family:'Consolas'; font-size:10pt">tcatch rethrow</span><span>’ (see </span><a href="Set-Catchpoints.html#Set-Catchpoints" style="text-decoration:none"><span style="text-decoration:underline">Set Catchpoints</span></a><span>). </span><a name="Example-18"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">-catch-rethrow -r exception_type</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,bkpt={number="1",type="catchpoint",disp="keep",enabled="y",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">what="exception rethrow",catch-type="rethrow",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">thread-groups=["i1"],</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">regexp="exception_type",times="0"}</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-exec-run</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^running</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">~"\n"</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">~"Catchpoint 1 (exception rethrown), 0x00007ffff7ae00ed</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">in __cxa_rethrow () from /lib64/libstdc++.so.6\n"</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">*stopped,bkptno="1",reason="breakpoint-hit",disp="keep",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">frame={addr="0x00007ffff7ae00ed",func="__cxa_rethrow",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">args=[],from="/lib64/libstdc++.so.6",arch="i386:x86-64"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">thread-id="1",stopped-threads="all",core="6"</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dcatch_002dcatch-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-catch-catch</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dcatch_002dcatch"></a><a name="Synopsis-20"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-catch-catch [ -t ] [ -r </span><span style="font-family:'Consolas'; font-style:italic">regexp</span><span style="font-family:'Consolas'">]</span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Stop when the debuggee catches a C</span><span style="font-family:'Consolas'; font-size:10pt">++</span><span> exception. If </span><span style="font-style:italic">regexp</span><span> is given, then only exceptions whose type matches the regular expression will be caught. </span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>If ‘</span><span style="font-family:'Consolas'; font-size:10pt">-t</span><span>’ is given, then the catchpoint is enabled only for one stop, the catchpoint is automatically deleted after the first event is caught. </span><a name="GDB-Command-19"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> commands are ‘</span><span style="font-family:'Consolas'; font-size:10pt">catch catch</span><span>’ and ‘</span><span style="font-family:'Consolas'; font-size:10pt">tcatch catch</span><span>’ (see </span><a href="Set-Catchpoints.html#Set-Catchpoints" style="text-decoration:none"><span style="text-decoration:underline">Set Catchpoints</span></a><span>). </span><a name="Example-19"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">-catch-catch -r exception_type</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,bkpt={number="1",type="catchpoint",disp="keep",enabled="y",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">what="exception catch",catch-type="catch",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">thread-groups=["i1"],</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">regexp="exception_type",times="0"}</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-exec-run</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^running</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">~"\n"</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">~"Catchpoint 1 (exception caught), 0x00007ffff7ae00ed</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">in __cxa_begin_catch () from /lib64/libstdc++.so.6\n"</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">*stopped,bkptno="1",reason="breakpoint-hit",disp="keep",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">frame={addr="0x00007ffff7ae00ed",func="__cxa_begin_catch",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">args=[],from="/lib64/libstdc++.so.6",arch="i386:x86-64"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">thread-id="1",stopped-threads="all",core="6"</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Previous: </span><a href="Ada-Exception-GDB_002fMI-Catchpoint-Commands.html#Ada-Exception-GDB_002fMI-Catchpoint-Commands" style="text-decoration:none"><span style="text-decoration:underline">Ada Exception GDB/MI Catchpoint Commands</span></a><span>, Up: </span><a href="GDB_002fMI-Catchpoint-Commands.html#GDB_002fMI-Catchpoint-Commands" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Catchpoint Commands</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p></div><br style="page-break-before:always; clear:both; mso-break-type:section-break" /><div><p class="p0" style="margin-bottom:12pt"><a name="GDB_002fMI-Async-Records"></a><span>Next: </span><a href="GDB_002fMI-Breakpoint-Information.html#GDB_002fMI-Breakpoint-Information" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Breakpoint Information</span></a><span>, Previous: </span><a href="GDB_002fMI-Stream-Records.html#GDB_002fMI-Stream-Records" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Stream Records</span></a><span>, Up: </span><a href="GDB_002fMI-Output-Records.html#GDB_002fMI-Output-Records" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Output Records</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="GDB_002fMI-Async-Records-1"></a><span style="font-family:'Times New Roman'; color:#000000">27.5.3 </span><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB/MI</span><span style="font-family:'Times New Roman'; color:#000000"> Async Records</span><a name="index-async-records-in-GDB_002fMI"></a><a name="index-GDB_002fMI_002c-async-records"></a></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span style="font-style:italic">Async</span><span> records are used to notify the </span><span style="font-size:10pt">GDB/MI</span><span> client of additional changes that have occurred. Those changes can either be a consequence of </span><span style="font-size:10pt">GDB/MI</span><span> commands (e.g., a breakpoint modified) or a result of target activity (e.g., target stopped). </span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The following is the list of possible async records: </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">*running,thread-id="</span><span style="font-family:'Consolas'; font-style:italic">thread</span><span style="font-family:'Consolas'">"</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The target is now running. The </span><span style="font-style:italic">thread</span><span> field can be the global thread ID of the thread that is now running, and it can be ‘</span><span style="font-family:'Consolas'; font-size:10pt">all</span><span>’ 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><span style="font-size:10pt">GDB</span><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. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">*stopped,reason="</span><span style="font-family:'Consolas'; font-style:italic">reason</span><span style="font-family:'Consolas'">",thread-id="</span><span style="font-family:'Consolas'; font-style:italic">id</span><span style="font-family:'Consolas'">",stopped-threads="</span><span style="font-family:'Consolas'; font-style:italic">stopped</span><span style="font-family:'Consolas'">",core="</span><span style="font-family:'Consolas'; font-style:italic">core</span><span style="font-family:'Consolas'">"</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The target has stopped. The </span><span style="font-style:italic">reason</span><span> field can have one of the following values: </span></p><p class="p0" style="margin-left:30pt; font-size:10pt"><span style="font-family:'Consolas'">breakpoint-hit</span></p><p class="p0" style="margin-top:12pt; margin-left:60pt; margin-bottom:12pt"><span>A breakpoint was reached. </span></p><p class="p0" style="margin-left:30pt; font-size:10pt"><span style="font-family:'Consolas'">watchpoint-trigger</span></p><p class="p0" style="margin-top:12pt; margin-left:60pt; margin-bottom:12pt"><span>A watchpoint was triggered. </span></p><p class="p0" style="margin-left:30pt; font-size:10pt"><span style="font-family:'Consolas'">read-watchpoint-trigger</span></p><p class="p0" style="margin-top:12pt; margin-left:60pt; margin-bottom:12pt"><span>A read watchpoint was triggered. </span></p><p class="p0" style="margin-left:30pt; font-size:10pt"><span style="font-family:'Consolas'">access-watchpoint-trigger</span></p><p class="p0" style="margin-top:12pt; margin-left:60pt; margin-bottom:12pt"><span>An access watchpoint was triggered. </span></p><p class="p0" style="margin-left:30pt; font-size:10pt"><span style="font-family:'Consolas'">function-finished</span></p><p class="p0" style="margin-top:12pt; margin-left:60pt; margin-bottom:12pt"><span>An -exec-finish or similar CLI command was accomplished. </span></p><p class="p0" style="margin-left:30pt; font-size:10pt"><span style="font-family:'Consolas'">location-reached</span></p><p class="p0" style="margin-top:12pt; margin-left:60pt; margin-bottom:12pt"><span>An -exec-until or similar CLI command was accomplished. </span></p><p class="p0" style="margin-left:30pt; font-size:10pt"><span style="font-family:'Consolas'">watchpoint-scope</span></p><p class="p0" style="margin-top:12pt; margin-left:60pt; margin-bottom:12pt"><span>A watchpoint has gone out of scope. </span></p><p class="p0" style="margin-left:30pt; font-size:10pt"><span style="font-family:'Consolas'">end-stepping-range</span></p><p class="p0" style="margin-top:12pt; margin-left:60pt; margin-bottom:12pt"><span>An -exec-next, -exec-next-instruction, -exec-step, -exec-step-instruction or similar CLI command was accomplished. </span></p><p class="p0" style="margin-left:30pt; font-size:10pt"><span style="font-family:'Consolas'">exited-signalled</span></p><p class="p0" style="margin-top:12pt; margin-left:60pt; margin-bottom:12pt"><span>The inferior exited because of a signal. </span></p><p class="p0" style="margin-left:30pt; font-size:10pt"><span style="font-family:'Consolas'">exited</span></p><p class="p0" style="margin-top:12pt; margin-left:60pt; margin-bottom:12pt"><span>The inferior exited. </span></p><p class="p0" style="margin-left:30pt; font-size:10pt"><span style="font-family:'Consolas'">exited-normally</span></p><p class="p0" style="margin-top:12pt; margin-left:60pt; margin-bottom:12pt"><span>The inferior exited normally. </span></p><p class="p0" style="margin-left:30pt; font-size:10pt"><span style="font-family:'Consolas'">signal-received</span></p><p class="p0" style="margin-top:12pt; margin-left:60pt; margin-bottom:12pt"><span>A signal was received by the inferior. </span></p><p class="p0" style="margin-left:30pt; font-size:10pt"><span style="font-family:'Consolas'">solib-event</span></p><p class="p0" style="margin-top:12pt; margin-left:60pt; margin-bottom:12pt"><span>The inferior has stopped due to a library being loaded or unloaded. This can happen when </span><span style="font-family:'Consolas'; font-size:10pt">stop-on-solib-events</span><span> (see </span><a href="Files.html#Files" style="text-decoration:none"><span style="text-decoration:underline">Files</span></a><span>) is set or when a </span><span style="font-family:'Consolas'; font-size:10pt">catch load</span><span> or </span><span style="font-family:'Consolas'; font-size:10pt">catch unload</span><span> catchpoint is in use (see </span><a href="Set-Catchpoints.html#Set-Catchpoints" style="text-decoration:none"><span style="text-decoration:underline">Set Catchpoints</span></a><span>). </span></p><p class="p0" style="margin-left:30pt; font-size:10pt"><span style="font-family:'Consolas'">fork</span></p><p class="p0" style="margin-top:12pt; margin-left:60pt; margin-bottom:12pt"><span>The inferior has forked. This is reported when </span><span style="font-family:'Consolas'; font-size:10pt">catch fork</span><span> (see </span><a href="Set-Catchpoints.html#Set-Catchpoints" style="text-decoration:none"><span style="text-decoration:underline">Set Catchpoints</span></a><span>) has been used. </span></p><p class="p0" style="margin-left:30pt; font-size:10pt"><span style="font-family:'Consolas'">vfork</span></p><p class="p0" style="margin-top:12pt; margin-left:60pt; margin-bottom:12pt"><span>The inferior has vforked. This is reported in when </span><span style="font-family:'Consolas'; font-size:10pt">catch vfork</span><span> (see </span><a href="Set-Catchpoints.html#Set-Catchpoints" style="text-decoration:none"><span style="text-decoration:underline">Set Catchpoints</span></a><span>) has been used. </span></p><p class="p0" style="margin-left:30pt; font-size:10pt"><span style="font-family:'Consolas'">syscall-entry</span></p><p class="p0" style="margin-top:12pt; margin-left:60pt; margin-bottom:12pt"><span>The inferior entered a system call. This is reported when </span><span style="font-family:'Consolas'; font-size:10pt">catch syscall</span><span> (see </span><a href="Set-Catchpoints.html#Set-Catchpoints" style="text-decoration:none"><span style="text-decoration:underline">Set Catchpoints</span></a><span>) has been used. </span></p><p class="p0" style="margin-left:30pt; font-size:10pt"><span style="font-family:'Consolas'">syscall-return</span></p><p class="p0" style="margin-top:12pt; margin-left:60pt; margin-bottom:12pt"><span>The inferior returned from a system call. This is reported when </span><span style="font-family:'Consolas'; font-size:10pt">catch syscall</span><span> (see </span><a href="Set-Catchpoints.html#Set-Catchpoints" style="text-decoration:none"><span style="text-decoration:underline">Set Catchpoints</span></a><span>) has been used. </span></p><p class="p0" style="margin-left:30pt; font-size:10pt"><span style="font-family:'Consolas'">exec</span></p><p class="p0" style="margin-top:12pt; margin-left:60pt; margin-bottom:12pt"><span>The inferior called </span><span style="font-family:'Consolas'; font-size:10pt">exec</span><span>. This is reported when </span><span style="font-family:'Consolas'; font-size:10pt">catch exec</span><span> (see </span><a href="Set-Catchpoints.html#Set-Catchpoints" style="text-decoration:none"><span style="text-decoration:underline">Set Catchpoints</span></a><span>) has been used. </span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The </span><span style="font-style:italic">id</span><span> field identifies the global thread ID of the thread that directly caused the stop – for example by hitting a breakpoint. Depending on whether all-stop mode is in effect (see </span><a href="All_002dStop-Mode.html#All_002dStop-Mode" style="text-decoration:none"><span style="text-decoration:underline">All-Stop Mode</span></a><span>), </span><span style="font-size:10pt">GDB</span><span> may either stop all threads, or only the thread that directly triggered the stop. If all threads are stopped, the </span><span style="font-style:italic">stopped</span><span> field will have the value of </span><span style="font-family:'Consolas'; font-size:10pt">"all"</span><span>. Otherwise, the value of the </span><span style="font-style:italic">stopped</span><span> 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 </span><span style="font-style:italic">core</span><span> field reports the processor core on which the stop event has happened. This field may be absent if such information is not available. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">=thread-group-added,id="</span><span style="font-family:'Consolas'; font-style:italic">id</span><span style="font-family:'Consolas'">"</span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">=thread-group-removed,id="</span><span style="font-family:'Consolas'; font-style:italic">id</span><span style="font-family:'Consolas'">"</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>A thread group was either added or removed. The </span><span style="font-style:italic">id</span><span> field contains the </span><span style="font-size:10pt">GDB</span><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. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">=thread-group-started,id="</span><span style="font-family:'Consolas'; font-style:italic">id</span><span style="font-family:'Consolas'">",pid="</span><span style="font-family:'Consolas'; font-style:italic">pid</span><span style="font-family:'Consolas'">"</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>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 </span><span style="font-style:italic">id</span><span> field contains the </span><span style="font-size:10pt">GDB</span><span> identifier of the thread group. The </span><span style="font-style:italic">pid</span><span> field contains process identifier, specific to the operating system. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">=thread-group-exited,id="</span><span style="font-family:'Consolas'; font-style:italic">id</span><span style="font-family:'Consolas'">"[,exit-code="</span><span style="font-family:'Consolas'; font-style:italic">code</span><span style="font-family:'Consolas'">"]</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>A thread group is no longer associated with a running program, either because the program has exited, or because it was detached from. The </span><span style="font-style:italic">id</span><span> field contains the </span><span style="font-size:10pt">GDB</span><span> identifier of the thread group. The </span><span style="font-style:italic">code</span><span> field is the exit code of the inferior; it exists only when the inferior exited with some code. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">=thread-created,id="</span><span style="font-family:'Consolas'; font-style:italic">id</span><span style="font-family:'Consolas'">",group-id="</span><span style="font-family:'Consolas'; font-style:italic">gid</span><span style="font-family:'Consolas'">"</span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">=thread-exited,id="</span><span style="font-family:'Consolas'; font-style:italic">id</span><span style="font-family:'Consolas'">",group-id="</span><span style="font-family:'Consolas'; font-style:italic">gid</span><span style="font-family:'Consolas'">"</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>A thread either was created, or has exited. The </span><span style="font-style:italic">id</span><span> field contains the global </span><span style="font-size:10pt">GDB</span><span> identifier of the thread. The </span><span style="font-style:italic">gid</span><span> field identifies the thread group this thread belongs to. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">=thread-selected,id="</span><span style="font-family:'Consolas'; font-style:italic">id</span><span style="font-family:'Consolas'">"[,frame="</span><span style="font-family:'Consolas'; font-style:italic">frame</span><span style="font-family:'Consolas'">"]</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Informs that the selected thread or frame were changed. This notification is not emitted as result of the </span><span style="font-family:'Consolas'; font-size:10pt">-thread-select</span><span> or </span><span style="font-family:'Consolas'; font-size:10pt">-stack-select-frame</span><span> commands, but is emitted whenever an MI command that is not documented to change the selected thread and frame actually changes them. In particular, invoking, directly or indirectly (via user-defined command), the CLI </span><span style="font-family:'Consolas'; font-size:10pt">thread</span><span> or </span><span style="font-family:'Consolas'; font-size:10pt">frame</span><span> commands, will generate this notification. Changing the thread or frame from another user interface (see </span><a href="Interpreters.html#Interpreters" style="text-decoration:none"><span style="text-decoration:underline">Interpreters</span></a><span>) will also generate this notification. </span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The </span><span style="font-style:italic">frame</span><span> field is only present if the newly selected thread is stopped. See </span><a href="GDB_002fMI-Frame-Information.html#GDB_002fMI-Frame-Information" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Frame Information</span></a><span> for the format of its value. </span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>We suggest that in response to this notification, front ends highlight the selected thread and cause subsequent commands to apply to that thread. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">=library-loaded,...</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Reports that a new library file was loaded by the program. This notification has 5 fields—</span><span style="font-style:italic">id</span><span>, </span><span style="font-style:italic">target-name</span><span>, </span><span style="font-style:italic">host-name</span><span>, </span><span style="font-style:italic">symbols-loaded</span><span> and </span><span style="font-style:italic">ranges</span><span>. The </span><span style="font-style:italic">id</span><span> field is an opaque identifier of the library. For remote debugging case, </span><span style="font-style:italic">target-name</span><span> and </span><span style="font-style:italic">host-name</span><span> 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 </span><span style="font-style:italic">symbols-loaded</span><span> field is emitted only for backward compatibility and should not be relied on to convey any useful information. The </span><span style="font-style:italic">thread-group</span><span> 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. The </span><span style="font-style:italic">ranges</span><span> field specifies the ranges of addresses belonging to this library. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">=library-unloaded,...</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Reports that a library was unloaded by the program. This notification has 3 fields—</span><span style="font-style:italic">id</span><span>, </span><span style="font-style:italic">target-name</span><span> and </span><span style="font-style:italic">host-name</span><span> with the same meaning as for the </span><span style="font-family:'Consolas'; font-size:10pt">=library-loaded</span><span> notification. The </span><span style="font-style:italic">thread-group</span><span> 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. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">=traceframe-changed,num=</span><span style="font-family:'Consolas'; font-style:italic">tfnum</span><span style="font-family:'Consolas'">,tracepoint=</span><span style="font-family:'Consolas'; font-style:italic">tpnum</span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">=traceframe-changed,end</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Reports that the trace frame was changed and its new number is </span><span style="font-style:italic">tfnum</span><span>. The number of the tracepoint associated with this trace frame is </span><span style="font-style:italic">tpnum</span><span>. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">=tsv-created,name=</span><span style="font-family:'Consolas'; font-style:italic">name</span><span style="font-family:'Consolas'">,initial=</span><span style="font-family:'Consolas'; font-style:italic">initial</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Reports that the new trace state variable </span><span style="font-style:italic">name</span><span> is created with initial value </span><span style="font-style:italic">initial</span><span>. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">=tsv-deleted,name=</span><span style="font-family:'Consolas'; font-style:italic">name</span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">=tsv-deleted</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Reports that the trace state variable </span><span style="font-style:italic">name</span><span> is deleted or all trace state variables are deleted. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">=tsv-modified,name=</span><span style="font-family:'Consolas'; font-style:italic">name</span><span style="font-family:'Consolas'">,initial=</span><span style="font-family:'Consolas'; font-style:italic">initial</span><span style="font-family:'Consolas'">[,current=</span><span style="font-family:'Consolas'; font-style:italic">current</span><span style="font-family:'Consolas'">]</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Reports that the trace state variable </span><span style="font-style:italic">name</span><span> is modified with the initial value </span><span style="font-style:italic">initial</span><span>. The current value </span><span style="font-style:italic">current</span><span> of trace state variable is optional and is reported if the current value of trace state variable is known. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">=breakpoint-created,bkpt={...}</span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">=breakpoint-modified,bkpt={...}</span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">=breakpoint-deleted,id=</span><span style="font-family:'Consolas'; font-style:italic">number</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Reports that a breakpoint was created, modified, or deleted, respectively. Only user-visible breakpoints are reported to the MI user. </span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The </span><span style="font-style:italic">bkpt</span><span> argument is of the same form as returned by the various breakpoint commands; See </span><a href="GDB_002fMI-Breakpoint-Commands.html#GDB_002fMI-Breakpoint-Commands" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Breakpoint Commands</span></a><span>. The </span><span style="font-style:italic">number</span><span> is the ordinal number of the breakpoint. </span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>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. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">=record-started,thread-group="</span><span style="font-family:'Consolas'; font-style:italic">id</span><span style="font-family:'Consolas'">",method="</span><span style="font-family:'Consolas'; font-style:italic">method</span><span style="font-family:'Consolas'">"[,format="</span><span style="font-family:'Consolas'; font-style:italic">format</span><span style="font-family:'Consolas'">"]</span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">=record-stopped,thread-group="</span><span style="font-family:'Consolas'; font-style:italic">id</span><span style="font-family:'Consolas'">"</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Execution log recording was either started or stopped on an inferior. The </span><span style="font-style:italic">id</span><span> is the </span><span style="font-size:10pt">GDB</span><span> identifier of the thread group corresponding to the affected inferior. </span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The </span><span style="font-style:italic">method</span><span> field indicates the method used to record execution. If the method in use supports multiple recording formats, </span><span style="font-style:italic">format</span><span> will be present and contain the currently used format. See </span><a href="Process-Record-and-Replay.html#Process-Record-and-Replay" style="text-decoration:none"><span style="text-decoration:underline">Process Record and Replay</span></a><span>, for existing method and format values. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">=cmd-param-changed,param=</span><span style="font-family:'Consolas'; font-style:italic">param</span><span style="font-family:'Consolas'">,value=</span><span style="font-family:'Consolas'; font-style:italic">value</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Reports that a parameter of the command </span><span style="font-family:'Consolas'; font-size:10pt">set </span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">param</span><span> is changed to </span><span style="font-style:italic">value</span><span>. In the multi-word </span><span style="font-family:'Consolas'; font-size:10pt">set</span><span> command, the </span><span style="font-style:italic">param</span><span> is the whole parameter list to </span><span style="font-family:'Consolas'; font-size:10pt">set</span><span> command. For example, In command </span><span style="font-family:'Consolas'; font-size:10pt">set check type on</span><span>, </span><span style="font-style:italic">param</span><span> is </span><span style="font-family:'Consolas'; font-size:10pt">check type</span><span> and </span><span style="font-style:italic">value</span><span> is </span><span style="font-family:'Consolas'; font-size:10pt">on</span><span>. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">=memory-changed,thread-group=</span><span style="font-family:'Consolas'; font-style:italic">id</span><span style="font-family:'Consolas'">,addr=</span><span style="font-family:'Consolas'; font-style:italic">addr</span><span style="font-family:'Consolas'">,len=</span><span style="font-family:'Consolas'; font-style:italic">len</span><span style="font-family:'Consolas'">[,type="code"]</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Reports that bytes from </span><span style="font-style:italic">addr</span><span> to </span><span style="font-style:italic">data</span><span> + </span><span style="font-style:italic">len</span><span> were written in an inferior. The </span><span style="font-style:italic">id</span><span> is the identifier of the thread group corresponding to the affected inferior. The optional </span><span style="font-family:'Consolas'; font-size:10pt">type="code"</span><span> part is reported if the memory written to holds executable code. </span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Next: </span><a href="GDB_002fMI-Breakpoint-Information.html#GDB_002fMI-Breakpoint-Information" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Breakpoint Information</span></a><span>, Previous: </span><a href="GDB_002fMI-Stream-Records.html#GDB_002fMI-Stream-Records" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Stream Records</span></a><span>, Up: </span><a href="GDB_002fMI-Output-Records.html#GDB_002fMI-Output-Records" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Output Records</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p></div><br style="page-break-before:always; clear:both; mso-break-type:section-break" /><div><p class="p0" style="margin-bottom:12pt"><a name="GDB_002fMI-Breakpoint-Commands"></a><span>Next: </span><a href="GDB_002fMI-Catchpoint-Commands.html#GDB_002fMI-Catchpoint-Commands" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Catchpoint Commands</span></a><span>, Previous: </span><a href="GDB_002fMI-Command-Description-Format.html#GDB_002fMI-Command-Description-Format" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Command Description Format</span></a><span>, Up: </span><a href="GDB_002fMI.html#GDB_002fMI" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><h3 style="margin-top:14.05pt; margin-bottom:14.05pt; page-break-inside:auto; page-break-after:auto"><a name="GDB_002fMI-Breakpoint-Commands-1"></a><span style="font-family:'Times New Roman'; color:#000000">27.8 </span><span style="font-family:'Times New Roman'; font-size:11.5pt; color:#000000">GDB/MI</span><span style="font-family:'Times New Roman'; color:#000000"> Breakpoint Commands</span><a name="index-breakpoint-commands-for-GDB_002fMI"></a><a name="index-GDB_002fMI_002c-breakpoint-command"></a></h3><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>This section documents </span><span style="font-size:10pt">GDB/MI</span><span> commands for manipulating breakpoints. </span><a name="The-_002dbreak_002dafter-Command"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-break-after</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dbreak_002dafter"></a><a name="Synopsis-1"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-break-after </span><span style="font-family:'Consolas'; font-style:italic">number</span><span style="font-family:'Consolas'"> </span><span style="font-family:'Consolas'; font-style:italic">count</span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The breakpoint number </span><span style="font-style:italic">number</span><span> is not in effect until it has been hit </span><span style="font-style:italic">count</span><span> times. To see how this is reflected in the output of the ‘</span><span style="font-family:'Consolas'; font-size:10pt">-break-list</span><span>’ command, see the description of the ‘</span><span style="font-family:'Consolas'; font-size:10pt">-break-list</span><span>’ command below. </span><a name="GDB-Command-1"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">ignore</span><span>’. </span><a name="Example-1"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-break-insert main</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,bkpt={number="1",type="breakpoint",disp="keep",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">enabled="y",addr="0x000100d0",func="main",file="hello.c",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">fullname="/home/foo/hello.c",line="5",thread-groups=["i1"],</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">times="0"}</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-break-after 1 3</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">~</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-break-list</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,BreakpointTable={nr_rows="1",nr_cols="6",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">hdr=[{width="3",alignment="-1",col_name="number",colhdr="Num"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="14",alignment="-1",col_name="type",colhdr="Type"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="4",alignment="-1",col_name="disp",colhdr="Disp"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="10",alignment="-1",col_name="addr",colhdr="Address"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="40",alignment="2",col_name="what",colhdr="What"}],</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">body=[bkpt={number="1",type="breakpoint",disp="keep",enabled="y",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">addr="0x000100d0",func="main",file="hello.c",fullname="/home/foo/hello.c",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">line="5",thread-groups=["i1"],times="0",ignore="3"}]}</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dbreak_002dcommands-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-break-commands</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dbreak_002dcommands"></a><a name="Synopsis-2"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-break-commands </span><span style="font-family:'Consolas'; font-style:italic">number</span><span style="font-family:'Consolas'"> [ </span><span style="font-family:'Consolas'; font-style:italic">command1</span><span style="font-family:'Consolas'"> ... </span><span style="font-family:'Consolas'; font-style:italic">commandN</span><span style="font-family:'Consolas'"> ]</span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Specifies the CLI commands that should be executed when breakpoint </span><span style="font-style:italic">number</span><span> is hit. The parameters </span><span style="font-style:italic">command1</span><span> to </span><span style="font-style:italic">commandN</span><span> are the commands. If no command is specified, any previously-set commands are cleared. See </span><a href="Break-Commands.html#Break-Commands" style="text-decoration:none"><span style="text-decoration:underline">Break Commands</span></a><span>. Typical use of this functionality is tracing a program, that is, printing of values of some variables whenever breakpoint is hit and then continuing. </span><a name="GDB-Command-2"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">commands</span><span>’. </span><a name="Example-2"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-break-insert main</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,bkpt={number="1",type="breakpoint",disp="keep",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">enabled="y",addr="0x000100d0",func="main",file="hello.c",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">fullname="/home/foo/hello.c",line="5",thread-groups=["i1"],</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">times="0"}</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-break-commands 1 "print v" "continue"</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dbreak_002dcondition-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-break-condition</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dbreak_002dcondition"></a><a name="Synopsis-3"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-break-condition [ --force ] </span><span style="font-family:'Consolas'; font-style:italic">number</span><span style="font-family:'Consolas'"> [ </span><span style="font-family:'Consolas'; font-style:italic">expr</span><span style="font-family:'Consolas'"> ]</span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Breakpoint </span><span style="font-style:italic">number</span><span> will stop the program only if the condition in </span><span style="font-style:italic">expr</span><span> is true. The condition becomes part of the ‘</span><span style="font-family:'Consolas'; font-size:10pt">-break-list</span><span>’ output (see the description of the ‘</span><span style="font-family:'Consolas'; font-size:10pt">-break-list</span><span>’ command below). If the ‘</span><span style="font-family:'Consolas'; font-size:10pt">--force</span><span>’ flag is passed, the condition is forcibly defined even when it is invalid for all locations of breakpoint </span><span style="font-style:italic">number</span><span>. If the </span><span style="font-style:italic">expr</span><span> argument is omitted, breakpoint </span><span style="font-style:italic">number</span><span> becomes unconditional. </span><a name="GDB-Command-3"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">condition</span><span>’. </span><a name="Example-3"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-break-condition 1 1</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-break-list</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,BreakpointTable={nr_rows="1",nr_cols="6",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">hdr=[{width="3",alignment="-1",col_name="number",colhdr="Num"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="14",alignment="-1",col_name="type",colhdr="Type"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="4",alignment="-1",col_name="disp",colhdr="Disp"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="10",alignment="-1",col_name="addr",colhdr="Address"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="40",alignment="2",col_name="what",colhdr="What"}],</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">body=[bkpt={number="1",type="breakpoint",disp="keep",enabled="y",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">addr="0x000100d0",func="main",file="hello.c",fullname="/home/foo/hello.c",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">line="5",cond="1",thread-groups=["i1"],times="0",ignore="3"}]}</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dbreak_002ddelete-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-break-delete</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dbreak_002ddelete"></a><a name="Synopsis-4"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-break-delete ( </span><span style="font-family:'Consolas'; font-style:italic">breakpoint</span><span style="font-family:'Consolas'"> )+</span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Delete the breakpoint(s) whose number(s) are specified in the argument list. This is obviously reflected in the breakpoint list. </span><a name="GDB-Command-4"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">delete</span><span>’. </span><a name="Example-4"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-break-delete 1</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-break-list</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,BreakpointTable={nr_rows="0",nr_cols="6",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">hdr=[{width="3",alignment="-1",col_name="number",colhdr="Num"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="14",alignment="-1",col_name="type",colhdr="Type"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="4",alignment="-1",col_name="disp",colhdr="Disp"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="10",alignment="-1",col_name="addr",colhdr="Address"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="40",alignment="2",col_name="what",colhdr="What"}],</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">body=[]}</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dbreak_002ddisable-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-break-disable</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dbreak_002ddisable"></a><a name="Synopsis-5"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-break-disable ( </span><span style="font-family:'Consolas'; font-style:italic">breakpoint</span><span style="font-family:'Consolas'"> )+</span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Disable the named </span><span style="font-style:italic">breakpoint</span><span>(s). The field ‘</span><span style="font-family:'Consolas'; font-size:10pt">enabled</span><span>’ in the break list is now set to ‘</span><span style="font-family:'Consolas'; font-size:10pt">n</span><span>’ for the named </span><span style="font-style:italic">breakpoint</span><span>(s). </span><a name="GDB-Command-5"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">disable</span><span>’. </span><a name="Example-5"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-break-disable 2</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-break-list</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,BreakpointTable={nr_rows="1",nr_cols="6",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">hdr=[{width="3",alignment="-1",col_name="number",colhdr="Num"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="14",alignment="-1",col_name="type",colhdr="Type"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="4",alignment="-1",col_name="disp",colhdr="Disp"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="10",alignment="-1",col_name="addr",colhdr="Address"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="40",alignment="2",col_name="what",colhdr="What"}],</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">body=[bkpt={number="2",type="breakpoint",disp="keep",enabled="n",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">addr="0x000100d0",func="main",file="hello.c",fullname="/home/foo/hello.c",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">line="5",thread-groups=["i1"],times="0"}]}</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dbreak_002denable-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-break-enable</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dbreak_002denable"></a><a name="Synopsis-6"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-break-enable ( </span><span style="font-family:'Consolas'; font-style:italic">breakpoint</span><span style="font-family:'Consolas'"> )+</span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Enable (previously disabled) </span><span style="font-style:italic">breakpoint</span><span>(s). </span><a name="GDB-Command-6"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">enable</span><span>’. </span><a name="Example-6"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-break-enable 2</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-break-list</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,BreakpointTable={nr_rows="1",nr_cols="6",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">hdr=[{width="3",alignment="-1",col_name="number",colhdr="Num"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="14",alignment="-1",col_name="type",colhdr="Type"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="4",alignment="-1",col_name="disp",colhdr="Disp"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="10",alignment="-1",col_name="addr",colhdr="Address"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="40",alignment="2",col_name="what",colhdr="What"}],</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">body=[bkpt={number="2",type="breakpoint",disp="keep",enabled="y",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">addr="0x000100d0",func="main",file="hello.c",fullname="/home/foo/hello.c",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">line="5",thread-groups=["i1"],times="0"}]}</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dbreak_002dinfo-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-break-info</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dbreak_002dinfo"></a><a name="Synopsis-7"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-break-info </span><span style="font-family:'Consolas'; font-style:italic">breakpoint</span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Get information about a single breakpoint. </span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The result is a table of breakpoints. See </span><a href="GDB_002fMI-Breakpoint-Information.html#GDB_002fMI-Breakpoint-Information" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Breakpoint Information</span></a><span>, for details on the format of each breakpoint in the table. </span><a name="GDB-Command-7"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">info break </span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">breakpoint</span><span>’. </span><a name="Example-7"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>N.A. </span><a name="The-_002dbreak_002dinsert-Command"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-break-insert</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dbreak_002dinsert"></a><a name="g_t_002dbreak_002dinsert"></a><a name="Synopsis-8"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-break-insert [ -t ] [ -h ] [ -f ] [ -d ] [ -a ] [ --qualified ]</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">    </span><span style="font-family:'Consolas'">[ -c </span><span style="font-family:'Consolas'; font-style:italic">condition</span><span style="font-family:'Consolas'"> ] [ --force-condition ] [ -i </span><span style="font-family:'Consolas'; font-style:italic">ignore-count</span><span style="font-family:'Consolas'"> ]</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">    </span><span style="font-family:'Consolas'">[ -p </span><span style="font-family:'Consolas'; font-style:italic">thread-id</span><span style="font-family:'Consolas'"> ] [ </span><span style="font-family:'Consolas'; font-style:italic">location</span><span style="font-family:'Consolas'"> ]</span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>If specified, </span><span style="font-style:italic">location</span><span>, can be one of: </span></p><p class="p0"><span style="font-style:italic">linespec location</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>A linespec location. See </span><a href="Linespec-Locations.html#Linespec-Locations" style="text-decoration:none"><span style="text-decoration:underline">Linespec Locations</span></a><span>. </span></p><p class="p0"><span style="font-style:italic">explicit location</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>An explicit location. </span><span style="font-size:10pt">GDB/MI</span><span> explicit locations are analogous to the CLI’s explicit locations using the option names listed below. See </span><a href="Explicit-Locations.html#Explicit-Locations" style="text-decoration:none"><span style="text-decoration:underline">Explicit Locations</span></a><span>. </span></p><p class="p0" style="margin-left:30pt"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">--source </span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">filename</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:60pt; margin-bottom:12pt"><span>The source file name of the location. This option requires the use of either ‘</span><span style="font-family:'Consolas'; font-size:10pt">--function</span><span>’ or ‘</span><span style="font-family:'Consolas'; font-size:10pt">--line</span><span>’. </span></p><p class="p0" style="margin-left:30pt"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">--function </span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">function</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:60pt; margin-bottom:12pt"><span>The name of a function or method. </span></p><p class="p0" style="margin-left:30pt"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">--label </span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">label</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:60pt; margin-bottom:12pt"><span>The name of a label. </span></p><p class="p0" style="margin-left:30pt"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">--line </span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">lineoffset</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:60pt; margin-bottom:12pt"><span>An absolute or relative line offset from the start of the location. </span></p><p class="p0"><span style="font-style:italic">address location</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>An address location, *</span><span style="font-style:italic">address</span><span>. See </span><a href="Address-Locations.html#Address-Locations" style="text-decoration:none"><span style="text-decoration:underline">Address Locations</span></a><span>. </span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The possible optional parameters of this command are: </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">-t</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Insert a temporary breakpoint. </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">-h</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Insert a hardware breakpoint. </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">-f</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>If </span><span style="font-style:italic">location</span><span> cannot be parsed (for example if it refers to unknown files or functions), create a pending breakpoint. Without this flag, </span><span style="font-size:10pt">GDB</span><span> will report an error, and won’t create a breakpoint, if </span><span style="font-style:italic">location</span><span> cannot be parsed. </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">-d</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Create a disabled breakpoint. </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">-a</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Create a tracepoint. See </span><a href="Tracepoints.html#Tracepoints" style="text-decoration:none"><span style="text-decoration:underline">Tracepoints</span></a><span>. When this parameter is used together with ‘</span><span style="font-family:'Consolas'; font-size:10pt">-h</span><span>’, a fast tracepoint is created. </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">-c </span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">condition</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Make the breakpoint conditional on </span><span style="font-style:italic">condition</span><span>. </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">--force-condition</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Forcibly define the breakpoint even if the condition is invalid at all of the breakpoint locations. </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">-i </span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">ignore-count</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Initialize the </span><span style="font-style:italic">ignore-count</span><span>. </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">-p </span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">thread-id</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Restrict the breakpoint to the thread with the specified global </span><span style="font-style:italic">thread-id</span><span>. </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">--qualified</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>This option makes </span><span style="font-size:10pt">GDB</span><span> interpret a function name specified as a complete fully-qualified name. </span><a name="Result-1"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Result</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>See </span><a href="GDB_002fMI-Breakpoint-Information.html#GDB_002fMI-Breakpoint-Information" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Breakpoint Information</span></a><span>, for details on the format of the resulting breakpoint. </span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Note: this format is open to change. </span><a name="GDB-Command-8"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> commands are ‘</span><span style="font-family:'Consolas'; font-size:10pt">break</span><span>’, ‘</span><span style="font-family:'Consolas'; font-size:10pt">tbreak</span><span>’, ‘</span><span style="font-family:'Consolas'; font-size:10pt">hbreak</span><span>’, and ‘</span><span style="font-family:'Consolas'; font-size:10pt">thbreak</span><span>’. </span><a name="Example-8"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-break-insert main</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,bkpt={number="1",addr="0x0001072c",file="recursive2.c",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">fullname="/home/foo/recursive2.c,line="4",thread-groups=["i1"],</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">times="0"}</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-break-insert -t foo</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,bkpt={number="2",addr="0x00010774",file="recursive2.c",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">fullname="/home/foo/recursive2.c,line="11",thread-groups=["i1"],</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">times="0"}</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-break-list</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,BreakpointTable={nr_rows="2",nr_cols="6",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">hdr=[{width="3",alignment="-1",col_name="number",colhdr="Num"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="14",alignment="-1",col_name="type",colhdr="Type"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="4",alignment="-1",col_name="disp",colhdr="Disp"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="10",alignment="-1",col_name="addr",colhdr="Address"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="40",alignment="2",col_name="what",colhdr="What"}],</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">body=[bkpt={number="1",type="breakpoint",disp="keep",enabled="y",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">addr="0x0001072c", func="main",file="recursive2.c",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">fullname="/home/foo/recursive2.c,"line="4",thread-groups=["i1"],</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">times="0"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">bkpt={number="2",type="breakpoint",disp="del",enabled="y",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">addr="0x00010774",func="foo",file="recursive2.c",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">fullname="/home/foo/recursive2.c",line="11",thread-groups=["i1"],</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">times="0"}]}</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002ddprintf_002dinsert-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-dprintf-insert</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002ddprintf_002dinsert"></a><a name="Synopsis-9"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-dprintf-insert [ -t ] [ -f ] [ -d ] [ --qualified ]</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">    </span><span style="font-family:'Consolas'">[ -c </span><span style="font-family:'Consolas'; font-style:italic">condition</span><span style="font-family:'Consolas'"> ] [--force-condition] [ -i </span><span style="font-family:'Consolas'; font-style:italic">ignore-count</span><span style="font-family:'Consolas'"> ]</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">    </span><span style="font-family:'Consolas'">[ -p </span><span style="font-family:'Consolas'; font-style:italic">thread-id</span><span style="font-family:'Consolas'"> ] [ </span><span style="font-family:'Consolas'; font-style:italic">location</span><span style="font-family:'Consolas'"> ] [ </span><span style="font-family:'Consolas'; font-style:italic">format</span><span style="font-family:'Consolas'"> ]</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">    </span><span style="font-family:'Consolas'">[ </span><span style="font-family:'Consolas'; font-style:italic">argument</span><span style="font-family:'Consolas'"> ]</span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>If supplied, </span><span style="font-style:italic">location</span><span> and </span><span style="font-family:'Consolas'; font-size:10pt">--qualified</span><span> may be specified the same way as for the </span><span style="font-family:'Consolas'; font-size:10pt">-break-insert</span><span> command. See </span><a href="#g_t_002dbreak_002dinsert" style="text-decoration:none"><span style="text-decoration:underline">-break-insert</span></a><span>. </span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The possible optional parameters of this command are: </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">-t</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Insert a temporary breakpoint. </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">-f</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>If </span><span style="font-style:italic">location</span><span> cannot be parsed (for example, if it refers to unknown files or functions), create a pending breakpoint. Without this flag, </span><span style="font-size:10pt">GDB</span><span> will report an error, and won’t create a breakpoint, if </span><span style="font-style:italic">location</span><span> cannot be parsed. </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">-d</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Create a disabled breakpoint. </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">-c </span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">condition</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Make the breakpoint conditional on </span><span style="font-style:italic">condition</span><span>. </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">--force-condition</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Forcibly define the breakpoint even if the condition is invalid at all of the breakpoint locations. </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">-i </span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">ignore-count</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Set the ignore count of the breakpoint (see </span><a href="Conditions.html#Conditions" style="text-decoration:none"><span style="text-decoration:underline">ignore count</span></a><span>) to </span><span style="font-style:italic">ignore-count</span><span>. </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">-p </span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">thread-id</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Restrict the breakpoint to the thread with the specified global </span><span style="font-style:italic">thread-id</span><span>. </span><a name="Result-2"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Result</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>See </span><a href="GDB_002fMI-Breakpoint-Information.html#GDB_002fMI-Breakpoint-Information" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Breakpoint Information</span></a><span>, for details on the format of the resulting breakpoint. </span><a name="GDB-Command-9"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">dprintf</span><span>’. </span><a name="Example-9"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">4-dprintf-insert foo "At foo entry\n"</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">4^done,bkpt={number="1",type="dprintf",disp="keep",enabled="y",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">addr="0x000000000040061b",func="foo",file="mi-dprintf.c",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">fullname="mi-dprintf.c",line="25",thread-groups=["i1"],</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">times="0",script={"printf \"At foo entry\\n\"","continue"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">original-location="foo"}</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">5-dprintf-insert 26 "arg=%d, g=%d\n" arg g</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">5^done,bkpt={number="2",type="dprintf",disp="keep",enabled="y",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">addr="0x000000000040062a",func="foo",file="mi-dprintf.c",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">fullname="mi-dprintf.c",line="26",thread-groups=["i1"],</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">times="0",script={"printf \"arg=%d, g=%d\\n\", arg, g","continue"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">original-location="mi-dprintf.c:26"}</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dbreak_002dlist-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-break-list</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dbreak_002dlist"></a><a name="Synopsis-10"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-break-list</span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Displays the list of inserted breakpoints, showing the following fields: </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">Number</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>number of the breakpoint </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">Type</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>type of the breakpoint: ‘</span><span style="font-family:'Consolas'; font-size:10pt">breakpoint</span><span>’ or ‘</span><span style="font-family:'Consolas'; font-size:10pt">watchpoint</span><span>’ </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">Disposition</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>should the breakpoint be deleted or disabled when it is hit: ‘</span><span style="font-family:'Consolas'; font-size:10pt">keep</span><span>’ or ‘</span><span style="font-family:'Consolas'; font-size:10pt">nokeep</span><span>’ </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">Enabled</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>is the breakpoint enabled or no: ‘</span><span style="font-family:'Consolas'; font-size:10pt">y</span><span>’ or ‘</span><span style="font-family:'Consolas'; font-size:10pt">n</span><span>’ </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">Address</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>memory location at which the breakpoint is set </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">What</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>logical location of the breakpoint, expressed by function name, file name, line number </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">Thread-groups</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>list of thread groups to which this breakpoint applies </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">Times</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>number of times the breakpoint has been hit </span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>If there are no breakpoints or watchpoints, the </span><span style="font-family:'Consolas'; font-size:10pt">BreakpointTable</span><span> </span><span style="font-family:'Consolas'; font-size:10pt">body</span><span> field is an empty list. </span><a name="GDB-Command-10"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">info break</span><span>’. </span><a name="Example-10"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-break-list</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,BreakpointTable={nr_rows="2",nr_cols="6",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">hdr=[{width="3",alignment="-1",col_name="number",colhdr="Num"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="14",alignment="-1",col_name="type",colhdr="Type"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="4",alignment="-1",col_name="disp",colhdr="Disp"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="10",alignment="-1",col_name="addr",colhdr="Address"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="40",alignment="2",col_name="what",colhdr="What"}],</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">body=[bkpt={number="1",type="breakpoint",disp="keep",enabled="y",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">addr="0x000100d0",func="main",file="hello.c",line="5",thread-groups=["i1"],</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">times="0"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">bkpt={number="2",type="breakpoint",disp="keep",enabled="y",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">addr="0x00010114",func="foo",file="hello.c",fullname="/home/foo/hello.c",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">line="13",thread-groups=["i1"],times="0"}]}</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Here’s an example of the result when there are no breakpoints: </span></p><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-break-list</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,BreakpointTable={nr_rows="0",nr_cols="6",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">hdr=[{width="3",alignment="-1",col_name="number",colhdr="Num"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="14",alignment="-1",col_name="type",colhdr="Type"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="4",alignment="-1",col_name="disp",colhdr="Disp"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="10",alignment="-1",col_name="addr",colhdr="Address"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="40",alignment="2",col_name="what",colhdr="What"}],</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">body=[]}</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dbreak_002dpasscount-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-break-passcount</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dbreak_002dpasscount"></a><a name="Synopsis-11"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-break-passcount </span><span style="font-family:'Consolas'; font-style:italic">tracepoint-number</span><span style="font-family:'Consolas'"> </span><span style="font-family:'Consolas'; font-style:italic">passcount</span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Set the passcount for tracepoint </span><span style="font-style:italic">tracepoint-number</span><span> to </span><span style="font-style:italic">passcount</span><span>. If the breakpoint referred to by </span><span style="font-style:italic">tracepoint-number</span><span> is not a tracepoint, error is emitted. This corresponds to CLI command ‘</span><span style="font-family:'Consolas'; font-size:10pt">passcount</span><span>’. </span><a name="The-_002dbreak_002dwatch-Command"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-break-watch</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dbreak_002dwatch"></a><a name="Synopsis-12"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-break-watch [ -a | -r ]</span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Create a watchpoint. With the ‘</span><span style="font-family:'Consolas'; font-size:10pt">-a</span><span>’ option it will create an </span><span style="font-style:italic">access</span><span> watchpoint, i.e., a watchpoint that triggers either on a read from or on a write to the memory location. With the ‘</span><span style="font-family:'Consolas'; font-size:10pt">-r</span><span>’ option, the watchpoint created is a </span><span style="font-style:italic">read</span><span> watchpoint, i.e., it will trigger only when the memory location is accessed for reading. Without either of the options, the watchpoint created is a regular watchpoint, i.e., it will trigger when the memory location is accessed for writing. See </span><a href="Set-Watchpoints.html#Set-Watchpoints" style="text-decoration:none"><span style="text-decoration:underline">Setting Watchpoints</span></a><span>. </span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Note that ‘</span><span style="font-family:'Consolas'; font-size:10pt">-break-list</span><span>’ will report a single list of watchpoints and breakpoints inserted. </span><a name="GDB-Command-11"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> commands are ‘</span><span style="font-family:'Consolas'; font-size:10pt">watch</span><span>’, ‘</span><span style="font-family:'Consolas'; font-size:10pt">awatch</span><span>’, and ‘</span><span style="font-family:'Consolas'; font-size:10pt">rwatch</span><span>’. </span><a name="Example-11"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Setting a watchpoint on a variable in the </span><span style="font-family:'Consolas'; font-size:10pt">main</span><span> function: </span></p><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-break-watch x</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,wpt={number="2",exp="x"}</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-exec-continue</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^running</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">*stopped,reason="watchpoint-trigger",wpt={number="2",exp="x"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">value={old="-268439212",new="55"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">frame={func="main",args=[],file="recursive2.c",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">fullname="/home/foo/bar/recursive2.c",line="5",arch="i386:x86_64"}</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Setting a watchpoint on a variable local to a function. </span><span style="font-size:10pt">GDB</span><span> will stop the program execution twice: first for the variable changing value, then for the watchpoint going out of scope. </span></p><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-break-watch C</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,wpt={number="5",exp="C"}</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-exec-continue</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^running</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">*stopped,reason="watchpoint-trigger",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">wpt={number="5",exp="C"},value={old="-276895068",new="3"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">frame={func="callee4",args=[],</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">file="../../../devo/gdb/testsuite/gdb.mi/basics.c",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="13",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">arch="i386:x86_64"}</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-exec-continue</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^running</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">*stopped,reason="watchpoint-scope",wpnum="5",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">frame={func="callee3",args=[{name="strarg",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">value="0x11940 \"A string argument.\""}],</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">file="../../../devo/gdb/testsuite/gdb.mi/basics.c",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="18",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">arch="i386:x86_64"}</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Listing breakpoints and watchpoints, at different points in the program execution. Note that once the watchpoint goes out of scope, it is deleted. </span></p><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-break-watch C</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,wpt={number="2",exp="C"}</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-break-list</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,BreakpointTable={nr_rows="2",nr_cols="6",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">hdr=[{width="3",alignment="-1",col_name="number",colhdr="Num"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="14",alignment="-1",col_name="type",colhdr="Type"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="4",alignment="-1",col_name="disp",colhdr="Disp"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="10",alignment="-1",col_name="addr",colhdr="Address"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="40",alignment="2",col_name="what",colhdr="What"}],</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">body=[bkpt={number="1",type="breakpoint",disp="keep",enabled="y",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">addr="0x00010734",func="callee4",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">file="../../../devo/gdb/testsuite/gdb.mi/basics.c",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">fullname="/home/foo/devo/gdb/testsuite/gdb.mi/basics.c"line="8",thread-groups=["i1"],</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">times="1"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">bkpt={number="2",type="watchpoint",disp="keep",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">enabled="y",addr="",what="C",thread-groups=["i1"],times="0"}]}</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-exec-continue</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^running</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">*stopped,reason="watchpoint-trigger",wpt={number="2",exp="C"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">value={old="-276895068",new="3"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">frame={func="callee4",args=[],</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">file="../../../devo/gdb/testsuite/gdb.mi/basics.c",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="13",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">arch="i386:x86_64"}</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-break-list</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,BreakpointTable={nr_rows="2",nr_cols="6",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">hdr=[{width="3",alignment="-1",col_name="number",colhdr="Num"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="14",alignment="-1",col_name="type",colhdr="Type"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="4",alignment="-1",col_name="disp",colhdr="Disp"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="10",alignment="-1",col_name="addr",colhdr="Address"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="40",alignment="2",col_name="what",colhdr="What"}],</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">body=[bkpt={number="1",type="breakpoint",disp="keep",enabled="y",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">addr="0x00010734",func="callee4",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">file="../../../devo/gdb/testsuite/gdb.mi/basics.c",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">fullname="/home/foo/devo/gdb/testsuite/gdb.mi/basics.c",line="8",thread-groups=["i1"],</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">times="1"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">bkpt={number="2",type="watchpoint",disp="keep",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">enabled="y",addr="",what="C",thread-groups=["i1"],times="-5"}]}</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-exec-continue</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^running</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,reason="watchpoint-scope",wpnum="2",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">frame={func="callee3",args=[{name="strarg",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">value="0x11940 \"A string argument.\""}],</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">file="../../../devo/gdb/testsuite/gdb.mi/basics.c",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="18",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">arch="i386:x86_64"}</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-break-list</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,BreakpointTable={nr_rows="1",nr_cols="6",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">hdr=[{width="3",alignment="-1",col_name="number",colhdr="Num"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="14",alignment="-1",col_name="type",colhdr="Type"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="4",alignment="-1",col_name="disp",colhdr="Disp"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="10",alignment="-1",col_name="addr",colhdr="Address"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{width="40",alignment="2",col_name="what",colhdr="What"}],</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">body=[bkpt={number="1",type="breakpoint",disp="keep",enabled="y",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">addr="0x00010734",func="callee4",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">file="../../../devo/gdb/testsuite/gdb.mi/basics.c",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">fullname="/home/foo/devo/gdb/testsuite/gdb.mi/basics.c",line="8",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">thread-groups=["i1"],times="1"}]}</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Next: </span><a href="GDB_002fMI-Catchpoint-Commands.html#GDB_002fMI-Catchpoint-Commands" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Catchpoint Commands</span></a><span>, Previous: </span><a href="GDB_002fMI-Command-Description-Format.html#GDB_002fMI-Command-Description-Format" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Command Description Format</span></a><span>, Up: </span><a href="GDB_002fMI.html#GDB_002fMI" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p></div><br style="page-break-before:always; clear:both; mso-break-type:section-break" /><div><p class="p0" style="margin-bottom:12pt"><a name="GDB_002fMI-Breakpoint-Information"></a><span>Next: </span><a href="GDB_002fMI-Frame-Information.html#GDB_002fMI-Frame-Information" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Frame Information</span></a><span>, Previous: </span><a href="GDB_002fMI-Async-Records.html#GDB_002fMI-Async-Records" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Async Records</span></a><span>, Up: </span><a href="GDB_002fMI-Output-Records.html#GDB_002fMI-Output-Records" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Output Records</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="GDB_002fMI-Breakpoint-Information-1"></a><span style="font-family:'Times New Roman'; color:#000000">27.5.4 </span><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB/MI</span><span style="font-family:'Times New Roman'; color:#000000"> Breakpoint Information</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>When </span><span style="font-size:10pt">GDB</span><span> reports information about a breakpoint, a tracepoint, a watchpoint, or a catchpoint, it uses a tuple with the following fields: </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">number</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The breakpoint number. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">type</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The type of the breakpoint. For ordinary breakpoints this will be ‘</span><span style="font-family:'Consolas'; font-size:10pt">breakpoint</span><span>’, but many values are possible. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">catch-type</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>If the type of the breakpoint is ‘</span><span style="font-family:'Consolas'; font-size:10pt">catchpoint</span><span>’, then this indicates the exact type of catchpoint. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">disp</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>This is the breakpoint disposition—either ‘</span><span style="font-family:'Consolas'; font-size:10pt">del</span><span>’, meaning that the breakpoint will be deleted at the next stop, or ‘</span><span style="font-family:'Consolas'; font-size:10pt">keep</span><span>’, meaning that the breakpoint will not be deleted. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">enabled</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>This indicates whether the breakpoint is enabled, in which case the value is ‘</span><span style="font-family:'Consolas'; font-size:10pt">y</span><span>’, or disabled, in which case the value is ‘</span><span style="font-family:'Consolas'; font-size:10pt">n</span><span>’. Note that this is not the same as the field </span><span style="font-family:'Consolas'; font-size:10pt">enable</span><span>. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">addr</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The address of the breakpoint. This may be a hexidecimal number, giving the address; or the string ‘</span><span style="font-family:'Consolas'; font-size:10pt"><PENDING></span><span>’, for a pending breakpoint; or the string ‘</span><span style="font-family:'Consolas'; font-size:10pt"><MULTIPLE></span><span>’, for a breakpoint with multiple locations. This field will not be present if no address can be determined. For example, a watchpoint does not have an address. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">addr_flags</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Optional field containing any flags related to the address. These flags are architecture-dependent; see </span><a href="Architectures.html#Architectures" style="text-decoration:none"><span style="text-decoration:underline">Architectures</span></a><span> for their meaning for a particular CPU. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">func</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>If known, the function in which the breakpoint appears. If not known, this field is not present. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">filename</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The name of the source file which contains this function, if known. If not known, this field is not present. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">fullname</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The full file name of the source file which contains this function, if known. If not known, this field is not present. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">line</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The line number at which this breakpoint appears, if known. If not known, this field is not present. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">at</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>If the source file is not known, this field may be provided. If provided, this holds the address of the breakpoint, possibly followed by a symbol name. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">pending</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>If this breakpoint is pending, this field is present and holds the text used to set the breakpoint, as entered by the user. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">evaluated-by</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Where this breakpoint’s condition is evaluated, either ‘</span><span style="font-family:'Consolas'; font-size:10pt">host</span><span>’ or ‘</span><span style="font-family:'Consolas'; font-size:10pt">target</span><span>’. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">thread</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>If this is a thread-specific breakpoint, then this identifies the thread in which the breakpoint can trigger. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">task</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>If this breakpoint is restricted to a particular Ada task, then this field will hold the task identifier. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">cond</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>If the breakpoint is conditional, this is the condition expression. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">ignore</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The ignore count of the breakpoint. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">enable</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The enable count of the breakpoint. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">traceframe-usage</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>FIXME. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">static-tracepoint-marker-string-id</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>For a static tracepoint, the name of the static tracepoint marker. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">mask</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>For a masked watchpoint, this is the mask. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">pass</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>A tracepoint’s pass count. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">original-location</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The location of the breakpoint as originally specified by the user. This field is optional. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">times</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The number of times the breakpoint has been hit. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">installed</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>This field is only given for tracepoints. This is either ‘</span><span style="font-family:'Consolas'; font-size:10pt">y</span><span>’, meaning that the tracepoint is installed, or ‘</span><span style="font-family:'Consolas'; font-size:10pt">n</span><span>’, meaning that it is not. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">what</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Some extra data, the exact contents of which are type-dependent. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">locations</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>This field is present if the breakpoint has multiple locations. It is also exceptionally present if the breakpoint is enabled and has a single, disabled location. </span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The value is a list of locations. The format of a location is described below. </span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>A location in a multi-location breakpoint is represented as a tuple with the following fields: </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">number</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The location number as a dotted pair, like ‘</span><span style="font-family:'Consolas'; font-size:10pt">1.2</span><span>’. The first digit is the number of the parent breakpoint. The second digit is the number of the location within that breakpoint. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">enabled</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>There are three possible values, with the following meanings: </span></p><p class="p0" style="margin-left:30pt; font-size:10pt"><span style="font-family:'Consolas'">y</span></p><p class="p0" style="margin-top:12pt; margin-left:60pt; margin-bottom:12pt"><span>The location is enabled. </span></p><p class="p0" style="margin-left:30pt; font-size:10pt"><span style="font-family:'Consolas'">n</span></p><p class="p0" style="margin-top:12pt; margin-left:60pt; margin-bottom:12pt"><span>The location is disabled by the user. </span></p><p class="p0" style="margin-left:30pt; font-size:10pt"><span style="font-family:'Consolas'">N</span></p><p class="p0" style="margin-top:12pt; margin-left:60pt; margin-bottom:12pt"><span>The location is disabled because the breakpoint condition is invalid at this location. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">addr</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The address of this location as an hexidecimal number. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">addr_flags</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Optional field containing any flags related to the address. These flags are architecture-dependent; see </span><a href="Architectures.html#Architectures" style="text-decoration:none"><span style="text-decoration:underline">Architectures</span></a><span> for their meaning for a particular CPU. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">func</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>If known, the function in which the location appears. If not known, this field is not present. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">file</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The name of the source file which contains this location, if known. If not known, this field is not present. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">fullname</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The full file name of the source file which contains this location, if known. If not known, this field is not present. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">line</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The line number at which this location appears, if known. If not known, this field is not present. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">thread-groups</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The thread groups this location is in. </span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>For example, here is what the output of </span><span style="font-family:'Consolas'; font-size:10pt">-break-insert</span><span> (see </span><a href="GDB_002fMI-Breakpoint-Commands.html#GDB_002fMI-Breakpoint-Commands" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Breakpoint Commands</span></a><span>) might be: </span></p><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">-> -break-insert main</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'"><- ^done,bkpt={number="1",type="breakpoint",disp="keep",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">    </span><span style="font-family:'Consolas'">enabled="y",addr="0x08048564",func="main",file="myprog.c",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">    </span><span style="font-family:'Consolas'">fullname="/home/nickrob/myprog.c",line="68",thread-groups=["i1"],</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">    </span><span style="font-family:'Consolas'">times="0"}</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'"><- (gdb)</span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Next: </span><a href="GDB_002fMI-Frame-Information.html#GDB_002fMI-Frame-Information" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Frame Information</span></a><span>, Previous: </span><a href="GDB_002fMI-Async-Records.html#GDB_002fMI-Async-Records" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Async Records</span></a><span>, Up: </span><a href="GDB_002fMI-Output-Records.html#GDB_002fMI-Output-Records" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Output Records</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p></div><br style="page-break-before:always; clear:both; mso-break-type:section-break" /><div><p class="p0" style="margin-bottom:12pt"><a name="GDB_002fMI-Data-Manipulation"></a><span>Next: </span><a href="GDB_002fMI-Tracepoint-Commands.html#GDB_002fMI-Tracepoint-Commands" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Tracepoint Commands</span></a><span>, Previous: </span><a href="GDB_002fMI-Variable-Objects.html#GDB_002fMI-Variable-Objects" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Variable Objects</span></a><span>, Up: </span><a href="GDB_002fMI.html#GDB_002fMI" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><h3 style="margin-top:14.05pt; margin-bottom:14.05pt; page-break-inside:auto; page-break-after:auto"><a name="GDB_002fMI-Data-Manipulation-1"></a><span style="font-family:'Times New Roman'; color:#000000">27.16 </span><span style="font-family:'Times New Roman'; font-size:11.5pt; color:#000000">GDB/MI</span><span style="font-family:'Times New Roman'; color:#000000"> Data Manipulation</span><a name="index-data-manipulation_002c-in-GDB_002f"></a><a name="index-GDB_002fMI_002c-data-manipulation"></a></h3><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>This section describes the </span><span style="font-size:10pt">GDB/MI</span><span> commands that manipulate data: examine memory and registers, evaluate expressions, etc. </span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>For details about what an addressable memory unit is, see </span><a href="Memory.html#addressable-memory-unit" style="text-decoration:none"><span style="text-decoration:underline">addressable memory unit</span></a><span>. </span><a name="The-_002ddata_002ddisassemble-Command"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-data-disassemble</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002ddata_002ddisassemble"></a><a name="Synopsis-64"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-data-disassemble</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">    </span><span style="font-family:'Consolas'">[ -s </span><span style="font-family:'Consolas'; font-style:italic">start-addr</span><span style="font-family:'Consolas'"> -e </span><span style="font-family:'Consolas'; font-style:italic">end-addr</span><span style="font-family:'Consolas'"> ]</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">| [ -a </span><span style="font-family:'Consolas'; font-style:italic">addr</span><span style="font-family:'Consolas'"> ]</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">| [ -f </span><span style="font-family:'Consolas'; font-style:italic">filename</span><span style="font-family:'Consolas'"> -l </span><span style="font-family:'Consolas'; font-style:italic">linenum</span><span style="font-family:'Consolas'"> [ -n </span><span style="font-family:'Consolas'; font-style:italic">lines</span><span style="font-family:'Consolas'"> ] ]</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">-- </span><span style="font-family:'Consolas'; font-style:italic">mode</span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Where: </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">start-addr</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>is the beginning address (or </span><span style="font-family:'Consolas'; font-size:10pt">$pc</span><span>) </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">end-addr</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>is the end address </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">addr</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>is an address anywhere within (or the name of) the function to disassemble. If an address is specified, the whole function surrounding that address will be disassembled. If a name is specified, the whole function with that name will be disassembled. </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">filename</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>is the name of the file to disassemble </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">linenum</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>is the line number to disassemble around </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">lines</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>is the number of disassembly lines to be produced. If it is -1, the whole function will be disassembled, in case no </span><span style="font-style:italic">end-addr</span><span> is specified. If </span><span style="font-style:italic">end-addr</span><span> is specified as a non-zero value, and </span><span style="font-style:italic">lines</span><span> is lower than the number of disassembly lines between </span><span style="font-style:italic">start-addr</span><span> and </span><span style="font-style:italic">end-addr</span><span>, only </span><span style="font-style:italic">lines</span><span> lines are displayed; if </span><span style="font-style:italic">lines</span><span> is higher than the number of lines between </span><span style="font-style:italic">start-addr</span><span> and </span><span style="font-style:italic">end-addr</span><span>, only the lines up to </span><span style="font-style:italic">end-addr</span><span> are displayed. </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">mode</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>is one of: </span></p><ul type="disc" style="margin:0pt; padding-left:0pt"><li class="li0" style="margin-top:12pt; margin-left:66pt; font-family:serif; -aw-font-family:'Symbol'; -aw-font-weight:normal; -aw-number-format:''"><span style="font-family:'Times New Roman'">0 disassembly only </span></li><li class="li0" style="margin-left:66pt; font-family:serif; -aw-font-family:'Symbol'; -aw-font-weight:normal; -aw-number-format:''"><span style="font-family:'Times New Roman'">1 mixed source and disassembly (deprecated) </span></li><li class="li0" style="margin-left:66pt; font-family:serif; -aw-font-family:'Symbol'; -aw-font-weight:normal; -aw-number-format:''"><span style="font-family:'Times New Roman'">2 disassembly with raw opcodes </span></li><li class="li0" style="margin-left:66pt; font-family:serif; -aw-font-family:'Symbol'; -aw-font-weight:normal; -aw-number-format:''"><span style="font-family:'Times New Roman'">3 mixed source and disassembly with raw opcodes (deprecated) </span></li><li class="li0" style="margin-left:66pt; font-family:serif; -aw-font-family:'Symbol'; -aw-font-weight:normal; -aw-number-format:''"><span style="font-family:'Times New Roman'">4 mixed source and disassembly </span></li><li class="li0" style="margin-left:66pt; margin-bottom:12pt; font-family:serif; -aw-font-family:'Symbol'; -aw-font-weight:normal; -aw-number-format:''"><span style="font-family:'Times New Roman'">5 mixed source and disassembly with raw opcodes </span></li></ul><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Modes 1 and 3 are deprecated. The output is “source centric” which hasn’t proved useful in practice. See </span><a href="Machine-Code.html#Machine-Code" style="text-decoration:none"><span style="text-decoration:underline">Machine Code</span></a><span>, for a discussion of the difference between </span><span style="font-family:'Consolas'; font-size:10pt">/m</span><span> and </span><span style="font-family:'Consolas'; font-size:10pt">/s</span><span> output of the </span><span style="font-family:'Consolas'; font-size:10pt">disassemble</span><span> command. </span><a name="Result-6"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Result</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The result of the </span><span style="font-family:'Consolas'; font-size:10pt">-data-disassemble</span><span> command will be a list named ‘</span><span style="font-family:'Consolas'; font-size:10pt">asm_insns</span><span>’, the contents of this list depend on the </span><span style="font-style:italic">mode</span><span> used with the </span><span style="font-family:'Consolas'; font-size:10pt">-data-disassemble</span><span> command. </span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>For modes 0 and 2 the ‘</span><span style="font-family:'Consolas'; font-size:10pt">asm_insns</span><span>’ list contains tuples with the following fields: </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">address</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The address at which this instruction was disassembled. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">func-name</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The name of the function this instruction is within. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">offset</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The decimal offset in bytes from the start of ‘</span><span style="font-family:'Consolas'; font-size:10pt">func-name</span><span>’. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">inst</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The text disassembly for this ‘</span><span style="font-family:'Consolas'; font-size:10pt">address</span><span>’. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">opcodes</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>This field is only present for modes 2, 3 and 5. This contains the raw opcode bytes for the ‘</span><span style="font-family:'Consolas'; font-size:10pt">inst</span><span>’ field. </span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>For modes 1, 3, 4 and 5 the ‘</span><span style="font-family:'Consolas'; font-size:10pt">asm_insns</span><span>’ list contains tuples named ‘</span><span style="font-family:'Consolas'; font-size:10pt">src_and_asm_line</span><span>’, each of which has the following fields: </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">line</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The line number within ‘</span><span style="font-family:'Consolas'; font-size:10pt">file</span><span>’. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">file</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The file name from the compilation unit. This might be an absolute file name or a relative file name depending on the compile command used. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">fullname</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Absolute file name of ‘</span><span style="font-family:'Consolas'; font-size:10pt">file</span><span>’. It is converted to a canonical form using the source file search path (see </span><a href="Source-Path.html#Source-Path" style="text-decoration:none"><span style="text-decoration:underline">Specifying Source Directories</span></a><span>) and after resolving all the symbolic links. </span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>If the source file is not found this field will contain the path as present in the debug information. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">line_asm_insn</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>This is a list of tuples containing the disassembly for ‘</span><span style="font-family:'Consolas'; font-size:10pt">line</span><span>’ in ‘</span><span style="font-family:'Consolas'; font-size:10pt">file</span><span>’. The fields of each tuple are the same as for </span><span style="font-family:'Consolas'; font-size:10pt">-data-disassemble</span><span> in </span><span style="font-style:italic">mode</span><span> 0 and 2, so ‘</span><span style="font-family:'Consolas'; font-size:10pt">address</span><span>’, ‘</span><span style="font-family:'Consolas'; font-size:10pt">func-name</span><span>’, ‘</span><span style="font-family:'Consolas'; font-size:10pt">offset</span><span>’, ‘</span><span style="font-family:'Consolas'; font-size:10pt">inst</span><span>’, and optionally ‘</span><span style="font-family:'Consolas'; font-size:10pt">opcodes</span><span>’. </span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Note that whatever included in the ‘</span><span style="font-family:'Consolas'; font-size:10pt">inst</span><span>’ field, is not manipulated directly by </span><span style="font-size:10pt">GDB/MI</span><span>, i.e., it is not possible to adjust its format. </span><a name="GDB-Command-46"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">disassemble</span><span>’. </span><a name="Example-52"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Disassemble from the current value of </span><span style="font-family:'Consolas'; font-size:10pt">$pc</span><span> to </span><span style="font-family:'Consolas'; font-size:10pt">$pc + 20</span><span>: </span></p><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-data-disassemble -s $pc -e "$pc + 20" -- 0</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">asm_insns=[</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{address="0x000107c0",func-name="main",offset="4",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">inst="mov</span><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">2, %o0"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{address="0x000107c4",func-name="main",offset="8",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">inst="sethi</span><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">%hi(0x11800), %o2"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{address="0x000107c8",func-name="main",offset="12",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">inst="or</span><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">%o2, 0x140, %o1\t! 0x11940 <_lib_version+8>"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{address="0x000107cc",func-name="main",offset="16",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">inst="sethi</span><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">%hi(0x11800), %o2"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{address="0x000107d0",func-name="main",offset="20",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">inst="or</span><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">%o2, 0x168, %o4\t! 0x11968 <_lib_version+48>"}]</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Disassemble the whole </span><span style="font-family:'Consolas'; font-size:10pt">main</span><span> function. Line 32 is part of </span><span style="font-family:'Consolas'; font-size:10pt">main</span><span>. </span></p><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">-data-disassemble -f basics.c -l 32 -- 0</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,asm_insns=[</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{address="0x000107bc",func-name="main",offset="0",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">inst="save</span><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">%sp, -112, %sp"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{address="0x000107c0",func-name="main",offset="4",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">inst="mov</span><span style="font-family:'Consolas'; -aw-import:spaces">   </span><span style="font-family:'Consolas'">2, %o0"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{address="0x000107c4",func-name="main",offset="8",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">inst="sethi %hi(0x11800), %o2"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">[…]</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{address="0x0001081c",func-name="main",offset="96",inst="ret "},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{address="0x00010820",func-name="main",offset="100",inst="restore "}]</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Disassemble 3 instructions from the start of </span><span style="font-family:'Consolas'; font-size:10pt">main</span><span>: </span></p><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-data-disassemble -f basics.c -l 32 -n 3 -- 0</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,asm_insns=[</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{address="0x000107bc",func-name="main",offset="0",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">inst="save</span><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">%sp, -112, %sp"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{address="0x000107c0",func-name="main",offset="4",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">inst="mov</span><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">2, %o0"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{address="0x000107c4",func-name="main",offset="8",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">inst="sethi</span><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">%hi(0x11800), %o2"}]</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Disassemble 3 instructions from the start of </span><span style="font-family:'Consolas'; font-size:10pt">main</span><span> in mixed mode: </span></p><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-data-disassemble -f basics.c -l 32 -n 3 -- 1</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,asm_insns=[</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">src_and_asm_line={line="31",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">file="../../../src/gdb/testsuite/gdb.mi/basics.c",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">fullname="/absolute/path/to/src/gdb/testsuite/gdb.mi/basics.c",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">line_asm_insn=[{address="0x000107bc",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">func-name="main",offset="0",inst="save</span><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">%sp, -112, %sp"}]},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">src_and_asm_line={line="32",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">file="../../../src/gdb/testsuite/gdb.mi/basics.c",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">fullname="/absolute/path/to/src/gdb/testsuite/gdb.mi/basics.c",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">line_asm_insn=[{address="0x000107c0",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">func-name="main",offset="4",inst="mov</span><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">2, %o0"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{address="0x000107c4",func-name="main",offset="8",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">inst="sethi</span><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">%hi(0x11800), %o2"}]}]</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002ddata_002devaluate_002dexpressio"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-data-evaluate-expression</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002ddata_002devaluate_002dexpress"></a><a name="Synopsis-65"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-data-evaluate-expression </span><span style="font-family:'Consolas'; font-style:italic">expr</span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Evaluate </span><span style="font-style:italic">expr</span><span> as an expression. The expression could contain an inferior function call. The function call will execute synchronously. If the expression contains spaces, it must be enclosed in double quotes. </span><a name="GDB-Command-47"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> commands are ‘</span><span style="font-family:'Consolas'; font-size:10pt">print</span><span>’, ‘</span><span style="font-family:'Consolas'; font-size:10pt">output</span><span>’, and ‘</span><span style="font-family:'Consolas'; font-size:10pt">call</span><span>’. In </span><span style="font-family:'Consolas'; font-size:10pt">gdbtk</span><span> only, there’s a corresponding ‘</span><span style="font-family:'Consolas'; font-size:10pt">gdb_eval</span><span>’ command. </span><a name="Example-53"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>In the following example, the numbers that precede the commands are the </span><span style="font-style:italic">tokens</span><span> described in </span><a href="GDB_002fMI-Command-Syntax.html#GDB_002fMI-Command-Syntax" style="text-decoration:none"><span style="font-size:10pt; text-decoration:underline">GDB/MI</span><span style="text-decoration:underline"> Command Syntax</span></a><span>. Notice how </span><span style="font-size:10pt">GDB/MI</span><span> returns the same tokens in its output. </span></p><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">211-data-evaluate-expression A</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">211^done,value="1"</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">311-data-evaluate-expression &A</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">311^done,value="0xefffeb7c"</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">411-data-evaluate-expression A+3</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">411^done,value="4"</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">511-data-evaluate-expression "A + 3"</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">511^done,value="4"</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002ddata_002dlist_002dchanged_002dr"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-data-list-changed-registers</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002ddata_002dlist_002dchanged_002"></a><a name="Synopsis-66"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-data-list-changed-registers</span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Display a list of the registers that have changed. </span><a name="GDB-Command-48"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span style="font-size:10pt">GDB</span><span> doesn’t have a direct analog for this command; </span><span style="font-family:'Consolas'; font-size:10pt">gdbtk</span><span> has the corresponding command ‘</span><span style="font-family:'Consolas'; font-size:10pt">gdb_changed_register_list</span><span>’. </span><a name="Example-54"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>On a PPC MBX board: </span></p><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-exec-continue</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^running</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:ignore"> </span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">*stopped,reason="breakpoint-hit",disp="keep",bkptno="1",frame={</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">func="main",args=[],file="try.c",fullname="/home/foo/bar/try.c",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">line="5",arch="powerpc"}</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-data-list-changed-registers</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,changed-registers=["0","1","2","4","5","6","7","8","9",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">"10","11","13","14","15","16","17","18","19","20","21","22","23",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">"24","25","26","27","28","30","31","64","65","66","67","69"]</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002ddata_002dlist_002dregister_002d"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-data-list-register-names</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002ddata_002dlist_002dregister_00"></a><a name="Synopsis-67"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-data-list-register-names [ ( </span><span style="font-family:'Consolas'; font-style:italic">regno</span><span style="font-family:'Consolas'"> )+ ]</span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Show a list of register names for the current target. If no arguments are given, it shows a list of the names of all the registers. If integer numbers are given as arguments, it will print a list of the names of the registers corresponding to the arguments. To ensure consistency between a register name and its number, the output list may include empty register names. </span><a name="GDB-Command-49"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span style="font-size:10pt">GDB</span><span> does not have a command which corresponds to ‘</span><span style="font-family:'Consolas'; font-size:10pt">-data-list-register-names</span><span>’. In </span><span style="font-family:'Consolas'; font-size:10pt">gdbtk</span><span> there is a corresponding command ‘</span><span style="font-family:'Consolas'; font-size:10pt">gdb_regnames</span><span>’. </span><a name="Example-55"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>For the PPC MBX board: </span></p><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-data-list-register-names</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,register-names=["r0","r1","r2","r3","r4","r5","r6","r7",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">"r8","r9","r10","r11","r12","r13","r14","r15","r16","r17","r18",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">"r19","r20","r21","r22","r23","r24","r25","r26","r27","r28","r29",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">"r30","r31","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">"f10","f11","f12","f13","f14","f15","f16","f17","f18","f19","f20",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">"f21","f22","f23","f24","f25","f26","f27","f28","f29","f30","f31",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">"", "pc","ps","cr","lr","ctr","xer"]</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-data-list-register-names 1 2 3</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,register-names=["r1","r2","r3"]</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-data-list-register-values</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="Synopsis-68"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-data-list-register-values</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">    </span><span style="font-family:'Consolas'">[ --skip-unavailable ] </span><span style="font-family:'Consolas'; font-style:italic">fmt</span><span style="font-family:'Consolas'"> [ ( </span><span style="font-family:'Consolas'; font-style:italic">regno</span><span style="font-family:'Consolas'"> )*]</span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Display the registers’ contents. The format according to which the registers’ contents are to be returned is given by </span><span style="font-style:italic">fmt</span><span>, followed by an optional list of numbers specifying the registers to display. A missing list of numbers indicates that the contents of all the registers must be returned. The </span><span style="font-family:'Consolas'; font-size:10pt">--skip-unavailable</span><span> option indicates that only the available registers are to be returned. </span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Allowed formats for </span><span style="font-style:italic">fmt</span><span> are: </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">x</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Hexadecimal </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">o</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Octal </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">t</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Binary </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">d</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Decimal </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">r</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Raw </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">N</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Natural </span><a name="GDB-Command-50"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> commands are ‘</span><span style="font-family:'Consolas'; font-size:10pt">info reg</span><span>’, ‘</span><span style="font-family:'Consolas'; font-size:10pt">info all-reg</span><span>’, and (in </span><span style="font-family:'Consolas'; font-size:10pt">gdbtk</span><span>) ‘</span><span style="font-family:'Consolas'; font-size:10pt">gdb_fetch_registers</span><span>’. </span><a name="Example-56"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>For a PPC MBX board (note: line breaks are for readability only, they don’t appear in the actual output): </span></p><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-data-list-register-values r 64 65</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,register-values=[{number="64",value="0xfe00a300"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{number="65",value="0x00029002"}]</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-data-list-register-values x</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,register-values=[{number="0",value="0xfe0043c8"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{number="1",value="0x3fff88"},{number="2",value="0xfffffffe"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{number="3",value="0x0"},{number="4",value="0xa"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{number="5",value="0x3fff68"},{number="6",value="0x3fff58"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{number="7",value="0xfe011e98"},{number="8",value="0x2"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{number="9",value="0xfa202820"},{number="10",value="0xfa202808"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{number="11",value="0x1"},{number="12",value="0x0"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{number="13",value="0x4544"},{number="14",value="0xffdfffff"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{number="15",value="0xffffffff"},{number="16",value="0xfffffeff"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{number="17",value="0xefffffed"},{number="18",value="0xfffffffe"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{number="19",value="0xffffffff"},{number="20",value="0xffffffff"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{number="21",value="0xffffffff"},{number="22",value="0xfffffff7"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{number="23",value="0xffffffff"},{number="24",value="0xffffffff"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{number="25",value="0xffffffff"},{number="26",value="0xfffffffb"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{number="27",value="0xffffffff"},{number="28",value="0xf7bfffff"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{number="29",value="0x0"},{number="30",value="0xfe010000"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{number="31",value="0x0"},{number="32",value="0x0"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{number="33",value="0x0"},{number="34",value="0x0"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{number="35",value="0x0"},{number="36",value="0x0"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{number="37",value="0x0"},{number="38",value="0x0"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{number="39",value="0x0"},{number="40",value="0x0"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{number="41",value="0x0"},{number="42",value="0x0"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{number="43",value="0x0"},{number="44",value="0x0"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{number="45",value="0x0"},{number="46",value="0x0"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{number="47",value="0x0"},{number="48",value="0x0"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{number="49",value="0x0"},{number="50",value="0x0"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{number="51",value="0x0"},{number="52",value="0x0"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{number="53",value="0x0"},{number="54",value="0x0"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{number="55",value="0x0"},{number="56",value="0x0"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{number="57",value="0x0"},{number="58",value="0x0"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{number="59",value="0x0"},{number="60",value="0x0"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{number="61",value="0x0"},{number="62",value="0x0"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{number="63",value="0x0"},{number="64",value="0xfe00a300"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{number="65",value="0x29002"},{number="66",value="0x202f04b5"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{number="67",value="0xfe0043b0"},{number="68",value="0xfe00b3e4"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{number="69",value="0x20002b03"}]</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002ddata_002dread_002dmemory-Comman"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-data-read-memory</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002ddata_002dread_002dmemory"></a></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>This command is deprecated, use </span><span style="font-family:'Consolas'; font-size:10pt">-data-read-memory-bytes</span><span> instead. </span><a name="Synopsis-69"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-data-read-memory [ -o </span><span style="font-family:'Consolas'; font-style:italic">byte-offset</span><span style="font-family:'Consolas'"> ]</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">   </span><span style="font-family:'Consolas'; font-style:italic">address</span><span style="font-family:'Consolas'"> </span><span style="font-family:'Consolas'; font-style:italic">word-format</span><span style="font-family:'Consolas'"> </span><span style="font-family:'Consolas'; font-style:italic">word-size</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">   </span><span style="font-family:'Consolas'; font-style:italic">nr-rows</span><span style="font-family:'Consolas'"> </span><span style="font-family:'Consolas'; font-style:italic">nr-cols</span><span style="font-family:'Consolas'"> [ </span><span style="font-family:'Consolas'; font-style:italic">aschar</span><span style="font-family:'Consolas'"> ]</span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>where: </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">address</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>An expression specifying the address of the first memory word to be read. Complex expressions containing embedded white space should be quoted using the C convention. </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">word-format</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The format to be used to print the memory words. The notation is the same as for </span><span style="font-size:10pt">GDB</span><span>’s </span><span style="font-family:'Consolas'; font-size:10pt">print</span><span> command (see </span><a href="Output-Formats.html#Output-Formats" style="text-decoration:none"><span style="text-decoration:underline">Output Formats</span></a><span>). </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">word-size</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The size of each memory word in bytes. </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">nr-rows</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The number of rows in the output table. </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">nr-cols</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The number of columns in the output table. </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">aschar</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>If present, indicates that each row should include an </span><span style="font-size:10pt">ASCII</span><span> dump. The value of </span><span style="font-style:italic">aschar</span><span> is used as a padding character when a byte is not a member of the printable </span><span style="font-size:10pt">ASCII</span><span> character set (printable </span><span style="font-size:10pt">ASCII</span><span> characters are those whose code is between 32 and 126, inclusively). </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">byte-offset</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>An offset to add to the </span><span style="font-style:italic">address</span><span> before fetching memory. </span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>This command displays memory contents as a table of </span><span style="font-style:italic">nr-rows</span><span> by </span><span style="font-style:italic">nr-cols</span><span> words, each word being </span><span style="font-style:italic">word-size</span><span> bytes. In total, </span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">nr-rows</span><span style="font-family:'Consolas'; font-size:10pt"> * </span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">nr-cols</span><span style="font-family:'Consolas'; font-size:10pt"> * </span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">word-size</span><span> bytes are read (returned as ‘</span><span style="font-family:'Consolas'; font-size:10pt">total-bytes</span><span>’). Should less than the requested number of bytes be returned by the target, the missing words are identified using ‘</span><span style="font-family:'Consolas'; font-size:10pt">N/A</span><span>’. The number of bytes read from the target is returned in ‘</span><span style="font-family:'Consolas'; font-size:10pt">nr-bytes</span><span>’ and the starting address used to read memory in ‘</span><span style="font-family:'Consolas'; font-size:10pt">addr</span><span>’. </span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The address of the next/previous row or page is available in ‘</span><span style="font-family:'Consolas'; font-size:10pt">next-row</span><span>’ and ‘</span><span style="font-family:'Consolas'; font-size:10pt">prev-row</span><span>’, ‘</span><span style="font-family:'Consolas'; font-size:10pt">next-page</span><span>’ and ‘</span><span style="font-family:'Consolas'; font-size:10pt">prev-page</span><span>’. </span><a name="GDB-Command-51"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">x</span><span>’. </span><span style="font-family:'Consolas'; font-size:10pt">gdbtk</span><span> has ‘</span><span style="font-family:'Consolas'; font-size:10pt">gdb_get_mem</span><span>’ memory read command. </span><a name="Example-57"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Read six bytes of memory starting at </span><span style="font-family:'Consolas'; font-size:10pt">bytes+6</span><span> but then offset by </span><span style="font-family:'Consolas'; font-size:10pt">-6</span><span> bytes. Format as three rows of two columns. One byte per word. Display each word in hex. </span></p><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">9-data-read-memory -o -6 -- bytes+6 x 1 3 2</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">9^done,addr="0x00001390",nr-bytes="6",total-bytes="6",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">next-row="0x00001396",prev-row="0x0000138e",next-page="0x00001396",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">prev-page="0x0000138a",memory=[</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{addr="0x00001390",data=["0x00","0x01"]},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{addr="0x00001392",data=["0x02","0x03"]},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{addr="0x00001394",data=["0x04","0x05"]}]</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Read two bytes of memory starting at address </span><span style="font-family:'Consolas'; font-size:10pt">shorts + 64</span><span> and display as a single word formatted in decimal. </span></p><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">5-data-read-memory shorts+64 d 2 1 1</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">5^done,addr="0x00001510",nr-bytes="2",total-bytes="2",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">next-row="0x00001512",prev-row="0x0000150e",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">next-page="0x00001512",prev-page="0x0000150e",memory=[</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{addr="0x00001510",data=["128"]}]</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Read thirty two bytes of memory starting at </span><span style="font-family:'Consolas'; font-size:10pt">bytes+16</span><span> and format as eight rows of four columns. Include a string encoding with ‘</span><span style="font-family:'Consolas'; font-size:10pt">x</span><span>’ used as the non-printable character. </span></p><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">4-data-read-memory bytes+16 x 1 8 4 x</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">4^done,addr="0x000013a0",nr-bytes="32",total-bytes="32",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">next-row="0x000013c0",prev-row="0x0000139c",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">next-page="0x000013c0",prev-page="0x00001380",memory=[</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{addr="0x000013a0",data=["0x10","0x11","0x12","0x13"],ascii="xxxx"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{addr="0x000013a4",data=["0x14","0x15","0x16","0x17"],ascii="xxxx"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{addr="0x000013a8",data=["0x18","0x19","0x1a","0x1b"],ascii="xxxx"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{addr="0x000013ac",data=["0x1c","0x1d","0x1e","0x1f"],ascii="xxxx"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{addr="0x000013b0",data=["0x20","0x21","0x22","0x23"],ascii=" !\"#"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{addr="0x000013b4",data=["0x24","0x25","0x26","0x27"],ascii="$%&'"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{addr="0x000013b8",data=["0x28","0x29","0x2a","0x2b"],ascii="()*+"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{addr="0x000013bc",data=["0x2c","0x2d","0x2e","0x2f"],ascii=",-./"}]</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002ddata_002dread_002dmemory_002dby"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-data-read-memory-bytes</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002ddata_002dread_002dmemory_002d"></a><a name="Synopsis-70"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-data-read-memory-bytes [ -o </span><span style="font-family:'Consolas'; font-style:italic">offset</span><span style="font-family:'Consolas'"> ]</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">   </span><span style="font-family:'Consolas'; font-style:italic">address</span><span style="font-family:'Consolas'"> </span><span style="font-family:'Consolas'; font-style:italic">count</span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>where: </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">address</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>An expression specifying the address of the first addressable memory unit to be read. Complex expressions containing embedded white space should be quoted using the C convention. </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">count</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The number of addressable memory units to read. This should be an integer literal. </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">offset</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The offset relative to </span><span style="font-style:italic">address</span><span> at which to start reading. This should be an integer literal. This option is provided so that a frontend is not required to first evaluate address and then perform address arithmetics itself. </span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>This command attempts to read all accessible memory regions in the specified range. First, all regions marked as unreadable in the memory map (if one is defined) will be skipped. See </span><a href="Memory-Region-Attributes.html#Memory-Region-Attributes" style="text-decoration:none"><span style="text-decoration:underline">Memory Region Attributes</span></a><span>. Second, </span><span style="font-size:10pt">GDB</span><span> will attempt to read the remaining regions. For each one, if reading full region results in an errors, </span><span style="font-size:10pt">GDB</span><span> will try to read a subset of the region. </span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>In general, every single memory unit in the region may be readable or not, and the only way to read every readable unit is to try a read at every address, which is not practical. Therefore, </span><span style="font-size:10pt">GDB</span><span> will attempt to read all accessible memory units at either beginning or the end of the region, using a binary division scheme. This heuristic works well for reading across a memory map boundary. Note that if a region has a readable range that is neither at the beginning or the end, </span><span style="font-size:10pt">GDB</span><span> will not read it. </span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The result record (see </span><a href="GDB_002fMI-Result-Records.html#GDB_002fMI-Result-Records" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Result Records</span></a><span>) that is output of the command includes a field named ‘</span><span style="font-family:'Consolas'; font-size:10pt">memory</span><span>’ whose content is a list of tuples. Each tuple represent a successfully read memory block and has the following fields: </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">begin</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The start address of the memory block, as hexadecimal literal. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">end</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The end address of the memory block, as hexadecimal literal. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">offset</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The offset of the memory block, as hexadecimal literal, relative to the start address passed to </span><span style="font-family:'Consolas'; font-size:10pt">-data-read-memory-bytes</span><span>. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">contents</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The contents of the memory block, in hex. </span><a name="GDB-Command-52"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">x</span><span>’. </span><a name="Example-58"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-data-read-memory-bytes &a 10</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,memory=[{begin="0xbffff154",offset="0x00000000",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="width:33.6pt; display:inline-block"> </span><span style="font-family:'Consolas'">end="0xbffff15e",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="width:33.6pt; display:inline-block"> </span><span style="font-family:'Consolas'">contents="01000000020000000300"}]</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002ddata_002dwrite_002dmemory_002db"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-data-write-memory-bytes</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002ddata_002dwrite_002dmemory_002"></a><a name="Synopsis-71"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-data-write-memory-bytes </span><span style="font-family:'Consolas'; font-style:italic">address</span><span style="font-family:'Consolas'"> </span><span style="font-family:'Consolas'; font-style:italic">contents</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-data-write-memory-bytes </span><span style="font-family:'Consolas'; font-style:italic">address</span><span style="font-family:'Consolas'"> </span><span style="font-family:'Consolas'; font-style:italic">contents</span><span style="font-family:'Consolas'"> </span><span class="spanspanspanroman">[</span><span style="font-family:'Consolas'; font-style:italic">count</span><span class="spanspanspanroman">]</span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>where: </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">address</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>An expression specifying the address of the first addressable memory unit to be written. Complex expressions containing embedded white space should be quoted using the C convention. </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">contents</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The hex-encoded data to write. It is an error if </span><span style="font-style:italic">contents</span><span> does not represent an integral number of addressable memory units. </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">count</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Optional argument indicating the number of addressable memory units to be written. If </span><span style="font-style:italic">count</span><span> is greater than </span><span style="font-style:italic">contents</span><span>’ length, </span><span style="font-size:10pt">GDB</span><span> will repeatedly write </span><span style="font-style:italic">contents</span><span> until it fills </span><span style="font-style:italic">count</span><span> memory units. </span><a name="GDB-Command-53"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>There’s no corresponding </span><span style="font-size:10pt">GDB</span><span> command. </span><a name="Example-59"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-data-write-memory-bytes &a "aabbccdd"</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-data-write-memory-bytes &a "aabbccdd" 16e</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Next: </span><a href="GDB_002fMI-Tracepoint-Commands.html#GDB_002fMI-Tracepoint-Commands" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Tracepoint Commands</span></a><span>, Previous: </span><a href="GDB_002fMI-Variable-Objects.html#GDB_002fMI-Variable-Objects" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Variable Objects</span></a><span>, Up: </span><a href="GDB_002fMI.html#GDB_002fMI" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p></div><br style="page-break-before:always; clear:both; mso-break-type:section-break" /><div><p class="p0" style="margin-bottom:12pt"><a name="GDB_002fMI-Development-and-Front-Ends"></a><span>Next: </span><a href="GDB_002fMI-Output-Records.html#GDB_002fMI-Output-Records" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Output Records</span></a><span>, Previous: </span><a href="GDB_002fMI-Compatibility-with-CLI.html#GDB_002fMI-Compatibility-with-CLI" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Compatibility with CLI</span></a><span>, Up: </span><a href="GDB_002fMI.html#GDB_002fMI" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><h3 style="margin-top:14.05pt; margin-bottom:14.05pt; page-break-inside:auto; page-break-after:auto"><a name="GDB_002fMI-Development-and-Front-Ends-1"></a><span style="font-family:'Times New Roman'; color:#000000">27.4 </span><span style="font-family:'Times New Roman'; font-size:11.5pt; color:#000000">GDB/MI</span><span style="font-family:'Times New Roman'; color:#000000"> Development and Front Ends</span><a name="index-GDB_002fMI-development"></a></h3><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The application which takes the MI output and presents the state of the program being debugged to the user is called a </span><span style="font-style:italic">front end</span><span>. </span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Since </span><span style="font-size:10pt">GDB/MI</span><span> is used by a variety of front ends to </span><span style="font-size:10pt">GDB</span><span>, changes to the MI interface may break existing usage. This section describes how the protocol changes and how to request previous version of the protocol when it does. </span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Some changes in MI need not break a carefully designed front end, and for these the MI version will remain unchanged. The following is a list of changes that may occur within one level, so front ends should parse MI output in a way that can handle them: </span></p><ul type="disc" style="margin:0pt; padding-left:0pt"><li class="li0" style="margin-top:12pt; margin-left:36pt; font-family:serif; -aw-font-family:'Symbol'; -aw-font-weight:normal; -aw-number-format:''"><span style="font-family:'Times New Roman'">New MI commands may be added. </span></li><li class="li0" style="margin-left:36pt; font-family:serif; -aw-font-family:'Symbol'; -aw-font-weight:normal; -aw-number-format:''"><span style="font-family:'Times New Roman'">New fields may be added to the output of any MI command. </span></li><li class="li0" style="margin-left:36pt; margin-bottom:12pt; font-family:serif; -aw-font-family:'Symbol'; -aw-font-weight:normal; -aw-number-format:''"><span style="font-family:'Times New Roman'">The range of values for fields with specified values, e.g., </span><span style="font-family:'Consolas'; font-size:10pt">in_scope</span><span style="font-family:'Times New Roman'"> (see </span><a href="GDB_002fMI-Variable-Objects.html#g_t_002dvar_002dupdate" style="text-decoration:none"><span style="font-family:'Times New Roman'; text-decoration:underline">-var-update</span></a><span style="font-family:'Times New Roman'">) may be extended. </span></li></ul><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>If the changes are likely to break front ends, the MI version level will be increased by one. The new versions of the MI protocol are not compatible with the old versions. Old versions of MI remain available, allowing front ends to keep using them until they are modified to use the latest MI version. </span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Since </span><span style="font-family:'Consolas'; font-size:10pt">--interpreter=mi</span><span> always points to the latest MI version, it is recommended that front ends request a specific version of MI when launching </span><span style="font-size:10pt">GDB</span><span> (e.g. </span><span style="font-family:'Consolas'; font-size:10pt">--interpreter=mi2</span><span>) to make sure they get an interpreter with the MI version they expect. </span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The following table gives a summary of the released versions of the MI interface: the version number, the version of GDB in which it first appeared and the breaking changes compared to the previous version. </span></p><table cellspacing="2" cellpadding="0" class="table" style="border-spacing:1.5pt"><thead><tr><td style="width:5%; padding:0.75pt"><p class="p0" style="text-align:center"><span style="font-weight:bold">MI version</span></p></td><td style="width:5%; padding:0.75pt"><p class="p0" style="text-align:center"><span style="font-weight:bold">GDB version</span></p></td><td style="width:90%; padding:0.75pt"><p class="p0" style="text-align:center"><span style="font-weight:bold">Breaking changes</span></p></td></tr></thead><tbody><tr><td style="width:5%; padding:0.75pt"><p class="p0" style="text-align:center"><span>1 </span></p></td><td style="width:5%; padding:0.75pt"><p class="p0" style="text-align:center"><span>5.1 </span></p></td><td style="width:90%; padding:0.75pt"><p class="p0"><span>None</span></p></td></tr><tr><td style="width:5%; padding:0.75pt"><p class="p0" style="text-align:center"><span>2 </span></p></td><td style="width:5%; padding:0.75pt"><p class="p0" style="text-align:center"><span>6.0 </span></p></td><td style="width:90%; padding:0.75pt"><ul type="disc" style="margin:0pt; padding-left:0pt"><li class="li0" style="margin-top:12pt; margin-left:36pt; font-family:serif; -aw-font-family:'Symbol'; -aw-font-weight:normal; -aw-number-format:''"><span style="font-family:'Times New Roman'">The </span><span style="font-family:'Consolas'; font-size:10pt">-environment-pwd</span><span style="font-family:'Times New Roman'">, </span><span style="font-family:'Consolas'; font-size:10pt">-environment-directory</span><span style="font-family:'Times New Roman'"> and </span><span style="font-family:'Consolas'; font-size:10pt">-environment-path</span><span style="font-family:'Times New Roman'"> commands now returns values using the MI output syntax, rather than CLI output syntax. </span></li><li class="li0" style="margin-left:36pt; font-family:serif; -aw-font-family:'Symbol'; -aw-font-weight:normal; -aw-number-format:''"><span style="font-family:'Consolas'; font-size:10pt">-var-list-children</span><span style="font-family:'Times New Roman'">’s </span><span style="font-family:'Consolas'; font-size:10pt">children</span><span style="font-family:'Times New Roman'"> result field is now a list, rather than a tuple. </span></li><li class="li0" style="margin-left:36pt; margin-bottom:12pt; font-family:serif; -aw-font-family:'Symbol'; -aw-font-weight:normal; -aw-number-format:''"><span style="font-family:'Consolas'; font-size:10pt">-var-update</span><span style="font-family:'Times New Roman'">’s </span><span style="font-family:'Consolas'; font-size:10pt">changelist</span><span style="font-family:'Times New Roman'"> result field is now a list, rather than a tuple. </span></li></ul></td></tr><tr><td style="width:5%; padding:0.75pt"><p class="p0" style="text-align:center"><span>3 </span></p></td><td style="width:5%; padding:0.75pt"><p class="p0" style="text-align:center"><span>9.1 </span></p></td><td style="width:90%; padding:0.75pt"><ul type="disc" style="margin:0pt; padding-left:0pt"><li class="li0" style="margin-top:12pt; margin-left:36pt; margin-bottom:12pt; font-family:serif; -aw-font-family:'Symbol'; -aw-font-weight:normal; -aw-number-format:''"><span style="font-family:'Times New Roman'">The output of information about multi-location breakpoints has changed in the responses to the </span><span style="font-family:'Consolas'; font-size:10pt">-break-insert</span><span style="font-family:'Times New Roman'"> and </span><span style="font-family:'Consolas'; font-size:10pt">-break-info</span><span style="font-family:'Times New Roman'"> commands, as well as in the </span><span style="font-family:'Consolas'; font-size:10pt">=breakpoint-created</span><span style="font-family:'Times New Roman'"> and </span><span style="font-family:'Consolas'; font-size:10pt">=breakpoint-modified</span><span style="font-family:'Times New Roman'"> events. The multiple locations are now placed in a </span><span style="font-family:'Consolas'; font-size:10pt">locations</span><span style="font-family:'Times New Roman'"> field, whose value is a list. </span></li></ul></td></tr></tbody></table><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>If your front end cannot yet migrate to a more recent version of the MI protocol, you can nevertheless selectively enable specific features available in those recent MI versions, using the following commands: </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">-fix-multi-location-breakpoint-output</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Use the output for multi-location breakpoints which was introduced by MI 3, even when using MI versions 2 or 1. This command has no effect when using MI version 3 or later. </span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The best way to avoid unexpected changes in MI that might break your front end is to make your project known to </span><span style="font-size:10pt">GDB</span><span> developers and follow development on </span><a href="mailto:gdb@sourceware.org" style="text-decoration:none"><span style="text-decoration:underline">gdb@sourceware.org</span></a><span> and </span><a href="mailto:gdb-patches@sourceware.org" style="text-decoration:none"><span style="text-decoration:underline">gdb-patches@sourceware.org</span></a><span>. </span><a name="index-mailing-lists"></a></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Next: </span><a href="GDB_002fMI-Output-Records.html#GDB_002fMI-Output-Records" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Output Records</span></a><span>, Previous: </span><a href="GDB_002fMI-Compatibility-with-CLI.html#GDB_002fMI-Compatibility-with-CLI" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Compatibility with CLI</span></a><span>, Up: </span><a href="GDB_002fMI.html#GDB_002fMI" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p></div><br style="page-break-before:always; clear:both; mso-break-type:section-break" /><div><p class="p0" style="margin-bottom:12pt"><a name="GDB_002fMI-File-Commands"></a><span>Next: </span><a href="GDB_002fMI-Target-Manipulation.html#GDB_002fMI-Target-Manipulation" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Target Manipulation</span></a><span>, Previous: </span><a href="GDB_002fMI-Symbol-Query.html#GDB_002fMI-Symbol-Query" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Symbol Query</span></a><span>, Up: </span><a href="GDB_002fMI.html#GDB_002fMI" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><h3 style="margin-top:14.05pt; margin-bottom:14.05pt; page-break-inside:auto; page-break-after:auto"><a name="GDB_002fMI-File-Commands-1"></a><span style="font-family:'Times New Roman'; color:#000000">27.19 </span><span style="font-family:'Times New Roman'; font-size:11.5pt; color:#000000">GDB/MI</span><span style="font-family:'Times New Roman'; color:#000000"> File Commands</span></h3><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>This section describes the GDB/MI commands to specify executable file names and to read in and obtain symbol table information. </span><a name="The-_002dfile_002dexec_002dand_002dsymbo"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-file-exec-and-symbols</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dfile_002dexec_002dand_002dsym"></a><a name="Synopsis-87"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-file-exec-and-symbols </span><span style="font-family:'Consolas'; font-style:italic">file</span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Specify the executable file to be debugged. This file is the one from which the symbol table is also read. If no file is specified, the command clears the executable and symbol information. If breakpoints are set when using this command with no arguments, </span><span style="font-size:10pt">GDB</span><span> will produce error messages. Otherwise, no output is produced, except a completion notification. </span><a name="GDB-Command-69"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">file</span><span>’. </span><a name="Example-69"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-file-exec-and-symbols /kwikemart/marge/ezannoni/TRUNK/mbx/hello.mbx</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dfile_002dexec_002dfile-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-file-exec-file</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dfile_002dexec_002dfile"></a><a name="Synopsis-88"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-file-exec-file </span><span style="font-family:'Consolas'; font-style:italic">file</span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Specify the executable file to be debugged. Unlike ‘</span><span style="font-family:'Consolas'; font-size:10pt">-file-exec-and-symbols</span><span>’, the symbol table is </span><span style="font-style:italic">not</span><span> read from this file. If used without argument, </span><span style="font-size:10pt">GDB</span><span> clears the information about the executable file. No output is produced, except a completion notification. </span><a name="GDB-Command-70"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">exec-file</span><span>’. </span><a name="Example-70"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-file-exec-file /kwikemart/marge/ezannoni/TRUNK/mbx/hello.mbx</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dfile_002dlist_002dexec_002dsour"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-file-list-exec-source-file</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dfile_002dlist_002dexec_002dso"></a><a name="Synopsis-89"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-file-list-exec-source-file</span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>List the line number, the current source file, and the absolute path to the current source file for the current executable. The macro information field has a value of ‘</span><span style="font-family:'Consolas'; font-size:10pt">1</span><span>’ or ‘</span><span style="font-family:'Consolas'; font-size:10pt">0</span><span>’ depending on whether or not the file includes preprocessor macro information. </span><a name="GDB-Command-71"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The </span><span style="font-size:10pt">GDB</span><span> equivalent is ‘</span><span style="font-family:'Consolas'; font-size:10pt">info source</span><span>’ </span><a name="Example-71"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">123-file-list-exec-source-file</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">123^done,line="1",file="foo.c",fullname="/home/bar/foo.c,macro-info="1"</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-file-list-exec-source-files</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-info-sources-1"></a><a name="Synopsis-90"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-file-list-exec-source-files </span><span class="spanspanspanroman">[</span><span style="font-family:'Consolas'"> </span><span style="font-family:'Consolas'; font-style:italic">--group-by-objfile</span><span style="font-family:'Consolas'"> </span><span class="spanspanspanroman">]</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                              </span><span class="spanspanspanroman">[</span><span style="font-family:'Consolas'"> </span><span style="font-family:'Consolas'; font-style:italic">--dirname</span><span style="font-family:'Consolas'"> </span><span class="spanspanspanroman">|</span><span style="font-family:'Consolas'"> </span><span style="font-family:'Consolas'; font-style:italic">--basename</span><span style="font-family:'Consolas'"> </span><span class="spanspanspanroman">]</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                              </span><span class="spanspanspanroman">[</span><span style="font-family:'Consolas'"> -- </span><span class="spanspanspanroman">]</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                              </span><span class="spanspanspanroman">[</span><span style="font-family:'Consolas'"> </span><span style="font-family:'Consolas'; font-style:italic">regexp</span><span style="font-family:'Consolas'"> </span><span class="spanspanspanroman">]</span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>This command returns information about the source files </span><span style="font-size:10pt">GDB</span><span> knows about, it will output both the filename and fullname (absolute file name) of a source file, though the fullname can be elided if this information is not known to </span><span style="font-size:10pt">GDB</span><span>. </span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>With no arguments this command returns a list of source files. Each source file is represented by a tuple with the fields; </span><span style="font-style:italic">file</span><span>, </span><span style="font-style:italic">fullname</span><span>, and </span><span style="font-style:italic">debug-fully-read</span><span>. The </span><span style="font-style:italic">file</span><span> is the display name for the file, while </span><span style="font-style:italic">fullname</span><span> is the absolute name of the file. The </span><span style="font-style:italic">fullname</span><span> field can be elided if the absolute name of the source file can’t be computed. The field </span><span style="font-style:italic">debug-fully-read</span><span> will be a string, either </span><span style="font-family:'Consolas'; font-size:10pt">true</span><span> or </span><span style="font-family:'Consolas'; font-size:10pt">false</span><span>. When </span><span style="font-family:'Consolas'; font-size:10pt">true</span><span>, this indicates the full debug information for the compilation unit describing this file has been read in. When </span><span style="font-family:'Consolas'; font-size:10pt">false</span><span>, the full debug information has not yet been read in. While reading in the full debug information it is possible that </span><span style="font-size:10pt">GDB</span><span> could become aware of additional source files. </span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The optional </span><span style="font-style:italic">regexp</span><span> can be used to filter the list of source files returned. The </span><span style="font-style:italic">regexp</span><span> will be matched against the full source file name. The matching is case-sensitive, except on operating systems that have case-insensitive filesystem (e.g., MS-Windows). ‘</span><span style="font-family:'Consolas'; font-size:10pt">--</span><span>’ can be used before </span><span style="font-style:italic">regexp</span><span> to prevent </span><span style="font-size:10pt">GDB</span><span> interpreting </span><span style="font-style:italic">regexp</span><span> as a command option (e.g. if </span><span style="font-style:italic">regexp</span><span> starts with ‘</span><span style="font-family:'Consolas'; font-size:10pt">-</span><span>’). </span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>If </span><span style="font-family:'Consolas'; font-size:10pt">--dirname</span><span> is provided, then </span><span style="font-style:italic">regexp</span><span> is matched only against the directory name of each source file. If </span><span style="font-family:'Consolas'; font-size:10pt">--basename</span><span> is provided, then </span><span style="font-style:italic">regexp</span><span> is matched against the basename of each source file. Only one of </span><span style="font-family:'Consolas'; font-size:10pt">--dirname</span><span> or </span><span style="font-family:'Consolas'; font-size:10pt">--basename</span><span> may be given, and if either is given then </span><span style="font-style:italic">regexp</span><span> is required. </span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>If </span><span style="font-family:'Consolas'; font-size:10pt">--group-by-objfile</span><span> is used then the format of the results is changed. The results will now be a list of tuples, with each tuple representing an object file (executable or shared library) loaded into </span><span style="font-size:10pt">GDB</span><span>. The fields of these tuples are; </span><span style="font-style:italic">filename</span><span>, </span><span style="font-style:italic">debug-info</span><span>, and </span><span style="font-style:italic">sources</span><span>. The </span><span style="font-style:italic">filename</span><span> is the absolute name of the object file, </span><span style="font-style:italic">debug-info</span><span> is a string with one of the following values: </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">none</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>This object file has no debug information. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">partially-read</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>This object file has debug information, but it is not fully read in yet. When it is read in later, GDB might become aware of additional source files. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">fully-read</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>This object file has debug information, and this information is fully read into GDB. The list of source files is complete. </span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The </span><span style="font-style:italic">sources</span><span> is a list or tuples, with each tuple describing a single source file with the same fields as described previously. The </span><span style="font-style:italic">sources</span><span> list can be empty for object files that have no debug information. </span><a name="GDB-Command-72"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The </span><span style="font-size:10pt">GDB</span><span> equivalent is ‘</span><span style="font-family:'Consolas'; font-size:10pt">info sources</span><span>’. </span><span style="font-family:'Consolas'; font-size:10pt">gdbtk</span><span> has an analogous command ‘</span><span style="font-family:'Consolas'; font-size:10pt">gdb_listfiles</span><span>’. </span><a name="Example-72"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-file-list-exec-source-files</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,files=[{file="foo.c",fullname="/home/foo.c",debug-fully-read="true"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">             </span><span style="font-family:'Consolas'">{file="/home/bar.c",fullname="/home/bar.c",debug-fully-read="true"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">             </span><span style="font-family:'Consolas'">{file="gdb_could_not_find_fullpath.c",debug-fully-read="true"}]</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-file-list-exec-source-files</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,files=[{file="test.c",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="width:33.6pt; display:inline-block"> </span><span style="font-family:'Consolas'">fullname="/tmp/info-sources/test.c",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="width:33.6pt; display:inline-block"> </span><span style="font-family:'Consolas'">debug-fully-read="true"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">             </span><span style="font-family:'Consolas'">{file="/usr/include/stdc-predef.h",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="width:33.6pt; display:inline-block"> </span><span style="font-family:'Consolas'">fullname="/usr/include/stdc-predef.h",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="width:33.6pt; display:inline-block"> </span><span style="font-family:'Consolas'">debug-fully-read="true"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">             </span><span style="font-family:'Consolas'">{file="header.h",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="width:33.6pt; display:inline-block"> </span><span style="font-family:'Consolas'">fullname="/tmp/info-sources/header.h",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="width:33.6pt; display:inline-block"> </span><span style="font-family:'Consolas'">debug-fully-read="true"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">             </span><span style="font-family:'Consolas'">{file="helper.c",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="width:33.6pt; display:inline-block"> </span><span style="font-family:'Consolas'">fullname="/tmp/info-sources/helper.c",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="width:33.6pt; display:inline-block"> </span><span style="font-family:'Consolas'">debug-fully-read="true"}]</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-file-list-exec-source-files -- \\.c</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,files=[{file="test.c",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="width:33.6pt; display:inline-block"> </span><span style="font-family:'Consolas'">fullname="/tmp/info-sources/test.c",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="width:33.6pt; display:inline-block"> </span><span style="font-family:'Consolas'">debug-fully-read="true"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">             </span><span style="font-family:'Consolas'">{file="helper.c",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="width:33.6pt; display:inline-block"> </span><span style="font-family:'Consolas'">fullname="/tmp/info-sources/helper.c",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="width:33.6pt; display:inline-block"> </span><span style="font-family:'Consolas'">debug-fully-read="true"}]</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-file-list-exec-source-files --group-by-objfile</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,files=[{filename="/tmp/info-sources/test.x",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="width:33.6pt; display:inline-block"> </span><span style="font-family:'Consolas'">debug-info="fully-read",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="width:33.6pt; display:inline-block"> </span><span style="font-family:'Consolas'">sources=[{file="test.c",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                        </span><span style="font-family:'Consolas'">fullname="/tmp/info-sources/test.c",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                        </span><span style="font-family:'Consolas'">debug-fully-read="true"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                       </span><span style="font-family:'Consolas'">{file="/usr/include/stdc-predef.h",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                        </span><span style="font-family:'Consolas'">fullname="/usr/include/stdc-predef.h",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                        </span><span style="font-family:'Consolas'">debug-fully-read="true"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                       </span><span style="font-family:'Consolas'">{file="header.h",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                        </span><span style="font-family:'Consolas'">fullname="/tmp/info-sources/header.h",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                        </span><span style="font-family:'Consolas'">debug-fully-read="true"}]},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">             </span><span style="font-family:'Consolas'">{filename="/lib64/ld-linux-x86-64.so.2",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="width:33.6pt; display:inline-block"> </span><span style="font-family:'Consolas'">debug-info="none",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="width:33.6pt; display:inline-block"> </span><span style="font-family:'Consolas'">sources=[]},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">             </span><span style="font-family:'Consolas'">{filename="system-supplied DSO at 0x7ffff7fcf000",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="width:33.6pt; display:inline-block"> </span><span style="font-family:'Consolas'">debug-info="none",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="width:33.6pt; display:inline-block"> </span><span style="font-family:'Consolas'">sources=[]},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">             </span><span style="font-family:'Consolas'">{filename="/tmp/info-sources/libhelper.so",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="width:33.6pt; display:inline-block"> </span><span style="font-family:'Consolas'">debug-info="fully-read",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="width:33.6pt; display:inline-block"> </span><span style="font-family:'Consolas'">sources=[{file="helper.c",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                        </span><span style="font-family:'Consolas'">fullname="/tmp/info-sources/helper.c",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                        </span><span style="font-family:'Consolas'">debug-fully-read="true"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                       </span><span style="font-family:'Consolas'">{file="/usr/include/stdc-predef.h",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                        </span><span style="font-family:'Consolas'">fullname="/usr/include/stdc-predef.h",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                        </span><span style="font-family:'Consolas'">debug-fully-read="true"},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                       </span><span style="font-family:'Consolas'">{file="header.h",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                        </span><span style="font-family:'Consolas'">fullname="/tmp/info-sources/header.h",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                        </span><span style="font-family:'Consolas'">debug-fully-read="true"}]},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">             </span><span style="font-family:'Consolas'">{filename="/lib64/libc.so.6",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="width:33.6pt; display:inline-block"> </span><span style="font-family:'Consolas'">debug-info="none",</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="width:33.6pt; display:inline-block"> </span><span style="font-family:'Consolas'">sources=[]}]</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dfile_002dlist_002dshared_002dli"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-file-list-shared-libraries</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dfile_002dlist_002dshared_002d"></a><a name="Synopsis-91"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-file-list-shared-libraries [ </span><span style="font-family:'Consolas'; font-style:italic">regexp</span><span style="font-family:'Consolas'"> ]</span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>List the shared libraries in the program. With a regular expression </span><span style="font-style:italic">regexp</span><span>, only those libraries whose names match </span><span style="font-style:italic">regexp</span><span> are listed. </span><a name="GDB-Command-73"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">info shared</span><span>’. The fields have a similar meaning to the </span><span style="font-family:'Consolas'; font-size:10pt">=library-loaded</span><span> notification. The </span><span style="font-family:'Consolas'; font-size:10pt">ranges</span><span> field specifies the multiple segments belonging to this library. Each range has the following fields: </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">from</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The address defining the inclusive lower bound of the segment. </span></p><p class="p0"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">to</span><span>’</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The address defining the exclusive upper bound of the segment. </span><a name="Example-73"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-file-list-exec-source-files</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,shared-libraries=[</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{id="/lib/libfoo.so",target-name="/lib/libfoo.so",host-name="/lib/libfoo.so",symbols-loaded="1",thread-group="i1",ranges=[{from="0x72815989",to="0x728162c0"}]},</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{id="/lib/libbar.so",target-name="/lib/libbar.so",host-name="/lib/libbar.so",symbols-loaded="1",thread-group="i1",ranges=[{from="0x76ee48c0",to="0x76ee9160"}]}]</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dfile_002dsymbol_002dfile-Comman"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-file-symbol-file</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dfile_002dsymbol_002dfile"></a><a name="Synopsis-92"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-file-symbol-file </span><span style="font-family:'Consolas'; font-style:italic">file</span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Read symbol table info from the specified </span><span style="font-style:italic">file</span><span> argument. When used without arguments, clears </span><span style="font-size:10pt">GDB</span><span>’s symbol table info. No output is produced, except for a completion notification. </span><a name="GDB-Command-74"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">symbol-file</span><span>’. </span><a name="Example-74"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-file-symbol-file /kwikemart/marge/ezannoni/TRUNK/mbx/hello.mbx</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Next: </span><a href="GDB_002fMI-Target-Manipulation.html#GDB_002fMI-Target-Manipulation" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Target Manipulation</span></a><span>, Previous: </span><a href="GDB_002fMI-Symbol-Query.html#GDB_002fMI-Symbol-Query" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Symbol Query</span></a><span>, Up: </span><a href="GDB_002fMI.html#GDB_002fMI" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p></div><br style="page-break-before:always; clear:both; mso-break-type:section-break" /><div><p class="p0" style="margin-bottom:12pt"><a name="GDB_002fMI-File-Transfer-Commands"></a><span>Next: </span><a href="GDB_002fMI-Ada-Exceptions-Commands.html#GDB_002fMI-Ada-Exceptions-Commands" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Ada Exceptions Commands</span></a><span>, Previous: </span><a href="GDB_002fMI-Target-Manipulation.html#GDB_002fMI-Target-Manipulation" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Target Manipulation</span></a><span>, Up: </span><a href="GDB_002fMI.html#GDB_002fMI" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><h3 style="margin-top:14.05pt; margin-bottom:14.05pt; page-break-inside:auto; page-break-after:auto"><a name="GDB_002fMI-File-Transfer-Commands-1"></a><span style="font-family:'Times New Roman'; color:#000000">27.21 </span><span style="font-family:'Times New Roman'; font-size:11.5pt; color:#000000">GDB/MI</span><span style="font-family:'Times New Roman'; color:#000000"> File Transfer Commands</span><a name="The-_002dtarget_002dfile_002dput-Command"></a></h3><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-target-file-put</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dtarget_002dfile_002dput"></a><a name="Synopsis-99"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-target-file-put </span><span style="font-family:'Consolas'; font-style:italic">hostfile</span><span style="font-family:'Consolas'"> </span><span style="font-family:'Consolas'; font-style:italic">targetfile</span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Copy file </span><span style="font-style:italic">hostfile</span><span> from the host system (the machine running </span><span style="font-size:10pt">GDB</span><span>) to </span><span style="font-style:italic">targetfile</span><span> on the target system. </span><a name="GDB-Command-81"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">remote put</span><span>’. </span><a name="Example-81"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-target-file-put localfile remotefile</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dtarget_002dfile_002dget-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-target-file-get</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dtarget_002dfile_002dget"></a><a name="Synopsis-100"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-target-file-get </span><span style="font-family:'Consolas'; font-style:italic">targetfile</span><span style="font-family:'Consolas'"> </span><span style="font-family:'Consolas'; font-style:italic">hostfile</span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Copy file </span><span style="font-style:italic">targetfile</span><span> from the target system to </span><span style="font-style:italic">hostfile</span><span> on the host system. </span><a name="GDB-Command-82"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">remote get</span><span>’. </span><a name="Example-82"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-target-file-get remotefile localfile</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dtarget_002dfile_002ddelete-Comm"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-target-file-delete</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dtarget_002dfile_002ddelete"></a><a name="Synopsis-101"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-target-file-delete </span><span style="font-family:'Consolas'; font-style:italic">targetfile</span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Delete </span><span style="font-style:italic">targetfile</span><span> from the target system. </span><a name="GDB-Command-83"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">remote delete</span><span>’. </span><a name="Example-83"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample0" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-target-file-delete remotefile</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done</span></p><p class="presmallexample0" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p></div><br style="page-break-before:always; clear:both; mso-break-type:section-break" /><div><p class="p0" style="margin-bottom:12pt"><a name="GDB_002fMI-Frame-Information"></a><span>Next: </span><a href="GDB_002fMI-Thread-Information.html#GDB_002fMI-Thread-Information" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Thread Information</span></a><span>, Previous: </span><a href="GDB_002fMI-Breakpoint-Information.html#GDB_002fMI-Breakpoint-Information" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Breakpoint Information</span></a><span>, Up: </span><a href="GDB_002fMI-Output-Records.html#GDB_002fMI-Output-Records" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Output Records</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="GDB_002fMI-Frame-Information-1"></a><span style="font-family:'Times New Roman'; color:#000000">27.5.5 </span><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB/MI</span><span style="font-family:'Times New Roman'; color:#000000"> Frame Information</span></h4><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Response from many MI commands includes an information about stack frame. This information is a tuple that may have the following fields: </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">level</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The level of the stack frame. The innermost frame has the level of zero. This field is always present. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">func</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The name of the function corresponding to the frame. This field may be absent if </span><span style="font-size:10pt">GDB</span><span> is unable to determine the function name. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">addr</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The code address for the frame. This field is always present. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">addr_flags</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Optional field containing any flags related to the address. These flags are architecture-dependent; see </span><a href="Architectures.html#Architectures" style="text-decoration:none"><span style="text-decoration:underline">Architectures</span></a><span> for their meaning for a particular CPU. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">file</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The name of the source files that correspond to the frame’s code address. This field may be absent. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">line</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The source line corresponding to the frames’ code address. This field may be absent. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'">from</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The name of the binary file (either executable or shared library) the corresponds to the frame’s code address. This field may be absent. </span></p></div><br style="page-break-before:always; clear:both; mso-break-type:section-break" /><div><p class="p0" style="margin-bottom:12pt"><a name="GDB_002fMI-Input-Syntax"></a><span>Next: </span><a href="GDB_002fMI-Output-Syntax.html#GDB_002fMI-Output-Syntax" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Output Syntax</span></a><span>, Up: </span><a href="GDB_002fMI-Command-Syntax.html#GDB_002fMI-Command-Syntax" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Command Syntax</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="GDB_002fMI-Input-Syntax-1"></a><span style="font-family:'Times New Roman'; color:#000000">27.2.1 </span><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB/MI</span><span style="font-family:'Times New Roman'; color:#000000"> Input Syntax</span><a name="index-input-syntax-for-GDB_002fMI"></a><a name="index-GDB_002fMI_002c-input-syntax"></a></h4><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">command</span><span style="font-family:'Consolas'"> →</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt; font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">cli-command</span><span style="font-family:'Consolas'"> | </span><span style="font-family:'Consolas'; font-style:italic">mi-command</span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">cli-command</span><span style="font-family:'Consolas'"> →</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span style="font-family:'Consolas'; font-size:10pt">[ </span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">token</span><span style="font-family:'Consolas'; font-size:10pt"> ] </span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">cli-command</span><span style="font-family:'Consolas'; font-size:10pt"> </span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">nl</span><span>, where </span><span style="font-style:italic">cli-command</span><span> is any existing </span><span style="font-size:10pt">GDB</span><span> CLI command. </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">mi-command</span><span style="font-family:'Consolas'"> →</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt; font-size:10pt"><span style="font-family:'Consolas'">[ </span><span style="font-family:'Consolas'; font-style:italic">token</span><span style="font-family:'Consolas'"> ] "-" </span><span style="font-family:'Consolas'; font-style:italic">operation</span><span style="font-family:'Consolas'"> ( " " </span><span style="font-family:'Consolas'; font-style:italic">option</span><span style="font-family:'Consolas'"> )* [ " --" ] ( " " </span><span style="font-family:'Consolas'; font-style:italic">parameter</span><span style="font-family:'Consolas'"> )* </span><span style="font-family:'Consolas'; font-style:italic">nl</span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">token</span><span style="font-family:'Consolas'"> →</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>"any sequence of digits" </span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">option</span><span style="font-family:'Consolas'"> →</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt; font-size:10pt"><span style="font-family:'Consolas'">"-" </span><span style="font-family:'Consolas'; font-style:italic">parameter</span><span style="font-family:'Consolas'"> [ " " </span><span style="font-family:'Consolas'; font-style:italic">parameter</span><span style="font-family:'Consolas'"> ]</span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">parameter</span><span style="font-family:'Consolas'"> →</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt; font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">non-blank-sequence</span><span style="font-family:'Consolas'"> | </span><span style="font-family:'Consolas'; font-style:italic">c-string</span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">operation</span><span style="font-family:'Consolas'"> →</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span style="font-style:italic">any of the operations described in this chapter</span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">non-blank-sequence</span><span style="font-family:'Consolas'"> →</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span style="font-style:italic">anything, provided it doesn’t contain special characters such as "-", nl, """ and of course " "</span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">c-string</span><span style="font-family:'Consolas'"> →</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt; font-size:10pt"><span style="font-family:'Consolas'">""" </span><span style="font-family:'Consolas'; font-style:italic">seven-bit-iso-c-string-content</span><span style="font-family:'Consolas'"> """</span></p><p class="p0" style="font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">nl</span><span style="font-family:'Consolas'"> →</span></p><p class="p0" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt; font-size:10pt"><span style="font-family:'Consolas'">CR | CR-LF</span></p><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Notes: </span></p><ul type="disc" style="margin:0pt; padding-left:0pt"><li class="li0" style="margin-top:12pt; margin-left:36pt; font-family:serif; -aw-font-family:'Symbol'; -aw-font-weight:normal; -aw-number-format:''"><span style="font-family:'Times New Roman'">The CLI commands are still handled by the </span><span style="font-family:'Times New Roman'; font-size:10pt">MI</span><span style="font-family:'Times New Roman'"> interpreter; their output is described below. </span></li><li class="li0" style="margin-left:36pt; font-family:serif; -aw-font-family:'Symbol'; -aw-font-weight:normal; -aw-number-format:''"><span style="font-family:'Times New Roman'">The </span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">token</span><span style="font-family:'Times New Roman'">, when present, is passed back when the command finishes. </span></li><li class="li0" style="margin-left:36pt; margin-bottom:12pt; font-family:serif; -aw-font-family:'Symbol'; -aw-font-weight:normal; -aw-number-format:''"><span style="font-family:'Times New Roman'">Some </span><span style="font-family:'Times New Roman'; font-size:10pt">MI</span><span style="font-family:'Times New Roman'"> commands accept optional arguments as part of the parameter list. Each option is identified by a leading ‘</span><span style="font-family:'Consolas'; font-size:10pt">-</span><span style="font-family:'Times New Roman'">’ (dash) and may be followed by an optional argument parameter. Options occur first in the parameter list and can be delimited from normal parameters using ‘</span><span style="font-family:'Consolas'; font-size:10pt">--</span><span style="font-family:'Times New Roman'">’ (this is useful when some parameters begin with a dash). </span></li></ul><p class="p0" style="margin-top:12pt; margin-bottom:12pt"><span>Pragmatics: </span></p><ul type="disc" style="margin:0pt; padding-left:0pt"><li class="li0" style="margin-top:12pt; margin-left:36pt; font-family:serif; -aw-font-family:'Symbol'; -aw-font-weight:normal; -aw-number-format:''"><span style="font-family:'Times New Roman'">We want easy access to the existing CLI syntax (for debugging). </span></li><li class="li0" style="margin-left:36pt; margin-bottom:12pt; font-family:serif; -aw-font-family:'Symbol'; -aw-font-weight:normal; -aw-number-format:''"><span style="font-family:'Times New Roman'">We want it to be easy to spot a </span><span style="font-family:'Times New Roman'; font-size:10pt">MI</span><span style="font-family:'Times New Roman'"> operation. </span></li></ul></div><br style="page-break-before:always; clear:both; mso-break-type:section-break" /><div><p class="p" style="margin-bottom:12pt"><a name="GDB_002fMI-Miscellaneous-Commands"></a><span>Previous: </span><a href="GDB_002fMI-Support-Commands.html#GDB_002fMI-Support-Commands" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Support Commands</span></a><span>, Up: </span><a href="GDB_002fMI.html#GDB_002fMI" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><h3 style="margin-top:14.05pt; margin-bottom:14.05pt; page-break-inside:auto; page-break-after:auto"><a name="Miscellaneous-GDB_002fMI-Commands"></a><span style="font-family:'Times New Roman'; color:#000000">27.24 Miscellaneous </span><span style="font-family:'Times New Roman'; font-size:11.5pt; color:#000000">GDB/MI</span><span style="font-family:'Times New Roman'; color:#000000"> Commands</span><a name="The-_002dgdb_002dexit-Command"></a></h3><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-gdb-exit</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dgdb_002dexit"></a><a name="Synopsis-104"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-gdb-exit</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Exit </span><span style="font-size:10pt">GDB</span><span> immediately. </span><a name="GDB-Command-86"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Approximately corresponds to ‘</span><span style="font-family:'Consolas'; font-size:10pt">quit</span><span>’. </span><a name="Example-86"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-gdb-exit</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^exit</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dgdb_002dset-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-gdb-set</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dgdb_002dset"></a><a name="Synopsis-105"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-gdb-set</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Set an internal </span><span style="font-size:10pt">GDB</span><span> variable. </span><a name="GDB-Command-87"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">set</span><span>’. </span><a name="Example-87"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-gdb-set $foo=3</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dgdb_002dshow-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-gdb-show</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dgdb_002dshow"></a><a name="Synopsis-106"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-gdb-show</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Show the current value of a </span><span style="font-size:10pt">GDB</span><span> variable. </span><a name="GDB-Command-88"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">show</span><span>’. </span><a name="Example-88"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-gdb-show annotate</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,value="0"</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dgdb_002dversion-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-gdb-version</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dgdb_002dversion"></a><a name="Synopsis-107"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-gdb-version</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Show version information for </span><span style="font-size:10pt">GDB</span><span>. Used mostly in testing. </span><a name="GDB-Command-89"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The </span><span style="font-size:10pt">GDB</span><span> equivalent is ‘</span><span style="font-family:'Consolas'; font-size:10pt">show version</span><span>’. </span><span style="font-size:10pt">GDB</span><span> by default shows this information when you start an interactive session. </span><a name="Example-89"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-gdb-version</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">~GNU gdb 5.2.1</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">~Copyright 2000 Free Software Foundation, Inc.</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">~GDB is free software, covered by the GNU General Public License, and</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">~you are welcome to change it and/or distribute copies of it under</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">~ certain conditions.</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">~Type "show copying" to see the conditions.</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">~There is absolutely no warranty for GDB.</span><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">Type "show warranty" for</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">~ details.</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">~This GDB was configured as</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">"--host=sparc-sun-solaris2.5.1 --target=ppc-eabi".</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dlist_002dthread_002dgroups-Comm"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-list-thread-groups</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dlist_002dthread_002dgroups"></a><a name="Synopsis-108"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">-list-thread-groups [ --available ] [ --recurse 1 ] [ </span><span style="font-family:'Consolas'; font-style:italic">group</span><span style="font-family:'Consolas'"> ... ]</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Lists thread groups (see </span><a href="Thread-groups.html#Thread-groups" style="text-decoration:none"><span style="text-decoration:underline">Thread groups</span></a><span>). When a single thread group is passed as the argument, lists the children of that group. When several thread group are passed, lists information about those thread groups. Without any parameters, lists information about all top-level thread groups. </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Normally, thread groups that are being debugged are reported. With the ‘</span><span style="font-family:'Consolas'; font-size:10pt">--available</span><span>’ option, </span><span style="font-size:10pt">GDB</span><span> reports thread groups available on the target. </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The output of this command may have either a ‘</span><span style="font-family:'Consolas'; font-size:10pt">threads</span><span>’ result or a ‘</span><span style="font-family:'Consolas'; font-size:10pt">groups</span><span>’ result. The ‘</span><span style="font-family:'Consolas'; font-size:10pt">thread</span><span>’ result has a list of tuples as value, with each tuple describing a thread (see </span><a href="GDB_002fMI-Thread-Information.html#GDB_002fMI-Thread-Information" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Thread Information</span></a><span>). The ‘</span><span style="font-family:'Consolas'; font-size:10pt">groups</span><span>’ result has a list of tuples as value, each tuple describing a thread group. If top-level groups are requested (that is, no parameter is passed), or when several groups are passed, the output always has a ‘</span><span style="font-family:'Consolas'; font-size:10pt">groups</span><span>’ result. The format of the ‘</span><span style="font-family:'Consolas'; font-size:10pt">group</span><span>’ result is described below. </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>To reduce the number of roundtrips it’s possible to list thread groups together with their children, by passing the ‘</span><span style="font-family:'Consolas'; font-size:10pt">--recurse</span><span>’ option and the recursion depth. Presently, only recursion depth of 1 is permitted. If this option is present, then every reported thread group will also include its children, either as ‘</span><span style="font-family:'Consolas'; font-size:10pt">group</span><span>’ or ‘</span><span style="font-family:'Consolas'; font-size:10pt">threads</span><span>’ field. </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>In general, any combination of option and parameters is permitted, with the following caveats: </span></p><ul type="disc" style="margin:0pt; padding-left:0pt"><li class="li" style="margin-top:12pt; margin-left:36pt; font-family:serif; -aw-font-family:'Symbol'; -aw-font-weight:normal; -aw-number-format:''"><span style="font-family:'Times New Roman'">When a single thread group is passed, the output will typically be the ‘</span><span style="font-family:'Consolas'; font-size:10pt">threads</span><span style="font-family:'Times New Roman'">’ result. Because threads may not contain anything, the ‘</span><span style="font-family:'Consolas'; font-size:10pt">recurse</span><span style="font-family:'Times New Roman'">’ option will be ignored. </span></li><li class="li" style="margin-left:36pt; margin-bottom:12pt; font-family:serif; -aw-font-family:'Symbol'; -aw-font-weight:normal; -aw-number-format:''"><span style="font-family:'Times New Roman'">When the ‘</span><span style="font-family:'Consolas'; font-size:10pt">--available</span><span style="font-family:'Times New Roman'">’ option is passed, limited information may be available. In particular, the list of threads of a process might be inaccessible. Further, specifying specific thread groups might not give any performance advantage over listing all thread groups. The frontend should assume that ‘</span><span style="font-family:'Consolas'; font-size:10pt">-list-thread-groups --available</span><span style="font-family:'Times New Roman'">’ is always an expensive operation and cache the results. </span></li></ul><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The ‘</span><span style="font-family:'Consolas'; font-size:10pt">groups</span><span>’ result is a list of tuples, where each tuple may have the following fields: </span></p><p class="p" style="font-size:10pt"><span style="font-family:'Consolas'">id</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Identifier of the thread group. This field is always present. The identifier is an opaque string; frontends should not try to convert it to an integer, even though it might look like one. </span></p><p class="p" style="font-size:10pt"><span style="font-family:'Consolas'">type</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The type of the thread group. At present, only ‘</span><span style="font-family:'Consolas'; font-size:10pt">process</span><span>’ is a valid type. </span></p><p class="p" style="font-size:10pt"><span style="font-family:'Consolas'">pid</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The target-specific process identifier. This field is only present for thread groups of type ‘</span><span style="font-family:'Consolas'; font-size:10pt">process</span><span>’ and only if the process exists. </span></p><p class="p" style="font-size:10pt"><span style="font-family:'Consolas'">exit-code</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The exit code of this group’s last exited thread, formatted in octal. This field is only present for thread groups of type ‘</span><span style="font-family:'Consolas'; font-size:10pt">process</span><span>’ and only if the process is not running. </span></p><p class="p" style="font-size:10pt"><span style="font-family:'Consolas'">num_children</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The number of children this thread group has. This field may be absent for an available thread group. </span></p><p class="p" style="font-size:10pt"><span style="font-family:'Consolas'">threads</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>This field has a list of tuples as value, each tuple describing a thread. It may be present if the ‘</span><span style="font-family:'Consolas'; font-size:10pt">--recurse</span><span>’ option is specified, and it’s actually possible to obtain the threads. </span></p><p class="p" style="font-size:10pt"><span style="font-family:'Consolas'">cores</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>This field is a list of integers, each identifying a core that one thread of the group is running on. This field may be absent if such information is not available. </span></p><p class="p" style="font-size:10pt"><span style="font-family:'Consolas'">executable</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The name of the executable file that corresponds to this thread group. The field is only present for thread groups of type ‘</span><span style="font-family:'Consolas'; font-size:10pt">process</span><span>’, and only if there is a corresponding executable file. </span><a name="Example-90"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-list-thread-groups</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,groups=[{id="17",type="process",pid="yyy",num_children="2"}]</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-list-thread-groups 17</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,threads=[{id="2",target-id="Thread 0xb7e14b90 (LWP 21257)",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">   </span><span style="font-family:'Consolas'">frame={level="0",addr="0xffffe410",func="__kernel_vsyscall",args=[]},state="running"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{id="1",target-id="Thread 0xb7e156b0 (LWP 21254)",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">   </span><span style="font-family:'Consolas'">frame={level="0",addr="0x0804891f",func="foo",args=[{name="i",value="10"}],</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">           </span><span style="font-family:'Consolas'">file="/tmp/a.c",fullname="/tmp/a.c",line="158",arch="i386:x86_64"},state="running"}]]</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-list-thread-groups --available</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,groups=[{id="17",type="process",pid="yyy",num_children="2",cores=[1,2]}]</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-list-thread-groups --available --recurse 1</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">^done,groups=[{id="17", types="process",pid="yyy",num_children="2",cores=[1,2],</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                </span><span style="font-family:'Consolas'">threads=[{id="1",target-id="Thread 0xb7e14b90",cores=[1]},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                         </span><span style="font-family:'Consolas'">{id="2",target-id="Thread 0xb7e14b90",cores=[2]}]},..]</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-list-thread-groups --available --recurse 1 17 18</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,groups=[{id="17", types="process",pid="yyy",num_children="2",cores=[1,2],</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">               </span><span style="font-family:'Consolas'">threads=[{id="1",target-id="Thread 0xb7e14b90",cores=[1]},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                        </span><span style="font-family:'Consolas'">{id="2",target-id="Thread 0xb7e14b90",cores=[2]}]},...]</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dinfo_002dos-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-info-os</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dinfo_002dos"></a><a name="Synopsis-109"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">-info-os [ </span><span style="font-family:'Consolas'; font-style:italic">type</span><span style="font-family:'Consolas'"> ]</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>If no argument is supplied, the command returns a table of available operating-system-specific information types. If one of these types is supplied as an argument </span><span style="font-style:italic">type</span><span>, then the command returns a table of data of that type. </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The types of information available depend on the target operating system. </span><a name="GDB-Command-90"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">info os</span><span>’. </span><a name="Example-91"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>When run on a </span><span style="font-size:10pt">GNU</span><span>/Linux system, the output will look something like this: </span></p><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-info-os</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,OSDataTable={nr_rows="10",nr_cols="3",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">hdr=[{width="10",alignment="-1",col_name="col0",colhdr="Type"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">     </span><span style="font-family:'Consolas'">{width="10",alignment="-1",col_name="col1",colhdr="Description"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">     </span><span style="font-family:'Consolas'">{width="10",alignment="-1",col_name="col2",colhdr="Title"}],</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">body=[item={col0="cpus",col1="Listing of all cpus/cores on the system",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">            </span><span style="font-family:'Consolas'">col2="CPUs"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">item={col0="files",col1="Listing of all file descriptors",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">            </span><span style="font-family:'Consolas'">col2="File descriptors"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">item={col0="modules",col1="Listing of all loaded kernel modules",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">            </span><span style="font-family:'Consolas'">col2="Kernel modules"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">item={col0="msg",col1="Listing of all message queues",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">            </span><span style="font-family:'Consolas'">col2="Message queues"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">item={col0="processes",col1="Listing of all processes",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">            </span><span style="font-family:'Consolas'">col2="Processes"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">item={col0="procgroups",col1="Listing of all process groups",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">            </span><span style="font-family:'Consolas'">col2="Process groups"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">item={col0="semaphores",col1="Listing of all semaphores",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">            </span><span style="font-family:'Consolas'">col2="Semaphores"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">item={col0="shm",col1="Listing of all shared-memory regions",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">            </span><span style="font-family:'Consolas'">col2="Shared-memory regions"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">item={col0="sockets",col1="Listing of all internet-domain sockets",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">            </span><span style="font-family:'Consolas'">col2="Sockets"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">item={col0="threads",col1="Listing of all threads",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">            </span><span style="font-family:'Consolas'">col2="Threads"}]</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-info-os processes</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,OSDataTable={nr_rows="190",nr_cols="4",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">hdr=[{width="10",alignment="-1",col_name="col0",colhdr="pid"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">     </span><span style="font-family:'Consolas'">{width="10",alignment="-1",col_name="col1",colhdr="user"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">     </span><span style="font-family:'Consolas'">{width="10",alignment="-1",col_name="col2",colhdr="command"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">     </span><span style="font-family:'Consolas'">{width="10",alignment="-1",col_name="col3",colhdr="cores"}],</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">body=[item={col0="1",col1="root",col2="/sbin/init",col3="0"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">item={col0="2",col1="root",col2="[kthreadd]",col3="1"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">item={col0="3",col1="root",col2="[ksoftirqd/0]",col3="0"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">...</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">item={col0="26446",col1="stan",col2="bash",col3="0"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">item={col0="28152",col1="stan",col2="bash",col3="1"}]}</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>(Note that the MI output here includes a </span><span style="font-family:'Consolas'; font-size:10pt">"Title"</span><span> column that does not appear in command-line </span><span style="font-family:'Consolas'; font-size:10pt">info os</span><span>; this column is useful for MI clients that want to enumerate the types of data, such as in a popup menu, but is needless clutter on the command line, and </span><span style="font-family:'Consolas'; font-size:10pt">info os</span><span> omits it.) </span><a name="The-_002dadd_002dinferior-Command"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-add-inferior</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dadd_002dinferior"></a><a name="Synopsis-110"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">-add-inferior</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Creates a new inferior (see </span><a href="Inferiors-Connections-and-Programs.html#Inferiors-Connections-and-Programs" style="text-decoration:none"><span style="text-decoration:underline">Inferiors Connections and Programs</span></a><span>). The created inferior is not associated with any executable. Such association may be established with the ‘</span><span style="font-family:'Consolas'; font-size:10pt">-file-exec-and-symbols</span><span>’ command (see </span><a href="GDB_002fMI-File-Commands.html#GDB_002fMI-File-Commands" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI File Commands</span></a><span>). The command response has a single field, ‘</span><span style="font-family:'Consolas'; font-size:10pt">inferior</span><span>’, whose value is the identifier of the thread group corresponding to the new inferior. </span><a name="Example-92"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-add-inferior</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,inferior="i3"</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dinterpreter_002dexec-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-interpreter-exec</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dinterpreter_002dexec"></a><a name="Synopsis-111"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">-interpreter-exec </span><span style="font-family:'Consolas'; font-style:italic">interpreter</span><span style="font-family:'Consolas'"> </span><span style="font-family:'Consolas'; font-style:italic">command</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><a name="g_t_002dinterpreter_002dexec"></a><span>Execute the specified </span><span style="font-style:italic">command</span><span> in the given </span><span style="font-style:italic">interpreter</span><span>. </span><a name="GDB-Command-91"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">interpreter-exec</span><span>’. </span><a name="Example-93"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-interpreter-exec console "break main"</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">&"During symbol reading, couldn't parse type; debugger out of date?.\n"</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">&"During symbol reading, bad structure-type format.\n"</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">~"Breakpoint 1 at 0x8074fc6: file ../../src/gdb/main.c, line 743.\n"</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dinferior_002dtty_002dset-Comman"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-inferior-tty-set</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dinferior_002dtty_002dset"></a><a name="Synopsis-112"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">-inferior-tty-set /dev/pts/1</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Set terminal for future runs of the program being debugged. </span><a name="GDB-Command-92"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">set inferior-tty</span><span>’ /dev/pts/1. </span><a name="Example-94"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-inferior-tty-set /dev/pts/1</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dinferior_002dtty_002dshow-Comma"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-inferior-tty-show</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dinferior_002dtty_002dshow"></a><a name="Synopsis-113"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">-inferior-tty-show</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Show terminal for future runs of program being debugged. </span><a name="GDB-Command-93"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">show inferior-tty</span><span>’. </span><a name="Example-95"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-inferior-tty-set /dev/pts/1</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-inferior-tty-show</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,inferior_tty_terminal="/dev/pts/1"</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002denable_002dtimings-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-enable-timings</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002denable_002dtimings"></a><a name="Synopsis-114"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">-enable-timings [yes | no]</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Toggle the printing of the wallclock, user and system times for an MI command as a field in its output. This command is to help frontend developers optimize the performance of their code. No argument is equivalent to ‘</span><span style="font-family:'Consolas'; font-size:10pt">yes</span><span>’. </span><a name="GDB-Command-94"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>No equivalent. </span><a name="Example-96"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-enable-timings</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-break-insert main</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">addr="0x080484ed",func="main",file="myprog.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">fullname="/home/nickrob/myprog.c",line="73",thread-groups=["i1"],</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">times="0"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">time={wallclock="0.05185",user="0.00800",system="0.00000"}</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-enable-timings no</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-exec-run</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^running</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">*stopped,reason="breakpoint-hit",disp="keep",bkptno="1",thread-id="0",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">frame={addr="0x080484ed",func="main",args=[{name="argc",value="1"},</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{name="argv",value="0xbfb60364"}],file="myprog.c",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">fullname="/home/nickrob/myprog.c",line="73",arch="i386:x86_64"}</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dcomplete-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-complete</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dcomplete"></a><a name="Synopsis-115"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">-complete </span><span style="font-family:'Consolas'; font-style:italic">command</span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Show a list of completions for partially typed CLI </span><span style="font-style:italic">command</span><span>. </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>This command is intended for </span><span style="font-size:10pt">GDB/MI</span><span> frontends that cannot use two separate CLI and MI channels — for example: because of lack of PTYs like on Windows or because </span><span style="font-size:10pt">GDB</span><span> is used remotely via a SSH connection. </span><a name="Result-9"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Result</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The result consists of two or three fields: </span></p><p class="p"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">completion</span><span>’</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>This field contains the completed </span><span style="font-style:italic">command</span><span>. If </span><span style="font-style:italic">command</span><span> has no known completions, this field is omitted. </span></p><p class="p"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">matches</span><span>’</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>This field contains a (possibly empty) array of matches. It is always present. </span></p><p class="p"><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">max_completions_reached</span><span>’</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>This field contains </span><span style="font-family:'Consolas'; font-size:10pt">1</span><span> if number of known completions is above </span><span style="font-family:'Consolas'; font-size:10pt">max-completions</span><span> limit (see </span><a href="Completion.html#Completion" style="text-decoration:none"><span style="text-decoration:underline">Completion</span></a><span>), otherwise it contains </span><span style="font-family:'Consolas'; font-size:10pt">0</span><span>. It is always present. </span><a name="GDB-Command-95"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">complete</span><span>’. </span><a name="Example-97"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-complete br</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,completion="break",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">matches=["break","break-range"],</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">max_completions_reached="0"</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-complete "b ma"</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,completion="b ma",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">matches=["b madvise","b main"],max_completions_reached="0"</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-complete "b push_b"</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,completion="b push_back(",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">matches=[</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">       </span><span style="font-family:'Consolas'">"b A::push_back(void*)",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">       </span><span style="font-family:'Consolas'">"b std::string::push_back(char)",</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">       </span><span style="font-family:'Consolas'">"b std::vector<int, std::allocator<int> >::push_back(int&&)"],</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">max_completions_reached="0"</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-complete "nonexist"</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,matches=[],max_completions_reached="0"</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:ignore"> </span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Previous: </span><a href="GDB_002fMI-Support-Commands.html#GDB_002fMI-Support-Commands" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Support Commands</span></a><span>, Up: </span><a href="GDB_002fMI.html#GDB_002fMI" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p></div><br style="page-break-before:always; clear:both; mso-break-type:section-break" /><div><p class="p" style="margin-bottom:12pt"><a name="GDB_002fMI-Output-Syntax"></a><span>Previous: </span><a href="GDB_002fMI-Input-Syntax.html#GDB_002fMI-Input-Syntax" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Input Syntax</span></a><span>, Up: </span><a href="GDB_002fMI-Command-Syntax.html#GDB_002fMI-Command-Syntax" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Command Syntax</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="GDB_002fMI-Output-Syntax-1"></a><span style="font-family:'Times New Roman'; color:#000000">27.2.2 </span><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB/MI</span><span style="font-family:'Times New Roman'; color:#000000"> Output Syntax</span><a name="index-output-syntax-of-GDB_002fMI"></a><a name="index-GDB_002fMI_002c-output-syntax"></a></h4><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>The output from </span><span style="font-size:10pt">GDB/MI</span><span> consists of zero or more out-of-band records followed, optionally, by a single result record. This result record is for the most recent command. The sequence of output records is terminated by ‘</span><span style="font-family:'Consolas'; font-size:10pt">(gdb)</span><span>’. </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>If an input command was prefixed with a </span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">token</span><span> then the corresponding output for that command will also be prefixed by that same </span><span style="font-style:italic">token</span><span>. </span></p><p class="p" style="font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">output</span><span style="font-family:'Consolas'"> →</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt; font-size:10pt"><span style="font-family:'Consolas'">( </span><span style="font-family:'Consolas'; font-style:italic">out-of-band-record</span><span style="font-family:'Consolas'"> )* [ </span><span style="font-family:'Consolas'; font-style:italic">result-record</span><span style="font-family:'Consolas'"> ] "(gdb)" </span><span style="font-family:'Consolas'; font-style:italic">nl</span></p><p class="p" style="font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">result-record</span><span style="font-family:'Consolas'"> →</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt; font-size:10pt"><span style="font-family:'Consolas'">[ </span><span style="font-family:'Consolas'; font-style:italic">token</span><span style="font-family:'Consolas'"> ] "^" </span><span style="font-family:'Consolas'; font-style:italic">result-class</span><span style="font-family:'Consolas'"> ( "," </span><span style="font-family:'Consolas'; font-style:italic">result</span><span style="font-family:'Consolas'"> )* </span><span style="font-family:'Consolas'; font-style:italic">nl</span></p><p class="p" style="font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">out-of-band-record</span><span style="font-family:'Consolas'"> →</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt; font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">async-record</span><span style="font-family:'Consolas'"> | </span><span style="font-family:'Consolas'; font-style:italic">stream-record</span></p><p class="p" style="font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">async-record</span><span style="font-family:'Consolas'"> →</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt; font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">exec-async-output</span><span style="font-family:'Consolas'"> | </span><span style="font-family:'Consolas'; font-style:italic">status-async-output</span><span style="font-family:'Consolas'"> | </span><span style="font-family:'Consolas'; font-style:italic">notify-async-output</span></p><p class="p" style="font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">exec-async-output</span><span style="font-family:'Consolas'"> →</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt; font-size:10pt"><span style="font-family:'Consolas'">[ </span><span style="font-family:'Consolas'; font-style:italic">token</span><span style="font-family:'Consolas'"> ] "*" </span><span style="font-family:'Consolas'; font-style:italic">async-output nl</span></p><p class="p" style="font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">status-async-output</span><span style="font-family:'Consolas'"> →</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt; font-size:10pt"><span style="font-family:'Consolas'">[ </span><span style="font-family:'Consolas'; font-style:italic">token</span><span style="font-family:'Consolas'"> ] "+" </span><span style="font-family:'Consolas'; font-style:italic">async-output nl</span></p><p class="p" style="font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">notify-async-output</span><span style="font-family:'Consolas'"> →</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt; font-size:10pt"><span style="font-family:'Consolas'">[ </span><span style="font-family:'Consolas'; font-style:italic">token</span><span style="font-family:'Consolas'"> ] "=" </span><span style="font-family:'Consolas'; font-style:italic">async-output nl</span></p><p class="p" style="font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">async-output</span><span style="font-family:'Consolas'"> →</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt; font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">async-class</span><span style="font-family:'Consolas'"> ( "," </span><span style="font-family:'Consolas'; font-style:italic">result</span><span style="font-family:'Consolas'"> )*</span></p><p class="p" style="font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">result-class</span><span style="font-family:'Consolas'"> →</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt; font-size:10pt"><span style="font-family:'Consolas'">"done" | "running" | "connected" | "error" | "exit"</span></p><p class="p" style="font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">async-class</span><span style="font-family:'Consolas'"> →</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span style="font-family:'Consolas'; font-size:10pt">"stopped" | </span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">others</span><span> (where </span><span style="font-style:italic">others</span><span> will be added depending on the needs—this is still in development). </span></p><p class="p" style="font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">result</span><span style="font-family:'Consolas'"> →</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt; font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">variable</span><span style="font-family:'Consolas'"> "=" </span><span style="font-family:'Consolas'; font-style:italic">value</span></p><p class="p" style="font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">variable</span><span style="font-family:'Consolas'"> →</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt; font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">string</span><span style="font-family:'Consolas'"> </span></p><p class="p" style="font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">value</span><span style="font-family:'Consolas'"> →</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt; font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">const</span><span style="font-family:'Consolas'"> | </span><span style="font-family:'Consolas'; font-style:italic">tuple</span><span style="font-family:'Consolas'"> | </span><span style="font-family:'Consolas'; font-style:italic">list</span><span style="font-family:'Consolas'"> </span></p><p class="p" style="font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">const</span><span style="font-family:'Consolas'"> →</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt; font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">c-string</span></p><p class="p" style="font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">tuple</span><span style="font-family:'Consolas'"> →</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt; font-size:10pt"><span style="font-family:'Consolas'">"{}" | "{" </span><span style="font-family:'Consolas'; font-style:italic">result</span><span style="font-family:'Consolas'"> ( "," </span><span style="font-family:'Consolas'; font-style:italic">result</span><span style="font-family:'Consolas'"> )* "}" </span></p><p class="p" style="font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">list</span><span style="font-family:'Consolas'"> →</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt; font-size:10pt"><span style="font-family:'Consolas'">"[]" | "[" </span><span style="font-family:'Consolas'; font-style:italic">value</span><span style="font-family:'Consolas'"> ( "," </span><span style="font-family:'Consolas'; font-style:italic">value</span><span style="font-family:'Consolas'"> )* "]" | "[" </span><span style="font-family:'Consolas'; font-style:italic">result</span><span style="font-family:'Consolas'"> ( "," </span><span style="font-family:'Consolas'; font-style:italic">result</span><span style="font-family:'Consolas'"> )* "]" </span></p><p class="p" style="font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">stream-record</span><span style="font-family:'Consolas'"> →</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt; font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">console-stream-output</span><span style="font-family:'Consolas'"> | </span><span style="font-family:'Consolas'; font-style:italic">target-stream-output</span><span style="font-family:'Consolas'"> | </span><span style="font-family:'Consolas'; font-style:italic">log-stream-output</span></p><p class="p" style="font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">console-stream-output</span><span style="font-family:'Consolas'"> →</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt; font-size:10pt"><span style="font-family:'Consolas'">"~" </span><span style="font-family:'Consolas'; font-style:italic">c-string nl</span></p><p class="p" style="font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">target-stream-output</span><span style="font-family:'Consolas'"> →</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt; font-size:10pt"><span style="font-family:'Consolas'">"@" </span><span style="font-family:'Consolas'; font-style:italic">c-string nl</span></p><p class="p" style="font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">log-stream-output</span><span style="font-family:'Consolas'"> →</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt; font-size:10pt"><span style="font-family:'Consolas'">"&" </span><span style="font-family:'Consolas'; font-style:italic">c-string nl</span></p><p class="p" style="font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">nl</span><span style="font-family:'Consolas'"> →</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt; font-size:10pt"><span style="font-family:'Consolas'">CR | CR-LF</span></p><p class="p" style="font-size:10pt"><span style="font-family:'Consolas'; font-style:italic">token</span><span style="font-family:'Consolas'"> →</span></p><p class="p" style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span style="font-style:italic">any sequence of digits</span><span>. </span></p><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Notes: </span></p><ul type="disc" style="margin:0pt; padding-left:0pt"><li class="li" style="margin-top:12pt; margin-left:36pt; font-family:serif; -aw-font-family:'Symbol'; -aw-font-weight:normal; -aw-number-format:''"><span style="font-family:'Times New Roman'">All output sequences end in a single line containing a period. </span></li><li class="li" style="margin-left:36pt; font-family:serif; -aw-font-family:'Symbol'; -aw-font-weight:normal; -aw-number-format:''"><span style="font-family:'Times New Roman'">The </span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">token</span><span style="font-family:'Times New Roman'"> is from the corresponding request. Note that for all async output, while the token is allowed by the grammar and may be output by future versions of </span><span style="font-family:'Times New Roman'; font-size:10pt">GDB</span><span style="font-family:'Times New Roman'"> for select async output messages, it is generally omitted. Frontends should treat all async output as reporting general changes in the state of the target and there should be no need to associate async output to any prior command. </span></li><li class="li" style="margin-left:36pt; font-family:serif; -aw-font-family:'Symbol'; -aw-font-weight:normal; -aw-number-format:''"><a name="index-status-output-in-GDB_002fMI"></a><span style="font-family:'Times New Roman'; font-style:italic">status-async-output</span><span style="font-family:'Times New Roman'"> contains on-going status information about the progress of a slow operation. It can be discarded. All status output is prefixed by ‘</span><span style="font-family:'Consolas'; font-size:10pt">+</span><span style="font-family:'Times New Roman'">’. </span></li><li class="li" style="margin-left:36pt; font-family:serif; -aw-font-family:'Symbol'; -aw-font-weight:normal; -aw-number-format:''"><a name="index-async-output-in-GDB_002fMI"></a><span style="font-family:'Times New Roman'; font-style:italic">exec-async-output</span><span style="font-family:'Times New Roman'"> contains asynchronous state change on the target (stopped, started, disappeared). All async output is prefixed by ‘</span><span style="font-family:'Consolas'; font-size:10pt">*</span><span style="font-family:'Times New Roman'">’. </span></li><li class="li" style="margin-left:36pt; font-family:serif; -aw-font-family:'Symbol'; -aw-font-weight:normal; -aw-number-format:''"><a name="index-notify-output-in-GDB_002fMI"></a><span style="font-family:'Times New Roman'; font-style:italic">notify-async-output</span><span style="font-family:'Times New Roman'"> contains supplementary information that the client should handle (e.g., a new breakpoint information). All notify output is prefixed by ‘</span><span style="font-family:'Consolas'; font-size:10pt">=</span><span style="font-family:'Times New Roman'">’. </span></li><li class="li" style="margin-left:36pt; font-family:serif; -aw-font-family:'Symbol'; -aw-font-weight:normal; -aw-number-format:''"><a name="index-console-output-in-GDB_002fMI"></a><span style="font-family:'Times New Roman'; font-style:italic">console-stream-output</span><span style="font-family:'Times New Roman'"> is output that should be displayed as is in the console. It is the textual response to a CLI command. All the console output is prefixed by ‘</span><span style="font-family:'Consolas'; font-size:10pt">~</span><span style="font-family:'Times New Roman'">’. </span></li><li class="li" style="margin-left:36pt; font-family:serif; -aw-font-family:'Symbol'; -aw-font-weight:normal; -aw-number-format:''"><a name="index-target-output-in-GDB_002fMI"></a><span style="font-family:'Times New Roman'; font-style:italic">target-stream-output</span><span style="font-family:'Times New Roman'"> is the output produced by the target program. All the target output is prefixed by ‘</span><span style="font-family:'Consolas'; font-size:10pt">@</span><span style="font-family:'Times New Roman'">’. </span></li><li class="li" style="margin-left:36pt; font-family:serif; -aw-font-family:'Symbol'; -aw-font-weight:normal; -aw-number-format:''"><a name="index-log-output-in-GDB_002fMI"></a><span style="font-family:'Times New Roman'; font-style:italic">log-stream-output</span><span style="font-family:'Times New Roman'"> is output text coming from </span><span style="font-family:'Times New Roman'; font-size:10pt">GDB</span><span style="font-family:'Times New Roman'">’s internals, for instance messages that should be displayed as part of an error log. All the log output is prefixed by ‘</span><span style="font-family:'Consolas'; font-size:10pt">&</span><span style="font-family:'Times New Roman'">’. </span></li><li class="li" style="margin-left:36pt; margin-bottom:12pt; font-family:serif; -aw-font-family:'Symbol'; -aw-font-weight:normal; -aw-number-format:''"><a name="index-list-output-in-GDB_002fMI"></a><span style="font-family:'Times New Roman'">New </span><span style="font-family:'Times New Roman'; font-size:10pt">GDB/MI</span><span style="font-family:'Times New Roman'"> commands should only output </span><span style="font-family:'Times New Roman'; font-style:italic">lists</span><span style="font-family:'Times New Roman'"> containing </span><span style="font-family:'Times New Roman'; font-style:italic">values</span><span style="font-family:'Times New Roman'">. </span></li></ul><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>See </span><a href="GDB_002fMI-Stream-Records.html#GDB_002fMI-Stream-Records" style="text-decoration:none"><span style="font-size:10pt; text-decoration:underline">GDB/MI</span><span style="text-decoration:underline"> Stream Records</span></a><span>, for more details about the various output records. </span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><p class="p" style="margin-top:12pt; margin-bottom:12pt"><span>Previous: </span><a href="GDB_002fMI-Input-Syntax.html#GDB_002fMI-Input-Syntax" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Input Syntax</span></a><span>, Up: </span><a href="GDB_002fMI-Command-Syntax.html#GDB_002fMI-Command-Syntax" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Command Syntax</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p></div><br style="page-break-before:always; clear:both; mso-break-type:section-break" /><div><p style="margin-bottom:12pt"><a name="GDB_002fMI-Target-Manipulation"></a><span>Next: </span><a href="GDB_002fMI-File-Transfer-Commands.html#GDB_002fMI-File-Transfer-Commands" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI File Transfer Commands</span></a><span>, Previous: </span><a href="GDB_002fMI-File-Commands.html#GDB_002fMI-File-Commands" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI File Commands</span></a><span>, Up: </span><a href="GDB_002fMI.html#GDB_002fMI" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><p><a name="GDB_002fMI-Target-Manipulation-Commands"></a></p><h3 style="margin-top:14.05pt; margin-bottom:14.05pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">27.20 </span><span style="font-family:'Times New Roman'; font-size:11.5pt; color:#000000">GDB/MI</span><span style="font-family:'Times New Roman'; color:#000000"> Target Manipulation Commands</span><a name="The-_002dtarget_002dattach-Command"></a></h3><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-target-attach</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dtarget_002dattach"></a><a name="Synopsis-93"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-target-attach </span><span style="font-family:'Consolas'; font-style:italic">pid</span><span style="font-family:'Consolas'"> | </span><span style="font-family:'Consolas'; font-style:italic">gid</span><span style="font-family:'Consolas'"> | </span><span style="font-family:'Consolas'; font-style:italic">file</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Attach to a process </span><span style="font-style:italic">pid</span><span> or a file </span><span style="font-style:italic">file</span><span> outside of </span><span style="font-size:10pt">GDB</span><span>, or a thread group </span><span style="font-style:italic">gid</span><span>. If attaching to a thread group, the id previously returned by ‘</span><span style="font-family:'Consolas'; font-size:10pt">-list-thread-groups --available</span><span>’ must be used. </span><a name="GDB-Command-75"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">attach</span><span>’. </span><a name="Example-75"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-target-attach 34</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">=thread-created,id="1"</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">*stopped,thread-id="1",frame={addr="0xb7f7e410",func="bar",args=[]}</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dtarget_002ddetach-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-target-detach</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dtarget_002ddetach"></a><a name="Synopsis-94"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-target-detach [ </span><span style="font-family:'Consolas'; font-style:italic">pid</span><span style="font-family:'Consolas'"> | </span><span style="font-family:'Consolas'; font-style:italic">gid</span><span style="font-family:'Consolas'"> ]</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Detach from the remote target which normally resumes its execution. If either </span><span style="font-style:italic">pid</span><span> or </span><span style="font-style:italic">gid</span><span> is specified, detaches from either the specified process, or specified thread group. There’s no output. </span><a name="GDB-Command-76"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">detach</span><span>’. </span><a name="Example-76"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-target-detach</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dtarget_002ddisconnect-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-target-disconnect</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dtarget_002ddisconnect"></a><a name="Synopsis-95"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-target-disconnect</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Disconnect from the remote target. There’s no output and the target is generally not resumed. </span><a name="GDB-Command-77"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">disconnect</span><span>’. </span><a name="Example-77"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-target-disconnect</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dtarget_002ddownload-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-target-download</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dtarget_002ddownload"></a><a name="Synopsis-96"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-target-download</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Loads the executable onto the remote target. It prints out an update message every half second, which includes the fields: </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">section</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The name of the section. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">section-sent</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The size of what has been sent so far for that section. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">section-size</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The size of the section. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">total-sent</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The total size of what was sent so far (the current and the previous sections). </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">total-size</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The size of the overall executable to download. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Each message is sent as status record (see </span><a href="GDB_002fMI-Output-Syntax.html#GDB_002fMI-Output-Syntax" style="text-decoration:none"><span style="font-size:10pt; text-decoration:underline">GDB/MI</span><span style="text-decoration:underline"> Output Syntax</span></a><span>). </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>In addition, it prints the name and size of the sections, as they are downloaded. These messages include the following fields: </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">section</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The name of the section. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">section-size</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The size of the section. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">total-size</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The size of the overall executable to download. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>At the end, a summary is printed. </span><a name="GDB-Command-78"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">load</span><span>’. </span><a name="Example-78"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p style="margin-top:12pt; margin-bottom:12pt"><span>Note: each status message appears on a single line. Here the messages have been broken down so that they can fit onto a page. </span></p><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-target-download</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">+download,{section=".text",section-size="6668",total-size="9880"}</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">+download,{section=".text",section-sent="512",section-size="6668",</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">total-sent="512",total-size="9880"}</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">+download,{section=".text",section-sent="1024",section-size="6668",</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">total-sent="1024",total-size="9880"}</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">+download,{section=".text",section-sent="1536",section-size="6668",</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">total-sent="1536",total-size="9880"}</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">+download,{section=".text",section-sent="2048",section-size="6668",</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">total-sent="2048",total-size="9880"}</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">+download,{section=".text",section-sent="2560",section-size="6668",</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">total-sent="2560",total-size="9880"}</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">+download,{section=".text",section-sent="3072",section-size="6668",</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">total-sent="3072",total-size="9880"}</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">+download,{section=".text",section-sent="3584",section-size="6668",</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">total-sent="3584",total-size="9880"}</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">+download,{section=".text",section-sent="4096",section-size="6668",</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">total-sent="4096",total-size="9880"}</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">+download,{section=".text",section-sent="4608",section-size="6668",</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">total-sent="4608",total-size="9880"}</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">+download,{section=".text",section-sent="5120",section-size="6668",</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">total-sent="5120",total-size="9880"}</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">+download,{section=".text",section-sent="5632",section-size="6668",</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">total-sent="5632",total-size="9880"}</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">+download,{section=".text",section-sent="6144",section-size="6668",</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">total-sent="6144",total-size="9880"}</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">+download,{section=".text",section-sent="6656",section-size="6668",</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">total-sent="6656",total-size="9880"}</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">+download,{section=".init",section-size="28",total-size="9880"}</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">+download,{section=".fini",section-size="28",total-size="9880"}</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">+download,{section=".data",section-size="3156",total-size="9880"}</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">+download,{section=".data",section-sent="512",section-size="3156",</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">total-sent="7236",total-size="9880"}</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">+download,{section=".data",section-sent="1024",section-size="3156",</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">total-sent="7748",total-size="9880"}</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">+download,{section=".data",section-sent="1536",section-size="3156",</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">total-sent="8260",total-size="9880"}</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">+download,{section=".data",section-sent="2048",section-size="3156",</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">total-sent="8772",total-size="9880"}</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">+download,{section=".data",section-sent="2560",section-size="3156",</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">total-sent="9284",total-size="9880"}</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">+download,{section=".data",section-sent="3072",section-size="3156",</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">total-sent="9796",total-size="9880"}</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,address="0x10004",load-size="9880",transfer-rate="6586",</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">write-rate="429"</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="GDB-Command-79"></a><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p style="margin-top:12pt; margin-bottom:12pt"><span>No equivalent. </span><a name="Example-79"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p style="margin-top:12pt; margin-bottom:12pt"><span>N.A. </span><a name="The-_002dtarget_002dflash_002derase-Comm"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-target-flash-erase</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dtarget_002dflash_002derase"></a><a name="Synopsis-97"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-target-flash-erase</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Erases all known flash memory regions on the target. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">flash-erase</span><span>’. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>The output is a list of flash regions that have been erased, with starting addresses and memory region sizes. </span></p><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-target-flash-erase</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,erased-regions={address="0x0",size="0x40000"}</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dtarget_002dselect-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-target-select</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dtarget_002dselect"></a><a name="Synopsis-98"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-target-select </span><span style="font-family:'Consolas'; font-style:italic">type</span><span style="font-family:'Consolas'"> </span><span style="font-family:'Consolas'; font-style:italic">parameters …</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Connect </span><span style="font-size:10pt">GDB</span><span> to the remote target. This command takes two args: </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">type</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The type of target, for instance ‘</span><span style="font-family:'Consolas'; font-size:10pt">remote</span><span>’, etc. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">parameters</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Device names, host names and the like. See </span><a href="Target-Commands.html#Target-Commands" style="text-decoration:none"><span style="text-decoration:underline">Commands for Managing Targets</span></a><span>, for more details. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>The output is a connection notification, followed by the address at which the target program is, in the following form: </span></p><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">^connected,addr="</span><span style="font-family:'Consolas'; font-style:italic">address</span><span style="font-family:'Consolas'">",func="</span><span style="font-family:'Consolas'; font-style:italic">function name</span><span style="font-family:'Consolas'">",</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">args=[</span><span style="font-family:'Consolas'; font-style:italic">arg list</span><span style="font-family:'Consolas'">]</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="GDB-Command-80"></a><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">target</span><span>’. </span><a name="Example-80"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-target-select remote /dev/ttya</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^connected,addr="0xfe00a300",func="??",args=[]</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><p style="margin-top:12pt; margin-bottom:12pt"><span>Next: </span><a href="GDB_002fMI-File-Transfer-Commands.html#GDB_002fMI-File-Transfer-Commands" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI File Transfer Commands</span></a><span>, Previous: </span><a href="GDB_002fMI-File-Commands.html#GDB_002fMI-File-Commands" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI File Commands</span></a><span>, Up: </span><a href="GDB_002fMI.html#GDB_002fMI" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p></div><br style="page-break-before:always; clear:both; mso-break-type:section-break" /><div><p style="margin-bottom:12pt"><a name="GDB_002fMI-Thread-Commands"></a><span>Next: </span><a href="GDB_002fMI-Ada-Tasking-Commands.html#GDB_002fMI-Ada-Tasking-Commands" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Ada Tasking Commands</span></a><span>, Previous: </span><a href="GDB_002fMI-Program-Context.html#GDB_002fMI-Program-Context" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Program Context</span></a><span>, Up: </span><a href="GDB_002fMI.html#GDB_002fMI" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><p><a name="GDB_002fMI-Thread-Commands-1"></a></p><h3 style="margin-top:14.05pt; margin-bottom:14.05pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">27.11 </span><span style="font-family:'Times New Roman'; font-size:11.5pt; color:#000000">GDB/MI</span><span style="font-family:'Times New Roman'; color:#000000"> Thread Commands</span><a name="The-_002dthread_002dinfo-Command"></a></h3><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-thread-info</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dthread_002dinfo"></a><a name="Synopsis-26"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-thread-info [ </span><span style="font-family:'Consolas'; font-style:italic">thread-id</span><span style="font-family:'Consolas'"> ]</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Reports information about either a specific thread, if the </span><span style="font-style:italic">thread-id</span><span> parameter is present, or about all threads. </span><span style="font-style:italic">thread-id</span><span> is the thread’s global thread ID. When printing information about all threads, also reports the global ID of the current thread. </span><a name="GDB-Command-25"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p style="margin-top:12pt; margin-bottom:12pt"><span>The ‘</span><span style="font-family:'Consolas'; font-size:10pt">info thread</span><span>’ command prints the same information about all threads. </span><a name="Result-3"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Result</span></h4><p style="margin-top:12pt; margin-bottom:12pt"><span>The result contains the following attributes: </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">threads</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>A list of threads. The format of the elements of the list is described in </span><a href="GDB_002fMI-Thread-Information.html#GDB_002fMI-Thread-Information" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Thread Information</span></a><span>. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">current-thread-id</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The global id of the currently selected thread. This field is omitted if there is no selected thread (for example, when the selected inferior is not running, and therefore has no threads) or if a </span><span style="font-style:italic">thread-id</span><span> argument was passed to the command. </span><a name="Example-25"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">-thread-info</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,threads=[</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{id="2",target-id="Thread 0xb7e14b90 (LWP 21257)",</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">   </span><span style="font-family:'Consolas'">frame={level="0",addr="0xffffe410",func="__kernel_vsyscall",</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">           </span><span style="font-family:'Consolas'">args=[]},state="running"},</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{id="1",target-id="Thread 0xb7e156b0 (LWP 21254)",</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">   </span><span style="font-family:'Consolas'">frame={level="0",addr="0x0804891f",func="foo",</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">           </span><span style="font-family:'Consolas'">args=[{name="i",value="10"}],</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">           </span><span style="font-family:'Consolas'">file="/tmp/a.c",fullname="/tmp/a.c",line="158",arch="i386:x86_64"},</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">           </span><span style="font-family:'Consolas'">state="running"}],</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">current-thread-id="1"</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dthread_002dlist_002dids-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-thread-list-ids</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dthread_002dlist_002dids"></a><a name="Synopsis-27"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-thread-list-ids</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Produces a list of the currently known global </span><span style="font-size:10pt">GDB</span><span> thread ids. At the end of the list it also prints the total number of such threads. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>This command is retained for historical reasons, the </span><span style="font-family:'Consolas'; font-size:10pt">-thread-info</span><span> command should be used instead. </span><a name="GDB-Command-26"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p style="margin-top:12pt; margin-bottom:12pt"><span>Part of ‘</span><span style="font-family:'Consolas'; font-size:10pt">info threads</span><span>’ supplies the same information. </span><a name="Example-26"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-thread-list-ids</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,thread-ids={thread-id="3",thread-id="2",thread-id="1"},</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">current-thread-id="1",number-of-threads="3"</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dthread_002dselect-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-thread-select</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dthread_002dselect"></a><a name="Synopsis-28"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-thread-select </span><span style="font-family:'Consolas'; font-style:italic">thread-id</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Make thread with global thread number </span><span style="font-style:italic">thread-id</span><span> the current thread. It prints the number of the new current thread, and the topmost frame for that thread. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>This command is deprecated in favor of explicitly using the ‘</span><span style="font-family:'Consolas'; font-size:10pt">--thread</span><span>’ option to each command. </span><a name="GDB-Command-27"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">thread</span><span>’. </span><a name="Example-27"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-exec-next</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^running</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">*stopped,reason="end-stepping-range",thread-id="2",line="187",</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">file="../../../devo/gdb/testsuite/gdb.threads/linux-dp.c"</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-thread-list-ids</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">thread-ids={thread-id="3",thread-id="2",thread-id="1"},</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">number-of-threads="3"</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-thread-select 3</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,new-thread-id="3",</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">frame={level="0",func="vprintf",</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">args=[{name="format",value="0x8048e9c \"%*s%c %d %c\\n\""},</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{name="arg",value="0x2"}],file="vprintf.c",line="31",arch="i386:x86_64"}</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><p style="margin-top:12pt; margin-bottom:12pt"><span>Next: </span><a href="GDB_002fMI-Ada-Tasking-Commands.html#GDB_002fMI-Ada-Tasking-Commands" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Ada Tasking Commands</span></a><span>, Previous: </span><a href="GDB_002fMI-Program-Context.html#GDB_002fMI-Program-Context" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Program Context</span></a><span>, Up: </span><a href="GDB_002fMI.html#GDB_002fMI" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p></div><br style="page-break-before:always; clear:both; mso-break-type:section-break" /><div><p style="margin-bottom:12pt"><a name="GDB_002fMI-Thread-Information"></a><span>Next: </span><a href="GDB_002fMI-Ada-Exception-Information.html#GDB_002fMI-Ada-Exception-Information" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Ada Exception Information</span></a><span>, Previous: </span><a href="GDB_002fMI-Frame-Information.html#GDB_002fMI-Frame-Information" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Frame Information</span></a><span>, Up: </span><a href="GDB_002fMI-Output-Records.html#GDB_002fMI-Output-Records" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Output Records</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><p><a name="GDB_002fMI-Thread-Information-1"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">27.5.6 </span><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB/MI</span><span style="font-family:'Times New Roman'; color:#000000"> Thread Information</span></h4><p style="margin-top:12pt; margin-bottom:12pt"><span>Whenever </span><span style="font-size:10pt">GDB</span><span> has to report an information about a thread, it uses a tuple with the following fields. The fields are always present unless stated otherwise. </span></p><p style="font-size:10pt"><span style="font-family:'Consolas'">id</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The global numeric id assigned to the thread by </span><span style="font-size:10pt">GDB</span><span>. </span></p><p style="font-size:10pt"><span style="font-family:'Consolas'">target-id</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The target-specific string identifying the thread. </span></p><p style="font-size:10pt"><span style="font-family:'Consolas'">details</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Additional information about the thread provided by the target. It is supposed to be human-readable and not interpreted by the frontend. This field is optional. </span></p><p style="font-size:10pt"><span style="font-family:'Consolas'">name</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The name of the thread. If the user specified a name using the </span><span style="font-family:'Consolas'; font-size:10pt">thread name</span><span> command, then this name is given. Otherwise, if </span><span style="font-size:10pt">GDB</span><span> can extract the thread name from the target, then that name is given. If </span><span style="font-size:10pt">GDB</span><span> cannot find the thread name, then this field is omitted. </span></p><p style="font-size:10pt"><span style="font-family:'Consolas'">state</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The execution state of the thread, either ‘</span><span style="font-family:'Consolas'; font-size:10pt">stopped</span><span>’ or ‘</span><span style="font-family:'Consolas'; font-size:10pt">running</span><span>’, depending on whether the thread is presently running. </span></p><p style="font-size:10pt"><span style="font-family:'Consolas'">frame</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The stack frame currently executing in the thread. This field is only present if the thread is stopped. Its format is documented in </span><a href="GDB_002fMI-Frame-Information.html#GDB_002fMI-Frame-Information" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Frame Information</span></a><span>. </span></p><p style="font-size:10pt"><span style="font-family:'Consolas'">core</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The value of this field is an integer number of the processor core the thread was last seen on. This field is optional. </span></p></div><br style="page-break-before:always; clear:both; mso-break-type:section-break" /><div><p style="margin-bottom:12pt"><a name="GDB_002fMI-Tracepoint-Commands"></a><span>Next: </span><a href="GDB_002fMI-Symbol-Query.html#GDB_002fMI-Symbol-Query" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Symbol Query</span></a><span>, Previous: </span><a href="GDB_002fMI-Data-Manipulation.html#GDB_002fMI-Data-Manipulation" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Data Manipulation</span></a><span>, Up: </span><a href="GDB_002fMI.html#GDB_002fMI" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><p><a name="GDB_002fMI-Tracepoint-Commands-1"></a></p><h3 style="margin-top:14.05pt; margin-bottom:14.05pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">27.17 </span><span style="font-family:'Times New Roman'; font-size:11.5pt; color:#000000">GDB/MI</span><span style="font-family:'Times New Roman'; color:#000000"> Tracepoint Commands</span></h3><p style="margin-top:12pt; margin-bottom:12pt"><span>The commands defined in this section implement MI support for tracepoints. For detailed introduction, see </span><a href="Tracepoints.html#Tracepoints" style="text-decoration:none"><span style="text-decoration:underline">Tracepoints</span></a><span>. </span><a name="The-_002dtrace_002dfind-Command"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-trace-find</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dtrace_002dfind"></a><a name="Synopsis-72"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-trace-find </span><span style="font-family:'Consolas'; font-style:italic">mode</span><span style="font-family:'Consolas'"> [</span><span style="font-family:'Consolas'; font-style:italic">parameters</span><span style="font-family:'Consolas'">…]</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Find a trace frame using criteria defined by </span><span style="font-style:italic">mode</span><span> and </span><span style="font-style:italic">parameters</span><span>. The following table lists permissible modes and their parameters. For details of operation, see </span><a href="tfind.html#tfind" style="text-decoration:none"><span style="text-decoration:underline">tfind</span></a><span>. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">none</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>No parameters are required. Stops examining trace frames. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">frame-number</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>An integer is required as parameter. Selects tracepoint frame with that index. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">tracepoint-number</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>An integer is required as parameter. Finds next trace frame that corresponds to tracepoint with the specified number. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">pc</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>An address is required as parameter. Finds next trace frame that corresponds to any tracepoint at the specified address. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">pc-inside-range</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Two addresses are required as parameters. Finds next trace frame that corresponds to a tracepoint at an address inside the specified range. Both bounds are considered to be inside the range. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">pc-outside-range</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Two addresses are required as parameters. Finds next trace frame that corresponds to a tracepoint at an address outside the specified range. Both bounds are considered to be inside the range. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">line</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Line specification is required as parameter. See </span><a href="Specify-Location.html#Specify-Location" style="text-decoration:none"><span style="text-decoration:underline">Specify Location</span></a><span>. Finds next trace frame that corresponds to a tracepoint at the specified location. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>If ‘</span><span style="font-family:'Consolas'; font-size:10pt">none</span><span>’ was passed as </span><span style="font-style:italic">mode</span><span>, the response does not have fields. Otherwise, the response may have the following fields: </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">found</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>This field has either ‘</span><span style="font-family:'Consolas'; font-size:10pt">0</span><span>’ or ‘</span><span style="font-family:'Consolas'; font-size:10pt">1</span><span>’ as the value, depending on whether a matching tracepoint was found. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">traceframe</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The index of the found traceframe. This field is present iff the ‘</span><span style="font-family:'Consolas'; font-size:10pt">found</span><span>’ field has value of ‘</span><span style="font-family:'Consolas'; font-size:10pt">1</span><span>’. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">tracepoint</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The index of the found tracepoint. This field is present iff the ‘</span><span style="font-family:'Consolas'; font-size:10pt">found</span><span>’ field has value of ‘</span><span style="font-family:'Consolas'; font-size:10pt">1</span><span>’. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">frame</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The information about the frame corresponding to the found trace frame. This field is present only if a trace frame was found. See </span><a href="GDB_002fMI-Frame-Information.html#GDB_002fMI-Frame-Information" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Frame Information</span></a><span>, for description of this field. </span><a name="GDB-Command-54"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">tfind</span><span>’. </span><a name="g_t_002dtrace_002ddefine_002dvariable"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">-trace-define-variable</span><a name="index-_002dtrace_002ddefine_002dvariable"></a><a name="Synopsis-73"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-trace-define-variable </span><span style="font-family:'Consolas'; font-style:italic">name</span><span style="font-family:'Consolas'"> [ </span><span style="font-family:'Consolas'; font-style:italic">value</span><span style="font-family:'Consolas'"> ]</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Create trace variable </span><span style="font-style:italic">name</span><span> if it does not exist. If </span><span style="font-style:italic">value</span><span> is specified, sets the initial value of the specified trace variable to that value. Note that the </span><span style="font-style:italic">name</span><span> should start with the ‘</span><span style="font-family:'Consolas'; font-size:10pt">$</span><span>’ character. </span><a name="GDB-Command-55"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">tvariable</span><span>’. </span><a name="The-_002dtrace_002dframe_002dcollected-C"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-trace-frame-collected</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dtrace_002dframe_002dcollected"></a><a name="Synopsis-74"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-trace-frame-collected</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">    </span><span style="font-family:'Consolas'">[--var-print-values </span><span style="font-family:'Consolas'; font-style:italic">var_pval</span><span style="font-family:'Consolas'">]</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">    </span><span style="font-family:'Consolas'">[--comp-print-values </span><span style="font-family:'Consolas'; font-style:italic">comp_pval</span><span style="font-family:'Consolas'">]</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">    </span><span style="font-family:'Consolas'">[--registers-format </span><span style="font-family:'Consolas'; font-style:italic">regformat</span><span style="font-family:'Consolas'">]</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">    </span><span style="font-family:'Consolas'">[--memory-contents]</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>This command returns the set of collected objects, register names, trace state variable names, memory ranges and computed expressions that have been collected at a particular trace frame. The optional parameters to the command affect the output format in different ways. See the output description table below for more details. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>The reported names can be used in the normal manner to create varobjs and inspect the objects themselves. The items returned by this command are categorized so that it is clear which is a variable, which is a register, which is a trace state variable, which is a memory range and which is a computed expression. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>For instance, if the actions were </span></p><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">collect myVar, myArray[myIndex], myObj.field, myPtr->field, myCount + 2</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">collect *(int*)0xaf02bef0@40</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>the object collected in its entirety would be </span><span style="font-family:'Consolas'; font-size:10pt">myVar</span><span>. The object </span><span style="font-family:'Consolas'; font-size:10pt">myArray</span><span> would be partially collected, because only the element at index </span><span style="font-family:'Consolas'; font-size:10pt">myIndex</span><span> would be collected. The remaining objects would be computed expressions. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>An example output would be: </span></p><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-trace-frame-collected</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">explicit-variables=[{name="myVar",value="1"}],</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">computed-expressions=[{name="myArray[myIndex]",value="0"},</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                        </span><span style="font-family:'Consolas'">{name="myObj.field",value="0"},</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                        </span><span style="font-family:'Consolas'">{name="myPtr->field",value="1"},</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                        </span><span style="font-family:'Consolas'">{name="myCount + 2",value="3"},</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">                        </span><span style="font-family:'Consolas'">{name="$tvar1 + 1",value="43970027"}],</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">registers=[{number="0",value="0x7fe2c6e79ec8"},</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">             </span><span style="font-family:'Consolas'">{number="1",value="0x0"},</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">             </span><span style="font-family:'Consolas'">{number="2",value="0x4"},</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">             </span><span style="font-family:'Consolas'">...</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">             </span><span style="font-family:'Consolas'">{number="125",value="0x0"}],</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">tvars=[{name="$tvar1",current="43970026"}],</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">memory=[{address="0x0000000000602264",length="4"},</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">          </span><span style="font-family:'Consolas'">{address="0x0000000000615bc0",length="4"}]</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Where: </span></p><p style="font-size:10pt"><span style="font-family:'Consolas'">explicit-variables</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The set of objects that have been collected in their entirety (as opposed to collecting just a few elements of an array or a few struct members). For each object, its name and value are printed. The </span><span style="font-family:'Consolas'; font-size:10pt">--var-print-values</span><span> option affects how or whether the value field is output. If </span><span style="font-style:italic">var_pval</span><span> is 0, then print only the names; if it is 1, print also their values; and if it is 2, print the name, type and value for simple data types, and the name and type for arrays, structures and unions. </span></p><p style="font-size:10pt"><span style="font-family:'Consolas'">computed-expressions</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The set of computed expressions that have been collected at the current trace frame. The </span><span style="font-family:'Consolas'; font-size:10pt">--comp-print-values</span><span> option affects this set like the </span><span style="font-family:'Consolas'; font-size:10pt">--var-print-values</span><span> option affects the </span><span style="font-family:'Consolas'; font-size:10pt">explicit-variables</span><span> set. See above. </span></p><p style="font-size:10pt"><span style="font-family:'Consolas'">registers</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The registers that have been collected at the current trace frame. For each register collected, the name and current value are returned. The value is formatted according to the </span><span style="font-family:'Consolas'; font-size:10pt">--registers-format</span><span> option. See the </span><span style="font-family:'Consolas'; font-size:10pt">-data-list-register-values</span><span> command for a list of the allowed formats. The default is ‘</span><span style="font-family:'Consolas'; font-size:10pt">x</span><span>’. </span></p><p style="font-size:10pt"><span style="font-family:'Consolas'">tvars</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The trace state variables that have been collected at the current trace frame. For each trace state variable collected, the name and current value are returned. </span></p><p style="font-size:10pt"><span style="font-family:'Consolas'">memory</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The set of memory ranges that have been collected at the current trace frame. Its content is a list of tuples. Each tuple represents a collected memory range and has the following fields: </span></p><p style="margin-left:30pt; font-size:10pt"><span style="font-family:'Consolas'">address</span></p><p style="margin-top:12pt; margin-left:60pt; margin-bottom:12pt"><span>The start address of the memory range, as hexadecimal literal. </span></p><p style="margin-left:30pt; font-size:10pt"><span style="font-family:'Consolas'">length</span></p><p style="margin-top:12pt; margin-left:60pt; margin-bottom:12pt"><span>The length of the memory range, as decimal literal. </span></p><p style="margin-left:30pt; font-size:10pt"><span style="font-family:'Consolas'">contents</span></p><p style="margin-top:12pt; margin-left:60pt; margin-bottom:12pt"><span>The contents of the memory block, in hex. This field is only present if the </span><span style="font-family:'Consolas'; font-size:10pt">--memory-contents</span><span> option is specified. </span><a name="GDB-Command-56"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p style="margin-top:12pt; margin-bottom:12pt"><span>There is no corresponding </span><span style="font-size:10pt">GDB</span><span> command. </span><a name="Example-60"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span><a name="g_t_002dtrace_002dlist_002dvariables"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">-trace-list-variables</span><a name="index-_002dtrace_002dlist_002dvariables"></a><a name="Synopsis-75"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-trace-list-variables</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Return a table of all defined trace variables. Each element of the table has the following fields: </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">name</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The name of the trace variable. This field is always present. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">initial</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The initial value. This is a 64-bit signed integer. This field is always present. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">current</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The value the trace variable has at the moment. This is a 64-bit signed integer. This field is absent iff current value is not defined, for example if the trace was never run, or is presently running. </span><a name="GDB-Command-57"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">tvariables</span><span>’. </span><a name="Example-61"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-trace-list-variables</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,trace-variables={nr_rows="1",nr_cols="3",</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">hdr=[{width="15",alignment="-1",col_name="name",colhdr="Name"},</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">     </span><span style="font-family:'Consolas'">{width="11",alignment="-1",col_name="initial",colhdr="Initial"},</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">     </span><span style="font-family:'Consolas'">{width="11",alignment="-1",col_name="current",colhdr="Current"}],</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">body=[variable={name="$trace_timestamp",initial="0"}</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">      </span><span style="font-family:'Consolas'">variable={name="$foo",initial="10",current="15"}]}</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="g_t_002dtrace_002dsave"></a><span style="font-family:'Times New Roman'; color:#000000">-trace-save</span><a name="index-_002dtrace_002dsave"></a><a name="Synopsis-76"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-trace-save [ -r ] [ -ctf ] </span><span style="font-family:'Consolas'; font-style:italic">filename</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Saves the collected trace data to </span><span style="font-style:italic">filename</span><span>. Without the ‘</span><span style="font-family:'Consolas'; font-size:10pt">-r</span><span>’ option, the data is downloaded from the target and saved in a local file. With the ‘</span><span style="font-family:'Consolas'; font-size:10pt">-r</span><span>’ option the target is asked to perform the save. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>By default, this command will save the trace in the tfile format. You can supply the optional ‘</span><span style="font-family:'Consolas'; font-size:10pt">-ctf</span><span>’ argument to save it the CTF format. See </span><a href="Trace-Files.html#Trace-Files" style="text-decoration:none"><span style="text-decoration:underline">Trace Files</span></a><span> for more information about CTF. </span><a name="GDB-Command-58"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">tsave</span><span>’. </span><a name="g_t_002dtrace_002dstart"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">-trace-start</span><a name="index-_002dtrace_002dstart"></a><a name="Synopsis-77"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-trace-start</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Starts a tracing experiment. The result of this command does not have any fields. </span><a name="GDB-Command-59"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">tstart</span><span>’. </span><a name="g_t_002dtrace_002dstatus"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">-trace-status</span><a name="index-_002dtrace_002dstatus"></a><a name="Synopsis-78"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-trace-status</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Obtains the status of a tracing experiment. The result may include the following fields: </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">supported</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>May have a value of either ‘</span><span style="font-family:'Consolas'; font-size:10pt">0</span><span>’, when no tracing operations are supported, ‘</span><span style="font-family:'Consolas'; font-size:10pt">1</span><span>’, when all tracing operations are supported, or ‘</span><span style="font-family:'Consolas'; font-size:10pt">file</span><span>’ when examining trace file. In the latter case, examining of trace frame is possible but new tracing experiement cannot be started. This field is always present. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">running</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>May have a value of either ‘</span><span style="font-family:'Consolas'; font-size:10pt">0</span><span>’ or ‘</span><span style="font-family:'Consolas'; font-size:10pt">1</span><span>’ depending on whether tracing experiement is in progress on target. This field is present if ‘</span><span style="font-family:'Consolas'; font-size:10pt">supported</span><span>’ field is not ‘</span><span style="font-family:'Consolas'; font-size:10pt">0</span><span>’. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">stop-reason</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Report the reason why the tracing was stopped last time. This field may be absent iff tracing was never stopped on target yet. The value of ‘</span><span style="font-family:'Consolas'; font-size:10pt">request</span><span>’ means the tracing was stopped as result of the </span><span style="font-family:'Consolas'; font-size:10pt">-trace-stop</span><span> command. The value of ‘</span><span style="font-family:'Consolas'; font-size:10pt">overflow</span><span>’ means the tracing buffer is full. The value of ‘</span><span style="font-family:'Consolas'; font-size:10pt">disconnection</span><span>’ means tracing was automatically stopped when </span><span style="font-size:10pt">GDB</span><span> has disconnected. The value of ‘</span><span style="font-family:'Consolas'; font-size:10pt">passcount</span><span>’ means tracing was stopped when a tracepoint was passed a maximal number of times for that tracepoint. This field is present if ‘</span><span style="font-family:'Consolas'; font-size:10pt">supported</span><span>’ field is not ‘</span><span style="font-family:'Consolas'; font-size:10pt">0</span><span>’. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">stopping-tracepoint</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The number of tracepoint whose passcount as exceeded. This field is present iff the ‘</span><span style="font-family:'Consolas'; font-size:10pt">stop-reason</span><span>’ field has the value of ‘</span><span style="font-family:'Consolas'; font-size:10pt">passcount</span><span>’. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">frames</span><span>’</span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">frames-created</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The ‘</span><span style="font-family:'Consolas'; font-size:10pt">frames</span><span>’ field is a count of the total number of trace frames in the trace buffer, while ‘</span><span style="font-family:'Consolas'; font-size:10pt">frames-created</span><span>’ is the total created during the run, including ones that were discarded, such as when a circular trace buffer filled up. Both fields are optional. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">buffer-size</span><span>’</span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">buffer-free</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>These fields tell the current size of the tracing buffer and the remaining space. These fields are optional. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">circular</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The value of the circular trace buffer flag. </span><span style="font-family:'Consolas'; font-size:10pt">1</span><span> means that the trace buffer is circular and old trace frames will be discarded if necessary to make room, </span><span style="font-family:'Consolas'; font-size:10pt">0</span><span> means that the trace buffer is linear and may fill up. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">disconnected</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The value of the disconnected tracing flag. </span><span style="font-family:'Consolas'; font-size:10pt">1</span><span> means that tracing will continue after </span><span style="font-size:10pt">GDB</span><span> disconnects, </span><span style="font-family:'Consolas'; font-size:10pt">0</span><span> means that the trace run will stop. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">trace-file</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The filename of the trace file being examined. This field is optional, and only present when examining a trace file. </span><a name="GDB-Command-60"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">tstatus</span><span>’. </span><a name="g_t_002dtrace_002dstop"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">-trace-stop</span><a name="index-_002dtrace_002dstop"></a><a name="Synopsis-79"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-trace-stop</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Stops a tracing experiment. The result of this command has the same fields as </span><span style="font-family:'Consolas'; font-size:10pt">-trace-status</span><span>, except that the ‘</span><span style="font-family:'Consolas'; font-size:10pt">supported</span><span>’ and ‘</span><span style="font-family:'Consolas'; font-size:10pt">running</span><span>’ fields are not output. </span><a name="GDB-Command-61"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; font-size:10pt; color:#000000">GDB</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span></h4><p style="margin-top:12pt; margin-bottom:12pt"><span>The corresponding </span><span style="font-size:10pt">GDB</span><span> command is ‘</span><span style="font-family:'Consolas'; font-size:10pt">tstop</span><span>’. </span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><p style="margin-top:12pt; margin-bottom:12pt"><span>Next: </span><a href="GDB_002fMI-Symbol-Query.html#GDB_002fMI-Symbol-Query" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Symbol Query</span></a><span>, Previous: </span><a href="GDB_002fMI-Data-Manipulation.html#GDB_002fMI-Data-Manipulation" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Data Manipulation</span></a><span>, Up: </span><a href="GDB_002fMI.html#GDB_002fMI" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p></div><br style="page-break-before:always; clear:both; mso-break-type:section-break" /><div><p style="margin-bottom:12pt"><a name="GDB_002fMI-Variable-Objects"></a><span>Next: </span><a href="GDB_002fMI-Data-Manipulation.html#GDB_002fMI-Data-Manipulation" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Data Manipulation</span></a><span>, Previous: </span><a href="GDB_002fMI-Stack-Manipulation.html#GDB_002fMI-Stack-Manipulation" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Stack Manipulation</span></a><span>, Up: </span><a href="GDB_002fMI.html#GDB_002fMI" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><p><a name="GDB_002fMI-Variable-Objects-1"></a></p><h3 style="margin-top:14.05pt; margin-bottom:14.05pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">27.15 </span><span style="font-family:'Times New Roman'; font-size:11.5pt; color:#000000">GDB/MI</span><span style="font-family:'Times New Roman'; color:#000000"> Variable Objects</span><a name="Introduction-to-Variable-Objects"></a></h3><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Introduction to Variable Objects</span><a name="index-variable-objects-in-GDB_002fMI"></a></h4><p style="margin-top:12pt; margin-bottom:12pt"><span>Variable objects are "object-oriented" MI interface for examining and changing values of expressions. Unlike some other MI interfaces that work with expressions, variable objects are specifically designed for simple and efficient presentation in the frontend. A variable object is identified by string name. When a variable object is created, the frontend specifies the expression for that variable object. The expression can be a simple variable, or it can be an arbitrary complex expression, and can even involve CPU registers. After creating a variable object, the frontend can invoke other variable object operations—for example to obtain or change the value of a variable object, or to change display format. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Variable objects have hierarchical tree structure. Any variable object that corresponds to a composite type, such as structure in C, has a number of child variable objects, for example corresponding to each element of a structure. A child variable object can itself have children, recursively. Recursion ends when we reach leaf variable objects, which always have built-in types. Child variable objects are created only by explicit request, so if a frontend is not interested in the children of a particular variable object, no child will be created. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>For a leaf variable object it is possible to obtain its value as a string, or set the value from a string. String value can be also obtained for a non-leaf variable object, but it’s generally a string that only indicates the type of the object, and does not list its contents. Assignment to a non-leaf variable object is not allowed. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>A frontend does not need to read the values of all variable objects each time the program stops. Instead, MI provides an update command that lists all variable objects whose values has changed since the last update operation. This considerably reduces the amount of data that must be transferred to the frontend. As noted above, children variable objects are created on demand, and only leaf variable objects have a real value. As result, gdb will read target memory only for leaf variables that frontend has created. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>The automatic update is not always desirable. For example, a frontend might want to keep a value of some expression for future reference, and never update it. For another example, fetching memory is relatively slow for embedded targets, so a frontend might want to disable automatic update for the variables that are either not visible on the screen, or “closed”. This is possible using so called “frozen variable objects”. Such variable objects are never implicitly updated. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Variable objects can be either </span><span style="font-style:italic">fixed</span><span> or </span><span style="font-style:italic">floating</span><span>. For the fixed variable object, the expression is parsed when the variable object is created, including associating identifiers to specific variables. The meaning of expression never changes. For a floating variable object the values of variables whose names appear in the expressions are re-evaluated every time in the context of the current frame. Consider this example: </span></p><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">void do_work(...)</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">{</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">        </span><span style="font-family:'Consolas'">struct work_state state;</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:ignore"> </span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">        </span><span style="font-family:'Consolas'">if (...)</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">           </span><span style="font-family:'Consolas'">do_work(...);</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">}</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>If a fixed variable object for the </span><span style="font-family:'Consolas'; font-size:10pt">state</span><span> variable is created in this function, and we enter the recursive call, the variable object will report the value of </span><span style="font-family:'Consolas'; font-size:10pt">state</span><span> in the top-level </span><span style="font-family:'Consolas'; font-size:10pt">do_work</span><span> invocation. On the other hand, a floating variable object will report the value of </span><span style="font-family:'Consolas'; font-size:10pt">state</span><span> in the current frame. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>If an expression specified when creating a fixed variable object refers to a local variable, the variable object becomes bound to the thread and frame in which the variable object is created. When such variable object is updated, </span><span style="font-size:10pt">GDB</span><span> makes sure that the thread/frame combination the variable object is bound to still exists, and re-evaluates the variable object in context of that thread/frame. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>The following is the complete set of </span><span style="font-size:10pt">GDB/MI</span><span> operations defined to access this functionality: </span></p><table cellspacing="2" cellpadding="0" style="border-spacing:1.5pt"><tr><td style="width:40%; padding:0.75pt; vertical-align:middle"><p><span style="font-weight:bold">Operation</span></p></td><td style="width:60%; padding:0.75pt; vertical-align:middle"><p><span style="font-weight:bold">Description</span></p></td></tr><tr><td style="width:40%; padding:0.75pt; vertical-align:middle"><p style="font-size:10pt"><span style="font-family:'Consolas'">-enable-pretty-printing</span></p></td><td style="width:60%; padding:0.75pt; vertical-align:middle"><p><span>enable Python-based pretty-printing</span></p></td></tr><tr><td style="width:40%; padding:0.75pt; vertical-align:middle"><p style="font-size:10pt"><span style="font-family:'Consolas'">-var-create</span></p></td><td style="width:60%; padding:0.75pt; vertical-align:middle"><p><span>create a variable object</span></p></td></tr><tr><td style="width:40%; padding:0.75pt; vertical-align:middle"><p style="font-size:10pt"><span style="font-family:'Consolas'">-var-delete</span></p></td><td style="width:60%; padding:0.75pt; vertical-align:middle"><p><span>delete the variable object and/or its children</span></p></td></tr><tr><td style="width:40%; padding:0.75pt; vertical-align:middle"><p style="font-size:10pt"><span style="font-family:'Consolas'">-var-set-format</span></p></td><td style="width:60%; padding:0.75pt; vertical-align:middle"><p><span>set the display format of this variable</span></p></td></tr><tr><td style="width:40%; padding:0.75pt; vertical-align:middle"><p style="font-size:10pt"><span style="font-family:'Consolas'">-var-show-format</span></p></td><td style="width:60%; padding:0.75pt; vertical-align:middle"><p><span>show the display format of this variable</span></p></td></tr><tr><td style="width:40%; padding:0.75pt; vertical-align:middle"><p style="font-size:10pt"><span style="font-family:'Consolas'">-var-info-num-children</span></p></td><td style="width:60%; padding:0.75pt; vertical-align:middle"><p><span>tells how many children this object has</span></p></td></tr><tr><td style="width:40%; padding:0.75pt; vertical-align:middle"><p style="font-size:10pt"><span style="font-family:'Consolas'">-var-list-children</span></p></td><td style="width:60%; padding:0.75pt; vertical-align:middle"><p><span>return a list of the object’s children</span></p></td></tr><tr><td style="width:40%; padding:0.75pt; vertical-align:middle"><p style="font-size:10pt"><span style="font-family:'Consolas'">-var-info-type</span></p></td><td style="width:60%; padding:0.75pt; vertical-align:middle"><p><span>show the type of this variable object</span></p></td></tr><tr><td style="width:40%; padding:0.75pt; vertical-align:middle"><p style="font-size:10pt"><span style="font-family:'Consolas'">-var-info-expression</span></p></td><td style="width:60%; padding:0.75pt; vertical-align:middle"><p><span>print parent-relative expression that this variable object represents</span></p></td></tr><tr><td style="width:40%; padding:0.75pt; vertical-align:middle"><p style="font-size:10pt"><span style="font-family:'Consolas'">-var-info-path-expression</span></p></td><td style="width:60%; padding:0.75pt; vertical-align:middle"><p><span>print full expression that this variable object represents</span></p></td></tr><tr><td style="width:40%; padding:0.75pt; vertical-align:middle"><p style="font-size:10pt"><span style="font-family:'Consolas'">-var-show-attributes</span></p></td><td style="width:60%; padding:0.75pt; vertical-align:middle"><p><span>is this variable editable? does it exist here?</span></p></td></tr><tr><td style="width:40%; padding:0.75pt; vertical-align:middle"><p style="font-size:10pt"><span style="font-family:'Consolas'">-var-evaluate-expression</span></p></td><td style="width:60%; padding:0.75pt; vertical-align:middle"><p><span>get the value of this variable</span></p></td></tr><tr><td style="width:40%; padding:0.75pt; vertical-align:middle"><p style="font-size:10pt"><span style="font-family:'Consolas'">-var-assign</span></p></td><td style="width:60%; padding:0.75pt; vertical-align:middle"><p><span>set the value of this variable</span></p></td></tr><tr><td style="width:40%; padding:0.75pt; vertical-align:middle"><p style="font-size:10pt"><span style="font-family:'Consolas'">-var-update</span></p></td><td style="width:60%; padding:0.75pt; vertical-align:middle"><p><span>update the variable and its children</span></p></td></tr><tr><td style="width:40%; padding:0.75pt; vertical-align:middle"><p style="font-size:10pt"><span style="font-family:'Consolas'">-var-set-frozen</span></p></td><td style="width:60%; padding:0.75pt; vertical-align:middle"><p><span>set frozenness attribute</span></p></td></tr><tr><td style="width:40%; padding:0.75pt; vertical-align:middle"><p style="font-size:10pt"><span style="font-family:'Consolas'">-var-set-update-range</span></p></td><td style="width:60%; padding:0.75pt; vertical-align:middle"><p><span>set range of children to display on update</span></p></td></tr></table><p style="margin-top:12pt; margin-bottom:12pt"><span>In the next subsection we describe each operation in detail and suggest how it can be used. </span><a name="Description-And-Use-of-Operations-on-Var"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Description And Use of Operations on Variable Objects</span><a name="The-_002denable_002dpretty_002dprinting-"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-enable-pretty-printing</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002denable_002dpretty_002dprintin"></a></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">-enable-pretty-printing</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span style="font-size:10pt">GDB</span><span> allows Python-based visualizers to affect the output of the MI variable object commands. However, because there was no way to implement this in a fully backward-compatible way, a front end must request that this functionality be enabled. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Once enabled, this feature cannot be disabled. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Note that if Python support has not been compiled into </span><span style="font-size:10pt">GDB</span><span>, this command will still succeed (and do nothing). </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>This feature is currently (as of </span><span style="font-size:10pt">GDB</span><span> 7.0) experimental, and may work differently in future versions of </span><span style="font-size:10pt">GDB</span><span>. </span><a name="The-_002dvar_002dcreate-Command"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-var-create</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dvar_002dcreate"></a><a name="Synopsis-48"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-var-create {</span><span style="font-family:'Consolas'; font-style:italic">name</span><span style="font-family:'Consolas'"> | "-"}</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">    </span><span style="font-family:'Consolas'">{</span><span style="font-family:'Consolas'; font-style:italic">frame-addr</span><span style="font-family:'Consolas'"> | "*" | "@"} </span><span style="font-family:'Consolas'; font-style:italic">expression</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>This operation creates a variable object, which allows the monitoring of a variable, the result of an expression, a memory cell or a CPU register. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>The </span><span style="font-style:italic">name</span><span> parameter is the string by which the object can be referenced. It must be unique. If ‘</span><span style="font-family:'Consolas'; font-size:10pt">-</span><span>’ is specified, the varobj system will generate a string “varNNNNNN” automatically. It will be unique provided that one does not specify </span><span style="font-style:italic">name</span><span> of that format. The command fails if a duplicate name is found. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>The frame under which the expression should be evaluated can be specified by </span><span style="font-style:italic">frame-addr</span><span>. A ‘</span><span style="font-family:'Consolas'; font-size:10pt">*</span><span>’ indicates that the current frame should be used. A ‘</span><span style="font-family:'Consolas'; font-size:10pt">@</span><span>’ indicates that a floating variable object must be created. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span style="font-style:italic">expression</span><span> is any expression valid on the current language set (must not begin with a ‘</span><span style="font-family:'Consolas'; font-size:10pt">*</span><span>’), or one of the following: </span></p><ul type="disc" style="margin:0pt; padding-left:0pt"><li style="margin-top:12pt; margin-left:36pt; font-family:serif; -aw-font-family:'Symbol'; -aw-font-weight:normal; -aw-number-format:''"><span style="font-family:'Times New Roman'">‘</span><span style="font-family:'Consolas'; font-size:10pt">*</span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">addr</span><span style="font-family:'Times New Roman'">’, where </span><span style="font-family:'Times New Roman'; font-style:italic">addr</span><span style="font-family:'Times New Roman'"> is the address of a memory cell </span></li><li style="margin-left:36pt; font-family:serif; -aw-font-family:'Symbol'; -aw-font-weight:normal; -aw-number-format:''"><span style="font-family:'Times New Roman'">‘</span><span style="font-family:'Consolas'; font-size:10pt">*</span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">addr</span><span style="font-family:'Consolas'; font-size:10pt">-</span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">addr</span><span style="font-family:'Times New Roman'">’ — a memory address range (TBD) </span></li><li style="margin-left:36pt; margin-bottom:12pt; font-family:serif; -aw-font-family:'Symbol'; -aw-font-weight:normal; -aw-number-format:''"><span style="font-family:'Times New Roman'">‘</span><span style="font-family:'Consolas'; font-size:10pt">$</span><span style="font-family:'Consolas'; font-size:10pt; font-style:italic">regname</span><span style="font-family:'Times New Roman'">’ — a CPU register name </span><a name="index-dynamic-varobj"></a></li></ul><p style="margin-top:12pt; margin-bottom:12pt"><span>A varobj’s contents may be provided by a Python-based pretty-printer. In this case the varobj is known as a </span><span style="font-style:italic">dynamic varobj</span><span>. Dynamic varobjs have slightly different semantics in some cases. If the </span><span style="font-family:'Consolas'; font-size:10pt">-enable-pretty-printing</span><span> command is not sent, then </span><span style="font-size:10pt">GDB</span><span> will never create a dynamic varobj. This ensures backward compatibility for existing clients. </span><a name="Result-5"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Result</span></h4><p style="margin-top:12pt; margin-bottom:12pt"><span>This operation returns attributes of the newly-created varobj. These are: </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">name</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The name of the varobj. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">numchild</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The number of children of the varobj. This number is not necessarily reliable for a dynamic varobj. Instead, you must examine the ‘</span><span style="font-family:'Consolas'; font-size:10pt">has_more</span><span>’ attribute. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">value</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The varobj’s scalar value. For a varobj whose type is some sort of aggregate (e.g., a </span><span style="font-family:'Consolas'; font-size:10pt">struct</span><span>), or for a dynamic varobj, this value will not be interesting. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">type</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The varobj’s type. This is a string representation of the type, as would be printed by the </span><span style="font-size:10pt">GDB</span><span> CLI. If ‘</span><span style="font-family:'Consolas'; font-size:10pt">print object</span><span>’ (see </span><a href="Print-Settings.html#Print-Settings" style="text-decoration:none"><span style="text-decoration:underline">set print object</span></a><span>) is set to </span><span style="font-family:'Consolas'; font-size:10pt">on</span><span>, the </span><span style="font-style:italic">actual</span><span> (derived) type of the object is shown rather than the </span><span style="font-style:italic">declared</span><span> one. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">thread-id</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>If a variable object is bound to a specific thread, then this is the thread’s global identifier. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">has_more</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>For a dynamic varobj, this indicates whether there appear to be any children available. For a non-dynamic varobj, this will be 0. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">dynamic</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>This attribute will be present and have the value ‘</span><span style="font-family:'Consolas'; font-size:10pt">1</span><span>’ if the varobj is a dynamic varobj. If the varobj is not a dynamic varobj, then this attribute will not be present. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">displayhint</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>A dynamic varobj can supply a display hint to the front end. The value comes directly from the Python pretty-printer object’s </span><span style="font-family:'Consolas'; font-size:10pt">display_hint</span><span> method. See </span><a href="Pretty-Printing-API.html#Pretty-Printing-API" style="text-decoration:none"><span style="text-decoration:underline">Pretty Printing API</span></a><span>. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Typical output will look like this: </span></p><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">name="</span><span style="font-family:'Consolas'; font-style:italic">name</span><span style="font-family:'Consolas'">",numchild="</span><span style="font-family:'Consolas'; font-style:italic">N</span><span style="font-family:'Consolas'">",type="</span><span style="font-family:'Consolas'; font-style:italic">type</span><span style="font-family:'Consolas'">",thread-id="</span><span style="font-family:'Consolas'; font-style:italic">M</span><span style="font-family:'Consolas'">",</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces">  </span><span style="font-family:'Consolas'">has_more="</span><span style="font-family:'Consolas'; font-style:italic">has_more</span><span style="font-family:'Consolas'">"</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dvar_002ddelete-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-var-delete</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dvar_002ddelete"></a><a name="Synopsis-49"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-var-delete [ -c ] </span><span style="font-family:'Consolas'; font-style:italic">name</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Deletes a previously created variable object and all of its children. With the ‘</span><span style="font-family:'Consolas'; font-size:10pt">-c</span><span>’ option, just deletes the children. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Returns an error if the object </span><span style="font-style:italic">name</span><span> is not found. </span><a name="The-_002dvar_002dset_002dformat-Command"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-var-set-format</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dvar_002dset_002dformat"></a><a name="Synopsis-50"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-var-set-format </span><span style="font-family:'Consolas'; font-style:italic">name</span><span style="font-family:'Consolas'"> </span><span style="font-family:'Consolas'; font-style:italic">format-spec</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Sets the output format for the value of the object </span><span style="font-style:italic">name</span><span> to be </span><span style="font-style:italic">format-spec</span><span>. </span><a name="g_t_002dvar_002dset_002dformat"></a></p><p style="margin-top:12pt; margin-bottom:12pt"><span>The syntax for the </span><span style="font-style:italic">format-spec</span><span> is as follows: </span></p><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'; font-style:italic">format-spec</span><span style="font-family:'Consolas'"> →</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">{binary | decimal | hexadecimal | octal | natural | zero-hexadecimal}</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>The natural format is the default format choosen automatically based on the variable type (like decimal for an </span><span style="font-family:'Consolas'; font-size:10pt">int</span><span>, hex for pointers, etc.). </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>The zero-hexadecimal format has a representation similar to hexadecimal but with padding zeroes to the left of the value. For example, a 32-bit hexadecimal value of 0x1234 would be represented as 0x00001234 in the zero-hexadecimal format. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>For a variable with children, the format is set only on the variable itself, and the children are not affected. </span><a name="The-_002dvar_002dshow_002dformat-Command"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-var-show-format</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dvar_002dshow_002dformat"></a><a name="Synopsis-51"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-var-show-format </span><span style="font-family:'Consolas'; font-style:italic">name</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Returns the format used to display the value of the object </span><span style="font-style:italic">name</span><span>. </span></p><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'; font-style:italic">format</span><span style="font-family:'Consolas'"> →</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'; font-style:italic">format-spec</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dvar_002dinfo_002dnum_002dchildr"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-var-info-num-children</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dvar_002dinfo_002dnum_002dchil"></a><a name="Synopsis-52"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-var-info-num-children </span><span style="font-family:'Consolas'; font-style:italic">name</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Returns the number of children of a variable object </span><span style="font-style:italic">name</span><span>: </span></p><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">numchild=</span><span style="font-family:'Consolas'; font-style:italic">n</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Note that this number is not completely reliable for a dynamic varobj. It will return the current number of children, but more children may be available. </span><a name="The-_002dvar_002dlist_002dchildren-Comma"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-var-list-children</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dvar_002dlist_002dchildren"></a><a name="Synopsis-53"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-var-list-children [</span><span style="font-family:'Consolas'; font-style:italic">print-values</span><span style="font-family:'Consolas'">] </span><span style="font-family:'Consolas'; font-style:italic">name</span><span style="font-family:'Consolas'"> [</span><span style="font-family:'Consolas'; font-style:italic">from</span><span style="font-family:'Consolas'"> </span><span style="font-family:'Consolas'; font-style:italic">to</span><span style="font-family:'Consolas'">]</span></p><p style="margin-top:12pt; margin-bottom:12pt"><a name="g_t_002dvar_002dlist_002dchildren"></a><span>Return a list of the children of the specified variable object and create variable objects for them, if they do not already exist. With a single argument or if </span><span style="font-style:italic">print-values</span><span> has a value of 0 or </span><span style="font-family:'Consolas'; font-size:10pt">--no-values</span><span>, print only the names of the variables; if </span><span style="font-style:italic">print-values</span><span> is 1 or </span><span style="font-family:'Consolas'; font-size:10pt">--all-values</span><span>, also print their values; and if it is 2 or </span><span style="font-family:'Consolas'; font-size:10pt">--simple-values</span><span> print the name and value for simple data types and just the name for arrays, structures and unions. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span style="font-style:italic">from</span><span> and </span><span style="font-style:italic">to</span><span>, if specified, indicate the range of children to report. If </span><span style="font-style:italic">from</span><span> or </span><span style="font-style:italic">to</span><span> is less than zero, the range is reset and all children will be reported. Otherwise, children starting at </span><span style="font-style:italic">from</span><span> (zero-based) and up to and excluding </span><span style="font-style:italic">to</span><span> will be reported. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>If a child range is requested, it will only affect the current call to </span><span style="font-family:'Consolas'; font-size:10pt">-var-list-children</span><span>, but not future calls to </span><span style="font-family:'Consolas'; font-size:10pt">-var-update</span><span>. For this, you must instead use </span><span style="font-family:'Consolas'; font-size:10pt">-var-set-update-range</span><span>. The intent of this approach is to enable a front end to implement any update approach it likes; for example, scrolling a view may cause the front end to request more children with </span><span style="font-family:'Consolas'; font-size:10pt">-var-list-children</span><span>, and then the front end could call </span><span style="font-family:'Consolas'; font-size:10pt">-var-set-update-range</span><span> with a different range to ensure that future updates are restricted to just the visible items. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>For each child the following results are returned: </span></p><p><span style="font-style:italic">name</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Name of the variable object created for this child. </span></p><p><span style="font-style:italic">exp</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The expression to be shown to the user by the front end to designate this child. For example this may be the name of a structure member. </span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>For a dynamic varobj, this value cannot be used to form an expression. There is no way to do this at all with a dynamic varobj. </span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>For C/C</span><span style="font-family:'Consolas'; font-size:10pt">++</span><span> structures there are several pseudo children returned to designate access qualifiers. For these pseudo children </span><span style="font-style:italic">exp</span><span> is ‘</span><span style="font-family:'Consolas'; font-size:10pt">public</span><span>’, ‘</span><span style="font-family:'Consolas'; font-size:10pt">private</span><span>’, or ‘</span><span style="font-family:'Consolas'; font-size:10pt">protected</span><span>’. In this case the type and value are not present. </span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>A dynamic varobj will not report the access qualifying pseudo-children, regardless of the language. This information is not available at all with a dynamic varobj. </span></p><p><span style="font-style:italic">numchild</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>Number of children this child has. For a dynamic varobj, this will be 0. </span></p><p><span style="font-style:italic">type</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The type of the child. If ‘</span><span style="font-family:'Consolas'; font-size:10pt">print object</span><span>’ (see </span><a href="Print-Settings.html#Print-Settings" style="text-decoration:none"><span style="text-decoration:underline">set print object</span></a><span>) is set to </span><span style="font-family:'Consolas'; font-size:10pt">on</span><span>, the </span><span style="font-style:italic">actual</span><span> (derived) type of the object is shown rather than the </span><span style="font-style:italic">declared</span><span> one. </span></p><p><span style="font-style:italic">value</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>If values were requested, this is the value. </span></p><p><span style="font-style:italic">thread-id</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>If this variable object is associated with a thread, this is the thread’s global thread id. Otherwise this result is not present. </span></p><p><span style="font-style:italic">frozen</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>If the variable object is frozen, this variable will be present with a value of 1. </span></p><p><span style="font-style:italic">displayhint</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>A dynamic varobj can supply a display hint to the front end. The value comes directly from the Python pretty-printer object’s </span><span style="font-family:'Consolas'; font-size:10pt">display_hint</span><span> method. See </span><a href="Pretty-Printing-API.html#Pretty-Printing-API" style="text-decoration:none"><span style="text-decoration:underline">Pretty Printing API</span></a><span>. </span></p><p><span style="font-style:italic">dynamic</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>This attribute will be present and have the value ‘</span><span style="font-family:'Consolas'; font-size:10pt">1</span><span>’ if the varobj is a dynamic varobj. If the varobj is not a dynamic varobj, then this attribute will not be present. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>The result may have its own attributes: </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">displayhint</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>A dynamic varobj can supply a display hint to the front end. The value comes directly from the Python pretty-printer object’s </span><span style="font-family:'Consolas'; font-size:10pt">display_hint</span><span> method. See </span><a href="Pretty-Printing-API.html#Pretty-Printing-API" style="text-decoration:none"><span style="text-decoration:underline">Pretty Printing API</span></a><span>. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">has_more</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>This is an integer attribute which is nonzero if there are children remaining after the end of the selected range. </span><a name="Example-46"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-var-list-children n</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">^done,numchild=</span><span style="font-family:'Consolas'; font-style:italic">n</span><span style="font-family:'Consolas'">,children=[child={name=</span><span style="font-family:'Consolas'; font-style:italic">name</span><span style="font-family:'Consolas'">,exp=</span><span style="font-family:'Consolas'; font-style:italic">exp</span><span style="font-family:'Consolas'">,</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">numchild=</span><span style="font-family:'Consolas'; font-style:italic">n</span><span style="font-family:'Consolas'">,type=</span><span style="font-family:'Consolas'; font-style:italic">type</span><span style="font-family:'Consolas'">},</span><span class="spanroman">(repeats N times)</span><span style="font-family:'Consolas'">]</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-var-list-children --all-values n</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">^done,numchild=</span><span style="font-family:'Consolas'; font-style:italic">n</span><span style="font-family:'Consolas'">,children=[child={name=</span><span style="font-family:'Consolas'; font-style:italic">name</span><span style="font-family:'Consolas'">,exp=</span><span style="font-family:'Consolas'; font-style:italic">exp</span><span style="font-family:'Consolas'">,</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">numchild=</span><span style="font-family:'Consolas'; font-style:italic">n</span><span style="font-family:'Consolas'">,value=</span><span style="font-family:'Consolas'; font-style:italic">value</span><span style="font-family:'Consolas'">,type=</span><span style="font-family:'Consolas'; font-style:italic">type</span><span style="font-family:'Consolas'">},</span><span class="spanroman">(repeats N times)</span><span style="font-family:'Consolas'">]</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dvar_002dinfo_002dtype-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-var-info-type</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dvar_002dinfo_002dtype"></a><a name="Synopsis-54"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-var-info-type </span><span style="font-family:'Consolas'; font-style:italic">name</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Returns the type of the specified variable </span><span style="font-style:italic">name</span><span>. The type is returned as a string in the same format as it is output by the </span><span style="font-size:10pt">GDB</span><span> CLI: </span></p><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">type=</span><span style="font-family:'Consolas'; font-style:italic">typename</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dvar_002dinfo_002dexpression-Com"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-var-info-expression</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dvar_002dinfo_002dexpression"></a><a name="Synopsis-55"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-var-info-expression </span><span style="font-family:'Consolas'; font-style:italic">name</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Returns a string that is suitable for presenting this variable object in user interface. The string is generally not valid expression in the current language, and cannot be evaluated. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>For example, if </span><span style="font-family:'Consolas'; font-size:10pt">a</span><span> is an array, and variable object </span><span style="font-family:'Consolas'; font-size:10pt">A</span><span> was created for </span><span style="font-family:'Consolas'; font-size:10pt">a</span><span>, then we’ll get this output: </span></p><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb) -var-info-expression A.1</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,lang="C",exp="1"</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Here, the value of </span><span style="font-family:'Consolas'; font-size:10pt">lang</span><span> is the language name, which can be found in </span><a href="Supported-Languages.html#Supported-Languages" style="text-decoration:none"><span style="text-decoration:underline">Supported Languages</span></a><span>. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Note that the output of the </span><span style="font-family:'Consolas'; font-size:10pt">-var-list-children</span><span> command also includes those expressions, so the </span><span style="font-family:'Consolas'; font-size:10pt">-var-info-expression</span><span> command is of limited use. </span><a name="The-_002dvar_002dinfo_002dpath_002dexpre"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-var-info-path-expression</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dvar_002dinfo_002dpath_002dexp"></a><a name="Synopsis-56"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-var-info-path-expression </span><span style="font-family:'Consolas'; font-style:italic">name</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Returns an expression that can be evaluated in the current context and will yield the same value that a variable object has. Compare this with the </span><span style="font-family:'Consolas'; font-size:10pt">-var-info-expression</span><span> command, which result can be used only for UI presentation. Typical use of the </span><span style="font-family:'Consolas'; font-size:10pt">-var-info-path-expression</span><span> command is creating a watchpoint from a variable object. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>This command is currently not valid for children of a dynamic varobj, and will give an error when invoked on one. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>For example, suppose </span><span style="font-family:'Consolas'; font-size:10pt">C</span><span> is a C</span><span style="font-family:'Consolas'; font-size:10pt">++</span><span> class, derived from class </span><span style="font-family:'Consolas'; font-size:10pt">Base</span><span>, and that the </span><span style="font-family:'Consolas'; font-size:10pt">Base</span><span> class has a member called </span><span style="font-family:'Consolas'; font-size:10pt">m_size</span><span>. Assume a variable </span><span style="font-family:'Consolas'; font-size:10pt">c</span><span> is has the type of </span><span style="font-family:'Consolas'; font-size:10pt">C</span><span> and a variable object </span><span style="font-family:'Consolas'; font-size:10pt">C</span><span> was created for variable </span><span style="font-family:'Consolas'; font-size:10pt">c</span><span>. Then, we’ll get this output: </span></p><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb) -var-info-path-expression C.Base.public.m_size</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,path_expr=((Base)c).m_size)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dvar_002dshow_002dattributes-Com"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-var-show-attributes</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dvar_002dshow_002dattributes"></a><a name="Synopsis-57"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-var-show-attributes </span><span style="font-family:'Consolas'; font-style:italic">name</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>List attributes of the specified variable object </span><span style="font-style:italic">name</span><span>: </span></p><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">status=</span><span style="font-family:'Consolas'; font-style:italic">attr</span><span style="font-family:'Consolas'"> [ ( ,</span><span style="font-family:'Consolas'; font-style:italic">attr</span><span style="font-family:'Consolas'"> )* ]</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>where </span><span style="font-style:italic">attr</span><span> is </span><span style="font-family:'Consolas'; font-size:10pt">{ { editable | noneditable } | TBD }</span><span>. </span><a name="The-_002dvar_002devaluate_002dexpression"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-var-evaluate-expression</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dvar_002devaluate_002dexpressi"></a><a name="Synopsis-58"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-var-evaluate-expression [-f </span><span style="font-family:'Consolas'; font-style:italic">format-spec</span><span style="font-family:'Consolas'">] </span><span style="font-family:'Consolas'; font-style:italic">name</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Evaluates the expression that is represented by the specified variable object and returns its value as a string. The format of the string can be specified with the ‘</span><span style="font-family:'Consolas'; font-size:10pt">-f</span><span>’ option. The possible values of this option are the same as for </span><span style="font-family:'Consolas'; font-size:10pt">-var-set-format</span><span> (see </span><a href="#g_t_002dvar_002dset_002dformat" style="text-decoration:none"><span style="text-decoration:underline">-var-set-format</span></a><span>). If the ‘</span><span style="font-family:'Consolas'; font-size:10pt">-f</span><span>’ option is not specified, the current display format will be used. The current display format can be changed using the </span><span style="font-family:'Consolas'; font-size:10pt">-var-set-format</span><span> command. </span></p><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">value=</span><span style="font-family:'Consolas'; font-style:italic">value</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Note that one must invoke </span><span style="font-family:'Consolas'; font-size:10pt">-var-list-children</span><span> for a variable before the value of a child variable can be evaluated. </span><a name="The-_002dvar_002dassign-Command"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-var-assign</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dvar_002dassign"></a><a name="Synopsis-59"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-var-assign </span><span style="font-family:'Consolas'; font-style:italic">name</span><span style="font-family:'Consolas'"> </span><span style="font-family:'Consolas'; font-style:italic">expression</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Assigns the value of </span><span style="font-style:italic">expression</span><span> to the variable object specified by </span><span style="font-style:italic">name</span><span>. The object must be ‘</span><span style="font-family:'Consolas'; font-size:10pt">editable</span><span>’. If the variable’s value is altered by the assign, the variable will show up in any subsequent </span><span style="font-family:'Consolas'; font-size:10pt">-var-update</span><span> list. </span><a name="Example-47"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-var-assign var1 3</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,value="3"</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-var-update *</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,changelist=[{name="var1",in_scope="true",type_changed="false"}]</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dvar_002dupdate-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-var-update</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dvar_002dupdate"></a><a name="Synopsis-60"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-var-update [</span><span style="font-family:'Consolas'; font-style:italic">print-values</span><span style="font-family:'Consolas'">] {</span><span style="font-family:'Consolas'; font-style:italic">name</span><span style="font-family:'Consolas'"> | "*"}</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Reevaluate the expressions corresponding to the variable object </span><span style="font-style:italic">name</span><span> and all its direct and indirect children, and return the list of variable objects whose values have changed; </span><span style="font-style:italic">name</span><span> must be a root variable object. Here, “changed” means that the result of </span><span style="font-family:'Consolas'; font-size:10pt">-var-evaluate-expression</span><span> before and after the </span><span style="font-family:'Consolas'; font-size:10pt">-var-update</span><span> is different. If ‘</span><span style="font-family:'Consolas'; font-size:10pt">*</span><span>’ is used as the variable object names, all existing variable objects are updated, except for frozen ones (see </span><a href="#g_t_002dvar_002dset_002dfrozen" style="text-decoration:none"><span style="text-decoration:underline">-var-set-frozen</span></a><span>). The option </span><span style="font-style:italic">print-values</span><span> determines whether both names and values, or just names are printed. The possible values of this option are the same as for </span><span style="font-family:'Consolas'; font-size:10pt">-var-list-children</span><span> (see </span><a href="#g_t_002dvar_002dlist_002dchildren" style="text-decoration:none"><span style="text-decoration:underline">-var-list-children</span></a><span>). It is recommended to use the ‘</span><span style="font-family:'Consolas'; font-size:10pt">--all-values</span><span>’ option, to reduce the number of MI commands needed on each program stop. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>With the ‘</span><span style="font-family:'Consolas'; font-size:10pt">*</span><span>’ parameter, if a variable object is bound to a currently running thread, it will not be updated, without any diagnostic. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>If </span><span style="font-family:'Consolas'; font-size:10pt">-var-set-update-range</span><span> was previously used on a varobj, then only the selected range of children will be reported. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span style="font-family:'Consolas'; font-size:10pt">-var-update</span><span> reports all the changed varobjs in a tuple named ‘</span><span style="font-family:'Consolas'; font-size:10pt">changelist</span><span>’. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Each item in the change list is itself a tuple holding: </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">name</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The name of the varobj. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">value</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>If values were requested for this update, then this field will be present and will hold the value of the varobj. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">in_scope</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><a name="g_t_002dvar_002dupdate"></a><span>This field is a string which may take one of three values: </span></p><p style="margin-left:30pt; font-size:10pt"><span style="font-family:'Consolas'">"true"</span></p><p style="margin-top:12pt; margin-left:60pt; margin-bottom:12pt"><span>The variable object’s current value is valid. </span></p><p style="margin-left:30pt; font-size:10pt"><span style="font-family:'Consolas'">"false"</span></p><p style="margin-top:12pt; margin-left:60pt; margin-bottom:12pt"><span>The variable object does not currently hold a valid value but it may hold one in the future if its associated expression comes back into scope. </span></p><p style="margin-left:30pt; font-size:10pt"><span style="font-family:'Consolas'">"invalid"</span></p><p style="margin-top:12pt; margin-left:60pt; margin-bottom:12pt"><span>The variable object no longer holds a valid value. This can occur when the executable file being debugged has changed, either through recompilation or by using the </span><span style="font-size:10pt">GDB</span><span> </span><span style="font-family:'Consolas'; font-size:10pt">file</span><span> command. The front end should normally choose to delete these variable objects. </span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>In the future new values may be added to this list so the front should be prepared for this possibility. See </span><a href="GDB_002fMI-Development-and-Front-Ends.html#GDB_002fMI-Development-and-Front-Ends" style="text-decoration:none"><span style="font-size:10pt; text-decoration:underline">GDB/MI</span><span style="text-decoration:underline"> Development and Front Ends</span></a><span>. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">type_changed</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>This is only present if the varobj is still valid. If the type changed, then this will be the string ‘</span><span style="font-family:'Consolas'; font-size:10pt">true</span><span>’; otherwise it will be ‘</span><span style="font-family:'Consolas'; font-size:10pt">false</span><span>’. </span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>When a varobj’s type changes, its children are also likely to have become incorrect. Therefore, the varobj’s children are automatically deleted when this attribute is ‘</span><span style="font-family:'Consolas'; font-size:10pt">true</span><span>’. Also, the varobj’s update range, when set using the </span><span style="font-family:'Consolas'; font-size:10pt">-var-set-update-range</span><span> command, is unset. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">new_type</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>If the varobj’s type changed, then this field will be present and will hold the new type. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">new_num_children</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>For a dynamic varobj, if the number of children changed, or if the type changed, this will be the new number of children. </span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The ‘</span><span style="font-family:'Consolas'; font-size:10pt">numchild</span><span>’ field in other varobj responses is generally not valid for a dynamic varobj – it will show the number of children that </span><span style="font-size:10pt">GDB</span><span> knows about, but because dynamic varobjs lazily instantiate their children, this will not reflect the number of children which may be available. </span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The ‘</span><span style="font-family:'Consolas'; font-size:10pt">new_num_children</span><span>’ attribute only reports changes to the number of children known by </span><span style="font-size:10pt">GDB</span><span>. This is the only way to detect whether an update has removed children (which necessarily can only happen at the end of the update range). </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">displayhint</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>The display hint, if any. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">has_more</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>This is an integer value, which will be 1 if there are more children available outside the varobj’s update range. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">dynamic</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>This attribute will be present and have the value ‘</span><span style="font-family:'Consolas'; font-size:10pt">1</span><span>’ if the varobj is a dynamic varobj. If the varobj is not a dynamic varobj, then this attribute will not be present. </span></p><p><span>‘</span><span style="font-family:'Consolas'; font-size:10pt">new_children</span><span>’</span></p><p style="margin-top:12pt; margin-left:30pt; margin-bottom:12pt"><span>If new children were added to a dynamic varobj within the selected update range (as set by </span><span style="font-family:'Consolas'; font-size:10pt">-var-set-update-range</span><span>), then they will be listed in this attribute. </span><a name="Example-48"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-var-assign var1 3</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,value="3"</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-var-update --all-values var1</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done,changelist=[{name="var1",value="3",in_scope="true",</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">type_changed="false"}]</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dvar_002dset_002dfrozen-Command"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-var-set-frozen</span><span style="font-family:'Times New Roman'; color:#000000"> Command</span><a name="index-_002dvar_002dset_002dfrozen"></a><a name="g_t_002dvar_002dset_002dfrozen"></a><a name="Synopsis-61"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-var-set-frozen </span><span style="font-family:'Consolas'; font-style:italic">name</span><span style="font-family:'Consolas'"> </span><span style="font-family:'Consolas'; font-style:italic">flag</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Set the frozenness flag on the variable object </span><span style="font-style:italic">name</span><span>. The </span><span style="font-style:italic">flag</span><span> parameter should be either ‘</span><span style="font-family:'Consolas'; font-size:10pt">1</span><span>’ to make the variable frozen or ‘</span><span style="font-family:'Consolas'; font-size:10pt">0</span><span>’ to make it unfrozen. If a variable object is frozen, then neither itself, nor any of its children, are implicitly updated by </span><span style="font-family:'Consolas'; font-size:10pt">-var-update</span><span> of a parent variable or by </span><span style="font-family:'Consolas'; font-size:10pt">-var-update *</span><span>. Only </span><span style="font-family:'Consolas'; font-size:10pt">-var-update</span><span> of the variable itself will update its value and values of its children. After a variable object is unfrozen, it is implicitly updated by all subsequent </span><span style="font-family:'Consolas'; font-size:10pt">-var-update</span><span> operations. Unfreezing a variable does not update it, only subsequent </span><span style="font-family:'Consolas'; font-size:10pt">-var-update</span><span> does. </span><a name="Example-49"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-var-set-frozen V 1</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dvar_002dset_002dupdate_002drang"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-var-set-update-range</span><span style="font-family:'Times New Roman'; color:#000000"> command</span><a name="index-_002dvar_002dset_002dupdate_002dra"></a><a name="g_t_002dvar_002dset_002dupdate_002drange"></a><a name="Synopsis-62"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-var-set-update-range </span><span style="font-family:'Consolas'; font-style:italic">name</span><span style="font-family:'Consolas'"> </span><span style="font-family:'Consolas'; font-style:italic">from</span><span style="font-family:'Consolas'"> </span><span style="font-family:'Consolas'; font-style:italic">to</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Set the range of children to be returned by future invocations of </span><span style="font-family:'Consolas'; font-size:10pt">-var-update</span><span>. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span style="font-style:italic">from</span><span> and </span><span style="font-style:italic">to</span><span> indicate the range of children to report. If </span><span style="font-style:italic">from</span><span> or </span><span style="font-style:italic">to</span><span> is less than zero, the range is reset and all children will be reported. Otherwise, children starting at </span><span style="font-style:italic">from</span><span> (zero-based) and up to and excluding </span><span style="font-style:italic">to</span><span> will be reported. </span><a name="Example-50"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-var-set-update-range V 1 2</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done</span></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><a name="The-_002dvar_002dset_002dvisualizer-comm"></a><span style="font-family:'Times New Roman'; color:#000000">The </span><span style="font-family:'Consolas'; color:#000000">-var-set-visualizer</span><span style="font-family:'Times New Roman'; color:#000000"> command</span><a name="index-_002dvar_002dset_002dvisualizer"></a><a name="g_t_002dvar_002dset_002dvisualizer"></a><a name="Synopsis-63"></a></h4><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Synopsis</span></h4><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'; -aw-import:spaces"> </span><span style="font-family:'Consolas'">-var-set-visualizer </span><span style="font-family:'Consolas'; font-style:italic">name</span><span style="font-family:'Consolas'"> </span><span style="font-family:'Consolas'; font-style:italic">visualizer</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Set a visualizer for the variable object </span><span style="font-style:italic">name</span><span>. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span style="font-style:italic">visualizer</span><span> is the visualizer to use. The special value ‘</span><span style="font-family:'Consolas'; font-size:10pt">None</span><span>’ means to disable any visualizer in use. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>If not ‘</span><span style="font-family:'Consolas'; font-size:10pt">None</span><span>’, </span><span style="font-style:italic">visualizer</span><span> must be a Python expression. This expression must evaluate to a callable object which accepts a single argument. </span><span style="font-size:10pt">GDB</span><span> will call this object with the value of the varobj </span><span style="font-style:italic">name</span><span> as an argument (this is done so that the same Python pretty-printing code can be used for both the CLI and MI). When called, this object must return an object which conforms to the pretty-printing interface (see </span><a href="Pretty-Printing-API.html#Pretty-Printing-API" style="text-decoration:none"><span style="text-decoration:underline">Pretty Printing API</span></a><span>). </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>The pre-defined function </span><span style="font-family:'Consolas'; font-size:10pt">gdb.default_visualizer</span><span> may be used to select a visualizer by following the built-in process (see </span><a href="Selecting-Pretty_002dPrinters.html#Selecting-Pretty_002dPrinters" style="text-decoration:none"><span style="text-decoration:underline">Selecting Pretty-Printers</span></a><span>). This is done automatically when a varobj is created, and so ordinarily is not needed. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>This feature is only available if Python support is enabled. The MI command </span><span style="font-family:'Consolas'; font-size:10pt">-list-features</span><span> (see </span><a href="GDB_002fMI-Support-Commands.html#GDB_002fMI-Support-Commands" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Support Commands</span></a><span>) can be used to check this. </span><a name="Example-51"></a></p><h4 style="margin-top:15.95pt; margin-bottom:15.95pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">Example</span></h4><p style="margin-top:12pt; margin-bottom:12pt"><span>Resetting the visualizer: </span></p><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-var-set-visualizer V None</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Reselecting the default (type-based) visualizer: </span></p><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-var-set-visualizer V gdb.default_visualizer</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done</span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>Suppose </span><span style="font-family:'Consolas'; font-size:10pt">SomeClass</span><span> is a visualizer class. A lambda expression can be used to instantiate this class for a varobj: </span></p><p class="presmallexample1" style="margin-top:10pt; margin-left:38.4pt"><span style="font-family:'Consolas'">(gdb)</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">-var-set-visualizer V "lambda val: SomeClass()"</span></p><p class="presmallexample1" style="margin-left:38.4pt"><span style="font-family:'Consolas'">^done</span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><p style="margin-top:12pt; margin-bottom:12pt"><span>Next: </span><a href="GDB_002fMI-Data-Manipulation.html#GDB_002fMI-Data-Manipulation" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Data Manipulation</span></a><span>, Previous: </span><a href="GDB_002fMI-Stack-Manipulation.html#GDB_002fMI-Stack-Manipulation" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Stack Manipulation</span></a><span>, Up: </span><a href="GDB_002fMI.html#GDB_002fMI" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p></div><br style="page-break-before:always; clear:both; mso-break-type:section-break" /><div><p style="margin-bottom:12pt"><a name="GDB_002fMI-General-Design"></a><span>Next: </span><a href="GDB_002fMI-Command-Syntax.html#GDB_002fMI-Command-Syntax" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Command Syntax</span></a><span>, Up: </span><a href="GDB_002fMI.html#GDB_002fMI" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p><div align="center"><hr size="2" align="center" style="width:100%" /></div><p><a name="GDB_002fMI-General-Design-1"></a></p><h3 style="margin-top:14.05pt; margin-bottom:14.05pt; page-break-inside:auto; page-break-after:auto"><span style="font-family:'Times New Roman'; color:#000000">27.1 </span><span style="font-family:'Times New Roman'; font-size:11.5pt; color:#000000">GDB/MI</span><span style="font-family:'Times New Roman'; color:#000000"> General Design</span><a name="index-GDB_002fMI-General-Design"></a></h3><p style="margin-top:12pt; margin-bottom:12pt"><span>Interaction of a </span><span style="font-size:10pt">GDB/MI</span><span> frontend with </span><span style="font-size:10pt">GDB</span><span> involves three parts—commands sent to </span><span style="font-size:10pt">GDB</span><span>, responses to those commands and notifications. Each command results in exactly one response, indicating either successful completion of the command, or an error. For the commands that do not resume the target, the response contains the requested information. For the commands that resume the target, the response only indicates whether the target was successfully resumed. Notifications is the mechanism for reporting changes in the state of the target, or in </span><span style="font-size:10pt">GDB</span><span> state, that cannot conveniently be associated with a command and reported as part of that command response. </span></p><p style="margin-top:12pt; margin-bottom:12pt"><span>The important examples of notifications are: </span></p><ul type="disc" style="margin:0pt; padding-left:0pt"><li style="margin-top:12pt; margin-left:36pt; font-family:serif; -aw-font-family:'Symbol'; -aw-font-weight:normal; -aw-number-format:''"><span style="font-family:'Times New Roman'">Exec notifications. These are used to report changes in target state—when a target is resumed, or stopped. It would not be feasible to include this information in response of resuming commands, because one resume commands can result in multiple events in different threads. Also, quite some time may pass before any event happens in the target, while a frontend needs to know whether the resuming command itself was successfully executed. </span></li><li style="margin-left:36pt; font-family:serif; -aw-font-family:'Symbol'; -aw-font-weight:normal; -aw-number-format:''"><span style="font-family:'Times New Roman'">Console output, and status notifications. Console output notifications are used to report output of CLI commands, as well as diagnostics for other commands. Status notifications are used to report the progress of a long-running operation. Naturally, including this information in command response would mean no output is produced until the command is finished, which is undesirable. </span></li><li style="margin-left:36pt; margin-bottom:12pt; font-family:serif; -aw-font-family:'Symbol'; -aw-font-weight:normal; -aw-number-format:''"><span style="font-family:'Times New Roman'">General notifications. Commands may have various side effects on the </span><span style="font-family:'Times New Roman'; font-size:10pt">GDB</span><span style="font-family:'Times New Roman'"> or target state beyond their official purpose. For example, a command may change the selected thread. Although such changes can be included in command response, using notification allows for more orthogonal frontend design. </span></li></ul><p style="margin-top:12pt; margin-bottom:12pt"><span>There’s no guarantee that whenever an MI command reports an error, </span><span style="font-size:10pt">GDB</span><span> or the target are in any specific state, and especially, the state is not reverted to the state before the MI command was processed. Therefore, whenever an MI command results in an error, we recommend that the frontend refreshes all the information shown in the user interface. </span></p><table cellspacing="0" cellpadding="0" class="menu"><tr><td style="padding:0.75pt; vertical-align:top"><p><span>• </span><a href="Context-management.html#Context-management" style="text-decoration:none"><span style="text-decoration:underline">Context management</span></a><span>:</span></p></td><td style="padding:0.75pt; vertical-align:middle"><p><span> </span><span> </span></p></td><td style="padding:0.75pt; vertical-align:top"><p><span style="-aw-import:ignore"> </span></p></td></tr><tr><td style="padding:0.75pt; vertical-align:top"><p><span>• </span><a href="Asynchronous-and-non_002dstop-modes.html#Asynchronous-and-non_002dstop-modes" style="text-decoration:none"><span style="text-decoration:underline">Asynchronous and non-stop modes</span></a><span>:</span></p></td><td style="padding:0.75pt; vertical-align:middle"><p><span> </span><span> </span></p></td><td style="padding:0.75pt; vertical-align:top"><p><span style="-aw-import:ignore"> </span></p></td></tr><tr><td style="padding:0.75pt; vertical-align:top"><p><span>• </span><a href="Thread-groups.html#Thread-groups" style="text-decoration:none"><span style="text-decoration:underline">Thread groups</span></a><span>:</span></p></td><td style="padding:0.75pt; vertical-align:middle"><p><span> </span><span> </span></p></td><td style="padding:0.75pt; vertical-align:top"><p><span style="-aw-import:ignore"> </span></p></td></tr></table><div align="center"><hr size="2" align="center" style="width:100%" /></div><p style="margin-top:12pt; margin-bottom:12pt"><span>Next: </span><a href="GDB_002fMI-Command-Syntax.html#GDB_002fMI-Command-Syntax" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI Command Syntax</span></a><span>, Up: </span><a href="GDB_002fMI.html#GDB_002fMI" style="text-decoration:none"><span style="text-decoration:underline">GDB/MI</span></a><span> </span><span> </span><span> [</span><a href="index.html#SEC_Contents" title="Table of contents" style="text-decoration:none"><span style="text-decoration:underline">Contents</span></a><span>][</span><a href="Concept-Index.html#Concept-Index" title="Index" style="text-decoration:none"><span style="text-decoration:underline">Index</span></a><span>]</span></p></div></body></html>