From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 73974 invoked by alias); 1 Mar 2017 09:11:57 -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 73961 invoked by uid 89); 1 Mar 2017 09:11:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,KHOP_DYNAMIC,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=assess, adapted, H*Ad:D*ch, Insight 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; Wed, 01 Mar 2017 09:11:55 +0000 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v2193mNH100251 for ; Wed, 1 Mar 2017 04:11:54 -0500 Received: from e06smtp14.uk.ibm.com (e06smtp14.uk.ibm.com [195.75.94.110]) by mx0a-001b2d01.pphosted.com with ESMTP id 28wu8d9074-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 01 Mar 2017 04:11:53 -0500 Received: from localhost by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 1 Mar 2017 09:11:36 -0000 Received: from d06dlp02.portsmouth.uk.ibm.com (9.149.20.14) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 1 Mar 2017 09:11:34 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 259E0219006A; Wed, 1 Mar 2017 09:10:35 +0000 (GMT) Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v219BYKb18284964; Wed, 1 Mar 2017 09:11:34 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5CA2B52054; Wed, 1 Mar 2017 08:10:09 +0000 (GMT) Received: from ThinkPad (unknown [9.152.212.148]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 3171752045; Wed, 1 Mar 2017 08:10:09 +0000 (GMT) Date: Wed, 01 Mar 2017 09:11:00 -0000 From: Philipp Rudo To: Simon Marchi Cc: Tom Tromey , gdb-patches@sourceware.org, arnez@linux.vnet.ibm.com, Patrick Monnerat , Keith Seitz Subject: Re: [PATCH 00/11] Cleanup deprecated_*_hooks in defs.h In-Reply-To: <51267a8c31e5193bdc3a3e9d7c38be48@polymtl.ca> References: <20170228145016.22604-1-prudo@linux.vnet.ibm.com> <87innuwd0x.fsf@tromey.com> <51267a8c31e5193bdc3a3e9d7c38be48@polymtl.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17030109-0016-0000-0000-00000449819A X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17030109-0017-0000-0000-0000269F115D Message-Id: <20170301101132.12dfd0b2@ThinkPad> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-03-01_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1703010088 X-IsSubscribed: yes X-SW-Source: 2017-03/txt/msg00002.txt.bz2 Hi thanks for pointing out that these hooks are still in use... On Tue, 28 Feb 2017 10:52:54 -0500 Simon Marchi wrote: > On 2017-02-28 10:28, Tom Tromey wrote: > > I don't know whether Insight is still supported or if being able to > > build it is still worthwhile to gdb; but in the past this is why > > these hooks weren't removed.=20=20 >=20 > [CCing Patrick, maintainer of Insight] >=20 > AFAIK, we are doing a best effort of keeping Insight happy. I've=20 > adapted some of my patches and Insight in the past to keep Insight=20 > building, and it was not an effort of significant size (things like=20 > changing a function signature). >=20 > However, I think we are in a weird position where we have some=20 > deprecated features used by a program that we don't want to break, > but that will most likely not change to stop using these features. > If we want to exit that endless loop some day, I guess Insight should > be converted to use MI, like other frontends. This really is a tricky situation. I think converting to MI will be the best for insight. Although I fear that this will be a bigger task. What I found out when I looked at deprecated_query_hook (still used in MI interpreter) this is not so simple as setting this hook only changes GDBs behavior on certain conditions. Such that just checking for "interp->is_mi_like ()" would not help. I fear for insight this will be similar. @Patrick: Can you estimate how much work convering to MI would be? =46rom https://sourceware.org/ml/gdb-patches/2017-02/msg00730.html Keith> However, I don't think this patch should be dismissed solely Keith> because Insight still uses them. [Insight was "kicked out" of Keith> the official GDB repository several years ago.] Keith> Keith> Instead, I would like to ask maintainers to consider Keith> that the "true" deprecation of these hooks be phased in over Keith> a release or three to give time to either replace Keith> them or assess how much time may be needed to properly replace Keith> these hooks. Considering that insight still uses the hooks waiting for N releases so they have time to adept sounds fair. By the way, is there something like a deprecation policy for GDB? Or a place where deprecated features are collected? If not a policy like "When GDB deprecates features they are prefixed with 'deprecated_' and deleted N releases after deprecation. Deprecated features and their time of deletion are collected in the Wiki/NEWS/FIXME." might be good. What would that mean for code in GDB which still uses those features? As mentioned before MI also uses two of those deprecated hooks. Furthermore other parts of GDB also have deprecated features... $ git grep -n -e extern --and -e deprecated -- *.h annotate.h:101:extern void (*deprecated_annotate_signalled_hook) (void); annotate.h:102:extern void (*deprecated_annotate_signal_hook) (void); command.h:218:extern void deprecated_cmd_warning (const char *); command.h:264:extern show_value_ftype deprecated_show_value_hack; defs.h:663:extern void (*deprecated_pre_add_symbol_hook) (const char *); defs.h:664:extern void (*deprecated_post_add_symbol_hook) (void); defs.h:666:extern int (*deprecated_ui_loop_hook) (int signo); defs.h:667:extern void (*deprecated_show_load_progress) (const char *sectio= n, defs.h:672:extern void (*deprecated_print_frame_info_listing_hook) (struct = symtab * s, defs.h:676:extern int (*deprecated_query_hook) (const char *, va_list) defs.h:678:extern void (*deprecated_warning_hook) (const char *, va_list) defs.h:680:extern void (*deprecated_interactive_hook) (void); defs.h:681:extern void (*deprecated_readline_begin_hook) (char *, ...) defs.h:683:extern char *(*deprecated_readline_hook) (const char *); defs.h:684:extern void (*deprecated_readline_end_hook) (void); defs.h:685:extern void (*deprecated_context_hook) (int); defs.h:686:extern ptid_t (*deprecated_target_wait_hook) (ptid_t ptid, defs.h:690:extern void (*deprecated_attach_hook) (void); defs.h:691:extern void (*deprecated_detach_hook) (void); defs.h:692:extern void (*deprecated_call_command_hook) (struct cmd_list_ele= ment * c, defs.h:695:extern int (*deprecated_ui_load_progress_hook) (const char *sect= ion, frame.h:740:extern int deprecated_frame_register_read (struct frame_info *f= rame, int regnum, frame.h:830:extern struct frame_info *deprecated_safe_get_selected_frame (v= oid); gdbarch.h:388:extern int gdbarch_deprecated_fp_regnum (struct gdbarch *gdba= rch); gdbarch.h:389:extern void set_gdbarch_deprecated_fp_regnum (struct gdbarch = *gdbarch, int deprecated_fp_regnum); gdbarch.h:600:extern CORE_ADDR gdbarch_deprecated_function_start_offset (st= ruct gdbarch *gdbarch); gdbarch.h:601:extern void set_gdbarch_deprecated_function_start_offset (str= uct gdbarch *gdbarch, CORE_ADDR deprecated_function_start_offset); gdbarch.h:1745:extern void deprecated_set_gdbarch_data (struct gdbarch *gdb= arch, gdbcore.h:131:extern void (*deprecated_exec_file_display_hook) (const char = *filename); gdbcore.h:136:extern void (*deprecated_file_changed_hook) (char *filename); gdbcore.h:237:extern void deprecated_add_core_fns (struct core_fns *cf); target.h:2327:extern void add_deprecated_target_alias (struct target_ops *t= , char *alias); tracepoint.h:305:extern void (*deprecated_trace_find_hook) (char *arg, int = from_tty); tracepoint.h:306:extern void (*deprecated_trace_start_stop_hook) (int start= , int from_tty); utils.h:297:extern void (*deprecated_error_begin_hook) (void); value.h:110:extern void deprecated_set_value_type (struct value *value, value.h:145:extern int deprecated_value_modifiable (const struct value *val= ue); value.h:414:extern enum lval_type *deprecated_value_lval_hack (struct value= *); value.h:434:extern struct internalvar **deprecated_value_internalvar_hack (= struct value *); value.h:441:extern struct frame_id *deprecated_value_next_frame_id_hack (st= ruct value *); value.h:451:extern int *deprecated_value_regnum_hack (struct value *); Philipp