From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Phil Muldoon <pmuldoon@redhat.com>
Cc: archer@sourceware.org
Subject: [python] [commit] alias.py removal
Date: Mon, 19 Dec 2011 20:46:00 -0000 [thread overview]
Message-ID: <20111219204625.GA25742@host2.jankratochvil.net> (raw)
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 <jan.kratochvil@redhat.com>
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 <dje@google.com>
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 <http://www.gnu.org/licenses/>.
-
-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()
reply other threads:[~2011-12-19 20:46 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=20111219204625.GA25742@host2.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=archer@sourceware.org \
--cc=pmuldoon@redhat.com \
/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: link
Be 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).