[PUSHED/OBVIOUS] Remove duplicated creation of "frame" command and "f" alias.

Philippe Waroquiers philippe.waroquiers@skynet.be
Thu Apr 30 16:40:26 GMT 2020


"frame" and "f" are created twice by stack.c _initialize_stack.
Remove the second creation.
Regression tested on amd64/Debian.

2020-04-30  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
	* stack.c (_initialize_stack): Remove duplicated creation
	of "frame" command and "f" alias.
---
 gdb/ChangeLog | 4 ++++
 gdb/stack.c   | 9 ---------
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d9f2b2c6f6..27640e47d3 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2020-04-30  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
+	* stack.c (_initialize_stack): Remove duplicated creation
+	of "frame" command and "f" alias.
+
 2020-04-30  Hannes Domani  <ssbssa@yahoo.de>
 
 	PR gdb/15559
diff --git a/gdb/stack.c b/gdb/stack.c
index 7f541a6a01..e8a9a924d4 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -3324,7 +3324,6 @@ Select and print a stack frame.\n\
 With no argument, print the selected stack frame.  (See also \"info frame\").\n\
 A single numerical argument specifies the frame to select."),
                   &frame_cmd_list, "frame ", 1, &cmdlist);
-
   add_com_alias ("f", "frame", class_stack, 1);
 
 #define FRAME_APPLY_OPTION_HELP "\
@@ -3384,14 +3383,6 @@ shortcut for 'frame apply all -s [OPTION]... COMMAND'\n\
 See \"help frame apply all\" for available options."));
   set_cmd_completer_handle_brkchars (cmd, frame_apply_all_cmd_completer);
 
-  add_prefix_cmd ("frame", class_stack,
-		  &frame_cmd.base_command, _("\
-Select and print a stack frame.\n\
-With no argument, print the selected stack frame.  (See also \"info frame\").\n\
-A single numerical argument specifies the frame to select."),
-		  &frame_cmd_list, "frame ", 1, &cmdlist);
-  add_com_alias ("f", "frame", class_stack, 1);
-
   add_cmd ("address", class_stack, &frame_cmd.address,
 	   _("\
 Select and print a stack frame by stack address.\n\
-- 
2.20.1



More information about the Gdb-patches mailing list