This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 00/11] Cleanup deprecated_*_hooks in defs.h


Hi

thanks for pointing out that these hooks are still in use...

On Tue, 28 Feb 2017 10:52:54 -0500
Simon Marchi <simon.marchi@polymtl.ca> 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.  
> 
> [CCing Patrick, maintainer of Insight]
> 
> AFAIK, we are doing a best effort of keeping Insight happy.  I've 
> adapted some of my patches and Insight in the past to keep Insight 
> building, and it was not an effort of significant size (things like 
> changing a function signature).
> 
> However, I think we are in a weird position where we have some 
> 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?

From 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 *section,
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_element * c,
defs.h:695:extern int (*deprecated_ui_load_progress_hook) (const char *section,
frame.h:740:extern int deprecated_frame_register_read (struct frame_info *frame, int regnum,
frame.h:830:extern struct frame_info *deprecated_safe_get_selected_frame (void);
gdbarch.h:388:extern int gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch);
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 (struct gdbarch *gdbarch);
gdbarch.h:601:extern void set_gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch, CORE_ADDR deprecated_function_start_offset);
gdbarch.h:1745:extern void deprecated_set_gdbarch_data (struct gdbarch *gdbarch,
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 *value);
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 (struct value *);
value.h:451:extern int *deprecated_value_regnum_hack (struct value *);

Philipp


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]