From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7227 invoked by alias); 6 Sep 2013 13:50:34 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 7190 invoked by uid 89); 6 Sep 2013 13:50:34 -0000 Received: from mtaout23.012.net.il (HELO mtaout23.012.net.il) (80.179.55.175) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 06 Sep 2013 13:50:34 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED autolearn=ham version=3.3.2 X-HELO: mtaout23.012.net.il Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0MSP00K00I8SDZ00@a-mtaout23.012.net.il> for gdb-patches@sourceware.org; Fri, 06 Sep 2013 16:50:30 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MSP00KYHIG68JC0@a-mtaout23.012.net.il>; Fri, 06 Sep 2013 16:50:30 +0300 (IDT) Date: Fri, 06 Sep 2013 13:50:00 -0000 From: Eli Zaretskii Subject: Re: [PATCH] Remove use of deprecated_init_ui_hook from quit_confirm. In-reply-to: <5229DC28.20401@redhat.com> To: Pedro Alves Cc: aburgess@broadcom.com, gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <8338pim541.fsf@gnu.org> References: <5229CAA4.4090709@broadcom.com> <838uzam69j.fsf@gnu.org> <5229DC28.20401@redhat.com> X-IsSubscribed: yes X-SW-Source: 2013-09/txt/msg00236.txt.bz2 > Date: Fri, 06 Sep 2013 14:44:08 +0100 > From: Pedro Alves > CC: Andrew Burgess , 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 , 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?