MIPS.html 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Copyright (C) 1988-2020 Free Software Foundation, Inc.
  4. Permission is granted to copy, distribute and/or modify this document
  5. under the terms of the GNU Free Documentation License, Version 1.3 or
  6. any later version published by the Free Software Foundation; with the
  7. Invariant Sections being "Free Software" and "Free Software Needs
  8. Free Documentation", with the Front-Cover Texts being "A GNU Manual,"
  9. and with the Back-Cover Texts as in (a) below.
  10. (a) The FSF's Back-Cover Text is: "You are free to copy and modify
  11. this GNU Manual. Buying copies from GNU Press supports the FSF in
  12. developing GNU and promoting software freedom." -->
  13. <!-- Created by GNU Texinfo 5.1, http://www.gnu.org/software/texinfo/ -->
  14. <head>
  15. <title>Debugging with GDB: MIPS</title>
  16. <meta name="description" content="Debugging with GDB: MIPS">
  17. <meta name="keywords" content="Debugging with GDB: MIPS">
  18. <meta name="resource-type" content="document">
  19. <meta name="distribution" content="global">
  20. <meta name="Generator" content="makeinfo">
  21. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  22. <link href="index.html#Top" rel="start" title="Top">
  23. <link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index">
  24. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  25. <link href="Architectures.html#Architectures" rel="up" title="Architectures">
  26. <link href="HPPA.html#HPPA" rel="next" title="HPPA">
  27. <link href="Alpha.html#Alpha" rel="previous" title="Alpha">
  28. <style type="text/css">
  29. <!--
  30. a.summary-letter {text-decoration: none}
  31. blockquote.smallquotation {font-size: smaller}
  32. div.display {margin-left: 3.2em}
  33. div.example {margin-left: 3.2em}
  34. div.indentedblock {margin-left: 3.2em}
  35. div.lisp {margin-left: 3.2em}
  36. div.smalldisplay {margin-left: 3.2em}
  37. div.smallexample {margin-left: 3.2em}
  38. div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
  39. div.smalllisp {margin-left: 3.2em}
  40. kbd {font-style:oblique}
  41. pre.display {font-family: inherit}
  42. pre.format {font-family: inherit}
  43. pre.menu-comment {font-family: serif}
  44. pre.menu-preformatted {font-family: serif}
  45. pre.smalldisplay {font-family: inherit; font-size: smaller}
  46. pre.smallexample {font-size: smaller}
  47. pre.smallformat {font-family: inherit; font-size: smaller}
  48. pre.smalllisp {font-size: smaller}
  49. span.nocodebreak {white-space:nowrap}
  50. span.nolinebreak {white-space:nowrap}
  51. span.roman {font-family:serif; font-weight:normal}
  52. span.sansserif {font-family:sans-serif; font-weight:normal}
  53. ul.no-bullet {list-style: none}
  54. -->
  55. </style>
  56. </head>
  57. <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
  58. <a name="MIPS"></a>
  59. <div class="header">
  60. <p>
  61. Next: <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> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
  62. </div>
  63. <hr>
  64. <a name="MIPS-1"></a>
  65. <h4 class="subsection">21.4.4 <acronym>MIPS</acronym></h4>
  66. <a name="index-stack-on-Alpha"></a>
  67. <a name="index-stack-on-MIPS"></a>
  68. <a name="index-Alpha-stack"></a>
  69. <a name="index-MIPS-stack"></a>
  70. <p>Alpha- and <acronym>MIPS</acronym>-based computers use an unusual stack frame, which
  71. sometimes requires <small>GDB</small> to search backward in the object code to
  72. find the beginning of a function.
  73. </p>
  74. <a name="index-response-time_002c-MIPS-debugging"></a>
  75. <p>To improve response time (especially for embedded applications, where
  76. <small>GDB</small> may be restricted to a slow serial line for this search)
  77. you may want to limit the size of this search, using one of these
  78. commands:
  79. </p>
  80. <dl compact="compact">
  81. <dd><a name="index-heuristic_002dfence_002dpost-_0028Alpha_002c-MIPS_0029"></a>
  82. </dd>
  83. <dt><code>set heuristic-fence-post <var>limit</var></code></dt>
  84. <dd><p>Restrict <small>GDB</small> to examining at most <var>limit</var> bytes in its
  85. search for the beginning of a function. A value of <var>0</var> (the
  86. default) means there is no limit. However, except for <var>0</var>, the
  87. larger the limit the more bytes <code>heuristic-fence-post</code> must search
  88. and therefore the longer it takes to run. You should only need to use
  89. this command when debugging a stripped executable.
  90. </p>
  91. </dd>
  92. <dt><code>show heuristic-fence-post</code></dt>
  93. <dd><p>Display the current limit.
  94. </p></dd>
  95. </dl>
  96. <p>These commands are available <em>only</em> when <small>GDB</small> is configured
  97. for debugging programs on Alpha or <acronym>MIPS</acronym> processors.
  98. </p>
  99. <p>Several <acronym>MIPS</acronym>-specific commands are available when debugging <acronym>MIPS</acronym>
  100. programs:
  101. </p>
  102. <dl compact="compact">
  103. <dt><code>set mips abi <var>arg</var></code></dt>
  104. <dd><a name="index-set-mips-abi"></a>
  105. <a name="index-set-ABI-for-MIPS"></a>
  106. <p>Tell <small>GDB</small> which <acronym>MIPS</acronym> ABI is used by the inferior. Possible
  107. values of <var>arg</var> are:
  108. </p>
  109. <dl compact="compact">
  110. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  111. <dd><p>The default ABI associated with the current binary (this is the
  112. default).
  113. </p></dd>
  114. <dt>&lsquo;<samp>o32</samp>&rsquo;</dt>
  115. <dt>&lsquo;<samp>o64</samp>&rsquo;</dt>
  116. <dt>&lsquo;<samp>n32</samp>&rsquo;</dt>
  117. <dt>&lsquo;<samp>n64</samp>&rsquo;</dt>
  118. <dt>&lsquo;<samp>eabi32</samp>&rsquo;</dt>
  119. <dt>&lsquo;<samp>eabi64</samp>&rsquo;</dt>
  120. </dl>
  121. </dd>
  122. <dt><code>show mips abi</code></dt>
  123. <dd><a name="index-show-mips-abi"></a>
  124. <p>Show the <acronym>MIPS</acronym> ABI used by <small>GDB</small> to debug the inferior.
  125. </p>
  126. </dd>
  127. <dt><code>set mips compression <var>arg</var></code></dt>
  128. <dd><a name="index-set-mips-compression"></a>
  129. <a name="index-code-compression_002c-MIPS"></a>
  130. <p>Tell <small>GDB</small> which <acronym>MIPS</acronym> compressed
  131. <acronym title="Instruction Set Architecture">ISA</acronym> (Instruction Set Architecture) encoding is used by the
  132. inferior. <small>GDB</small> uses this for code disassembly and other
  133. internal interpretation purposes. This setting is only referred to
  134. when no executable has been associated with the debugging session or
  135. the executable does not provide information about the encoding it uses.
  136. Otherwise this setting is automatically updated from information
  137. provided by the executable.
  138. </p>
  139. <p>Possible values of <var>arg</var> are &lsquo;<samp>mips16</samp>&rsquo; and &lsquo;<samp>micromips</samp>&rsquo;.
  140. The default compressed <acronym title="Instruction Set Architecture">ISA</acronym> encoding is &lsquo;<samp>mips16</samp>&rsquo;, as
  141. executables containing <acronym>MIPS16</acronym> code frequently are not
  142. identified as such.
  143. </p>
  144. <p>This setting is &ldquo;sticky&rdquo;; that is, it retains its value across
  145. debugging sessions until reset either explicitly with this command or
  146. implicitly from an executable.
  147. </p>
  148. <p>The compiler and/or assembler typically add symbol table annotations to
  149. identify functions compiled for the <acronym>MIPS16</acronym> or
  150. <acronym>microMIPS</acronym> <acronym title="Instruction Set Architecture">ISA</acronym>s. If these function-scope annotations
  151. are present, <small>GDB</small> uses them in preference to the global
  152. compressed <acronym title="Instruction Set Architecture">ISA</acronym> encoding setting.
  153. </p>
  154. </dd>
  155. <dt><code>show mips compression</code></dt>
  156. <dd><a name="index-show-mips-compression"></a>
  157. <p>Show the <acronym>MIPS</acronym> compressed <acronym title="Instruction Set Architecture">ISA</acronym> encoding used by
  158. <small>GDB</small> to debug the inferior.
  159. </p>
  160. </dd>
  161. <dt><code>set mipsfpu</code></dt>
  162. <dt><code>show mipsfpu</code></dt>
  163. <dd><p>See <a href="MIPS-Embedded.html#MIPS-Embedded">set mipsfpu</a>.
  164. </p>
  165. </dd>
  166. <dt><code>set mips mask-address <var>arg</var></code></dt>
  167. <dd><a name="index-set-mips-mask_002daddress"></a>
  168. <a name="index-MIPS-addresses_002c-masking"></a>
  169. <p>This command determines whether the most-significant 32 bits of 64-bit
  170. <acronym>MIPS</acronym> addresses are masked off. The argument <var>arg</var> can be
  171. &lsquo;<samp>on</samp>&rsquo;, &lsquo;<samp>off</samp>&rsquo;, or &lsquo;<samp>auto</samp>&rsquo;. The latter is the default
  172. setting, which lets <small>GDB</small> determine the correct value.
  173. </p>
  174. </dd>
  175. <dt><code>show mips mask-address</code></dt>
  176. <dd><a name="index-show-mips-mask_002daddress"></a>
  177. <p>Show whether the upper 32 bits of <acronym>MIPS</acronym> addresses are masked off or
  178. not.
  179. </p>
  180. </dd>
  181. <dt><code>set remote-mips64-transfers-32bit-regs</code></dt>
  182. <dd><a name="index-set-remote_002dmips64_002dtransfers_002d32bit_002dregs"></a>
  183. <p>This command controls compatibility with 64-bit <acronym>MIPS</acronym> targets that
  184. transfer data in 32-bit quantities. If you have an old <acronym>MIPS</acronym> 64 target
  185. that transfers 32 bits for some registers, like <small>SR</small> and <small>FSR</small>,
  186. and 64 bits for other registers, set this option to &lsquo;<samp>on</samp>&rsquo;.
  187. </p>
  188. </dd>
  189. <dt><code>show remote-mips64-transfers-32bit-regs</code></dt>
  190. <dd><a name="index-show-remote_002dmips64_002dtransfers_002d32bit_002dregs"></a>
  191. <p>Show the current setting of compatibility with older <acronym>MIPS</acronym> 64 targets.
  192. </p>
  193. </dd>
  194. <dt><code>set debug mips</code></dt>
  195. <dd><a name="index-set-debug-mips"></a>
  196. <p>This command turns on and off debugging messages for the <acronym>MIPS</acronym>-specific
  197. target code in <small>GDB</small>.
  198. </p>
  199. </dd>
  200. <dt><code>show debug mips</code></dt>
  201. <dd><a name="index-show-debug-mips"></a>
  202. <p>Show the current setting of <acronym>MIPS</acronym> debugging messages.
  203. </p></dd>
  204. </dl>
  205. <hr>
  206. <div class="header">
  207. <p>
  208. Next: <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> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
  209. </div>
  210. </body>
  211. </html>