From e0f25bd9717c7973197095523db7c1cdc956cea2 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Thu, 27 May 2021 13:59:01 -0400 Subject: gdb: make add_info_alias accept target as a cmd_list_element Same idea as previous patch, but for add_info_alias. gdb/ChangeLog: * command.h (add_info_alias): Accept target as cmd_list_element. Update callers. Change-Id: If830d423364bf42d7bea5ac4dd3a81adcfce6f7a --- gdb/stack.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'gdb/stack.c') diff --git a/gdb/stack.c b/gdb/stack.c index a3a6ba6..66a4610 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -3508,17 +3508,19 @@ With a negative COUNT, print outermost -COUNT frames."), add_com_alias ("bt", backtrace_cmd, class_stack, 0); add_com_alias ("where", backtrace_cmd, class_stack, 0); - add_info ("stack", backtrace_command, - _("Backtrace of the stack, or innermost COUNT frames.")); - add_info_alias ("s", "stack", 1); - - add_prefix_cmd ("frame", class_info, &info_frame_cmd.base_command, - _("All about the selected stack frame.\n\ + cmd_list_element *info_stack_cmd + = add_info ("stack", backtrace_command, + _("Backtrace of the stack, or innermost COUNT frames.")); + add_info_alias ("s", info_stack_cmd, 1); + + cmd_list_element *info_frame_cmd_el + = add_prefix_cmd ("frame", class_info, &info_frame_cmd.base_command, + _("All about the selected stack frame.\n\ With no arguments, displays information about the currently selected stack\n\ frame. Alternatively a frame specification may be provided (See \"frame\")\n\ the information is then printed about the specified frame."), - &info_frame_cmd_list, 1, &infolist); - add_info_alias ("f", "frame", 1); + &info_frame_cmd_list, 1, &infolist); + add_info_alias ("f", info_frame_cmd_el, 1); add_cmd ("address", class_stack, &info_frame_cmd.address, _("\ -- cgit v1.1