blob: 75edb6645137810e72ade3f58fe0f193d877ffb6 [file] [log] [blame]
<html lang="en">
<head>
<title>Architectures In Guile - Debugging with GDB</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Debugging with GDB">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Guile-API.html#Guile-API" title="Guile API">
<link rel="prev" href="Lazy-Strings-In-Guile.html#Lazy-Strings-In-Guile" title="Lazy Strings In Guile">
<link rel="next" href="Disassembly-In-Guile.html#Disassembly-In-Guile" title="Disassembly In Guile">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2019 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Free Software'' and ``Free Software Needs
Free Documentation'', with the Front-Cover Texts being ``A GNU Manual,''
and with the Back-Cover Texts as in (a) below.
(a) The FSF's Back-Cover Text is: ``You are free to copy and modify
this GNU Manual. Buying copies from GNU Press supports the FSF in
developing GNU and promoting software freedom.''
-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<a name="Architectures-In-Guile"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Disassembly-In-Guile.html#Disassembly-In-Guile">Disassembly In Guile</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Lazy-Strings-In-Guile.html#Lazy-Strings-In-Guile">Lazy Strings In Guile</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Guile-API.html#Guile-API">Guile API</a>
<hr>
</div>
<h5 class="subsubsection">23.3.3.21 Guile representation of architectures</h5>
<p><a name="index-guile-architectures-2812"></a><a name="index-g_t_003cgdb_003aarch_003e-2813"></a>
<span class="sc">gdb</span> uses architecture specific parameters and artifacts in a
number of its various computations. An architecture is represented
by an instance of the <code>&lt;gdb:arch&gt;</code> class.
<p>The following architecture-related procedures are provided by the
<code>(gdb)</code> module:
<div class="defun">
&mdash; Scheme Procedure: <b>arch?</b><var> object<a name="index-arch_003f-2814"></a></var><br>
<blockquote><p>Return <code>#t</code> if <var>object</var> is an object of type <code>&lt;gdb:arch&gt;</code>.
Otherwise return <code>#f</code>.
</p></blockquote></div>
<div class="defun">
&mdash; Scheme Procedure: <b>current-arch</b><var><a name="index-current_002darch-2815"></a></var><br>
<blockquote><p>Return the current architecture as a <code>&lt;gdb:arch&gt;</code> object.
</p></blockquote></div>
<div class="defun">
&mdash; Scheme Procedure: <b>arch-name</b><var> arch<a name="index-arch_002dname-2816"></a></var><br>
<blockquote><p>Return the name (string value) of <code>&lt;gdb:arch&gt;</code> <var>arch</var>.
</p></blockquote></div>
<div class="defun">
&mdash; Scheme Procedure: <b>arch-charset</b><var> arch<a name="index-arch_002dcharset-2817"></a></var><br>
<blockquote><p>Return name of target character set of <code>&lt;gdb:arch&gt;</code> <var>arch</var>.
</p></blockquote></div>
<div class="defun">
&mdash; Scheme Procedure: <b>arch-wide-charset</b><var><a name="index-arch_002dwide_002dcharset-2818"></a></var><br>
<blockquote><p>Return name of target wide character set of <code>&lt;gdb:arch&gt;</code> <var>arch</var>.
</p></blockquote></div>
<p>Each architecture provides a set of predefined types, obtained by
the following functions.
<div class="defun">
&mdash; Scheme Procedure: <b>arch-void-type</b><var> arch<a name="index-arch_002dvoid_002dtype-2819"></a></var><br>
<blockquote><p>Return the <code>&lt;gdb:type&gt;</code> object for a <code>void</code> type
of architecture <var>arch</var>.
</p></blockquote></div>
<div class="defun">
&mdash; Scheme Procedure: <b>arch-char-type</b><var> arch<a name="index-arch_002dchar_002dtype-2820"></a></var><br>
<blockquote><p>Return the <code>&lt;gdb:type&gt;</code> object for a <code>char</code> type
of architecture <var>arch</var>.
</p></blockquote></div>
<div class="defun">
&mdash; Scheme Procedure: <b>arch-short-type</b><var> arch<a name="index-arch_002dshort_002dtype-2821"></a></var><br>
<blockquote><p>Return the <code>&lt;gdb:type&gt;</code> object for a <code>short</code> type
of architecture <var>arch</var>.
</p></blockquote></div>
<div class="defun">
&mdash; Scheme Procedure: <b>arch-int-type</b><var> arch<a name="index-arch_002dint_002dtype-2822"></a></var><br>
<blockquote><p>Return the <code>&lt;gdb:type&gt;</code> object for an <code>int</code> type
of architecture <var>arch</var>.
</p></blockquote></div>
<div class="defun">
&mdash; Scheme Procedure: <b>arch-long-type</b><var> arch<a name="index-arch_002dlong_002dtype-2823"></a></var><br>
<blockquote><p>Return the <code>&lt;gdb:type&gt;</code> object for a <code>long</code> type
of architecture <var>arch</var>.
</p></blockquote></div>
<div class="defun">
&mdash; Scheme Procedure: <b>arch-schar-type</b><var> arch<a name="index-arch_002dschar_002dtype-2824"></a></var><br>
<blockquote><p>Return the <code>&lt;gdb:type&gt;</code> object for a <code>signed char</code> type
of architecture <var>arch</var>.
</p></blockquote></div>
<div class="defun">
&mdash; Scheme Procedure: <b>arch-uchar-type</b><var> arch<a name="index-arch_002duchar_002dtype-2825"></a></var><br>
<blockquote><p>Return the <code>&lt;gdb:type&gt;</code> object for an <code>unsigned char</code> type
of architecture <var>arch</var>.
</p></blockquote></div>
<div class="defun">
&mdash; Scheme Procedure: <b>arch-ushort-type</b><var> arch<a name="index-arch_002dushort_002dtype-2826"></a></var><br>
<blockquote><p>Return the <code>&lt;gdb:type&gt;</code> object for an <code>unsigned short</code> type
of architecture <var>arch</var>.
</p></blockquote></div>
<div class="defun">
&mdash; Scheme Procedure: <b>arch-uint-type</b><var> arch<a name="index-arch_002duint_002dtype-2827"></a></var><br>
<blockquote><p>Return the <code>&lt;gdb:type&gt;</code> object for an <code>unsigned int</code> type
of architecture <var>arch</var>.
</p></blockquote></div>
<div class="defun">
&mdash; Scheme Procedure: <b>arch-ulong-type</b><var> arch<a name="index-arch_002dulong_002dtype-2828"></a></var><br>
<blockquote><p>Return the <code>&lt;gdb:type&gt;</code> object for an <code>unsigned long</code> type
of architecture <var>arch</var>.
</p></blockquote></div>
<div class="defun">
&mdash; Scheme Procedure: <b>arch-float-type</b><var> arch<a name="index-arch_002dfloat_002dtype-2829"></a></var><br>
<blockquote><p>Return the <code>&lt;gdb:type&gt;</code> object for a <code>float</code> type
of architecture <var>arch</var>.
</p></blockquote></div>
<div class="defun">
&mdash; Scheme Procedure: <b>arch-double-type</b><var> arch<a name="index-arch_002ddouble_002dtype-2830"></a></var><br>
<blockquote><p>Return the <code>&lt;gdb:type&gt;</code> object for a <code>double</code> type
of architecture <var>arch</var>.
</p></blockquote></div>
<div class="defun">
&mdash; Scheme Procedure: <b>arch-longdouble-type</b><var> arch<a name="index-arch_002dlongdouble_002dtype-2831"></a></var><br>
<blockquote><p>Return the <code>&lt;gdb:type&gt;</code> object for a <code>long double</code> type
of architecture <var>arch</var>.
</p></blockquote></div>
<div class="defun">
&mdash; Scheme Procedure: <b>arch-bool-type</b><var> arch<a name="index-arch_002dbool_002dtype-2832"></a></var><br>
<blockquote><p>Return the <code>&lt;gdb:type&gt;</code> object for a <code>bool</code> type
of architecture <var>arch</var>.
</p></blockquote></div>
<div class="defun">
&mdash; Scheme Procedure: <b>arch-longlong-type</b><var> arch<a name="index-arch_002dlonglong_002dtype-2833"></a></var><br>
<blockquote><p>Return the <code>&lt;gdb:type&gt;</code> object for a <code>long long</code> type
of architecture <var>arch</var>.
</p></blockquote></div>
<div class="defun">
&mdash; Scheme Procedure: <b>arch-ulonglong-type</b><var> arch<a name="index-arch_002dulonglong_002dtype-2834"></a></var><br>
<blockquote><p>Return the <code>&lt;gdb:type&gt;</code> object for an <code>unsigned long long</code> type
of architecture <var>arch</var>.
</p></blockquote></div>
<div class="defun">
&mdash; Scheme Procedure: <b>arch-int8-type</b><var> arch<a name="index-arch_002dint8_002dtype-2835"></a></var><br>
<blockquote><p>Return the <code>&lt;gdb:type&gt;</code> object for an <code>int8</code> type
of architecture <var>arch</var>.
</p></blockquote></div>
<div class="defun">
&mdash; Scheme Procedure: <b>arch-uint8-type</b><var> arch<a name="index-arch_002duint8_002dtype-2836"></a></var><br>
<blockquote><p>Return the <code>&lt;gdb:type&gt;</code> object for a <code>uint8</code> type
of architecture <var>arch</var>.
</p></blockquote></div>
<div class="defun">
&mdash; Scheme Procedure: <b>arch-int16-type</b><var> arch<a name="index-arch_002dint16_002dtype-2837"></a></var><br>
<blockquote><p>Return the <code>&lt;gdb:type&gt;</code> object for an <code>int16</code> type
of architecture <var>arch</var>.
</p></blockquote></div>
<div class="defun">
&mdash; Scheme Procedure: <b>arch-uint16-type</b><var> arch<a name="index-arch_002duint16_002dtype-2838"></a></var><br>
<blockquote><p>Return the <code>&lt;gdb:type&gt;</code> object for a <code>uint16</code> type
of architecture <var>arch</var>.
</p></blockquote></div>
<div class="defun">
&mdash; Scheme Procedure: <b>arch-int32-type</b><var> arch<a name="index-arch_002dint32_002dtype-2839"></a></var><br>
<blockquote><p>Return the <code>&lt;gdb:type&gt;</code> object for an <code>int32</code> type
of architecture <var>arch</var>.
</p></blockquote></div>
<div class="defun">
&mdash; Scheme Procedure: <b>arch-uint32-type</b><var> arch<a name="index-arch_002duint32_002dtype-2840"></a></var><br>
<blockquote><p>Return the <code>&lt;gdb:type&gt;</code> object for a <code>uint32</code> type
of architecture <var>arch</var>.
</p></blockquote></div>
<div class="defun">
&mdash; Scheme Procedure: <b>arch-int64-type</b><var> arch<a name="index-arch_002dint64_002dtype-2841"></a></var><br>
<blockquote><p>Return the <code>&lt;gdb:type&gt;</code> object for an <code>int64</code> type
of architecture <var>arch</var>.
</p></blockquote></div>
<div class="defun">
&mdash; Scheme Procedure: <b>arch-uint64-type</b><var> arch<a name="index-arch_002duint64_002dtype-2842"></a></var><br>
<blockquote><p>Return the <code>&lt;gdb:type&gt;</code> object for a <code>uint64</code> type
of architecture <var>arch</var>.
</p></blockquote></div>
<p>Example:
<pre class="smallexample"> (gdb) guile (type-name (arch-uchar-type (current-arch)))
"unsigned char"
</pre>
</body></html>