aboutsummaryrefslogtreecommitdiff
path: root/gdb/stack.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2021-05-27 13:59:01 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2021-05-27 14:00:07 -0400
commite0f25bd9717c7973197095523db7c1cdc956cea2 (patch)
tree69041b783e0a83083475fc4390423bdee176ebe3 /gdb/stack.c
parent3947f654eabb1b6ccf8aad11ece46dc4b027f0f0 (diff)
downloadgdb-e0f25bd9717c7973197095523db7c1cdc956cea2.zip
gdb-e0f25bd9717c7973197095523db7c1cdc956cea2.tar.gz
gdb-e0f25bd9717c7973197095523db7c1cdc956cea2.tar.bz2
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
Diffstat (limited to 'gdb/stack.c')
-rw-r--r--gdb/stack.c18
1 files changed, 10 insertions, 8 deletions
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,
_("\