+2008-07-13 Pedro Alves <pedro@codesourcery.com>
+
+ * thread.c (restore_selected_frame): On fail to restore, select
+ the innermost frame, and don't crash when warning the user.
+
2008-07-13 Hui Zhu <teawater@gmail.com>
* symtab.c (expand_line_sal): Fix a memory leak.
return;
}
- /* Nothing else to do, the frame layout really changed.
- Tell the user. */
+ /* Nothing else to do, the frame layout really changed. Select the
+ innermost stack frame. */
+ select_frame (get_current_frame ());
+
+ /* Warn the user. */
if (!ui_out_is_mi_like_p (uiout))
{
warning (_("\
/* For MI, we should probably have a notification about
current frame change. But this error is not very
likely, so don't bother for now. */
- print_stack_frame (frame, 1, SRC_LINE);
+ print_stack_frame (get_selected_frame (NULL), 1, SRC_LINE);
}
}