summaryrefslogtreecommitdiff
path: root/share/doc/gdb/Lazy-Strings-In-Guile.html
diff options
context:
space:
mode:
Diffstat (limited to 'share/doc/gdb/Lazy-Strings-In-Guile.html')
-rw-r--r--share/doc/gdb/Lazy-Strings-In-Guile.html143
1 files changed, 143 insertions, 0 deletions
diff --git a/share/doc/gdb/Lazy-Strings-In-Guile.html b/share/doc/gdb/Lazy-Strings-In-Guile.html
new file mode 100644
index 0000000..e83e0a6
--- /dev/null
+++ b/share/doc/gdb/Lazy-Strings-In-Guile.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<!-- Copyright (C) 1988-2023 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." -->
+<!-- Created by GNU Texinfo 5.1, http://www.gnu.org/software/texinfo/ -->
+<head>
+<title>Debugging with GDB: Lazy Strings In Guile</title>
+
+<meta name="description" content="Debugging with GDB: Lazy Strings In Guile">
+<meta name="keywords" content="Debugging with GDB: Lazy Strings In Guile">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<meta name="Generator" content="makeinfo">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<link href="index.html#Top" rel="start" title="Top">
+<link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index">
+<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
+<link href="Guile-API.html#Guile-API" rel="up" title="Guile API">
+<link href="Architectures-In-Guile.html#Architectures-In-Guile" rel="next" title="Architectures In Guile">
+<link href="Breakpoints-In-Guile.html#Breakpoints-In-Guile" rel="previous" title="Breakpoints In Guile">
+<style type="text/css">
+<!--
+a.summary-letter {text-decoration: none}
+blockquote.smallquotation {font-size: smaller}
+div.display {margin-left: 3.2em}
+div.example {margin-left: 3.2em}
+div.indentedblock {margin-left: 3.2em}
+div.lisp {margin-left: 3.2em}
+div.smalldisplay {margin-left: 3.2em}
+div.smallexample {margin-left: 3.2em}
+div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
+div.smalllisp {margin-left: 3.2em}
+kbd {font-style:oblique}
+pre.display {font-family: inherit}
+pre.format {font-family: inherit}
+pre.menu-comment {font-family: serif}
+pre.menu-preformatted {font-family: serif}
+pre.smalldisplay {font-family: inherit; font-size: smaller}
+pre.smallexample {font-size: smaller}
+pre.smallformat {font-family: inherit; font-size: smaller}
+pre.smalllisp {font-size: smaller}
+span.nocodebreak {white-space:nowrap}
+span.nolinebreak {white-space:nowrap}
+span.roman {font-family:serif; font-weight:normal}
+span.sansserif {font-family:sans-serif; font-weight:normal}
+ul.no-bullet {list-style: none}
+-->
+</style>
+
+
+</head>
+
+<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
+<a name="Lazy-Strings-In-Guile"></a>
+<div class="header">
+<p>
+Next: <a href="Architectures-In-Guile.html#Architectures-In-Guile" accesskey="n" rel="next">Architectures In Guile</a>, Previous: <a href="Breakpoints-In-Guile.html#Breakpoints-In-Guile" accesskey="p" rel="previous">Breakpoints 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>
+</div>
+<hr>
+<a name="Guile-representation-of-lazy-strings_002e"></a>
+<h4 class="subsubsection">23.4.3.20 Guile representation of lazy strings.</h4>
+
+<a name="index-lazy-strings-in-guile"></a>
+<a name="index-_003cgdb_003alazy_002dstring_003e"></a>
+
+<p>A <em>lazy string</em> is a string whose contents is not retrieved or
+encoded until it is needed.
+</p>
+<p>A <code>&lt;gdb:lazy-string&gt;</code> is represented in <small>GDB</small> as an
+<code>address</code> that points to a region of memory, an <code>encoding</code>
+that will be used to encode that region of memory, and a <code>length</code>
+to delimit the region of memory that represents the string. The
+difference between a <code>&lt;gdb:lazy-string&gt;</code> and a string wrapped within
+a <code>&lt;gdb:value&gt;</code> is that a <code>&lt;gdb:lazy-string&gt;</code> will be treated
+differently by <small>GDB</small> when printing. A <code>&lt;gdb:lazy-string&gt;</code> is
+retrieved and encoded during printing, while a <code>&lt;gdb:value&gt;</code>
+wrapping a string is immediately retrieved and encoded on creation.
+</p>
+<p>The following lazy-string-related procedures are provided by the
+<code>(gdb)</code> module:
+</p>
+<dl>
+<dt><a name="index-lazy_002dstring_003f"></a>Scheme Procedure: <strong>lazy-string?</strong> <em>object</em></dt>
+<dd><p>Return <code>#t</code> if <var>object</var> is an object of type <code>&lt;gdb:lazy-string&gt;</code>.
+Otherwise return <code>#f</code>.
+</p></dd></dl>
+
+<dl>
+<dt><a name="index-lazy_002dstring_002daddress"></a>Scheme Procedure: <strong>lazy-string-address</strong> <em>lazy-sring</em></dt>
+<dd><p>Return the address of <var>lazy-string</var>.
+</p></dd></dl>
+
+<dl>
+<dt><a name="index-lazy_002dstring_002dlength"></a>Scheme Procedure: <strong>lazy-string-length</strong> <em>lazy-string</em></dt>
+<dd><p>Return the length of <var>lazy-string</var> in characters. If the
+length is -1, then the string will be fetched and encoded up to the
+first null of appropriate width.
+</p></dd></dl>
+
+<dl>
+<dt><a name="index-lazy_002dstring_002dencoding"></a>Scheme Procedure: <strong>lazy-string-encoding</strong> <em>lazy-string</em></dt>
+<dd><p>Return the encoding that will be applied to <var>lazy-string</var>
+when the string is printed by <small>GDB</small>. If the encoding is not
+set, or contains an empty string, then <small>GDB</small> will select the
+most appropriate encoding when the string is printed.
+</p></dd></dl>
+
+<dl>
+<dt><a name="index-lazy_002dstring_002dtype"></a>Scheme Procedure: <strong>lazy-string-type</strong> <em>lazy-string</em></dt>
+<dd><p>Return the type that is represented by <var>lazy-string</var>&rsquo;s type.
+For a lazy string this is a pointer or array type. To
+resolve this to the lazy string&rsquo;s character type, use <code>type-target-type</code>.
+See <a href="Types-In-Guile.html#Types-In-Guile">Types In Guile</a>.
+</p></dd></dl>
+
+<dl>
+<dt><a name="index-lazy_002dstring_002d_003evalue"></a>Scheme Procedure: <strong>lazy-string-&gt;value</strong> <em>lazy-string</em></dt>
+<dd><p>Convert the <code>&lt;gdb:lazy-string&gt;</code> to a <code>&lt;gdb:value&gt;</code>. This value
+will point to the string in memory, but will lose all the delayed
+retrieval, encoding and handling that <small>GDB</small> applies to a
+<code>&lt;gdb:lazy-string&gt;</code>.
+</p></dd></dl>
+
+<hr>
+<div class="header">
+<p>
+Next: <a href="Architectures-In-Guile.html#Architectures-In-Guile" accesskey="n" rel="next">Architectures In Guile</a>, Previous: <a href="Breakpoints-In-Guile.html#Breakpoints-In-Guile" accesskey="p" rel="previous">Breakpoints 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>
+</div>
+
+
+
+</body>
+</html>