- struct tui_gen_win_info * locator = tui_locator_win_info_ptr ();
- int sourceAlreadyDisplayed;
- struct symtab_and_line sal;
-
- find_frame_sal (fi, &sal);
-
- sourceAlreadyDisplayed = sal.symtab != 0
- && tui_source_is_displayed (sal.symtab->filename);
- tui_set_locator_info (sal.symtab == 0 ? "??" : sal.symtab->filename,
- tui_get_function_from_frame (fi),
- sal.line,
- get_frame_pc (fi));
+ struct tui_gen_win_info *locator = tui_locator_win_info_ptr ();
+ int source_already_displayed;
+ CORE_ADDR pc;
+
+ symtab_and_line sal = find_frame_sal (fi);
+
+ source_already_displayed = sal.symtab != 0
+ && tui_source_is_displayed (symtab_to_fullname (sal.symtab));
+
+ if (get_frame_pc_if_available (fi, &pc))
+ locator_changed_p
+ = tui_set_locator_info (get_frame_arch (fi),
+ (sal.symtab == 0
+ ? "??" : symtab_to_fullname (sal.symtab)),
+ tui_get_function_from_frame (fi),
+ sal.line,
+ pc);
+ else
+ locator_changed_p
+ = tui_set_locator_info (get_frame_arch (fi),
+ "??", _("<unavailable>"), sal.line, 0);
+
+ /* If the locator information has not changed, then frame information has
+ not changed. If frame information has not changed, then the windows'
+ contents will not change. So don't bother refreshing the windows. */
+ if (!locator_changed_p)
+ return 0;
+