Skip to content
This repository has been archived by the owner on Aug 17, 2022. It is now read-only.

Commit

Permalink
gdb/doc: shorten some source lines, and prevent some line breaks
Browse files Browse the repository at this point in the history
Building on the previous commit, this makes use of a trailing @ to
split long @deffn lines in the guile.texi source file.  This splitting
doesn't change how the document is laid out by texinfo.

I have also wrapped keyword and argument name pairs in @w{...} to
prevent line breaks appearing between the two.  I've currently only
done this for the longer @deffn lines, where a line break is
possible.  This makes the @deffn lines much nicer to read in the
generated pdf.
  • Loading branch information
T-J-Teru committed Jan 7, 2022
1 parent 8af9b80 commit d509648
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions gdb/doc/guile.texi
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@ int

The @code{(gdb)} module provides these basic Guile functions.

@c TODO: line length
@deffn {Scheme Procedure} execute command @r{[}#:from-tty boolean@r{]} @r{[}#:to-string boolean@r{]}
@deffn {Scheme Procedure} execute command @w{@r{[}#:from-tty boolean@r{]}} @
@w{@r{[}#:to-string boolean@r{]}}
Evaluate @var{command}, a string, as a @value{GDBN} CLI command.
If a @value{GDBN} exception happens while @var{command} runs, it is
translated as described in
Expand Down Expand Up @@ -853,8 +853,9 @@ Return a Scheme bytevector with the raw contents of @code{<gdb:value>}
@var{value}. No transformation, endian or otherwise, is performed.
@end deffn

@c TODO: line length
@deffn {Scheme Procedure} value->string value @r{[}#:encoding encoding@r{]} @r{[}#:errors errors@r{]} @r{[}#:length length@r{]}
@deffn {Scheme Procedure} value->string value @
@w{@r{[}#:encoding encoding@r{]}} @w{@r{[}#:errors errors@r{]}} @
@w{@r{[}#:length length@r{]}}
If @var{value>} represents a string, then this method
converts the contents to a Guile string. Otherwise, this method will
throw an exception.
Expand Down Expand Up @@ -895,8 +896,8 @@ fetched and converted to the given length.
The length must be a Scheme integer and not a @code{<gdb:value>} integer.
@end deffn

@c TODO: line length
@deffn {Scheme Procedure} value->lazy-string value @r{[}#:encoding encoding@r{]} @r{[}#:length length@r{]}
@deffn {Scheme Procedure} value->lazy-string value @
@w{@r{[}#:encoding encoding@r{]}} @w{@r{[}#:length length@r{]}}
If this @code{<gdb:value>} represents a string, then this method
converts @var{value} to a @code{<gdb:lazy-string} (@pxref{Lazy Strings
In Guile}). Otherwise, this method will throw an exception.
Expand Down Expand Up @@ -2736,8 +2737,8 @@ its value, then @var{frame} must be given. If @var{frame} is not
given, or if @var{frame} is invalid, then an exception is thrown.
@end deffn

@c TODO: line length
@deffn {Scheme Procedure} lookup-symbol name @r{[}#:block block@r{]} @r{[}#:domain domain@r{]}
@deffn {Scheme Procedure} lookup-symbol name @w{@r{[}#:block block@r{]}} @
@w{@r{[}#:domain domain@r{]}}
This function searches for a symbol by name. The search scope can be
restricted to the parameters defined in the optional domain and block
arguments.
Expand Down Expand Up @@ -2971,8 +2972,9 @@ outside of Guile.
The following breakpoint-related procedures are provided by the
@code{(gdb)} module:

@c TODO: line length
@deffn {Scheme Procedure} make-breakpoint location @r{[}#:type type@r{]} @r{[}#:wp-class wp-class@r{]} @r{[}#:internal internal@r{]} @r{[}#:temporary temporary@r{]}
@deffn {Scheme Procedure} make-breakpoint location @w{@r{[}#:type type@r{]}} @
@w{@r{[}#:wp-class wp-class@r{]}} @w{@r{[}#:internal internal@r{]}} @
@w{@r{[}#:temporary temporary@r{]}}
Create a new breakpoint at @var{location}, a string naming the
location of the breakpoint, or an expression that defines a watchpoint.
The contents can be any location recognized by the @code{break} command,
Expand Down Expand Up @@ -3476,8 +3478,9 @@ The disassembler can be invoked from Scheme code.
Furthermore, the disassembler can take a Guile port as input,
allowing one to disassemble from any source, and not just target memory.

@c TODO: line length
@deffn {Scheme Procedure} arch-disassemble arch start-pc @r{[}#:port port@r{]} @r{[}#:offset offset@r{]} @r{[}#:size size@r{]} @r{[}#:count count@r{]}
@deffn {Scheme Procedure} arch-disassemble arch start-pc @
@w{@r{[}#:port port@r{]}} @w{@r{[}#:offset offset@r{]}} @
@w{@r{[}#:size size@r{]}} @w{@r{[}#:count count@r{]}}
Return a list of disassembled instructions starting from the memory
address @var{start-pc}.

Expand Down Expand Up @@ -3568,7 +3571,8 @@ This allows Guile code to read/write target memory using Guile's port and
bytevector functionality. The main routine is @code{open-memory} which
returns a port object. One can then read/write memory using that object.

@deffn {Scheme Procedure} open-memory @r{[}#:mode mode{]} @r{[}#:start address{]} @r{[}#:size size{]}
@deffn {Scheme Procedure} open-memory @w{@r{[}#:mode mode@r{]}} @
@w{@r{[}#:start address@r{]}} @w{@r{[}#:size size@r{]}}
Return a port object that can be used for reading and writing memory.
The port will be open according to @var{mode}, which is the standard
mode argument to Guile port open routines, except that the @samp{"a"}
Expand Down

0 comments on commit d509648

Please sign in to comment.