From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9413 invoked by alias); 18 Sep 2013 20:02:47 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 9394 invoked by uid 89); 18 Sep 2013 20:02:46 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 18 Sep 2013 20:02:46 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r8IK2idv009661 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 18 Sep 2013 16:02:45 -0400 Received: from localhost.localdomain (ovpn-112-31.ams2.redhat.com [10.36.112.31]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r8IK2hjU029660 for ; Wed, 18 Sep 2013 16:02:44 -0400 Message-ID: <523A06E2.1010602@redhat.com> Date: Wed, 18 Sep 2013 20:02:00 -0000 From: Phil Muldoon MIME-Version: 1.0 To: "gdb-patches@sourceware.org" Subject: [patch][doc] Fix PR python/15613 (make gdb.GdbError formatting consistent with other exceptions Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2013-09/txt/msg00626.txt.bz2 This patch addresses PR 15613. This makes the formatting of gdb.GdbError more consistent with other exception types documented. OK? Cheers, Phil 2013-09-18 Phil Muldoon PR python/15613 * gdb.texinfo (Exception Handling): Reorganize gdb.Error to be an item in a table instead of an findex. -- diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 60d2877..0796e45 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -23631,6 +23631,11 @@ NameError: name 'foo' is not defined Python code are converted to Python exceptions. The type of the Python exception depends on the error. +For the exceptions detailed below, your exception handler will see the +@value{GDBN} error message as its value and the Python call stack +backtrace at the Python statement closest to where the @value{GDBN} +error occurred as the traceback. + @ftable @code @item gdb.error This is the base class for most exceptions generated by @value{GDBN}. @@ -23649,12 +23654,11 @@ User interrupt (via @kbd{C-c} or by typing @kbd{q} at a pagination prompt) is translated to a Python @code{KeyboardInterrupt} exception. @end ftable -In all cases, your exception handler will see the @value{GDBN} error -message as its value and the Python call stack backtrace at the Python -statement closest to where the @value{GDBN} error occured as the -traceback. +Some exceptions types will not trigger a traceback to be printed in +@value{GDBN}. The table below details these types of exception. -@findex gdb.GdbError +@ftable @code +@item gdb.GdbError When implementing @value{GDBN} commands in Python via @code{gdb.Command}, it is useful to be able to throw an exception that doesn't cause a traceback to be printed. For example, the user may have invoked the @@ -23677,6 +23681,7 @@ to handle this case. Example: (gdb) hello-world 42 hello-world takes no arguments @end smallexample +@end ftable @node Values From Inferior @subsubsection Values From Inferior