You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

164 line
7.7KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Copyright (C) 1988-2020 Free Software Foundation, Inc.
  4. Permission is granted to copy, distribute and/or modify this document
  5. under the terms of the GNU Free Documentation License, Version 1.3 or
  6. any later version published by the Free Software Foundation; with the
  7. Invariant Sections being "Free Software" and "Free Software Needs
  8. Free Documentation", with the Front-Cover Texts being "A GNU Manual,"
  9. and with the Back-Cover Texts as in (a) below.
  10. (a) The FSF's Back-Cover Text is: "You are free to copy and modify
  11. this GNU Manual. Buying copies from GNU Press supports the FSF in
  12. developing GNU and promoting software freedom." -->
  13. <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
  14. <head>
  15. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  16. <title>PowerPC Embedded (Debugging with GDB)</title>
  17. <meta name="description" content="PowerPC Embedded (Debugging with GDB)">
  18. <meta name="keywords" content="PowerPC Embedded (Debugging with GDB)">
  19. <meta name="resource-type" content="document">
  20. <meta name="distribution" content="global">
  21. <meta name="Generator" content="makeinfo">
  22. <link href="index.html#Top" rel="start" title="Top">
  23. <link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index">
  24. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  25. <link href="Embedded-Processors.html#Embedded-Processors" rel="up" title="Embedded Processors">
  26. <link href="AVR.html#AVR" rel="next" title="AVR">
  27. <link href="OpenRISC-1000.html#OpenRISC-1000" rel="prev" title="OpenRISC 1000">
  28. <style type="text/css">
  29. <!--
  30. a.summary-letter {text-decoration: none}
  31. blockquote.indentedblock {margin-right: 0em}
  32. blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
  33. blockquote.smallquotation {font-size: smaller}
  34. div.display {margin-left: 3.2em}
  35. div.example {margin-left: 3.2em}
  36. div.lisp {margin-left: 3.2em}
  37. div.smalldisplay {margin-left: 3.2em}
  38. div.smallexample {margin-left: 3.2em}
  39. div.smalllisp {margin-left: 3.2em}
  40. kbd {font-style: oblique}
  41. pre.display {font-family: inherit}
  42. pre.format {font-family: inherit}
  43. pre.menu-comment {font-family: serif}
  44. pre.menu-preformatted {font-family: serif}
  45. pre.smalldisplay {font-family: inherit; font-size: smaller}
  46. pre.smallexample {font-size: smaller}
  47. pre.smallformat {font-family: inherit; font-size: smaller}
  48. pre.smalllisp {font-size: smaller}
  49. span.nolinebreak {white-space: nowrap}
  50. span.roman {font-family: initial; font-weight: normal}
  51. span.sansserif {font-family: sans-serif; font-weight: normal}
  52. ul.no-bullet {list-style: none}
  53. -->
  54. </style>
  55. </head>
  56. <body lang="en">
  57. <a name="PowerPC-Embedded"></a>
  58. <div class="header">
  59. <p>
  60. Next: <a href="AVR.html#AVR" accesskey="n" rel="next">AVR</a>, Previous: <a href="OpenRISC-1000.html#OpenRISC-1000" accesskey="p" rel="prev">OpenRISC 1000</a>, Up: <a href="Embedded-Processors.html#Embedded-Processors" accesskey="u" rel="up">Embedded Processors</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
  61. </div>
  62. <hr>
  63. <a name="PowerPC-Embedded-1"></a>
  64. <h4 class="subsection">21.3.8 PowerPC Embedded</h4>
  65. <a name="index-DVC-register"></a>
  66. <p><small>GDB</small> supports using the DVC (Data Value Compare) register to
  67. implement in hardware simple hardware watchpoint conditions of the form:
  68. </p>
  69. <div class="smallexample">
  70. <pre class="smallexample">(gdb) watch <var>ADDRESS|VARIABLE</var> \
  71. if <var>ADDRESS|VARIABLE</var> == <var>CONSTANT EXPRESSION</var>
  72. </pre></div>
  73. <p>The DVC register will be automatically used when <small>GDB</small> detects
  74. such pattern in a condition expression, and the created watchpoint uses one
  75. debug register (either the <code>exact-watchpoints</code> option is on and the
  76. variable is scalar, or the variable has a length of one byte). This feature
  77. is available in native <small>GDB</small> running on a Linux kernel version 2.6.34
  78. or newer.
  79. </p>
  80. <p>When running on PowerPC embedded processors, <small>GDB</small> automatically uses
  81. ranged hardware watchpoints, unless the <code>exact-watchpoints</code> option is on,
  82. in which case watchpoints using only one debug register are created when
  83. watching variables of scalar types.
  84. </p>
  85. <p>You can create an artificial array to watch an arbitrary memory
  86. region using one of the following commands (see <a href="Expressions.html#Expressions">Expressions</a>):
  87. </p>
  88. <div class="smallexample">
  89. <pre class="smallexample">(gdb) watch *((char *) <var>address</var>)@<var>length</var>
  90. (gdb) watch {char[<var>length</var>]} <var>address</var>
  91. </pre></div>
  92. <p>PowerPC embedded processors support masked watchpoints. See the discussion
  93. about the <code>mask</code> argument in <a href="Set-Watchpoints.html#Set-Watchpoints">Set Watchpoints</a>.
  94. </p>
  95. <a name="index-ranged-breakpoint"></a>
  96. <p>PowerPC embedded processors support hardware accelerated
  97. <em>ranged breakpoints</em>. A ranged breakpoint stops execution of
  98. the inferior whenever it executes an instruction at any address within
  99. the range it specifies. To set a ranged breakpoint in <small>GDB</small>,
  100. use the <code>break-range</code> command.
  101. </p>
  102. <p><small>GDB</small> provides the following PowerPC-specific commands:
  103. </p>
  104. <dl compact="compact">
  105. <dd><a name="index-break_002drange"></a>
  106. </dd>
  107. <dt><code>break-range <var>start-location</var>, <var>end-location</var></code></dt>
  108. <dd><p>Set a breakpoint for an address range given by
  109. <var>start-location</var> and <var>end-location</var>, which can specify a function name,
  110. a line number, an offset of lines from the current line or from the start
  111. location, or an address of an instruction (see <a href="Specify-Location.html#Specify-Location">Specify Location</a>,
  112. for a list of all the possible ways to specify a <var>location</var>.)
  113. The breakpoint will stop execution of the inferior whenever it
  114. executes an instruction at any address within the specified range,
  115. (including <var>start-location</var> and <var>end-location</var>.)
  116. </p>
  117. <a name="index-set-powerpc"></a>
  118. </dd>
  119. <dt><code>set powerpc soft-float</code></dt>
  120. <dt><code>show powerpc soft-float</code></dt>
  121. <dd><p>Force <small>GDB</small> to use (or not use) a software floating point calling
  122. convention. By default, <small>GDB</small> selects the calling convention based
  123. on the selected architecture and the provided executable file.
  124. </p>
  125. </dd>
  126. <dt><code>set powerpc vector-abi</code></dt>
  127. <dt><code>show powerpc vector-abi</code></dt>
  128. <dd><p>Force <small>GDB</small> to use the specified calling convention for vector
  129. arguments and return values. The valid options are &lsquo;<samp>auto</samp>&rsquo;;
  130. &lsquo;<samp>generic</samp>&rsquo;, to avoid vector registers even if they are present;
  131. &lsquo;<samp>altivec</samp>&rsquo;, to use AltiVec registers; and &lsquo;<samp>spe</samp>&rsquo; to use SPE
  132. registers. By default, <small>GDB</small> selects the calling convention
  133. based on the selected architecture and the provided executable file.
  134. </p>
  135. </dd>
  136. <dt><code>set powerpc exact-watchpoints</code></dt>
  137. <dt><code>show powerpc exact-watchpoints</code></dt>
  138. <dd><p>Allow <small>GDB</small> to use only one debug register when watching a variable
  139. of scalar type, thus assuming that the variable is accessed through the
  140. address of its first byte.
  141. </p>
  142. </dd>
  143. </dl>
  144. <hr>
  145. <div class="header">
  146. <p>
  147. Next: <a href="AVR.html#AVR" accesskey="n" rel="next">AVR</a>, Previous: <a href="OpenRISC-1000.html#OpenRISC-1000" accesskey="p" rel="prev">OpenRISC 1000</a>, Up: <a href="Embedded-Processors.html#Embedded-Processors" accesskey="u" rel="up">Embedded Processors</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>
  148. </div>
  149. </body>
  150. </html>