aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi/mi-cmd-stack.c
diff options
context:
space:
mode:
authorNick Roberts <nickrob@snap.net.nz>2005-06-18 02:49:18 +0000
committerNick Roberts <nickrob@snap.net.nz>2005-06-18 02:49:18 +0000
commitfcf439322670fbcb4997e80544561043be1525c1 (patch)
treeeec5dc777f41cd23286e5fde3278826a18082b87 /gdb/mi/mi-cmd-stack.c
parent0ffa0ea5bcab011df6b93afddd5e99be30b1475f (diff)
downloadgdb-fcf439322670fbcb4997e80544561043be1525c1.zip
gdb-fcf439322670fbcb4997e80544561043be1525c1.tar.gz
gdb-fcf439322670fbcb4997e80544561043be1525c1.tar.bz2
(mi_cmd_stack_list_frames, mi_cmd_stack_info_depth):
Don't test for stack. (mi_cmd_stack_select_frame): Make the argument mandatory. Don't test for stack.
Diffstat (limited to 'gdb/mi/mi-cmd-stack.c')
-rw-r--r--gdb/mi/mi-cmd-stack.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c
index d912b17..d38d674 100644
--- a/gdb/mi/mi-cmd-stack.c
+++ b/gdb/mi/mi-cmd-stack.c
@@ -47,9 +47,6 @@ mi_cmd_stack_list_frames (char *command, char **argv, int argc)
struct cleanup *cleanup_stack;
struct frame_info *fi;
- if (!target_has_stack)
- error (_("mi_cmd_stack_list_frames: No stack."));
-
if (argc > 2 || argc == 1)
error (_("mi_cmd_stack_list_frames: Usage: [FRAME_LOW FRAME_HIGH]"));
@@ -104,9 +101,6 @@ mi_cmd_stack_info_depth (char *command, char **argv, int argc)
int i;
struct frame_info *fi;
- if (!target_has_stack)
- error (_("mi_cmd_stack_info_depth: No stack."));
-
if (argc > 1)
error (_("mi_cmd_stack_info_depth: Usage: [MAX_DEPTH]"));
@@ -329,16 +323,9 @@ list_args_or_locals (int locals, int values, struct frame_info *fi)
enum mi_cmd_result
mi_cmd_stack_select_frame (char *command, char **argv, int argc)
{
- if (!target_has_stack)
- error (_("mi_cmd_stack_select_frame: No stack."));
+ if (argc == 0 || argc > 1)
+ error (_("mi_cmd_stack_select_frame: Usage: FRAME_SPEC"));
- if (argc > 1)
- error (_("mi_cmd_stack_select_frame: Usage: [FRAME_SPEC]"));
-
- /* with no args, don't change frame */
- if (argc == 0)
- select_frame_command (0, 1 /* not used */ );
- else
- select_frame_command (argv[0], 1 /* not used */ );
+ select_frame_command (argv[0], 1 /* not used */ );
return MI_CMD_DONE;
}