Move content_in_use to tui_source_window class
[deliverable/binutils-gdb.git] / gdb / tui / tui-stack.c
index e1b996d7e6cd9fd500222c34f360051c2e32ca9d..b466b5fe7f847f1f6e59ae593b1f495cec626a9a 100644 (file)
@@ -266,7 +266,6 @@ tui_show_locator_content (void)
       locator->refresh_window ();
       wmove (locator->handle, 0, 0);
       xfree (string);
-      locator->content_in_use = TRUE;
     }
 }
 
@@ -347,14 +346,19 @@ tui_show_frame_info (struct frame_info *fi)
 
       symtab_and_line sal = find_frame_sal (fi);
 
-      source_already_displayed = sal.symtab != 0
-        && tui_source_is_displayed (symtab_to_fullname (sal.symtab));
+      const char *fullname = nullptr;
+      if (sal.symtab != nullptr)
+       fullname = symtab_to_fullname (sal.symtab);
+
+      source_already_displayed = (sal.symtab != 0
+                                 && TUI_SRC_WIN != nullptr
+                                 && TUI_SRC_WIN->showing_source_p (fullname));
 
       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)),
+                                  ? "??" : fullname),
                                  tui_get_function_from_frame (fi),
                                  sal.line,
                                  pc);
This page took 0.026998 seconds and 4 git commands to generate.