From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28071 invoked by alias); 11 Mar 2013 20:33:14 -0000 Mailing-List: contact archer-commits-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: Received: (qmail 28034 invoked by uid 9514); 11 Mar 2013 20:33:10 -0000 Date: Mon, 11 Mar 2013 20:33:00 -0000 Message-ID: <20130311203310.28019.qmail@sourceware.org> From: pmuldoon@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] pmuldoon/python-backtrace: Fix some inconsistencies and typos X-Git-Refname: refs/heads/pmuldoon/python-backtrace X-Git-Reftype: branch X-Git-Oldrev: 79415a4bbb06fc0b3a8060da0a9f70ea9e0afd3e X-Git-Newrev: 572234138f3483c99b2bda9c851e3777f308ce12 X-SW-Source: 2013-q1/txt/msg00253.txt.bz2 List-Id: The branch, pmuldoon/python-backtrace has been updated via 572234138f3483c99b2bda9c851e3777f308ce12 (commit) from 79415a4bbb06fc0b3a8060da0a9f70ea9e0afd3e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 572234138f3483c99b2bda9c851e3777f308ce12 Author: Phil Muldoon Date: Mon Mar 11 20:32:36 2013 +0000 Fix some inconsistencies and typos ----------------------------------------------------------------------- Summary of changes: gdb/doc/gdb.texinfo | 30 +++++++++++++++++------------- 1 files changed, 17 insertions(+), 13 deletions(-) First 500 lines of diff: diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 57c5220..b3f15f0 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -24683,9 +24683,9 @@ locals for this frame. @defun FrameDecorator.frame (): This method must return the underlying @code{gdb.Frame} that this -frame decorate is decorating. @value{GDBN} requires the underlying +frame decorator is decorating. @value{GDBN} requires the underlying frame for internal frame information to determine how to print certain -values in frame printing. +values when printing a frame. @end defun @node Writing a Frame Filter/Decorator @@ -24693,12 +24693,12 @@ values in frame printing. @cindex writing a frame filter/decorator There are three basic elements that a frame filter must implement: it -must correctly implement the documented interface (@pxref{Frame -Filter API}), it must register itself with @value{GDBN}, and finally, -it must decide if it is to work on the data provided by -@value{GDBN}. In all cases, whether it works on the iterator or not, -each frame filter must return an iterator. A bare-bones frame filter -follows the pattern in the following example. +must correctly implement the documented interface (@pxref{Frame Filter +API}), it must register itself with @value{GDBN}, and finally, it must +decide if it is to work on the data provided by @value{GDBN}. In all +cases, whether it works on the iterator or not, each frame filter must +return an iterator. A bare-bones frame filter follows the pattern in +the following example. @smallexample import gdb @@ -24803,8 +24803,8 @@ to iterate through them all. This ends up duplicating effort as In this example decision making can be deferred to the printing step. As each frame is printed, the frame decorator can examine each frame in turn when @value{GDBN} iterates. From a performance viewpoint, -this is the most appropriate decision to make. A backtrace from large -or complex programs can constitute many thousands of frames. Also, if +this is the most appropriate decision to make as it avoids duplicating +the effort that the printing step would undertake anyway. Also, if there are many frame filters unwinding the stack during filtering, it can substantially delay the printing of the backtrace which will result in large memory usage, and a poor user experience. @@ -24813,7 +24813,7 @@ result in large memory usage, and a poor user experience. class InlineFilter(): def __init__(self): - self.name = "Inlined Frame Class" + self.name = "InlinedFrameFilter" self.priority = 100 self.enabled = True gdb.frame_filters[self.name] = self @@ -24892,7 +24892,7 @@ This example comprises of three sections. class InlineFrameFilter(): def __init__(self): - self.name = "Inlined Frame Class" + self.name = "InlinedFrameFilter" self.priority = 100 self.enabled = True gdb.frame_filters[self.name] = self @@ -24920,7 +24920,11 @@ class ElidingInlineIterator: return self def next(self): - frame = next(self.input_iterator) + try: + frame = next(self.input_iterator) + except StopIteration: + raise + if frame.inferior_frame().type() != gdb.INLINE_FRAME: return frame hooks/post-receive -- Repository for Project Archer.