public inbox for archer-commits@sourceware.org help / color / mirror / Atom feed
From: pmuldoon@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] archer-pmuldoon-python-backtrace: Add Python Frame-like iterator. Date: Thu, 14 Jun 2012 10:24:00 -0000 [thread overview] Message-ID: <20120614102404.26008.qmail@sourceware.org> (raw) The branch, archer-pmuldoon-python-backtrace has been updated via edcdfba5b00306ef19e7da9a23665cb8e0a88bc6 (commit) from 14212616ff6b4ac50b9396946dd76bc7ae5acf7c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit edcdfba5b00306ef19e7da9a23665cb8e0a88bc6 Author: Phil Muldoon <pmuldoon@redhat.com> Date: Thu Jun 14 11:23:37 2012 +0100 Add Python Frame-like iterator. ----------------------------------------------------------------------- Summary of changes: gdb/python/lib/gdb/FrameIterator.py | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) create mode 100644 gdb/python/lib/gdb/FrameIterator.py First 500 lines of diff: diff --git a/gdb/python/lib/gdb/FrameIterator.py b/gdb/python/lib/gdb/FrameIterator.py new file mode 100644 index 0000000..4f14e8a --- /dev/null +++ b/gdb/python/lib/gdb/FrameIterator.py @@ -0,0 +1,20 @@ +class FrameIterator(object): + """A frame iterator. Iterates over gdb.Frames or objects that + conform to that interface.""" + + def __init__ (self, frame_obj): + "Initialize a FrameIterator. FRAME_OBJ is the starting + frame." + + super(FrameIterator, self).__init__() + self.frame = frame + + def __iter__ (self): + return self + + def next (self): + result = self.frame + if result is None: + raise StopIteration + self.frame = result.older () + return result hooks/post-receive -- Repository for Project Archer.
reply other threads:[~2012-06-14 10:24 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20120614102404.26008.qmail@sourceware.org \ --to=pmuldoon@sourceware.org \ --cc=archer-commits@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).