From 6e7a66c1b4ea3d663d06d75ba9b7bb063a5caf26 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ludovic=20Court=C3=A8s?= Date: Sun, 16 Feb 2014 22:41:49 +0100 Subject: [PATCH] guile: Fix typos in the manual. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit gdb/ 2014-02-17 Ludovic Courtès * doc/guile.texi (Writing a Guile Pretty-Printer) : 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. --- gdb/ChangeLog | 9 +++++++++ gdb/doc/guile.texi | 13 +++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index dca8d582768..a9767e7470f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,12 @@ +2014-02-17 Ludovic Courtès + + * doc/guile.texi (Writing a Guile Pretty-Printer) : + 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. + 2014-02-17 Doug Evans * Makefile.in (SUBDIR_GUILE_OBS): Resort alphabetically. diff --git a/gdb/doc/guile.texi b/gdb/doc/guile.texi index 924f97a7a90..ceb98dc2767 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{} (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} -- 2.30.2