aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc/guile.texi
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-02-16 22:41:49 +0100
committerLudovic Courtès <ludo@gnu.org>2014-02-17 14:19:40 +0100
commit6e7a66c1b4ea3d663d06d75ba9b7bb063a5caf26 (patch)
treed778675a848d5d991dcd6a60f4f952eca4117338 /gdb/doc/guile.texi
parent024a23103f04282872d4352302b1bfe04391a7a4 (diff)
downloadgdb-6e7a66c1b4ea3d663d06d75ba9b7bb063a5caf26.zip
gdb-6e7a66c1b4ea3d663d06d75ba9b7bb063a5caf26.tar.gz
gdb-6e7a66c1b4ea3d663d06d75ba9b7bb063a5caf26.tar.bz2
guile: Fix typos in the manual.
gdb/ 2014-02-17 Ludovic Courtès <ludo@gnu.org> * doc/guile.texi (Writing a Guile Pretty-Printer) <example>: Remove 'string-begins-with' procedure. Add 'pretty-printer' parameter to 'str-lookup-function' procedure. Look for the "std::string<" prefix. (Frames In Guile): Add 'frame' parameter to 'frame-read-var'. Adjust description.
Diffstat (limited to 'gdb/doc/guile.texi')
-rw-r--r--gdb/doc/guile.texi13
1 files changed, 5 insertions, 8 deletions
diff --git a/gdb/doc/guile.texi b/gdb/doc/guile.texi
index 924f97a..ceb98dc 100644
--- a/gdb/doc/guile.texi
+++ b/gdb/doc/guile.texi
@@ -1545,14 +1545,11 @@ And here is an example showing how a lookup function for the printer
example above might be written.
@smallexample
-(define (string-begins-with str prefix)
- (= (string-prefix-length str prefix) (string-length prefix)))
-
-(define (str-lookup-function value)
+(define (str-lookup-function pretty-printer value)
(let ((tag (type-tag (value-type value))))
(and tag
- (string-begins-with tag "my::string<")
- (make-std-string-printer value))))
+ (string-prefix? "std::string<" tag)
+ (make-my-string-printer value))))
@end smallexample
Then to register this printer in the global printer list:
@@ -1893,8 +1890,8 @@ Return the frame's @code{<gdb:sal>} (symtab and line) object.
@xref{Symbol Tables In Guile}.
@end deffn
-@deffn {Scheme Procedure} frame-read-var variable @r{[}#:block block@r{]}
-Return the value of @var{variable} in this frame. If the optional
+@deffn {Scheme Procedure} frame-read-var frame variable @r{[}#:block block@r{]}
+Return the value of @var{variable} in @var{frame}. If the optional
argument @var{block} is provided, search for the variable from that
block; otherwise start at the frame's current block (which is
determined by the frame's current program counter). @var{variable}