From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 371 invoked by alias); 19 Dec 2011 20:46:49 -0000 Mailing-List: contact archer-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: List-Id: Received: (qmail 361 invoked by uid 22791); 19 Dec 2011 20:46:48 -0000 X-SWARE-Spam-Status: No, hits=-5.4 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Date: Mon, 19 Dec 2011 20:46:00 -0000 From: Jan Kratochvil To: Phil Muldoon Cc: archer@sourceware.org Subject: [python] [commit] alias.py removal Message-ID: <20111219204625.GA25742@host2.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2011-q4/txt/msg00009.txt.bz2 Hi Phil, removed alias.py from archer-tromey-python as it is IMO obsolete. And it would at least need to be renamed otherwise. Regards, Jan commit b23c21897a98714dce7ce63a022ff6874b3853f4 Author: Jan Kratochvil Date: Mon Dec 19 21:42:38 2011 +0100 Remove alias.py as it conflicts with "alias" GDB built-in command from: commit d86c4fa09227601559a328a861246931652afc1e Author: Doug Evans Date: Sun Oct 9 22:21:41 2011 +0000 Add new "alias" command. causing regression for gdb.base/alias.exp. diff --git a/gdb/data-directory/Makefile.in b/gdb/data-directory/Makefile.in index dfab89d..f06b6da 100644 --- a/gdb/data-directory/Makefile.in +++ b/gdb/data-directory/Makefile.in @@ -57,7 +57,6 @@ PYTHON_FILES = \ gdb/__init__.py \ gdb/backtrace.py \ gdb/command/__init__.py \ - gdb/command/alias.py \ gdb/command/backtrace.py \ gdb/command/ignore_errors.py \ gdb/command/pahole.py \ diff --git a/gdb/python/lib/gdb/command/alias.py b/gdb/python/lib/gdb/command/alias.py deleted file mode 100644 index 96b6618..0000000 --- a/gdb/python/lib/gdb/command/alias.py +++ /dev/null @@ -1,59 +0,0 @@ -# Alias command. - -# Copyright (C) 2008 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 - -class AliasImplementation (gdb.Command): - def __init__ (self, name, real, doc): - # Have to set __doc__ before the super init call. - # It would be nice if gdb's help looked up __doc__ dynamically. - self.__doc__ = doc - # Note: no good way to complete :( - super (AliasImplementation, self).__init__ (name, gdb.COMMAND_NONE) - self.real = real - - def invoke(self, arg, from_tty): - gdb.execute (self.real + ' ' + arg, from_tty) - -class AliasCommand (gdb.Command): - """Alias one command to another. -In the simplest form, the first word is the name of the alias, and -the remaining words are the the expansion. -An '=' by itself can be used to define a multi-word alias; words -before the '=' are the name of the new command.""" - - def __init__ (self): - # Completion is not quite right here. - super (AliasCommand, self).__init__ ("alias", gdb.COMMAND_NONE, - gdb.COMPLETE_COMMAND) - - def invoke (self, arg, from_tty): - self.dont_repeat () - # Without some form of quoting we can't alias a multi-word - # command to another command. - args = arg.split() - try: - start = args.index ('=') - end = start + 1 - except ValueError: - start = 1 - end = 1 - target = " ".join(args[end:]) - AliasImplementation (" ".join (args[0:start]), target, - "This command is an alias for '%s'." % target) - -AliasCommand()