From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1551) id 8DCDD396EEDE; Fri, 21 Oct 2022 21:06:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8DCDD396EEDE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666386393; bh=I/B+W026ucv2DOxjYFEnqlNTCzZbgY70oAgAsnGn3Kk=; h=From:To:Subject:Date:From; b=oO1lIC2IXmTo6APmbdsIdzFV0KCGzAZ4zmpjZqSS1cRtFyw1H9qJFXhSEZLWyeZbv M4VpYxpmRC8tbaFq1mHEnAYzFy2z3jI9E2sFoq2zEyMIcdqNyvFP/6conWIMtsz+7Y qROdPZtLc85NsqSNC/fgtnaOqdDIE75LY4GGNcNM= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Pedro Alves To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Improve Python Unwinders documentation X-Act-Checkin: binutils-gdb X-Git-Author: Pedro Alves X-Git-Refname: refs/heads/master X-Git-Oldrev: 129d1afcc50c0aa3cf69fb3c5d4d8c825bec1061 X-Git-Newrev: 62fe72fda1f79543f150e63dada6abf8e7ad34a5 Message-Id: <20221021210633.8DCDD396EEDE@sourceware.org> Date: Fri, 21 Oct 2022 21:06:33 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D62fe72fda1f7= 9543f150e63dada6abf8e7ad34a5 commit 62fe72fda1f79543f150e63dada6abf8e7ad34a5 Author: Pedro Alves Date: Fri Sep 30 17:23:03 2022 +0100 Improve Python Unwinders documentation =20 - avoid "GDB proper" to refer to global locus, as object files and program spaces are also GDB proper. =20 - gdb.register_unwinder does not accept locus=3Dgdb. =20 - "a unwinder" -> "an unwinder" =20 Approved-by: Eli Zaretskii Change-Id: I98c1b1000e1063815238e945ca71ec6f37b5702e Diff: --- gdb/doc/python.texi | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi index 2692211f388..f73b9a43a86 100644 --- a/gdb/doc/python.texi +++ b/gdb/doc/python.texi @@ -2861,21 +2861,21 @@ class MyUnwinder(Unwinder): =20 @end smallexample =20 -@subheading Registering a Unwinder +@subheading Registering an Unwinder =20 -An object file, a program space, and the @value{GDBN} proper can have -unwinders registered with it. +Object files and program spaces can have unwinders registered with +them. In addition, you can also register unwinders globally. =20 -The @code{gdb.unwinders} module provides the function to register a +The @code{gdb.unwinders} module provides the function to register an unwinder: =20 @defun gdb.unwinder.register_unwinder (locus, unwinder, replace=3DFalse) -@var{locus} is specifies an object file or a program space to which -@var{unwinder} is added. Passing @code{None} or @code{gdb} adds -@var{unwinder} to the @value{GDBN}'s global unwinder list. The newly -added @var{unwinder} will be called before any other unwinder from the +@var{locus} specifies to which unwinder list to prepend the +@var{unwinder}. It can be either an object file, a program space, or +@code{None}, in which case the unwinder is registered globally. The +newly added @var{unwinder} will be called before any other unwinder from t= he 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 old unwinder is deleted. @end defun