summaryrefslogtreecommitdiffstats
path: root/gdb/stack.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2000-02-29 07:17:15 +0000
committerAndrew Cagney <cagney@redhat.com>2000-02-29 07:17:15 +0000
commitd082b2bb9259bf3063b43a9dd7e33188172627e4 (patch)
tree5a5f355ec67292c51b8fed903481ad481d662bf3 /gdb/stack.c
parent40d109bfbc1e7666dedf73f61ef7592c8d272e42 (diff)
downloadppe42-binutils-d082b2bb9259bf3063b43a9dd7e33188172627e4.tar.gz
ppe42-binutils-d082b2bb9259bf3063b43a9dd7e33188172627e4.zip
Add more checks for no stack frame.
Diffstat (limited to 'gdb/stack.c')
-rw-r--r--gdb/stack.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/stack.c b/gdb/stack.c
index c586f4573d..8684b7b7b9 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)
{
OpenPOWER on IntegriCloud