Fix Windows gdb build failure with Python 2 support
[external/binutils.git] / gdb / ChangeLog
1 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
2
3         * python/python.c (python_run_simple_file): Cast mode literal to
4         non-const char pointer as expected by PyFile_FromString.
5
6 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
7
8         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
9         minus_one_ptid and null_ptid.
10
11 2017-04-05  Pedro Alves  <palves@redhat.com>
12
13         * warning.m4 (build_warnings): Remove -Wno-write-strings.
14         * configure: Regenerate.
15
16 2017-04-05  Pedro Alves  <palves@redhat.com>
17
18         * ada-exp.y (yyerror): Constify.
19         * ada-lang.c (bound_name, get_selections)
20         (ada_variant_discrim_type)
21         (ada_variant_discrim_name, ada_value_struct_elt)
22         (ada_lookup_struct_elt_type, is_unchecked_variant)
23         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
24         (catch_ada_exception_command_split)
25         (catch_ada_assert_command_split, catch_assert_command)
26         (ada_op_name): Constify.
27         * ada-lang.h (ada_yyerror, get_selections)
28         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
29         * arc-tdep.c (arc_print_frame_cache): Constify.
30         * arm-tdep.c (arm_skip_stub): Constify.
31         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
32         (gen_aggregate_elt_ref): Constify.
33         * bcache.c (print_bcache_statistics): Constify.
34         * bcache.h (print_bcache_statistics): Constify.
35         * break-catch-throw.c (catch_exception_command_1):
36         * breakpoint.c (struct ep_type_description::description):
37         Constify.
38         (add_solib_catchpoint): Constify.
39         (catch_fork_command_1): Add cast.
40         (add_catch_command): Constify.
41         * breakpoint.h (add_catch_command, add_solib_catchpoint):
42         Constify.
43         * bsd-uthread.c (bsd_uthread_state): Constify.
44         * buildsym.c (patch_subfile_names): Constify.
45         * buildsym.h (next_symbol_text_func, patch_subfile_names):
46         Constify.
47         * c-exp.y (yyerror): Constify.
48         (token::oper): Constify.
49         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
50         * c-varobj.c (cplus_describe_child): Constify.
51         * charset.c (find_charset_names): Add cast.
52         (find_charset_names): Constify array and add const_cast.
53         * cli/cli-cmds.c (complete_command, cd_command): Constify.
54         (edit_command): Constify.
55         * cli/cli-decode.c (lookup_cmd): Constify.
56         * cli/cli-dump.c (dump_memory_command, dump_value_command):
57         Constify.
58         (struct dump_context): Constify.
59         (add_dump_command, restore_command): Constify.
60         * cli/cli-script.c (get_command_line): Constify.
61         * cli/cli-script.h (get_command_line): Constify.
62         * cli/cli-utils.c (check_for_argument): Constify.
63         * cli/cli-utils.h (check_for_argument): Constify.
64         * coff-pe-read.c (struct read_pe_section_data): Constify.
65         * command.h (lookup_cmd): Constify.
66         * common/print-utils.c (decimal2str): Constify.
67         * completer.c (gdb_print_filename): Constify.
68         * corefile.c (set_gnutarget): Constify.
69         * cp-name-parser.y (yyerror): Constify.
70         * cp-valprint.c (cp_print_class_member): Constify.
71         * cris-tdep.c (cris_register_name, crisv32_register_name):
72         Constify.
73         * d-exp.y (yyerror): Constify.
74         (struct token::oper): Constify.
75         * d-lang.h (d_yyerror): Constify.
76         * dbxread.c (struct header_file_location::name): Constify.
77         (add_old_header_file, add_new_header_file, last_function_name)
78         (dbx_next_symbol_text, add_bincl_to_list)
79         (find_corresponding_bincl_psymtab, set_namestring)
80         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
81         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
82         * defs.h (command_line_input, print_address_symbolic)
83         (deprecated_readline_begin_hook): Constify.
84         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
85         Constify.
86         * event-top.c (handle_line_of_input): Constify and add cast.
87         * exceptions.c (catch_errors): Constify.
88         * exceptions.h (catch_errors): Constify.
89         * expprint.c (print_subexp_standard, op_string, op_name)
90         (op_name_standard, dump_raw_expression, dump_raw_expression):
91         * expression.h (op_name, op_string, dump_raw_expression):
92         Constify.
93         * f-exp.y (yyerror): Constify.
94         (struct token::oper): Constify.
95         (struct f77_boolean_val::name): Constify.
96         * f-lang.c (f_word_break_characters): Constify.
97         * f-lang.h (f_yyerror): Constify.
98         * fork-child.c (fork_inferior): Add cast.
99         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
100         (new_variant): Constify.
101         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
102         * gdbarch.c: Regenerate.
103         * gdbcore.h (set_gnutarget): Constify.
104         * go-exp.y (yyerror): Constify.
105         (token::oper): Constify.
106         * go-lang.h (go_yyerror): Constify.
107         * go32-nat.c (go32_sysinfo): Constify.
108         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
109         * guile/scm-cmd.c (cmdscm_function): Constify.
110         * guile/scm-param.c (pascm_param_value): Constify.
111         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
112         (h8300sx_register_name): Constify.
113         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
114         Constify.
115         * ia64-tdep.c (ia64_register_names): Constify.
116         * infcmd.c (construct_inferior_arguments): Constify.
117         (path_command, attach_post_wait): Constify.
118         * language.c (show_range_command, show_case_command)
119         (unk_lang_error): Constify.
120         * language.h (language_defn::la_error)
121         (language_defn::la_name_of_this): Constify.
122         * linespec.c (decode_line_2): Constify.
123         * linux-thread-db.c (thread_db_err_str): Constify.
124         * lm32-tdep.c (lm32_register_name): Constify.
125         * m2-exp.y (yyerror): Constify.
126         * m2-lang.h (m2_yyerror): Constify.
127         * m32r-tdep.c (m32r_register_names): Constify and make static.
128         * m68hc11-tdep.c (m68hc11_register_names): Constify.
129         * m88k-tdep.c (m88k_register_name): Constify.
130         * macroexp.c (appendmem): Constify.
131         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
132         (upgrade_type, parse_external, parse_partial_symbols)
133         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
134         (new_symbol): Constify.
135         * memattr.c (mem_info_command): Constify.
136         * mep-tdep.c (register_name_from_keyword): Constify.
137         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
138         Constify.
139         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
140         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
141         * mi/mi-main.c (captured_mi_execute_command): Constify and add
142         cast.
143         (mi_execute_async_cli_command): Constify.
144         * mips-tdep.c (mips_register_name): Constify.
145         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
146         (am33_register_name, am33_2_register_name)
147         * moxie-tdep.c (moxie_register_names): Constify.
148         * nat/linux-osdata.c (osdata_type): Constify fields.
149         * nto-tdep.c (nto_parse_redirection): Constify.
150         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
151         (lookup_child_selector): Constify.
152         (objc_methcall::name): Constify.
153         * objc-lang.h (lookup_objc_class, lookup_child_selector)
154         (lookup_struct_typedef): Constify.
155         * objfiles.c (pc_in_section): Constify.
156         * objfiles.h (pc_in_section): Constify.
157         * p-exp.y (struct token::oper): Constify.
158         (yyerror): Constify.
159         * p-lang.h (pascal_yyerror): Constify.
160         * parser-defs.h (op_name_standard): Constify.
161         (op_print::string): Constify.
162         (exp_descriptor::op_name): Constify.
163         * printcmd.c (print_address_symbolic): Constify.
164         * psymtab.c (print_partial_symbols): Constify.
165         * python/py-breakpoint.c (stop_func): Constify.
166         (bppy_get_expression): Constify.
167         * python/py-cmd.c (cmdpy_completer::name): Constify.
168         (cmdpy_function): Constify.
169         * python/py-event.c (evpy_add_attribute)
170         (gdbpy_initialize_event_generic): Constify.
171         * python/py-event.h (evpy_add_attribute)
172         (gdbpy_initialize_event_generic): Constify.
173         * python/py-evts.c (add_new_registry): Constify.
174         * python/py-finishbreakpoint.c (outofscope_func): Constify.
175         * python/py-framefilter.c (get_py_iter_from_func): Constify.
176         * python/py-inferior.c (get_buffer): Add cast.
177         * python/py-param.c (parm_constant::name): Constify.
178         * python/py-unwind.c (fprint_frame_id): Constify.
179         * python/python.c (gdbpy_parameter_value): Constify.
180         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
181         * remote.c (memory_packet_config::name): Constify.
182         (show_packet_config_cmd, remote_write_bytes)
183         (remote_buffer_add_string):
184         * reverse.c (exec_reverse_once): Constify.
185         * rs6000-tdep.c (variant::name, variant::description): Constify.
186         * rust-exp.y (rustyyerror): Constify.
187         * rust-lang.c (rust_op_name): Constify.
188         * rust-lang.h (rustyyerror): Constify.
189         * serial.h (serial_ops::name): Constify.
190         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
191         (sh_sh3e_register_name, sh_sh2e_register_name)
192         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
193         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
194         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
195         (sh_sh4al_dsp_register_name): Constify.
196         * sh64-tdep.c (sh64_register_name): Constify.
197         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
198         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
199         * stabsread.c (patch_block_stabs, read_type_number)
200         (ref_map::stabs, ref_add, process_reference)
201         (symbol_reference_defined, define_symbol, define_symbol)
202         (error_type, read_type, read_member_functions, read_cpp_abbrev)
203         (read_one_struct_field, read_struct_fields, read_baseclasses)
204         (read_tilde_fields, read_struct_type, read_array_type)
205         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
206         (read_huge_number, read_range_type, read_args, common_block_start)
207         (find_name_end): Constify.
208         * stabsread.h (common_block_start, define_symbol)
209         (process_one_symbol, symbol_reference_defined, ref_add):
210         * symfile.c (get_section_index, add_symbol_file_command):
211         * symfile.h (get_section_index): Constify.
212         * target-descriptions.c (tdesc_type::name): Constify.
213         (tdesc_free_type): Add cast.
214         * target.c (find_default_run_target):
215         (add_deprecated_target_alias, find_default_run_target)
216         (target_announce_detach): Constify.
217         (do_option): Constify.
218         * target.h (add_deprecated_target_alias): Constify.
219         * thread.c (print_thread_info_1): Constify.
220         * top.c (deprecated_readline_begin_hook, command_line_input):
221         Constify.
222         (init_main): Add casts.
223         * top.h (handle_line_of_input): Constify.
224         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
225         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
226         (tfind_command): Rename to ...
227         (tfind_command_1): ... this and constify.
228         (tfind_command): New function.
229         (tfind_end_command, tfind_start_command): Adjust.
230         (encode_source_string): Constify.
231         * tracepoint.h (encode_source_string): Constify.
232         * tui/tui-data.c (tui_partial_win_by_name): Constify.
233         * tui/tui-data.h (tui_partial_win_by_name): Constify.
234         * tui/tui-source.c (tui_set_source_content_nil): Constify.
235         * tui/tui-source.h (tui_set_source_content_nil): Constify.
236         * tui/tui-win.c (parse_scrolling_args): Constify.
237         * tui/tui-windata.c (tui_erase_data_content): Constify.
238         * tui/tui-windata.h (tui_erase_data_content): Constify.
239         * tui/tui-winsource.c (tui_erase_source_content): Constify.
240         * tui/tui.c (tui_enable): Add cast.
241         * utils.c (defaulted_query): Constify.
242         (init_page_info): Add cast.
243         (puts_debug, subset_compare): Constify.
244         * utils.h (subset_compare): Constify.
245         * varobj.c (varobj_format_string): Constify.
246         * varobj.h (varobj_format_string): Constify.
247         * vax-tdep.c (vax_register_name): Constify.
248         * windows-nat.c (windows_detach): Constify.
249         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
250         * xml-support.c (gdb_xml_end_element): Constify.
251         * xml-tdesc.c (tdesc_start_reg): Constify.
252         * xstormy16-tdep.c (xstormy16_register_name): Constify.
253         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
254         * xtensa-tdep.h (xtensa_register_t::name): Constify.
255
256 2017-04-05  Pedro Alves  <palves@redhat.com>
257
258         * proc-api.c (struct trans): Constify.
259         (procfs_note): Constify.
260         * proc-events.c (struct trans, syscall_table):
261         * proc-flags.c (struct trans): Constify.
262         * proc-utils.h (procfs_note): Constify.
263         * proc-why.c (struct trans): Constify.
264         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
265         (procfs_detach): Constify.
266         * sol-thread.c (struct string_map): Constify.
267         (td_err_string, td_state_string): Constify.
268
269 2017-04-05  Pedro Alves  <palves@redhat.com>
270
271         * proc-api.c (procfs_filename): Don't initialize
272         procfs_filename.
273         (prepare_to_trace): Assume procfs_filename is non-NULL.
274         (_initialize_proc_api): Give procfs_filename a default value here.
275
276 2017-04-05  Pedro Alves  <palves@redhat.com>
277
278         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
279         'cond_string' parameter.
280         (extract_exception_regexp): Constify 'string' parameter.
281         (catch_exception_command_1): Constify.
282         * breakpoint.c (init_catchpoint)
283         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
284         parameter.
285         (ep_parse_optional_if_clause, catch_fork_command_1)
286         (catch_exec_command_1): Constify.
287         * breakpoint.h (init_catchpoint): Constify 'cond_string'
288         parameter.
289         (ep_parse_optional_if_clause): Constify.
290         * cli/cli-utils.c (remove_trailing_whitespace)
291         (check_for_argument): Constify.
292         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
293         non-const overload.
294         (check_for_argument): Likewise.
295
296 2017-04-05  Pedro Alves  <palves@redhat.com>
297
298         * event-top.c (command_line_handler): Add cast to execute_command
299         call.
300         * record-btrace.c (cmd_record_btrace_bts_start)
301         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
302         (cmd_record_btrace_start): Add cast to execute_command call.
303         * record-full.c (record_full_goto_insn):
304         * record.c (record_start, record_stop): Add cast to
305         execute_command_to_string calls.
306         (cmd_record_start): Add cast to execute_command calls.
307
308 2017-04-05  Pedro Alves  <palves@redhat.com>
309
310         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
311         static inline function.
312         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
313         array and use gdb_PyArg_ParseTupleAndKeywords.
314         * python/py-cmd.c (cmdpy_init): Likewise.
315         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
316         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
317         (infpy_search_memory): Likewise.
318         * python/py-objfile.c (objfpy_add_separate_debug_file)
319         (gdbpy_lookup_objfile): Likewise.
320         * python/py-symbol.c (gdbpy_lookup_symbol)
321         (gdbpy_lookup_global_symbol): Likewise.
322         * python/py-type.c (gdbpy_lookup_type): Likewise.
323         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
324         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
325         Likewise.
326
327 2017-04-05  Pedro Alves  <palves@redhat.com>
328
329         * python/python-internal.h (gdb_PyGetSetDef): New type.
330         * python/py-block.c (block_object_getset)
331         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
332         * python/py-event.c (event_object_getset)
333         (finish_breakpoint_object_getset): Likewise.
334         * python/py-inferior.c (inferior_object_getset): Likewise.
335         * python/py-infthread.c (thread_object_getset): Likewise.
336         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
337         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
338         * python/py-objfile.c (objfile_getset): Likewise.
339         * python/py-progspace.c (pspace_getset): Likewise.
340         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
341         Likewise.
342         * python/py-record.c (recpy_record_getset): Likewise.
343         * python/py-symbol.c (symbol_object_getset): Likewise.
344         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
345         Likewise.
346         * python/py-type.c (type_object_getset, field_object_getset):
347         Likewise.
348         * python/py-value.c (value_object_getset): Likewise.
349
350 2017-04-05  Pedro Alves  <palves@redhat.com>
351
352         * python/python-internal.h (gdb_PyObject_CallMethod)
353         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
354         New functions.
355         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
356         (PySys_GetObject, PySys_SetPath): New macros.
357
358 2017-04-05  Pedro Alves  <palves@redhat.com>
359
360         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
361         info_osdata_command.
362         * osdata.c (info_osdata_command): Rename to ...
363         (info_osdata): ... this.  Constify 'type' parameter, and remove
364         the 'from_tty' parameter.  Accept NULL TYPE.
365         (info_osdata_command): New function.
366         * osdata.h (info_osdata_command): Remove declaration.
367         (info_osdata): New declaration.
368
369 2017-04-05  Pedro Alves  <palves@redhat.com>
370
371         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
372         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
373         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
374         parameter.
375         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
376         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
377         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
378         parameter.
379         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
380         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
381         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
382         (mi_cmd_file_list_exec_source_files)
383         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
384         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
385         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
386         parameter.
387         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
388         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
389         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
390         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
391         (mi_cmd_stack_info_frame): Constify 'command' parameter.
392         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
393         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
394         'command' parameter.
395         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
396         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
397         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
398         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
399         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
400         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
401         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
402         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
403         (mi_cmd_var_set_update_range): Constify 'command' parameter.
404         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
405         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
406         parameter.
407         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
408         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
409         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
410         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
411         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
412         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
413         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
414         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
415         (mi_cmd_data_list_changed_registers)
416         (mi_cmd_data_write_register_values)
417         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
418         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
419         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
420         (mi_cmd_list_features, mi_cmd_list_target_features)
421         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
422         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
423         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
424         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
425         (mi_cmd_trace_frame_collected): Constify 'command'
426         parameter.
427         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
428         'command' parameter.
429
430 2017-04-05  Pedro Alves  <palves@redhat.com>
431
432         * ada-lang.c (ada_completer_word_break_characters): Now a const
433         array.
434         (ada_get_gdb_completer_word_break_characters): Constify.
435         * completer.c (gdb_completer_command_word_break_characters)
436         (gdb_completer_file_name_break_characters)
437         (gdb_completer_quote_characters): Now const arrays.
438         (get_gdb_completer_quote_characters): Constify.
439         (set_rl_completer_word_break_characters): New function.
440         (set_gdb_completion_word_break_characters)
441         (complete_line_internal): Use it.
442         * completer.h (get_gdb_completer_quote_characters): Constify.
443         (set_rl_completer_word_break_characters): Declare.
444         * f-lang.c (f_word_break_characters): Constify.
445         * language.c (default_word_break_characters): Constify.
446         * language.h (language_defn::la_word_break_characters): Constify.
447         (default_word_break_characters): Constify.
448         * top.c (init_main): Use set_rl_completer_word_break_characters.
449
450 2017-04-05  Pedro Alves  <palves@redhat.com>
451
452         * aix-thread.c (aix_thread_pid_to_str)
453         (aix_thread_extra_thread_info): Constify.
454         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
455         * bsd-uthread.c (bsd_uthread_extra_thread_info)
456         (bsd_uthread_pid_to_str): Constify.
457         * corelow.c (core_pid_to_str): Constify.
458         * darwin-nat.c (darwin_pid_to_str): Constify.
459         * fbsd-nat.c (fbsd_pid_to_str): Constify.
460         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
461         Constify.
462         * gnu-nat.c (gnu_pid_to_str): Constify.
463         * go32-nat.c (go32_pid_to_str): Constify.
464         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
465         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
466         * inferior.c (inferior_pid_to_str): Constify.
467         * linux-nat.c (linux_nat_pid_to_str): Constify.
468         * linux-tdep.c (linux_core_pid_to_str): Constify.
469         * linux-thread-db.c (thread_db_pid_to_str)
470         (thread_db_extra_thread_info): Constify.
471         * nto-tdep.c (nto_extra_thread_info): Constify.
472         * nto-tdep.h (nto_extra_thread_info): Constify.
473         * obsd-nat.c (obsd_pid_to_str): Constify.
474         * procfs.c (procfs_pid_to_str): Constify.
475         * ravenscar-thread.c (ravenscar_extra_thread_info)
476         (ravenscar_pid_to_str): Constify.
477         * remote-sim.c (gdbsim_pid_to_str): Constify.
478         * remote.c (remote_threads_extra_info, remote_pid_to_str):
479         Constify.
480         * sol-thread.c (solaris_pid_to_str): Constify.
481         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
482         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
483         * target.c (default_pid_to_str, target_pid_to_str)
484         (normal_pid_to_str, default_pid_to_str): Constify.
485         * target.h (target_ops::to_pid_to_str)
486         (target_ops::to_extra_thread_info): Constify.
487         (target_pid_to_str, normal_pid_to_str): Constify.
488         * windows-nat.c (windows_pid_to_str): Constify.
489         * gdbarch.sh (core_pid_to_str): Constify.
490         * target-delegates.c: Regenerate.
491         * gdbarch.h, gdbarch.c: Regenerate.
492
493 2017-04-05  Pedro Alves  <palves@redhat.com>
494
495         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
496         the memory of the temporary warning_pre_print override.
497         * utils.c (warning_pre_print): Constify.
498         * utils.h (warning_pre_print): Constify.
499
500 2017-04-05  Pedro Alves  <palves@redhat.com>
501
502         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
503         (shell_command): New function.
504         (make_command): Use std::string.
505         (init_cli_cmds): Register shell_command instead of shell_escape.
506
507 2017-04-05  Pedro Alves  <palves@redhat.com>
508
509         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
510         * tracepoint.c (default_collect): Don't initialize.
511
512 2017-04-05  Pedro Alves  <palves@redhat.com>
513
514         * macroexp.c (macro_buffer::shared): Now a bool.
515         (init_buffer): Update.
516         (init_shared_buffer): Constify 'addr' parameter.
517         (substitute_args, expand, macro_expand, macro_expand_next): Remove
518         casts.
519
520 2017-04-05  Pedro Alves  <palves@redhat.com>
521
522         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
523         * disasm.c (set_disassembler_options): Constify local.
524         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
525
526 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
527
528         PR gdb/21352
529         * tracefile.c (tsave_command): Fix argument parsing for '-r'
530         option.
531
532 2017-04-05  Yao Qi  <yao.qi@linaro.org>
533
534         * frame.c (frame_unwind_register_unsigned): Call
535         frame_unwind_register_value.
536
537 2017-04-05  Yao Qi  <yao.qi@linaro.org>
538
539         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
540         Use gdb_test_multiple, and don't match anchor.
541
542 2017-04-05  Pedro Alves  <palves@redhat.com>
543
544         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
545         (Write After Approval): Remove Simon Marchi.
546
547 2017-04-05  Pedro Alves  <palves@redhat.com>
548
549         * common/gdb_optional.h (optional::optional): Make constexpr and
550         initialize m_dummy.
551
552 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
553
554         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
555         (amd64fbsd_jmp_buf_reg_offset): Remove.
556         (amd64fbsd_supply_uthread): Remove function.
557         (amd64fbsd_collect_uthread): Remove function.
558         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
559         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
560         (x86_64-*-freebsd*): Remove bsd-uthread.o.
561         (fbsd-nat.c): Update comment.
562         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
563         (i386fbsd_jmp_buf_reg_offset): Remove.
564         (i386fbsd_supply_uthread): Remove function.
565         (i386fbsd_collect_uthread): Remove function.
566         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
567
568 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
569
570         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
571         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
572         * NEWS: Mention that support for FreeBSD/alpha was removed.
573         * alpha-fbsd-tdep.c: Delete file.
574         * config/alpha/fbsd.mh: Delete file.
575         * configure.host: Delete alpha*-*-freebsd* and
576         alpha*-*-kfreebsd*-gnu.
577         * configure.tgt: Delete alpha*-*-freebsd* and
578         alpha*-*-kfreebsd*-gnu.
579
580 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
581
582         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
583         amd64bsd_store_inferior_registers): Use ptid from regcache.
584
585 2017-04-04  Pedro Alves  <palves@redhat.com>
586
587         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
588         data fields, make them private and add "m_" prefixes.
589         (lnp_state_machine::lnp_state_machine): New ctor.
590         (record_line, check_line_address, handle_set_discriminator)
591         (handle_set_address, handle_advance_pc, handle_special_opcode)
592         (handle_advance_line, handle_set_file, handle_negate_stmt)
593         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
594         (end_sequence, advance_line): New methods.
595         (m_gdbarch, m_record_lines_p): New fields.
596         (lnp_reader_state): Delete.
597         (dwarf_record_line): Rename to ...
598         (lnp_state_machine::record_line): ... adjust.
599         (init_lnp_state_machine): Delete.
600         (lnp_state_machine::lnp_state_machine): New.
601         (check_line_address): Rename to ...
602         (lnp_state_machine::check_line_address): This.
603         (dwarf_decode_lines_1): Remove reference to "reader_state".
604         Adjust lnp_state_machine having a non-default ctor.  Use bool.
605         State machine internal state manipulation moved to
606         lnp_state_machine methods.
607
608 2017-04-04  Pedro Alves  <palves@redhat.com>
609
610         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
611         unittests/offset-type-selftests.c.
612         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
613         * common/offset-type.h: New file.
614         * common/preprocessor.h: New file.
615         * common/traits.h: New file.
616         * common/valid-expr.h: New file.
617         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
618         sect_offset and cu_offset strong typedefs throughout.
619         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
620         typedefs throughout.
621         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
622         sect_offset and cu_offset strong typedefs throughout.
623         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
624         typedefs throughout.
625         * gdbtypes.h: Include "common/offset-type.h".
626         (cu_offset): Now an offset type (strong typedef) instead of a
627         struct.
628         (sect_offset): Likewise.
629         (union call_site_parameter_u): Rename "param_offset" field to
630         "param_cu_off".
631         * unittests/offset-type-selftests.c: New file.
632
633 2017-04-04  Pedro Alves  <palves@redhat.com>
634
635         * common/underlying.h: New file.
636         * dwarf2read.c: Include "common/gdb_optional.h" and
637         "common/underlying.h".
638         (dir_index, file_name_index): New types.
639         (file_entry): Use them.
640         (file_entry::include): Use to_underlying.
641         (line_header::add_file_name): Use dir_index.
642         (read_formatted_entries): Use gdb::optional.  Read form before
643         writting to file_entry.
644         (dwarf_decode_line_header): Use dir_index.
645         (lnp_state_machine::current_file): Use to_underlying.
646         (lnp_state_machine::file): Change type to file_name_index.
647         (dwarf_record_line): Use to_underlying.
648         (init_lnp_state_machine): Use file_name_index.
649         (dwarf_decode_lines_1): Use dir_index and file_name_index.
650
651 2017-04-04  Pedro Alves  <palves@redhat.com>
652
653         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
654         operator bool, has_value and get methods.
655
656 2017-04-04  Pedro Alves  <palves@redhat.com>
657
658         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
659         fields.
660         (line_header): Initialize all data fields.  Change type of
661         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
662         Change type of include_dirs to std::vector<const char *>.  Remove
663         num_include_dirs, include_dirs_size.  Change type of file_names to
664         std::vector<file_entry>.  Remove num_file_names, file_names_size.
665         (line_header::line_header): New.
666         (line_header::add_include_dir, line_header::add_file_name): New
667         methods.
668         (line_header::include_dir_at): Remove NULL check.
669         (line_header::file_name_at): Add const overload.
670         (line_header_up): New unique_ptr typedef.
671         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
672         std::vector.  Remove free_line_header call.
673         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
674         free_line_header call.
675         (free_cu_line_header): Delete.
676         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
677         (setup_type_unit_groups): Use line_header_up instead of cleanups.
678         Adjust to use std::vector.
679         (free_line_header): Delete.
680         (free_line_header_voidp): Use delete.
681         (add_include_dir): Replace with ...
682         (line_header::add_include_dir): ... this method.  Use std::vector.
683         (add_file_name): Replace with ...
684         (line_header::add_file_name): ... this method.  Use std::vector.
685         (add_include_dir_stub): Delete.
686         (read_formatted_entries): Remove memset.
687         (dwarf_decode_line_header): Return a line_header_up instead of a
688         raw pointer.  Remove cleanup handling.  Pass lambdas to
689         read_formatted_entries.  Adjust to use line_header methods.
690         (dwarf_decode_lines_1): Adjust to use line_header methods.
691         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
692         use std::vector.
693
694 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
695
696         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
697         instead of struct ptid.
698
699 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
700
701         * frame.c (get_frame_register_bytes): Unwind using value.
702         (put_frame_register_bytes): Likewise.
703
704 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
705
706         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
707
708 2017-03-29  Yao Qi  <yao.qi@linaro.org>
709
710         * gdbthread.h (struct thread_info): Declare constructor and
711         destructor.  Add some in-class member initializers.
712         * thread.c (free_thread): Remove.
713         (init_thread_list): Call delete instead of free_thread.
714         (new_thread): Call thread_info constructor.
715         (thread_info::thread_info): New function.
716         (thread_info::~thread_info): New function.
717         (delete_thread_1): Call delete instead of free_thread.
718         (make_cleanup_restore_current_thread): Move tp and frame to
719         inner block.
720
721 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
722
723         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
724         (arc_skip_prologue): Likewise.
725         (arc_make_frame_cache): Likewise.
726         (arc_pv_get_operand): New function.
727         (arc_is_in_prologue): Likewise.
728         (arc_analyze_prologue): Likewise.
729         (arc_print_frame_cache): Likewise.
730         (MAX_PROLOGUE_LENGTH): New constant.
731
732 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
733
734         * configure.tgt: Add arc-insn.o.
735         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
736         (dump_arc_instruction_command): New function.
737         (arc_fprintf_disasm): Likewise.
738         (arc_disassemble_info): Likewise.
739         (arc_insn_get_operand_value): Likewise.
740         (arc_insn_get_operand_value_signed): Likewise.
741         (arc_insn_get_memory_base_reg): Likewise.
742         (arc_insn_get_memory_offset): Likewise.
743         (arc_insn_get_branch_target): Likewise.
744         (arc_insn_dump): Likewise.
745         (arc_insn_get_linear_next_pc): Likewise.
746         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
747         (arc_disassemble_info): Likewise.
748         (arc_insn_get_branch_target): Likewise.
749         (arc_insn_get_linear_next_pc): Likewise.
750         * NEWS: Mention new "maint print arc arc-instruction".
751
752 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
753
754         * arc-tdep (maintenance_print_arc_list): New variable.
755         (maintenance_print_arc_command): New function.
756
757 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
758
759         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
760         Add "limm" and "reserved".
761         (arc_cannot_fetch_register, arc_cannot_store_register): Add
762         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
763         * arc-tdep.h (arc_regnum): Likewise.
764
765 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
766
767         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
768         for THREADPTR register.
769         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
770         register.
771         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
772         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
773         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
774
775 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
776
777         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
778         registers above gdbarch_num_regs (gdbarch) as privileged in
779         call0 ABI.
780
781 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
782
783         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
784         for a single specified register or for all registers in
785         a0_base..a0_base + C0_NREGS range.
786         (supply_gregset_reg): Call regcache_raw_supply for a single
787         specified register or for all registers in a0_base..a0_base +
788         C0_NREGS range.
789
790 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
791
792         * arch/xtensa.h (C0_NREGS): Add definition.
793         * xtensa-tdep.c (C0_NREGS): Remove definition.
794
795 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
796
797         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
798         Drop xtensa_default_isa initialization.
799         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
800
801 2017-03-27  Pedro Alves  <palves@redhat.com>
802
803         * dwarf2read.c (file_entry) <dir_index>: Add comment.
804         (file_entry::include_dir): New method.
805         (line_header::include_dir_at, line_header::file_name_at): New
806         methods.
807         (setup_type_unit_groups, setup_type_unit_groups)
808         (psymtab_include_file_name): Simplify using the new methods.
809         (lnp_state_machine) <the_line_header>: New field.
810         <file>: Add comment.
811         (lnp_state_machine::current_file): New method.
812         (dwarf_record_line): Simplify using the new methods.
813         (init_lnp_state_machine): Initialize the "the_line_header" field.
814         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
815         Simplify using the new methods.
816
817 2017-03-27  Pedro Alves  <palves@redhat.com>
818
819         * cp-name-parser.y (make_empty): Delete.
820         (demangler_special, nested_name, ptr_operator, array_indicator)
821         (direct_declarator, declarator_1): Use fill_comp instead of
822         make_empty.
823
824 2017-03-27  Pedro Alves  <palves@redhat.com>
825
826         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
827         to ATTRIBUTE_PRINTF.
828         * solib-target.c (library_list_start_list): Print "string" not
829         "version".
830         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
831         gdb_xml_error call.
832
833 2017-03-27  Pedro Alves  <palves@redhat.com>
834
835         * dwarf2read.c (struct file_and_directory): New.
836         (dwarf2_get_dwz_file): Adjust to use std::string.
837         (dw2_get_file_names_reader): Adjust to use file_and_directory.
838         (find_file_and_directory): Adjust to return a file_and_directory
839         object.
840         (read_file_scope): Adjust to use file_and_directory.  Remove
841         make_cleanup/do_cleanups calls.
842         (open_and_init_dwp_file): Adjust to use std::string.  Remove
843         make_cleanup/do_cleanups calls.
844         * python/python.c (do_start_initialization): Adjust to ldirname
845         returning a std::string.
846         * utils.c (ldirname): Now returns a std::string.
847         * utils.h (ldirname): Change return type to std::string.
848         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
849         returning a std::string.
850         * xml-tdesc.c (file_read_description_xml): Likewise.
851
852 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
853
854         * regcache.c (regcache_debug_print_register): New function.
855         * regcache.h (regcache_debug_print_register): New declaration.
856         * target.c (debug_print_register): Remove.
857         (target_fetch_registers): Call regcache_debug_print_register.
858         (target_store_registers): Likewise.
859
860 2017-03-24  Pádraig Brady  <pbrady@fb.com>
861
862         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
863         reference beyond the 'lh->include_dirs' array before accessing to
864         it.
865         (psymtab_include_file_name): Likewise.
866         (dwarf_decode_lines_1): Likewise.
867         (dwarf_decode_lines): Likewise.
868         (file_file_name): Likewise.
869
870 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
871
872         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
873         inferior_ptid.
874         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
875         ps_lsetfpregs): Likewise.
876         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
877         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
878         ps_lsetfpregs): Likewise.
879         * target.c (target_fetch_registers, target_store_registers):
880         Remove asserts.
881
882 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
883
884         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
885
886 2017-03-23  Yao Qi  <yao.qi@linaro.org>
887
888         * aarch64-tdep.c (aarch64_process_record_test): Declare.
889         (_initialize_aarch64_tdep): Register it.
890         (aarch64_record_load_store): Handle PRFM instruction.
891         (aarch64_process_record_test): New function.
892
893 2017-03-23  Yao Qi  <yao.qi@linaro.org>
894
895         * aarch64-tdep.c (aarch64_record_load_store): Fix code
896         indentation.
897
898 2017-03-23  Yao Qi  <yao.qi@linaro.org>
899
900         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
901
902 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
903
904         python/python.c (do_start_initialization): Fix memory leak.
905
906 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
907
908         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
909         using get_ptrace_pid.
910         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
911         inferior_ptid.
912         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
913         inferior_ptid instead of pid.
914
915 2017-03-22  Yao Qi  <yao.qi@linaro.org>
916
917         * aarch64-tdep.c: Wrap locally used classes in anonymous
918         namespace.
919         * arm-tdep.c: Likewise.
920         * linespec.c: Likewise.
921         * ui-out.c: Likewise.
922
923 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
924
925         PR gdb/19637
926         * python/lib/gdb/printer/bound_registers.py: Import sys.
927
928 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
929
930         * windows-nat.c (do_windows_fetch_inferior_registers): Add
931         windows_thread_info parameter and use it instead of
932         current_thread.
933         (windows_fetch_inferior_registers): Don't set current_thread,
934         pass the thread to do_windows_fetch_inferior_registers.  Use
935         ptid from regcache instead of inferior_ptid.
936         (do_windows_store_inferior_registers): Add windows_thread_info
937         parameter and use it instead of current_thread.
938         (windows_store_inferior_registers): Don't set current_thread,
939         pass the thread to do_windows_store_inferior_registers.  Use
940         ptid from regcache instead of inferior_ptid.
941
942 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
943
944         * ser-mingw.c (ser_windows_raw): Remove reference to
945         struct serial::current_timeout.
946
947 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
948
949         PR tdep/20928
950         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
951         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
952         (sparc64_fsr_type): Fix %fsr decoding.
953
954 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
955
956         * python/py-record-btrace.c (btpy_insn_data): Change return type
957         for Python 2.
958
959 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
960
961         * spu-linux-nat.c (spu_fetch_inferior_registers,
962         spu_store_inferior_registers): Use ptid from regcache, set and
963         restore inferior_ptid.
964         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
965         Likewise.
966
967 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
968
969         * i386-linux-nat.c (fetch_register, store_register,
970         i386_linux_fetch_inferior_registers,
971         i386_linux_store_inferior_registers): Use ptid from regcache.
972         * ia64-linux-nat.c (ia64_linux_fetch_register,
973         ia64_linux_store_register): Likewise.
974         * inf-ptrace.c (inf_ptrace_fetch_register,
975         inf_ptrace_store_register): Likewise.
976         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
977         m32r_linux_store_inferior_registers): Likewise.
978         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
979         m68kbsd_store_inferior_registers): Likewise.
980         * m68k-linux-nat.c (fetch_register, store_register,
981         m68k_linux_fetch_inferior_registers,
982         m68k_linux_store_inferior_registers): Likewise.
983         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
984         m88kbsd_store_inferior_registers): Likewise.
985         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
986         mips_fbsd_store_inferior_registers): Likewise.
987         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
988         mips64_linux_regsets_store_registers): Likewise.
989         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
990         mipsnbsd_store_inferior_registers): Likewise.
991         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
992         mips64obsd_store_inferior_registers): Likewise.
993         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
994         Likewise.
995         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
996         ppcfbsd_store_inferior_registers): Likewise.
997         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
998         ppc_linux_store_inferior_registers): Likewise.
999         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
1000         ppcnbsd_store_inferior_registers): Likewise.
1001         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
1002         ppcobsd_store_registers): Likewise.
1003         * procfs.c (procfs_fetch_registers, procfs_store_registers):
1004         Likewise.
1005         * ravenscar-thread.c (ravenscar_fetch_registers,
1006         ravenscar_store_registers, ravenscar_prepare_to_store):
1007         Likewise.
1008         * record-btrace.c (record_btrace_fetch_registers,
1009         record_btrace_store_registers, record_btrace_prepare_to_store):
1010         Likewise.
1011         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
1012         Lookup inferior using ptid from regcache, instead of
1013         current_inferior.
1014         * remote.c (remote_fetch_registers, remote_store_registers): Use
1015         ptid from regcache.
1016         * rs6000-nat.c (fetch_register, store_register): Likewise.
1017         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
1018         s390_linux_store_inferior_registers): Likewise.
1019         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
1020         shnbsd_store_inferior_registers): Likewise.
1021         * sol-thread.c (sol_thread_fetch_registers,
1022         sol_thread_store_registers): Likewise.
1023         * sparc-nat.c (sparc_fetch_inferior_registers,
1024         sparc_store_inferior_registers): Likewise.
1025         * tilegx-linux-nat.c (fetch_inferior_registers,
1026         store_inferior_registers): Likewise.
1027         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
1028         vaxbsd_store_inferior_registers): Likewise.
1029         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
1030         store_xtregs): Likewise.
1031
1032 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
1033
1034         PR gdb/14441
1035         * NEWS: Mention support for rvalue references in GDB and python.
1036         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
1037         supports both lvalue and rvalue references.
1038
1039 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
1040
1041         PR gdb/14441
1042         * gdbtypes.c (rank_one_type): Implement overloading
1043         resolution rules regarding rvalue references.
1044
1045 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
1046
1047         PR gdb/14441
1048         * aarch64-tdep.c (aarch64_type_align)
1049         (aarch64_extract_return_value, aarch64_store_return_value): Change
1050         lvalue reference type checks to general reference type checks.
1051         * amd64-tdep.c (amd64_classify): Likewise.
1052         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
1053         Likewise.
1054         * arm-tdep.c (arm_type_align, arm_extract_return_value)
1055         (arm_store_return_value): Likewise.
1056         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
1057         * c-typeprint.c (c_print_type): Likewise.
1058         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
1059         (cplus_number_of_children, cplus_describe_child): Likewise.
1060         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
1061         * completer.c (expression_completer): Likewise.
1062         * cp-support.c (make_symbol_overload_list_adl_namespace):
1063         Likewise.
1064         * darwin-nat-info.c (info_mach_region_command): Likewise.
1065         * dwarf2loc.c (entry_data_value_coerce_ref)
1066         (value_of_dwarf_reg_entry): Likewise.
1067         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
1068         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
1069         Likewise.
1070         * findvar.c (extract_typed_address, store_typed_address):
1071         Likewise.
1072         * gdbtypes.c (rank_one_type): Likewise.
1073         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
1074         * infcall.c (value_arg_coerce): Likewise.
1075         * language.c (pointer_type): Likewise.
1076         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
1077         Likewise.
1078         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
1079         * mn10300-tdep.c (mn10300_type_align): Likewise.
1080         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
1081         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
1082         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
1083         Likewise.
1084         * printcmd.c (print_formatted, x_command): Likewise.
1085         * python/py-type.c (typy_get_composite, typy_template_argument):
1086         Likewise.
1087         * python/py-value.c (valpy_referenced_value)
1088         (valpy_get_dynamic_type, value_has_field): Likewise.
1089         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
1090         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
1091         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
1092         * spu-tdep.c (spu_scalar_value_p): Likewise.
1093         * symtab.c (lookup_symbol_aux): Likewise.
1094         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
1095         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
1096         Likewise.
1097         * valops.c (value_cast_pointers, value_cast)
1098         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
1099         (value_struct_elt, value_struct_elt_bitpos)
1100         (value_find_oload_method_list, find_overload_match)
1101         (value_rtti_indirect_type): Likewise.
1102         * valprint.c (val_print_scalar_type_p, generic_val_print):
1103         Likewise.
1104         * value.c (value_actual_type, value_as_address, unpack_long)
1105         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
1106         (coerce_ref): Likewise.
1107         * varobj.c (varobj_get_value_type): Likewise.
1108
1109 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
1110
1111         PR gdb/14441
1112         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
1113         table of constants.
1114         * python/lib/gdb/command/explore.py: Support exploring values
1115         of rvalue reference types.
1116         * python/lib/gdb/types.py: Implement get_basic_type() for
1117         rvalue reference types.
1118         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
1119         constant.
1120         * python/py-value.c (valpy_getitem): Add an rvalue reference
1121         check.
1122         (valpy_reference_value): Add new parameter "refcode".
1123         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
1124         New wrappers for valpy_reference_value().
1125         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
1126         (gdbpy_invoke_xmethod): Likewise.
1127
1128 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
1129
1130         PR gdb/14441
1131         * dwarf2read.c (process_die, read_type_die_1): Handle the
1132         DW_TAG_rvalue_reference_type DIE.
1133         (read_tag_reference_type): Add new parameter "refcode".
1134
1135 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
1136
1137         PR gdb/14441
1138         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
1139         (c_type_print_modifier, c_type_print_varspec_suffix)
1140         (c_type_print_base): Support printing rvalue reference types.
1141         * c-valprint.c (c_val_print, c_value_print): Support printing
1142         rvalue reference values.
1143
1144 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
1145
1146         PR gdb/14441
1147         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
1148         typename.
1149         * cp-support.c (replace_typedefs): Handle
1150         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
1151         * python/py-type.c (typy_lookup_type): Likewise.
1152
1153 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
1154
1155         PR gdb/14441
1156         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
1157         * parse.c (insert_type): Change assert statement.
1158         (follow_types): Handle rvalue reference types.
1159         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
1160         constant.
1161
1162 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
1163
1164         PR gdb/14441
1165         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
1166         value_ref() interface.
1167         * c-valprint.c (c_value_print): Likewise.
1168         * infcall.c (value_arg_coerce): Likewise.
1169         * python/py-value.c (valpy_reference_value): Likewise.
1170         * valops.c (value_cast, value_reinterpret_cast)
1171         (value_dynamic_cast, typecmp): Likewise.
1172         (value_ref): Parameterize by kind of return value reference type.
1173         * value.h (value_ref): Add new parameter "refcode".
1174
1175 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
1176
1177         PR gdb/14441
1178         * dwarf2read.c (read_tag_reference_type): Use
1179         lookup_lvalue_reference_type() instead of lookup_reference_type().
1180         * eval.c (evaluate_subexp_standard): Likewise.
1181         * f-exp.y: Likewise.
1182         * gdbtypes.c (make_reference_type, lookup_reference_type):
1183         Generalize with rvalue reference types.
1184         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
1185         convenience wrappers for lookup_reference_type().
1186         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
1187         reference kind parameter.
1188         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
1189         wrappers for lookup_reference_type().
1190         * guile/scm-type.c (gdbscm_type_reference): Use
1191         lookup_lvalue_reference_type() instead of lookup_reference_type().
1192         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
1193         * parse.c (follow_types): Likewise.
1194         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
1195         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
1196         Likewise.
1197         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
1198         (gdbpy_invoke_xmethod): Likewise.
1199         * stabsread.c: Provide extra argument to make_reference_type()
1200         call.
1201         * valops.c (value_ref, value_rtti_indirect_type): Use
1202         lookup_lvalue_reference_type() instead of lookup_reference_type().
1203
1204 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
1205
1206         PR gdb/14441
1207         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
1208         (TYPE_IS_REFERENCE): New macro.
1209         (struct type): Add rvalue_reference_type field.
1210         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
1211
1212 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
1213
1214         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
1215         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
1216         New function definition.
1217         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
1218         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
1219         New function declaration.
1220         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
1221         * mi/mi-interp.h: New file.
1222         * solib.c (info_sharedlibrary_command): Replace for loop with
1223         ALL_SO_LIBS macro
1224         * solib.h (update_solib_list): New function declaration.
1225         (so_list_head): Move macro.
1226         * solist.h (ALL_SO_LIBS): New macro.
1227
1228 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
1229
1230         * infcmd.c (post_create_inferior): Remove unused argument in
1231         call to solib_add.
1232         * remote.c (remote_start_remote): Likewise.
1233         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
1234         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
1235         (enable_break): Likewise.
1236         * solib.c (update_solib_list): Remove unused target argument
1237         and its documentation.
1238         (solib_add): Remove unused target argument.  Remove unused
1239         argument in call to update_solib_list.
1240         (info_sharedlibrary_command): Remove unused argument in call
1241         to update_solib_list.
1242         (sharedlibrary_command): Remove unused argument in call to
1243         solib_add.
1244         (handle_solib_event): Likewise.
1245         (reload_shared_libraries): Likewise.
1246         * solib.h (solib_add): Remove unused target argument.
1247
1248 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1249
1250         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
1251         (s390_displaced_step_fixup): Cover relative branches with the
1252         default fixup handling.  This fixes lack of support for some
1253         relative branch instructions.
1254
1255 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
1256
1257         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
1258         ptid from regcache.
1259
1260 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
1261
1262         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
1263         i386_darwin_store_inferior_registers): Use ptid from regcache.
1264
1265 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
1266
1267         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
1268         i386bsd_store_inferior_registers): Use ptid from regcache.
1269
1270 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
1271
1272         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
1273         hppaobsd_store_registers): Use ptid from regcache.
1274
1275 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
1276
1277         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
1278         hppanbsd_store_registers): Use ptid from regcache.
1279
1280 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
1281
1282         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
1283         from regcache.  Use get_ptrace_pid.
1284
1285 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
1286
1287         * corelow.c (get_core_register_section): Use ptid from regcache,
1288         update doc.
1289
1290 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
1291
1292         * bsd-uthread.c (bsd_uthread_fetch_registers,
1293         bsd_uthread_store_registers): Use ptid from regcache, set and
1294         restore inferior_ptid.
1295
1296 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
1297
1298         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
1299         fetch_fp_regs, store_register, store_regs, store_fp_register,
1300         store_fp_regs): Use ptid from regcache.
1301
1302 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
1303
1304         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
1305         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
1306         store_vfp_regs): Use ptid from regcache.
1307
1308 2017-03-17  Pedro Alves  <palves@redhat.com>
1309
1310         PR remote/21188
1311         * ser-base.c (ser_base_wait_for): Add comment.
1312         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
1313         version.
1314         * ser-unix.c (hardwire_raw): Remove reference to
1315         scb->current_timeout.
1316         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
1317         (hardwire_ops): Install ser_base_readchar instead of
1318         hardwire_readchar.
1319         * serial.h (struct serial) <current_timeout, timeout_remaining>:
1320         Remove fields.
1321
1322 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
1323
1324         PR gdb/19637
1325         * python/lib/gdb/printer/bound_registers.py: Add support for
1326         Python 3.
1327
1328 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1329
1330         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
1331         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
1332         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
1333         byte_offset to subobj_byte_offset.  Fix the handling of
1334         DWARF_VALUE_STACK on big-endian targets when coming via an
1335         implicit pointer.
1336         (dwarf2_evaluate_loc_desc): Adjust call to
1337         dwarf2_evaluate_loc_desc_full.
1338         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
1339         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
1340
1341 2017-03-16  Yao Qi  <yao.qi@linaro.org>
1342
1343         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
1344         and REVSH instructions.
1345
1346 2017-03-16  Yao Qi  <yao.qi@linaro.org>
1347
1348         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
1349         (arm_record_test): Declare.
1350         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
1351         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
1352         align with the manual.
1353         (thumb_record_misc): Adjust the code order to align with the
1354         manual.
1355         (thumb2_record_decode_insn_handler): Fix instruction matching.
1356         (instruction_reader_thumb): New class.
1357         (arm_record_test): New function.
1358
1359 2017-03-16  Yao Qi  <yao.qi@linaro.org>
1360
1361         * arm-tdep.c (abstract_memory_reader): New class.
1362         (instruction_reader): New class.
1363         (extract_arm_insn): Add argument 'reader'.  Callers updated.
1364         (decode_insn): Likewise.
1365
1366 2017-03-16  Doug Evans  <dje@google.com>
1367
1368         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
1369         member.  Change type of TYPE member to SCM.  All uses updated.
1370         (lsscm_make_lazy_string_smob): Add assert.
1371         (lsscm_make_lazy_string): Flag bad length values.
1372         (lsscm_elt_type): New function.
1373         (gdbscm_lazy_string_to_value): Rewrite to use
1374         lsscm_safe_lazy_string_to_value.
1375         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
1376         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
1377         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
1378         in incoming type.
1379         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
1380         * guile/scm-type.c (tyscm_scm_to_type): New function.
1381
1382 2017-03-15  Doug Evans  <dje@google.com>
1383
1384         PR python/17728, python/18439, python/18779
1385         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
1386         member.  Change type of TYPE member to PyObject *.  All uses updated.
1387         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
1388         (gdbpy_create_lazy_string_object): Flag bad length values.
1389         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
1390         Handle typedefs in incoming type.
1391         (stpy_lazy_string_elt_type): New function.
1392         (gdbpy_extract_lazy_string): Call it.
1393         * python/py-value.c (valpy_lazy_string): Flag bad length values.
1394         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
1395         typedefs in incoming type.
1396
1397 2017-03-16  Doug Evans  <dje@google.com>
1398
1399         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
1400         * guile/scm-type.c (tyscm_scm_to_type): New function.
1401
1402 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
1403
1404         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
1405         "ULONGEST" for "skip".
1406
1407 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1408
1409         PR gdb/21220
1410         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
1411         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
1412         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
1413         over ptrace peek/poke until end of buffer or error.
1414
1415 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
1416
1417         * parse.c (length_of_subexp): Make static.
1418         * parser-defs.h (length_of_subexp): Remove.
1419
1420 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1421
1422         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
1423         as well.
1424
1425 2017-03-14  Pedro Alves  <palves@redhat.com>
1426
1427         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
1428         (main): Use std::unique_ptr.  Remove calls to
1429         cp_demangled_name_parse_free.
1430
1431 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
1432
1433         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
1434         alphabsd_store_inferior_registers): Use regcache->ptid instead
1435         of inferior_ptid.
1436
1437 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
1438
1439         * aix-thread.c (aix_thread_fetch_registers,
1440         aix_thread_store_registers): Use regcache->ptid instead of
1441         inferior_ptid.
1442
1443 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
1444
1445         * aarch64-linux-nat.c (fetch_gregs_from_thread,
1446         store_gregs_to_thread, fetch_fpregs_from_thread,
1447         store_fpregs_to_thread): Use regcache->ptid instead of
1448         inferior_ptid.
1449
1450 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
1451
1452         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
1453         amd64_linux_fetch_inferior_registers): Use regcache->ptid
1454         instead of inferior_ptid.
1455
1456 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
1457
1458         * target.c (target_fetch_registers, target_store_registers): Add
1459         assert.
1460
1461 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
1462
1463         * regcache.h (regcache_get_ptid): New function.
1464         * regcache.c (regcache_get_ptid): New function.
1465
1466 2017-03-13  Mark Wielaard  <mark@klomp.org>
1467
1468         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
1469
1470 2017-03-10  Keith Seitz  <keiths@redhat.com>
1471
1472         PR c++/8218
1473         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
1474
1475 2017-03-08  Pedro Alves  <palves@redhat.com>
1476
1477         PR gdb/18360
1478         * infrun.c (start_step_over, do_target_resume, resume)
1479         (restart_threads): Assert we're not resuming a thread that is
1480         meant to be stopped.
1481         (infrun_thread_stop_requested_callback): Delete.
1482         (infrun_thread_stop_requested): If the thread is internally
1483         stopped, queue a pending stop event and clear the thread's
1484         inline-frame state.
1485         (handle_stop_requested): New function.
1486         (handle_syscall_event, handle_inferior_event_1): Use
1487         handle_stop_requested.
1488         (handle_stop_requested): New function.
1489         (handle_signal_stop): Set the thread's stop_signal here instead of
1490         at caller.
1491         (finish_step_over): Clear step over info unconditionally.
1492         (handle_signal_stop): If the user had interrupted the event
1493         thread, consider the stop a random signal.
1494         (handle_signal_stop) <signal arrived while stepping over
1495         breakpoint>: Don't restart threads here.
1496         (stop_waiting): Don't clear step-over info here.
1497
1498 2017-03-08  Pedro Alves  <palves@redhat.com>
1499
1500         PR 21206
1501         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
1502         goes to argument 2, not 1.
1503
1504 2017-03-08  Pedro Alves  <palves@redhat.com>
1505
1506         PR cli/21218
1507         * top.c (gdb_readline_wrapper): Avoid passing NULL to
1508         display_gdb_prompt.
1509         (command_line_input): Add comment.
1510
1511 2017-03-08  Pedro Alves  <palves@redhat.com>
1512
1513         PR tui/21216
1514         * tui/tui-file.c (tui_file::write): New.
1515         * tui/tui-file.h (tui_file): Override "write".
1516         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
1517         factored out from ...
1518         (tui_puts): ... here.
1519         (tui_putc): Use them.
1520         (tui_write): New function.
1521         * tui/tui-io.h (tui_write): Declare.
1522
1523 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
1524
1525         * Makefile.in (SFILES): Replace "environ.c" with
1526         "common/environ.c".
1527         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
1528         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
1529         to...
1530         * common/environ.c: ... here.
1531         * environ.h: Moved to...
1532         * common/environ.h: ... here.
1533
1534 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
1535
1536         * gdbarch.sh (pstring_ptr): New static function.
1537         (gdbarch_disassembler_options): Use it.
1538         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
1539         not valid_disassembler_option->name.
1540         * gdbarch.c: Regenerate.
1541
1542 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
1543
1544         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
1545
1546 2017-03-07  Pedro Alves  <palves@redhat.com>
1547
1548         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
1549
1550 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1551
1552         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
1553         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
1554         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
1555         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
1556
1557 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
1558
1559         * xtensa-linux-nat.c (fetch_gregs): Remove const.
1560
1561 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
1562
1563         * remote.c (remote_add_target_side_commands): Use range-based
1564         for loop.
1565
1566 2017-03-03  Yao Qi  <yao.qi@linaro.org>
1567
1568         PR gdb/21165
1569         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
1570         value is lazy.
1571         * valprint.c (common_val_print): Likewise.
1572
1573 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
1574
1575         * NEWS: Mention new set/show disassembler-options commands.
1576         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
1577         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
1578         (prospective_options): New static variable.
1579         (gdb_disassembler::gdb_disassembler): Initialize
1580         m_di.disassembler_options.
1581         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
1582         (get_disassembler_options): New function.
1583         (set_disassembler_options): Likewise.
1584         (set_disassembler_options_sfunc): Likewise.
1585         (show_disassembler_options_sfunc): Likewise.
1586         (disassembler_options_completer): Likewise.
1587         (_initialize_disasm): Likewise.
1588         * disasm.h (get_disassembler_options): New prototype.
1589         (set_disassembler_options): Likewise.
1590         * gdbarch.sh (gdbarch_disassembler_options): New variable.
1591         (gdbarch_verify_disassembler_options): Likewise.
1592         * gdbarch.c: Regenerate.
1593         * gdbarch.h: Likewise.
1594         * arm-tdep.c (num_disassembly_options): Delete.
1595         (set_disassembly_style): Likewise.
1596         (arm_disassembler_options): New static variable.
1597         (set_disassembly_style_sfunc): Convert short style name into long
1598         option name.  Call set_disassembler_options.
1599         (show_disassembly_style_sfunc): New function.
1600         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
1601         set_gdbarch_verify_disassembler_options.
1602         (_initialize_arm_tdep): Delete regnames variable and update callers.
1603         (arm_disassembler_options): Initialize.
1604         (disasm_options): New variable.
1605         (num_disassembly_options): Rename from this...
1606         (num_disassembly_styles): ...to this.  Compute by scanning through
1607         disasm_options.
1608         (valid_disassembly_styles): Initialize using disasm_options.
1609         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
1610         set_arm_regname_option.
1611         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
1612         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
1613         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
1614         set_gdbarch_verify_disassembler_options.
1615         * s390-tdep.c (s390_disassembler_options): New static variable.
1616         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
1617         set_gdbarch_verify_disassembler_options.
1618
1619 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
1620
1621         * remote.c (remote_add_target_side_condition): Remove "struct"
1622         keyword from range-based for loop.
1623
1624 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
1625
1626         * remote.c (remote_add_target_side_condition): Use range-based
1627         for loop.  Update comment.
1628
1629 2017-02-27  Yao Qi  <yao.qi@linaro.org>
1630
1631         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
1632
1633 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
1634
1635         * regcache.c (regcache_raw_update): New function.
1636         (regcache_raw_read): Move code to regcache_raw_update.
1637         * regcache.h (regcache_raw_update): New declaration.
1638         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
1639
1640 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
1641
1642         * dwarf2read.c (create_debug_type_hash_table): Initialize
1643         header.signature and header.type_offset_in_tu.
1644
1645 2017-02-24  Pedro Alves  <palves@redhat.com>
1646
1647         * symtab.c (make_file_symbol_completion_list_1): Use
1648         add_symtab_completions.
1649
1650 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
1651
1652         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
1653
1654 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
1655
1656         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
1657         I386_MAX_REGISTER_SIZE.
1658         (i386_pseudo_register_write): Likewise.
1659         (i386_process_record): Likewise.
1660         * i387-tdep.c (i387_supply_xsave): Likewise.
1661         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
1662         (store_register): Likewise.
1663
1664 2017-02-23  Pedro Alves  <palves@redhat.com>
1665
1666         * ada-lang.c: Include "common/function-view.h".
1667         (ada_iterate_over_symbols): Adjust to use function_view as
1668         callback type.
1669         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
1670         (ada_make_symbol_completion_list): Use a lambda.
1671         (ada_exc_search_name_matches): Delete.
1672         (name_matches_regex): New.
1673         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
1674         * compile/compile-c-support.c: Include "common/function-view.h".
1675         (print_one_macro): Change prototype to accept a ui_file pointer.
1676         (write_macro_definitions): Use a lambda.
1677         * dwarf2read.c: Include "common/function-view.h".
1678         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
1679         (dw2_expand_symtabs_matching): Adjust to use function_view as
1680         callback type.
1681         * language.h: Include "common/function-view.h".
1682         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
1683         function_view as callback type.
1684         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
1685         * linespec.c: Include "common/function-view.h".
1686         (collect_info::add_symbol): New method.
1687         (struct symbol_and_data_callback, iterate_inline_only, struct
1688         symbol_matcher_data, iterate_name_matcher): Delete.
1689         (iterate_over_all_matching_symtabs): Adjust to use function_view
1690         as callback type and lambdas.
1691         (iterate_over_file_blocks): Adjust to use function_view as
1692         callback type.
1693         (decode_compound_collector): Now a class with private fields.
1694         (decode_compound_collector::release_symbols): New method.
1695         (collect_one_symbol): Rename to...
1696         (decode_compound_collector::operator()): ... this and adjust.
1697         (lookup_prefix_sym): decode_compound_collector construction bits
1698         move to decode_compound_collector ctor.  Pass the
1699         decode_compound_collector object directly as callback.  Remove
1700         cleanups and use decode_compound_collector::release_symbols
1701         instead.
1702         (symtab_collector): Now a class with private fields.
1703         (symtab_collector::release_symtabs): New method.
1704         (add_symtabs_to_list): Rename to...
1705         (symtab_collector::operator()): ... this and adjust.
1706         (collect_symtabs_from_filename): symtab_collector construction
1707         bits move to symtab_collector ctor.  Pass the symtab_collector
1708         object directly as callback.  Remove cleanups and use
1709         symtab_collector::release_symtabs instead.
1710         (collect_symbols): Delete.
1711         (add_matching_symbols_to_info): Use lambdas.
1712         * macrocmd.c (print_macro_callback): Delete.
1713         (info_macro_command): Use a lambda.
1714         (info_macros_command): Pass print_macro_definition as callable
1715         directly.
1716         (print_one_macro): Remove 'ignore' parameter.
1717         (macro_list_command): Adjust.
1718         * macrotab.c (macro_for_each_data::fn): Now a function_view.
1719         (macro_for_each_data::user_data): Delete field.
1720         (foreach_macro): Adjust to call the function_view.
1721         (macro_for_each): Adjust to use function_view as callback type.
1722         (foreach_macro_in_scope): Adjust to call the function_view.
1723         (macro_for_each_in_scope): Adjust to use function_view as callback
1724         type.
1725         * macrotab.h: Include "common/function-view.h".
1726         (macro_callback_fn): Declare a prototype instead of a pointer.
1727         Remove "user_data" parameter.
1728         (macro_for_each, macro_for_each_in_scope): Adjust to use
1729         function_view as callback type.
1730         * psymtab.c (partial_map_expand_apply)
1731         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
1732         Adjust to use function_view as callback type and to return bool.
1733         (psym_expand_symtabs_matching): Adjust to use function_view as
1734         callback types.
1735         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
1736         to use function_view as callback type and to return bool.
1737         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
1738         callback types.
1739         * symfile.c (expand_symtabs_matching): Adjust to use function_view
1740         as callback types.
1741         * symfile.h: Include "common/function-view.h".
1742         (expand_symtabs_file_matcher_ftype)
1743         (expand_symtabs_symbol_matcher_ftype)
1744         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
1745         return bool.
1746         (quick_symbol_functions::map_symtabs_matching_filename)
1747         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
1748         function_view as callback type and return bool.
1749         (expand_symtabs_matching): Adjust to use function_view as callback
1750         type.
1751         (maintenance_expand_name_matcher)
1752         (maintenance_expand_file_matcher): Delete.
1753         (maintenance_expand_symtabs): Use lambdas.
1754         * symtab.c (iterate_over_some_symtabs): Adjust to use
1755         function_view as callback types and return bool.
1756         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
1757         of a cleanup.
1758         (lookup_symtab_callback): Delete.
1759         (lookup_symtab): Use a lambda.
1760         (iterate_over_symbols): Adjust to use function_view as callback
1761         type.
1762         (struct search_symbols_data, search_symbols_file_matches)
1763         (search_symbols_name_matches): Delete.
1764         (search_symbols): Use a pair of lambdas.
1765         (struct add_name_data, add_macro_name, symbol_completion_matcher)
1766         (symtab_expansion_callback): Delete.
1767         (default_make_symbol_completion_list_break_on_1): Use lambdas.
1768         * symtab.h: Include "common/function-view.h".
1769         (iterate_over_some_symtabs): Adjust to use function_view as
1770         callback type and return bool.
1771         (iterate_over_symtabs): Adjust to use function_view as callback
1772         type.
1773         (symbol_found_callback_ftype): Remove 'data' parameter and return
1774         bool.
1775         (iterate_over_symbols): Adjust to use function_view as callback
1776         type.
1777
1778 2017-02-23  Pedro Alves  <palves@redhat.com>
1779
1780         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
1781         (%.o) <unittests/%.c>: New pattern.
1782         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
1783         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
1784         * common/function-view.h: New file.
1785         * unittests/function-view-selftests.c: New file.
1786         * configure: Regenerate.
1787
1788 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
1789
1790         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
1791         inferior_ptid.
1792         * go32-nat.c (go32_thread_alive): Likewise.
1793
1794 2017-02-23  Yao Qi  <yao.qi@linaro.org>
1795
1796         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
1797         delete.
1798
1799 2017-02-23  Yao Qi  <yao.qi@linaro.org>
1800
1801         * varobj.c (varobj_clear_saved_item): Use delete instead of
1802         xfree.
1803         (update_dynamic_varobj_children): Likewise.
1804
1805 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
1806
1807         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
1808
1809 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
1810
1811         * common/enum-flags.h (enum_flags::enum_flags): Initialize
1812         m_enum_value to 0 in default constructor.
1813
1814 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1815
1816         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
1817         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
1818         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
1819         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
1820         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
1821         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
1822         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
1823         IS_STORE_CONDITIONAL_INSN.
1824
1825 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
1826
1827         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
1828
1829 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
1830
1831         * NEWS (Changes since GDB 7.12): Add DWARF-5.
1832
1833 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
1834
1835         * dwarf2read.c (skip_one_die, read_attribute_value)
1836         (dwarf2_const_value_attr, dump_die_shallow)
1837         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
1838         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
1839
1840 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
1841
1842         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
1843         (dwarf_parse_macro_header): Accept DWARF version 5.
1844         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
1845
1846 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
1847
1848         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
1849         DW_AT_GNU_*.
1850         * common/common-exceptions.h (enum errors): Likewise.
1851         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
1852         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
1853         (dwarf_expr_context::execute_stack_op): Likewise.
1854         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
1855         Likewise.
1856         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
1857         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
1858         (show_entry_values_debug, call_site_to_target_addr)
1859         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
1860         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
1861         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
1862         (value_of_dwarf_block_entry, indirect_pieced_value)
1863         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
1864         (disassemble_dwarf_expression): Likewise.
1865         * dwarf2read.c (process_die, inherit_abstract_dies)
1866         (read_call_site_scope): Likewise.
1867         * gdbtypes.h (struct func_type, struct call_site_parameter)
1868         (struct call_site): Likewise.
1869         * stack.c (read_frame_arg): Likewise.
1870         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
1871
1872 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
1873
1874         * defs.h (read_unsigned_leb128): New declaration.
1875         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
1876         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
1877         (dwarf2_find_location_expression): Call also
1878         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
1879         * dwarf2loc.h (dwarf2_version): New declaration.
1880         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
1881         rnglists.
1882         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
1883         .debug_rnglists.
1884         (struct dwop_section_names): Add loclists_dwo.
1885         (dwop_section_names): Add .debug_loclists.dwo.
1886         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
1887         (struct dwarf2_per_cu_data): Add dwarf_version.
1888         (struct dwo_sections): Add loclists.
1889         (struct attr_abbrev): Add implicit_const.
1890         (read_indirect_line_string): New declaration.
1891         (read_unsigned_leb128): Delete declaration.
1892         (rcuh_kind): New definition.
1893         (read_and_check_comp_unit_head): Change parameter
1894         is_debug_types_section to section_kind.
1895         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
1896         (read_comp_unit_head): Change parameter abfd to section, add parameter
1897         section_kind.  Handle DWARF-5.
1898         (error_check_comp_unit_head): Accept also DWARF version 5.
1899         (read_and_check_comp_unit_head): Change parameter
1900         is_debug_types_section to section_kind.
1901         (read_and_check_type_unit_head): Delete function.
1902         (read_abbrev_offset): Handle DWARF-5.
1903         (create_debug_type_hash_table): Add parameter section_kind.  Process
1904         only DW_UT_type.  Use signature and type_offset_in_tu from struct
1905         comp_unit_head.
1906         (create_debug_types_hash_table): Update create_debug_type_hash_table
1907         caller.
1908         (create_all_type_units): Call create_debug_type_hash_table.
1909         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
1910         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
1911         caller.
1912         (skip_one_die): Handle DW_FORM_implicit_const.
1913         (dwarf2_rnglists_process): New function.
1914         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
1915         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
1916         (read_attribute_value): Handle DW_FORM_implicit_const,
1917         DW_FORM_line_strp.
1918         (read_attribute): Handle DW_FORM_implicit_const.
1919         (read_indirect_string_at_offset_from): New function from
1920         read_indirect_string_at_offset.
1921         (read_indirect_string_at_offset): Call
1922         read_indirect_string_at_offset_from.
1923         (read_indirect_line_string_at_offset): New function.
1924         (read_indirect_string): New function comment.
1925         (read_indirect_line_string): New function.
1926         (read_unsigned_leb128): Make it global.
1927         (dwarf2_string_attr): Handle DWARF-5.
1928         (add_include_dir_stub, read_formatted_entries): New functions.
1929         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
1930         Handle DWARF-5.
1931         (per_cu_header_read_in): Update read_comp_unit_head caller.
1932         (dwarf2_version): New function.
1933         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
1934         rnglists.
1935         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
1936         fields.
1937
1938 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
1939
1940         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
1941
1942 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
1943
1944         * dwarf2read.c (dwarf2_ranges_process): New function from
1945         dwarf2_ranges_read.
1946         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
1947         dwarf2_ranges_process.
1948
1949 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
1950
1951         * dwarf2read.c (create_debug_type_hash_table): New function from
1952         create_debug_types_hash_table.
1953         (create_debug_types_hash_table): Call create_debug_type_hash_table.
1954         (create_all_type_units, open_and_init_dwo_file): Update
1955         create_debug_types_hash_table callers.
1956
1957 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
1958
1959         PR gdb/16188
1960         * fork-child.c (trace_start_error): Fix thinko.  va_end should
1961         refer to 'ap', not 'args'.
1962
1963 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
1964             Pedro Alves  <palves@redhat.com>
1965
1966         PR gdb/16188
1967         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
1968         calls succeeded.
1969         * fork-child.c (trace_start_error): New function.
1970         (trace_start_error_with_name): Likewise.
1971         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
1972         * inf-ptrace.c (inf_ptrace_me): Likewise.
1973         * inferior.h (trace_start_error): New prototype.
1974         (trace_start_error_with_name): Likewise.
1975
1976 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
1977
1978         PR gdb/21164
1979         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
1980         NULL before using it.
1981         * symmisc.c (maintenance_print_symbols): Likewise.
1982         (maintenance_print_msymbols): Likewise.
1983
1984 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
1985
1986         * NEWS: Add record Python bindings entry.
1987
1988 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
1989
1990         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
1991         py-record-full.o.
1992         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
1993         * python/py-record-btrace.c, python/py-record-btrace.h,
1994         python/py-record-full.c, python/py-record-full.h: New file.
1995         * python/py-record.c: Add include for py-record-btrace.h and
1996         py-record-full.h.
1997         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
1998         recpy_instruction_history, recpy_function_call_history, recpy_begin,
1999         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
2000         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
2001         New definition.
2002         (gdbpy_initialize_btrace): New export.
2003         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
2004
2005 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
2006
2007         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
2008         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
2009         * python/py-record.c: New file.
2010         * python/python-internal.h (gdbpy_start_recording,
2011         gdbpy_current_recording, gdpy_stop_recording,
2012         gdbpy_initialize_record): New export.
2013         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
2014         (python_GdbMethods): Add gdbpy_start_recording,
2015         gdbpy_current_recording and gdbpy_stop_recording.
2016
2017 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
2018
2019         * record-btrace.c (record_btrace_record_method): New function.
2020         (init_record_btrace_ops): Initialize to_record_method.
2021         * record-full.c (record_full_record_method): New function.
2022         (init_record_full_ops, init_record_full_core_ops): Add
2023         record_full_record_method.
2024         * record.h (enum record_method): New enum.
2025         * target-debug.h (target_debug_print_enum_record_method: New define.
2026         * target-delegates.c: Regenerate.
2027         * target.c (target_record_method): New function.
2028         * target.h: Include record.h.
2029         (struct target_ops) <to_record_method>: New field.
2030         (target_record_method): New export.
2031
2032 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
2033
2034         * record.h (record_start, record_stop): New export.
2035         * record.c (record_start, record_stop): New function.
2036
2037 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
2038
2039         * btrace.c (btrace_fetch): Copy function call segments pointer
2040         into a vector.
2041         (btrace_clear): Clear the vector.
2042         (btrace_find_insn_by_number): Use binary search to find the correct
2043         function call segment.
2044         * btrace.h (brace_fun_p): New typedef.
2045         (struct btrace_thread_info) <functions>: New field.
2046
2047 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
2048
2049         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
2050         * btrace.c (btrace_decode_error): ... here.  New function.
2051         * btrace.h (btrace_decode_error): New export.
2052
2053 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
2054
2055         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
2056         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
2057         btrace_find_insn_by_number): Remove special case for gaps.
2058         * btrace.h (btrace_insn_get_error): New export.
2059         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
2060         * record-btrace.c (btrace_insn_history): Print number for gaps.
2061         (record_btrace_info, record_btrace_goto): Handle gaps.
2062
2063 2017-02-14  Tom Tromey  <tom@tromey.com>
2064
2065         PR python/13598:
2066         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
2067         event.
2068         * python/py-evts.c (gdbpy_initialize_py_events): Add
2069         before_prompt registry.
2070         * python/py-events.h (events_object) <before_prompt>: New field.
2071
2072 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
2073
2074         * btrace.c (ftrace_new_switch): Preserve up link and flags.
2075
2076 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
2077
2078         * symfile (_initialize_symfile): Add usage text to the load command's
2079         help text.
2080
2081 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
2082
2083         * utils.c (defaulted_query): Don't query on secondary UIs.
2084
2085 2017-02-10  Tom Tromey  <tom@tromey.com>
2086
2087         * rust-lang.c (rust_get_disr_info): Remove unused variable.
2088
2089 2017-02-10  Tom Tromey  <tom@tromey.com>
2090
2091         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
2092         "cleanup" local.
2093         * python/py-type.c (typy_legacy_template_argument): Remove
2094         unnecessary "cleanup" local.
2095
2096 2017-02-10  Tom Tromey  <tom@tromey.com>
2097
2098         * python/python.c (do_start_initialization): New function, from
2099         _initialize_python.
2100         (_initialize_python): Call do_start_initialization.
2101         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
2102         goto.
2103
2104 2017-02-10  Tom Tromey  <tom@tromey.com>
2105
2106         * python/py-prettyprint.c (pretty_print_one_value): Use
2107         gdbpy_ref.
2108
2109 2017-02-10  Tom Tromey  <tom@tromey.com>
2110
2111         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
2112         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
2113         gdbpy_ref.
2114         * python/py-type.c (field_new): Use gdbpy_ref.
2115         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
2116         gdbpy_ref.
2117         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
2118         (py_free_pspace): Likewise.
2119         (pspace_to_pspace_object): Likewise.
2120         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
2121         (py_free_objfile): Likewise.
2122         (objfile_to_objfile_object): Likewise.
2123         * python/py-inferior.c (delete_thread_object): Use
2124         gdbpy_ref.
2125         (infpy_read_memory): Likewise.
2126         (py_free_inferior): Likewise.
2127         * python/py-evtregistry.c (create_eventregistry_object): Use
2128         gdbpy_ref.
2129         * python/py-event.c (create_event_object): Use gdbpy_ref.
2130
2131 2017-02-10  Tom Tromey  <tom@tromey.com>
2132
2133         * python/py-ref.h (gdbpy_ref_policy): Now a template.
2134         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
2135         used.
2136         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
2137         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
2138         python/py-exitedevent.c, python/py-finishbreakpoint.c,
2139         python/py-framefilter.c, python/py-function.c,
2140         python/py-inferior.c, python/py-infevents.c,
2141         python/py-linetable.c, python/py-newobjfileevent.c,
2142         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
2143         python/py-signalevent.c, python/py-stopevent.c,
2144         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
2145         python/py-unwind.c, python/py-utils.c, python/py-value.c,
2146         python/py-varobj.c, python/py-xmethods.c, python/python.c,
2147         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
2148
2149 2017-02-10  Tom Tromey  <tom@tromey.com>
2150
2151         * ui-out.h (ui_out_emit_type): New class.
2152         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
2153         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
2154         and ui_out_emit_tuple.
2155         (enumerate_locals): Likewise.
2156         (py_mi_print_variables, py_print_locals, py_print_args): Use
2157         ui_out_emit_list.
2158         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
2159         ui_out_emit_list.
2160         * common/gdb_optional.h: New file.
2161
2162 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
2163
2164         * MAINTAINERS (Write After Approval): Update my e-mail address.
2165
2166 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
2167
2168         PR gdb/21122
2169         * breakpoint.c (_initialize_breakpoint): Update the help description
2170         of the 'commands' command to indicate that it takes a list argument.
2171
2172 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
2173
2174         * interps.c (current_interp_set_logging): Remove "return".
2175
2176 2017-02-09  Gary Benson  <gbenson@redhat.com>
2177
2178         * symtab.c (add_symtab_completions): Prevent NULL pointer
2179         dereference.
2180
2181 2017-02-08  Pedro Alves  <palves@redhat.com>
2182
2183         * interps.c (interp::interp): Remove reference to quiet_p.
2184         (interp_set): Make static.  Remove dead "Switching to" output
2185         code.
2186         (interp_quiet_p, interp_set_quiet): Delete.
2187         (interpreter_exec_cmd): Don't set the interpreter quiet.
2188         * interps.h (interp_quiet_p): Make static.
2189         (class interp) <quiet_p>: Remove field
2190
2191 2017-02-08  Jerome Guitton  <guitton@adacore.com>
2192
2193         * cli/cli-decode.c (find_command_name_length): Make it extern.
2194         * cli/cli-decode.h (find_command_name_length): Declare.
2195         * cli/cli-script.c (command_name_equals, line_first_arg):
2196         New functions.
2197         (process_next_line): Use cli-decode to parse command names.
2198         (build_command_line): Make args a constant pointer.
2199
2200 2017-02-08  Jerome Guitton  <guitton@adacore.com>
2201
2202         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
2203         Remove case-insensitive search.
2204
2205 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
2206
2207         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
2208         at the end of the line.  Avoids an ARI warning.
2209
2210 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
2211
2212         * NEWS: Mention support for record/replay of Intel 64 rdrand and
2213         rdseed instructions.
2214         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
2215
2216 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
2217
2218         PR tdep/20936
2219         Provide and use sparc32 and sparc64 target description XML files.
2220         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
2221         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
2222         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
2223         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
2224         * features/sparc/sparc32-solaris.xml: New file.
2225         * features/sparc/sparc64-solaris.xml: New file.
2226         * features/sparc/sparc32-solaris.c: Generated.
2227         * features/sparc/sparc64-solaris.c: Generated.
2228         * sparc-tdep.h: Account for differences in target descriptions.
2229         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
2230         (sparc32_register_type): Use target provided registers.
2231         (validate_tdesc_registers): New function.
2232         (sparc32_gdbarch_init): Use tdesc_has_registers.
2233         Set pseudoregister functions.
2234         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
2235         (sparc64_register_type): Use target provided registers.
2236         (sparc64_init_abi): Set pseudoregister functions.
2237
2238 2017-02-03  Tom Tromey  <tom@tromey.com>
2239
2240         PR rust/21097:
2241         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
2242         with a single member.
2243
2244 2017-02-03  Pedro Alves  <palves@redhat.com>
2245
2246         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
2247         (cli_interp_base::~cli_interp_base): New.
2248         (cli_interp): New struct.
2249         (as_cli_interp): Cast the interp itself to cli_interp.
2250         (cli_interpreter_pre_command_loop): Rename to ...
2251         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
2252         parameter.
2253         (cli_interpreter_init): Rename to ...
2254         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
2255         boolean.  Make extern.
2256         (cli_interpreter_resume): Rename to ...
2257         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
2258         extern.
2259         (cli_interpreter_suspend): Rename to ...
2260         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
2261         extern.
2262         (cli_interpreter_exec): Rename to ...
2263         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
2264         extern.
2265         (cli_interpreter_supports_command_editing): Rename to ...
2266         (cli_interp_base::supports_command_editing): ... this.  Remove
2267         'interp' parameter.  Make extern.
2268         (cli_ui_out): Rename to ...
2269         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
2270         Make extern.
2271         (cli_set_logging): Rename to ...
2272         (cli_interp_base::set_logging): ... this.  Remove 'interp'
2273         parameter.  Make extern.
2274         (cli_interp_procs): Delete.
2275         (cli_interp_factory): Adjust to use "new".
2276         * cli/cli-interp.h: Include "interps.h".
2277         (struct cli_interp_base): New struct.
2278         * interps.c (struct interp): Delete.  Fields moved to interps.h.
2279         (interp_new): Delete.
2280         (interp::interp, interp::~interp): New.
2281         (interp_set): Use bool, and return void.  Assume the interpreter
2282         has suspend, init and resume methods, and that the all return
2283         void.
2284         (set_top_level_interpreter): interp_set returns void.
2285         (interp_ui_out): Adapt.
2286         (current_interp_set_logging): Adapt.
2287         (interp_data): Delete.
2288         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
2289         (interp_exec): Adapt.
2290         (top_level_interpreter_data): Delete.
2291         * interps.h (interp_init_ftype, interp_resume_ftype)
2292         (interp_suspend_ftype, interp_exec_ftype)
2293         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
2294         (class interp): New.
2295         (interp_new): Delete.
2296         (interp_set): Now returns void.  Use bool.
2297         (interp_data, top_level_interpreter_data): Delete.
2298         * mi/mi-common.h: Include interps.h.
2299         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
2300         init, resume, suspect, exec, interp_ui_out, set_logging and
2301         pre_command_loop methods.
2302         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
2303         (mi_interpreter_init): Rename to ...
2304         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
2305         bool, return void and make extern.  Adjust.
2306         (mi_interpreter_resume): ... Rename to ...
2307         (mi_interp::resume): ... this.  Remove the 'data' parameter,
2308         return void and make extern.  Adjust.
2309         (mi_interpreter_suspend): ... Rename to ...
2310         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
2311         return void and make extern.  Adjust.
2312         (mi_interpreter_exec): ... Rename to ...
2313         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
2314         extern.  Adjust.
2315         (mi_interpreter_pre_command_loop): ... Rename to ...
2316         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
2317         parameter and make extern.
2318         (mi_on_normal_stop_1): Adjust.
2319         (mi_ui_out): Rename to ...
2320         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
2321         parameter and make extern.  Adjust.
2322         (mi_set_logging): Rename to ...
2323         (mi_interp::set_logging): ... this.  Remove the 'interp'
2324         parameter and make extern.  Adjust.
2325         (mi_interp_procs): Delete.
2326         (mi_interp_factory): Adjust to use 'new'.
2327         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
2328         (mi_print_exception, mi_execute_command, mi_load_progress):
2329         Adjust.
2330         * tui/tui-interp.c (tui_interp): New class.
2331         (as_tui_interp): Return a tui_interp pointer.
2332         (tui_on_normal_stop, tui_on_signal_received)
2333         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
2334         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
2335         to use interp::interp_ui_out.
2336         (tui_init): Rename to ...
2337         (tui_interp::init): ... this.  Remove the 'self' parameter, use
2338         bool, return void and make extern.  Adjust.
2339         (tui_resume): Rename to ...
2340         (tui_interp::resume): ... this.  Remove the 'data' parameter,
2341         return void and make extern.  Adjust.
2342         (tui_suspend): Rename to ...
2343         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
2344         return void and make extern.  Adjust.
2345         (tui_ui_out): Rename to ...
2346         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
2347         parameter, and make extern.  Adjust.
2348         (tui_exec): Rename to ...
2349         (tui_interp::exec): ... this.  Remove the 'data' parameter and
2350         make extern.
2351         (tui_interp_procs): Delete.
2352         (tui_interp_factory): Use "new".
2353
2354 2017-02-02  Tom Tromey  <tom@tromey.com>
2355
2356         * rust-exp.y (ends_raw_string, space_then_number)
2357         (rust_identifier_start_p): Return bool.
2358         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
2359         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
2360         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
2361         (rust_chartype_p): Return bool.
2362         (val_print_struct, rust_print_struct_def, rust_print_type):
2363         Update.
2364         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
2365         Return bool.
2366
2367 2017-02-02  Tom Tromey  <tom@tromey.com>
2368
2369         * rust-lang.c: Reindent.
2370
2371 2017-02-02  Tom Tromey  <tom@tromey.com>
2372
2373         * rust-lang.h (rust_crate_for_block): Update.
2374         * rust-lang.c (rust_crate_for_block): Return std::string.
2375         (rust_get_disr_info): Use std:;string, not
2376         gdb::unique_xmalloc_ptr.
2377         * rust-exp.y (crate_name): Update.
2378
2379 2017-02-02  Pedro Alves  <palves@redhat.com>
2380
2381         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
2382         field out of gdb_disassembler_test and make it static.
2383
2384 2017-02-02  Pedro Alves  <palves@redhat.com>
2385
2386         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
2387         mi1_interp and mi_interp fields.
2388
2389 2017-02-02  Pedro Alves  <palves@redhat.com>
2390
2391         * cli/cli-interp.c (struct saved_output_files, saved_output):
2392         Moved from cli/cli-logging.c.
2393         (cli_set_logging): New function.
2394         (cli_interp_procs): Install cli_set_logging.
2395         * cli/cli-interp.h (make_logging_output, cli_set_logging):
2396         Declare.
2397         * cli/cli-logging.c (struct saved_output_files, saved_output):
2398         Moved to cli/cli-interp.c.
2399         (pop_output_files): Don't save outputs here.
2400         (make_logging_output): New function.
2401         (handle_redirections): Don't build tee nor save previous outputs
2402         here.
2403         * interps.c (current_interp_set_logging): Change prototype.
2404         Assume there's always a set_logging_proc method installed.
2405         * interps.h (interp_set_logging_ftype): Change prototype.
2406         (current_interp_set_logging): Change prototype and adjust comment.
2407         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
2408         use make_logging_output.
2409         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
2410 2017-02-02  Pedro Alves  <palves@redhat.com>
2411
2412         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
2413         from ...
2414         (set_logging_overwrite): ... here.
2415         (logging_no_redirect_file): Delete.
2416         (set_logging_redirect): Don't handle redirection on the fly.
2417         Instead warn that "logging off" / "logging on" is necessary.
2418         (pop_output_files): Delete references to logging_no_redirect_file.
2419         (show_logging_command): Always speak in terms of what will happen
2420         once logging is reenabled.
2421
2422 2017-02-02  Pedro Alves  <palves@redhat.com>
2423
2424         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
2425
2426 2017-02-02  Pedro Alves  <palves@redhat.com>
2427
2428         * disasm.c (gdb_pretty_print_insn): Rename to ...
2429         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
2430         Remove gdbarch parameter.  Adapt to clear the object's buffers
2431         instead of allocating new buffers, and to print using the object's
2432         gdb_disassembler instead of calling gdb_print_insn.
2433         (dump_insns): Use gdb_pretty_print_disassembler.
2434         * disasm.h (gdb_pretty_print_insn): Delete declaration.
2435         (gdb_pretty_print_disassembler): New class.
2436         * record-btrace.c (btrace_insn_history): Use
2437         gdb_pretty_print_disassembler.
2438
2439 2017-02-02  Pedro Alves  <palves@redhat.com>
2440
2441         * ada-lang.c (type_as_string): Use string_file.
2442         * ada-valprint.c (ada_print_floating): Use string_file.
2443         * ada-varobj.c (ada_varobj_scalar_image)
2444         (ada_varobj_get_value_image): Use string_file.
2445         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
2446         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
2447         * breakpoint.c (update_inserted_breakpoint_locations)
2448         (insert_breakpoint_locations, reattach_breakpoints)
2449         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
2450         (print_it_watchpoint): Use string_file.
2451         (save_breakpoints): Use stdio_file.
2452         * c-exp.y (oper): Use string_file.
2453         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
2454         tee_file.
2455         (pop_output_files): Use delete.
2456         (handle_redirections): Use stdio_file and tee_file.
2457         * cli/cli-setshow.c (do_show_command): Use string_file.
2458         * compile/compile-c-support.c (c_compute_program): Use
2459         string_file.
2460         * compile/compile-c-symbols.c (generate_vla_size): Take a
2461         'string_file &' instead of a 'ui_file *'.
2462         (generate_c_for_for_one_variable): Take a 'string_file &' instead
2463         of a 'ui_file *'.  Use string_file.
2464         (generate_c_for_variable_locations): Take a 'string_file &'
2465         instead of a 'ui_file *'.
2466         * compile/compile-internal.h (generate_c_for_for_one_variable):
2467         Take a 'string_file &' instead of a 'ui_file *'.
2468         * compile/compile-loc2c.c (push, pushf, unary, binary)
2469         (print_label, pushf_register_address, pushf_register)
2470         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
2471         'ui_file *'.  Adjust.
2472         * compile/compile.c (compile_to_object): Use string_file.
2473         * compile/compile.h (compile_dwarf_expr_to_c)
2474         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
2475         'ui_file *'.
2476         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
2477         (replace_typedefs_qualified_name): Use string_file and
2478         obstack_copy0.
2479         * disasm.c (gdb_pretty_print_insn): Use string_file.
2480         (gdb_disassembly): Adjust reference the null_stream global.
2481         (do_ui_file_delete): Delete.
2482         (gdb_insn_length): Use null_stream.
2483         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
2484         * dwarf2loc.c (dwarf2_compile_property_to_c)
2485         (locexpr_generate_c_location, loclist_generate_c_location): Take a
2486         'string_file &' instead of a 'ui_file *'.
2487         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
2488         * dwarf2read.c (do_ui_file_peek_last): Delete.
2489         (dwarf2_compute_name): Use string_file.
2490         * event-top.c (gdb_setup_readline): Use stdio_file.
2491         * gdbarch.sh (verify_gdbarch): Use string_file.
2492         * gdbtypes.c (safe_parse_type): Use null_stream.
2493         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
2494         string_file.
2495         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
2496         'string_file *' instead of a 'ui_file *'.
2497         (gdbscm_arch_disassemble): Use string_file.
2498         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
2499         * guile/scm-ports.c (class ioscm_file_port): Now a class that
2500         inherits from ui_file.
2501         (ioscm_file_port_delete, ioscm_file_port_rewind)
2502         (ioscm_file_port_put): Delete.
2503         (ioscm_file_port_write): Rename to ...
2504         (ioscm_file_port::write): ... this.  Remove file_port_magic
2505         checks.
2506         (ioscm_file_port_new): Delete.
2507         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
2508         ui_file_up.
2509         * guile/scm-type.c (tyscm_type_name): Use string_file.
2510         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
2511         Use string_file.
2512         * infcmd.c (print_return_value_1): Use string_file.
2513         * infrun.c (print_target_wait_results): Use string_file.
2514         * language.c (add_language): Use string_file.
2515         * location.c (explicit_to_string_internal): Use string_file.
2516         * main.c (captured_main_1): Use null_file.
2517         * maint.c (maintenance_print_architecture): Use stdio_file.
2518         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
2519         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
2520         event_channel>: Change type to mi_console_file pointer.
2521         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
2522         (mi_console_file_delete): Delete.
2523         (struct mi_console_file): Delete.
2524         (mi_console_file_magic): Delete.
2525         (mi_console_file_new): Delete.
2526         (mi_console_file::mi_console_file): New.
2527         (mi_console_file_delete): Delete.
2528         (mi_console_file_fputs): Delete.
2529         (mi_console_file::write): New.
2530         (mi_console_raw_packet): Delete.
2531         (mi_console_file::flush): New.
2532         (mi_console_file_flush): Delete.
2533         (mi_console_set_raw): Rename to ...
2534         (mi_console_file::set_raw): ... this.
2535         * mi/mi-console.h (class mi_console_file): New class.
2536         (mi_console_file_new, mi_console_set_raw): Delete.
2537         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
2538         (mi_set_logging): Use delete and tee_file.  Adjust.
2539         * mi/mi-main.c (output_register): Use string_file.
2540         (mi_cmd_data_evaluate_expression): Use string_file.
2541         (mi_cmd_data_read_memory): Use string_file.
2542         (mi_cmd_execute, print_variable_or_computed): Use string_file.
2543         * mi/mi-out.c (mi_ui_out::main_stream): New.
2544         (mi_ui_out::rewind): Use main_stream and
2545         string_file.
2546         (mi_ui_out::put): Use main_stream and string_file.
2547         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
2548         Allocate a 'string_file' instead.
2549         (mi_out_new): Don't allocate a mem_fileopen stream here.
2550         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
2551         (mi_ui_out::main_stream): Declare method.
2552         * printcmd.c (eval_command): Use string_file.
2553         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
2554         * python/py-arch.c (archpy_disassemble): Use string_file.
2555         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
2556         * python/py-frame.c (frapy_str): Use string_file.
2557         * python/py-framefilter.c (py_print_type, py_print_single_arg):
2558         Use string_file.
2559         * python/py-type.c (typy_str): Use string_file.
2560         * python/py-unwind.c (unwind_infopy_str): Use string_file.
2561         * python/py-value.c (valpy_str): Use string_file.
2562         * record-btrace.c (btrace_insn_history): Use string_file.
2563         * regcache.c (regcache_print): Use stdio_file.
2564         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
2565         * remote.c (escape_buffer): Use string_file.
2566         * rust-lang.c (rust_get_disr_info): Use string_file.
2567         * serial.c (serial_open_ops_1): Use stdio_file.
2568         (do_serial_close): Use delete.
2569         * stack.c (print_frame_arg): Use string_file.
2570         (print_frame_args): Remove local mem_fileopen stream, not used.
2571         (print_frame): Use string_file.
2572         * symmisc.c (maintenance_print_symbols): Use stdio_file.
2573         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
2574         Take a 'string_file *' instead of a 'ui_file *'.
2575         * top.c (new_ui): Use stdio_file and stderr_file.
2576         (free_ui): Use delete.
2577         (execute_command_to_string): Use string_file.
2578         (quit_confirm): Use string_file.
2579         * tracepoint.c (collection_list::append_exp): Use string_file.
2580         * tui/tui-disasm.c (tui_disassemble): Use string_file.
2581         * tui/tui-file.c: Don't include "ui-file.h".
2582         (enum streamtype, struct tui_stream): Delete.
2583         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
2584         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
2585         (tui_file::tui_file): New method.
2586         (tui_file_fputs): Delete.
2587         (tui_file_get_strbuf): Delete.
2588         (tui_file::puts): New method.
2589         (tui_file_adjust_strbuf): Delete.
2590         (tui_file_flush): Delete.
2591         (tui_file::flush): New method.
2592         * tui/tui-file.h: Tweak intro comment.
2593         Include ui-file.h.
2594         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
2595         (tui_file_adjust_strbuf): Delete declarations.
2596         (class tui_file): New class.
2597         * tui/tui-io.c (tui_initialize_io): Use tui_file.
2598         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
2599         (tui_register_format): Use string_stream.
2600         * tui/tui-stack.c (tui_make_status_line): Use string_file.
2601         (tui_get_function_from_frame): Use string_file.
2602         * typeprint.c (type_to_string): Use string_file.
2603         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
2604         (null_stream): New global.
2605         (ui_file_delete): Delete.
2606         (ui_file::ui_file): New.
2607         (null_file_isatty): Delete.
2608         (ui_file::~ui_file): New.
2609         (null_file_rewind): Delete.
2610         (ui_file::printf): New.
2611         (null_file_put): Delete.
2612         (null_file_flush): Delete.
2613         (ui_file::putstr): New.
2614         (null_file_write): Delete.
2615         (ui_file::putstrn): New.
2616         (null_file_read): Delete.
2617         (ui_file::putc): New.
2618         (null_file_fputs): Delete.
2619         (null_file_write_async_safe): Delete.
2620         (ui_file::vprintf): New.
2621         (null_file_delete): Delete.
2622         (null_file::write): New.
2623         (null_file_fseek): Delete.
2624         (null_file::puts): New.
2625         (ui_file_data): Delete.
2626         (null_file::write_async_safe): New.
2627         (gdb_flush, ui_file_isatty): Adjust.
2628         (ui_file_put, ui_file_rewind): Delete.
2629         (ui_file_write): Adjust.
2630         (ui_file_write_for_put): Delete.
2631         (ui_file_write_async_safe, ui_file_read): Adjust.
2632         (ui_file_fseek): Delete.
2633         (fputs_unfiltered): Adjust.
2634         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
2635         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
2636         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
2637         (set_ui_file_data): Delete.
2638         (string_file::~string_file, string_file::write)
2639         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
2640         (do_ui_file_as_string, ui_file_as_string): Delete.
2641         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
2642         (struct mem_file): Delete.
2643         (mem_file_new): Delete.
2644         (stdio_file::stdio_file): New.
2645         (mem_file_delete): Delete.
2646         (stdio_file::stdio_file): New.
2647         (mem_fileopen): Delete.
2648         (stdio_file::~stdio_file): New.
2649         (mem_file_rewind): Delete.
2650         (stdio_file::set_stream): New.
2651         (mem_file_put): Delete.
2652         (stdio_file::open): New.
2653         (mem_file_write): Delete.
2654         (stdio_file_magic, struct stdio_file): Delete.
2655         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
2656         (stdio_file::flush): New.
2657         (stdio_file_read): Rename to ...
2658         (stdio_file::read): ... this.  Adjust.
2659         (stdio_file_write): Rename to ...
2660         (stdio_file::write): ... this.  Adjust.
2661         (stdio_file_write_async_safe): Rename to ...
2662         (stdio_file::write_async_safe) ... this.  Adjust.
2663         (stdio_file_fputs): Rename to ...
2664         (stdio_file::puts) ... this.  Adjust.
2665         (stdio_file_isatty): Delete.
2666         (stdio_file_fseek): Delete.
2667         (stdio_file::isatty): New.
2668         (stderr_file_write): Rename to ...
2669         (stderr_file::write) ... this.  Adjust.
2670         (stderr_file_fputs): Rename to ...
2671         (stderr_file::puts) ... this.  Adjust.
2672         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
2673         (stderr_file::stderr_file): New.
2674         (tee_file_magic): Delete.
2675         (struct tee_file): Delete.
2676         (tee_file::tee_file): New.
2677         (tee_file_new): Delete.
2678         (tee_file::~tee_file): New.
2679         (tee_file_delete): Delete.
2680         (tee_file_flush): Rename to ...
2681         (tee_file::flush): ... this.  Adjust.
2682         (tee_file_write): Rename to ...
2683         (tee_file::write): ... this.  Adjust.
2684         (tee_file::write_async_safe): New.
2685         (tee_file_fputs): Rename to ...
2686         (tee_file::puts): ... this.  Adjust.
2687         (tee_file_isatty): Rename to ...
2688         (tee_file::isatty): ... this.  Adjust.
2689         * ui-file.h (struct obstack, struct ui_file): Don't
2690         forward-declare.
2691         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
2692         (ui_file_write_ftype)
2693         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
2694         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
2695         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
2696         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
2697         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
2698         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
2699         (set_ui_file_fseek): Delete.
2700         (ui_file_data, ui_file_delete, ui_file_rewind)
2701         (struct ui_file): New.
2702         (ui_file_up): New.
2703         (class null_file): New.
2704         (null_stream): Declare.
2705         (ui_file_write_for_put, ui_file_put): Delete.
2706         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
2707         Delete.
2708         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
2709         (gdb_fopen, tee_file_new): Delete.
2710         (struct string_file): New.
2711         (struct stdio_file): New.
2712         (stdio_file_up): New.
2713         (struct stderr_file): New.
2714         (class tee_file): New.
2715         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
2716         of a 'ui_file *'.  Adjust.
2717         * ui-out.h (class ui_out) <field_stream>: Likewise.
2718         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
2719         (null_stream): Delete.
2720         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
2721         Adjust.
2722         * utils.h (struct ui_file): Delete forward declaration..
2723         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
2724         (error_stream): Take a 'string_file &' instead of a
2725         'ui_file *'.
2726         * varobj.c (varobj_value_get_print_value): Use string_file.
2727         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
2728         * gdbarch.c: Regenerate.
2729
2730 2017-02-02  Pedro Alves  <palves@redhat.com>
2731
2732         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
2733         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
2734         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
2735         Adjust to call gdb_print_insn instead of
2736         gdb_disassembler::print_insn.
2737         (dump_insns, do_mixed_source_and_assembly_deprecated)
2738         (do_mixed_source_and_assembly, do_assembly_only): Add back a
2739         'gdbarch' parameter.  Remove gdb_disassembler parameter.
2740         (gdb_disassembly): Don't allocate a gdb_disassembler here.
2741         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
2742         declaration.
2743         (gdb_pretty_print_insn): Re-add declaration.
2744         * record-btrace.c (btrace_insn_history): Don't allocate a
2745         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
2746
2747 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
2748
2749         * disasm.h (gdb_disassembly): Remove file_string parameter.
2750         * disasm.c (gdb_disassembly): Likewise.
2751         * cli/cli-cmds.c (print_disassembly): Adapt.
2752         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
2753         * stack.c (do_gdb_disassembly): Likewise.
2754
2755 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2756
2757         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
2758         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
2759         targets.  And if the implicit value is longer than needed, extract
2760         the first bytes instead of the "least significant" ones.
2761
2762 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
2763
2764         * btrace.c (btrace_enable): Do not call btrace_add_pc for
2765         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
2766         (btrace_fetch): Assert can_access_registers_ptid.
2767         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
2768         validate_registers_access.
2769
2770 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
2771
2772         * gdbthread.h (can_access_registers_ptid): New.
2773         * thread.c (can_access_registers_ptid): New.
2774
2775 2017-02-01  Pedro Alves  <palves@redhat.com>
2776
2777         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
2778
2779 2017-01-31  Pedro Alves  <palves@redhat.com>
2780
2781         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
2782         Fix typos.
2783
2784 2017-01-31  Pedro Alves  <palves@redhat.com>
2785
2786         * stack.c (print_frame_args): Remove local mem_fileopen stream,
2787         not used.
2788
2789 2017-01-31  Pedro Alves  <palves@redhat.com>
2790
2791         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
2792
2793 2017-01-31  Pedro Alves  <palves@redhat.com>
2794
2795         * common/scoped_restore.h
2796         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
2797         change the value's parameter type to T2.
2798         (make_scoped_restore): Likewise.
2799
2800 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2801             Richard Henderson  <rth@redhat.com>
2802
2803         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
2804         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
2805         GS_BASE for older kernels.
2806         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
2807         GS_BASE for older kernels.
2808         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
2809         and GS_BASE to the offset table.
2810         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
2811         system register group.
2812         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
2813         for older kernels.
2814         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
2815         amd64 ABI.
2816         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
2817         AMD64_GSBASE_REGNUM.
2818         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
2819         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
2820         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
2821         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
2822         i386/64bit-segments.xml in those rules.
2823         * features/i386/64bit-segments.xml: New file.
2824         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
2825         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
2826         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
2827         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
2828         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
2829         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
2830         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
2831         * features/i386/amd64-avx-linux.c: Regenerated.
2832         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
2833         * features/i386/amd64-avx-mpx.c: Regenerated.
2834         * features/i386/amd64-avx512-linux.c: Regenerated.
2835         * features/i386/amd64-linux.c: Regenerated.
2836         * features/i386/amd64-mpx-linux.c: Regenerated.
2837         * features/i386/i386-avx-mpx-linux.c: Regenerated.
2838         * features/i386/i386-avx-mpx.c: Regenerated.
2839         * features/i386/x32-avx-linux.c: Regenerated.
2840         * features/i386/x32-avx512-linux.c: Regenerated.
2841         * regformats/i386/amd64-avx-linux.dat: Regenerated.
2842         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
2843         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
2844         * regformats/i386/amd64-linux.dat: Regenerated.
2845         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
2846         * regformats/i386/x32-avx-linux.dat: Regenerated.
2847         * regformats/i386/x32-avx512-linux.dat: Regenerated.
2848         * regformats/i386/x32-linux.dat: Regenerated.
2849
2850 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2851
2852         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
2853         Set to AMD64_NUM_REGS.
2854
2855 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2856
2857         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
2858         that checks validity of a register number.
2859
2860 2017-01-27  Kees Cook  <keescook@google.com>
2861
2862         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
2863         fetch_fpregs if target has fpa registers.
2864         (arm_linux_store_inferior_registers): Call store_fpregs if target
2865         has fpa registers.
2866
2867 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2868
2869         * cris-tdep.c (cris_gdbarch_init): Remove check for
2870         info.byte_order and force it to BFD_ENDIAN_LITTLE.
2871
2872 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
2873
2874         * corelow.c (get_core_register_section): Check for regset
2875         existence before checking for REGSET_VARIABLE_SIZE.
2876
2877 2017-01-26  Yao Qi  <yao.qi@linaro.org>
2878             Pedro Alves  <palves@redhat.com>
2879
2880         PR gdb/20939
2881         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
2882         call memory_error, save memaddr instead.
2883         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
2884         negative, cal memory_error.
2885         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
2886
2887 2017-01-26  Yao Qi  <yao.qi@linaro.org>
2888
2889         * disasm-selftests.c (memory_error_test): New function.
2890         (_initialize_disasm_selftests): Register memory_error_test.
2891
2892 2017-01-26  Yao Qi  <yao.qi@linaro.org>
2893
2894         * Makefile.in (SFILES): Add disasm-selftests.c and
2895         selftest-arch.c.
2896         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
2897         * disasm-selftests.c: New file.
2898         * selftest-arch.c: New file.
2899         * selftest-arch.h: New file.
2900
2901 2017-01-26  Yao Qi  <yao.qi@linaro.org>
2902
2903         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
2904         to bfd_arch_mep.  Don't return 0 if section is not
2905         found.  Call print_insn_mep.
2906
2907 2017-01-26  Pedro Alves  <palves@redhat.com>
2908             Yao Qi  <yao.qi@linaro.org>
2909
2910         * arm-tdep.c: Include "disasm.h".
2911         (gdb_print_insn_arm): Update code to get gdbarch.
2912         * disasm.c (dis_asm_read_memory): Change it to
2913         gdb_disassembler::dis_asm_read_memory.
2914         (dis_asm_memory_error): Likewise.
2915         (dis_asm_print_address): Likewise.
2916         (gdb_pretty_print_insn): Change it to
2917         gdb_disassembler::pretty_print_insn.
2918         (dump_insns): Add one argument gdb_disassemlber.  All
2919         callers updated.
2920         (do_mixed_source_and_assembly_deprecated): Likewise.
2921         (do_mixed_source_and_assembly): Likewise.
2922         (do_assembly_only): Likewise.
2923         (gdb_disassembler::gdb_disassembler): New.
2924         (gdb_disassembler::print_insn): New.
2925         * disasm.h (class gdb_disassembler): New.
2926         (gdb_pretty_print_insn): Remove declaration.
2927         (gdb_disassemble_info): Likewise.
2928         * guile/scm-disasm.c (class gdbscm_disassembler): New.
2929         (gdbscm_disasm_read_memory_worker): Update.
2930         (gdbscm_disasm_read_memory): Update.
2931         (gdbscm_disasm_memory_error): Remove.
2932         (gdbscm_disasm_print_address): Remove.
2933         (gdbscm_disassembler::gdbscm_disassembler): New.
2934         (gdbscm_print_insn_from_port): Update.
2935         * mips-tdep.c: Include disasm.h.
2936         (gdb_print_insn_mips): Update code to get gdbarch.
2937         * record-btrace.c (btrace_insn_history): Update.
2938         * spu-tdep.c: Include disasm.h.
2939         (struct spu_dis_asm_data): Remove.
2940         (struct spu_dis_asm_info): New.
2941         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
2942         SPU id.
2943         (gdb_print_insn_spu): Cast disassemble_info to
2944         spu_dis_asm_info.
2945
2946 2017-01-26  Yao Qi  <yao.qi@linaro.org>
2947
2948         * disasm.c (do_ui_file_delete): Delete.
2949         (gdb_insn_length): Move code creating stream to ...
2950         * utils.c (null_stream): ... here.  New function.
2951         * utils.h (null_stream): Declare.
2952
2953 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
2954
2955         * python/py-inferior.c (find_thread_object): Return directly
2956         from the loop.  Remove "found" variable.
2957
2958 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
2959
2960         GDB 7.12.1 released.
2961
2962 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
2963
2964         * python/py-function.c (fnpy_call): Reorder declarations to have
2965         the gdbpy_enter object declared first.
2966         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
2967
2968 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
2969
2970         PR python/21068
2971         * python/python-internal.h (PyMem_RawMalloc): Define for
2972         Python < 3.4.
2973         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
2974         PyMem_RawMalloc instead of PyMem_Malloc.
2975
2976 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
2977             Luis Machado  <lgustavo@codesourcery.com>
2978
2979         * NEWS (New commands): Mention flash-erase.
2980         (New MI commands): Mention target-flash-erase.
2981         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
2982         command.
2983         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
2984         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
2985         * target.c (flash_erase_command): New function.
2986         (initialize_targets): Add new flash-erase command.
2987         * target.h (flash_erase_command): New declaration.
2988
2989 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
2990
2991         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
2992         HAVE_SYS_PROCFS_H is defined.
2993
2994 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
2995
2996         * remote.c (struct cached_reg): Change data into a pointer.
2997         * (stop_reply_dtr): Free data pointers before deleting vector.
2998         (process_stop_reply): Likewise.
2999         (remote_parse_stop_reply): Allocate space for data
3000
3001 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
3002
3003         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
3004         MAX_REGISTER_SIZE.
3005         (amd64_pseudo_register_read_value): Likewise.
3006         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
3007         (store_register_using_P): Likewise.
3008         * regcache.c (regcache_xfer_part): Likewise.
3009
3010 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
3011
3012         Split real and pseudo registers.
3013         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
3014         (sparc32_pseudo_regnum): New enum.
3015         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
3016         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
3017         (SPARC32_CP0_REGISTERS): New macro.
3018         (sparc32_pseudo_register_name): New function.
3019         (sparc32_register_name): Use sparc32_pseudo_register_name.
3020         (sparc32_pseudo_register_type): New function.
3021         (sparc32_register_type): Use sparc32_pseudo_register_type.
3022         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
3023         pseudo register numbers.
3024         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
3025         (SPARC64_CP0_REGISTERS): New macro.
3026         (sparc64_pseudo_register_name): New function.
3027         (sparc64_register_name): Use sparc64_pseudo_register_name.
3028         (sparc64_pseudo_register_type): New function.
3029         (sparc64_register_type): Use sparc64_pseudo_register_type.
3030         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
3031         pseudo register numbers.
3032         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
3033         sparc64_store_arguments): Handle pseudo register numbers.
3034
3035 2017-01-13  Yao Qi  <yao.qi@linaro.org>
3036
3037         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
3038         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
3039         output.
3040         (getpkt_or_notif_sane_1): Likewise.
3041
3042 2017-01-13  Yao Qi  <yao.qi@linaro.org>
3043
3044         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
3045         of CC.  Pass "-x c++-header" instead of "-x c".
3046
3047 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
3048
3049         * remote.c (remote_can_async_p): Update comment.
3050
3051 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
3052
3053         * linux-nat.c (linux_nat_can_async_p): Update comment.
3054
3055 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
3056
3057         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
3058
3059 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
3060
3061         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
3062
3063 2017-01-10  Tom Tromey  <tom@tromey.com>
3064
3065         * python/py-type.c (typy_legacy_template_argument): Update.
3066         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
3067         ~demangle_parse_info): Declare new members.
3068         (cp_demangled_name_to_comp): Return unique_ptr.
3069         (cp_demangled_name_parse_free)
3070         (make_cleanup_cp_demangled_name_parse_free)
3071         (cp_new_demangle_parse_info): Remove.
3072         * cp-support.c (do_demangled_name_parse_free_cleanup)
3073         (make_cleanup_cp_demangled_name_parse_free): Remove.
3074         (inspect_type, cp_canonicalize_string_full)
3075         (cp_canonicalize_string): Update.
3076         (mangled_name_to_comp): Change return type.
3077         (cp_class_name_from_physname, method_name_from_physname)
3078         (cp_func_name, cp_remove_params): Update.
3079         * cp-name-parser.y (demangle_parse_info): New constructor, from
3080         cp_new_demangle_parse_info.
3081         (~demangle_parse_info): New destructor, from
3082         cp_demangled_name_parse_free.
3083         (cp_merge_demangle_parse_infos): Update.
3084         (cp_demangled_name_to_comp): Change return type.
3085
3086 2017-01-10  Tom Tromey  <tom@tromey.com>
3087
3088         * top.c (prevent_dont_repeat): Change return type.
3089         * python/python.c (execute_gdb_command): Use std::string.
3090         Update.
3091         * guile/guile.c (gdbscm_execute_gdb_command): Update.
3092         * command.h (prevent_dont_repeat): Change return type.
3093         * breakpoint.c (bpstat_do_actions_1): Update.
3094
3095 2017-01-10  Tom Tromey  <tom@tromey.com>
3096
3097         * value.h (scoped_value_mark::~scoped_value_mark): Call
3098         free_to_mark.
3099         (scoped_value_mark::free_to_mark): New method.
3100         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
3101         scoped_value_mark.
3102
3103 2017-01-10  Tom Tromey  <tom@tromey.com>
3104
3105         * python/py-value.c (valpy_dereference, valpy_referenced_value)
3106         (valpy_reference_value, valpy_const_value, valpy_get_address)
3107         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
3108         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
3109         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
3110         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
3111         scoped_value_mark.
3112         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
3113         * value.h (scoped_value_mark): New class.
3114
3115 2017-01-10  Tom Tromey  <tom@tromey.com>
3116
3117         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
3118         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
3119         * psymtab.c (discard_psymtabs_upto): Remove.
3120         (make_cleanup_discard_psymtabs): Remove.
3121         (struct psymtab_state): Remove.
3122
3123 2017-01-10  Tom Tromey  <tom@tromey.com>
3124
3125         * record-full.c (record_full_save_cleanups): Remove.
3126         (record_full_save): Use gdb::unlinker.
3127         * gcore.c (do_bfd_delete_cleanup): Remove.
3128         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
3129         cleanups.
3130         * dwarf2read.c (unlink_if_set): Remove.
3131         (write_psymtabs_to_index): Use gdb::unlinker.
3132         * common/gdb_unlinker.h: New file.
3133
3134 2017-01-10  Tom Tromey  <tom@tromey.com>
3135
3136         * windows-tdep.c (windows_xfer_shared_library): Update.
3137         * windows-nat.c (windows_make_so): Update.
3138         * utils.h (make_cleanup_bfd_unref): Remove.
3139         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
3140         * symfile.h (symfile_bfd_open)
3141         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
3142         * symfile.c (read_symbols, symbol_file_add)
3143         (separate_debug_file_exists): Update.
3144         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
3145         (generic_load, reread_symbols): Update.
3146         * symfile-mem.c (symbol_file_add_from_memory): Update.
3147         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
3148         (spu_symbol_file_add_from_memory): Update.
3149         * solist.h (struct target_so_ops) <bfd_open>: Return
3150         gdb_bfd_ref_ptr.
3151         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
3152         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
3153         gdb_bfd_ref_ptr.
3154         (solib_map_sections, reload_shared_libraries_1): Update.
3155         * solib-svr4.c (enable_break): Update.
3156         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
3157         * solib-frv.c (enable_break2): Update.
3158         * solib-dsbt.c (enable_break): Update.
3159         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
3160         gdb_bfd_ref_ptr.
3161         (darwin_solib_get_all_image_info_addr_at_init): Update.
3162         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
3163         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
3164         * record-full.c (record_full_save): Update.
3165         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
3166         * procfs.c (insert_dbx_link_bpt_in_file): Update.
3167         * minidebug.c (find_separate_debug_file_in_section): Return
3168         gdb_bfd_ref_ptr.
3169         * machoread.c (macho_add_oso_symfile): Change abfd to
3170         gdb_bfd_ref_ptr.
3171         (macho_symfile_read_all_oso): Update.
3172         (macho_check_dsym): Return gdb_bfd_ref_ptr.
3173         (macho_symfile_read): Update.
3174         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
3175         (jit_bfd_try_read_symtab): Update.
3176         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
3177         (gdb_bfd_openw, gdb_bfd_openr_iovec)
3178         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
3179         gdb_bfd_ref_ptr.
3180         (gdb_bfd_ref_policy): New struct.
3181         (gdb_bfd_ref_ptr): New typedef.
3182         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
3183         (gdb_bfd_openw, gdb_bfd_openr_iovec)
3184         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
3185         gdb_bfd_ref_ptr.
3186         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
3187         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
3188         (gcore_command): Update.
3189         * exec.c (exec_file_attach): Update.
3190         * elfread.c (elf_symfile_read): Update.
3191         * dwarf2read.c (dwarf2_get_dwz_file): Update.
3192         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
3193         (open_and_init_dwo_file): Update.
3194         (open_dwp_file): Return gdb_bfd_ref_ptr.
3195         (open_and_init_dwp_file): Update.
3196         * corelow.c (core_open): Update.
3197         * compile/compile-object-load.c (compile_object_load): Update.
3198         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
3199         * coffread.c (coff_symfile_read): Update.
3200         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
3201         gdb_bfd_ref_ptr.  Rename.
3202         (dump_bfd_file, restore_command): Update.
3203         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
3204         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
3205         (find_separate_debug_file_by_buildid): Update.
3206
3207 2017-01-10  Tom Tromey  <tom@tromey.com>
3208
3209         * common/gdb_ref_ptr.h: New file.
3210         * python/py-ref.h (struct gdbpy_ref_policy): New.
3211         (gdbpy_ref): Now a typedef.
3212
3213 2017-01-10  Tom Tromey  <tom@tromey.com>
3214
3215         * utils.h (make_cleanup_htab_delete): Don't declare.
3216         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
3217         Remove.
3218         * linespec.c (decode_compound_collector): Add constructor,
3219         destructor.
3220         (lookup_prefix_sym): Remove cleanup.
3221         (symtab_collector): Add constructor, destructor.
3222         (collect_symtabs_from_filename): Remove cleanup.
3223         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
3224         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
3225         Use htab_up.
3226         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
3227         * dwarf2read.c (dw2_expand_symtabs_matching)
3228         (dw2_map_symbol_filenames, dwarf_decode_macros)
3229         (write_psymtabs_to_index): Use htab_up.
3230         * dwarf2loc.c (func_verify_no_selftailcall)
3231         (call_site_find_chain_1, func_verify_no_selftailcall)
3232         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
3233         std::vector, gdb::unique_xmalloc_ptr.
3234         (call_sitep): Remove typedef.
3235         (dwarf2_locexpr_baton_eval): Remove unused variable.
3236
3237 2017-01-10  Tom Tromey  <tom@tromey.com>
3238
3239         * python/python-internal.h (make_cleanup_py_decref)
3240         (make_cleanup_py_xdecref): Don't declare.
3241         * python/py-utils.c (py_decref, make_cleanup_py_decref)
3242         (py_xdecref, make_cleanup_py_xdecref): Remove.
3243
3244 2017-01-10  Tom Tromey  <tom@tromey.com>
3245
3246         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
3247         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
3248
3249 2017-01-10  Tom Tromey  <tom@tromey.com>
3250
3251         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
3252
3253 2017-01-10  Tom Tromey  <tom@tromey.com>
3254
3255         * python/py-utils.c (unicode_to_encoded_string)
3256         (python_string_to_target_string)
3257         (python_string_to_target_python_string)
3258         (python_string_to_host_string, gdbpy_obj_to_string)
3259         (get_addr_from_python): Use gdbpy_ref.
3260
3261 2017-01-10  Tom Tromey  <tom@tromey.com>
3262
3263         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
3264         gdbpy_ref.
3265
3266 2017-01-10  Tom Tromey  <tom@tromey.com>
3267
3268         * python/python.c (eval_python_command, gdbpy_decode_line)
3269         (gdbpy_run_events, gdbpy_start_type_printers)
3270         (gdbpy_apply_type_printers): Use gdbpy_ref.
3271
3272 2017-01-10  Tom Tromey  <tom@tromey.com>
3273
3274         * python/py-param.c (get_doc_string, compute_enum_values): Use
3275         gdbpy_ref.
3276
3277 2017-01-10  Tom Tromey  <tom@tromey.com>
3278
3279         * python/py-inferior.c (find_thread_object, build_inferior_list):
3280         Use gdbpy_ref.
3281
3282 2017-01-10  Tom Tromey  <tom@tromey.com>
3283
3284         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
3285
3286 2017-01-10  Tom Tromey  <tom@tromey.com>
3287
3288         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
3289         gdbpy_ref.
3290
3291 2017-01-10  Tom Tromey  <tom@tromey.com>
3292
3293         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
3294         extra incref.
3295         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
3296         Use gdbpy_ref.
3297
3298 2017-01-10  Tom Tromey  <tom@tromey.com>
3299
3300         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
3301         gdbpy_ref.
3302
3303 2017-01-10  Tom Tromey  <tom@tromey.com>
3304
3305         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
3306         decref results of PyArg_ParseTupleAndKeywords.
3307
3308 2017-01-10  Tom Tromey  <tom@tromey.com>
3309
3310         * python/python.c (python_run_simple_file): Use
3311         unique_xmalloc_ptr, gdbpy_ref.
3312
3313 2017-01-10  Tom Tromey  <tom@tromey.com>
3314
3315         * python/py-prettyprint.c (print_stack_unless_memory_error)
3316         (print_string_repr, print_children): Use gdbpy_ref.
3317         (dummy_python_frame): New class.
3318         (dummy_python_frame::dummy_python_frame): Rename from
3319         push_dummy_python_frame.
3320         (py_restore_tstate): Remove.
3321
3322 2017-01-10  Tom Tromey  <tom@tromey.com>
3323
3324         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
3325
3326 2017-01-10  Tom Tromey  <tom@tromey.com>
3327
3328         * python/python.c (ensure_python_env, restore_python_env):
3329         Remove.
3330         * python/python-internal.h (ensure_python_env): Don't declare.
3331         * varobj.h (varobj_ensure_python_env): Don't declare.
3332         * varobj.c (varobj_ensure_python_env): Remove.
3333
3334 2017-01-10  Tom Tromey  <tom@tromey.com>
3335
3336         * varobj.c (varobj_value_get_print_value): Use
3337         gdbpy_enter_varobj.
3338
3339 2017-01-10  Tom Tromey  <tom@tromey.com>
3340
3341         * python/py-prettyprint.c (print_string_repr, print_children):
3342         Update.
3343         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
3344         of "encoding".
3345         * varobj.c (varobj_value_get_print_value): Update.
3346         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
3347
3348 2017-01-10  Tom Tromey  <tom@tromey.com>
3349
3350         * varobj.c (varobj_get_display_hint)
3351         (dynamic_varobj_has_child_method, install_new_value_visualizer)
3352         (varobj_set_visualizer, free_variable): Use
3353         gdbpy_enter_varobj.
3354
3355 2017-01-10  Tom Tromey  <tom@tromey.com>
3356
3357         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
3358         (do_finish_initialization): New function.  Use gdbpy_ref.
3359         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
3360         do_finish_initialization.
3361
3362 2017-01-10  Tom Tromey  <tom@tromey.com>
3363
3364         * python/py-param.c (get_set_value, get_show_value): Use
3365         gdbpy_enter, gdbpy_ref.
3366
3367 2017-01-10  Tom Tromey  <tom@tromey.com>
3368
3369         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
3370
3371 2017-01-10  Tom Tromey  <tom@tromey.com>
3372
3373         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
3374
3375 2017-01-10  Tom Tromey  <tom@tromey.com>
3376
3377         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
3378         Use gdbpy_enter_varobj.
3379
3380 2017-01-10  Tom Tromey  <tom@tromey.com>
3381
3382         * varobj.c (gdbpy_enter_varobj): New constructor.
3383         * python/python-internal.h (gdbpy_enter_varobj): New class.
3384         * python/py-varobj.c (py_varobj_get_iterator): Use
3385         gdbpy_enter_varobj.
3386
3387 2017-01-10  Tom Tromey  <tom@tromey.com>
3388
3389         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
3390         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
3391         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
3392         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
3393         unique_xmalloc_ptr.
3394         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
3395
3396 2017-01-10  Tom Tromey  <tom@tromey.com>
3397
3398         * python/py-xmethods.c (invoke_match_method): Use
3399         gdbpy_ref.
3400
3401 2017-01-10  Tom Tromey  <tom@tromey.com>
3402
3403         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
3404         gdbpy_enter, gdbpy_ref.
3405
3406 2017-01-10  Tom Tromey  <tom@tromey.com>
3407
3408         * python/python.c (python_interactive_command): Use gdbpy_enter.
3409
3410 2017-01-10  Tom Tromey  <tom@tromey.com>
3411
3412         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
3413         gdbpy_ref.
3414
3415 2017-01-10  Tom Tromey  <tom@tromey.com>
3416
3417         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
3418         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
3419
3420 2017-01-10  Tom Tromey  <tom@tromey.com>
3421
3422         * utils.h (htab_deleter): New struct.
3423         (htab_up): New typedef.
3424         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
3425         gdbpy_enter, gdbpy_ref, htab_up.
3426
3427 2017-01-10  Tom Tromey  <tom@tromey.com>
3428
3429         * python/py-unwind.c (pending_frame_invalidate): Remove.
3430         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
3431
3432 2017-01-10  Tom Tromey  <tom@tromey.com>
3433
3434         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
3435         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
3436
3437 2017-01-10  Tom Tromey  <tom@tromey.com>
3438
3439         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
3440
3441 2017-01-10  Tom Tromey  <tom@tromey.com>
3442
3443         * python/python.c (gdbpy_eval_from_control_command)
3444         (gdbpy_source_script, gdbpy_run_events)
3445         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
3446         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
3447         gdbpy_enter.
3448
3449 2017-01-10  Tom Tromey  <tom@tromey.com>
3450
3451         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
3452
3453 2017-01-10  Tom Tromey  <tom@tromey.com>
3454
3455         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
3456
3457 2017-01-10  Tom Tromey  <tom@tromey.com>
3458
3459         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
3460         (python_on_inferior_call_pre, python_on_inferior_call_post)
3461         (python_on_memory_change, python_on_register_change)
3462         (python_inferior_exit, python_new_objfile, add_thread_object)
3463         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
3464
3465 2017-01-10  Tom Tromey  <tom@tromey.com>
3466
3467         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
3468         (bpfinishpy_handle_exit): Use gdbpy_enter.
3469
3470 2017-01-10  Tom Tromey  <tom@tromey.com>
3471
3472         * python/py-cmd.c (cmdpy_destroyer)
3473         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
3474         gdbpy_enter.
3475
3476 2017-01-10  Tom Tromey  <tom@tromey.com>
3477
3478         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
3479         gdbpy_enter.
3480         (gdbpy_breakpoint_has_cond): Likewise.
3481
3482 2017-01-10  Tom Tromey  <tom@tromey.com>
3483
3484         * python/python.c (gdbpy_enter): New constructor.
3485         (~gdbpy_enter): New destructor.
3486         (restore_python_env, ensure_python_env): Rewrite.
3487         * python/python-internal.h (gdbpy_enter): New class.
3488
3489 2017-01-10  Tom Tromey  <tom@tromey.com>
3490
3491         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
3492
3493 2017-01-10  Tom Tromey  <tom@tromey.com>
3494
3495         * python/py-value.c (value_has_field, get_field_flag)
3496         (get_field_type, valpy_getitem, convert_value_from_python): Use
3497         gdbpy_ref.
3498
3499 2017-01-10  Tom Tromey  <tom@tromey.com>
3500
3501         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
3502         gdbpy_ref.
3503
3504 2017-01-10  Tom Tromey  <tom@tromey.com>
3505
3506         * python/py-prettyprint.c (search_pp_list)
3507         (find_pretty_printer_from_objfiles)
3508         (find_pretty_printer_from_progspace)
3509         (find_pretty_printer_from_gdb, find_pretty_printer)
3510         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
3511         gdbpy_ref.
3512
3513 2017-01-10  Tom Tromey  <tom@tromey.com>
3514
3515         * python/py-param.c (call_doc_function): Use gdbpy_ref.
3516
3517 2017-01-10  Tom Tromey  <tom@tromey.com>
3518
3519         * python/py-linetable.c (build_line_table_tuple_from_pcs)
3520         (ltpy_get_all_source_lines): Use gdbpy_ref.
3521
3522 2017-01-10  Tom Tromey  <tom@tromey.com>
3523
3524         * python/py-framefilter.c (extract_sym, extract_value)
3525         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
3526         gdbpy_ref.
3527
3528 2017-01-10  Tom Tromey  <tom@tromey.com>
3529
3530         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
3531
3532 2017-01-10  Tom Tromey  <tom@tromey.com>
3533
3534         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
3535
3536 2017-01-10  Tom Tromey  <tom@tromey.com>
3537
3538         * python/py-function.c (convert_values_to_python, fnpy_init): Use
3539         gdbpy_ref.
3540
3541 2017-01-10  Tom Tromey  <tom@tromey.com>
3542
3543         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
3544
3545 2017-01-10  Tom Tromey  <tom@tromey.com>
3546
3547         * python/py-type.c (convert_field, make_fielditem, typy_fields)
3548         (typy_range): Use gdbpy_ref.
3549
3550 2017-01-10  Tom Tromey  <tom@tromey.com>
3551
3552         * python/py-threadevent.c (create_thread_event_object): Use
3553         gdbpy_ref.
3554         * python/py-stopevent.c (create_stop_event_object): Simplify.
3555         (emit_stop_event): Use gdbpy_ref.
3556         * python/py-signalevent.c (create_signal_event_object): Use
3557         gdbpy_ref.
3558         * python/py-newobjfileevent.c (create_new_objfile_event_object)
3559         (emit_new_objfile_event, create_clear_objfiles_event_object)
3560         (emit_clear_objfiles_event): Use gdbpy_ref.
3561         * python/py-infevents.c (create_inferior_call_event_object)
3562         (create_register_changed_event_object)
3563         (create_memory_changed_event_object, emit_inferior_call_event)
3564         (emit_memory_changed_event, emit_register_changed_event): Use
3565         gdbpy_ref.
3566         * python/py-exitedevent.c (create_exited_event_object)
3567         (emit_exited_event): Use gdbpy_ref.
3568         * python/py-event.h (evpy_emit_event): Remove
3569         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
3570         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
3571         * python/py-continueevent.c (emit_continue_event): Use
3572         gdbpy_ref.
3573         * python/py-breakpoint.c (gdbpy_breakpoint_created)
3574         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
3575         gdbpy_ref.
3576         * python/py-bpevent.c (create_breakpoint_event_object): Use
3577         gdbpy_ref.
3578
3579 2017-01-10  Tom Tromey  <tom@tromey.com>
3580
3581         * python/py-ref.h: New file.
3582
3583 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
3584
3585         * cli-out.c (cli_ui_out::do_redirect): Change return type to
3586         void.
3587         * cli-out.h (cli_ui_out::do_redirect): Likewise.
3588         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
3589         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
3590         * ui-out.c (ui_out::redirect): Likewise.
3591         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
3592         * cli/cli-logging.c (set_logging_redirect): Update call site of
3593         ui_out::redirect.
3594         (handle_redirections): Likewise.
3595         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
3596         * top.c (execute_command_to_string): Likewise.
3597         * utils.c (do_ui_out_redirect_pop): Likewise.
3598
3599 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
3600
3601         * stack.c (_initialize_stack): Update "frame" command help message.
3602
3603 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
3604
3605         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
3606
3607 2017-01-06  Yao Qi  <yao.qi@linaro.org>
3608
3609         * x86-linux-nat.h: Include gdb_proc_service.h.
3610
3611 2017-01-06  Yao Qi  <yao.qi@linaro.org>
3612
3613         * ser-base.h: Include serial.h.
3614
3615 2017-01-06  Yao Qi  <yao.qi@linaro.org>
3616
3617         * ppc-linux-tdep.h: Include ppc-tdep.h.
3618
3619 2017-01-06  Yao Qi  <yao.qi@linaro.org>
3620
3621         * nat/amd64-linux-siginfo.h: Include signal.h.
3622
3623 2017-01-06  Yao Qi  <yao.qi@linaro.org>
3624
3625         * nat/aarch64-linux-hw-point.h: Include break-common.h.
3626
3627 2017-01-06  Yao Qi  <yao.qi@linaro.org>
3628
3629         * mi/mi-parse.h: Include mi-cmds.h.
3630
3631 2017-01-06  Yao Qi  <yao.qi@linaro.org>
3632
3633         * inf-loop.c: Don't include "target.h".
3634         * inf-loop.h: Include it here.
3635
3636 2017-01-06  Yao Qi  <yao.qi@linaro.org>
3637
3638         * dfp.h: Include "dboulest.h" and "expression.h".
3639
3640 2017-01-06  Yao Qi  <yao.qi@linaro.org>
3641
3642         * ax-gdb.h: Include "ax.h".
3643
3644 2017-01-06  Yao Qi  <yao.qi@linaro.org>
3645
3646         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
3647         with nat/gdb_ptrace.h.
3648
3649 2017-01-05  Yao Qi  <yao.qi@linaro.org>
3650
3651         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
3652         new line.
3653         (mips64_fbsd_sigframe_init): Likewise.
3654
3655 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
3656
3657         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
3658         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
3659
3660 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
3661
3662         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
3663         * NEWS: Mention new FreeBSD/mips native configuration.
3664         * config/mips/fbsd.mh: New file.
3665         * configure.host: Add mips*-*-freebsd*.
3666         * mips-fbsd-nat.c: New file.
3667
3668 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
3669
3670         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
3671         (ALLDEPFILES): Add mips-fbsd-tdep.c.
3672         * NEWS: Mention new FreeBSD/mips target.
3673         * configure.tgt: Add mips*-*-freebsd*.
3674         * mips-fbsd-tdep.c: New file.
3675         * mips-fbsd-tdep.h: New file.
3676
3677 2017-01-04  Yao Qi  <yao.qi@linaro.org>
3678
3679         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
3680         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
3681
3682 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
3683
3684         Update copyright year range in all GDB files.
3685
3686 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
3687
3688         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
3689
3690 For older changes see ChangeLog-2016.
3691 \f
3692 Local Variables:
3693 mode: change-log
3694 left-margin: 8
3695 fill-column: 74
3696 version-control: never
3697 coding: utf-8
3698 End: