mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-17 04:43:17 +08:00
gdb/
* tui/tui-hooks.c (tui_selected_frame_level_changed_hook): Assume there's always a frame. Use get_frame_pc_if_available instead of get_frame_pc, and if there's no PC available, don't look up a symtab.
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
2011-03-18 Pedro Alves <pedro@codesourcery.com>
|
||||||
|
|
||||||
|
* tui/tui-hooks.c (tui_selected_frame_level_changed_hook): Assume
|
||||||
|
there's always a frame. Use get_frame_pc_if_available instead of
|
||||||
|
get_frame_pc, and if there's no PC available, don't look up a
|
||||||
|
symtab.
|
||||||
|
|
||||||
2011-03-18 Pedro Alves <pedro@codesourcery.com>
|
2011-03-18 Pedro Alves <pedro@codesourcery.com>
|
||||||
|
|
||||||
* stack.c (print_frame_local_vars, print_frame_arg_vars): Handle
|
* stack.c (print_frame_local_vars, print_frame_arg_vars): Handle
|
||||||
|
@ -190,6 +190,7 @@ static void
|
|||||||
tui_selected_frame_level_changed_hook (int level)
|
tui_selected_frame_level_changed_hook (int level)
|
||||||
{
|
{
|
||||||
struct frame_info *fi;
|
struct frame_info *fi;
|
||||||
|
CORE_ADDR pc;
|
||||||
|
|
||||||
/* Negative level means that the selected frame was cleared. */
|
/* Negative level means that the selected frame was cleared. */
|
||||||
if (level < 0)
|
if (level < 0)
|
||||||
@ -199,28 +200,29 @@ tui_selected_frame_level_changed_hook (int level)
|
|||||||
/* Ensure that symbols for this frame are read in. Also, determine
|
/* Ensure that symbols for this frame are read in. Also, determine
|
||||||
the source language of this frame, and switch to it if
|
the source language of this frame, and switch to it if
|
||||||
desired. */
|
desired. */
|
||||||
if (fi)
|
if (get_frame_pc_if_available (fi, &pc))
|
||||||
{
|
{
|
||||||
struct symtab *s;
|
struct symtab *s;
|
||||||
|
|
||||||
s = find_pc_symtab (get_frame_pc (fi));
|
s = find_pc_symtab (pc);
|
||||||
/* elz: This if here fixes the problem with the pc not being
|
/* elz: This if here fixes the problem with the pc not being
|
||||||
displayed in the tui asm layout, with no debug symbols. The
|
displayed in the tui asm layout, with no debug symbols. The
|
||||||
value of s would be 0 here, and select_source_symtab would
|
value of s would be 0 here, and select_source_symtab would
|
||||||
abort the command by calling the 'error' function. */
|
abort the command by calling the 'error' function. */
|
||||||
if (s)
|
if (s)
|
||||||
select_source_symtab (s);
|
select_source_symtab (s);
|
||||||
|
}
|
||||||
|
|
||||||
/* Display the frame position (even if there is no symbols). */
|
/* Display the frame position (even if there is no symbols or the PC
|
||||||
tui_show_frame_info (fi);
|
is not known). */
|
||||||
|
tui_show_frame_info (fi);
|
||||||
|
|
||||||
/* Refresh the register window if it's visible. */
|
/* Refresh the register window if it's visible. */
|
||||||
if (tui_is_window_visible (DATA_WIN))
|
if (tui_is_window_visible (DATA_WIN))
|
||||||
{
|
{
|
||||||
tui_refreshing_registers = 1;
|
tui_refreshing_registers = 1;
|
||||||
tui_check_data_values (fi);
|
tui_check_data_values (fi);
|
||||||
tui_refreshing_registers = 0;
|
tui_refreshing_registers = 0;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user