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: MIPS</title> 18 19<meta name="description" content="Debugging with GDB: MIPS"> 20<meta name="keywords" content="Debugging with GDB: MIPS"> 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="Architectures.html#Architectures" rel="up" title="Architectures"> 29<link href="HPPA.html#HPPA" rel="next" title="HPPA"> 30<link href="Alpha.html#Alpha" rel="previous" title="Alpha"> 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="MIPS"></a> 65<div class="header"> 66<p> 67Next: <a href="HPPA.html#HPPA" accesskey="n" rel="next">HPPA</a>, Previous: <a href="Alpha.html#Alpha" accesskey="p" rel="previous">Alpha</a>, Up: <a href="Architectures.html#Architectures" accesskey="u" rel="up">Architectures</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="MIPS-1"></a> 71<h4 class="subsection">21.4.4 <acronym>MIPS</acronym></h4> 72 73<a name="index-stack-on-Alpha"></a> 74<a name="index-stack-on-MIPS"></a> 75<a name="index-Alpha-stack"></a> 76<a name="index-MIPS-stack"></a> 77<p>Alpha- and <acronym>MIPS</acronym>-based computers use an unusual stack frame, which 78sometimes requires <small>GDB</small> to search backward in the object code to 79find the beginning of a function. 80</p> 81<a name="index-response-time_002c-MIPS-debugging"></a> 82<p>To improve response time (especially for embedded applications, where 83<small>GDB</small> may be restricted to a slow serial line for this search) 84you may want to limit the size of this search, using one of these 85commands: 86</p> 87<dl compact="compact"> 88<dd><a name="index-heuristic_002dfence_002dpost-_0028Alpha_002c-MIPS_0029"></a> 89</dd> 90<dt><code>set heuristic-fence-post <var>limit</var></code></dt> 91<dd><p>Restrict <small>GDB</small> to examining at most <var>limit</var> bytes in its 92search for the beginning of a function. A value of <var>0</var> (the 93default) means there is no limit. However, except for <var>0</var>, the 94larger the limit the more bytes <code>heuristic-fence-post</code> must search 95and therefore the longer it takes to run. You should only need to use 96this command when debugging a stripped executable. 97</p> 98</dd> 99<dt><code>show heuristic-fence-post</code></dt> 100<dd><p>Display the current limit. 101</p></dd> 102</dl> 103 104<p>These commands are available <em>only</em> when <small>GDB</small> is configured 105for debugging programs on Alpha or <acronym>MIPS</acronym> processors. 106</p> 107<p>Several <acronym>MIPS</acronym>-specific commands are available when debugging <acronym>MIPS</acronym> 108programs: 109</p> 110<dl compact="compact"> 111<dt><code>set mips abi <var>arg</var></code></dt> 112<dd><a name="index-set-mips-abi"></a> 113<a name="index-set-ABI-for-MIPS"></a> 114<p>Tell <small>GDB</small> which <acronym>MIPS</acronym> ABI is used by the inferior. Possible 115values of <var>arg</var> are: 116</p> 117<dl compact="compact"> 118<dt>‘<samp>auto</samp>’</dt> 119<dd><p>The default ABI associated with the current binary (this is the 120default). 121</p></dd> 122<dt>‘<samp>o32</samp>’</dt> 123<dt>‘<samp>o64</samp>’</dt> 124<dt>‘<samp>n32</samp>’</dt> 125<dt>‘<samp>n64</samp>’</dt> 126<dt>‘<samp>eabi32</samp>’</dt> 127<dt>‘<samp>eabi64</samp>’</dt> 128</dl> 129 130</dd> 131<dt><code>show mips abi</code></dt> 132<dd><a name="index-show-mips-abi"></a> 133<p>Show the <acronym>MIPS</acronym> ABI used by <small>GDB</small> to debug the inferior. 134</p> 135</dd> 136<dt><code>set mips compression <var>arg</var></code></dt> 137<dd><a name="index-set-mips-compression"></a> 138<a name="index-code-compression_002c-MIPS"></a> 139<p>Tell <small>GDB</small> which <acronym>MIPS</acronym> compressed 140<acronym title="Instruction Set Architecture">ISA</acronym> (Instruction Set Architecture) encoding is used by the 141inferior. <small>GDB</small> uses this for code disassembly and other 142internal interpretation purposes. This setting is only referred to 143when no executable has been associated with the debugging session or 144the executable does not provide information about the encoding it uses. 145Otherwise this setting is automatically updated from information 146provided by the executable. 147</p> 148<p>Possible values of <var>arg</var> are ‘<samp>mips16</samp>’ and ‘<samp>micromips</samp>’. 149The default compressed <acronym title="Instruction Set Architecture">ISA</acronym> encoding is ‘<samp>mips16</samp>’, as 150executables containing <acronym>MIPS16</acronym> code frequently are not 151identified as such. 152</p> 153<p>This setting is “sticky”; that is, it retains its value across 154debugging sessions until reset either explicitly with this command or 155implicitly from an executable. 156</p> 157<p>The compiler and/or assembler typically add symbol table annotations to 158identify functions compiled for the <acronym>MIPS16</acronym> or 159<acronym>microMIPS</acronym> <acronym title="Instruction Set Architecture">ISA</acronym>s. If these function-scope annotations 160are present, <small>GDB</small> uses them in preference to the global 161compressed <acronym title="Instruction Set Architecture">ISA</acronym> encoding setting. 162</p> 163</dd> 164<dt><code>show mips compression</code></dt> 165<dd><a name="index-show-mips-compression"></a> 166<p>Show the <acronym>MIPS</acronym> compressed <acronym title="Instruction Set Architecture">ISA</acronym> encoding used by 167<small>GDB</small> to debug the inferior. 168</p> 169</dd> 170<dt><code>set mipsfpu</code></dt> 171<dt><code>show mipsfpu</code></dt> 172<dd><p>See <a href="MIPS-Embedded.html#MIPS-Embedded">set mipsfpu</a>. 173</p> 174</dd> 175<dt><code>set mips mask-address <var>arg</var></code></dt> 176<dd><a name="index-set-mips-mask_002daddress"></a> 177<a name="index-MIPS-addresses_002c-masking"></a> 178<p>This command determines whether the most-significant 32 bits of 64-bit 179<acronym>MIPS</acronym> addresses are masked off. The argument <var>arg</var> can be 180‘<samp>on</samp>’, ‘<samp>off</samp>’, or ‘<samp>auto</samp>’. The latter is the default 181setting, which lets <small>GDB</small> determine the correct value. 182</p> 183</dd> 184<dt><code>show mips mask-address</code></dt> 185<dd><a name="index-show-mips-mask_002daddress"></a> 186<p>Show whether the upper 32 bits of <acronym>MIPS</acronym> addresses are masked off or 187not. 188</p> 189</dd> 190<dt><code>set remote-mips64-transfers-32bit-regs</code></dt> 191<dd><a name="index-set-remote_002dmips64_002dtransfers_002d32bit_002dregs"></a> 192<p>This command controls compatibility with 64-bit <acronym>MIPS</acronym> targets that 193transfer data in 32-bit quantities. If you have an old <acronym>MIPS</acronym> 64 target 194that transfers 32 bits for some registers, like <small>SR</small> and <small>FSR</small>, 195and 64 bits for other registers, set this option to ‘<samp>on</samp>’. 196</p> 197</dd> 198<dt><code>show remote-mips64-transfers-32bit-regs</code></dt> 199<dd><a name="index-show-remote_002dmips64_002dtransfers_002d32bit_002dregs"></a> 200<p>Show the current setting of compatibility with older <acronym>MIPS</acronym> 64 targets. 201</p> 202</dd> 203<dt><code>set debug mips</code></dt> 204<dd><a name="index-set-debug-mips"></a> 205<p>This command turns on and off debugging messages for the <acronym>MIPS</acronym>-specific 206target code in <small>GDB</small>. 207</p> 208</dd> 209<dt><code>show debug mips</code></dt> 210<dd><a name="index-show-debug-mips"></a> 211<p>Show the current setting of <acronym>MIPS</acronym> debugging messages. 212</p></dd> 213</dl> 214 215 216<hr> 217<div class="header"> 218<p> 219Next: <a href="HPPA.html#HPPA" accesskey="n" rel="next">HPPA</a>, Previous: <a href="Alpha.html#Alpha" accesskey="p" rel="previous">Alpha</a>, Up: <a href="Architectures.html#Architectures" accesskey="u" rel="up">Architectures</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> 220</div> 221 222 223 224</body> 225</html> 226