This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 2/3] deprecate "skip enable/etc.", doc string cleanup


This patch deprecates "skip enable", "skip disable", "skip delete"
in favor of "enable skip", "disable skip", "delete skip".
And it uses the doc string macros of 1/3.

2016-04-17  Doug Evans  <dje@google.com>

	* NEWS: Announce new skip commands, and deprecated ones.
	* skip.c (_initialize_step_skip): Deprecate "skip enable",
	"skip disable", "skip delete" in favor of "enable skip",
	"disable skip", "delete skip". Simplify doc strings.

	doc/
	* gdb.texinfo (Skipping Over Functions and Files): Add docs for
	"enable skip", "disable skip", "delete skip". Mark "skip enable",
	"skip disable", "skip delete" as deprecated.

diff --git a/gdb/NEWS b/gdb/NEWS
index 39d99b7..2042027 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -34,6 +34,17 @@ skip -rfunction regular-expression
   glob-style file names and regular expressions for function names.
   Additionally, a file spec and a function spec may now be combined.

+enable skip [NUMBERS AND/OR RANGES]
+disable skip [NUMBERS AND/OR RANGES]
+delete skip [NUMBERS AND/OR RANGES]
+  These commands replace the now deprecated "skip enable", "skip disable",
+  and "skip delete" commands.
+
+skip enable [NUMBERS AND/OR RANGES]
+skip disable [NUMBERS AND/OR RANGES]
+skip delete [NUMBERS AND/OR RANGES]
+  These commands are now deprecated.
+
 maint info line-table REGEXP
   Display the contents of GDB's internal line table data struture.

diff --git a/gdb/skip.c b/gdb/skip.c
index 15681cc..12725d6 100644
--- a/gdb/skip.c
+++ b/gdb/skip.c
@@ -713,33 +713,31 @@ If no function name is given, skip the current function."),
 	       &skiplist);
   set_cmd_completer (c, location_completer);

-  add_cmd ("enable", class_breakpoint, skip_enable_command, _("\
-Enable skip entries.  You can specify numbers (e.g. \"skip enable 1 3\"), \
-ranges (e.g. \"skip enable 4-8\"), or both (e.g. \"skip enable 1 3 4-8\").\n\n\ -If you don't specify any numbers or ranges, we'll enable all skip entries.\n\n\
-Usage: skip enable [NUMBERS AND/OR RANGES]"),
-	   &skiplist);
-
-  add_cmd ("disable", class_breakpoint, skip_disable_command, _("\
-Disable skip entries. You can specify numbers (e.g. \"skip disable 1 3\"), \ -ranges (e.g. \"skip disable 4-8\"), or both (e.g. \"skip disable 1 3 4-8\").\n\n\ -If you don't specify any numbers or ranges, we'll disable all skip entries.\n\n\
-Usage: skip disable [NUMBERS AND/OR RANGES]"),
-	   &skiplist);
-
-  add_cmd ("delete", class_breakpoint, skip_delete_command, _("\
-Delete skip entries.  You can specify numbers (e.g. \"skip delete 1 3\"), \
-ranges (e.g. \"skip delete 4-8\"), or both (e.g. \"skip delete 1 3 4-8\").\n\n\ -If you don't specify any numbers or ranges, we'll delete all skip entries.\n\n\
-Usage: skip delete [NUMBERS AND/OR RANGES]"),
-           &skiplist);
+  add_cmd ("skip", class_breakpoint, skip_enable_command,
+	   _(ENABLE_DOC_STRING ("skip", "enable skip")),
+	   &enablelist);
+  add_cmd ("skip", class_breakpoint, skip_disable_command,
+	   _(DISABLE_DOC_STRING ("skip", "disable skip")),
+	   &disablelist);
+  add_cmd ("skip", class_breakpoint, skip_delete_command,
+	   _(DELETE_DOC_STRING ("skip", "delete skip")),
+           &deletelist);
+
+  /* "skip enable|disable|delete" are deprecated.  */
+  c = add_cmd ("enable", class_breakpoint, skip_enable_command,
+	       _(ENABLE_DOC_STRING ("skip", "skip enable")),
+	       &skiplist);
+  deprecate_cmd (c, "enable skip");
+  c = add_cmd ("disable", class_breakpoint, skip_disable_command,
+	       _(DISABLE_DOC_STRING ("skip", "skip disable")),
+	       &skiplist);
+  deprecate_cmd (c, "disable skip");
+  c = add_cmd ("delete", class_breakpoint, skip_delete_command,
+	       _(DELETE_DOC_STRING ("skip", "skip delete")),
+	       &skiplist);
+  deprecate_cmd (c, "delete skip");

   add_info ("skip", skip_info, _("\
-Display the status of skips. You can specify numbers (e.g. \"skip info 1 3\"), \
-ranges (e.g. \"skip info 4-8\"), or both (e.g. \"skip info 1 3 4-8\").\n\n\
-If you don't specify any numbers or ranges, we'll show all skips.\n\n\
-Usage: skip info [NUMBERS AND/OR RANGES]\n\
-The \"Type\" column indicates one of:\n\
-\tfile        - ignored file\n\
-\tfunction    - ignored function"));
+Display the status of skips.\n"
+EDDI_USAGE_DOC_STRING_WITH_ALL ("skip", "info skip", "displayed")));
 }
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 7abd55e..a4b14c9 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -5679,6 +5679,27 @@ The name or regular expression of the function to skip.
 If no function is specified this is @samp{<none>}.
 @end table

+@kindex delete skip
+@item delete skip @r{[}@var{range}@r{]}
+Delete the specified skip(s).  If @var{range} is not specified, delete all
+skips.
+
+@kindex enable skip
+@item enable skip @r{[}@var{range}@r{]}
+Enable the specified skip(s).  If @var{range} is not specified, enable all
+skips.
+
+@kindex disable skip
+@item disable skip @r{[}@var{range}@r{]}
+Disable the specified skip(s). If @var{range} is not specified, disable all
+skips.
+
+@end table
+
+The following commands are deprecated.
+
+@table @code
+
 @kindex skip delete
 @item skip delete @r{[}@var{range}@r{]}
 Delete the specified skip(s).  If @var{range} is not specified, delete all


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]