Improve Python Unwinders documentation

- avoid "GDB proper" to refer to global locus, as object files and
  program spaces are also GDB proper.

- gdb.register_unwinder does not accept locus=gdb.

- "a unwinder" -> "an unwinder"

Approved-by: Eli Zaretskii <eliz@gnu.org>
Change-Id: I98c1b1000e1063815238e945ca71ec6f37b5702e
This commit is contained in:
Pedro Alves 2022-09-30 17:23:03 +01:00
parent 129d1afcc5
commit 62fe72fda1

View file

@ -2861,21 +2861,21 @@ class MyUnwinder(Unwinder):
@end smallexample @end smallexample
@subheading Registering a Unwinder @subheading Registering an Unwinder
An object file, a program space, and the @value{GDBN} proper can have Object files and program spaces can have unwinders registered with
unwinders registered with it. them. In addition, you can also register unwinders globally.
The @code{gdb.unwinders} module provides the function to register a The @code{gdb.unwinders} module provides the function to register an
unwinder: unwinder:
@defun gdb.unwinder.register_unwinder (locus, unwinder, replace=False) @defun gdb.unwinder.register_unwinder (locus, unwinder, replace=False)
@var{locus} is specifies an object file or a program space to which @var{locus} specifies to which unwinder list to prepend the
@var{unwinder} is added. Passing @code{None} or @code{gdb} adds @var{unwinder}. It can be either an object file, a program space, or
@var{unwinder} to the @value{GDBN}'s global unwinder list. The newly @code{None}, in which case the unwinder is registered globally. The
added @var{unwinder} will be called before any other unwinder from the newly added @var{unwinder} will be called before any other unwinder from the
same locus. Two unwinders in the same locus cannot have the same same locus. Two unwinders in the same locus cannot have the same
name. An attempt to add a unwinder with already existing name raises name. An attempt to add an unwinder with an already existing name raises
an exception unless @var{replace} is @code{True}, in which case the an exception unless @var{replace} is @code{True}, in which case the
old unwinder is deleted. old unwinder is deleted.
@end defun @end defun