* python/lib/gdb/printing.py (register_pretty_printer): Change
authorDoug Evans <dje@google.com>
Mon, 29 Nov 2010 23:20:58 +0000 (23:20 +0000)
committerDoug Evans <dje@google.com>
Mon, 29 Nov 2010 23:20:58 +0000 (23:20 +0000)
printer-name:subprinter-name to printer-name;subprinter-name.
* python/lib/gdb/command/pretty_printers.py (parse_printer_regexps):
Ditto.
(InfoPrettyPrinter, EnablePrettyPrinter, DisablePrettyPrinter): Ditto.

doc/
* gdb.texinfo (Pretty-Printer Introduction): Change
printer-name:subprinter-name to printer-name;subprinter-name.

testsuite/
* gdb.python/py-pp-maint.exp: Change printer-name:subprinter-name to
printer-name;subprinter-name.

gdb/ChangeLog
gdb/doc/ChangeLog
gdb/doc/gdb.texinfo
gdb/python/lib/gdb/command/pretty_printers.py
gdb/python/lib/gdb/printing.py
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.python/py-pp-maint.exp

index d5a283bae66776c22a48d91a2a59063834adf746..0286cac408e34397a113946ec7f385a1a8e514c3 100644 (file)
@@ -1,3 +1,11 @@
+2010-11-29  Doug Evans  <dje@google.com>
+
+       * python/lib/gdb/printing.py (register_pretty_printer): Change
+       printer-name:subprinter-name to printer-name;subprinter-name.
+       * python/lib/gdb/command/pretty_printers.py (parse_printer_regexps):
+       Ditto.
+       (InfoPrettyPrinter, EnablePrettyPrinter, DisablePrettyPrinter): Ditto.
+
 2010-11-29  Tom Tromey  <tromey@redhat.com>
 
        * opencl-lang.c (lval_func_check_synthetic_pointer): New
index df2449a87f8186b679ac01297ba5dba1e08d9cef..6b4f2bb396a3e37008a0b3c0e58413257830fb2b 100644 (file)
@@ -1,3 +1,8 @@
+2010-11-29  Doug Evans  <dje@google.com>
+
+       * gdb.texinfo (Pretty-Printer Introduction): Change
+       printer-name:subprinter-name to printer-name;subprinter-name.
+
 2010-11-29  Phil Muldoon  <pmuldoon@redhat.com>
 
         PR python/12199
index 28ea55d645328aee265991cbe6d469dbdf6ebe1b..422812c323ea36cb4108b750a12db7d1793b80f0 100644 (file)
@@ -8160,7 +8160,7 @@ pretty-printers with their names.
 If a pretty-printer can handle multiple data types, then its
 @dfn{subprinters} are the printers for the individual data types.
 Each such subprinter has its own name.
-The format of the name is @var{printer-name}:@var{subprinter-name}.
+The format of the name is @var{printer-name};@var{subprinter-name}.
 
 Pretty-printers are installed by @dfn{registering} them with @value{GDBN}.
 Typically they are automatically loaded and registered when the corresponding
index 58a639aabdc975bcd0714024c28501219a39efa1..39559a9784d82da672f2001666a82a82db7563bf 100644 (file)
@@ -28,7 +28,7 @@ def parse_printer_regexps(arg):
         arg: The arguments to the command.  The format is:
              [object-regexp [name-regexp]].
              Individual printers in a collection are named as
-             printer-name:subprinter-name.
+             printer-name;subprinter-name.
 
     Returns:
         The result is a 3-tuple of compiled regular expressions, except that
@@ -48,7 +48,7 @@ def parse_printer_regexps(arg):
     if argc >= 1:
         object_regexp = argv[0]
     if argc >= 2:
-        name_subname = argv[1].split(":", 1)
+        name_subname = argv[1].split(";", 1)
         name_regexp = name_subname[0]
         if len(name_subname) == 2:
             subname_regexp = name_subname[1]
@@ -92,7 +92,7 @@ class InfoPrettyPrinter(gdb.Command):
 
     NAME-REGEXP matches the name of the pretty-printer.
     Individual printers in a collection are named as
-    printer-name:subprinter-name.
+    printer-name;subprinter-name.
     """
 
     def __init__ (self):
@@ -328,7 +328,7 @@ class EnablePrettyPrinter (gdb.Command):
 
     NAME-REGEXP matches the name of the pretty-printer.
     Individual printers in a collection are named as
-    printer-name:subprinter-name.
+    printer-name;subprinter-name.
     """
 
     def __init__(self):
