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