diff options
author | David Carlton <carlton@bactrian.org> | 2003-08-05 17:13:34 +0000 |
---|---|---|
committer | David Carlton <carlton@bactrian.org> | 2003-08-05 17:13:34 +0000 |
commit | 3ec5308b78f02afc4a36c37cc327811e6adaa0e0 (patch) | |
tree | 872a6be534f681a23481be37b96a1894f07850dd /gdb/thread.c | |
parent | ecdd3a511bf8678ca05a7e6a40a61a68c12caf9d (diff) | |
download | gdb-3ec5308b78f02afc4a36c37cc327811e6adaa0e0.zip gdb-3ec5308b78f02afc4a36c37cc327811e6adaa0e0.tar.gz gdb-3ec5308b78f02afc4a36c37cc327811e6adaa0e0.tar.bz2 |
2003-08-05 David Carlton <carlton@kealia.com>
* configure.in (build_warnings): Delete -Wformat-nonliteral.
* configure (build_warnings): Ditto.
* Merge with mainline; tag is carlton_dictionary-20030805-merge.
Diffstat (limited to 'gdb/thread.c')
-rw-r--r-- | gdb/thread.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/gdb/thread.c b/gdb/thread.c index 315f33b..f8cc18d 100644 --- a/gdb/thread.c +++ b/gdb/thread.c @@ -417,14 +417,14 @@ info_threads_command (char *arg, int from_tty) struct thread_info *tp; ptid_t current_ptid; struct frame_info *cur_frame; - int saved_frame_level = frame_relative_level (deprecated_selected_frame); + int saved_frame_level = frame_relative_level (get_selected_frame ()); int counter; char *extra_info; - /* Avoid coredumps which would happen if we tried to access a NULL - deprecated_selected_frame. */ - if (!target_has_stack) - error ("No stack."); + /* Check that there really is a frame. This happens when a simulator + is connected but not loaded or running, for instance. */ + if (legacy_frame_p (current_gdbarch) && saved_frame_level < 0) + error ("No frame."); prune_threads (); target_find_new_threads (); @@ -448,10 +448,7 @@ info_threads_command (char *arg, int from_tty) puts_filtered (" "); switch_to_thread (tp->ptid); - if (deprecated_selected_frame) - print_stack_frame (deprecated_selected_frame, -1, 0); - else - printf_filtered ("[No stack.]\n"); + print_stack_frame (get_selected_frame (), -1, 0); } switch_to_thread (current_ptid); @@ -463,12 +460,12 @@ info_threads_command (char *arg, int from_tty) * of the stack (leaf frame). */ counter = saved_frame_level; - cur_frame = find_relative_frame (deprecated_selected_frame, &counter); + cur_frame = find_relative_frame (get_selected_frame (), &counter); if (counter != 0) { /* Ooops, can't restore, tell user where we are. */ warning ("Couldn't restore frame in current thread, at frame 0"); - print_stack_frame (deprecated_selected_frame, -1, 0); + print_stack_frame (get_selected_frame (), -1, 0); } else { |