From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16964 invoked by alias); 28 Feb 2017 14:50:30 -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 16792 invoked by uid 89); 28 Feb 2017 14:50:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.1 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,KHOP_DYNAMIC,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy= X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0a-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.156.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 28 Feb 2017 14:50:26 +0000 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v1SEms75121998 for ; Tue, 28 Feb 2017 09:50:25 -0500 Received: from e06smtp11.uk.ibm.com (e06smtp11.uk.ibm.com [195.75.94.107]) by mx0a-001b2d01.pphosted.com with ESMTP id 28w1xpafcb-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 28 Feb 2017 09:50:24 -0500 Received: from localhost by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 28 Feb 2017 14:50:22 -0000 Received: from d06dlp02.portsmouth.uk.ibm.com (9.149.20.14) by e06smtp11.uk.ibm.com (192.168.101.141) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 28 Feb 2017 14:50:19 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 66ADA2190056 for ; Tue, 28 Feb 2017 14:49:20 +0000 (GMT) Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v1SEoICR12059132; Tue, 28 Feb 2017 14:50:19 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 997B652059; Tue, 28 Feb 2017 13:48:54 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTPS id 6EBF45206B; Tue, 28 Feb 2017 13:48:54 +0000 (GMT) From: Philipp Rudo 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 In-Reply-To: <20170228145016.22604-1-prudo@linux.vnet.ibm.com> References: <20170228145016.22604-1-prudo@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17022814-0040-0000-0000-000003530BAA X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17022814-0041-0000-0000-00001F122987 Message-Id: <20170228145016.22604-3-prudo@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-02-28_13:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1702280136 X-IsSubscribed: yes X-SW-Source: 2017-02/txt/msg00717.txt.bz2 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