From: Philipp Rudo <prudo@linux.vnet.ibm.com>
To: gdb-patches@sourceware.org
Cc: arnez@linux.vnet.ibm.com
Subject: [PATCH 02/11] Remove unused deprecated_ui_loop_hook
Date: Tue, 28 Feb 2017 14:50:00 -0000 [thread overview]
Message-ID: <20170228145016.22604-3-prudo@linux.vnet.ibm.com> (raw)
In-Reply-To: <20170228145016.22604-1-prudo@linux.vnet.ibm.com>
Nobody actually uses this hook anymore. So simply remove it.
gdb/ChangeLog
* defs.h (deprecated_ui_loop_hook): Remove.
* top.c (deprecated_ui_loop_hook): Remove.
* remote-sim.c (gdbsim_interrupt): Adjust.
* ser-base.c (do_ser_base_readchar): Adjust.
* ser-tcp.c (POLL_INTERVAL): Adjust comment.
(wait_for_connect): Adjust.
* ser-unix.c (do_hardwire_readchar): Adjust.
* serial.h (serial_rc): Adjust comment.
* windows-nat.c (windows_wait): Adjust.
---
gdb/defs.h | 1 -
gdb/remote-sim.c | 3 ---
gdb/ser-base.c | 13 -------------
gdb/ser-tcp.c | 11 +----------
gdb/ser-unix.c | 15 ---------------
gdb/serial.h | 5 +----
gdb/top.c | 8 --------
gdb/windows-nat.c | 10 ----------
8 files changed, 2 insertions(+), 64 deletions(-)
diff --git a/gdb/defs.h b/gdb/defs.h
index b3086b9..c92c41f 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -661,7 +661,6 @@ struct target_waitstatus;
struct cmd_list_element;
extern void (*selected_frame_level_changed_hook) (int);
-extern int (*deprecated_ui_loop_hook) (int signo);
extern void (*deprecated_show_load_progress) (const char *section,
unsigned long section_sent,
unsigned long section_size,
diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c
index b0c68c6..5df6aae 100644
--- a/gdb/remote-sim.c
+++ b/gdb/remote-sim.c
@@ -951,9 +951,6 @@ gdbsim_interrupt (struct target_ops *self, ptid_t ptid)
static int
gdb_os_poll_quit (host_callback *p)
{
- if (deprecated_ui_loop_hook != NULL)
- deprecated_ui_loop_hook (0);
-
if (check_quit_flag ()) /* gdb's idea of quit */
return 1;
return 0;
diff --git a/gdb/ser-base.c b/gdb/ser-base.c
index 3e10033..b465836 100644
--- a/gdb/ser-base.c
+++ b/gdb/ser-base.c
@@ -329,19 +329,6 @@ do_ser_base_readchar (struct serial *scb, int timeout)
delta = (timeout == 0 ? 0 : 1);
while (1)
{
- /* N.B. The UI may destroy our world (for instance by calling
- remote_stop,) in which case we want to get out of here as
- quickly as possible. It is not safe to touch scb, since
- someone else might have freed it. The
- deprecated_ui_loop_hook signals that we should exit by
- returning 1. */
-
- if (deprecated_ui_loop_hook)
- {
- if (deprecated_ui_loop_hook (0))
- return SERIAL_TIMEOUT;
- }
-
status = ser_base_wait_for (scb, delta);
if (timeout > 0)
timeout -= delta;
diff --git a/gdb/ser-tcp.c b/gdb/ser-tcp.c
index 57a7c55..aa65a53 100644
--- a/gdb/ser-tcp.c
+++ b/gdb/ser-tcp.c
@@ -75,7 +75,7 @@ static int tcp_auto_retry = 1;
static unsigned int tcp_retry_limit = 15;
-/* How many times per second to poll deprecated_ui_loop_hook. */
+/* How many times per second to poll. */
#define POLL_INTERVAL 5
@@ -89,15 +89,6 @@ wait_for_connect (struct serial *scb, unsigned int *polls)
struct timeval t;
int n;
- /* While we wait for the connect to complete,
- poll the UI so it can update or the user can
- interrupt. */
- if (deprecated_ui_loop_hook && deprecated_ui_loop_hook (0))
- {
- errno = EINTR;
- return -1;
- }
-
/* Check for timeout. */
if (*polls > tcp_retry_limit * POLL_INTERVAL)
{
diff --git a/gdb/ser-unix.c b/gdb/ser-unix.c
index b9e55f0..6c2f700 100644
--- a/gdb/ser-unix.c
+++ b/gdb/ser-unix.c
@@ -517,7 +517,6 @@ static int
do_hardwire_readchar (struct serial *scb, int timeout)
{
int status, delta;
- int detach = 0;
if (timeout > 0)
timeout++;
@@ -532,20 +531,6 @@ do_hardwire_readchar (struct serial *scb, int timeout)
delta = (timeout == 0 ? 0 : 1);
while (1)
{
-
- /* N.B. The UI may destroy our world (for instance by calling
- remote_stop,) in which case we want to get out of here as
- quickly as possible. It is not safe to touch scb, since
- someone else might have freed it. The
- deprecated_ui_loop_hook signals that we should exit by
- returning 1. */
-
- if (deprecated_ui_loop_hook)
- detach = deprecated_ui_loop_hook (0);
-
- if (detach)
- return SERIAL_TIMEOUT;
-
scb->timeout_remaining = (timeout < 0 ? timeout : timeout - delta);
status = wait_for (scb, delta);
diff --git a/gdb/serial.h b/gdb/serial.h
index cf4e659..979288b 100644
--- a/gdb/serial.h
+++ b/gdb/serial.h
@@ -100,10 +100,7 @@ extern void serial_un_fdopen (struct serial *scb);
enum serial_rc {
SERIAL_ERROR = -1, /* General error. */
- SERIAL_TIMEOUT = -2, /* Timeout or data-not-ready during read.
- Unfortunately, through
- deprecated_ui_loop_hook (), this can also
- be a QUIT indication. */
+ SERIAL_TIMEOUT = -2, /* Timeout or data-not-ready during read. */
SERIAL_EOF = -3 /* General end-of-file or remote target
connection closed, indication. Includes
things like the line dropping dead. */
diff --git a/gdb/top.c b/gdb/top.c
index 6bf9d8c..934f25d 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -184,14 +184,6 @@ char *lim_at_start;
/* Hooks for alternate command interfaces. */
-/* 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
- otherwise. */
-
-int (*deprecated_ui_loop_hook) (int);
-
-
/* Called from print_frame_info to list the line we stopped in. */
void (*deprecated_print_frame_info_listing_hook) (struct symtab * s,
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index 9cc755f..87f6a5b 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -1662,16 +1662,6 @@ windows_wait (struct target_ops *ops,
if (retval)
return ptid_build (current_event.dwProcessId, 0, retval);
- else
- {
- int detach = 0;
-
- if (deprecated_ui_loop_hook != NULL)
- detach = deprecated_ui_loop_hook (0);
-
- if (detach)
- windows_kill_inferior (ops);
- }
}
}
--
2.8.4
next prev parent reply other threads:[~2017-02-28 14:50 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-28 14:50 [PATCH 00/11] Cleanup deprecated_*_hooks in defs.h Philipp Rudo
2017-02-28 14:50 ` [PATCH 08/11] Remove unused deprecated_{attach|detach}_hook Philipp Rudo
2017-02-28 14:50 ` [PATCH 06/11] Remove unused deprecated_context_hook Philipp Rudo
2017-02-28 14:50 ` [PATCH 11/11] Remove deprecated_print_frame_info_listing_hook Philipp Rudo
2017-02-28 14:50 ` [PATCH 10/11] Remove unused deprecated_ui_load_progress_hook Philipp Rudo
2017-02-28 14:50 ` [PATCH 03/11] Remove unused deprecated_warning_hook Philipp Rudo
2017-02-28 14:50 ` [PATCH 01/11] Remove unused deprecated_{pre|post}_add_symbol_hook Philipp Rudo
2017-02-28 14:50 ` Philipp Rudo [this message]
2017-02-28 14:50 ` [PATCH 09/11] Remove unused deprecated_call_command_hook Philipp Rudo
2017-02-28 14:50 ` [PATCH 05/11] Remove unused deprecated_readline{_begin|_end}_hook Philipp Rudo
2017-02-28 15:28 ` [PATCH 00/11] Cleanup deprecated_*_hooks in defs.h Tom Tromey
2017-02-28 15:52 ` Simon Marchi
2017-03-01 9:11 ` Philipp Rudo
2017-03-01 22:17 ` Yao Qi
2017-02-28 18:01 ` [PATCH 04/11] Remove unused deprecated_interactive_hook Philipp Rudo
2017-02-28 19:37 ` [PATCH 00/11] Cleanup deprecated_*_hooks in defs.h Keith Seitz
2017-02-28 19:45 ` [PATCH 07/11] Remove unused deprecated_target_wait_hook Philipp Rudo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170228145016.22604-3-prudo@linux.vnet.ibm.com \
--to=prudo@linux.vnet.ibm.com \
--cc=arnez@linux.vnet.ibm.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox