1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2<html> 3<!-- Copyright (C) 1988-2021 Free Software Foundation, Inc. 4 5Permission is granted to copy, distribute and/or modify this document 6under the terms of the GNU Free Documentation License, Version 1.3 or 7any later version published by the Free Software Foundation; with the 8Invariant Sections being "Free Software" and "Free Software Needs 9Free Documentation", with the Front-Cover Texts being "A GNU Manual," 10and with the Back-Cover Texts as in (a) below. 11 12(a) The FSF's Back-Cover Text is: "You are free to copy and modify 13this GNU Manual. Buying copies from GNU Press supports the FSF in 14developing GNU and promoting software freedom." --> 15<!-- Created by GNU Texinfo 5.1, http://www.gnu.org/software/texinfo/ --> 16<head> 17<title>Debugging with GDB: TUI Commands</title> 18 19<meta name="description" content="Debugging with GDB: TUI Commands"> 20<meta name="keywords" content="Debugging with GDB: TUI Commands"> 21<meta name="resource-type" content="document"> 22<meta name="distribution" content="global"> 23<meta name="Generator" content="makeinfo"> 24<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 25<link href="index.html#Top" rel="start" title="Top"> 26<link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index"> 27<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> 28<link href="TUI.html#TUI" rel="up" title="TUI"> 29<link href="TUI-Configuration.html#TUI-Configuration" rel="next" title="TUI Configuration"> 30<link href="TUI-Single-Key-Mode.html#TUI-Single-Key-Mode" rel="previous" title="TUI Single Key Mode"> 31<style type="text/css"> 32<!-- 33a.summary-letter {text-decoration: none} 34blockquote.smallquotation {font-size: smaller} 35div.display {margin-left: 3.2em} 36div.example {margin-left: 3.2em} 37div.indentedblock {margin-left: 3.2em} 38div.lisp {margin-left: 3.2em} 39div.smalldisplay {margin-left: 3.2em} 40div.smallexample {margin-left: 3.2em} 41div.smallindentedblock {margin-left: 3.2em; font-size: smaller} 42div.smalllisp {margin-left: 3.2em} 43kbd {font-style:oblique} 44pre.display {font-family: inherit} 45pre.format {font-family: inherit} 46pre.menu-comment {font-family: serif} 47pre.menu-preformatted {font-family: serif} 48pre.smalldisplay {font-family: inherit; font-size: smaller} 49pre.smallexample {font-size: smaller} 50pre.smallformat {font-family: inherit; font-size: smaller} 51pre.smalllisp {font-size: smaller} 52span.nocodebreak {white-space:nowrap} 53span.nolinebreak {white-space:nowrap} 54span.roman {font-family:serif; font-weight:normal} 55span.sansserif {font-family:sans-serif; font-weight:normal} 56ul.no-bullet {list-style: none} 57--> 58</style> 59 60 61</head> 62 63<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"> 64<a name="TUI-Commands"></a> 65<div class="header"> 66<p> 67Next: <a href="TUI-Configuration.html#TUI-Configuration" accesskey="n" rel="next">TUI Configuration</a>, Previous: <a href="TUI-Single-Key-Mode.html#TUI-Single-Key-Mode" accesskey="p" rel="previous">TUI Single Key Mode</a>, Up: <a href="TUI.html#TUI" accesskey="u" rel="up">TUI</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p> 68</div> 69<hr> 70<a name="TUI_002dSpecific-Commands"></a> 71<h3 class="section">25.4 TUI-Specific Commands</h3> 72<a name="index-TUI-commands"></a> 73 74<p>The TUI has specific commands to control the text windows. 75These commands are always available, even when <small>GDB</small> is not in 76the TUI mode. When <small>GDB</small> is in the standard mode, most 77of these commands will automatically switch to the TUI mode. 78</p> 79<p>Note that if <small>GDB</small>’s <code>stdout</code> is not connected to a 80terminal, or <small>GDB</small> has been started with the machine interface 81interpreter (see <a href="GDB_002fMI.html#GDB_002fMI">The <small>GDB/MI</small> Interface</a>), most of 82these commands will fail with an error, because it would not be 83possible or desirable to enable curses window management. 84</p> 85<dl compact="compact"> 86<dt><code>tui enable</code></dt> 87<dd><a name="index-tui-enable"></a> 88<p>Activate TUI mode. The last active TUI window layout will be used if 89TUI mode has previously been used in the current debugging session, 90otherwise a default layout is used. 91</p> 92</dd> 93<dt><code>tui disable</code></dt> 94<dd><a name="index-tui-disable"></a> 95<p>Disable TUI mode, returning to the console interpreter. 96</p> 97</dd> 98<dt><code>info win</code></dt> 99<dd><a name="index-info-win"></a> 100<p>List and give the size of all displayed windows. 101</p> 102</dd> 103<dt><code>tui new-layout <var>name</var> <var>window</var> <var>weight</var> <span class="roman">[</span><var>window</var> <var>weight</var>…<span class="roman">]</span></code></dt> 104<dd><a name="index-tui-new_002dlayout"></a> 105<p>Create a new TUI layout. The new layout will be named <var>name</var>, and 106can be accessed using the <code>layout</code> command (see below). 107</p> 108<p>Each <var>window</var> parameter is either the name of a window to display, 109or a window description. The windows will be displayed from top to 110bottom in the order listed. 111</p> 112<p>The names of the windows are the same as the ones given to the 113<code>focus</code> command (see below); additional, the <code>status</code> 114window can be specified. Note that, because it is of fixed height, 115the weight assigned to the status window is of no importance. It is 116conventional to use ‘<samp>0</samp>’ here. 117</p> 118<p>A window description looks a bit like an invocation of <code>tui 119new-layout</code>, and is of the form 120{<span class="roman">[</span><code>-horizontal</code><span class="roman">]</span><var>window</var> <var>weight</var> <span class="roman">[</span><var>window</var> <var>weight</var>…<span class="roman">]</span>}. 121</p> 122<p>This specifies a sub-layout. If <code>-horizontal</code> is given, the 123windows in this description will be arranged side-by-side, rather than 124top-to-bottom. 125</p> 126<p>Each <var>weight</var> is an integer. It is the weight of this window 127relative to all the other windows in the layout. These numbers are 128used to calculate how much of the screen is given to each window. 129</p> 130<p>For example: 131</p> 132<div class="example"> 133<pre class="example">(gdb) tui new-layout example src 1 regs 1 status 0 cmd 1 134</pre></div> 135 136<p>Here, the new layout is called ‘<samp>example</samp>’. It shows the source 137and register windows, followed by the status window, and then finally 138the command window. The non-status windows all have the same weight, 139so the terminal will be split into three roughly equal sections. 140</p> 141<p>Here is a more complex example, showing a horizontal layout: 142</p> 143<div class="example"> 144<pre class="example">(gdb) tui new-layout example {-horizontal src 1 asm 1} 2 status 0 cmd 1 145</pre></div> 146 147<p>This will result in side-by-side source and assembly windows; with the 148status and command window being beneath these, filling the entire 149width of the terminal. Because they have weight 2, the source and 150assembly windows will be twice the height of the command window. 151</p> 152</dd> 153<dt><code>layout <var>name</var></code></dt> 154<dd><a name="index-layout"></a> 155<p>Changes which TUI windows are displayed. The <var>name</var> parameter 156controls which layout is shown. It can be either one of the built-in 157layout names, or the name of a layout defined by the user using 158<code>tui new-layout</code>. 159</p> 160<p>The built-in layouts are as follows: 161</p> 162<dl compact="compact"> 163<dt><code>next</code></dt> 164<dd><p>Display the next layout. 165</p> 166</dd> 167<dt><code>prev</code></dt> 168<dd><p>Display the previous layout. 169</p> 170</dd> 171<dt><code>src</code></dt> 172<dd><p>Display the source and command windows. 173</p> 174</dd> 175<dt><code>asm</code></dt> 176<dd><p>Display the assembly and command windows. 177</p> 178</dd> 179<dt><code>split</code></dt> 180<dd><p>Display the source, assembly, and command windows. 181</p> 182</dd> 183<dt><code>regs</code></dt> 184<dd><p>When in <code>src</code> layout display the register, source, and command 185windows. When in <code>asm</code> or <code>split</code> layout display the 186register, assembler, and command windows. 187</p></dd> 188</dl> 189 190</dd> 191<dt><code>focus <var>name</var></code></dt> 192<dd><a name="index-focus"></a> 193<p>Changes which TUI window is currently active for scrolling. The 194<var>name</var> parameter can be any of the following: 195</p> 196<dl compact="compact"> 197<dt><code>next</code></dt> 198<dd><p>Make the next window active for scrolling. 199</p> 200</dd> 201<dt><code>prev</code></dt> 202<dd><p>Make the previous window active for scrolling. 203</p> 204</dd> 205<dt><code>src</code></dt> 206<dd><p>Make the source window active for scrolling. 207</p> 208</dd> 209<dt><code>asm</code></dt> 210<dd><p>Make the assembly window active for scrolling. 211</p> 212</dd> 213<dt><code>regs</code></dt> 214<dd><p>Make the register window active for scrolling. 215</p> 216</dd> 217<dt><code>cmd</code></dt> 218<dd><p>Make the command window active for scrolling. 219</p></dd> 220</dl> 221 222</dd> 223<dt><code>refresh</code></dt> 224<dd><a name="index-refresh"></a> 225<p>Refresh the screen. This is similar to typing <kbd>C-L</kbd>. 226</p> 227</dd> 228<dt><code>tui reg <var>group</var></code></dt> 229<dd><a name="index-tui-reg"></a> 230<p>Changes the register group displayed in the tui register window to 231<var>group</var>. If the register window is not currently displayed this 232command will cause the register window to be displayed. The list of 233register groups, as well as their order is target specific. The 234following groups are available on most targets: 235</p><dl compact="compact"> 236<dt><code>next</code></dt> 237<dd><p>Repeatedly selecting this group will cause the display to cycle 238through all of the available register groups. 239</p> 240</dd> 241<dt><code>prev</code></dt> 242<dd><p>Repeatedly selecting this group will cause the display to cycle 243through all of the available register groups in the reverse order to 244<var>next</var>. 245</p> 246</dd> 247<dt><code>general</code></dt> 248<dd><p>Display the general registers. 249</p></dd> 250<dt><code>float</code></dt> 251<dd><p>Display the floating point registers. 252</p></dd> 253<dt><code>system</code></dt> 254<dd><p>Display the system registers. 255</p></dd> 256<dt><code>vector</code></dt> 257<dd><p>Display the vector registers. 258</p></dd> 259<dt><code>all</code></dt> 260<dd><p>Display all registers. 261</p></dd> 262</dl> 263 264</dd> 265<dt><code>update</code></dt> 266<dd><a name="index-update"></a> 267<p>Update the source window and the current execution point. 268</p> 269</dd> 270<dt><code>winheight <var>name</var> +<var>count</var></code></dt> 271<dt><code>winheight <var>name</var> -<var>count</var></code></dt> 272<dd><a name="index-winheight"></a> 273<p>Change the height of the window <var>name</var> by <var>count</var> 274lines. Positive counts increase the height, while negative counts 275decrease it. The <var>name</var> parameter can be one of <code>src</code> (the 276source window), <code>cmd</code> (the command window), <code>asm</code> (the 277disassembly window), or <code>regs</code> (the register display window). 278</p></dd> 279</dl> 280 281<hr> 282<div class="header"> 283<p> 284Next: <a href="TUI-Configuration.html#TUI-Configuration" accesskey="n" rel="next">TUI Configuration</a>, Previous: <a href="TUI-Single-Key-Mode.html#TUI-Single-Key-Mode" accesskey="p" rel="previous">TUI Single Key Mode</a>, Up: <a href="TUI.html#TUI" accesskey="u" rel="up">TUI</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p> 285</div> 286 287 288 289</body> 290</html> 291