gdb/tui: Fix 'layout asm' before the inferior has started
[deliverable/binutils-gdb.git] / gdb / tui / tui.c
index f73ef7d58bf7c6356953abb8505612bc71ebd3ee..99d30a55a153338e64399410da7461a11633f3ae 100644 (file)
@@ -1,6 +1,6 @@
 /* General functions for the WDB TUI.
 
-   Copyright (C) 1998-2019 Free Software Foundation, Inc.
+   Copyright (C) 1998-2020 Free Software Foundation, Inc.
 
    Contributed by Hewlett-Packard Company.
 
@@ -489,10 +489,6 @@ tui_enable (void)
      clearok (stdscr, TRUE);
    }
 
-  /* Install the TUI specific hooks.  */
-  tui_install_hooks ();
-  rl_startup_hook = tui_rl_startup_hook;
-
   if (tui_update_variables ())
     tui_rehighlight_all ();
 
@@ -513,6 +509,12 @@ tui_enable (void)
   else
     tui_display_main ();
 
+  /* Install the TUI specific hooks.  This must be done after the call to
+     tui_display_main so that we don't detect the symtab changed event it
+     can cause.  */
+  tui_install_hooks ();
+  rl_startup_hook = tui_rl_startup_hook;
+
   /* Restore TUI keymap.  */
   tui_set_key_mode (tui_current_key_mode);
 
This page took 0.02534 seconds and 4 git commands to generate.