[PATCH] Remove use of deprecated_init_ui_hook from quit_confirm.

Pedro Alves palves@redhat.com
Fri Sep 6 13:44:00 GMT 2013


On 09/06/2013 02:25 PM, Eli Zaretskii wrote:

> So it looks like the allegedly Windows-specific quit message is never
> used, although deprecated_init_ui_hook is non-NULL.  What am I
> missing?

gdb_init is called early, and calls the _initialize routines, and also
does:

  /* Allow another UI to initialize.  If the UI fails to initialize,
     and it wants GDB to revert to the CLI, it should clear
     deprecated_init_ui_hook.  */
  if (deprecated_init_ui_hook)
    deprecated_init_ui_hook (argv0);

And then afterwards, clear_interpreter_hooks is called:

#0  clear_interpreter_hooks () at ../../src/gdb/interps.c:371
#1  0x00000000005e4d1d in interp_set (interp=0xda7530, top_level=1) at ../../src/gdb/interps.c:195
#2  0x00000000005e68a0 in captured_main (data=0x7fffffffda50) at ../../src/gdb/main.c:868
#3  0x00000000005e34a2 in catch_errors (func=0x5e5d1e <captured_main>, func_args=0x7fffffffda50, errstring=0x8a5c54 "", mask=RETURN_MASK_ALL)
    at ../../src/gdb/exceptions.c:524
#4  0x00000000005e6eda in gdb_main (args=0x7fffffffda50) at ../../src/gdb/main.c:1069
#5  0x000000000045afba in main (argc=1, argv=0x7fffffffdb58) at ../../src/gdb/gdb.c:34

And that clears the hook.

-- 
Pedro Alves



More information about the Gdb-patches mailing list