From patchwork Wed May 6 17:52:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Brobecker X-Patchwork-Id: 6599 Received: (qmail 103423 invoked by alias); 6 May 2015 17:52:12 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 103408 invoked by uid 89); 6 May 2015 17:52:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 06 May 2015 17:52:10 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 89DA62861B; Wed, 6 May 2015 13:52:08 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id vpiTcPd9DHqO; Wed, 6 May 2015 13:52:08 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 589FA28613; Wed, 6 May 2015 13:52:08 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 1FE0F40EAD; Wed, 6 May 2015 10:52:09 -0700 (PDT) From: Joel Brobecker To: gdb-patches@sourceware.org Cc: Pedro Alves Subject: [pushed] Get rid of deprecated_init_ui_hook Date: Wed, 6 May 2015 10:52:02 -0700 Message-Id: <1430934722-27503-1-git-send-email-brobecker@adacore.com> In-Reply-To: <554A00BD.8040308@redhat.com> References: <554A00BD.8040308@redhat.com> As demonstrated by Pedro in: https://www.sourceware.org/ml/gdb-patches/2015-05/msg00095.html This hook is no longer used, and can therefore be eliminated. gdb/ChangeLog: * defs.h (deprecated_init_ui_hook): Delete. Remove associated comment. * top.c (deprecated_init_ui_hook): Delete. (gdb_init): Remove handling of deprecated_init_ui_hook. * interps.c (clear_interpreter_hooks): Remove handling of deprecated_init_ui_hook. * main.c (captured_main): Update comment. Tested on x86_64-linux and pushed. Thanks! diff --git a/gdb/ChangeLog b/gdb/ChangeLog index dd4bcad..8184af9 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,15 @@ 2015-05-06 Joel Brobecker + * defs.h (deprecated_init_ui_hook): Delete. Remove associated + comment. + * top.c (deprecated_init_ui_hook): Delete. + (gdb_init): Remove handling of deprecated_init_ui_hook. + * interps.c (clear_interpreter_hooks): Remove handling of + deprecated_init_ui_hook. + * main.c (captured_main): Update comment. + +2015-05-06 Joel Brobecker + * solib.c (_initialize_solib): Add "info dll" alias creation. * windows-nat.c (set_windows_aliases): Delete. (_initialize_windows_nat): Remove deprecated_init_ui_hook diff --git a/gdb/defs.h b/gdb/defs.h index eda6741..29bb8c4 100644 --- a/gdb/defs.h +++ b/gdb/defs.h @@ -633,10 +633,6 @@ extern int watchdog; /* * The name of the interpreter if specified on the command line. */ extern char *interpreter_p; -/* If a given interpreter matches INTERPRETER_P then it should update - deprecated_init_ui_hook with the per-interpreter implementation. */ -/* FIXME: deprecated_init_ui_hook should be moved here. */ - struct target_waitstatus; struct cmd_list_element; @@ -644,7 +640,6 @@ extern void (*deprecated_pre_add_symbol_hook) (const char *); extern void (*deprecated_post_add_symbol_hook) (void); extern void (*selected_frame_level_changed_hook) (int); extern int (*deprecated_ui_loop_hook) (int signo); -extern void (*deprecated_init_ui_hook) (char *argv0); extern void (*deprecated_show_load_progress) (const char *section, unsigned long section_sent, unsigned long section_size, diff --git a/gdb/interps.c b/gdb/interps.c index 90b5b2d..4c1e6cc 100644 --- a/gdb/interps.c +++ b/gdb/interps.c @@ -362,7 +362,6 @@ interp_exec (struct interp *interp, const char *command_str) void clear_interpreter_hooks (void) { - deprecated_init_ui_hook = 0; deprecated_print_frame_info_listing_hook = 0; /*print_frame_more_info_hook = 0; */ deprecated_query_hook = 0; diff --git a/gdb/main.c b/gdb/main.c index 477fd68..aecd60a 100644 --- a/gdb/main.c +++ b/gdb/main.c @@ -859,8 +859,7 @@ captured_main (void *data) /* Try to set up an alternate signal stack for SIGSEGV handlers. */ setup_alternate_signal_stack (); - /* Initialize all files. Give the interpreter a chance to take - control of the console via the deprecated_init_ui_hook (). */ + /* Initialize all files. */ gdb_init (gdb_program_name); /* Now that gdb_init has created the initial inferior, we're in diff --git a/gdb/top.c b/gdb/top.c index ddf5415..deb4108 100644 --- a/gdb/top.c +++ b/gdb/top.c @@ -172,14 +172,6 @@ char *lim_at_start; /* Hooks for alternate command interfaces. */ -/* Called after most modules have been initialized, but before taking - users command file. - - If the UI fails to initialize and it wants GDB to continue using - the default UI, then it should clear this hook before returning. */ - -void (*deprecated_init_ui_hook) (char *argv0); - /* This hook is called from within gdb's many mini-event loops which could steal control from a real user interface's event loop. It returns non-zero if the user is requesting a detach, zero @@ -1970,12 +1962,6 @@ gdb_init (char *argv0) set_language (language_c); expected_language = current_language; /* Don't warn about the change. */ - /* 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); - /* Python initialization, for example, can require various commands to be installed. For example "info pretty-printer" needs the "info" prefix to be installed. Keep things simple and just do final