Architectures-In-Guile.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  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: Architectures In Guile</title>
  16. <meta name="description" content="Debugging with GDB: Architectures In Guile">
  17. <meta name="keywords" content="Debugging with GDB: Architectures In Guile">
  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="Guile-API.html#Guile-API" rel="up" title="Guile API">
  26. <link href="Disassembly-In-Guile.html#Disassembly-In-Guile" rel="next" title="Disassembly In Guile">
  27. <link href="Lazy-Strings-In-Guile.html#Lazy-Strings-In-Guile" rel="previous" title="Lazy Strings In Guile">
  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="Architectures-In-Guile"></a>
  59. <div class="header">
  60. <p>
  61. Next: <a href="Disassembly-In-Guile.html#Disassembly-In-Guile" accesskey="n" rel="next">Disassembly In Guile</a>, Previous: <a href="Lazy-Strings-In-Guile.html#Lazy-Strings-In-Guile" accesskey="p" rel="previous">Lazy Strings In Guile</a>, Up: <a href="Guile-API.html#Guile-API" accesskey="u" rel="up">Guile API</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="Guile-representation-of-architectures"></a>
  65. <h4 class="subsubsection">23.3.3.21 Guile representation of architectures</h4>
  66. <a name="index-guile-architectures"></a>
  67. <a name="index-_003cgdb_003aarch_003e"></a>
  68. <p><small>GDB</small> uses architecture specific parameters and artifacts in a
  69. number of its various computations. An architecture is represented
  70. by an instance of the <code>&lt;gdb:arch&gt;</code> class.
  71. </p>
  72. <p>The following architecture-related procedures are provided by the
  73. <code>(gdb)</code> module:
  74. </p>
  75. <dl>
  76. <dt><a name="index-arch_003f"></a>Scheme Procedure: <strong>arch?</strong> <em>object</em></dt>
  77. <dd><p>Return <code>#t</code> if <var>object</var> is an object of type <code>&lt;gdb:arch&gt;</code>.
  78. Otherwise return <code>#f</code>.
  79. </p></dd></dl>
  80. <dl>
  81. <dt><a name="index-current_002darch"></a>Scheme Procedure: <strong>current-arch</strong></dt>
  82. <dd><p>Return the current architecture as a <code>&lt;gdb:arch&gt;</code> object.
  83. </p></dd></dl>
  84. <dl>
  85. <dt><a name="index-arch_002dname"></a>Scheme Procedure: <strong>arch-name</strong> <em>arch</em></dt>
  86. <dd><p>Return the name (string value) of <code>&lt;gdb:arch&gt;</code> <var>arch</var>.
  87. </p></dd></dl>
  88. <dl>
  89. <dt><a name="index-arch_002dcharset"></a>Scheme Procedure: <strong>arch-charset</strong> <em>arch</em></dt>
  90. <dd><p>Return name of target character set of <code>&lt;gdb:arch&gt;</code> <var>arch</var>.
  91. </p></dd></dl>
  92. <dl>
  93. <dt><a name="index-arch_002dwide_002dcharset"></a>Scheme Procedure: <strong>arch-wide-charset</strong></dt>
  94. <dd><p>Return name of target wide character set of <code>&lt;gdb:arch&gt;</code> <var>arch</var>.
  95. </p></dd></dl>
  96. <p>Each architecture provides a set of predefined types, obtained by
  97. the following functions.
  98. </p>
  99. <dl>
  100. <dt><a name="index-arch_002dvoid_002dtype"></a>Scheme Procedure: <strong>arch-void-type</strong> <em>arch</em></dt>
  101. <dd><p>Return the <code>&lt;gdb:type&gt;</code> object for a <code>void</code> type
  102. of architecture <var>arch</var>.
  103. </p></dd></dl>
  104. <dl>
  105. <dt><a name="index-arch_002dchar_002dtype"></a>Scheme Procedure: <strong>arch-char-type</strong> <em>arch</em></dt>
  106. <dd><p>Return the <code>&lt;gdb:type&gt;</code> object for a <code>char</code> type
  107. of architecture <var>arch</var>.
  108. </p></dd></dl>
  109. <dl>
  110. <dt><a name="index-arch_002dshort_002dtype"></a>Scheme Procedure: <strong>arch-short-type</strong> <em>arch</em></dt>
  111. <dd><p>Return the <code>&lt;gdb:type&gt;</code> object for a <code>short</code> type
  112. of architecture <var>arch</var>.
  113. </p></dd></dl>
  114. <dl>
  115. <dt><a name="index-arch_002dint_002dtype"></a>Scheme Procedure: <strong>arch-int-type</strong> <em>arch</em></dt>
  116. <dd><p>Return the <code>&lt;gdb:type&gt;</code> object for an <code>int</code> type
  117. of architecture <var>arch</var>.
  118. </p></dd></dl>
  119. <dl>
  120. <dt><a name="index-arch_002dlong_002dtype"></a>Scheme Procedure: <strong>arch-long-type</strong> <em>arch</em></dt>
  121. <dd><p>Return the <code>&lt;gdb:type&gt;</code> object for a <code>long</code> type
  122. of architecture <var>arch</var>.
  123. </p></dd></dl>
  124. <dl>
  125. <dt><a name="index-arch_002dschar_002dtype"></a>Scheme Procedure: <strong>arch-schar-type</strong> <em>arch</em></dt>
  126. <dd><p>Return the <code>&lt;gdb:type&gt;</code> object for a <code>signed char</code> type
  127. of architecture <var>arch</var>.
  128. </p></dd></dl>
  129. <dl>
  130. <dt><a name="index-arch_002duchar_002dtype"></a>Scheme Procedure: <strong>arch-uchar-type</strong> <em>arch</em></dt>
  131. <dd><p>Return the <code>&lt;gdb:type&gt;</code> object for an <code>unsigned char</code> type
  132. of architecture <var>arch</var>.
  133. </p></dd></dl>
  134. <dl>
  135. <dt><a name="index-arch_002dushort_002dtype"></a>Scheme Procedure: <strong>arch-ushort-type</strong> <em>arch</em></dt>
  136. <dd><p>Return the <code>&lt;gdb:type&gt;</code> object for an <code>unsigned short</code> type
  137. of architecture <var>arch</var>.
  138. </p></dd></dl>
  139. <dl>
  140. <dt><a name="index-arch_002duint_002dtype"></a>Scheme Procedure: <strong>arch-uint-type</strong> <em>arch</em></dt>
  141. <dd><p>Return the <code>&lt;gdb:type&gt;</code> object for an <code>unsigned int</code> type
  142. of architecture <var>arch</var>.
  143. </p></dd></dl>
  144. <dl>
  145. <dt><a name="index-arch_002dulong_002dtype"></a>Scheme Procedure: <strong>arch-ulong-type</strong> <em>arch</em></dt>
  146. <dd><p>Return the <code>&lt;gdb:type&gt;</code> object for an <code>unsigned long</code> type
  147. of architecture <var>arch</var>.
  148. </p></dd></dl>
  149. <dl>
  150. <dt><a name="index-arch_002dfloat_002dtype"></a>Scheme Procedure: <strong>arch-float-type</strong> <em>arch</em></dt>
  151. <dd><p>Return the <code>&lt;gdb:type&gt;</code> object for a <code>float</code> type
  152. of architecture <var>arch</var>.
  153. </p></dd></dl>
  154. <dl>
  155. <dt><a name="index-arch_002ddouble_002dtype"></a>Scheme Procedure: <strong>arch-double-type</strong> <em>arch</em></dt>
  156. <dd><p>Return the <code>&lt;gdb:type&gt;</code> object for a <code>double</code> type
  157. of architecture <var>arch</var>.
  158. </p></dd></dl>
  159. <dl>
  160. <dt><a name="index-arch_002dlongdouble_002dtype"></a>Scheme Procedure: <strong>arch-longdouble-type</strong> <em>arch</em></dt>
  161. <dd><p>Return the <code>&lt;gdb:type&gt;</code> object for a <code>long double</code> type
  162. of architecture <var>arch</var>.
  163. </p></dd></dl>
  164. <dl>
  165. <dt><a name="index-arch_002dbool_002dtype"></a>Scheme Procedure: <strong>arch-bool-type</strong> <em>arch</em></dt>
  166. <dd><p>Return the <code>&lt;gdb:type&gt;</code> object for a <code>bool</code> type
  167. of architecture <var>arch</var>.
  168. </p></dd></dl>
  169. <dl>
  170. <dt><a name="index-arch_002dlonglong_002dtype"></a>Scheme Procedure: <strong>arch-longlong-type</strong> <em>arch</em></dt>
  171. <dd><p>Return the <code>&lt;gdb:type&gt;</code> object for a <code>long long</code> type
  172. of architecture <var>arch</var>.
  173. </p></dd></dl>
  174. <dl>
  175. <dt><a name="index-arch_002dulonglong_002dtype"></a>Scheme Procedure: <strong>arch-ulonglong-type</strong> <em>arch</em></dt>
  176. <dd><p>Return the <code>&lt;gdb:type&gt;</code> object for an <code>unsigned long long</code> type
  177. of architecture <var>arch</var>.
  178. </p></dd></dl>
  179. <dl>
  180. <dt><a name="index-arch_002dint8_002dtype"></a>Scheme Procedure: <strong>arch-int8-type</strong> <em>arch</em></dt>
  181. <dd><p>Return the <code>&lt;gdb:type&gt;</code> object for an <code>int8</code> type
  182. of architecture <var>arch</var>.
  183. </p></dd></dl>
  184. <dl>
  185. <dt><a name="index-arch_002duint8_002dtype"></a>Scheme Procedure: <strong>arch-uint8-type</strong> <em>arch</em></dt>
  186. <dd><p>Return the <code>&lt;gdb:type&gt;</code> object for a <code>uint8</code> type
  187. of architecture <var>arch</var>.
  188. </p></dd></dl>
  189. <dl>
  190. <dt><a name="index-arch_002dint16_002dtype"></a>Scheme Procedure: <strong>arch-int16-type</strong> <em>arch</em></dt>
  191. <dd><p>Return the <code>&lt;gdb:type&gt;</code> object for an <code>int16</code> type
  192. of architecture <var>arch</var>.
  193. </p></dd></dl>
  194. <dl>
  195. <dt><a name="index-arch_002duint16_002dtype"></a>Scheme Procedure: <strong>arch-uint16-type</strong> <em>arch</em></dt>
  196. <dd><p>Return the <code>&lt;gdb:type&gt;</code> object for a <code>uint16</code> type
  197. of architecture <var>arch</var>.
  198. </p></dd></dl>
  199. <dl>
  200. <dt><a name="index-arch_002dint32_002dtype"></a>Scheme Procedure: <strong>arch-int32-type</strong> <em>arch</em></dt>
  201. <dd><p>Return the <code>&lt;gdb:type&gt;</code> object for an <code>int32</code> type
  202. of architecture <var>arch</var>.
  203. </p></dd></dl>
  204. <dl>
  205. <dt><a name="index-arch_002duint32_002dtype"></a>Scheme Procedure: <strong>arch-uint32-type</strong> <em>arch</em></dt>
  206. <dd><p>Return the <code>&lt;gdb:type&gt;</code> object for a <code>uint32</code> type
  207. of architecture <var>arch</var>.
  208. </p></dd></dl>
  209. <dl>
  210. <dt><a name="index-arch_002dint64_002dtype"></a>Scheme Procedure: <strong>arch-int64-type</strong> <em>arch</em></dt>
  211. <dd><p>Return the <code>&lt;gdb:type&gt;</code> object for an <code>int64</code> type
  212. of architecture <var>arch</var>.
  213. </p></dd></dl>
  214. <dl>
  215. <dt><a name="index-arch_002duint64_002dtype"></a>Scheme Procedure: <strong>arch-uint64-type</strong> <em>arch</em></dt>
  216. <dd><p>Return the <code>&lt;gdb:type&gt;</code> object for a <code>uint64</code> type
  217. of architecture <var>arch</var>.
  218. </p></dd></dl>
  219. <p>Example:
  220. </p>
  221. <div class="smallexample">
  222. <pre class="smallexample">(gdb) guile (type-name (arch-uchar-type (current-arch)))
  223. &quot;unsigned char&quot;
  224. </pre></div>
  225. <hr>
  226. <div class="header">
  227. <p>
  228. Next: <a href="Disassembly-In-Guile.html#Disassembly-In-Guile" accesskey="n" rel="next">Disassembly In Guile</a>, Previous: <a href="Lazy-Strings-In-Guile.html#Lazy-Strings-In-Guile" accesskey="p" rel="previous">Lazy Strings In Guile</a>, Up: <a href="Guile-API.html#Guile-API" accesskey="u" rel="up">Guile API</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>
  229. </div>
  230. </body>
  231. </html>