public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  pmuldoon/python-backtrace: Use set/show frame-filter over set/show python frame-filter
@ 2013-04-11 13:57 pmuldoon
  0 siblings, 0 replies; only message in thread
From: pmuldoon @ 2013-04-11 13:57 UTC (permalink / raw)
  To: archer-commits

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 <pmuldoon@redhat.com>
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.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-04-11 13:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-11 13:57 [SCM] pmuldoon/python-backtrace: Use set/show frame-filter over set/show python frame-filter pmuldoon

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).