Jan Kratochvil
2011-12-19 20:46:25 UTC
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-H+wXaHxf7aLQT0dZR+***@public.gmane.org>
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-hpIqsD4AKlfQT0dZR+***@public.gmane.org>
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()
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-H+wXaHxf7aLQT0dZR+***@public.gmane.org>
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-hpIqsD4AKlfQT0dZR+***@public.gmane.org>
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()