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.
This commit is contained in:
parent
024a23103f
commit
6e7a66c1b4
|
@ -1,3 +1,12 @@
|
||||||
|
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.
|
||||||
|
|
||||||
2014-02-17 Doug Evans <xdje42@gmail.com>
|
2014-02-17 Doug Evans <xdje42@gmail.com>
|
||||||
|
|
||||||
* Makefile.in (SUBDIR_GUILE_OBS): Resort alphabetically.
|
* Makefile.in (SUBDIR_GUILE_OBS): Resort alphabetically.
|
||||||
|
|
|
@ -1545,14 +1545,11 @@ And here is an example showing how a lookup function for the printer
|
||||||
example above might be written.
|
example above might be written.
|
||||||
|
|
||||||
@smallexample
|
@smallexample
|
||||||
(define (string-begins-with str prefix)
|
(define (str-lookup-function pretty-printer value)
|
||||||
(= (string-prefix-length str prefix) (string-length prefix)))
|
|
||||||
|
|
||||||
(define (str-lookup-function value)
|
|
||||||
(let ((tag (type-tag (value-type value))))
|
(let ((tag (type-tag (value-type value))))
|
||||||
(and tag
|
(and tag
|
||||||
(string-begins-with tag "my::string<")
|
(string-prefix? "std::string<" tag)
|
||||||
(make-std-string-printer value))))
|
(make-my-string-printer value))))
|
||||||
@end smallexample
|
@end smallexample
|
||||||
|
|
||||||
Then to register this printer in the global printer list:
|
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}.
|
@xref{Symbol Tables In Guile}.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Procedure} frame-read-var variable @r{[}#:block block@r{]}
|
@deffn {Scheme Procedure} frame-read-var frame variable @r{[}#:block block@r{]}
|
||||||
Return the value of @var{variable} in this frame. If the optional
|
Return the value of @var{variable} in @var{frame}. If the optional
|
||||||
argument @var{block} is provided, search for the variable from that
|
argument @var{block} is provided, search for the variable from that
|
||||||
block; otherwise start at the frame's current block (which is
|
block; otherwise start at the frame's current block (which is
|
||||||
determined by the frame's current program counter). @var{variable}
|
determined by the frame's current program counter). @var{variable}
|
||||||
|
|
Loading…
Reference in New Issue