From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id sD6kHNYwmmKUIAoAWB0awg (envelope-from ) for ; Fri, 03 Jun 2022 12:03:34 -0400 Received: by simark.ca (Postfix, from userid 112) id 716EF1E221; Fri, 3 Jun 2022 12:03:34 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=jGCd2O41; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id DBA0E1E143 for ; Fri, 3 Jun 2022 12:03:33 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8B13E384144A for ; Fri, 3 Jun 2022 16:03:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8B13E384144A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1654272213; bh=Vd4K12wAI4nI6KIhBJDURkan00jrhTRJ3TjpZwFaXdw=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=jGCd2O41v9gnYy8BccFIg71G2/zRIqpqNEi1vpmmJFVkIXw9OH3ErhYJ+5vXu7D3c /dS9hh02GzpkfDAgeiIFoQ4V1D6Dt12ztCdwUkERssvrGRNTeJ1tPhkuxc0nmlNwVJ IVjM+yagxJJAFaUStc+t3sgI5eh3k5R4viU1/0kY= Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by sourceware.org (Postfix) with ESMTPS id 084BF385023C for ; Fri, 3 Jun 2022 16:01:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 084BF385023C Received: by mail-lf1-x12b.google.com with SMTP id u23so13335105lfc.1 for ; Fri, 03 Jun 2022 09:01:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Vd4K12wAI4nI6KIhBJDURkan00jrhTRJ3TjpZwFaXdw=; b=Jicla/lmah63I2g2Hovxsz2S7eaEW7QevlVHpvwSOT93JW/Nh2uYdoyQvieiZR1JSP kBQDGJ0dVNZG3B6f+nz0l8cZGiXcx5IZyMOrezfX+GScvSWi5vvrymu2aY4aBoOY1TuA 5kwK9voOia2o6R883xSptgdbfBEYB8DdVTwJY42V3jS+cOrrRSqgtyZ472GgHOGJ3ENZ 3KhpCh++fdMXqLd4hldfqY9RH1y1k5dumrGpmns2y2MAJsZ04TNCqWvb5bIKpCu2kgiH A/PPnkUnAIl+pPwhtYzJBw0CIjUvL3JKfdqFCJV44pGJZ6v8eBz6ehK7BN7EdCz0LZIo l6MQ== X-Gm-Message-State: AOAM530G6aOyZUhDi0LJCZfrX8JDudB+z7Ac/l+1bSfI8hNkkFJT5hZL lKWAk/PEiby6aLbQ1roFtqd/Q33SeQ== X-Google-Smtp-Source: ABdhPJxgZDGoN5yuUSoCbqY/A+LDDnX+UBaBjNrJyVzasJVb+pZupyJFNqqmnkRwSounu/6UP7qrng== X-Received: by 2002:a05:6512:243:b0:478:f951:7a5b with SMTP id b3-20020a056512024300b00478f9517a5bmr7215090lfo.105.1654272111532; Fri, 03 Jun 2022 09:01:51 -0700 (PDT) Received: from localhost.localdomain (85-128-83-172.static.ip.netia.com.pl. [85.128.83.172]) by smtp.gmail.com with ESMTPSA id x15-20020ac25dcf000000b0047255d210dbsm1654727lfq.10.2022.06.03.09.01.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Jun 2022 09:01:51 -0700 (PDT) To: gdb-patches@sourceware.org Subject: [PATCH v3 4/4] gdb/python doc: Move unwinder skeleton code Date: Fri, 3 Jun 2022 18:01:39 +0200 Message-Id: <20220603160139.136115-4-ptsneves@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220603160139.136115-1-ptsneves@gmail.com> References: <20220528115509.3865342-1-ptsneves@gmail.com> <20220603160139.136115-1-ptsneves@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Paulo Neves via Gdb-patches Reply-To: Paulo Neves Cc: Paulo Neves Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" This way all the concepts mentioned in the skeleton code are previously detailed. --- gdb/doc/python.texi | 50 ++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi index e2821755851..1deeae82b9b 100644 --- a/gdb/doc/python.texi +++ b/gdb/doc/python.texi @@ -2787,6 +2787,31 @@ values see @ref{gdbpy_frame_read_register,,Frame.read_register}. @var{value} is a register value (a @code{gdb.Value} object). @end defun +@subheading Registering a Unwinder + +An object file, a program space, and the @value{GDBN} proper can have +unwinders registered with it. + +The @code{gdb.unwinder} module provides the function to register a +unwinder: + +@defun gdb.unwinder.register_unwinder (locus, unwinder, replace=False) +@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 +same locus. Two unwinders in the same locus cannot have the same +name. An attempt to add a unwinder with already existing name raises +an exception unless @var{replace} is @code{True}, in which case the +old unwinder is deleted. +@end defun + +@subheading Unwinder Precedence + +@value{GDBN} first calls the unwinders from all the object files in no +particular order, then the unwinders from the current program space, +and finally the unwinders from @value{GDBN}. + @subheading Unwinder Skeleton Code @value{GDBN} comes with the module containing the base @code{Unwinder} @@ -2830,31 +2855,6 @@ class MyUnwinder(Unwinder): gdb.unwinder.register_unwinder (, MyUnwinder, replace=) @end smallexample -@subheading Registering a Unwinder - -An object file, a program space, and the @value{GDBN} proper can have -unwinders registered with it. - -The @code{gdb.unwinder} module provides the function to register a -unwinder: - -@defun gdb.unwinder.register_unwinder (locus, unwinder, replace=False) -@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 -same locus. Two unwinders in the same locus cannot have the same -name. An attempt to add a unwinder with already existing name raises -an exception unless @var{replace} is @code{True}, in which case the -old unwinder is deleted. -@end defun - -@subheading Unwinder Precedence - -@value{GDBN} first calls the unwinders from all the object files in no -particular order, then the unwinders from the current program space, -and finally the unwinders from @value{GDBN}. - @node Xmethods In Python @subsubsection Xmethods In Python @cindex xmethods in Python -- 2.25.1