From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28749 invoked by alias); 14 Jun 2012 10:26:21 -0000 Mailing-List: contact archer-commits-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: Received: (qmail 28717 invoked by uid 9514); 14 Jun 2012 10:26:19 -0000 Date: Thu, 14 Jun 2012 10:26:00 -0000 Message-ID: <20120614102619.28668.qmail@sourceware.org> From: pmuldoon@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] archer-pmuldoon-python-backtrace: Remove upto.py X-Git-Refname: refs/heads/archer-pmuldoon-python-backtrace X-Git-Reftype: branch X-Git-Oldrev: edcdfba5b00306ef19e7da9a23665cb8e0a88bc6 X-Git-Newrev: ad9b70c700bac4bad3a314a5ed133d4f7f13fa41 X-SW-Source: 2012-q2/txt/msg00058.txt.bz2 List-Id: The branch, archer-pmuldoon-python-backtrace has been updated via ad9b70c700bac4bad3a314a5ed133d4f7f13fa41 (commit) from edcdfba5b00306ef19e7da9a23665cb8e0a88bc6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit ad9b70c700bac4bad3a314a5ed133d4f7f13fa41 Author: Phil Muldoon Date: Thu Jun 14 11:26:02 2012 +0100 Remove upto.py ----------------------------------------------------------------------- Summary of changes: gdb/python/lib/gdb/command/upto.py | 128 ------------------------------------ 1 files changed, 0 insertions(+), 128 deletions(-) delete mode 100644 gdb/python/lib/gdb/command/upto.py First 500 lines of diff: diff --git a/gdb/python/lib/gdb/command/upto.py b/gdb/python/lib/gdb/command/upto.py deleted file mode 100644 index 5126531..0000000 --- a/gdb/python/lib/gdb/command/upto.py +++ /dev/null @@ -1,128 +0,0 @@ -# upto command. - -# Copyright (C) 2009, 2010 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -import gdb -import gdb.frame -import re - -class UptoPrefix (gdb.Command): - def __init__ (self): - super (UptoPrefix, self).__init__ ("upto", gdb.COMMAND_STACK, - prefix = True) - -class UptoImplementation (gdb.Command): - def __init__ (self, subcommand): - super (UptoImplementation, self).__init__ ("upto " + subcommand, - gdb.COMMAND_STACK) - - def search (self): - saved = gdb.selected_frame () - iter = gdb.frame.FrameIterator (saved) - found = False - try: - for frame in iter: - frame.select () - try: - if self.filter (frame): - wrapper = gdb.frame.FrameWrapper (frame) - gdb.frame.print_frame(wrapper, sys.stdout) - return - except: - pass - except: - pass - saved.select () - raise RuntimeError, 'Could not find a matching frame' - - def invoke (self, arg, from_tty): - self.rx = re.compile (arg) - self.search () - -class UptoSymbolCommand (UptoImplementation): - """Select and print some calling stack frame, based on symbol. -The argument is a regular expression. This command moves up the -stack, stopping at the first frame whose symbol matches the regular -expression.""" - - def __init__ (self): - super (UptoSymbolCommand, self).__init__ ("symbol") - - def filter (self, frame): - name = frame.name () - if name is not None: - if self.rx.search (name) is not None: - return True - return False - -class UptoSourceCommand (UptoImplementation): - """Select and print some calling stack frame, based on source file. -The argument is a regular expression. This command moves up the -stack, stopping at the first frame whose source file name matches the -regular expression.""" - - def __init__ (self): - super (UptoSourceCommand, self).__init__ ("source") - - def filter (self, frame): - name = frame.find_sal ().symtab.filename - if name is not None: - if self.rx.search (name) is not None: - return True - return False - -class UptoObjectCommand (UptoImplementation): - """Select and print some calling stack frame, based on object file. -The argument is a regular expression. This command moves up the -stack, stopping at the first frame whose object file name matches the -regular expression.""" - - def __init__ (self): - super (UptoObjectCommand, self).__init__ ("object") - - def filter (self, frame): - name = frame.find_sal ().symtab.objfile.filename - if name is not None: - if self.rx.search (name) is not None: - return True - return False - -class UptoWhereCommand (UptoImplementation): - """Select and print some calling stack frame, based on expression. -The argument is an expression. This command moves up the stack, -parsing and evaluating the expression in each frame. This stops when -the expression evaluates to a non-zero (true) value.""" - - def __init__ (self): - super (UptoWhereCommand, self).__init__ ("where") - - def filter (self, frame): - try: - if gdb.parse_and_eval (self.expression): - return True - except: - pass - return False - - def invoke (self, arg, from_tty): - self.expression = arg - self.search () - -UptoPrefix () -UptoSymbolCommand () -UptoSourceCommand () -UptoObjectCommand () -UptoWhereCommand () hooks/post-receive -- Repository for Project Archer.