@@ -351,7 +351,7 @@ class DisablePrettyPrinter (gdb.Command):
 
     NAME-REGEXP matches the name of the pretty-printer.
     Individual printers in a collection are named as
-    printer-name:subprinter-name.
+    printer-name;subprinter-name.
     """
 
     def __init__(self):
index 0971375d2df0531a304b746377fb8d835b4fb15e..80aa2cfed9e07de47edbdc9fb4835fb0eb31176b 100644 (file)
@@ -85,7 +85,7 @@ def register_pretty_printer(obj, printer):
 
     Raises:
         TypeError: A problem with the type of the printer.
-        ValueError: The printer's name contains a colon ":".
+        ValueError: The printer's name contains a semicolon ";".
 
     If the caller wants the printer to be listable and disableable, it must
     follow the PrettyPrinter API.  This applies to the old way (functions) too.
@@ -116,11 +116,11 @@ def register_pretty_printer(obj, printer):
     if hasattr(printer, "name"):
         if not isinstance(printer.name, basestring):
             raise TypeError("printer name is not a string")
-        # If printer provides a name, make sure it doesn't contain ":".
-        # Colon is used by the info/enable/disable pretty-printer commands
+        # If printer provides a name, make sure it doesn't contain ";".
+        # Semicolon is used by the info/enable/disable pretty-printer commands
         # to delimit subprinters.
-        if printer.name.find(":") >= 0:
-            raise ValueError("colon ':' in printer name")
+        if printer.name.find(";") >= 0:
+            raise ValueError("semicolon ';' in printer name")
         # Also make sure the name is unique.
         # Alas, we can't do the same for functions and __name__, they could
         # all have a canonical name like "lookup_function".
index 3564704c09063a96d0a278143622f2821423742d..b5aea2eb7859f4f003588351e67f39f37078bcbf 100644 (file)
@@ -1,3 +1,8 @@
+2010-11-29  Doug Evans  <dje@google.com>
+
+       * gdb.python/py-pp-maint.exp: Change printer-name:subprinter-name to
+       printer-name;subprinter-name.
+
 2010-11-29  Tom Tromey  <tromey@redhat.com>
 
        * gdb.dwarf2/implptr.exp: New file.
index 0aa79568e890a45e06ea62ef9c2ca45ccb664b91..747458463deb8a648b5c26621f42a66ed70f944a 100644 (file)
@@ -80,14 +80,20 @@ gdb_test "print ss" " = a=<a=<1> b=<$hex>> b=<a=<2> b=<$hex>>" \
 gdb_test "disable pretty-printer" \
     "5 printers disabled.*0 of 5 printers enabled"
 
+gdb_test "enable pretty-printer" \
+    "5 printers enabled.*5 of 5 printers enabled"
+
 gdb_test "disable pretty-printer global" \
-    "0 printers disabled.*0 of 5 printers enabled"
+    "5 printers disabled.*0 of 5 printers enabled"
+
+gdb_test "enable pretty-printer" \
+    "5 printers enabled.*5 of 5 printers enabled"
 
 gdb_test "disable pretty-printer global lookup_function_lookup_test" \
-    "0 printers disabled.*0 of 5 printers enabled"
+    "1 printer disabled.*4 of 5 printers enabled"
 
-gdb_test "disable pretty-printer global pp-test:.*" \
-    "0 printers disabled.*0 of 5 printers enabled"
+gdb_test "disable pretty-printer global pp-test;.*" \
+    "4 printers disabled.*0 of 5 printers enabled"
 
 gdb_test "info pretty-printer global .*function" \
     {.*function_lookup_test \[disabled\].*}
@@ -110,10 +116,10 @@ gdb_test "enable pretty-printer global lookup_function_lookup_test" \
 gdb_test "enable pretty-printer global pp-test" \
     "0 printers enabled.*1 of 5 printers enabled"
 
-gdb_test "enable pretty-printer global pp-test:.*ss.*" \
+gdb_test "enable pretty-printer global pp-test;.*ss.*" \
     "2 printers enabled.*3 of 5 printers enabled"
 
-gdb_test "enable pretty-printer global pp-test:.*s.*" \
+gdb_test "enable pretty-printer global pp-test;.*s.*" \
     "2 printers enabled.*5 of 5 printers enabled"
 
 gdb_test "info pretty-printer" \