This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Remove use of deprecated_init_ui_hook from quit_confirm.


> Date: Fri, 06 Sep 2013 14:44:08 +0100
> From: Pedro Alves <palves@redhat.com>
> CC: Andrew Burgess <aburgess@broadcom.com>, gdb-patches@sourceware.org
> 
> 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.

Thanks.  So that code in top.c is indeed never exercised on Windows,
right?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]