From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5517 invoked by alias); 11 Apr 2013 13:57:53 -0000 Mailing-List: contact archer-commits-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: Received: (qmail 5426 invoked by uid 9514); 11 Apr 2013 13:57:53 -0000 Date: Thu, 11 Apr 2013 13:57:00 -0000 Message-ID: <20130411135753.5399.qmail@sourceware.org> From: pmuldoon@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] pmuldoon/python-backtrace: Use set/show frame-filter over set/show python frame-filter X-Git-Refname: refs/heads/pmuldoon/python-backtrace X-Git-Reftype: branch X-Git-Oldrev: 0cb454caccab3d459a8db960d65246391572695c X-Git-Newrev: 81259914c748edc7ccba84fb00f3f5926d785c78 X-SW-Source: 2013-q2/txt/msg00018.txt.bz2 List-Id: The branch, pmuldoon/python-backtrace has been updated via 81259914c748edc7ccba84fb00f3f5926d785c78 (commit) from 0cb454caccab3d459a8db960d65246391572695c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 81259914c748edc7ccba84fb00f3f5926d785c78 Author: Phil Muldoon Date: Thu Apr 11 14:57:12 2013 +0100 Use set/show frame-filter over set/show python frame-filter ----------------------------------------------------------------------- Summary of changes: gdb/python/lib/gdb/command/frame_filters.py | 37 ++++++++++++++------------- gdb/testsuite/gdb.python/py-framefilter.exp | 6 ++-- 2 files changed, 22 insertions(+), 21 deletions(-) First 500 lines of diff: diff --git a/gdb/python/lib/gdb/command/frame_filters.py b/gdb/python/lib/gdb/command/frame_filters.py index 78cbeea..e1800f6 100644 --- a/gdb/python/lib/gdb/command/frame_filters.py +++ b/gdb/python/lib/gdb/command/frame_filters.py @@ -28,15 +28,16 @@ class SetFilterPrefixCmd(gdb.Command): """Prefix command for 'set' frame-filter related operations.""" def __init__(self): - super(SetFilterPrefixCmd, self).__init__("set python frame-filter", - gdb.COMMAND_DATA, - gdb.COMPLETE_COMMAND, True) + super(SetFilterPrefixCmd, self).__init__("set frame-filter", + gdb.COMMAND_OBSCURE, + gdb.COMPLETE_NONE, True) + class ShowFilterPrefixCmd(gdb.Command): """Prefix command for 'show' frame-filter related operations.""" def __init__(self): - super(ShowFilterPrefixCmd, self).__init__("show python frame-filter", - gdb.COMMAND_DATA, - gdb.COMPLETE_COMMAND, True) + super(ShowFilterPrefixCmd, self).__init__("show frame-filter", + gdb.COMMAND_OBSCURE, + gdb.COMPLETE_NONE, True) class InfoFrameFilter(gdb.Command): """List all registered Python frame-filters. @@ -280,7 +281,7 @@ class DisableFrameFilter(gdb.Command): class SetFrameFilterPriority(gdb.Command): """GDB command to set the priority of the specified frame-filter. - Usage: set python frame-filter priority DICTIONARY NAME PRIORITY + Usage: set frame-filter priority DICTIONARY NAME PRIORITY DICTIONARY is the name of the frame filter dictionary on which to operate. Named dictionaries are: "global" for the global frame @@ -295,8 +296,8 @@ class SetFrameFilterPriority(gdb.Command): """ def __init__(self): - super(SetFrameFilterPriority, self).__init__("set python " \ - "frame-filter priority", + super(SetFrameFilterPriority, self).__init__("set frame-filter " \ + "priority", gdb.COMMAND_DATA) def _parse_pri_arg(self, arg): @@ -316,8 +317,8 @@ class SetFrameFilterPriority(gdb.Command): argv = gdb.string_to_argv(arg); argc = len(argv) if argc != 3: - raise gdb.GdbError("set python frame-filter priority " \ - "takes exactly three arguments.") + raise gdb.GdbError("set frame-filter priority " \ + "takes exactly three arguments.") return argv @@ -361,7 +362,7 @@ class SetFrameFilterPriority(gdb.Command): class ShowFrameFilterPriority(gdb.Command): """GDB command to show the priority of the specified frame-filter. - Usage: show python frame-filter priority DICTIONARY NAME + Usage: show frame-filter priority DICTIONARY NAME DICTIONARY is the name of the frame filter dictionary on which to operate. Named dictionaries are: "global" for the global frame @@ -373,8 +374,8 @@ class ShowFrameFilterPriority(gdb.Command): """ def __init__(self): - super(ShowFrameFilterPriority, self).__init__("show python " \ - "frame-filter priority", + super(ShowFrameFilterPriority, self).__init__("show frame-filter " \ + "priority", gdb.COMMAND_DATA) def _parse_pri_arg(self, arg): @@ -394,8 +395,8 @@ class ShowFrameFilterPriority(gdb.Command): argv = gdb.string_to_argv(arg); argc = len(argv) if argc != 2: - raise gdb.GdbError("show python frame-filter priority " \ - "takes exactly two arguments.") + raise gdb.GdbError("show frame-filter priority " \ + "takes exactly two arguments.") return argv @@ -445,10 +446,10 @@ class ShowFrameFilterPriority(gdb.Command): print("Priority of filter '" + filter_name + "' in list '" \ + list_name + "' is: " + str(priority)) - -InfoFrameFilter() +# Register commands SetFilterPrefixCmd() ShowFilterPrefixCmd() +InfoFrameFilter() EnableFrameFilter() DisableFrameFilter() SetFrameFilterPriority() diff --git a/gdb/testsuite/gdb.python/py-framefilter.exp b/gdb/testsuite/gdb.python/py-framefilter.exp index 44dcbe7..6a11c43 100644 --- a/gdb/testsuite/gdb.python/py-framefilter.exp +++ b/gdb/testsuite/gdb.python/py-framefilter.exp @@ -75,10 +75,10 @@ gdb_test "info frame-filter" \ ".*900.*Yes.*Elider.*100.*Yes.*Reverse.*10.*.*No.*Object.*1.*" # Test set/show -gdb_test "show python frame-filter priority global Elider" \ +gdb_test "show frame-filter priority global Elider" \ "Priority of filter 'Elider' in list 'global' is: 900" -gdb_test_no_output "set python frame-filter priority global Elider 1000" -gdb_test "show python frame-filter priority global Elider" \ +gdb_test_no_output "set frame-filter priority global Elider 1000" +gdb_test "show frame-filter priority global Elider" \ "Priority of filter 'Elider' in list 'global' is: 1000" gdb_test "info frame-filter" \ ".*1000.*Yes.*Elider.*100.*Yes.*Reverse.*10.*.*No.*Object.*1.*" hooks/post-receive -- Repository for Project Archer.