diff options
author | Andrew Cagney <cagney@redhat.com> | 2000-02-29 07:17:15 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2000-02-29 07:17:15 +0000 |
commit | 1b4ed867e6fb4c7c2319dccb3a637ac8ccb1e9a3 (patch) | |
tree | f5253c8dd86d6ad042b4a0afc542abf2a86e0a24 /gdb/stack.c | |
parent | b80cd228589e3c94bd33072fd3f5a5a16ca8d6dc (diff) | |
download | gdb-1b4ed867e6fb4c7c2319dccb3a637ac8ccb1e9a3.tar.gz |
Add more checks for no stack frame.
Diffstat (limited to 'gdb/stack.c')
-rw-r--r-- | gdb/stack.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/stack.c b/gdb/stack.c index c586f4573da..8684b7b7b9c 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -1111,6 +1111,12 @@ backtrace_command_1 (count_exp, show_locals, from_tty) printing. Second, it must set the variable count to the number of frames which we should print, or -1 if all of them. */ trailing = get_current_frame (); + + /* The target can be in a state where there is no valid frames + (e.g., just connected). */ + if (trailing == NULL) + error ("No stack."); + trailing_level = 0; if (count_exp) { |