This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Remove use of deprecated_init_ui_hook from quit_confirm.
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Pedro Alves <palves at redhat dot com>
- Cc: aburgess at broadcom dot com, gdb-patches at sourceware dot org
- Date: Fri, 06 Sep 2013 16:50:22 +0300
- Subject: Re: [PATCH] Remove use of deprecated_init_ui_hook from quit_confirm.
- Authentication-results: sourceware.org; auth=none
- References: <5229CAA4 dot 4090709 at broadcom dot com> <838uzam69j dot fsf at gnu dot org> <5229DC28 dot 20401 at redhat dot com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> 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?