/* The selected frame has changed. This is happens after a target stop or when the user explicitly changes the frame (up/down/thread/...). */ static void tui_selected_frame_level_changed_hook (int level) { struct frame_info *fi; fi = deprecated_selected_frame; /* Ensure that symbols for this frame are read in. Also, determine the source language of this frame, and switch to it if desired. */ if (fi) { struct symtab *s; s = find_pc_symtab (get_frame_pc (fi)); /* elz: this if here fixes the problem with the pc not being displayed in the tui asm layout, with no debug symbols. The value of s would be 0 here, and select_source_symtab would abort the command by calling the 'error' function */ if (s) select_source_symtab (s); /* Display the frame position (even if there is no symbols). */ tui_show_frame_info (fi); /* Refresh the register window if it's visible. */ if (tui_is_window_visible (DATA_WIN)) { tui_refreshing_registers = 1; tui_check_data_values (fi); tui_refreshing_registers = 0; } } }
static void tui_register_changed_hook (int regno) { struct frame_info *fi; fi = get_selected_frame (NULL); if (tui_refreshing_registers == 0) { tui_refreshing_registers = 1; tui_check_data_values (fi); tui_refreshing_registers = 0; } }
static void tui_register_changed_hook (int regno) { struct frame_info *fi; fi = deprecated_selected_frame; if (fi && tui_refreshing_registers == 0) { tui_refreshing_registers = 1; tui_check_data_values (fi); tui_refreshing_registers = 0; } }
static void tui_registers_changed_hook (void) { struct frame_info *fi; fi = deprecated_selected_frame; if (fi && tui_refreshing_registers == 0) { tui_refreshing_registers = 1; #if 0 tui_check_data_values (fi); #endif tui_refreshing_registers = 0; } }
static void tui_refresh_frame_and_register_information (int registers_too_p) { struct frame_info *fi; CORE_ADDR pc; struct cleanup *old_chain; int frame_info_changed_p; if (!has_stack_frames ()) return; old_chain = make_cleanup_restore_target_terminal (); target_terminal_ours_for_output (); fi = get_selected_frame (NULL); /* Ensure that symbols for this frame are read in. Also, determine the source language of this frame, and switch to it if desired. */ if (get_frame_pc_if_available (fi, &pc)) { struct symtab *s; s = find_pc_line_symtab (pc); /* elz: This if here fixes the problem with the pc not being displayed in the tui asm layout, with no debug symbols. The value of s would be 0 here, and select_source_symtab would abort the command by calling the 'error' function. */ if (s) select_source_symtab (s); } /* Display the frame position (even if there is no symbols or the PC is not known). */ frame_info_changed_p = tui_show_frame_info (fi); /* Refresh the register window if it's visible. */ if (tui_is_window_visible (DATA_WIN) && (frame_info_changed_p || registers_too_p)) { tui_refreshing_registers = 1; tui_check_data_values (fi); tui_refreshing_registers = 0; } do_cleanups (old_chain); }
static void tui_register_changed (struct frame_info *frame, int regno) { struct frame_info *fi; /* The frame of the register that was changed may differ from the selected frame, but we only want to show the register values of the selected frame. And even if the frames differ a register change made in one can still show up in the other. So we always use the selected frame here, and ignore FRAME. */ fi = get_selected_frame (NULL); if (tui_refreshing_registers == 0) { tui_refreshing_registers = 1; tui_check_data_values (fi); tui_refreshing_registers = 0; } }