cb3c83dacea64cfe3730b1e844a26dffa1f1dc01
[external/binutils.git] / gdb / ChangeLog
1 2017-12-06  Pedro Alves  <palves@redhat.com>
2
3         * break-catch-syscall.c (insert_catch_syscall)
4         (remove_catch_syscall): Adjust to pass reference to
5         inf_data->syscalls_counts directly via gdb::array_view.
6         * fbsd-nat.c (fbsd_set_syscall_catchpoint): Adjust to use bool
7         and gdb::array_view.
8         * linux-nat.c (linux_child_set_syscall_catchpoint): Likewise.
9         * remote.c (remote_set_syscall_catchpoint): Likewise.
10         * target-debug.h (target_debug_print_bool): New.
11         (define target_debug_print_gdb_array_view_const_int): New.
12         * target-delegates.c: Regenerate.
13         * target.h (target_ops) <to_set_syscall_catchpoint>: Use
14         gdb::array_view and bool.
15         (target_set_syscall_catchpoint): Likewise.
16
17 2017-12-06  Simon Marchi  <simon.marchi@ericsson.com>
18
19         * break-catch-syscall.c (catch_syscall_completer): Get pointers
20         to syscall group strings after building the string vector.
21
22 2017-12-06  Pedro Alves  <palves@redhat.com>
23
24         * remote.c (remote_query_supported): Don't send "xmlRegisters=" if
25         "qXfer:features:read"" is disabled.
26         (remote_write_qxfer, remote_read_qxfer, remote_search_memory):
27         Check packet_config_support instead of packet->support directly.
28
29 2017-12-05  Simon Marchi  <simon.marchi@ericsson.com>
30
31         * target-descriptions.c (struct tdesc_feature) <registers>: Use
32         tdesc_reg_up typedef.
33         (struct target_desc) <features>: Use tdesc_feature_up typedef.
34
35 2017-12-05  Simon Marchi  <simon.marchi@polymtl.ca>
36
37         * target-descriptions.c (struct tdesc_type): Use default
38         destructor.
39         <u>: Remove.
40         <accept>: Remove.
41         (struct tdesc_type_builtin): New.
42         (struct tdesc_type_vector): New.
43         (struct tdesc_type_with_fields): New.
44         (tdesc_predefined_types): Change type to tdesc_type_builtin[].
45         (tdesc_gdb_type): Remove.
46         (tdesc_register_type): Adjust.
47         (tdesc_create_vector): Create tdesc_type_vector.
48         (tdesc_create_struct): Create tdesc_type_with_fields.
49         (tdesc_set_struct_size): Change parameter type.
50         (tdesc_create_union): Create tdesc_type_with_fields.
51         (tdesc_create_flags): Likewise.
52         (tdesc_create_enum): Likewise.
53         (tdesc_add_field): Change parameter type.
54         (tdesc_add_typed_bitfield): Likewise.
55         (tdesc_add_bitfield): Likewise.
56         (tdesc_add_flag): Likewise.
57         (tdesc_add_enum_value): Likewise.
58         (print_c_tdesc) <visit>: Remove overload with tdesc_type
59         parameter, add overloads for tdesc_type_builtin,
60         tdesc_type_with_fields and tdesc_type_vector.
61         <m_printed_type>: Remove.
62         <m_printed_element_type, m_printed_type_with_fields>: Add.
63         * target-descriptions.h (tdesc_create_enum): Change return type.
64         (tdesc_add_typed_bitfield): Change parameter type.
65         (tdesc_add_enum_value): Change parameter type.
66         * xml-tdesc.c (struct tdesc_parsing_data) <current_type>: Change
67         type to tdesc_type_with_fields.
68         (tdesc_start_struct): Adjust.
69         (tdesc_start_flags): Adjust.
70         (tdesc_start_enum): Adjust.
71         (tdesc_start_field): Adjust.
72         * arch/tdesc.h (struct tdesc_type_builtin): Forward-declare.
73         (struct tdesc_type_vector): Forward-declare.
74         (struct tdesc_type_with_fields): Forward-declare.
75         (tdesc_create_struct): Change return type.
76         (tdesc_create_union): Likewise.
77         (tdesc_create_flags): Likewise.
78         (tdesc_add_field): Change parameter type.
79         (tdesc_set_struct_size): Likewise.
80         (tdesc_add_bitfield): Likewise.
81         (tdesc_add_flag): Likewise.
82         * features: Re-generate C files.
83
84 2017-12-05  Simon Marchi  <simon.marchi@polymtl.ca>
85
86         * target-descriptions.c (tdesc_arch_reg): Remove typedef.
87         (struct tdesc_arch_reg): Add constructor.
88         (DEF_VEC_O (tdesc_arch_reg)): Remove.
89         (struct tdesc_arch_data): Initialize fields.
90         <arch_regs>: Change type to std::vector.
91         (target_find_description): Adjust.
92         (tdesc_find_type): Adjust.
93         (tdesc_data_init): Call tdesc_arch_data constructor.
94         (tdesc_data_alloc): Allocate tdesc_arch_data with new.
95         (tdesc_data_cleanup): Free data with delete.
96         (tdesc_numbered_register): Adjust.
97         (tdesc_find_arch_register): Adjust.
98         (tdesc_use_registers): Adjust.
99
100 2017-12-05  Simon Marchi  <simon.marchi@polymtl.ca>
101
102         * target-descriptions.c (tdesc_type_field): Remove typedef.
103         (DEF_VEC_O (tdesc_type_field)): Remove.
104         (struct tdesc_type_field): Add constructor.
105         <name>: Change type to std::string.
106         (struct tdesc_type) <tdesc_type>: Instantiate vector if the type
107         kind uses it.
108         <~tdesc_type>: Destroy vector if the type kind uses it.
109         <u::u::fields>: Change type to std::vector.
110         (tdesc_gdb_type): Adjust.
111         (tdesc_add_field): Adjust.
112         (tdesc_add_typed_bitfield): Adjust.
113         (tdesc_add_field): Adjust.
114         (tdesc_add_enum_value): Adjust.
115         (class print_c_tdesc) <visit>: Adjust.
116
117 2017-12-05  Simon Marchi  <simon.marchi@polymtl.ca>
118
119         * target-descriptions.c (struct tdesc_type) <name>: Change type
120         to std::string.
121         <~tdesc_type>: Don't manually free name.
122         <operator==>: Adjust.
123         (tdesc_named_type): Adjust.
124         (tdesc_find_type): Adjust.
125         (tdesc_gdb_type): Adjust.
126         (class print_c_tdesc) <visit>: Adjust.
127
128 2017-12-05  Simon Marchi  <simon.marchi@polymtl.ca>
129
130         * target-descriptions.c (tdesc_type_p): Remove typedef.
131         (DEF_VEC_P (tdesc_type_p)): Remove.
132         (struct tdesc_feature) <types>: Change type to std::vector.
133         <~tdesc_feature>: Replace with default implementation.
134         <accept>: Adjust.
135         (tdesc_named_type): Adjust.
136         (tdesc_create_vector): Adjust.
137         (tdesc_create_struct): Adjust.
138         (tdesc_create_union): Adjust.
139         (tdesc_create_flags): Adjust.
140         (tdesc_create_enum): Adjust.
141
142 2017-12-05  Simon Marchi  <simon.marchi@ericsson.com>
143
144         * target-descriptions.c (struct tdesc_reg) <tdesc_reg>: Change
145         type of name_ parameter, adjust to std::string change.
146         <name, group, type>: Change type to std::string.
147         <~tdesc_reg>: Replace with default implementation.
148         <operator==>: Adjust.
149         (tdesc_find_register_early): Adjust.
150         (tdesc_register_name): Adjust.
151         (tdesc_register_type): Adjust.
152         (tdesc_register_in_reggroup_p): Adjust.
153         (class print_c_tdesc) <visit>: Adjust.
154         (class print_c_feature) <visit>: Adjust.
155         * features/arc-arcompact.c: Re-generate.
156         * features/arc-v2.c: Re-generate.
157
158 2017-12-05  Simon Marchi  <simon.marchi@ericsson.com>
159
160         * target-descriptions.c (tdesc_reg_p): Remove typedef.
161         (DEF_VEC_P (tdesc_reg_p)): Remove.
162         (struct tdesc_feature) <registers>: Change type to std::vector.
163         <~tdesc_feature>: Don't manually free registers.
164         <accept>: Adjust.
165         <operator==>: Adjust.
166         (tdesc_has_registers): Adjust.
167         (tdesc_find_register_early): Adjust.
168         (tdesc_use_registers): Adjust.
169         (tdesc_create_reg): Adjust.
170
171 2017-12-05  Simon Marchi  <simon.marchi@polymtl.ca>
172
173         * target-descriptions.c (tdesc_feature) <name>: Change type to
174         std::string.
175         <~tdesc_feature>: Don't manually free name.
176         <operator==>: Adjust.
177         (tdesc_find_feature): Adjust.
178         (tdesc_feature_name): Adjust.
179         (class print_c_tdesc) <visit_pre>: Adjust.
180         (class print_c_feature) <visit_pre>: Adjust.
181
182 2017-12-05  Simon Marchi  <simon.marchi@polymtl.ca>
183
184         * target-descriptions.c (tdesc_feature_p): Remove typedef.
185         (DEF_VEC_P (tdesc_feature_p)): Remove.
186         (struct target_desc) <features>: Change type to std::vector.
187         <~target_desc>: Replace with default implementation.
188         <accept>: Adjust.
189         <operator==>: Adjust.
190         (tdesc_has_registers): Adjust.
191         (tdesc_find_feature): Adjust.
192         (tdesc_use_registers): Adjust.
193         (tdesc_create_feature): Adjust.
194
195 2017-12-05  Simon Marchi  <simon.marchi@polymtl.ca>
196
197         * target-descriptions.c (arch_p): Remove typedef.
198         (DEF_VEC_P (arch_p)): Remove.
199         (struct target_desc) <compatible>: Change type to std::vector.
200         <~target_desc>: Don't manually free compatible.
201         (tdesc_compatible_p): Adjust.
202         (tdesc_add_compatible): Adjust.
203         (class print_c_tdesc) <visit_pre>: Adjust.
204
205 2017-12-05  Simon Marchi  <simon.marchi@polymtl.ca>
206
207         * target-descriptions.c (property_s): Remove typedef.
208         (DEF_VEC_O (property_s)): Remove.
209         (struct target_desc) <properties>: Make an std::vector.
210         <~target_desc>: Don't manually free properties.
211         (tdesc_property): Adjust.
212         (set_tdesc_property): Adjust.
213         (class print_c_tdesc) <visit_pre>: Adjust.
214
215 2017-12-05  Simon Marchi  <simon.marchi@ericsson.com>
216
217         * common/gdb_assert.h (gdb_static_assert): Redefine using
218         static_assert.
219
220 2017-12-05  Simon Marchi  <simon.marchi@ericsson.com>
221
222         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
223         unused variables.
224         (ada_is_redundant_range_encoding): Likewise.
225         * ada-varobj.c (ada_varobj_get_value_of_array_variable):
226         Likewise.
227         * alpha-tdep.c (alpha_software_single_step): Likewise.
228         * arm-tdep.c (_initialize_arm_tdep): Likewise.
229         * auto-load.c (info_auto_load_cmd): Likewise.
230         * break-catch-syscall.c (insert_catch_syscall): Likewise.
231         (remove_catch_syscall): Likewise.
232         * breakpoint.c (condition_completer): Likewise.
233         (clear_command): Likewise.
234         (update_breakpoint_locations): Likewise.
235         * btrace.c (btrace_disable): Likewise.
236         (btrace_teardown): Likewise.
237         (btrace_maint_update_pt_packets): Likewise.
238         (maint_btrace_clear_cmd): Likewise.
239         * cli/cli-decode.c (lookup_cmd_1): Likewise.
240         (lookup_cmd_composition): Likewise.
241         * cli/cli-dump.c (scan_filename): Likewise.
242         (restore_command): Likewise.
243         * compile/compile-loc2c.c (compute_stack_depth): Likewise.
244         * compile/compile-object-load.c (compile_object_load): Likewise.
245         * compile/compile-object-run.c (compile_object_run): Likewise.
246         * compile/compile.c (compile_to_object): Likewise.
247         * completer.c (filename_completer): Likewise.
248         (complete_files_symbols): Likewise.
249         (complete_expression): Likewise.
250         * corelow.c (core_open): Likewise.
251         * ctf.c (ctf_start): Likewise.
252         (ctf_write_status): Likewise.
253         (ctf_write_uploaded_tsv): Likewise.
254         (ctf_write_definition_end): Likewise.
255         (ctf_open_dir): Likewise.
256         (ctf_xfer_partial): Likewise.
257         (ctf_trace_find): Likewise.
258         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
259         Likewise.
260         * dwarf2loc.c (allocate_piece_closure): Likewise.
261         (indirect_pieced_value): Likewise.
262         (dwarf2_evaluate_loc_desc_full): Likewise.
263         * dwarf2read.c (dw2_expand_marked_cus): Likewise.
264         (dw2_expand_symtabs_matching): Likewise.
265         (dw2_map_symbol_filenames): Likewise.
266         (read_and_check_comp_unit_head): Likewise.
267         (read_cutu_die_from_dwo): Likewise.
268         (lookup_dwo_unit): Likewise.
269         (read_comp_units_from_section): Likewise.
270         (dwarf2_compute_name): Likewise.
271         (handle_DW_AT_stmt_list): Likewise.
272         (create_cus_hash_table): Likewise.
273         (create_dwp_v2_section): Likewise.
274         (dwarf2_rnglists_process): Likewise.
275         (dwarf2_ranges_process): Likewise.
276         (dwarf2_record_block_ranges): Likewise.
277         (is_vtable_name): Likewise.
278         (read_formatted_entries): Likewise.
279         (skip_form_bytes): Likewise.
280         * elfread.c (elf_symtab_read): Likewise.
281         * exec.c (exec_file_command): Likewise.
282         * f-valprint.c (f_val_print): Likewise.
283         (info_common_command_for_block): Likewise.
284         * guile/guile.c (initialize_scheme_side): Likewise.
285         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Likewise.
286         * guile/scm-cmd.c (cmdscm_completer): Likewise.
287         (gdbscm_register_command_x): Likewise.
288         * guile/scm-frame.c (gdbscm_frame_read_var): Likewise.
289         * guile/scm-param.c (gdbscm_parameter_value): Likewise.
290         * guile/scm-ports.c (file_port_magic): Likewise.
291         * guile/scm-pretty-print.c (ppscm_search_pp_list): Likewise.
292         (ppscm_pretty_print_one_value): Likewise.
293         (ppscm_print_children): Likewise.
294         * guile/scm-string.c (gdbscm_string_to_argv): Likewise.
295         * guile/scm-symtab.c (gdbscm_sal_symtab): Likewise.
296         * guile/scm-type.c (gdbscm_type_next_field_x): Likewise.
297         * guile/scm-utils.c (gdbscm_parse_function_args): Likewise.
298         * i386-tdep.c (i386_register_reggroup_p): Likewise.
299         * infcmd.c (run_command_1): Likewise.
300         (until_next_fsm_clean_up): Likewise.
301         * linespec.c (linespec_complete): Likewise.
302         (find_label_symbols): Likewise.
303         * m2-valprint.c (m2_val_print): Likewise.
304         * memattr.c (require_user_regions): Likewise.
305         (lookup_mem_region): Likewise.
306         (disable_mem_command): Likewise.
307         (mem_delete): Likewise.
308         * mep-tdep.c (mep_register_name): Likewise.
309         (mep_analyze_prologue): Likewise.
310         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Likewise.
311         * mi/mi-interp.c (mi_on_sync_execution_done): Likewise.
312         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
313         * microblaze-linux-tdep.c (microblaze_linux_init_abi): Likewise.
314         * minidebug.c (lzma_open): Likewise.
315         * minsyms.c (lookup_minimal_symbol): Likewise.
316         * mips-linux-tdep.c (mips64_fill_fpregset): Likewise.
317         * mips-tdep.c (mips_stub_frame_sniffer): Likewise.
318         (mips_o64_return_value): Likewise.
319         (mips_single_step_through_delay): Likewise.
320         (_initialize_mips_tdep): Likewise.
321         * nios2-tdep.c (nios2_push_dummy_call): Likewise.
322         (nios2_software_single_step): Likewise.
323         * parse.c (find_minsym_type_and_address): Likewise.
324         * psymtab.c (psym_relocate): Likewise.
325         * python/py-breakpoint.c (bppy_get_commands): Likewise.
326         (gdbpy_breakpoint_modified): Likewise.
327         * python/py-infevents.c (create_inferior_call_event_object):
328         Likewise.
329         * python/py-record-btrace.c (btpy_list_item): Likewise.
330         * python/py-type.c (typy_str): Likewise.
331         * python/py-value.c (valpy_call): Likewise.
332         * python/python.c (do_start_initialization): Likewise.
333         * record-btrace.c (record_btrace_insn_history_range): Likewise.
334         (record_btrace_call_history_range): Likewise.
335         (record_btrace_record_method): Likewise.
336         (record_btrace_xfer_partial): Likewise.
337         (btrace_get_frame_function): Likewise.
338         * record-full.c (record_full_open): Likewise.
339         * record.c (get_context_size): Likewise.
340         * registry.h (DEFINE_REGISTRY): Likewise.
341         * remote-fileio.c (remote_fileio_request): Likewise.
342         * remote.c (remote_update_thread_list): Likewise.
343         (remote_check_symbols): Likewise.
344         (remote_commit_resume): Likewise.
345         (remote_interrupt): Likewise.
346         (remote_insert_breakpoint): Likewise.
347         (compare_sections_command): Likewise.
348         * rust-exp.y (super_name): Likewise.
349         (lex_string): Likewise.
350         (convert_ast_to_type): Likewise.
351         (convert_ast_to_expression): Likewise.
352         * rust-lang.c (rust_print_struct_def): Likewise.
353         (rust_print_type): Likewise.
354         (rust_evaluate_subexp): Likewise.
355         * rx-tdep.c (rx_register_type): Likewise.
356         * ser-event.c (serial_event_clear): Likewise.
357         * serial.c (serial_open): Likewise.
358         * spu-tdep.c (spu_overlay_new_objfile): Likewise.
359         * symfile.c (section_is_overlay): Likewise.
360         (overlay_unmapped_address): Likewise.
361         (overlay_mapped_address): Likewise.
362         (simple_overlay_update_1): Likewise.
363         (simple_overlay_update): Likewise.
364         * symtab.c (symbol_find_demangled_name): Likewise.
365         (search_symbols): Likewise.
366         * target-descriptions.c (tdesc_predefined_type): Likewise.
367         * target.c (target_commit_resume): Likewise.
368         * thread.c (print_selected_thread_frame): Likewise.
369         * top.c (new_ui_command): Likewise.
370         (gdb_readline_no_editing): Likewise.
371         * tracefile-tfile.c (tfile_open): Likewise.
372         * tracepoint.c (create_tsv_from_upload): Likewise.
373         * utils.c (quit): Likewise.
374         (defaulted_query): Likewise.
375         * valarith.c (value_concat): Likewise.
376         * xml-syscall.c (xml_list_syscalls_by_group): Likewise.
377         * xml-tdesc.c (target_fetch_description_xml): Likewise.
378         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
379         (xtensa_pseudo_register_write): Likewise.
380
381 2017-12-04  Tom Tromey  <tom@tromey.com>
382
383         * NEWS: Mention Rust trait object inspection.
384
385 2017-12-04  Pedro Alves  <palves@redhat.com>
386
387         PR gdb/22499
388         * amd64-tdep.c (amd64_insn::rex_offset): Rename to...
389         (amd64_insn::enc_prefix_offset): ... this, and tweak comment.
390         (vex2_prefix_p, vex3_prefix_p): New functions.
391         (amd64_get_insn_details): Adjust to rename.  Also skip VEX2 and
392         VEX3 prefixes.
393         (fixup_riprel): Set VEX3.!B.
394
395 2017-12-03  Simon Marchi  <simon.marchi@ericsson.com>
396
397         * target.h (mem_region_vector): Remove.
398         (struct target_ops) <to_memory_map>: Change return type to
399         std::vector<mem_region>.
400         * target-debug.h (target_debug_print_mem_region_vector): Rename
401         to ...
402         (target_debug_print_std_vector_mem_region): ... this.
403         * target-delegates.c: Re-generate.
404
405 2017-12-03  Pedro Alves  <palves@redhat.com>
406
407         * make-target-delegates (munge_type): Also munge '<', '>', and
408         ':'.  Avoid double underscores in identifiers, and trailing
409         underscores.
410         * target-debug.h
411         (target_debug_print_VEC_static_tracepoint_marker_p__p): Rename to
412         ...
413         (target_debug_print_VEC_static_tracepoint_marker_p_p): ... this.
414         * target-delegates.c: Regenerate.
415
416 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
417
418         * common/poison.h (XDELETE): Fix typo.
419
420 2017-12-01  Andrew Cagney  <cagney@redhat.com>
421             Joel Brobecker  <brobecker@adacore.com>
422             Sergio Durigan Junior  <sergiodj@redhat.com>
423
424         * NEWS (Changes since GDB 8.0: Mention new '--readnever'
425         feature.
426         * coffread.c (coff_symfile_read): Do not map over sections with
427         'coff_locate_sections' if readnever is on.
428         * dwarf2read.c (dwarf2_has_info): Return 0 if
429         readnever is on.
430         * elfread.c (elf_symfile_read): Do not map over sections with
431         'elf_locate_sections' if readnever is on.
432         * main.c (validate_readnow_readnever): New function.
433         (captured_main_1): Add support for --readnever.
434         (print_gdb_help): Document --readnever.
435         * objfile-flags.h (enum objfile_flag) <OBJF_READNEVER>: New
436         flag.
437         * symfile.c (readnever_symbol_files): New global.
438         (symbol_file_add_with_addrs): Set 'OBJF_READNEVER' when
439         'READNEVER_SYMBOL_FILES' is set.
440         (validate_readnow_readnever): New function.
441         (symbol_file_command): Handle '-readnever' option.
442         Call 'validate_readnow_readnever'.
443         (add_symbol_file_command): Handle '-readnever' option.
444         Call 'validate_readnow_readnever'.
445         (_initialize_symfile): Document new '-readnever' option for
446         both 'symbol-file' and 'add-symbol-file' commands.
447         * top.h (readnever_symbol_files): New extern global.
448         * xcoffread.c (xcoff_initial_scan): Do not read debug
449         information if readnever is on.
450
451 2017-12-01  Sergio Durigan Junior  <sergiodj@redhat.com>
452
453         * symfile.c (symbol_file_command): Call
454         'symbol_file_add_main_1' only after processing all command
455         line options.
456         (add_symbol_file_command): Modify logic to make arguments
457         position-independent.
458
459 2017-12-01  Joel Brobecker  <brobecker@adacore.com>
460
461         * ada-lang.c (symbol_list_obstack): Delete.
462         (resolve_subexp): Make sure "candidates" gets xfree'ed.
463         (ada_lookup_symbol_list_worker): Remove the limitation that
464         the result is only good until the next call, now making it
465         the responsibility of the caller to free the result when no
466         longer needed.  Adjust the function's intro comment accordingly.
467         (ada_lookup_symbol_list): Adjust the function's intro comment.
468         (ada_iterate_over_symbols): Make sure "results" gets xfree'ed.
469         (ada_lookup_encoded_symbol, get_var_value): Likewise.
470         (_initialize_ada_language): Remove symbol_list_obstack
471         initialization.
472         * ada-exp.y (block_lookup): Make sure "syms" gets xfree'ed.
473         (write_var_or_type, write_name_assoc): Likewise.
474
475 2017-12-01  Tom Tromey  <tom@tromey.com>
476
477         * Makefile.in (all_deps_files): New variable.
478         Include .Po files using all_deps_files.
479
480 2017-12-01  Joel Brobecker  <brobecker@adacore.com>
481
482         * MAINTAINERS: Update list of maintainers, moving those who
483         stepped down or became inactive to the "Past Maintainers"
484         section.
485
486 2017-11-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
487
488         * configure.ac Don't check for sys/fault.h, sys/syscall.h,
489         sys/proc.h.
490         (NEW_PROC_API): Remove.
491         (prsysent_t, pr_sigset_t, pr_sigaction64_t, pr_siginfo64_t):
492         Likewise.
493         * common/common.m4 (GDB_AC_COMMON): Don't check for sys/syscall.h.
494         * configure: Regenerate.
495         * config.in: Regenerate.
496         * gdbserver/configure: Regenerate.
497         * gdbserver/config.in: Regenerate.
498
499         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Remove
500         NEW_PROC_API test.
501         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Likewise.
502
503         * linux-btrace.c: Remove HAVE_SYS_SYSCALL_H test.
504
505         * proc-api.c: Remove !NEW_PROC_API support.
506         Remove HAVE_SYS_PROC_H and HAVE_SYS_USER_H tests.
507         Remove tests for macros always defined on Solaris.
508         * proc-events.c: Remove !NEW_PROC_API support.
509         Remove Remove HAVE_SYS_SYSCALL_H, HAVE_SYS_PROC_H and
510         HAVE_SYS_USER_H tests.
511         (init_syscall_table): Remove non-Solaris syscalls.
512         Remove tests for syscalls present on all Solaris versions.
513         Add missing Solaris 10+ syscalls.
514         (signal_table): Remove non-Solaris signals.
515         Remove tests for signals present on all Solaris versions.
516         (fault_table): Remove non-Solaris faults.
517         Remove tests for faults present on all Solaris versions.
518         * proc-flags.c: Remove !NEW_PROC_API support.
519         (pr_flag_table): Remove non-Solaris and pre-Solaris 7 comments.
520         Remove non-Solaris flags.
521         * proc-why.c: Remove !NEW_PROC_API support.
522         (pr_why_table): Remove meaningless comments.
523         Remove tests for reasons present on all Solaris versions.
524         Remove OSF/1 cases.
525         (proc_prettyfprint_why): Likewise.
526
527         * procfs.c: Remove !NEW_PROC_API and DYNAMIC_SYSCALLS support.
528         Remove HAVE_SYS_FAULT_H and HAVE_SYS_SYSCALL_H tests.
529         Remove WA_READ test, IRIX watchpoint support.
530         (gdb_sigset_t, gdb_sigaction_t, gdb_siginfo_t): Replace by base
531         types.  Change users.
532         (gdb_praddset, gdb_prdelset, gdb_premptysysset, gdb_praddsysset)
533         (gdb_prdelset, gdb_pr_issyssetmember): Replace by base macros.
534         Change callers.
535         Remove CTL_PROC_NAME_FMT tests.
536         (gdb_prstatus_t, gdb_lwpstatus_t): Replace by base types.  Change
537         users.
538         (sysset_t_size): Remove.  Use sizeof (sysset_t) in callers.
539         Remove PROCFS_DONT_PIOCSSIG_CURSIG support.
540         (proc_modify_flag): Replace GDBRESET by PCUNSET.
541         Remove PR_ASYNC, PR_KLC tests.
542         (proc_unset_inherit_on_fork): Remove PR_ASYNC test.
543         (proc_parent_pid): Remove PCWATCH etc. tests.
544         (proc_set_watchpoint): Remove !PCWATCH && !PIOCSWATCH support.
545         Remove PCAGENT test.
546         (proc_get_nthreads) [PIOCNTHR && PIOCTLIST]: Remove.
547         Remove SYS_lwpcreate || SYS_lwp_create test.
548         (proc_get_current_thread): Likewise.
549         [PIOCNTHR && PIOCTLIST]: Remove.
550         [PIOCLSTATUS]: Remove.
551         (procfs_debug_inferior): Remove non-Solaris cases, conditionals.
552         [PRFS_STOPEXEC]: Remove.
553         (syscall_is_lwp_exit): Remove non-Solaris cases, conditionals.
554         (syscall_is_exit): Likewise.
555         (syscall_is_exec): Likewise.
556         (syscall_is_lwp_create): Likewise.
557         Remove SYS_syssgi support.
558         (procfs_wait): Remove PR_ASYNC, !PIOCSSPCACT tests.
559         [SYS_syssgi]: Remove.
560         Remove non-Solaris cases, conditionals.
561         (unconditionally_kill_inferior) [PROCFS_NEED_PIOCSSIG_FOR_KILL]:
562         Remove.
563         (procfs_init_inferior) [SYS_syssgi]: Remove.
564         (procfs_set_exec_trap) [PRFS_STOPEXEC]: Remove.
565         (procfs_inferior_created) [SYS_syssgi]: Remove.
566         (procfs_set_watchpoint): Remove !AIX5 test.
567         (procfs_stopped_by_watchpoint): Remove FLTWATCH test, FLTKWATCH
568         case.
569         (mappingflags) [MA_PHYS]: Remove.
570         (info_mappings_callback): Remove PCAGENT test.
571         Remove PIOCOPENLWP || PCAGENT test.
572
573 2017-11-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
574
575         * sol-thread.c (info_solthreads): Constify args.
576         Cast args to void *.
577
578 2017-11-29  John Baldwin  <jhb@FreeBSD.org>
579
580         * target-float.c [HAVE_LIBMPFR]: Define MPFR_USE_INTMAX_T.
581
582 2017-11-29  Joel Brobecker  <brobecker@adacore.com>
583
584         * ada-lang.c (to_fixed_range_type): Make sure that the size
585         of the range type being returned is the same as the size
586         of the range type being fixed.
587
588 2017-11-29  Pedro Alves  <palves@redhat.com>
589
590         PR c++/19436
591         * NEWS: Mention setting breakpoints on functions with C++ ABI
592         tags.
593         * completer.h (completion_match_for_lcd) <match,
594         mark_ignored_range>: New methods.
595         <finish>: Consider ignored ranges.
596         <clear>: Clear ignored ranges.
597         <m_ignored_ranges, m_finished_storage>: New fields.
598         * cp-support.c (cp_search_name_hash): Ignore ABI tags.
599         (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
600         completion_match_for_lcd pointer to strncmp_iw_with_mode.
601         (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
602         * language.c (default_symbol_name_matcher): Pass the
603         completion_match_for_lcd pointer to strncmp_iw_with_mode.
604         * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
605         * utils.c (skip_abi_tag): New function.
606         (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
607         Handle ABI tags.
608         * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
609         parameter.
610
611 2017-11-29  Pedro Alves  <palves@redhat.com>
612
613         PR c++/19436
614         * NEWS: Mention setting breakpoints on functions with C++ ABI
615         tags.
616         * completer.h (completion_match_for_lcd) <match,
617         mark_ignored_range>: New methods.
618         <finish>: Consider ignored ranges.
619         <clear>: Clear ignored ranges.
620         <m_ignored_ranges, m_finished_storage>: New fields.
621         * cp-support.c (cp_search_name_hash): Ignore ABI tags.
622         (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
623         completion_match_for_lcd pointer to strncmp_iw_with_mode.
624         (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
625         * language.c (default_symbol_name_matcher): Pass the
626         completion_match_for_lcd pointer to strncmp_iw_with_mode.
627         * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
628         * utils.c (skip_abi_tag): New function.
629         (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
630         Handle ABI tags.
631         * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
632         parameter.
633
634 2017-11-29  Pedro Alves  <palves@redhat.com>
635
636         * NEWS: Mention that breakpoints on C++ functions are now set on
637         on all namespaces/classes by default, and mention "break
638         -qualified".
639         * ax-gdb.c (agent_command_1): Adjust to pass a
640         symbol_name_match_type to new_linespec_location.
641         * breakpoint.c (parse_breakpoint_sals): Adjust to
642         get_linespec_location's return type change.
643         (strace_marker_create_sals_from_location): Adjust to pass a
644         symbol_name_match_type to new_linespec_location.
645         (strace_marker_decode_location): Adjust to get_linespec_location's
646         return type change.
647         (strace_command): Adjust to pass a symbol_name_match_type to
648         new_linespec_location.
649         (LOCATION_HELP_STRING): Add paragraph about wildmatching, and
650         mention "-qualified".
651         * c-lang.c (cplus_language_defn): Install cp_search_name_hash.
652         * completer.c (explicit_location_match_type::MATCH_QUALIFIED): New
653         enumerator.
654         (complete_address_and_linespec_locations): New parameter
655         'match_type'.  Pass it down.
656         (explicit_options): Add "-qualified".
657         (collect_explicit_location_matches): Pass the requested match type
658         to the linespec completers.  Handle MATCH_QUALIFIED.
659         (location_completer): Handle "-qualified" combined with linespecs.
660         * cp-support.c (cp_search_name_hash): New.
661         (cp_symbol_name_matches_1): Implement wild matching for C++.
662         (cp_fq_symbol_name_matches): Reimplement.
663         (cp_get_symbol_name_matcher): Return different matchers depending
664         on the lookup name's match type.
665         (selftests::test_cp_symbol_name_matches): Add wild matching tests.
666         * cp-support.h (cp_search_name_hash): New declaration.
667         * dwarf2read.c
668         (selftests::dw2_expand_symtabs_matching::test_symbols): Add
669         symbols.
670         (test_dw2_expand_symtabs_matching_symbol): Add wild matching
671         tests.
672         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Adjust to
673         pass a symbol_name_match_type to new_linespec_location.
674         * linespec.c (linespec_parse_basic): Lookup function symbols using
675         the parser's symbol name match type.
676         (convert_explicit_location_to_linespec): New
677         symbol_name_match_type parameter.  Pass it down to
678         find_linespec_symbols.
679         (convert_explicit_location_to_sals): Pass the location's name
680         match type to convert_explicit_location_to_linespec.
681         (parse_linespec): New match_type parameter.  Save it in the
682         parser.
683         (linespec_parser_new): Default to symbol_name_match_type::WILD.
684         (linespec_complete_function): New symbol_name_match_type
685         parameter.  Use it.
686         (complete_linespec_component): Pass down the parser's recorded
687         name match type.
688         (linespec_complete_label): New symbol_name_match_type parameter.
689         Use it.
690         (linespec_complete): New symbol_name_match_type parameter.  Save
691         it in the parser and pass it down.  Adjust to
692         get_linespec_location's prototype change.
693         (find_function_symbols, find_linespec_symbols): New
694         symbol_name_match_type parameter.  Pass it down instead of
695         assuming symbol_name_match_type::WILD.
696         * linespec.h (linespec_complete, linespec_complete_function)
697         (linespec_complete_label): New symbol_name_match_type parameter.
698         * location.c (event_location::linespec_location): Now a struct
699         linespec_location.
700         (EL_LINESPEC): Adjust.
701         (initialize_explicit_location): Default to
702         symbol_name_match_type::WILD.
703         (new_linespec_location): New symbol_name_match_type parameter.
704         Record it in the location.
705         (get_linespec_location): Now returns a struct linespec_location.
706         (new_explicit_location): Also copy func_name_match_type.
707         (explicit_to_string_internal)
708         (string_to_explicit_location): Handle "-qualified".
709         (copy_event_location): Adjust to LINESPEC_LOCATION type change.
710         Copy symbol_name_match_type fields.
711         (event_location_deleter::operator()): Adjust to LINESPEC_LOCATION
712         type change.
713         (event_location_to_string): Adjust to LINESPEC_LOCATION type
714         change.  Handle "-qualfied".
715         (string_to_explicit_location): Handle "-qualified".
716         (string_to_event_location_basic): New symbol_name_match_type
717         parameter.  Pass it down.
718         (string_to_event_location): Handle "-qualified".
719         * location.h (struct linespec_location): New.
720         (explicit_location::func_name_match_type): New field.
721         (new_linespec_location): Now returns a const linespec_location *.
722         (string_to_event_location_basic): New symbol_name_match_type
723         parameter.
724         (explicit_completion_info::saw_explicit_location_option): New
725         field.
726         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Adjust to pass a
727         symbol_name_match_type to new_linespec_location.
728         * python/py-breakpoint.c (bppy_init): Likewise.
729         * python/python.c (gdbpy_decode_line): Likewise.
730
731 2017-11-29  Pedro Alves  <palves@redhat.com>
732
733         * ada-lang.c (ada_lookup_name_info::matches): Change type of
734         parameter from completion_match to completion_match_result.
735         Adjust.
736         (do_wild_match, do_full_match, ada_symbol_name_matches): Likewise.
737         * completer.c (completion_tracker::maybe_add_completion): Add
738         match_for_lcd parameter and use it.
739         (completion_tracker::add_completion): Likewise.
740         * completer.h (class completion_match_for_lcd): New class.
741         (completion_match_result::match_for_lcd): New field.
742         (completion_match_result::set_match): New method.
743         (completion_tracker): Add comments.
744         (completion_tracker::add_completion): Add match_for_lcd parameter.
745         (completion_tracker::reset_completion_match_result): Reset
746         match_for_lcd too.
747         (completion_tracker::maybe_add_completion): Add match_for_lcd
748         parameter.
749         (completion_tracker::m_lowest_common_denominator_unique): Extend
750         comments.
751         * cp-support.c (cp_symbol_name_matches_1)
752         (cp_fq_symbol_name_matches): Change type of parameter from
753         completion_match to completion_match_result.  Adjust.
754         * language.c (default_symbol_name_matcher): Change type of
755         parameter from completion_match to completion_match_result.
756         Adjust.
757         * language.h (completion_match_for_lcd): Forward declare.
758         (default_symbol_name_matcher): Change type of parameter from
759         completion_match to completion_match_result.
760         * symtab.c (compare_symbol_name): Adjust.
761         (completion_list_add_name): Pass the match_for_lcd to the tracker.
762         * symtab.h (ada_lookup_name_info::matches): Change type of
763         parameter from completion_match to completion_match_result.
764         (symbol_name_matcher_ftype): Likewise, and update comments.
765
766 2017-11-29  Pedro Alves  <palves@redhat.com>
767
768         * linespec.c (minsym_found, add_minsym): Use msymbol_is_function.
769         * minsyms.c (msymbol_is_text): Delete.
770         (msymbol_is_function): New function.
771         * minsyms.h (msymbol_is_text): Delete.
772         (msymbol_is_function): New declaration.
773         * symtab.c (find_function_alias_target): Use msymbol_is_function.
774
775 2017-11-29  Tom Tromey  <tom@tromey.com>
776
777         * Makefile.in (distclean): Handle the case where rmdir fails.
778
779 2017-11-29  Tom Tromey  <tom@tromey.com>
780
781         * symfile.c (_initialize_symfile): Update usage text for
782         add-symbol-file, symbol-file, load.
783
784 2017-11-29  Tom Tromey  <tom@tromey.com>
785
786         * symfile.c (add_symbol_file_command): Error if some arguments to
787         -s are missing.  Change unrecognized-argument error message.
788         (_initialize_symfile): Fix usage text for add-symbol-file.
789
790 2017-11-27  Tom Tromey  <tom@tromey.com>
791
792         * Makefile.in (REMOTE_OBS): Remove.
793         (SFILES): Remove remote sources.
794         (COMMON_SFILES): Add remote sources.
795         (ALLDEPFILES): Remove dcache.c.
796
797 2017-11-27  Tom Tromey  <tom@tromey.com>
798
799         * Makefile.in (SUBDIR_TARGET_SRCS, SUBDIR_TARGET_OBS): New
800         variables.
801         (SFILES): Use SUBDIR_TARGET_SRCS.
802         (COMMON_OBS): Use SUBDIR_TARGET_OBS.  Remove waitstatus.o.
803         (CONFIG_SRC_SUBDIR): Add target.
804         (%.o): Remove target rule.
805
806 2017-11-27  Tom Tromey  <tom@tromey.com>
807
808         * Makefile.in (COMMON_OBS): Remove filename-seen-cache.o,
809         registry.o, thread-fsm.o, debug.o.
810         (COMMON_SFILES): Add filename-seen-cache.c, registry.c,
811         thread-fsm.c, debug.c.
812
813 2017-11-27  Tom Tromey  <tom@tromey.com>
814
815         * Makefile.in (COMMON_SFILES): New.
816         (SFILES): Move some entries to COMMON_SFILES.
817         (COMMON_OBS): Use COMMON_SFILES.
818
819 2017-11-27  Tom Tromey  <tom@tromey.com>
820
821         * Makefile.in (YYFILES): Update comment.
822         (YYOBJ): Redefine.
823
824 2017-11-27  Tom Tromey  <tom@tromey.com>
825
826         * Makefile.in (SUBDIR_PYTHON_OBS): Redefine.
827         (CONFIG_SRC_SUBDIR): Add python.
828         (%.o): Remove python rule.
829         (python/%.o): New rule.
830         * configure: Rebuild.
831         * configure.ac (CONFIG_OBS): Refer to python/python.o
832
833 2017-11-27  Tom Tromey  <tom@tromey.com>
834
835         * configure: Rebuild.
836         * configure.ac (CONFIG_OBS): Refer to guile/guile.o.
837         * Makefile.in (SUBDIR_GUILE_OBS): Redefine.
838         (CONFIG_SRC_SUBDIR): Add guile.
839         (%.o): Remove guile rule.
840
841 2017-11-27  Tom Tromey  <tom@tromey.com>
842
843         * Makefile.in (SUBDIR_UNITTESTS_OBS): Redefine.
844         (%.o): Remove unittests rule.
845         (CONFIG_SRC_SUBDIR): Add unittests.
846
847 2017-11-27  Tom Tromey  <tom@tromey.com>
848
849         * Makefile.in (SUBDIR_TUI_OBS): Redefine.
850         (CONFIG_SRC_SUBDIR): Add tui.
851         (%.o): Remove tui rule.
852
853 2017-11-27  Tom Tromey  <tom@tromey.com>
854
855         * Makefile.in (SUBDIR_GCC_COMPILE_OBS): Redefine.
856         (%.o): Remove compile rule.
857         (CONFIG_SRC_SUBDIR): Add compile.
858
859 2017-11-27  Tom Tromey  <tom@tromey.com>
860
861         * Makefile.in (SUBDIR_MI_OBS): Redefine.
862         (%.o): Remove mi rule.
863         (CONFIG_SRC_SUBDIR): Add mi.
864         (COMMON_OBS): Use mi/mi-common.o
865
866 2017-11-27  Tom Tromey  <tom@tromey.com>
867
868         * Makefile.in (SUBDIR_CLI_OBS): Redefine.
869         (%.o): Remove cli rule.
870         (CONFIG_SRC_SUBDIR): Add cli.
871
872 2017-11-27  Tom Tromey  <tom@tromey.com>
873
874         * configure.ac (CONFIG_SRC_SUBDIR): Don't subst.
875         * configure: Rebuild.
876         * Makefile.in (CONFIG_SRC_SUBDIR): Redefine.
877         (CONFIG_DEP_SUBDIR): New variable.
878         (%.o): Add order-only dependency.
879         ($(CONFIG_DEP_SUBDIR)): New target.
880
881 2017-11-26  Dominik Czarnota  <dominik.b.czarnota@gmail.com>
882
883         PR gdb/21945
884         * findcmd.c (_initialize_mem_search): Update find command help
885         text.
886
887 2017-11-26  Simon Marchi  <simon.marchi@polymtl.ca>
888
889         * python/python.c (do_start_initialization): Change progname
890         type to gdb::unique_xmalloc_ptr.  Release the pointer when using
891         Python 2.
892
893 2017-11-26  Tom Tromey  <tom@tromey.com>
894
895         * common/format.h: Add include guards.
896
897 2017-11-26  Tom Tromey  <tom@tromey.com>
898
899         * nat/linux-personality.h (class
900         maybe_disable_address_space_randomization): New class.
901         (maybe_disable_address_space_randomization): Don't declare
902         function.
903         * nat/linux-personality.c (restore_personality)
904         (make_disable_asr_cleanup): Remove.
905         (maybe_disable_address_space_randomization): Now a constructor.
906         (~maybe_disable_address_space_randomization): New destructor.
907         * linux-nat.c (linux_nat_create_inferior): Update.
908
909 2017-11-26  Tom Tromey  <tom@tromey.com>
910
911         * gcore.c (write_gcore_file_1): Use gdb::unique_xmalloc_ptr.
912
913 2017-11-26  Ulrich Weigand  <uweigand@de.ibm.com>
914
915         * spu-tdep.c (spu_software_single_step): Access SPU_LSLR_REGNUM as
916         "cooked" register.  Access only first four bytes of branch target
917         registers.
918
919 2017-11-25  Sergio Durigan Junior  <sergiodj@redhat.com>
920
921         PR gdb/22491
922         * stap-probe.c (relocate_address): New function.
923         (stap_probe::get_relocated_address): Use 'relocate_address'.
924         (stap_probe::set_semaphore): Use 'relocate_address' and pass
925         'm_sem_addr'.
926         (stap_probe::clear_semaphore): Likewise.
927
928 2017-11-25  Pedro Alves  <palves@redhat.com>
929
930         * dictionary.c: Include "safe-ctype.h".
931         * minsyms.c: Include "safe-ctype.h".
932         * minsyms.c (SYMBOL_HASH_NEXT): Use TOLOWER instead of tolower.
933
934 2017-11-25   Pedro Alves  <palves@redhat.com>
935
936         * completer.c (complete_line_internal_1): Skip spaces until the
937         start of the command.
938
939 2017-11-24  Pedro Alves  <palves@redhat.com>
940
941         * cp-support.c (cp_symbol_name_matches_1): New, factored out from
942         cp_fq_symbol_name_matches.  Pass language_cplus to
943         strncmp_with_mode.
944         (cp_fq_symbol_name_matches): Call cp_symbol_name_matches_1.
945         (selftests::test_cp_symbol_name_cmp): New.
946         (_initialize_cp_support): Register "cp_symbol_name_matches"
947         selftests.
948         * language.c (default_symbol_name_matcher): Pass language_minimal
949         to strncmp_iw_with_mode.
950         * utils.c: Include "cp-support.h" and <algorithm>.
951         (valid_identifier_name_char, cp_skip_operator_token, skip_ws)
952         (cp_is_operator): New functions.
953         (strncmp_iw_with_mode): Use them.  Add language parameter.  Don't
954         skip whitespace in the symbol name when the lookup name doesn't
955         have spaces, and vice versa.
956         (strncmp_iw, strcmp_iw): Pass language to strncmp_iw_with_mode.
957         * utils.h (strncmp_iw_with_mode): Add language parameter.
958
959 2017-11-24  Joel Brobecker  <brobecker@adacore.com>
960
961         * ada-lang.c (ada_exception_message_1, ada_exception_message):
962         New functions.
963         (print_it_exception): If available, display the exception
964         message as well.
965         * NEWS: Document new feature.
966
967 2017-11-24  Ulrich Weigand  <uweigand@de.ibm.com>
968
969         * configure.nat <spu-linux>: Add fork-inferior.o to NATDEPFILES.
970
971 2017-11-24  Philipp Rudo  <prudo@linux.vnet.ibm.com>
972
973         * dtrace-probe.c (dtrace_probe::build_arg_exprs)
974         (dtrace_probe::is_enabled, dtrace_probe::enable)
975         (dtrace_probe::disable): Remove keyword 'struct' at for-range
976         variable
977         * probe.c (gen_ui_out_table_header_info)
978         (print_ui_out_not_applicables):  Remove keyword 'struct' at
979         for-range variable
980
981 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
982
983         * configure.tgt: Add arch/aarch64.o
984
985 2017-11-24  Simon Marchi  <simon.marchi@polymtl.ca>
986
987         * common/common-utils.h: Include poison.h.
988         (xfree): Remove declaration, add definition with static_assert.
989         * common/common-utils.c (xfree): Remove.
990         * common/poison.h (IsMallocatable): Define.
991         (IsFreeable): Define.
992         (free): Delete for non-freeable types.
993         (xnew): New.
994         (XNEW): Undef and redefine.
995         (xcnew): New.
996         (XCNEW): Undef and redefine.
997         (xdelete): New.
998         (XDELETE): Undef and redefine.
999         (xnewvec): New.
1000         (XNEWVEC): Undef and redefine.
1001         (xcnewvec): New.
1002         (XCNEWVEC): Undef and redefine.
1003         (xresizevec): New.
1004         (XRESIZEVEC): Undef and redefine.
1005         (xdeletevec): New.
1006         (XDELETEVEC): Undef and redefine.
1007         (xnewvar): New.
1008         (XNEWVAR): Undef and redefine.
1009         (xcnewvar): New.
1010         (XCNEWVAR): Undef and redefine.
1011         (xresizevar): New.
1012         (XRESIZEVAR): Undef and redefine.
1013
1014 2017-11-24  Simon Marchi  <simon.marchi@polymtl.ca>
1015
1016         * gdbthread.h (private_thread_info): Define structure type, add
1017         virtual pure destructor.
1018         (thread_info) <priv>: Change type to unique_ptr.
1019         <private_dtor>: Remove.
1020         * thread.c (add_thread_with_info): Adjust to use of unique_ptr.
1021         (private_thread_info::~private_thread_info): Provide default
1022         implementation.
1023         (thread_info::~thread_info): Don't call private_dtor nor
1024         manually free priv.
1025         * aix-thread.c (private_thread_info): Rename to ...
1026         (aix_thread_info): ... this.
1027         (get_aix_thread_info): New.
1028         (sync_threadlists): Adjust.
1029         (iter_tid): Adjust.
1030         (aix_thread_resume): Adjust.
1031         (aix_thread_fetch_registers): Adjust.
1032         (aix_thread_store_registers): Adjust.
1033         (aix_thread_extra_thread_info): Adjust.
1034         * darwin-nat.h (private_thread_info): Rename to ...
1035         (darwin_thread_info): ... this.
1036         (get_darwin_thread_info): New.
1037         * darwin-nat.c (darwin_init_thread_list): Adjust.
1038         (darwin_check_new_threads): Adjust.
1039         (thread_info_from_private_thread_info): Adjust.
1040         * linux-thread-db.c (private_thread_info): Rename to ...
1041         (thread_db_thread_info): ... this, initialize fields.
1042         (get_thread_db_thread_info): New.
1043         <dying>: Change type to bool.
1044         (update_thread_state): Adjust to type rename.
1045         (record_thread): Adjust to type rename an use of unique_ptr.
1046         (thread_db_pid_to_str): Likewise.
1047         (thread_db_extra_thread_info): Likewise.
1048         (thread_db_thread_handle_to_thread_info): Likewise.
1049         (thread_db_get_thread_local_address): Likewise.
1050         * nto-tdep.h (private_thread_info): Rename to ...
1051         (nto_thread_info): ... this, initialize fields.
1052         (get_nto_thread_info): New.
1053         <name>: Change type to std::string.
1054         * nto-tdep.c (nto_extra_thread_info): Adjust to type rename and
1055         use of unique_ptr.
1056         * nto-procfs.c (update_thread_private_data_name): Adjust to
1057         std::string change, allocate nto_private_thread_info with new.
1058         (update_thread_private_data): Adjust to unique_ptr.
1059         * remote.c (private_thread_info): Rename to ...
1060         (remote_thread_info): ... this, initialize data members with
1061         default values.
1062         <extra, name>: Change type to std::string.
1063         <thread_handle>: Change type to non-pointer.
1064         (free_private_thread_info): Remove.
1065         (get_private_info_thread): Rename to...
1066         (get_remote_thread_info): ... this, change return type, adjust to
1067         use of unique_ptr, use remote_thread_info constructor.
1068         (remote_add_thread): Adjust.
1069         (get_private_info_ptid): Rename to...
1070         (get_remote_thread_info): ...this, change return type.
1071         (remote_thread_name): Use get_remote_thread_info, adjust to
1072         change to std::string.
1073         (struct thread_item) <~thread_item>: Remove.
1074         <thread_handle>: Make non pointer.
1075         (start_thread): Adjust to thread_item::thread_handle type
1076         change.
1077         (remote_update_thread_list): Adjust to type name change, move
1078         strings from temporary to long-lived object instead of
1079         duplicating.
1080         (remote_threads_extra_info): Use get_remote_thread_info.
1081         (process_initial_stop_replies): Likewise.
1082         (resume_clear_thread_private_info): Likewise.
1083         (remote_resume): Adjust to type name change.
1084         (remote_commit_resume): Use get_remote_thread_info.
1085         (process_stop_reply): Adjust to type name change.
1086         (remote_stopped_by_sw_breakpoint): Use get_remote_thread_info.
1087         (remote_stopped_by_hw_breakpoint): Likewise.
1088         (remote_stopped_by_watchpoint): Likewise.
1089         (remote_stopped_data_address): Likewise.
1090         (remote_core_of_thread): Likewise.
1091         (remote_thread_handle_to_thread_info): Use
1092         get_private_info_thread, adjust to thread_handle field type
1093         change.
1094
1095 2017-11-24  Simon Marchi  <simon.marchi@polymtl.ca>
1096
1097         * remote.c (struct thread_item): Add constructor, disable copy
1098         construction and copy assignment, define default move
1099         construction and move assignment.
1100         <extra, name>: Change type to std::string.
1101         <core>: Initialize.
1102         <thread_handle>: Make non-pointer.
1103         (thread_item_t): Remove typedef.
1104         (DEF_VEC_O(thread_item_t)): Remove.
1105         (threads_listing_context) <contains_thread>: New method.
1106         <remove_thread>: New method.
1107         <items>: Change type to std::vector.
1108         (clear_threads_listing_context): Remove.
1109         (threads_listing_context_remove): Remove.
1110         (remote_newthread_step): Use thread_item constructor, adjust to
1111         change to std::vector.
1112         (start_thread): Use thread_item constructor, adjust to change to
1113         std::vector.
1114         (end_thread): Adjust to change to std::vector and std::string.
1115         (remote_get_threads_with_qthreadinfo): Use thread_item
1116         constructor, adjust to std::vector.
1117         (remote_update_thread_list): Adjust to change to std::vector and
1118         std::string, use threads_listing_context methods.
1119         (remove_child_of_pending_fork): Adjust.
1120         (remove_new_fork_children): Adjust.
1121         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add rsp-low-selftests.c.
1122         (SUBDIR_UNITTESTS_OBS): Add rsp-low-selftests.o.
1123         * unittests/rsp-low-selftests.c: New file.
1124         * common/rsp-low.h: Include common/byte-vector.h.
1125         (hex2bin): New overload.
1126         * common/rsp-low.c (hex2bin): New overload.
1127
1128 2017-11-24  Simon Marchi  <simon.marchi@ericsson.com>
1129
1130         * inferior.h (private_inferior): Define structure type, add
1131         virtual pure destructor.
1132         (inferior) <priv>: Change type to unique_ptr.
1133         * inferior.c (private_inferior::~private_inferior): Provide
1134         default implementation.
1135         (inferior::~inferior): Don't free priv field.
1136         (exit_inferior_1): Likewise.
1137         * darwin-nat.h (struct darwin_exception_info): Initialize fields.
1138         (darwin_exception_info): Remove typedef.
1139         (DEF_VEC_O (darwin_thread_t)); Remove.
1140         (private_inferior): Rename to ...
1141         (darwin_private_inferior): ... this, extend private_inferior.
1142         (get_darwin_inferior): New.
1143         <threads>: Change type to std::vector of darwin_thread_t pointers.
1144         * darwin-nat.c (darwin_check_new_threads): Adjust.
1145         (find_inferior_task_it): Adjust.
1146         (darwin_find_thread); Adjust.
1147         (darwin_suspend_inferior): Adjust.
1148         (darwin_resume_inferior): Adjust.
1149         (darwin_find_new_inferior): Adjust.
1150         (darwin_decode_notify_message): Adjust.
1151         (darwin_send_reply): Adjust.
1152         (darwin_resume_inferior_threads): Adjust.
1153         (darwin_suspend_inferior_threads): Adjust.
1154         (darwin_decode_message): Adjust.
1155         (darwin_wait): Adjust.
1156         (darwin_interrupt): Adjust.
1157         (darwin_deallocate_threads): Adjust.
1158         (darwin_mourn_inferior): Adjust, don't free private data.
1159         (darwin_reply_to_all_pending_messages): Adjust.
1160         (darwin_stop_inferior): Adjust.
1161         (darwin_setup_exceptions): Adjust.
1162         (darwin_kill_inferior): Adjust.
1163         (darwin_setup_request_notification): Adjust.
1164         (darwin_attach_pid): Adjust.
1165         (darwin_init_thread_list): Adjust.
1166         (darwin_setup_fake_stop_event): Adjust.
1167         (darwin_attach): Adjust.
1168         (darwin_detach): Adjust.
1169         (darwin_xfer_partial): Adjust.
1170         (set_enable_mach_exceptions): Adjust.
1171         (darwin_pid_to_exec_file): Adjust.
1172         (darwin_get_ada_task_ptid): Adjust.
1173         * darwin-nat-info.c (get_task_from_args): Adjust.
1174         (info_mach_ports_command): Adjust.
1175         (info_mach_region_command): Adjust.
1176         (info_mach_exceptions_command): Adjust.
1177         * remote.c (private_inferior): Rename to ...
1178         (remote_private_inferior): ... this, initialize fields.
1179         (get_remote_inferior); New.
1180         (remote_commit_resume): Use get_remote_inferior.
1181         (check_pending_event_prevents_wildcard_vcont_callback): Likewise.
1182
1183 2017-11-24  Pedro Alves  <palves@redhat.com>
1184
1185         * NEWS: Mention linespecs and explicit locations, and completion
1186         improvements.
1187
1188 2017-11-24  Yao Qi  <yao.qi@linaro.org>
1189
1190         * regcache.c (regcache::dump): Remove footnote_register_size.
1191
1192 2017-11-24  Yao Qi  <yao.qi@linaro.org>
1193
1194         * regcache.c (cooked_read_test): Add more test for readonly
1195         regcache.
1196
1197 2017-11-24  Yao Qi  <yao.qi@linaro.org>
1198
1199         * gdbarch-selftests.c (test_target_has_registers): Move it to
1200         target.c.
1201         (test_target_has_stack): Likewise.
1202         (test_target_has_memory): Likewise.
1203         (test_target_prepare_to_store): Likewise.
1204         (test_target_store_registers): Likewise.
1205         (test_target_ops): Likewise.
1206         * regcache.c: Include selftest-arch.h and gdbthread.h.
1207         (target_ops_no_register): New class.
1208         (test_target_fetch_registers): New.
1209         (test_target_store_registers): New.
1210         (test_target_xfer_partial): New.
1211         (readwrite_regcache): New.
1212         (cooked_read_test): New.
1213         (_initialize_regcache): Register the test.
1214         * target.c: (test_target_has_registers): Moved from
1215         gdbarch-selftests.c.
1216         (test_target_has_stack): Likewise.
1217         (test_target_has_memory): Likewise.
1218         (test_target_prepare_to_store): Likewise.
1219         (test_target_store_registers): Likewise.
1220         * target.h (test_target_ops): New class.
1221
1222 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
1223
1224         * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
1225         selftest.
1226
1227 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
1228
1229         * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
1230         * arch/aarch64.c (aarch64_create_target_description): Create
1231         new target description.
1232         * features/Makefile: Add new files.
1233         * features/aarch64.c: Remove file.
1234         * features/aarch64-core.c: New autogenerated file.
1235         * features/aarch64-fpu.c: New autogenerated file.
1236         * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
1237
1238 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
1239
1240         * Makefile.in: Add new files.
1241         * aarch64-linux-nat.c (aarch64_linux_read_description): Call
1242         aarch64_read_description.
1243         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
1244         Call aarch64_read_description.
1245         * aarch64-tdep.c (aarch64_read_description): New function.
1246         (aarch64_gdbarch_init): Call aarch64_read_description.
1247         * aarch64-tdep.h (aarch64_read_description): New function.
1248         * arch/aarch64.c: New file.
1249         * configure.tgt: Add new files.
1250
1251 2017-11-24  Yao Qi  <yao.qi@linaro.org>
1252
1253         * mi/mi-main.c (register_changed_p): Update.
1254         * value.c (value_contents_bits_eq): Change return type.
1255         (value_contents_eq): Likewise.
1256         * value.h: Update comments.
1257
1258 2017-11-24  Yao Qi  <yao.qi@linaro.org>
1259
1260         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
1261         local 'changed'.  Remove error.
1262         (register_changed_p): Change return type to bool.
1263
1264 2017-11-24  Yao Qi  <yao.qi@linaro.org>
1265
1266         * arch/tic6x.c: New file.
1267         * arch/tic6x.h: New file.
1268         * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
1269         tic6x-core.xml and tic6x-gp.xml.
1270         * features/tic6x-c6xp.c: Generated.
1271         * features/tic6x-core.c: Generated.
1272         * features/tic6x-gp.c: Generated.
1273         * target-descriptions.c (maint_print_c_tdesc_cmd): Match
1274         "tic6x-".
1275
1276 2017-11-23  Simon Marchi  <simon.marchi@ericsson.com>
1277
1278         * mi/mi-main.c (list_available_thread_groups): Change map value
1279         type to std::vector.
1280
1281 2017-11-23  Simon Marchi  <simon.marchi@ericsson.com>
1282
1283         * osdata.c (osdata_end_column, get_osdata): Remove std::move.
1284
1285 2017-11-23  Simon Marchi  <simon.marchi@ericsson.com>
1286
1287         * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
1288         back to...
1289         <children_requested>: ... this.
1290         (varobj_get_num_children, varobj_update): Adjust.
1291
1292 2017-11-23  Simon Marchi  <simon.marchi@ericsson.com>
1293
1294         * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
1295         (ada_value_has_mutated): Likewise.
1296         * c-varobj.c (varobj_is_anonymous_child): Likewise.
1297         (c_is_path_expr_parent): Likewise.
1298         * mi/mi-cmd-var.c (varobj_update_one): Likewise.
1299         (mi_cmd_var_set_frozen): Likewise.
1300         (mi_cmd_var_update_iter): Likewise.
1301         (mi_cmd_var_update): Likewise.
1302         * varobj.c (pretty_printing): Likewise.
1303         (varobj_enable_pretty_printing): Likewise.
1304         (struct varobj_root) <floating, is_valid>: Likewise.
1305         (struct varobj_dynamic) <children_requested>: Likewise.
1306         (delete_variable): Likewise.
1307         (delete_variable_1): Likewise.
1308         (install_variable): Likewise.
1309         (update_type_if_necessary): Likewise.
1310         (install_new_value): Likewise.
1311         (value_of_root): Likewise.
1312         (is_root_p): Likewise.
1313         (varobj_create): Likewise.
1314         (varobj_delete): Likewise.
1315         (varobj_has_more): Likewise.
1316         (varobj_set_frozen): Likewise.
1317         (varobj_get_frozen): Likewise.
1318         (install_dynamic_child): Likewise.
1319         (dynamic_varobj_has_child_method): Likewise.
1320         (update_dynamic_varobj_children): Likewise.
1321         (varobj_get_num_children): Likewise.
1322         (varobj_list_children): Likewise.
1323         (is_path_expr_parent): Likewise.
1324         (varobj_default_is_path_expr_parent): Likewise.
1325         (varobj_is_dynamic_p): Likewise.
1326         (varobj_set_value): Likewise.
1327         (varobj_value_has_mutated): Likewise.
1328         (varobj_update): Likewise.
1329         (check_scope): Likewise.
1330         (value_of_root_1): Likewise.
1331         (varobj_value_get_print_value): Likewise.
1332         (varobj_editable_p): Likewise.
1333         (varobj_value_is_changeable_p): Likewise.
1334         (varobj_floating_p): Likewise.
1335         (varobj_default_value_is_changeable_p): Likewise.
1336         (varobj_invalidate_iter): Likewise.
1337         * varobj.h (struct varobj_update_result) <type_changed,
1338         children_changed, changed, value_installed>: Likewise.
1339         (struct varobj) <updated, frozen, not_fetched>: Likewise.
1340         (struct lang_varobj_ops) <value_is_changeable_p,
1341         value_has_mutated, is_path_expr_parent>: Likewise.
1342         (varobj_delete): Likewise.
1343         (varobj_set_frozen): Likewise.
1344         (varobj_get_frozen): Likewise.
1345         (varobj_set_value): Likewise.
1346         (varobj_update): Likewise.
1347         (varobj_editable_p): Likewise.
1348         (varobj_floating_p): Likewise.
1349         (varobj_has_more): Likewise.
1350         (varobj_is_dynamic_p): Likewise.
1351         (varobj_default_value_is_changeable_p): Likewise.
1352         (varobj_value_is_changeable_p): Likewise.
1353         (varobj_is_anonymous_child): Likewise.
1354         (varobj_default_is_path_expr_parent): Likewise.
1355
1356 2017-11-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1357
1358         * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
1359         (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
1360         <type_str>: Convert to 'std::string'.
1361         <expr>: Convert to 'expression_up'.
1362         (dtrace_probe_arg_s): Delete type and VEC.
1363         (dtrace_probe_enabler_s): Likewise.
1364         (struct dtrace_probe): Replace by...
1365         (class dtrace_static_probe_ops): ...this and...
1366         (class dtrace_probe): ...this.
1367         (dtrace_probe_is_linespec): Rename to...
1368         (dtrace_static_probe_ops::is_linespec): ...this.  Adjust code
1369         to reflect change.
1370         (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
1371         Adjust code.  Create new instance of 'dtrace_probe'.
1372         (dtrace_build_arg_exprs): Rename to...
1373         (dtrace_probe::build_arg_exprs): ...this.  Adjust code to
1374         reflect change.
1375         (dtrace_get_probes): Rename to...
1376         (dtrace_static_probe_ops::get_probes): ...this.  Adjust code
1377         to reflect change.
1378         (dtrace_get_arg): Rename to...
1379         (dtrace_probe::get_arg_by_number): ...this.  Adjust code to
1380         reflect change.
1381         (dtrace_probe_is_enabled): Rename to...
1382         (dtrace_probe::is_enabled): ...this.  Adjust code to reflect
1383         change.
1384         (dtrace_get_probe_address): Rename to...
1385         (dtrace_probe::get_relocated_address): ...this.  Adjust code
1386         to reflect change.
1387         (dtrace_get_probe_argument_count): Rename to...
1388         (dtrace_probe::get_argument_count): ...this.  Adjust code to
1389         reflect change.
1390         (dtrace_can_evaluate_probe_arguments): Rename to...
1391         (dtrace_probe::can_evaluate_arguments): ...this.  Adjust code
1392         to reflect change.
1393         (dtrace_evaluate_probe_argument): Rename to...
1394         (dtrace_probe::evaluate_argument): ...this.  Adjust code to
1395         reflect change.
1396         (dtrace_compile_to_ax): Rename to...
1397         (dtrace_probe::compile_to_ax): ...this.  Adjust code to
1398         reflect change.
1399         (dtrace_probe_destroy): Delete.
1400         (dtrace_type_name): Rename to...
1401         (dtrace_static_probe_ops::type_name): ...this.  Adjust code to
1402         reflect change.
1403         (dtrace_probe::get_static_ops): New method.
1404         (dtrace_gen_info_probes_table_header): Rename to...
1405         (dtrace_static_probe_ops::gen_info_probes_table_header):
1406         ...this.  Adjust code to reflect change.
1407         (dtrace_gen_info_probes_table_values): Rename to...
1408         (dtrace_probe::gen_info_probes_table_values): ...this.  Adjust
1409         code to reflect change.
1410         (dtrace_enable_probe): Rename to...
1411         (dtrace_probe::enable_probe): ...this.  Adjust code to reflect
1412         change.
1413         (dtrace_disable_probe): Rename to...
1414         (dtrace_probe::disable_probe): ...this.  Adjust code to reflect
1415         change.
1416         (struct probe_ops dtrace_probe_ops): Delete.
1417         (info_probes_dtrace_command): Call 'info_probes_for_spops'
1418         instead of 'info_probes_for_ops'.
1419         (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
1420         of 'all_probe_ops'.
1421
1422 2017-11-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1423             Simon Marchi  <simark@simark.ca>
1424
1425         * stap-probe.c (struct probe_ops stap_probe_ops): Delete
1426         variable.
1427         (struct stap_probe_arg) <stap_probe_arg>: New constructor.
1428         <aexpr>: Change type to 'expression_up'.
1429         (stap_probe_arg_s): Delete type and VEC.
1430         (struct stap_probe): Delete.  Replace by...
1431         (class stap_static_probe_ops): ...this and...
1432         (class stap_probe): ...this.  Rename variables to add 'm_'
1433         prefix.  Do not use 'union' for arguments anymore.
1434         (stap_get_expected_argument_type): Receive probe name instead
1435         of 'struct stap_probe'.  Adjust code.
1436         (stap_parse_probe_arguments): Rename to...
1437         (stap_probe::parse_arguments): ...this.  Adjust code to
1438         reflect change.
1439         (stap_get_probe_address): Rename to...
1440         (stap_probe::get_relocated_address): ...this.  Adjust code
1441         to reflect change.
1442         (stap_get_probe_argument_count): Rename to...
1443         (stap_probe::get_argument_count): ...this.  Adjust code
1444         to reflect change.
1445         (stap_get_arg): Rename to...
1446         (stap_probe::get_arg_by_number'): ...this. Adjust code to
1447         reflect change.
1448         (can_evaluate_probe_arguments): Rename to...
1449         (stap_probe::can_evaluate_arguments): ...this.  Adjust code
1450         to reflect change.
1451         (stap_evaluate_probe_argument): Rename to...
1452         (stap_probe::evaluate_argument): ...this.  Adjust code
1453         to reflect change.
1454         (stap_compile_to_ax): Rename to...
1455         (stap_probe::compile_to_ax): ...this.  Adjust code to
1456         reflect change.
1457         (stap_probe_destroy): Delete.
1458         (stap_modify_semaphore): Adjust comment.
1459         (stap_set_semaphore): Rename to...
1460         (stap_probe::set_semaphore): ...this.  Adjust code to reflect
1461         change.
1462         (stap_clear_semaphore): Rename to...
1463         (stap_probe::clear_semaphore): ...this.  Adjust code to
1464         reflect change.
1465         (stap_probe::get_static_ops): New method.
1466         (handle_stap_probe): Adjust code to create instance of
1467         'stap_probe'.
1468         (stap_get_probes): Rename to...
1469         (stap_static_probe_ops::get_probes): ...this.  Adjust code to
1470         reflect change.
1471         (stap_probe_is_linespec): Rename to...
1472         (stap_static_probe_ops::is_linespec): ...this.  Adjust code to
1473         reflect change.
1474         (stap_type_name): Rename to...
1475         (stap_static_probe_ops::type_name): ...this.  Adjust code to
1476         reflect change.
1477         (stap_gen_info_probes_table_header): Rename to...
1478         (stap_static_probe_ops::gen_info_probes_table_header):
1479         ...this.  Adjust code to reflect change.
1480         (stap_gen_info_probes_table_values): Rename to...
1481         (stap_probe::gen_info_probes_table_values): ...this.  Adjust
1482         code to reflect change.
1483         (struct probe_ops stap_probe_ops): Delete.
1484         (info_probes_stap_command): Use 'info_probes_for_spops'
1485         instead of 'info_probes_for_ops'.
1486         (_initialize_stap_probe): Use 'all_static_probe_ops' instead
1487         of 'all_probe_ops'.
1488
1489 2017-11-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1490
1491         * break-catch-throw.c (fetch_probe_arguments): Use
1492         'probe.prob' instead of 'probe.probe'.
1493         * breakpoint.c (create_longjmp_master_breakpoint): Call
1494         'can_evaluate_arguments' and 'get_relocated_address' methods
1495         from probe.
1496         (create_exception_master_breakpoint): Likewise.
1497         (add_location_to_breakpoint): Use 'sal->prob' instead of
1498         'sal->probe'.
1499         (bkpt_probe_insert_location): Call 'set_semaphore' method from
1500         probe.
1501         (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
1502         * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
1503         of 'probe_ops'.
1504         (probe_key_free): Call 'delete' on probe.
1505         (check_exception_resume): Use 'probe.prob' instead of
1506         'probe.probe'.
1507         * location.c (string_to_event_location_basic): Call
1508         'probe_linespec_to_static_ops'.
1509         * probe.c (class any_static_probe_ops): New class.
1510         (any_static_probe_ops any_static_probe_ops): New variable.
1511         (parse_probes_in_pspace): Receive 'static_probe_ops' as
1512         argument.  Adjust code to reflect change.
1513         (parse_probes): Use 'static_probe_ops' instead of
1514         'probe_ops'.  Adjust code to reflect change.
1515         (find_probes_in_objfile): Call methods to get name and
1516         provider from probe.
1517         (find_probe_by_pc): Use 'result.prob' instead of
1518         'result.probe'.  Call 'get_relocated_address' method from
1519         probe.
1520         (collect_probes): Adjust comment and argument list to receive
1521         'static_probe_ops' instead of 'probe_ops'.  Adjust code to
1522         reflect change.  Call necessary methods from probe.
1523         (compare_probes): Call methods to get name and provider from
1524         probes.
1525         (gen_ui_out_table_header_info): Receive 'static_probe_ops'
1526         instead of 'probe_ops'.  Use 'std::vector' instead of VEC,
1527         adjust code accordingly.
1528         (print_ui_out_not_applicables): Likewise.
1529         (info_probes_for_ops): Rename to...
1530         (info_probes_for_spops): ...this.  Receive 'static_probe_ops'
1531         as argument instead of 'probe_ops'.  Adjust code.  Call
1532         necessary methods from probe.
1533         (info_probes_command): Use 'info_probes_for_spops'.
1534         (enable_probes_command): Pass correct argument to
1535         'collect_probes'.  Call methods from probe.
1536         (disable_probes_command): Likewise.
1537         (get_probe_address): Move to 'any_static_probe_ops::get_address'.
1538         (get_probe_argument_count): Move to
1539         'any_static_probe_ops::get_argument_count'.
1540         (can_evaluate_probe_arguments): Move to
1541         'any_static_probe_ops::can_evaluate_arguments'.
1542         (evaluate_probe_argument): Move to
1543         'any_static_probe_ops::evaluate_argument'.
1544         (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
1545         'probe.probe'.
1546         (probe_linespec_to_ops): Rename to...
1547         (probe_linespec_to_static_ops): ...this.  Adjust code.
1548         (probe_any_is_linespec): Rename to...
1549         (any_static_probe_ops::is_linespec): ...this.
1550         (probe_any_get_probes): Rename to...
1551         (any_static_probe_ops::get_probes): ...this.
1552         (any_static_probe_ops::type_name): New method.
1553         (any_static_probe_ops::gen_info_probes_table_header): New
1554         method.
1555         (compute_probe_arg): Use 'pc_probe.prob' instead of
1556         'pc_probe.probe'.  Call methods from probe.
1557         (compile_probe_arg): Likewise.
1558         (std::vector<const probe_ops *> all_probe_ops): Delete.
1559         (std::vector<const static_probe_ops *> all_static_probe_ops):
1560         New variable.
1561         (_initialize_probe): Use 'all_static_probe_ops' instead of
1562         'all_probe_ops'.
1563         * probe.h (struct info_probe_column) <field_name>: Delete
1564         extraneous newline
1565         (info_probe_column_s): Delete type and VEC.
1566         (struct probe_ops): Delete.  Replace with...
1567         (class static_probe_ops): ...this and...
1568         (clas probe): ...this.
1569         (struct bound_probe) <bound_probe>: Delete extraneous
1570         newline.  Adjust constructor to receive 'probe' instead of
1571         'struct probe'.
1572         <probe>: Rename to...
1573         <prob>: ...this.  Delete extraneous newline.
1574         <objfile>: Delete extraneous newline.
1575         (register_probe_ops): Delete unused prototype.
1576         (info_probes_for_ops): Rename to...
1577         (info_probes_for_spops): ...this.  Adjust comment.
1578         (get_probe_address): Move to 'probe::get_address'.
1579         (get_probe_argument_count): Move to
1580         'probe::get_argument_count'.
1581         (can_evaluate_probe_arguments): Move to
1582         'probe::can_evaluate_arguments'.
1583         (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
1584         * solib-svr4.c (struct svr4_info): Adjust comment.
1585         (struct probe_and_action) <probe>: Rename to...
1586         <prob>: ...this.
1587         (register_solib_event_probe): Receive 'probe' instead of
1588         'struct probe' as argument.  Use 'prob' instead of 'probe'
1589         when applicable.
1590         (solib_event_probe_action): Call 'get_argument_count' method
1591         from probe.  Adjust comment.
1592         (svr4_handle_solib_event): Adjust comment.  Call
1593         'evaluate_argument' method from probe.
1594         (svr4_create_probe_breakpoints): Call 'get_relocated_address'
1595         from probe.
1596         (svr4_create_solib_event_breakpoints): Use 'probe' instead of
1597         'struct probe'.  Call 'can_evaluate_arguments' from probe.
1598         * symfile.h: Forward declare 'class probe' instead of 'struct
1599         probe'.
1600         * symtab.h: Likewise.
1601         (struct symtab_and_line) <probe>: Rename to...
1602         <prob>: ...this.
1603         * tracepoint.c (start_tracing): Use 'prob' when applicable.
1604         Call probe methods.
1605         (stop_tracing): Likewise.
1606
1607 2017-11-22  Joel Brobecker  <brobecker@adacore.com>
1608
1609         * ravenscar-thread.c (ravenscar_inferior_created): Remove
1610         trailing newline at end of string in call to warning.
1611
1612 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
1613
1614         * osdata.h: Include vector isntead of vec.h.
1615         (osdata_column_s): Remove typedef.
1616         (struct osdata_column): Add constructor.
1617         <name, value>: Change type to std::string.
1618         (DEF_VEC_O (osdata_column_s)): Remove.
1619         (osdata_item_s): Remove typedef.
1620         (struct osdata_item) <columns>: Change type to std::vector.
1621         (DEF_VEC_O (osdata_item_s)): Remove.
1622         (struct osdata): Add constructor.
1623         <type>: Change type to std::string.
1624         <items>: Change type to std::vector.
1625         (osdata_p): Remove typedef.
1626         (DEF_VEC_P (osdata_p)): Remove.
1627         (osdata_parse): Return a unique_ptr.
1628         (osdata_free): Remove.
1629         (make_cleanup_osdata_free): Remove.
1630         (get_osdata): Return a unique_ptr.
1631         (get_osdata_column): Return pointer to std::string, take a
1632         reference to osdata_item as parameter.
1633         * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
1634         unique_ptr.
1635         <property_name>: Change type to std::string.
1636         (osdata_start_osdata): Allocate osdata with new and adjust.
1637         (osdata_start_item): Adjust.
1638         (osdata_start_column): Adjust.
1639         (osdata_end_column): Adjust.
1640         (clear_parsing_data): Remove.
1641         (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
1642         (osdata_item_clear): Remove.
1643         (get_osdata): return a unique_ptr and adjust.
1644         (get_osdata_column): Return a pointer to std::string and adjust.
1645         (info_osdata): Adjust.
1646         * mi/mi-main.c: Include <map>.
1647         (free_vector_of_osdata_items): Remove.
1648         (list_available_thread_groups): Adjust, use std::map instead of
1649         splay tree.
1650
1651 2017-11-22  Simon Marchi  <simon.marchi@ericsson.com>
1652
1653         * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
1654         case in switch.
1655
1656 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
1657
1658         * varobj.h (DEF_VEC_P (varobj_p)): Remove.
1659
1660 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
1661
1662         * varobj.h (struct varobj_update_result): Add constructor, add
1663         move constructor, disable copy and assign, initialize fields.
1664         <newobj>: Change type to std::vector.
1665         (varobj_update): Return std::vector.
1666         * varobj.c (install_dynamic_child): Change VEC parameters to
1667         std::vector and adjust.
1668         (update_dynamic_varobj_children): Likewise.
1669         (varobj_update): Return std::vector and adjust.
1670         * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
1671
1672 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
1673
1674         * varobj.h (struct varobj) <parent>: Remove const.
1675         <children>: Change type to std::vector.
1676         (varobj_list_children): Return std::vector const reference.
1677         (varobj_restrict_range): Change parameter type to std::vector
1678         const reference.
1679         * varobj.c (varobj_has_more): Adjust.
1680         (varobj_restrict_range): Change parameter type to std::vector
1681         const reference and adjust.
1682         (install_dynamic_child): Adjust.
1683         (update_dynamic_varobj_children): Adjust.
1684         (varobj_list_children): Return std::vector const reference and
1685         adjust.
1686         (varobj_add_child): Adjust.
1687         (update_type_if_necessary): Adjust.
1688         (varobj_update): Adjust.
1689         (delete_variable_1): Adjust.
1690         * ada-varobj.c (ada_value_has_mutated): Adjust.
1691         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
1692
1693 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
1694
1695         * varobj.h (struct varobj): Add constructor and destructor,
1696         initialize fields.
1697         * varobj.c (struct varobj_root): Initialize fields.
1698         (struct varobj_dynamic): Initialize fields.
1699         (varobj_create): Use unique_ptr instead of cleanup.  Create
1700         varobj with new instead of new_root_variable.
1701         (delete_variable_1): Free variable with delete instead of
1702         free_variable.
1703         (create_child_with_value): Create variable with new instead of
1704         new_variable.
1705         (varobj::varobj): New.
1706         (varobj::~varobj): New (body mostly coming from free_variable).
1707         (new_variable): Remove.
1708         (free_variable): Remove.
1709         (do_free_variable_cleanup): Remove.
1710         (make_cleanup_free_variable): Remove.
1711
1712 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
1713
1714         * core-regset.c: Remove file.
1715         * Makefile.in (ALLDEPFILES): Remove core-regset.c.
1716
1717 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
1718
1719         * NEWS: Document use of GNU MPFR.
1720         * README: Likewise.
1721
1722         * Makefile.in (LIBMPFR): Add define.
1723         (CLIBS): Add $(LIBMPFR).
1724         * configure.ac: Add --with-mpfr configure option.
1725         * configure: Regenerate.
1726         * config.in: Regenerate.
1727
1728         * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
1729         (class mpfr_float_ops): New type.
1730         (mpfr_float_ops::from_target): Two new overloaded functions.
1731         (mpfr_float_ops::to_target): Likewise.
1732         (mpfr_float_ops::to_string): New function.
1733         (mpfr_float_ops::from_string): Likewise.
1734         (mpfr_float_ops::to_longest): Likewise.
1735         (mpfr_float_ops::from_longest): Likewise.
1736         (mpfr_float_ops::from_ulongest): Likewise.
1737         (mpfr_float_ops::to_host_double): Likewise.
1738         (mpfr_float_ops::from_host_double): Likewise.
1739         (mpfr_float_ops::convert): Likewise.
1740         (mpfr_float_ops::binop): Likewise.
1741         (mpfr_float_ops::compare): Likewise.
1742         (get_target_float_ops): Use mpfr_float_ops if available.
1743
1744 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
1745
1746         * target-float.c: Do not include <math.h>.
1747         Include <cmath> and <limits>.
1748         (DOUBLEST): Do not define.
1749         (class target_float_ops): New type.
1750         (class host_float_ops): New templated type.
1751         (class decimal_float_ops): New type.
1752
1753         (floatformat_to_doublest): Rename to ...
1754         (host_float_ops<T>::from_target): ... this.  Use template type T
1755         instead of DOUBLEST.  Use C++ math routines.  Update recursive calls.
1756         (host_float_ops<T>::from_target): New overload using a type argument.
1757         (floatformat_from_doublest): Rename to ...
1758         (host_float_ops<T>::to_target): ... this.  Use template type T
1759         instead of DOUBLEST.  Use C++ math routines.  Update recursive calls.
1760         (host_float_ops<T>::to_target): New overload using a type argument.
1761         (floatformat_printf_format): New function.
1762         (struct printf_length_modifier): New templated type.
1763         (floatformat_to_string): Rename to ...
1764         (host_float_ops<T>::to_string): ... this.  Use type instead of
1765         floatformat argument.  Use floatformat_printf_format and
1766         printf_length_modifier.  Remove special handling of invalid numbers,
1767         infinities and NaN (moved to target_float_to_string).
1768         (struct scanf_length_modifier): New templated type.
1769         (floatformat_from_string): Rename to ...
1770         (host_float_ops<T>::from_string): ... this.  Use type instead of
1771         floatformat argument.  Use scanf_length_modifier.
1772         (floatformat_to_longest): Rename to ...
1773         (host_float_ops<T>::to_longest): ... this.  Use type instead of
1774         floatformat argument.  Handle out-of-range values deterministically.
1775         (floatformat_from_longest): Rename to ...
1776         (host_float_ops<T>::from_longest): ... this.  Use type instead of
1777         floatformat argument.
1778         (floatformat_from_ulongest): Rename to ...
1779         (host_float_ops<T>::from_ulongest): ... this.  Use type instead of
1780         floatformat argument.
1781         (floatformat_to_host_double): Rename to ...
1782         (host_float_ops<T>::to_host_double): ... this.  Use type instead of
1783         floatformat argument.
1784         (floatformat_from_host_double): Rename to ...
1785         (host_float_ops<T>::from_host_double): ... this.  Use type instead of
1786         floatformat argument.
1787         (floatformat_convert): Rename to ...
1788         (host_float_ops<T>::convert): ... this.  Use type instead of
1789         floatformat arguments.  Remove handling of no-op conversions.
1790         (floatformat_binop): Rename to ...
1791         (host_float_ops<T>::binop): ... this.  Use type instead of
1792         floatformat arguments.
1793         (floatformat_compare): Rename to ...
1794         (host_float_ops<T>::compare): ... this.  Use type instead of
1795         floatformat arguments.
1796
1797         (match_endianness): Use type instead of length/byte_order arguments.
1798         (set_decnumber_context): Likewise.
1799         (decimal_from_number): Likewise.  Update calls.
1800         (decimal_to_number): Likewise.
1801         (decimal_is_zero): Likewise.  Update calls.  Move to earlier in file.
1802         (decimal_float_ops::to_host_double): New dummy function.
1803         (decimal_float_ops::from_host_double): Likewise.
1804         (decimal_to_string): Rename to ...
1805         (decimal_float_ops::to_string): ... this.  Use type instead of
1806         length/byte_order arguments.  Update calls.
1807         (decimal_from_string): Rename to ...
1808         (decimal_float_ops::from_string): ... this.  Use type instead of
1809         length/byte_order arguments.  Update calls.
1810         (decimal_from_longest): Rename to ...
1811         (decimal_float_ops::from_longest): ... this.  Use type instead of
1812         length/byte_order arguments.  Update calls.
1813         (decimal_from_ulongest): Rename to ...
1814         (decimal_float_ops::from_ulongest): ... this.  Use type instead of
1815         length/byte_order arguments.  Update calls.
1816         (decimal_to_longest): Rename to ...
1817         (decimal_float_ops::to_longest): ... this.  Use type instead of
1818         length/byte_order arguments.  Update calls.
1819         (decimal_binop): Rename to ...
1820         (decimal_float_ops::binop): ... this.  Use type instead of
1821         length/byte_order arguments.  Update calls.
1822         (decimal_compare): Rename to ...
1823         (decimal_float_ops::compare): ... this.  Use type instead of
1824         length/byte_order arguments.  Update calls.
1825         (decimal_convert): Rename to ...
1826         (decimal_float_ops::convert): ... this.  Use type instead of
1827         length/byte_order arguments.  Update calls.
1828
1829         (target_float_same_category_p): New function.
1830         (target_float_same_format_p): Likewise.
1831         (target_float_format_length): Likewise.
1832         (enum target_float_ops_kind): New type.
1833         (get_target_float_ops_kind): New function.
1834         (get_target_float_ops): Three new overloaded functions.
1835
1836         (target_float_is_zero): Update call.
1837         (target_float_to_string): Add special handling of invalid numbers,
1838         infinities and NaN (moved from floatformat_to_string).  Use
1839         target_float_ops callback.
1840         (target_float_from_string): Use target_float_ops callback.
1841         (target_float_to_longest): Likewise.
1842         (target_float_from_longest): Likewise.
1843         (target_float_from_ulongest): Likewise.
1844         (target_float_to_host_double): Likewise.
1845         (target_float_from_host_double): Likewise.
1846         (target_float_convert): Add special case for no-op conversions.
1847         Use target_float_ops callback.
1848         (target_float_binop): Use target_float_ops callback.
1849         (target_float_compare): Likewise.
1850
1851 2017-11-22  Yao Qi  <yao.qi@linaro.org>
1852
1853         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
1854
1855 2017-11-22  Yao Qi  <yao.qi@linaro.org>
1856
1857         * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
1858         * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
1859
1860 2017-11-21  Jerome Guitton  <guitton@adacore.com>
1861
1862         * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
1863         with event ptid from the lower layer before doing the
1864         ravenscar-specific update.
1865
1866 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
1867
1868         * ravenscar-thread.c (is_ravenscar_task): Also verify that
1869         the ptid's TID is nonzero.
1870
1871 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
1872
1873         * ada-lang.h (ada_get_tcb_types_info): Add declaration.
1874         * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
1875         Make non-static.  Change return type to char *.  Adjust code
1876         accordingly.  Rewrite the function's documentation.
1877         (read_atcb): Adjust call to get_tcb_types_info accordingly.
1878         * ravenscar-thread.c (ravenscar_inferior_created): Check that
1879         we have enough debugging information in the runtime to support
1880         Ada task debugging before we enable the ravenscar-thread layer.
1881
1882 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
1883
1884         * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
1885         * ada-tasks.c (ada_get_task_info_from_ptid): New function.
1886         * ravenscar-thread.c: Add into comment.
1887         (base_magic_null_ptid): Delete.
1888         (base_ptid): Change documentation.
1889         (ravenscar_active_task): Renames ravenscar_running_thread.
1890         All callers updated throughout.
1891         (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
1892         (ravenscar_task_is_currently_active): Likewise.
1893         (get_base_thread_from_ravenscar_task): Ditto.
1894         (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
1895         (ravenscar_runtime_initialized): Likewise.
1896         (get_running_thread_id): Add new parameter "cpu".  Adjust
1897         implementation to handle this new parameter.
1898         (ravenscar_fetch_registers): Small adjustment to use
1899         is_ravenscar_task and ravenscar_task_is_currently_active in
1900         order to decide whether to use the target beneath or this
1901         module's arch_ops.
1902         (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
1903         (ravenscar_stopped_by_sw_breakpoint): Use
1904         get_base_thread_from_ravenscar_task to get the underlying
1905         thread, rather than using base_ptid.
1906         (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1907         (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1908         Likewise.
1909         (ravenscar_inferior_created): Do not set base_magic_null_ptid.
1910
1911 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
1912
1913         * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
1914         * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
1915         (get_tcb_types_info): Set fieldnos.base_cpu.
1916         (read_atcb): Set task_info->base_cpu.
1917         (info_task): Print "Base CPU" info if set by runtime.
1918
1919 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
1920
1921         * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
1922         (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1923         (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1924         New functions.
1925         (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
1926         to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
1927         to_stopped_data_address and to_core_of_thread fields of
1928         ravenscar_ops.
1929
1930 2017-11-21  Ulrich Weigand  <uweigand@de.ibm.com>
1931
1932         * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
1933         (struct gdbarch_tdep): New member long_double_abi.
1934         * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
1935         member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
1936         * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
1937         format depending on long_double_abi tdep member.
1938         (ppc_floatformat_for_type): Handle __ibm128 type.
1939
1940 2017-11-20  Simon Marchi  <simon.marchi@polymtl.ca>
1941
1942         * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
1943
1944 2017-11-21  Pedro Alves  <palves@redhat.com>
1945
1946         * dwarf2read.c (mapped_index::find_name_components_bounds)
1947         <completion mode, upper bound>: Use std::lower_bound instead of
1948         std::upper_bound.
1949         (test_mapped_index_find_name_component_bounds): Remove incorrect
1950         "t1_fund" from expected symbols.
1951
1952 2017-11-21  Pedro Alves  <palves@redhat.com>
1953
1954         * dwarf2read.c (mapped_index::name_components_casing): New field.
1955         (mapped_index) <build_name_components,
1956         find_name_components_bounds): Declare new methods.
1957         (mapped_index::find_name_components_bounds)
1958         (mapped_index::build_name_components): New methods, factored out
1959         from dw2_expand_symtabs_matching_symbol.
1960         (check_find_bounds_finds)
1961         (test_mapped_index_find_name_component_bounds): New.
1962         (run_test): Rename to ...
1963         (test_dw2_expand_symtabs_matching_symbol): ... this.
1964         (run_test): Reimplement.
1965
1966 2017-11-21  Pedro Alves  <palves@redhat.com>
1967
1968         * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
1969         (symbol_end): Use cp_ident_is_alnum.
1970         (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
1971         * dwarf2read.c (make_sort_after_prefix_name): New function.
1972         (dw2_expand_symtabs_matching_symbol): Use it.
1973         (test_symbols): Add more symbols.
1974         (run_test): Add tests.
1975
1976 2017-11-17  Tom Tromey  <tom@tromey.com>
1977
1978         * symtab.h (enum symbol_subclass_kind): New.
1979         (struct symbol) <is_cplus_template_function, is_rust_vtable>:
1980         Remove.
1981         <subclass>: New member.
1982         (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
1983         * rust-lang.c (rust_get_trait_object_pointer): Update.
1984         * dwarf2read.c (read_func_scope): Update.
1985         (read_variable): Update.
1986
1987 2017-11-17  Tom Tromey  <tom@tromey.com>
1988
1989         * dwarf2read.c (read_func_scope): Update.
1990         * symtab.h (struct template_symbol): Derive from symbol.
1991         <base>: Remove.
1992
1993 2017-11-17  Tom Tromey  <tom@tromey.com>
1994
1995         * symtab.h (struct symbol) <is_rust_vtable>: New member.
1996         (struct rust_vtable_symbol): New.
1997         (find_symbol_at_address): Declare.
1998         * symtab.c (find_symbol_at_address): New function.
1999         * symfile.h (struct quick_symbol_functions)
2000         <find_compunit_symtab_by_address>: New member.
2001         * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
2002         function.
2003         (debug_sym_quick_functions): Link to
2004         debug_qf_find_compunit_symtab_by_address.
2005         * rust-lang.c (rust_get_trait_object_pointer): New function.
2006         (rust_evaluate_subexp) <case UNOP_IND>: New case.  Call
2007         rust_get_trait_object_pointer.
2008         * psymtab.c (psym_relocate): Clear psymbol_map.
2009         (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
2010         functions.
2011         (psym_functions): Link to psym_find_compunit_symtab_by_address.
2012         * objfiles.h (struct objfile) <psymbol_map>: New member.
2013         * dwarf2read.c (dwarf2_gdb_index_functions): Update.
2014         (process_die) <DW_TAG_variable>: New case.  Call read_variable.
2015         (rust_containing_type, read_variable): New functions.
2016
2017 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
2018
2019         * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
2020
2021 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
2022
2023         * common/filestuff.c: Include <algorithm>.
2024         (open_fds): Change type to std::vector<int>.
2025         (do_mark_open_fd): Adjust.
2026         (unmark_fd_no_cloexec): Adjust.
2027         (do_close): Adjust.
2028
2029 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
2030
2031         * breakpoint.c (output_thread_groups): Take an std::vector.
2032         (print_one_breakpoint_location): Adjust.
2033
2034 2017-11-17  Joel Brobecker  <brobecker@adacore.com>
2035
2036         * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
2037         (ada_evaluate_subexp_for_cast): New function.
2038         (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
2039         ada_evaluate_subexp_for_cast.
2040         (ada_evaluate_subexp) <nosideret>: Replace code by call to
2041         eval_skip_value.
2042         * eval.c (evaluate_var_value): Make non-static.
2043         (evaluate_var_msym_value, eval_skip_value): Likewise.
2044         * value.h (evaluate_var_value, evaluate_var_msym_value)
2045         (eval_skip_value): Declare.
2046
2047 2017-11-16  Joel Brobecker  <brobecker@adacore.com>
2048
2049         * ada-lang.c (ada_value_cast): Remove parameter "noside".
2050         Update all callers.
2051
2052 2017-11-16  Pedro Alves  <palves@redhat.com>
2053
2054         * python/py-unwind.c (pyuw_sniffer): Translate
2055         PyExc_KeyboardInterrupt to a GDB Quit exception.
2056
2057 2017-11-16  Pedro Alves  <palves@redhat.com>
2058
2059         * infrun.c (resume_cleanups): Delete.
2060         (resume): No longer install a resume_cleanups cleanup nor call
2061         QUIT.
2062         (proceed): Pass the terminal to the inferior.
2063         (keep_going_pass_signal): No longer install a resume_cleanups
2064         cleanup.
2065
2066 2017-11-16  Pedro Alves  <palves@redhat.com>
2067
2068         * inf-loop.c (inferior_event_handler): Don't swallow the exception
2069         if the prompt is blocked.
2070
2071 2017-11-16  Pedro Alves  <palves@redhat.com>
2072
2073         * breakpoint.c (insert_bp_location): Replace bp_err and
2074         bp_err_message locals by a gdb_exception local.
2075
2076 2017-11-16  Pedro Alves  <palves@redhat.com>
2077
2078         * inflow.c (scoped_ignore_sigttou): New class.
2079         (child_terminal_ours_1, new_tty): Use it.
2080
2081 2017-11-16  Ulrich Weigand  <uweigand@de.ibm.com>
2082
2083         * target-float.c (decimal_from_number): Add byte_order argument and
2084         call match_endianness.  Error if unknown floating-point type.
2085         (decimal_to_number): Add byte_order argument and call match_endianness.
2086         (decimal_from_longest): Update call.  Do not call match_endianness.
2087         (decimal_from_ulongest): Likewise.
2088         (decimal_binop): Likewise.
2089         (decimal_is_zero): Likewise.
2090         (decimal_compare): Likewise.
2091         (decimal_convert): Likewise.
2092
2093 2017-11-16  Phil Muldoon  <pmuldoon@redhat.com>
2094
2095         * python/python.c (gdbpy_rbreak): New function.
2096         * NEWS: Document Python rbreak feature.
2097
2098 2017-11-16  Yao Qi  <yao.qi@linaro.org>
2099
2100         * features/tic6x-c62x.xml: Remove.
2101         * features/tic6x-c64x.xml: Remove.
2102         * features/tic6x-c64xp.xml: Remove.
2103
2104 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
2105
2106         * symtab.h: Include <array>.
2107
2108 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
2109
2110         * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
2111         (bsd_kvm_proc_cmd): Likewise.
2112
2113 2017-11-15  Simon Marchi  <simon.marchi@ericsson.com>
2114
2115         * tui/tui-win.c (window_name_completer): Replace VEC with
2116         std::vector.
2117
2118 2017-11-15  Andrew Cagney  <cagney@gnu.org>
2119
2120         * MAINTAINERS: Remove no-longer applicable entries.
2121
2122 2017-11-15  Andrew Cagney  <cagney@gnu.org>
2123
2124         * MAINTAINERS: Move self to Past Maintainers.
2125
2126 2017-11-15  Yao Qi  <yao.qi@linaro.org>
2127
2128         * features/Makefile (XMLTOC): Remove nios2-linux.xml.
2129         * features/nios2-linux.c: Remove.
2130         * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
2131         initialize_tdesc_nios2_linux.
2132
2133 2017-11-15  Yao Qi  <yao.qi@linaro.org>
2134
2135         * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
2136         M68HC11_LAST_HARD_REG + 1.
2137
2138 2017-11-14  Paul Carroll  <pcarroll@codesourcery.com>
2139
2140         PR gdb/22388
2141         * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
2142         remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
2143         Return TARGET_XFER_EOF if size of returned data is 0.
2144
2145 2017-11-14  Simon Marchi  <simon.marchi@ericsson.com>
2146
2147         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2148         memory-map-selftests.c.
2149         (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
2150         * memory-map.c (memory_map_start_memory): Fix computation of hi
2151         address.
2152         * unittests/memory-map-selftests.c: New file.
2153
2154 2017-11-09  Joel Brobecker  <brobecker@adacore.com>
2155
2156         * ada-lang.c: Fix some typos in the general command documenting
2157         how Ada expressions are being evaluated and how their result
2158         is printed.
2159
2160 2017-11-09  Tom Tromey  <tom@tromey.com>
2161
2162         * psymtab.c (psymbol_hash): Do not hash string contents.
2163         (psymbol_compare): Add comment.
2164
2165 2017-11-09  Tom Tromey  <tom@tromey.com>
2166
2167         * dictionary.c (dict_hash): Move "TKB" check into the "switch".
2168
2169 2017-11-08  Joel Brobecker  <brobecker@adacore.com>
2170
2171         * ada-exp.y (write_var_from_sym): Remove parameter
2172         "orig_left_context".  Update all callers.
2173
2174 2017-11-08  Simon Marchi  <simon.marchi@ericsson.com>
2175
2176         * tracepoint.h (class collection_list) <stringify>: Return
2177         std::vector<std::string>.
2178         (encode_actions_rsp): Change parameters to
2179         std::vector<std::string> *.
2180         * tracepoint.c (collection_list::stringify): Return
2181         std::vector<std::string> and adjust accordingly.
2182         (encode_actions_rsp): Changee parameters to
2183         std::vector<std::string> and adjust accordingly.
2184         * remote.c (free_actions_list),
2185         free_actions_list_cleanup_wrapper): Remove.
2186         (remote_download_tracepoint): Adjust to std::vector.
2187
2188 2017-11-08  Tom Tromey  <tom@tromey.com>
2189
2190         * dwarf2read.c (symbolp): Remove typedef.
2191         (read_func_scope): Use std::vector.
2192         (process_structure_scope): Use std::vector.
2193
2194 2017-11-08  Pedro Alves  <palves@redhat.com>
2195
2196         * ada-lang.c (ada_make_symbol_completion_list): Use
2197         completion_skip_symbol.
2198         * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
2199         (symbol_is_function_or_method(symbol*)): New.
2200         (add_symtab_completions): Add complete_symbol_mode parameter.  Use
2201         completion_skip_symbol.
2202         (default_collect_symbol_completion_matches_break_on): Use
2203         completion_skip_symbol.  Pass down mode.
2204         (collect_file_symbol_completion_matches): Pass down mode.
2205         * symtab.h (symbol_is_function_or_method): New declarations.
2206         (completion_skip_symbol): New template function.
2207
2208 2017-11-08  Pedro Alves  <palves@redhat.com>
2209
2210         * linespec.c (iterate_over_all_matching_symtabs): Add
2211         search_domain parameter.  Pass it down to expand_symtabs_matching.
2212         (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
2213         (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
2214         search_domain.
2215         (add_all_symbol_names_from_pspace): Add search_domain parameter.
2216         Pass it down.
2217         (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
2218         symbols.
2219         (add_matching_symbols_to_info): Add search_domain parameter.  Pass
2220         it down.
2221
2222 2017-11-08  Pedro Alves  <palves@redhat.com>
2223
2224         * ada-lang.c (ada_make_symbol_completion_list): Remove text and
2225         text_len locals and don't pass them down.
2226         * symtab.c (completion_list_add_name): Remove
2227         sym_text/sym_text_len parameters and adjust.
2228         (completion_list_add_symbol, completion_list_add_msymbol)
2229         (completion_list_objc_symbol, completion_list_add_fields)
2230         (add_symtab_completions): Likewise.
2231         (default_collect_symbol_completion_matches_break_on)
2232         (collect_file_symbol_completion_matches): Remove sym_text_len
2233         local and don't pass it down.
2234         * symtab.h (completion_list_add_name): Remove
2235         sym_text/sym_text_len parameters.
2236
2237 2017-11-08  Pedro Alves  <palves@redhat.com>
2238
2239         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2240         unittests/lookup_name_info-selftests.c.
2241         (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
2242         * cp-support.c: Include "selftest.h".
2243         (cp_remove_params_1): Rename from cp_remove_params.  Add
2244         'require_param' parameter, and handle it.
2245         (cp_remove_params): Reimplement.
2246         (cp_remove_params_if_any): New.
2247         (selftests::quote): New.
2248         (selftests::check_remove_params): New.
2249         (selftests::test_cp_remove_params): New.
2250         (_initialize_cp_support): Install
2251         selftests::test_cp_remove_params.
2252         * cp-support.h (cp_remove_params_if_any): Declare.
2253         * dwarf2read.c :Include "selftest.h".
2254         (dw2_expand_symtabs_matching_symbol): Use
2255         lookup_name_info::make_ignore_params.
2256         (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
2257         (selftests::dw2_expand_symtabs_matching::string_or_null)
2258         (selftests::dw2_expand_symtabs_matching::check_match)
2259         (selftests::dw2_expand_symtabs_matching::test_symbols)
2260         (selftests::dw2_expand_symtabs_matching::run_test): New.
2261         (_initialize_dwarf2_read): Register
2262         selftests::dw2_expand_symtabs_matching::run_test.
2263         * psymtab.c (psym_expand_symtabs_matching): Use
2264         lookup_name_info::make_ignore_params.
2265         * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
2266         If the lookup name wants to ignore parameters, strip them.
2267         (compare_symbol_name): Remove sym_text/sym_text_len parameters and
2268         code handling '('.
2269         (completion_list_add_name): Don't pass down sym_text/sym_text_len.
2270         (default_collect_symbol_completion_matches_break_on): Don't try to
2271         strip parameters.
2272         * symtab.h (lookup_name_info::lookup_name_info): Add
2273         'ignore_parameters' parameter.
2274         (lookup_name_info::ignore_parameters)
2275         (lookup_name_info::make_ignore_params): New methods.
2276         (lookup_name_info::m_ignore_parameters): New field.
2277         * unittests/lookup_name_info-selftests.c: New file.
2278
2279 2017-11-08  Pedro Alves  <palves@redhat.com>
2280
2281         * dwarf2read.c (dw2_expand_marked_cus)
2282         (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
2283         (dw2_expand_symtabs_matching): Move further below.
2284         (dw2_expand_marked_cus): Reindent.
2285
2286 2017-11-08  Pedro Alves  <palves@redhat.com>
2287
2288         * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
2289         (struct name_component): New.
2290         (mapped_index::name_components): New field.
2291         (mapped_index::symbol_name_at): New method.
2292         (dwarf2_read_index): Call mapped_index ctor.
2293         (dw2_map_matching_symbols): Add comment about name_components
2294         table.
2295         (dw2_expand_symtabs_matching): Factor part to...
2296         (dw2_expand_symtabs_matching_symbol): ... this new function.
2297         Build name components table, and lookup symbols in it before
2298         calling the name matcher.
2299         (dw2_expand_marked_cus): New, factored out from
2300         dw2_expand_symtabs_matching.
2301         (dwarf2_per_objfile_free): Call the mapped_index's dtor.
2302
2303 2017-11-08   Pedro Alves  <palves@redhat.com>
2304
2305         * ada-lang.c (ada_encode): Rename to ..
2306         (ada_encode_1): ... this.  Add throw_errors parameter and handle
2307         it.
2308         (ada_encode): Reimplement.
2309         (match_name): Delete, folded into full_name.
2310         (resolve_subexp): No longer pass the encoded name to
2311         ada_lookup_symbol_list.
2312         (should_use_wild_match): Delete.
2313         (name_match_type_from_name): New.
2314         (ada_lookup_simple_minsym): Use lookup_name_info and the
2315         language's symbol_name_matcher_ftype.
2316         (add_symbols_from_enclosing_procs, ada_add_local_symbols)
2317         (ada_add_block_renamings): Adjust to use lookup_name_info.
2318         (ada_lookup_name): New.
2319         (add_nonlocal_symbols, ada_add_all_symbols)
2320         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
2321         (ada_iterate_over_symbols): Adjust to use lookup_name_info.
2322         (ada_name_for_lookup): Delete.
2323         (ada_lookup_encoded_symbol): Construct a verbatim name.
2324         (wild_match): Reverse sense of return type.  Use bool.
2325         (full_match): Reverse sense of return type.  Inline bits of old
2326         match_name here.
2327         (ada_add_block_symbols): Adjust to use lookup_name_info.
2328         (symbol_completion_match): Delete, folded into...
2329         (ada_lookup_name_info::matches): ... .this new method.
2330         (symbol_completion_add): Delete.
2331         (ada_collect_symbol_completion_matches): Add name_match_type
2332         parameter.  Adjust to use lookup_name_info and
2333         completion_list_add_name.
2334         (get_var_value, ada_add_global_exceptions): Adjust to use
2335         lookup_name_info.
2336         (ada_get_symbol_name_cmp): Delete.
2337         (do_wild_match, do_full_match): New functions.
2338         (ada_lookup_name_info::ada_lookup_name_info): New method.
2339         (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
2340         functions.
2341         (ada_language_defn): Install ada_get_symbol_name_matcher.
2342         * ada-lex.l (processId): If name starts with '<', copy it
2343         verbatim.
2344         * block.c (block_iter_match_step, block_iter_match_first)
2345         (block_iter_match_next, block_lookup_symbol)
2346         (block_lookup_symbol_primary, block_find_symbol): Adjust to use
2347         lookup_name_info.
2348         * block.h (block_iter_match_first, block_iter_match_next)
2349         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
2350         * c-lang.c (c_language_defn, cplus_language_defn)
2351         (asm_language_defn, minimal_language_defn): Adjust comments to
2352         refer to la_get_symbol_name_matcher.
2353         * completer.c (complete_files_symbols)
2354         (collect_explicit_location_matches, symbol_completer): Pass a
2355         symbol_name_match_type down.
2356         * completer.h (class completion_match, completion_match_result):
2357         New classes.
2358         (completion_tracker::reset_completion_match_result): New method.
2359         (completion_tracker::m_completion_match_result): New field.
2360         * cp-support.c (make_symbol_overload_list_block): Adjust to use
2361         lookup_name_info.
2362         (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
2363         functions.
2364         * cp-support.h (cp_get_symbol_name_matcher): New declaration.
2365         * d-lang.c: Adjust comments to refer to
2366         la_get_symbol_name_matcher.
2367         * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
2368         Adjust to use lookup_name_info.
2369         (dict_iter_match_first, dict_iter_match_next)
2370         (iter_match_first_hashed, iter_match_next_hashed)
2371         (iter_match_first_linear, iter_match_next_linear): Adjust to work
2372         with a lookup_name_info.
2373         * dictionary.h (dict_iter_match_first, dict_iter_match_next):
2374         Likewise.
2375         * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
2376         (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
2377         (gdb_index_symbol_name_matcher): New class.
2378         (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
2379         gdb_index_symbol_name_matcher.  Accept a NULL symbol_matcher.
2380         * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
2381         with a symbol_name_match_type.
2382         (f_language_defn): Adjust comments to refer to
2383         la_get_symbol_name_matcher.
2384         * go-lang.c (go_language_defn): Adjust comments to refer to
2385         la_get_symbol_name_matcher.
2386         * language.c (default_symbol_name_matcher)
2387         (language_get_symbol_name_matcher): New functions.
2388         (unknown_language_defn, auto_language_defn): Adjust comments to
2389         refer to la_get_symbol_name_matcher.
2390         * language.h (symbol_name_cmp_ftype): Delete.
2391         (language_defn) <la_collect_symbol_completion_matches>: Add match
2392         type parameter.
2393         <la_get_symbol_name_cmp>: Delete field.
2394         <la_get_symbol_name_matcher>: New field.
2395         <la_iterate_over_symbols>: Adjust to use lookup_name_info.
2396         (default_symbol_name_matcher, language_get_symbol_name_matcher):
2397         Declare.
2398         * linespec.c (iterate_over_all_matching_symtabs)
2399         (iterate_over_file_blocks): Adjust to use lookup_name_info.
2400         (find_methods): Add language parameter, and use lookup_name_info
2401         and the language's symbol_name_matcher_ftype.
2402         (linespec_complete_function): Adjust.
2403         (lookup_prefix_sym): Use lookup_name_info.
2404         (add_all_symbol_names_from_pspace): Adjust.
2405         (find_superclass_methods): Add language parameter and pass it
2406         down.
2407         (find_method): Pass symbol language down.
2408         (find_linespec_symbols): Don't demangle or Ada encode here.
2409         (search_minsyms_for_name): Add lookup_name_info parameter.
2410         (add_matching_symbols_to_info): Add name_match_type parameter.
2411         Use lookup_name_info.
2412         * m2-lang.c (m2_language_defn): Adjust comments to refer to
2413         la_get_symbol_name_matcher.
2414         * minsyms.c: Include <algorithm>.
2415         (add_minsym_to_demangled_hash_table): Remove table parameter and
2416         add objfile parameter.  Use search_name_hash, and add language to
2417         demangled languages vector.
2418         (struct found_minimal_symbols): New struct.
2419         (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
2420         New functions.
2421         (lookup_minimal_symbol): Adjust to use them.  Don't canonicalize
2422         input names here.  Use lookup_name_info instead.  Lookup up
2423         demangled names once for each language in the demangled names
2424         vector.
2425         (iterate_over_minimal_symbols): Use lookup_name_info.  Lookup up
2426         demangled names once for each language in the demangled names
2427         vector.
2428         (build_minimal_symbol_hash_tables): Adjust.
2429         * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
2430         lookup_name_info.
2431         * objc-lang.c (objc_language_defn): Adjust comment to refer to
2432         la_get_symbol_name_matcher.
2433         * objfiles.h: Include <vector>.
2434         (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
2435         * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
2436         la_get_symbol_name_matcher.
2437         * p-lang.c (pascal_language_defn): Adjust comment to refer to
2438         la_get_symbol_name_matcher.
2439         * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
2440         (match_partial_symbol): Use symbol_name_match_type,
2441         lookup_name_info and psymbol_name_matches.
2442         (lookup_partial_symbol): Use lookup_name_info.
2443         (map_block): Use symbol_name_match_type and lookup_name_info.
2444         (psym_map_matching_symbols): Use symbol_name_match_type.
2445         (psymbol_name_matches): New.
2446         (recursively_search_psymtabs): Use lookup_name_info and
2447         psymbol_name_matches.  Rename 'kind' parameter to 'domain'.
2448         (psym_expand_symtabs_matching): Use lookup_name_info.  Rename
2449         'kind' parameter to 'domain'.
2450         * rust-lang.c (rust_language_defn): Adjust comment to refer to
2451         la_get_symbol_name_matcher.
2452         * symfile-debug.c (debug_qf_map_matching_symbols)
2453         (debug_qf_map_matching_symbols): Use symbol_name_match_type.
2454         (debug_qf_expand_symtabs_matching): Use lookup_name_info.
2455         * symfile.c (expand_symtabs_matching): Use lookup_name_info.
2456         * symfile.h (quick_symbol_functions) <map_matching_symbols>:
2457         Adjust to use symbol_name_match_type.
2458         <expand_symtabs_matching>: Adjust to use lookup_name_info.
2459         (expand_symtabs_matching): Adjust to use lookup_name_info.
2460         * symmisc.c (maintenance_expand_symtabs): Use
2461         lookup_name_info::match_any ().
2462         * symtab.c (symbol_matches_search_name): New.
2463         (eq_symbol_entry): Adjust to use lookup_name_info and the
2464         language's matcher.
2465         (demangle_for_lookup_info::demangle_for_lookup_info): New.
2466         (lookup_name_info::match_any): New.
2467         (iterate_over_symbols, search_symbols): Use lookup_name_info.
2468         (compare_symbol_name): Add language, lookup_name_info and
2469         completion_match_result parameters, and use them.
2470         (completion_list_add_name): Make extern.  Add language and
2471         lookup_name_info parameters.  Use them.
2472         (completion_list_add_symbol, completion_list_add_msymbol)
2473         (completion_list_objc_symbol): Add lookup_name_info parameters and
2474         adjust.  Pass down language.
2475         (completion_list_add_fields): Add lookup_name_info parameters and
2476         adjust.  Pass down language.
2477         (add_symtab_completions): Add lookup_name_info parameters and
2478         adjust.
2479         (default_collect_symbol_completion_matches_break_on): Add
2480         name_match_type parameter, and use it.  Use lookup_name_info.
2481         (default_collect_symbol_completion_matches)
2482         (collect_symbol_completion_matches): Add name_match_type
2483         parameter, and pass it down.
2484         (collect_symbol_completion_matches_type): Adjust.
2485         (collect_file_symbol_completion_matches): Add name_match_type
2486         parameter, and use lookup_name_info.
2487         * symtab.h: Include <string> and "common/gdb_optional.h".
2488         (enum class symbol_name_match_type): New.
2489         (class ada_lookup_name_info): New.
2490         (struct demangle_for_lookup_info): New.
2491         (class lookup_name_info): New.
2492         (symbol_name_matcher_ftype): New.
2493         (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
2494         (symbol_matches_search_name): Declare.
2495         (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
2496         (default_collect_symbol_completion_matches)
2497         (collect_symbol_completion_matches)
2498         (collect_file_symbol_completion_matches): Add name_match_type
2499         parameter.
2500         (iterate_over_symbols): Use lookup_name_info.
2501         (completion_list_add_name): Declare.
2502         * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
2503         (strncmp_iw_with_mode): Now extern.
2504         * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
2505         (strncmp_iw_with_mode): Declare.
2506
2507 2017-11-08  Keith Seitz  <keiths@redhat.com>
2508             Pedro Alves  <palves@redhat.com>
2509
2510         * ada-lang.c (ada_language_defn): Install
2511         default_search_name_hash.
2512         * buildsym.c (struct buildsym_compunit): <language>: New field.
2513         (finish_block_internal): Pass language when creating dictionaries.
2514         (start_buildsym_compunit, start_symtab): New language parameters.
2515         Use them.
2516         (restart_symtab): Pass down compilation unit's language.
2517         * buildsym.h (enum language): Forward declare.
2518         (start_symtab): New 'language' parameter.
2519         * c-lang.c (c_language_defn, cplus_language_defn)
2520         (asm_language_defn, minimal_language_defn): Install
2521         default_search_name_hash.
2522         * coffread.c (coff_start_symtab): Adjust.
2523         * d-lang.c (d_language_defn): Install default_search_name_hash.
2524         * dbxread.c (struct symloc): Add 'pst_language' field.
2525         (PST_LANGUAGE): Define.
2526         (start_psymtab, read_ofile_symtab): Use it.
2527         (process_one_symbol): New 'language' parameter.  Pass it down.
2528         * dictionary.c (struct dictionary) <language>: New field.
2529         (DICT_LANGUAGE): Define.
2530         (dict_create_hashed, dict_create_hashed_expandable)
2531         (dict_create_linear, dict_create_linear_expandable): New parameter
2532         'language'.  Set the dictionary's language.
2533         (iter_match_first_hashed): Adjust to rename.
2534         (insert_symbol_hashed): Assert we don't see mismatching
2535         languages.  Adjust to rename.
2536         (dict_hash): Rename to ...
2537         (default_search_name_hash): ... this and make extern.
2538         * dictionary.h (struct language_defn): Forward declare.
2539         (dict_create_hashed): New parameter 'language'.
2540         * dwarf2read.c (dwarf2_start_symtab): Pass down language.
2541         * f-lang.c (f_language_defn): Install default_search_name_hash.
2542         * go-lang.c (go_language_defn): Install default_search_name_hash.
2543         * jit.c (finalize_symtab): Pass compunit's language to dictionary
2544         creation.
2545         * language.c (unknown_language_defn, auto_language_defn):
2546         * language.h (language_defn::la_search_name_hash): New field.
2547         (default_search_name_hash): Declare.
2548         * m2-lang.c (m2_language_defn): Install default_search_name_hash.
2549         * mdebugread.c (new_block): New parameter 'language'.
2550         * mdebugread.c (parse_symbol): Pass symbol language to block
2551         allocation.
2552         (psymtab_to_symtab_1): Pass down language.
2553         (new_symtab): Pass compunit's language to block allocation.
2554         * objc-lang.c (objc_language_defn): Install
2555         default_search_name_hash.
2556         * opencl-lang.c (opencl_language_defn):
2557         * p-lang.c (pascal_language_defn): Install
2558         default_search_name_hash.
2559         * rust-lang.c (rust_language_defn): Install
2560         default_search_name_hash.
2561         * stabsread.h (enum language): Forward declare.
2562         (process_one_symbol): Add 'language' parameter.
2563         * symtab.c (search_name_hash): New function.
2564         * symtab.h (search_name_hash): Declare.
2565         * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
2566
2567 2017-11-08  Pedro Alves  <palves@redhat.com>
2568
2569         * cp-name-parser.y (main): Don't initialize extra_chars.
2570
2571 2017-11-07  Tom Tromey  <tom@tromey.com>
2572
2573         * event-top.h (command_handler): Constify.
2574         * record-full.c (cmd_record_full_start): Update.
2575         * thread.c (thread_apply_all_command): Update.
2576         * printcmd.c (eval_command): Update.
2577         * mi/mi-main.c (mi_execute_cli_command): Update.
2578         (mi_execute_async_cli_command): Update.
2579         * tui/tui-stack.c (tui_update_command): Update.
2580         * cli/cli-interp.c (safe_execute_command): Constify.
2581         * record.c (record_start): Update.
2582         (record_start, record_stop, cmd_record_start): Update.
2583         * record-btrace.c (cmd_record_btrace_bts_start): Update.
2584         (cmd_record_btrace_pt_start): Update.
2585         (cmd_record_btrace_start): Update.
2586         (cmd_record_btrace_start): Update.
2587         * reverse.c (exec_reverse_once): Update.
2588         * python/python.c (execute_gdb_command): Don't copy the command.
2589         * event-top.c (command_line_handler): Update.
2590         (command_handler): Constify.
2591         * defs.h (deprecated_call_command_hook): Constify.
2592         * cli/cli-script.h (execute_user_command): Constify.
2593         * cli/cli-script.c (execute_user_command): Constify.
2594         (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
2595         (enum command_control_type): Update.
2596         * main.c (catch_command_errors): Remove non-const overload.
2597         (catch_command_errors_ftype): Remove.
2598         * python/py-cmd.c (cmdpy_function): Constify.
2599         * guile/scm-cmd.c (cmdscm_function): Constify.
2600         * cli/cli-dump.c (call_dump_func): Constify.
2601         * cli/cli-decode.c (do_const_cfunc): Constify.
2602         (do_sfunc): Constify.
2603         (cmd_func): Constify.
2604         * gdbcmd.h (execute_command, execute_command_to_string): Constify.
2605         * top.h (execute_command): Constify.
2606         * top.c (execute_command): Constify.
2607         (execute_command_to_string): Constify.
2608         (deprecated_call_command_hook): Constify.
2609         * command.h (cmd_func): Constify.
2610         * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
2611
2612 2017-11-07  Tom Tromey  <tom@tromey.com>
2613
2614         * ada-lang.c (catch_ada_exception_command): Constify.
2615         (catch_assert_command): Constify.
2616         * break-catch-throw.c (catch_catch_command, catch_throw_command)
2617         (catch_rethrow_command): Constify.
2618         (catch_exception_command_1): Constify.
2619         * breakpoint.h (add_catch_command): Constify.
2620         * break-catch-syscall.c (catch_syscall_command_1): Constify.
2621         (catch_syscall_split_args): Constify.
2622         * break-catch-sig.c (catch_signal_command): Constify.
2623         (catch_signal_split_args): Constify.
2624         * cli/cli-decode.h (struct cmd_list_element) <function>: Use
2625         cmd_const_sfunc_ftype.
2626         * cli/cli-decode.c (add_setshow_cmd_full): Constify.
2627         (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
2628         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
2629         (add_setshow_string_cmd, struct cmd_list_element)
2630         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
2631         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
2632         (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
2633         Constify.
2634         (set_cmd_sfunc): Constify.
2635         (empty_sfunc): Constify.
2636         * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
2637         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
2638         (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
2639         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
2640         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
2641         (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
2642         Constify.
2643         (set_cmd_sfunc): Constify.
2644         (cmd_sfunc_ftype): Remove.
2645         * compile/compile.c (set_compile_args): Constify.
2646         * infrun.c (set_disable_randomization): Constify.
2647         * infcmd.c (set_args_command, set_cwd_command): Constify.
2648         * breakpoint.c (set_condition_evaluation_mode): Constify.
2649         (add_catch_command): Constify.
2650         (catch_fork_command_1, catch_exec_command_1)
2651         (catch_load_command_1, catch_unload_command_1): Constify.
2652         (catch_load_or_unload): Constify.
2653         * guile/scm-param.c (pascm_set_func): Constify.
2654         (add_setshow_generic): Constify.
2655         * python/py-param.c (get_set_value): Constify.
2656         * top.h (set_verbose): Constify.
2657         * tui/tui-win.c (tui_set_var_cmd): Constify.
2658         * mi/mi-main.c (set_mi_async_command): Constify.
2659         * cli/cli-logging.c (set_logging_overwrite)
2660         (set_logging_redirect): Constify.
2661         * value.c (set_max_value_size): Constify.
2662         * valprint.c (set_input_radix, set_output_radix): Constify.
2663         * utils.c (set_width_command, set_height_command): Constify.
2664         * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
2665         * tracepoint.c (set_disconnected_tracing)
2666         (set_circular_trace_buffer, set_trace_buffer_size)
2667         (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
2668         * top.c (set_history_size_command, set_verbose, set_editing)
2669         (set_gdb_datadir, set_history_filename): Constify.
2670         * target.c (set_targetdebug, maint_set_target_async_command)
2671         (maint_set_target_non_stop_command, set_target_permissions)
2672         (set_write_memory_permission): Constify.
2673         (open_target): Constify.
2674         * target-descriptions.c (set_tdesc_filename_cmd): Constify.
2675         * target-dcache.c (set_stack_cache, set_code_cache): Constify.
2676         * symtab.c (set_symbol_cache_size_handler): Constify.
2677         * symfile.c (set_ext_lang_command): Constify.
2678         * symfile-debug.c (set_debug_symfile): Constify.
2679         * source.c (set_directories_command): Constify.
2680         * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
2681         * serial.c (set_parity): Constify.
2682         * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
2683         * remote.c (set_remote_exec_file, set_remotebreak)
2684         (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
2685         * record.c (set_record_insn_history_size)
2686         (set_record_call_history_size): Constify.
2687         * record-full.c (set_record_full_insn_max_num): Constify.
2688         * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
2689         * osabi.c (set_osabi): Constify.
2690         * mips-tdep.c (set_mips64_transfers_32bit_regs)
2691         (reinit_frame_cache_sfunc, mips_abi_update): Constify.
2692         * maint.c (maintenance_set_profile_cmd): Constify.
2693         * linux-thread-db.c (set_libthread_db_search_path): Constify.
2694         * language.c (set_language_command, set_range_command)
2695         (set_case_command): Constify.
2696         * infrun.c (set_non_stop, set_observer_mode)
2697         (set_stop_on_solib_events, set_schedlock_func)
2698         (set_exec_direction_func): Constify.
2699         * infcmd.c (set_inferior_tty_command): Constify.
2700         * disasm.c (set_disassembler_options_sfunc): Constify.
2701         * demangle.c (set_demangling_command): Constify.
2702         * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
2703         * cris-tdep.c (set_cris_version, set_cris_mode)
2704         (set_cris_dwarf2_cfi): Constify.
2705         * corefile.c (set_gnutarget_command): Constify.
2706         * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
2707         (set_target_wide_charset_sfunc): Constify.
2708         * breakpoint.c (update_dprintf_commands): Constify.
2709         * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
2710         * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
2711         (set_disassembly_style_sfunc): Constify.
2712         * arch-utils.c (set_endian, set_architecture): Constify.
2713         * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
2714         * agent.c (set_can_use_agent): Constify.
2715
2716 2017-11-07  Tom Tromey  <tom@tromey.com>
2717
2718         * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
2719         (go32_pde, go32_pte, go32_pte_for_address): Constify.
2720         * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
2721         (set_thread_default_pause_cmd, set_thread_default_run_cmd)
2722         (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
2723         (parse_int_arg, show_thread_default_detach_sc_cmd)
2724         (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
2725         (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
2726         (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
2727         (show_task_pause_cmd, set_task_detach_sc_cmd)
2728         (show_task_detach_sc_cmd, set_task_exc_port_cmd)
2729         (set_noninvasive_cmd, set_thread_pause_cmd)
2730         (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
2731         (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
2732         (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
2733         * windows-nat.c (display_selectors): Constify.
2734         * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
2735         non-const "cfunc".
2736         * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
2737         (cmd_cfunc_eq): Likewise.
2738         (struct cmd_list_element): Likewise.
2739         (do_cfunc): Remove.
2740         (cli_user_command_p): Update.
2741         * command.h (add_cmd): Remove non-const overload.
2742         (cmd_cfunc_ftype): Remove typedef.
2743         (cmd_cfunc_eq): Remove non-const overload.
2744         * value.c (show_values): Constify.
2745         * thread.c (thread_apply_all_command): Constify.
2746         * symfile.c (load_command): Constify.
2747         * source.c (directory_command): Constify.
2748         * maint.c (maintenance_internal_error)
2749         (maintenance_demangler_warning, maintenance_space_display)
2750         (maintenance_print_architecture, maintenance_translate_address)
2751         (maintenance_info_selftests, maintenance_internal_warning):
2752         Constify.
2753         * breakpoint.c (disable_trace_command, enable_trace_command):
2754         Constify.
2755         * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
2756         Constify.
2757         (add_auto_load_safe_path): Constify.
2758         * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
2759         * top.h (show_commands): Constify.
2760         * linux-thread-db.c (info_auto_load_libthread_db): Constify.
2761         * sparc64-tdep.c (adi_examine_command): Constify.
2762         (adi_assign_command): Constify.
2763
2764 2017-11-07  Tom Tromey  <tom@tromey.com>
2765
2766         * frame.h (info_locals_command, info_args_command): Constify.
2767         * auto-load.h (auto_load_info_scripts): Constify.
2768         * inferior.h (registers_info): Constify.
2769         * copying.c: Rebuild.
2770         * copying.awk: Constify generated commands.
2771         * auto-load.c (auto_load_info_scripts)
2772         (info_auto_load_gdb_scripts): Constify.
2773         * cli/cli-decode.c (struct cmd_list_element): Take a
2774         cmd_const_cfunc_ftype.
2775         * command.h (add_info): Take a cmd_const_cfunc_ftype.
2776         * tui/tui-win.c (tui_all_windows_info): Constify.
2777         * python/py-auto-load.c (info_auto_load_python_scripts):
2778         Constify.
2779         * cli/cli-cmds.c (show_command): Remove non-const overload.
2780         * tracepoint.c (info_tvariables_command, info_scope_command):
2781         Constify.
2782         (info_static_tracepoint_markers_command): Constify.
2783         * thread.c (info_threads_command): Constify.
2784         (print_thread_info_1): Constify.
2785         * target.c (info_target_command): Constify.
2786         * symtab.c (info_sources_command, info_functions_command)
2787         (info_types_command): Constify.
2788         (info_variables_command): Remove non-const overload.
2789         * symfile.c (info_ext_lang_command): Constify.
2790         * stack.c (info_frame_command, info_locals_command)
2791         (info_args_command): Constify.
2792         (backtrace_command): Remove non-const overload.
2793         * source.c (info_source_command, info_line_command): Constify.
2794         * solib.c (info_sharedlibrary_command): Constify.
2795         * skip.c (info_skip_command): Constify.
2796         * ser-go32.c (info_serial_command): Constify.
2797         * reverse.c (info_bookmarks_command): Constify.
2798         * printcmd.c (info_symbol_command, info_address_command)
2799         (info_display_command): Constify.
2800         * osdata.c (info_osdata_command): Constify.
2801         * objc-lang.c (info_selectors_command, info_classes_command):
2802         Constify.
2803         * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
2804         * memattr.c (info_mem_command): Constify.
2805         * macrocmd.c (info_macro_command, info_macros_command): Constify.
2806         * linux-fork.c (info_checkpoints_command): Constify.
2807         * infrun.c (info_signals_command): Constify.
2808         * inflow.c (info_terminal_command): Constify.
2809         * inferior.c (info_inferiors_command): Constify.
2810         (print_inferior): Constify.
2811         * infcmd.c (info_program_command, info_all_registers_command)
2812         (info_registers_command, info_vector_command)
2813         (info_float_command): Constify.
2814         (registers_info): Constify.
2815         * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
2816         (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
2817         Constify.
2818         * f-valprint.c (info_common_command): Constify.
2819         * dcache.c (info_dcache_command): Constify.
2820         (dcache_info_1): Constify.
2821         * darwin-nat-info.c (info_mach_tasks_command)
2822         (info_mach_task_command, info_mach_ports_command)
2823         (info_mach_port_command, info_mach_threads_command)
2824         (info_mach_thread_command, info_mach_regions_command)
2825         (info_mach_regions_recurse_command, info_mach_region_command)
2826         (info_mach_exceptions_command): Constify.
2827         (get_task_from_args): Constify.
2828         * cp-support.c (info_vtbl_command): Constify.
2829         * breakpoint.c (info_watchpoints_command)
2830         (info_tracepoints_command): Constify.
2831         (info_breakpoints_command): Remove non-const overload.
2832         * avr-tdep.c (avr_io_reg_read_command): Constify.
2833         * auxv.c (info_auxv_command): Constify.
2834         * ada-tasks.c (info_tasks_command): Constify.
2835         (info_task): Constify.
2836         * ada-lang.c (info_exceptions_command): Constify.
2837
2838 2017-11-07  Tom Tromey  <tom@tromey.com>
2839
2840         * solib.h (no_shared_libraries): Constify.
2841         * frame.h (return_command): Constify.
2842         * cli/cli-cmds.h (quit_command): Constify.
2843         * top.h (quit_command, execute_command): Constify.
2844         * target.h (flash_erase_command): Constify.
2845         * inferior.h (set_inferior_args, attach_command): Constify.
2846         * tracepoint.h (start_tracing, stop_tracing): Constify.
2847         * breakpoint.h (break_command, tbreak_command)
2848         (hbreak_command_wrapper, thbreak_command_wrapper)
2849         (rbreak_command_wrapper, watch_command_wrapper)
2850         (awatch_command_wrapper, rwatch_command_wrapper)
2851         (get_tracepoint_by_number): Constify.
2852         * symtab.c (info_variables_command, rbreak_command)
2853         (symtab_symbol_info): Constify.
2854         (info_variables_command): Add non-const overload.
2855         * top.c (dont_repeat_command): Constify.
2856         * breakpoint.c (ignore_command, commands_command)
2857         (condition_command, tbreak_command, hbreak_command)
2858         (thbreak_command, clear_command, break_command)
2859         (info_breakpoints_command, watch_command, rwatch_command)
2860         (awatch_command, trace_command, ftrace_command, strace_command)
2861         (trace_pass_command, break_range_command, dprintf_command)
2862         (agent_printf_command, get_tracepoint_by_number)
2863         (watch_maybe_just_location, trace_pass_command): Constify.
2864         (info_breakpoints_command): Add non-const overload.
2865         * tracefile.c (tsave_command): Constify.
2866         * infcmd.c (attach_command, disconnect_command, signal_command)
2867         (queue_signal_command, stepi_command, nexti_command)
2868         (finish_command, next_command, step_command, until_command)
2869         (advance_command, jump_command, continue_command, run_command)
2870         (start_command, starti_command, interrupt_command)
2871         (run_command_1, set_inferior_args, step_1): Constify.
2872         * inferior.c (add_inferior_command, remove_inferior_command)
2873         (clone_inferior_command): Constify.
2874         * linux-fork.c (checkpoint_command, restart_command): Constify.
2875         * windows-nat.c (signal_event_command): Constify.
2876         * guile/guile.c (guile_repl_command, guile_command): Constify.
2877         * printcmd.c (x_command, display_command, printf_command)
2878         (output_command, set_command, call_command, print_command)
2879         (eval_command): Constify.
2880         (non_const_set_command): Remove.
2881         (_initialize_printcmd): Update.
2882         * source.c (forward_search_command, reverse_search_command):
2883         Constify.
2884         * jit.c (jit_reader_load_command, jit_reader_unload_command):
2885         Constify.
2886         * infrun.c (handle_command): Constify.
2887         * memattr.c (mem_command): Constify.
2888         * stack.c (return_command, up_command, up_silently_command)
2889         (down_command, down_silently_command, frame_command)
2890         (backtrace_command, func_command, backtrace_command_1): Constify.
2891         (backtrace_command): Add non-const overload.
2892         * remote-sim.c (simulator_command): Constify.
2893         * exec.c (set_section_command): Constify.
2894         * tracepoint.c (tdump_command, trace_variable_command)
2895         (tstatus_command, tstop_command, tstart_command)
2896         (end_actions_pseudocommand, while_stepping_pseudocommand)
2897         (collect_pseudocommand, teval_pseudocommand, actions_command)
2898         (start_tracing, stop_tracing): Constify.
2899         * value.c (init_if_undefined_command): Constify.
2900         * tui/tui-stack.c (tui_update_command): Constify.
2901         * tui/tui-win.c (tui_refresh_all_command)
2902         (tui_set_tab_width_command, tui_set_win_height_command)
2903         (tui_set_focus_command, tui_scroll_forward_command)
2904         (tui_scroll_backward_command, tui_scroll_left_command)
2905         (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
2906         (tui_set_win_height): Constify.
2907         * tui/tui-layout.c (tui_layout_command): Constify.
2908         * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
2909         (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
2910         (proc_untrace_sysexit_cmd): Constify.
2911         * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
2912         (threadset_test_cmd, threadlist_update_test_cmd)
2913         (threadalive_test): Constify.
2914         * objc-lang.c (print_object_command): Constify.
2915         * command.h (add_com): Constify.
2916         * cli/cli-dump.c (restore_command): Constify.
2917         * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
2918         (help_command, complete_command, shell_command, edit_command)
2919         (list_command, disassemble_command, make_command)
2920         (apropos_command, alias_command): Constify.
2921         * cli/cli-script.c (document_command, define_command)
2922         (while_command, if_command, validate_comname): Constify.
2923         * cli/cli-decode.c (struct cmd_list_element): Change type of
2924         "fun".
2925         * target.c (do_monitor_command, flash_erase_command): Constify.
2926         * regcache.c (reg_flush_command): Constify.
2927         * reverse.c (reverse_step, reverse_next, reverse_stepi)
2928         (reverse_nexti, reverse_continue, reverse_finish)
2929         (save_bookmark_command, goto_bookmark_command)
2930         (exec_reverse_once): Constify.
2931         * python/python.c (python_interactive_command, python_command):
2932         Constify.
2933         * typeprint.c (ptype_command, whatis_command, whatis_exp):
2934         Constify.
2935         * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
2936         * gcore.c (gcore_command): Constify.
2937
2938 2017-11-07  Tom Tromey  <tom@tromey.com>
2939
2940         * printcmd.c (x_command): Call set_repeat_arguments.
2941         * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
2942         * top.c (repeat_arguments): New global.
2943         (set_repeat_arguments): New function.
2944         (execute_command): Handle repeat_arguments.
2945         (show_commands): Calls set_repeat_arguments.
2946         * command.h (set_repeat_arguments): Declare.
2947
2948 2017-11-07  Tom Tromey  <tom@tromey.com>
2949
2950         * stack.c (backtrace_command): Use std::string.
2951         (backtrace_command_1): Make "count_exp" const.
2952
2953 2017-11-07  Tom Tromey  <tom@tromey.com>
2954
2955         * source.c (directory_switch, mod_path, add_path): Constify.
2956         * defs.h (add_path, mod_path, directory_switch): Constify.
2957         * mi/mi-cmd-env.c (env_mod_path): Constify.
2958
2959 2017-11-07  Tom Tromey  <tom@tromey.com>
2960
2961         * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
2962         (run_command_1, continue_command, step_1, jump_command)
2963         (signal_command, until_command, advance_command, finish_command)
2964         (attach_command): Update.
2965
2966 2017-11-07  Tom Tromey  <tom@tromey.com>
2967
2968         * command.h (set_cmd_cfunc): Don't declare.
2969         * cli/cli-decode.c (set_cmd_cfunc): Now static.
2970
2971 2017-11-07  Tom Tromey  <tom@tromey.com>
2972
2973         * stack.c (select_frame_command): Constify.
2974         * cli/cli-decode.c (add_com_suppress_notification): Constify.
2975         * command.h (add_com_suppress_notification): Constify.
2976
2977 2017-11-07  Tom Tromey  <tom@tromey.com>
2978
2979         * breakpoint.c (stop_command): Constify.
2980         * cli/cli-decode.c (struct cmd_list_element): Constify.
2981         * command.h (add_abbrev_prefix_cmd): Constify.
2982
2983 2017-11-07  Pedro Alves  <palves@redhat.com>
2984
2985         * breakpoint.c (extract_bp_kind): New enum.
2986         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
2987         factored out from ...
2988         (extract_bp_number_and_location): ... here.
2989         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
2990
2991 2017-11-07  Pedro Alves  <palves@redhat.com>
2992
2993         * breakpoint.c (extract_bp_number_and_location): Change return
2994         type to void.  Throw error instead of warning.
2995         (enable_disable_command): Adjust.
2996
2997 2017-11-07  Xavier Roirand  <roirand@adacore.com>
2998             Pedro Alves  <palves@redhat.com>
2999
3000         * breakpoint.c (map_breakpoint_number_range): New, factored out
3001         from ...
3002         (map_breakpoint_numbers): ... here.
3003         (find_location_by_number): Change parameters from string to
3004         breakpoint number and location.
3005         (extract_bp_number_and_location): New function.
3006         (enable_disable_bp_num_loc)
3007         (enable_disable_breakpoint_location_range)
3008         (enable_disable_command): New functions, factored out ...
3009         (enable_command, disable_command): ... these functions, and
3010         adjusted to support ranges.
3011         * NEWS: Document enable/disable breakpoint location range feature.
3012
3013 2017-11-06  Luis Machado  <luis.machado@linaro.org>
3014
3015         * MAINTAINERS (Write After Approval): Update my e-mail address.
3016
3017 2017-11-06  Pedro Alves  <palves@redhat.com>
3018
3019         * gnu-nat.c (gnu_terminal_init): Delete.
3020         (gnu_target): Don't install gnu_terminal_init.
3021         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
3022         (child_terminal_init): ... this function.
3023
3024 2017-11-06  Pedro Alves  <palves@redhat.com>
3025
3026         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
3027         sgtty.h.
3028         * config.in, configure: Regenerate.
3029
3030 2017-11-06  Pedro Alves  <palves@redhat.com>
3031
3032         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
3033         (async_init_signals): Adjust.
3034         (handle_stop_sig): Rename to ...
3035         (handle_sigtstp): ... this.
3036         (async_stop_sig): Rename to ...
3037         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
3038         SIGTSTP path.
3039         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
3040         instead of STOP_SIGNAL thoughout.
3041         (handle_stop_sig): Rename to ...
3042         (handle_sigtstp): ... this.
3043         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
3044
3045 2017-11-06  Pedro Alves  <palves@redhat.com>
3046
3047         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
3048         longer set flags twice in row.
3049
3050 2017-11-06  Pedro Alves  <palves@redhat.com>
3051
3052         * Makefile.in (SER_HARDWIRE): Update comment.
3053         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
3054         * common/gdb_termios.h: Delete file.
3055         * common/job-control.c: Include termios.h and unistd.h instead of
3056         gdb_termios.h.
3057         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
3058         check.
3059         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
3060         Remove sgtty code.
3061         * configure.ac: No longer check for termio.h and sgtty.h.
3062         * configure: Regenerate.
3063         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
3064         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
3065         Replace PROCESS_GROUP_TYPE references with pid_t references
3066         throughout.
3067         (gdb_getpgrp): Delete.
3068         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
3069         (child_terminal_inferior): Remove comment.  Remove sgtty code.
3070         (child_terminal_ours_1): Use tcgetpgrp directly instead of
3071         gdb_getpgrp.  Use serial_set_tty_state instead aof
3072         serial_noflush_set_tty_state.  Remove sgtty code.
3073         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
3074         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
3075         (inferior_process_group): Now returns pid_t.
3076         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
3077         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
3078         * ser-event.c (serial_event_ops): Update.
3079         * ser-go32.c (dos_noflush_set_tty_state): Delete.
3080         (dos_ops): Update.
3081         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
3082         * ser-pipe.c (pipe_ops): Update.
3083         * ser-tcp.c (tcp_ops): Update.
3084         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
3085         HAVE_TERMIOS checks.
3086         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
3087         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
3088         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
3089         assume termios.
3090         (hardwire_noflush_set_tty_state): Delete.
3091         (hardwire_print_tty_state, hardwire_drain_output)
3092         (hardwire_flush_output, hardwire_flush_input)
3093         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
3094         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
3095         code, and assume termios.
3096         (hardwire_ops): Update.
3097         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
3098         * serial.c (serial_noflush_set_tty_state): Delete.
3099         * serial.h (serial_noflush_set_tty_state): Delete.
3100         (serial_ops::noflush_set_tty_state): Delete.
3101
3102 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
3103
3104         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
3105         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
3106         (COMMON_OBS): Remove doublest.o and dfp.o.
3107         Do not build target-float.c (instead of doublest.c)
3108         with -Wformat-nonliteral.
3109
3110         * doublest.c: Remove file.
3111         * doublest.h: Remove file.
3112         * dfp.c: Remove file.
3113         * dfp.h: Remove file.
3114
3115         * target-float.c: Do not include "doublest.h" and "dfp.h".
3116         (DOUBLEST): Move here from doublest.h.
3117         (enum float_kind): Likewise.
3118         (FLOATFORMAT_CHAR_BIT): Likewise.
3119         (FLOATFORMAT_LARGEST_BYTES): Likewise.
3120         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
3121         (floatformat_precision): Likewise.
3122         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
3123         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
3124         Likewise.
3125         (host_float_format, host_double_format, host_long_double_format):
3126         Likewise.
3127         (floatformat_to_string, floatformat_from_string): Likewise.
3128         (floatformat_to_doublest): Likewise.  Also, inline the original
3129         convert_floatformat_to_doublest.
3130         (floatformat_from_doublest): Likewise.  Also, inline the original
3131         convert_floatformat_from_doublest.
3132
3133         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
3134         (MAX_DECIMAL_STRING): Move here from dfp.c.
3135         (match_endianness): Likewise.
3136         (set_decnumber_context, decimal_check_errors): Likewise.
3137         (decimal_from_number, decimal_to_number): Likewise.
3138         (decimal_to_string, decimal_from_string): Likewise.  Make static.
3139         (decimal_from_longest, decimal_from_ulongest): Likewise.
3140         (decimal_to_longest): Likewise.
3141         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
3142         (decimal_convert): Likewise.
3143
3144 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
3145
3146         * doublest.c: Do not include "gdbtypes.h".
3147         (extract_typed_floating): Remove.
3148         (store_typed_floating): Remove.
3149         (convert_typed_floating): Remove.
3150         * doublest.h (struct type): Remove.
3151         (DOUBLEST_PRINT_FORMAT): Remove.
3152         (DOUBLEST_SCAN_FORMAT): Remove.
3153         (extract_typed_floating): Remove.
3154         (store_typed_floating): Remove.
3155         (convert_typed_floating): Remove.
3156
3157         * dfp.c (decimal_from_doublest): Remove.
3158         (decimal_to_doublest): Remove.
3159         * dfp.h: Do not include "doublest.h".
3160         (decimal_from_doublest): Remove.
3161         (decimal_to_doublest): Remove.
3162
3163         * value.c: Do not include "doublest.h" and "dfp.h".
3164         (value_as_double): Remove.
3165         (unpack_double): Remove.
3166         (value_from_double): Remove.
3167         (value_from_decfloat): Remove.
3168         * value.h: Do not include "doublest.h".
3169         (value_as_double): Remove.
3170         (unpack_double): Remove.
3171         (value_from_double): Remove.
3172         (value_from_decfloat): Remove.
3173
3174 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
3175
3176         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
3177         (i386_extract_return_value): Use target_float_convert.
3178         (i386_store_return_value): Likewise.
3179         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
3180         (i387_value_to_register): Likewise.
3181         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
3182         (ia64_register_to_value): Use target_float_convert.
3183         (ia64_value_to_register): Likewise.
3184         (ia64_extract_return_value): Likewise.
3185         (ia64_store_return_value): Likewise.
3186         (ia64_push_dummy_call): Likewise.
3187         * m68k-tdep.c: Include "target-float.h".
3188         (m68k_register_to_value): Use target_float_convert.
3189         (m68k_value_to_register): Likewise.
3190         (m68k_svr4_extract_return_value): Likewise.
3191         (m68k_svr4_store_return_value): Likewise.
3192         * ppc-sysv-tdep.c: Include "target-float.h".
3193         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
3194         (do_ppc_sysv_return_value): Likewise.
3195         (ppc64_sysv_abi_push_freg): Likewise.
3196         (ppc64_sysv_abi_return_value_base): Likewise.
3197         * rs6000-aix-tdep.c: Include "target-float.h".
3198         (rs6000_push_dummy_call): Use target_float_convert.
3199         (rs6000_return_value): Likewise.
3200         * rs6000-lynx178-tdep.c: Include "target-float.h".
3201         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
3202         (rs6000_lynx178_return_value): Likewise.
3203         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
3204         (rs6000_register_to_value): Use target_float_convert.
3205         (rs6000_value_to_register): Likewise.
3206         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
3207         (arm_extract_return_value): Use target_float_convert.
3208         (arm_store_return_value): Likewise.
3209         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
3210         (sh_register_convert_to_virtual): Use target_float_convert.
3211         (sh_register_convert_to_raw): Likewise.
3212         * sh64-tdep.c: Include "target-float.h".
3213         (sh64_extract_return_value): Use target_float_convert.
3214         (sh64_register_convert_to_virtual): Likewise.
3215         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
3216
3217 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
3218
3219         * target-float.c (floatformat_to_host_double): New function.
3220         (floatformat_from_host_double): Likewise.
3221         (target_float_to_host_double): Likewise.
3222         (target_float_from_host_double): Likewise.
3223         * target-float.h (target_float_to_host_double): Add prototype.
3224         (target_float_from_host_double): Likewise.
3225
3226         * guile/scm-value.c: Include "target-float.h".
3227         (gdbscm_value_to_real): Use target_float_to_host_double.
3228         Handle integer source values via value_as_long.
3229         * guile/scm-math.c: Include "target-float.h".  Do not include
3230         "doublest.h", "dfp.h", and "expression.h".
3231         (vlscm_convert_typed_number): Use target_float_from_host_double.
3232         (vlscm_convert_number): Likewise.
3233
3234         * python/py-value.c (valpy_float): Use target_float_to_host_double.
3235         (convert_value_from_python): Use target_float_from_host_double.
3236
3237 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
3238
3239         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
3240         (cast_from_fixed): Likewise.
3241         (ada_scaling_type): New function.
3242         (ada_delta): Return value instead of DOUBLEST.  Perform target
3243         arithmetic instead of host arithmetic.
3244         (scaling_factor): Rename to ...
3245         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
3246         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
3247         (ada_fixed_to_float): Remove.
3248         (ada_float_to_fixed): Remove.
3249         * ada-lang.h (ada_fixed_to_float): Remove.
3250         (ada_float_to_fixed): Remove.
3251         (ada_delta): Return value instead of DOUBLEST.
3252         (ada_scaling_factor): Add prototype.
3253
3254         * ada-typeprint.c: Include "target-float.h".
3255         (print_fixed_point_type): Perform target arithmetic instead of
3256         host arithmetic.
3257         * ada-valprint.c: Include "target-float.h".
3258         (ada_val_print_num): Perform target arithmetic instead of
3259         host arithmetic for fixed-point types.
3260
3261 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
3262
3263         * target-float.c: Include <math.h>.
3264         (floatformat_binop): New function.
3265         (floatformat_compare): Likewise.
3266         (target_float_binop): Likewise.
3267         (target_float_compare): Likewise.
3268         * target-float.h: Include "expression.h".
3269         (target_float_binop): Add prototype.
3270         (target_float_compare): Likewise.
3271
3272         * valarith.c: Do not include "doublest.h" and "dfp.h".
3273         Include "common/byte-vector.h".
3274         (value_args_as_decimal): Remove, replace by ...
3275         (value_args_as_target_float): ... this function.  Handle both
3276         binary and decimal target floating-point formats.
3277         (scalar_binop): Handle both binary and decimal FP using
3278         value_args_as_target_float and target_float_binop.
3279         (value_equal): Handle both binary and decimal FP using
3280         value_args_as_target_float and target_float_compare.
3281         (value_less): Likewise.
3282         (value_pos): Handle all scalar types as simple copy.
3283         (value_neg): Handle all scalar types via BINOP_SUB from 0.
3284         * dfp.c (decimal_binop): Throw error instead of internal_error
3285         when called with an unsupported operation code.
3286
3287 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
3288
3289         * target-float.c (target_float_to_string): New function.
3290         (target_float_from_string): New function.
3291         * target-float.h (target_float_to_string): Add prototype.
3292         (target_float_from_string): Add prototype.
3293
3294         * valprint.c: Include "target-float.h".  Do not include
3295         "doublest.h" and "dfp.h".
3296         (print_floating): Use target_float_to_string.
3297         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
3298         (printf_floating): Use target_float_to_string.
3299         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
3300         (print_i387_value): Use target_float_to_string.
3301         * mips-tdep.c: Include "target-float.h".
3302         (mips_print_fp_register): Use target_float_to_string.
3303         * sh64-tdep.c: Include "target-float.h".
3304         (sh64_do_fp_register): Use target_float_to_string.
3305
3306         * parse.c: Include "target-float.h".  Do not include
3307         "doublest.h" and "dfp.h".
3308         (parse_float): Use target_float_from_string.
3309         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
3310         (define_symbol): Use target_float_from_string.
3311         * gdbarch-selftests.c: Include "target-float.h".
3312         (register_to_value_test): Use target_float_from_string.
3313
3314 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
3315
3316         * Makefile.c (SFILES): Add target-float.c.
3317         (HFILES_NO_SRCDIR): Add target-float.h.
3318         (COMMON_OBS): Add target-float.o.
3319         * target-float.h: New file.
3320         * target-float.c: New file.
3321
3322         * doublest.c (floatformat_classify): Fix detection of float_zero.
3323
3324         * gdbtypes.c (is_floating_type): New function.
3325         * gdbtypes.h (is_floating_type): Add prototype.
3326
3327         * value.c: Do not include "floatformat.h".
3328         (unpack_double): Use target_float_is_valid.
3329         (is_floating_value): New function.
3330         * value.h (is_floating_value): Add prototype-
3331
3332         * valarith.c: Include "target-float.h".
3333         (value_logical_not): Use target_float_is_zero.
3334
3335         * python/py-value.c: Include "target-float.h".
3336         (valpy_nonzero): Use target_float_is_zero.
3337
3338 2017-11-04  Tom Tromey  <tom@tromey.com>
3339
3340         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
3341
3342 2017-11-04  Tom Tromey  <tom@tromey.com>
3343
3344         * breakpoint.c (set_momentary_breakpoint): Return
3345         breakpoint_up.
3346         (until_break_command): Update.
3347         (new_until_break_fsm): Change argument types to
3348         breakpoint_up.
3349         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
3350         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
3351         Remove.
3352         * infcmd.c (finish_forward): Update.
3353         * breakpoint.h (set_momentary_breakpoint)
3354         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
3355         (make_cleanup_delete_breakpoint): Remove.
3356         (struct breakpoint_deleter): New.
3357         (breakpoint_up): New typedef.
3358         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
3359         (insert_exception_resume_breakpoint): Update.
3360         (insert_exception_resume_from_probe): Update.
3361         (insert_longjmp_resume_breakpoint): Update.
3362         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
3363         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
3364         * infcall.c (call_function_by_hand_dummy): Update
3365
3366 2017-11-04  Tom Tromey  <tom@tromey.com>
3367
3368         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
3369
3370 2017-11-04  Tom Tromey  <tom@tromey.com>
3371
3372         * linux-tdep.c (linux_core_info_proc_mappings): Use
3373         gdb::def_vector.
3374         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
3375         "size" argument.
3376         (linux_corefile_thread): Update.
3377         (linux_make_corefile_notes): Remove unused variable.
3378
3379 2017-11-04  Tom Tromey  <tom@tromey.com>
3380
3381         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
3382         gdb::byte_vector.
3383
3384 2017-11-04  Tom Tromey  <tom@tromey.com>
3385
3386         * objfiles.c (do_free_objfile_cleanup): Remove.
3387         * compile/compile-object-load.c (compile_object_load): Update.
3388         * objfiles.h (make_cleanup_free_objfile): Remove.
3389
3390 2017-11-04  Tom Tromey  <tom@tromey.com>
3391
3392         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
3393         (adi_read_versions): Change "tags" to "gdb_byte *".
3394         (adi_print_versions): Likewise.
3395
3396 2017-11-04  Tom Tromey  <tom@tromey.com>
3397
3398         * breakpoint.c
3399         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
3400         from start_rbreak_breakpoints.
3401         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
3402         * breakpoint.h (class scoped_rbreak_breakpoints): New.
3403         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
3404         * symtab.c (do_end_rbreak_breakpoints): Remove.
3405         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
3406
3407 2017-11-04  Tom Tromey  <tom@tromey.com>
3408
3409         * cp-namespace.c (reset_directive_searched): Remove.
3410         (cp_lookup_symbol_via_imports): Use scoped_restore.
3411         * cp-support.c (reset_directive_searched): Remove.
3412         (make_symbol_overload_list_using): Use scoped_restore.
3413         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
3414         (reset_directive_searched): Remove.
3415
3416 2017-11-04  Tom Tromey  <tom@tromey.com>
3417
3418         * symfile.c (find_separate_debug_file_by_debuglink): Use
3419         unique_xmalloc_ptr.
3420
3421 2017-11-04  Tom Tromey  <tom@tromey.com>
3422
3423         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
3424         type of "info".
3425         (compute_stack_depth): Likewise.
3426         (do_compile_dwarf_expr_to_c): Use std::vector.
3427
3428 2017-11-04  Tom Tromey  <tom@tromey.com>
3429
3430         * compile/compile-object-load.c (link_callbacks_einfo): Use
3431         std::string.
3432
3433 2017-11-04  Tom Tromey  <tom@tromey.com>
3434
3435         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3436         Use scoped_free_pendings.
3437         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
3438         scoped_free_pendings.
3439         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
3440         (xcoff_initial_scan): Likewise.
3441         * buildsym.c (reset_symtab_globals): Update comment.
3442         (scoped_free_pendings): Rename from really_free_pendings.
3443         (prepare_for_building): Update comment.
3444         (buildsym_init): Likewise.
3445         * buildsym.h (class scoped_free_pendings): New class.
3446         (really_free_pendings): Don't declare.
3447
3448 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
3449
3450         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
3451         output when converting a zero value to a special byteorder format.
3452
3453 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3454
3455         * frame.c (do_frame_register_read): Remove aspace.
3456         * jit.c (jit_frame_sniffer): Likwise.
3457         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3458         * regcache.c (regcache::regcache): Pass nullptr.
3459         (regcache_print): Caller updated.
3460         * regcache.h (regcache::regcache): Remove one constructor
3461         parameter aspace.
3462
3463 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3464
3465         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
3466
3467 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3468
3469         * breakpoint.c (insert_single_step_breakpoints): Update.
3470         * frame.c (struct frame_info) <aspace>: Add const.
3471         (frame_save_as_regcache): Add const.
3472         (get_frame_address_space): Return const address_space *.
3473         * frame.h (get_frame_address_space): Update declaration.
3474         * infrun.c (struct step_over_info) <aspace>: Add const.
3475         (set_step_over_info): Make aspace const.
3476         (displaced_step_prepare_throw): Change variable const.
3477         (resume): Likewise.
3478         (proceed): Likewise.
3479         (adjust_pc_after_break): Likewise.
3480         (save_waitstatus): Likewise.
3481         (handle_signal_stop): Likewise.
3482         (keep_going_pass_signal): Likewise.
3483         * jit.c (jit_frame_sniffer): Add const.
3484         * mips-tdep.c (mips_single_step_through_delay): Likewise.
3485         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3486         * record-full.c (record_full_wait_1): Likewise.
3487         * regcache.c (regcache::regcache): Change parameter to const.
3488         * regcache.h (regcache::regcache): Likewise.
3489         (regcache::aspace): Return const address_space *.
3490         (regcache) <m_aspace>: Add const.
3491
3492 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3493
3494         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
3495         * frame.c (create_sentinel_frame): Likewise.
3496         * infrun.c (displaced_step_prepare_throw): Likewise.
3497         (resume): Likewise.
3498         (thread_still_needs_step_over_bp): Likewise.
3499         (proceed): Likewise.
3500         (do_target_wait): Likewise.
3501         (adjust_pc_after_break): Likewise.
3502         (handle_syscall_event): Likewise.
3503         (save_waitstatus): Likewise.
3504         (handle_inferior_event_1): Likewise.
3505         (handle_signal_stop): Likewise.
3506         (keep_going_pass_signal): Likewise.
3507         * linux-nat.c (status_callback): Likewise.
3508         (save_stop_reason): Likewise.
3509         (resume_stopped_resumed_lwps): Likewise.
3510         * record-full.c (record_full_exec_insn): Likewise.
3511         (record_full_wait_1): Likewise.
3512         * regcache.c (get_regcache_aspace): Remove.
3513         * regcache.h (get_regcache_aspace): Remove.
3514
3515 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3516
3517         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
3518         (init_regcache_descr): Use gdbarch_num_regs.
3519         (regcache::regcache): Likewise.
3520         (regcache::get_register_status): Likewise.
3521         (regcache::assert_raw_regnum): Likewise.
3522         (regcache::cooked_read): Likewise.
3523         (regcache::cooked_read_value): Likewise.
3524         (regcache::cooked_write): Likewise.
3525         (regcache::dump): Likewise.
3526         (regcache::num_raw_registers): New method.
3527         * regcache.h (class regcache) <num_raw_registers>: New.
3528
3529 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3530
3531         * regcache.c (regcache::assert_regnum): New method.
3532         (regcache::invalidate): Call assert_regnum.
3533         (regcache::raw_update): Likewise.
3534         (regcache::raw_write): Likewise.
3535         (regcache::raw_read_part): Likewise.
3536         (regcache::raw_write_part): Likewise.
3537         (regcache::raw_supply): Likewise.
3538         (regcache::raw_supply_integer): Likewise.
3539         (regcache::raw_supply_zeroed): Likewise.
3540         (regcache::raw_collect): Likewise.
3541         (regcache::raw_collect_integer): Likewise.
3542         * regcache.h (regcache::assert_regnum): Declare.
3543
3544 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3545
3546         * regcache.c (regcache::dump): Remove code.
3547
3548 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3549
3550         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
3551         Remove.
3552         <sizeof_cooked_register_status>: Remove.
3553         (init_regcache_descr): Update.
3554         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
3555         (regcache::save): Likewise.
3556         (regcache::dump): Likewise.
3557
3558 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
3559
3560         * ft32-tdep.c (ft32_fetch_instruction): New function.
3561         (ft32_analyze_prologue): Use ft32_fetch_instruction().
3562
3563 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
3564
3565         * cli/cli-script.c (execute_control_command): Rename to ...
3566         (execute_control_command_1): ... this.
3567         (execute_control_command): New function.
3568
3569 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
3570
3571         * tracepoint.c (tfind_command): Remove const_cast.
3572
3573 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
3574
3575         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
3576
3577 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
3578
3579         * common/common-utils.h (in_inclusive_range): New function.
3580         * arm-tdep.c (arm_record_extension_space): Use
3581         in_inclusive_range.
3582         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
3583         * cris-tdep.c (cris_spec_reg_applicable): Use
3584         in_inclusive_range.
3585
3586 2017-10-30  Pedro Alves  <palves@redhat.com>
3587             Simon Marchi <simon.marchi@ericsson.com>
3588
3589         * remote.c (remote_set_syscall_catchpoint): Build a std::string
3590         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
3591
3592 2017-10-30  Pedro Alves  <palves@redhat.com>
3593
3594         * common/common-utils.c (string_appendf, string_vappendf): New
3595         functions.
3596         * common/common-utils.h (string_appendf, string_vappendf): New
3597         declarations.
3598         * unittests/common-utils-selftests.c (string_appendf_func)
3599         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
3600         (string_vappendf_tests): New functions.
3601         (_initialize_common_utils_selftests): Register "string_appendf" and
3602         "string_vappendf tests".
3603
3604 2017-10-30  Pedro Alves  <palves@redhat.com>
3605
3606         * unittests/common-utils-selftests.c (format_func): New typedef.
3607         (string_printf_tests, string_vprintf_tests): Tests factored out
3608         and merged to ...
3609         (test_format_func): ... this new function.
3610         (string_printf_tests, string_vprintf_tests): Reimplement on top of
3611         test_format_func.
3612
3613 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
3614
3615         * darwin-nat.c: Remove include of gdb.h.
3616
3617 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
3618
3619         * xtensa-xtregs.c: Fix formatting issues.
3620
3621 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
3622
3623         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
3624
3625 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
3626
3627         PR python/21213
3628         * python/py-infthread.c (thpy_get_inferior): Increment reference
3629         of inferior before returning it.
3630
3631 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
3632
3633         * unittests/common-utils-selftests.c (format): Add
3634         ATTRIBUTE_PRINTF.
3635
3636 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
3637
3638         * xml-syscall.c (struct syscall_desc): Add constructor.
3639         <name>: Change type to std::string.
3640         (syscall_desc_up): New typedef.
3641         (syscall_desc_p): Remove typeder.
3642         (DEF_VEC_P(syscall_desc_p)): Remove.
3643         (struct syscall_group_desc): Add constructor.
3644         <name>: Change type to std::string.
3645         <syscalls>: Change type to std::vector.
3646         (syscall_group_desc_up): New typedef.
3647         (syscall_group_desc_p): Remove typedef.
3648         (DEF_VEC_P(syscall_group_desc_p)): Remove.
3649         (struct syscalls_info) <syscalls>: Change type to std::vector of
3650         unique_ptr.
3651         <groups>: Likewise.
3652         <my_gdb_datadir>: Change type to std::string.
3653         (syscalls_info_up): New typedef.
3654         (allocate_syscalls_info): Remove.
3655         (syscalls_info_free_syscalls_desc): Remove.
3656         (syscalls_info_free_syscall_group_desc): Remove.
3657         (free_syscalls_info): Remove.
3658         (make_cleanup_free_syscalls_info): Remove.
3659         (syscall_group_create_syscall_group_desc): Adjust.
3660         (syscall_group_add_syscall): Adjust.
3661         (syscall_create_syscall_desc): Adjust.
3662         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
3663         (init_syscalls_info): Adjust.
3664         (syscall_group_get_group_by_name): Adjust.
3665         (xml_get_syscall_number): Adjust.
3666         (xml_get_syscall_name): Adjust.
3667         (xml_list_of_syscalls): Adjust.
3668         (xml_list_syscalls_by_group): Adjust.
3669         (xml_list_of_groups): Adjust.
3670
3671 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
3672
3673         * probe.h: Don't include gdb_vecs.h.
3674         (DEF_VEC_P (probe_p)): Remove.
3675         (find_probes_in_objfile): Return an std::vector.
3676         * probe.c (find_probes_in_objfile): Likewise.
3677         * breakpoint.c (breakpoint_objfile_data)
3678         <longjmp_probes>: Change type to std::vector.
3679         <exception_probes>: Likewise.
3680         (free_breakpoint_probes): Don't manually free vectors.
3681         (create_longjmp_master_breakpoint): Adjust.
3682         (create_exception_master_breakpoint): Adjust.
3683         * solib-svr4.c (svr4_create_probe_breakpoints): Change
3684         parameter type, adjust.
3685         (svr4_create_solib_event_breakpoints): Adjust.
3686
3687 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
3688
3689         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
3690         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
3691         with new.
3692         (free_breakpoint_probes): Rename to ...
3693         (free_breakpoint_objfile_data): ... this, and call delete on
3694         bp_objfile_data..
3695
3696 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
3697
3698         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
3699         (loaded_script_ptr): Remove typedef.
3700         (DEF_VEC_P (loaded_script_ptr)): Remove.
3701         (struct collect_matching_scripts_data): Add constructor.
3702         <scripts_p>: Change type to (pointer to) std::vector.
3703         (collect_matching_scripts_data): Adjust.
3704         (sort_scripts_by_name): Make suitable for std::sort.
3705         (print_scripts): Don't sort vector, adjust to std::vector.
3706         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
3707
3708 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
3709
3710         * symfile.c (filename_language): Make struct, not typedef.  Add
3711         constructor.
3712         <ext>: Change type to std::string.
3713         (DEF_VEC_O (filename_language)): Remove.
3714         (filename_language_table): Change type to std::vector.
3715         (add_filename_language): Adjust.
3716         (set_ext_lang_command): Adjust.
3717         (info_ext_lang_command): Adjust.
3718         (deduce_language_from_filename): Adjust.
3719         (class scoped_restore_filename_language_table): Remove.
3720         (test_filename_language): Use scoped_restore.
3721         (test_set_ext_lang_command): Use scoped_restore, adjust to
3722         std::vector change.
3723
3724 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
3725
3726         * symfile.c: Include selftest.h.
3727         (class scoped_restore_filename_language_table): New.
3728         (test_filename_language): New test.
3729         (test_set_ext_lang_command): New test.
3730         (_initialize_symfile): Register tests.
3731
3732 2017-10-27  Keith Seitz  <keiths@redhat.com>
3733
3734         * breakpoint.c (print_breakpoint_location): Use the symbol saved
3735         in the bp_location, falling back to find_pc_sect_function when
3736         needed.
3737         (add_location_to_breakpoint): Save sal->symbol.
3738         * breakpoint.h (struct bp_location) <symbol>: New field.
3739         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
3740         * symtab.h (struct symtab_and_line) <symbol>: New field.
3741
3742 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
3743
3744         PR gdb/13669
3745         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
3746         to rewind obstack.
3747
3748 2017-10-26  Pedro Alves  <palves@redhat.com>
3749
3750         * remote.c (remote_async_terminal_ours_p): Delete.
3751         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
3752         Remove references to 'remote_async_terminal_ours_p'.
3753
3754 2017-10-26  Yao Qi  <yao.qi@linaro.org>
3755
3756         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
3757
3758 2017-10-26  Yao Qi  <yao.qi@linaro.org>
3759
3760         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
3761         aspace const.
3762         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
3763         Likewise.
3764         * breakpoint.c (bpstat_check_location): Remove cast.
3765         (breakpoint_hit_catch_fork): Make aspce const.
3766         (breakpoint_hit_catch_solib): Likewise.
3767         (breakpoint_hit_catch_exec): Likewise.
3768         (breakpoint_hit_ranged_breakpoint): Likewise.
3769         (breakpoint_hit_watchpoint): Likewise.
3770         (base_breakpoint_breakpoint_hit): Likewise.
3771         (bkpt_breakpoint_hit): Likewise.
3772         (dprintf_breakpoint_hit): Likewise.
3773         (tracepoint_breakpoint_hit): Likewise.
3774         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
3775
3776 2017-10-26  Yao Qi  <yao.qi@linaro.org>
3777
3778         * breakpoint.c (breakpoint_location_address_match): Change
3779         "struct address_space *" to "const address_space".
3780         (breakpoint_location_address_range_overlap): Likewise.
3781         (breakpoint_here_p): Likewise.
3782         (breakpoint_in_range_p): Likewise.
3783         (moribund_breakpoint_here_p): Likewise.
3784         (bp_location_inserted_here_p): Likewise.
3785         (software_breakpoint_inserted_here_p): Likewise.
3786         (hardware_breakpoint_inserted_here_p): Likewise.
3787         (hardware_watchpoint_inserted_in_range): Likewise.
3788         (bpstat_check_location): Likewise.
3789         (bpstat_stop_status): Likewise.
3790         (breakpoint_address_match): Likewise.
3791         (breakpoint_address_match_range): Likewise.
3792         (breakpoint_location_address_match): Likewise.
3793         (breakpoint_location_address_range_overlap): Likewise.
3794         (insert_single_step_breakpoint): Likewise.
3795         (breakpoint_has_location_inserted_here): Likewise.
3796         (single_step_breakpoint_inserted_here_p): Likewise.
3797         (pc_at_non_inline_function): Likewise.
3798         * breakpoint.h (bpstat_stop_status): Update declaration.
3799         (breakpoint_here_p): Likewise.
3800         (breakpoint_in_range_p): Likewise.
3801         (moribund_breakpoint_here_p): Likewise.
3802         (breakpoint_inserted_here_p): Likewise.
3803         (software_breakpoint_inserted_here_p): Likewise.
3804         (hardware_breakpoint_inserted_here_p): Likewise.
3805         (breakpoint_has_location_inserted_here): Likewise.
3806         (single_step_breakpoint_inserted_here_p): Likewise.
3807         (hardware_watchpoint_inserted_in_range): Likewise.
3808         (breakpoint_address_match): Likewise.
3809         (insert_single_step_breakpoint): Likewise.
3810         (pc_at_non_inline_function): Likewise.
3811         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
3812         * record.c (record_check_stopped_by_breakpoint): Likewise.
3813         * record.h (record_check_stopped_by_breakpoint): Likewise.
3814         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
3815
3816 2017-10-25  Yao Qi  <yao.qi@linaro.org>
3817
3818         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
3819         regcache->arch () instead get_regcache_arch.
3820         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
3821         Likewise.
3822         (aarch64_fbsd_store_inferior_registers): Likewise.
3823         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
3824         (store_gregs_to_thread): Likewise.
3825         (fetch_fpregs_from_thread): Likewise.
3826         (store_fpregs_to_thread): Likewise.
3827         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
3828         (aarch64_store_return_value): Likewise.
3829         (aarch64_software_single_step): Likewise.
3830         * aix-thread.c (aix_thread_wait): Likewise.
3831         (supply_reg32): Likewise.
3832         (supply_sprs64): Likewise.
3833         (supply_sprs32): Likewise.
3834         (fill_gprs64): Likewise.
3835         (fill_gprs32): Likewise.
3836         (fill_sprs64): Likewise.
3837         (fill_sprs32): Likewise.
3838         (store_regs_user_thread): Likewise.
3839         (store_regs_kernel_thread): Likewise.
3840         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
3841         (alphabsd_store_inferior_registers): Likewise.
3842         * alpha-tdep.c (alpha_extract_return_value): Likewise.
3843         (alpha_store_return_value): Likewise.
3844         (alpha_deal_with_atomic_sequence): Likewise.
3845         (alpha_next_pc): Likewise.
3846         (alpha_software_single_step): Likewise.
3847         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
3848         (amd64bsd_store_inferior_registers): Likewise.
3849         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
3850         Likewise.
3851         (amd64_linux_store_inferior_registers): Likewise.
3852         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
3853         (amd64_collect_native_gregset): Likewise.
3854         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
3855         (amd64obsd_collect_uthread): Likewise.
3856         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
3857         (amd64_collect_fpregset): Likewise.
3858         (amd64_supply_fxsave): Likewise.
3859         (amd64_supply_xsave): Likewise.
3860         (amd64_collect_fxsave): Likewise.
3861         (amd64_collect_xsave): Likewise.
3862         * arc-tdep.c (arc_write_pc): Likewise.
3863         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
3864         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
3865         (arm_fbsd_store_inferior_registers): Likewise.
3866         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
3867         (store_vfp_regs): Likewise.
3868         (arm_linux_fetch_inferior_registers): Likewise.
3869         (arm_linux_store_inferior_registers): Likewise.
3870         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
3871         (arm_linux_sigreturn_next_pc): Likewise.
3872         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
3873         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
3874         (fetch_register): Likewise.
3875         (store_register): Likewise.
3876         * arm-tdep.c (arm_is_thumb): Likewise.
3877         (displaced_in_arm_mode): Likewise.
3878         (bx_write_pc): Likewise.
3879         (arm_get_next_pcs_addr_bits_remove): Likewise.
3880         (arm_software_single_step): Likewise.
3881         (arm_extract_return_value): Likewise.
3882         (arm_store_return_value): Likewise.
3883         (arm_write_pc): Likewise.
3884         * bfin-tdep.c (bfin_extract_return_value): Likewise.
3885         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
3886         (bsd_uthread_store_registers): Likewise.
3887         * core-regset.c (fetch_core_registers): Likewise.
3888         * corelow.c (get_core_registers): Likewise.
3889         * cris-tdep.c (cris_store_return_value): Likewise.
3890         (cris_extract_return_value): Likewise.
3891         (find_step_target): Likewise.
3892         (find_step_target): Likewise.
3893         (cris_software_single_step): Likewise.
3894         * ctf.c (ctf_fetch_registers): Likewise.
3895         * darwin-nat.c (cancel_breakpoint): Likewise.
3896         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
3897         * frv-tdep.c (frv_extract_return_value): Likewise.
3898         * ft32-tdep.c (ft32_store_return_value): Likewise.
3899         (ft32_extract_return_value): Likewise.
3900         * go32-nat.c (fetch_register): Likewise.
3901         (go32_fetch_registers): Likewise.
3902         (go32_store_registers): Likewise.
3903         (store_register): Likewise.
3904         * h8300-tdep.c (h8300_extract_return_value): Likewise.
3905         (h8300_store_return_value): Likewise.
3906         * hppa-linux-nat.c (fetch_register): Likewise.
3907         (store_register): Likewise.
3908         (hppa_linux_fetch_inferior_registers): Likewise.
3909         (hppa_linux_store_inferior_registers): Likewise.
3910         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
3911         (i386_darwin_store_inferior_registers): Likewise.
3912         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
3913         (gnu_store_registers): Likewise.
3914         * i386-linux-nat.c (fetch_register): Likewise.
3915         (store_register): Likewise.
3916         (supply_gregset): Likewise.
3917         (fill_gregset): Likewise.
3918         (i386_linux_fetch_inferior_registers): Likewise.
3919         (i386_linux_store_inferior_registers): Likewise.
3920         (i386_linux_resume): Likewise.
3921         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
3922         Likewise.
3923         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
3924         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
3925         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
3926         (i386obsd_collect_uthread): Likewise.
3927         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
3928         (i386_supply_gregset): Likewise.
3929         (i386_collect_gregset): Likewise.
3930         (i386_supply_fpregset): Likewise.
3931         (i386_collect_fpregset): Likewise.
3932         (i386_mpx_bd_base): Likewise.
3933         * i386-v4-nat.c (supply_fpregset): Likewise.
3934         (fill_fpregset): Likewise.
3935         * i387-tdep.c (i387_supply_fsave): Likewise.
3936         (i387_collect_fsave): Likewise.
3937         (i387_supply_fxsave): Likewise.
3938         (i387_collect_fxsave): Likewise.
3939         (i387_supply_xsave): Likewise.
3940         (i387_collect_xsave): Likewise.
3941         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
3942         (ia64_linux_store_registers): Likewise.
3943         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
3944         (ia64_extract_return_value): Likewise.
3945         (ia64_store_return_value): Likewise.
3946         (find_func_descr): Likewise.
3947         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
3948         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
3949         (inf_ptrace_store_registers): Likewise.
3950         * infrun.c (use_displaced_stepping): Likewise.
3951         (displaced_step_prepare_throw): Likewise.
3952         (resume): Likewise.
3953         (proceed): Likewise.
3954         (do_target_wait): Likewise.
3955         (adjust_pc_after_break): Likewise.
3956         (handle_inferior_event_1): Likewise.
3957         (handle_signal_stop): Likewise.
3958         (save_infcall_suspend_state): Likewise.
3959         (restore_infcall_suspend_state): Likewise.
3960         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
3961         * jit.c (jit_frame_prev_register): Likewise.
3962         * linux-nat.c (save_stop_reason): Likewise.
3963         (linux_nat_wait_1): Likewise.
3964         (resume_stopped_resumed_lwps): Likewise.
3965         * linux-record.c (record_linux_sockaddr): Likewise.
3966         (record_linux_msghdr): Likewise.
3967         (record_linux_system_call): Likewise.
3968         * linux-tdep.c (linux_collect_thread_registers): Likewise.
3969         * lm32-tdep.c (lm32_extract_return_value): Likewise.
3970         (lm32_store_return_value): Likewise.
3971         * m32c-tdep.c (m32c_read_flg): Likewise.
3972         (m32c_pseudo_register_read): Likewise.
3973         (m32c_pseudo_register_write): Likewise.
3974         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
3975         (m32r_linux_collect_gregset): Likewise.
3976         * m32r-tdep.c (m32r_store_return_value): Likewise.
3977         (m32r_extract_return_value): Likewise.
3978         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
3979         (m68kbsd_collect_fpregset): Likewise.
3980         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
3981         * m68k-linux-nat.c (fetch_register): Likewise.
3982         (old_fetch_inferior_registers): Likewise.
3983         (old_store_inferior_registers): Likewise.
3984         (store_regs): Likewise.
3985         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
3986         (m68k_svr4_store_return_value): Likewise.
3987         * m88k-tdep.c (m88k_store_arguments): Likewise.
3988         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
3989         (mi_cmd_data_write_register_values): Likewise.
3990         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
3991         (mips_fbsd_store_inferior_registers): Likewise.
3992         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
3993         (mips_fbsd_supply_gregs): Likewise.
3994         (mips_fbsd_collect_fpregs): Likewise.
3995         (mips_fbsd_collect_gregs): Likewise.
3996         (mips_fbsd_supply_fpregset): Likewise.
3997         (mips_fbsd_collect_fpregset): Likewise.
3998         (mips_fbsd_supply_gregset): Likewise.
3999         (mips_fbsd_collect_gregset): Likewise.
4000         * mips-linux-nat.c (supply_gregset): Likewise.
4001         (fill_gregset): Likewise.
4002         (supply_fpregset): Likewise.
4003         (fill_fpregset): Likewise.
4004         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
4005         (mips_fill_gregset): Likewise.
4006         (mips_supply_fpregset): Likewise.
4007         (mips_fill_fpregset): Likewise.
4008         (mips64_supply_gregset): Likewise.
4009         (micromips_linux_sigframe_validate): Likewise.
4010         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
4011         (mipsnbsd_fetch_inferior_registers): Likewise.
4012         (mipsnbsd_store_inferior_registers): Likewise.
4013         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
4014         (mipsnbsd_supply_gregset): Likewise.
4015         (mipsnbsd_iterate_over_regset_sections): Likewise.
4016         (mipsnbsd_supply_reg): Likewise.
4017         (mipsnbsd_supply_fpreg): Likewise.
4018         * mips-tdep.c (mips_in_frame_stub): Likewise.
4019         (mips_dummy_id): Likewise.
4020         (is_octeon_bbit_op): Likewise.
4021         (micromips_bc1_pc): Likewise.
4022         (extended_mips16_next_pc): Likewise.
4023         (mips16_next_pc): Likewise.
4024         (deal_with_atomic_sequence): Likewise.
4025         * moxie-tdep.c (moxie_process_readu): Likewise.
4026         * nios2-tdep.c (nios2_get_next_pc): Likewise.
4027         * nto-procfs.c (procfs_store_registers): Likewise.
4028         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
4029         (ppcfbsd_store_inferior_registers): Likewise.
4030         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
4031         (fetch_altivec_register): Likewise.
4032         (get_spe_registers): Likewise.
4033         (fetch_spe_register): Likewise.
4034         (fetch_altivec_registers): Likewise.
4035         (fetch_all_gp_regs): Likewise.
4036         (fetch_all_fp_regs): Likewise.
4037         (store_vsx_register): Likewise.
4038         (store_altivec_register): Likewise.
4039         (set_spe_registers): Likewise.
4040         (store_spe_register): Likewise.
4041         (store_altivec_registers): Likewise.
4042         (store_all_gp_regs): Likewise.
4043         (store_all_fp_regs): Likewise.
4044         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
4045         (ppc_linux_collect_gregset): Likewise.
4046         (ppc_canonicalize_syscall): Likewise.
4047         (ppc_linux_record_signal): Likewise.
4048         (ppu2spu_prev_register): Likewise.
4049         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
4050         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
4051         (ppcobsd_store_registers): Likewise.
4052         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
4053         Likewise.
4054         (ppc_ravenscar_generic_store_registers): Likewise.
4055         * procfs.c (procfs_fetch_registers): Likewise.
4056         (procfs_store_registers): Likewise.
4057         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
4058         (ravenscar_store_registers): Likewise.
4059         (ravenscar_prepare_to_store): Likewise.
4060         * record-btrace.c (record_btrace_fetch_registers): Likewise.
4061         * record-full.c (record_full_wait_1): Likewise.
4062         (record_full_registers_change): Likewise.
4063         (record_full_store_registers): Likewise.
4064         (record_full_core_fetch_registers): Likewise.
4065         (record_full_save): Likewise.
4066         (record_full_goto_insn): Likewise.
4067         * regcache.c (regcache_register_size): Likewise.
4068         (get_regcache_arch): Remove.
4069         (regcache_read_pc): Likewise.
4070         * regcache.h (get_regcache_arch): Remove.
4071         * remote-sim.c (gdbsim_fetch_register): Likewise.
4072         (gdbsim_store_register): Likewise.
4073         * remote.c (fetch_register_using_p): Likewise.
4074         (send_g_packet): Likewise.
4075         (remote_prepare_to_store): Likewise.
4076         (store_registers_using_G): Likewise.
4077         * reverse.c (save_bookmark_command): Likewise.
4078         (goto_bookmark_command): Likewise.
4079         * rs6000-aix-tdep.c (branch_dest): Likewise.
4080         * rs6000-nat.c (rs6000_ptrace64): Likewise.
4081         (fetch_register): Likewise.
4082         * rs6000-tdep.c (ppc_supply_reg): Likewise.
4083         (ppc_collect_reg): Likewise.
4084         (ppc_collect_gregset): Likewise.
4085         (ppc_collect_fpregset): Likewise.
4086         (ppc_collect_vsxregset): Likewise.
4087         (ppc_collect_vrregset): Likewise.
4088         (ppc_displaced_step_hw_singlestep): Likewise.
4089         (rs6000_pseudo_register_read): Likewise.
4090         (rs6000_pseudo_register_write): Likewise.
4091         * s390-linux-nat.c (supply_gregset): Likewise.
4092         (fill_gregset): Likewise.
4093         (s390_linux_fetch_inferior_registers): Likewise.
4094         * s390-linux-tdep.c (s390_write_pc): Likewise.
4095         (s390_software_single_step): Likewise.
4096         (s390_all_but_pc_registers_record): Likewise.
4097         (s390_linux_syscall_record): Likewise.
4098         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
4099         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
4100         (shnbsd_store_inferior_registers): Likewise.
4101         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
4102         (sh_extract_return_value_fpu): Likewise.
4103         (sh_store_return_value_nofpu): Likewise.
4104         (sh_corefile_supply_regset): Likewise.
4105         (sh_corefile_collect_regset): Likewise.
4106         * sh64-tdep.c (sh64_extract_return_value): Likewise.
4107         (sh64_store_return_value): Likewise.
4108         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
4109         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
4110         (sparc_store_inferior_registers): Likewise.
4111         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
4112         (sparc_ravenscar_prepare_to_store): Likewise.
4113         * sparc-tdep.c (sparc32_store_arguments): Likewise.
4114         (sparc_analyze_control_transfer): Likewise.
4115         (sparc_step_trap): Likewise.
4116         (sparc_software_single_step): Likewise.
4117         (sparc32_gdbarch_init): Likewise.
4118         (sparc_supply_rwindow): Likewise.
4119         (sparc_collect_rwindow): Likewise.
4120         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
4121         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
4122         (sparc64nbsd_collect_gregset): Likewise.
4123         (sparc64nbsd_supply_fpregset): Likewise.
4124         (sparc64nbsd_collect_fpregset): Likewise.
4125         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
4126         (sparc64_supply_gregset): Likewise.
4127         (sparc64_collect_gregset): Likewise.
4128         (sparc64_supply_fpregset): Likewise.
4129         (sparc64_collect_fpregset): Likewise.
4130         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
4131         * spu-tdep.c (spu_unwind_sp): Likewise.
4132         (spu2ppu_prev_register): Likewise.
4133         (spu_memory_remove_breakpoint): Likewise.
4134         * stack.c (return_command): Likewise.
4135         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
4136         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
4137         * tracefile.c (trace_save_ctf): Likewise.
4138         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
4139         (do_windows_store_inferior_registers): Likewise.
4140         (windows_resume): Likewise.
4141         * xtensa-linux-nat.c (fill_gregset): Likewise.
4142         (supply_gregset_reg): Likewise.
4143         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
4144         (xtensa_register_read_masked): Likewise.
4145         (xtensa_supply_gregset): Likewise.
4146         (xtensa_extract_return_value): Likewise.
4147         (xtensa_store_return_value): Likewise.
4148
4149 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
4150
4151         * doublest.c (floatformat_from_string): New function.
4152         * doublest.h (floatformat_from_string): Add prototype.
4153
4154         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
4155         (OP_FLOAT): ... this.
4156         * expression.h: Do not include "doublest.h".
4157         (union exp_element): Replace doubleconst and decfloatconst by
4158         new element floatconst.
4159         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
4160         (ada_evaluate_subexp): Likewise.
4161         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
4162         OP_DOUBLE and OP_DECFLOAT.
4163         * expprint.c (print_subexp_standard): Likewise.
4164         (dump_subexp_body_standard): Likewise.
4165         * breakpoint.c (watchpoint_exp_is_const): Likewise.
4166
4167         * parse.c: Include "dfp.h".
4168         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
4169         (write_exp_elt_floatcst): New function.
4170         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
4171         and OP_DECFLOAT.
4172         (operator_check_standard): Likewise.
4173         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
4174         Return target format buffer instead of host DOUBLEST.
4175         Use floatformat_from_string and decimal_from_string to parse
4176         either binary or decimal floating-point types.
4177         (parse_c_float): Remove.
4178         * parser-defs.h: Do not include "doublest.h".
4179         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
4180         (write_exp_elt_floatcst): Add prototype.
4181         (parse_float): Update prototype.
4182         (parse_c_float): Remove.
4183
4184         * c-exp.y: Do not include "dfp.h".
4185         (typed_val_float): Use byte buffer instead of DOUBLEST.
4186         (typed_val_decfloat): Remove.
4187         (DECFLOAT): Remove.
4188         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4189         (parse_number): Update to new parse_float interface.
4190         Parse suffixes and determine type before calling parse_float.
4191         Handle decimal and binary FP types the same way.
4192
4193         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4194         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
4195         (parse_number): Update to new parse_float interface.
4196         Parse suffixes and determine type before calling parse_float.
4197
4198         * f-exp.y: Replace dval by typed_val_float.
4199         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4200         (parse_number): Use parse_float instead of atof.
4201
4202         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4203         (parse_go_float): Remove.
4204         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4205         (parse_number): Call parse_float instead of parse_go_float.
4206         Parse suffixes and determine type before calling parse_float.
4207
4208         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4209         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4210         (parse_number): Update to new parse_float interface.
4211         Parse suffixes and determine type before calling parse_float.
4212
4213         * m2-exp.y: Replace dval by byte buffer val.
4214         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4215         (parse_number): Call parse_float instead of atof.
4216
4217         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4218         (lex_number): Call parse_float instead of strtod.
4219         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
4220         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
4221         Use write_exp_elt_floatcst.
4222         (unit_testing): Remove static variable.
4223         (rust_type): Do not check unit_testing.
4224         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
4225
4226         * ada-exp.y (type_float, type_double): Remove.
4227         (typed_val_float): Use byte buffer instead of DOUBLEST.
4228         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4229         * ada-lex.l (processReal): Use parse_float instead of sscanf.
4230
4231 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
4232
4233         * aarch64-tdep.h (enum aarch64_regnum): Remove.
4234         * arch/aarch64.h: New file.
4235
4236 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
4237
4238         * dfp.h (decimal_from_string): Use const reference for argument.
4239         * dfp.c (decimal_from_string): Likewise.
4240
4241 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
4242
4243         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
4244         * sh64-tdep.c (sh64_do_fp_register): Likewise.
4245         * mips-tdep.c (mips_print_fp_register): Likewise.
4246
4247 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
4248
4249         * common/format.h (enum argclass): Replace decfloat_arg by
4250         dec32float_arg, dec64float_arg, and dec128float_arg.
4251         * common/format.c (parse_format_string): Update to return
4252         new decimal float argument classes.
4253
4254         * printcmd.c (printf_decfloat): Rename to ...
4255         (printf_floating): ... this.  Add argclass argument, and use it
4256         instead of parsing the format string again.  Add support for
4257         binary floating-point values, using floatformat_to_string.
4258         Convert value to the target format if it doesn't already match.
4259         (ui_printf): Call printf_floating instead of printf_decfloat,
4260         also for double_arg / long_double_arg.  Pass argclass.
4261
4262         * dfp.c (decimal_to_string): Add format string argument.
4263         * dfp.h (decimal_to_string): Likewise.
4264
4265         * doublest.c (floatformat_to_string): Add format string argument.
4266         * doublest.h (floatformat_to_string): Likewise.
4267
4268 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
4269
4270         * doublest.c (floatformat_precision): New routine.
4271         (floatformat_to_string): Likewise.
4272         * doublest.c (floatformat_to_string): Add prototype.
4273
4274         * printcmd.c (print_scalar_formatted): Only call print_floating
4275         on floating-point types.
4276         * valprint.c: Do not include "floatformat.h".
4277         (generic_val_print_decfloat): Remove.
4278         (generic_val_print): Call generic_val_print_float for both
4279         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
4280         (print_floating): Use floatformat_to_string.  Handle decimal float.
4281         (print_decimal_floating): Remove, merge into floatformat_to_string.
4282         * value.h (print_decimal_floating): Remove.
4283
4284         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
4285
4286 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
4287
4288         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
4289
4290 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
4291
4292         * memattr.h: Don't include vec.h.
4293         (struct mem_attrib): Initialize fields.
4294         <unknown>: New static method.
4295         (struct mem_region): Add constructors, operator<, initialize
4296         fields.
4297         * memattr.c: Include algorithm.
4298         (default_mem_attrib, unknown_mem_attrib): Remove.
4299         (user_mem_region_list): New global.
4300         (target_mem_region_list, mem_region_list): Change type to
4301         std::vector<mem_region>.
4302         (mem_use_target): Now a function.
4303         (target_mem_regions_valid): Change type to bool.
4304         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
4305         (require_user_regions): Adjust.
4306         (require_target_regions): Adjust.
4307         (create_mem_region): Adjust.
4308         (lookup_mem_region): Adjust.
4309         (invalidate_target_mem_regions): Adjust.
4310         (mem_clear): Rename to...
4311         (user_mem_clear): ... this, and adjust.
4312         (mem_command): Adjust.
4313         (info_mem_command): Adjust.
4314         (mem_enable, enable_mem_command, mem_disable,
4315         disable_mem_command): Adjust.
4316         (mem_delete): Adjust.
4317         (delete_mem_command): Adjust.
4318         * memory-map.h (parse_memory_map): Return an std::vector.
4319         * memory-map.c (parse_memory_map): Likewise.
4320         (struct memory_map_parsing_data): Add constructor.
4321         <memory_map>: Point to std::vector.
4322         (memory_map_start_memory): Adjust.
4323         (memory_map_end_memory): Adjust.
4324         (memory_map_end_property): Adjust.
4325         (clear_result): Remove.
4326         * remote.c (remote_memory_map): Return an std::vector.
4327         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
4328         Remove.
4329         (target_debug_print_mem_region_vector): New.
4330         * target-delegates.c: Regenerate.
4331         * target.h (mem_region_vector): New typedef.
4332         (to_memory_map): Return mem_region_vector.
4333         (target_memory_map): Return an std::vector.
4334         * target.c (target_memory_map): Return an std::vector.
4335         (flash_erase_command): Adjust.
4336
4337 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
4338
4339         * memory-map.c (struct memory_map_parsing_data) <property_name>:
4340         Change type to std::string.
4341         (memory_map_start_property): Adjust.
4342         (memory_map_end_property): Adjust.
4343
4344 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
4345
4346         * infrun.h: Include common/byte-vector.h.
4347         (struct displaced_step_closure): New struct.
4348         (struct buf_displaced_step_closure): New struct.
4349         * infrun.c (displaced_step_closure::~displaced_step_closure):
4350         Provide default implementation.
4351         (displaced_step_clear): Deallocate step closure with delete.
4352         * aarch64-tdep.c (displaced_step_closure): Rename to ...
4353         (aarch64_displaced_step_closure): ... this, extend
4354         displaced_step_closure.
4355         (aarch64_displaced_step_data) <dsc>: Change type to
4356         aarch64_displaced_step_closure.
4357         (aarch64_displaced_step_copy_insn): Adjust to type change, use
4358         unique_ptr.
4359         (aarch64_displaced_step_fixup): Add cast for displaced step
4360         closure.
4361         * amd64-tdep.c (displaced_step_closure): Rename to ...
4362         (amd64_displaced_step_closure): ... this, extend
4363         displaced_step_closure.
4364         <insn_buf>: Change type to std::vector<gdb_byte>.
4365         <max_len>: Remove.
4366         (fixup_riprel): Change type of DSC parameter, adjust to type
4367         change of insn_buf.
4368         (fixup_displaced_copy): Change type of DSC parameter.
4369         (amd64_displaced_step_copy_insn): Instantiate
4370         amd64_displaced_step_closure.
4371         (amd64_displaced_step_fixup): Add cast for closure type, adjust
4372         to type change of insn_buf.
4373         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
4374         parameter DSC.
4375         (arm_linux_copy_svc): Likewise.
4376         (cleanup_kernel_helper_return): Likewise.
4377         (arm_catch_kernel_helper_return): Likewise.
4378         (arm_linux_displaced_step_copy_insn): Instantiate
4379         arm_displaced_step_closure.
4380         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
4381         (displaced_read_reg): Change type of parameter DSC.
4382         (branch_write_pc): Likewise.
4383         (load_write_pc): Likewise.
4384         (alu_write_pc): Likewise.
4385         (displaced_write_reg): Likewise.
4386         (arm_copy_unmodified): Likewise.
4387         (thumb_copy_unmodified_32bit): Likewise.
4388         (thumb_copy_unmodified_16bit): Likewise.
4389         (cleanup_preload): Likewise.
4390         (install_preload): Likewise.
4391         (arm_copy_preload): Likewise.
4392         (thumb2_copy_preload): Likewise.
4393         (install_preload_reg): Likewise.
4394         (arm_copy_preload_reg): Likewise.
4395         (cleanup_copro_load_store): Likewise.
4396         (install_copro_load_store): Likewise.
4397         (arm_copy_copro_load_store) Likewise.
4398         (thumb2_copy_copro_load_store): Likewise.
4399         (cleanup_branch): Likewise.
4400         (install_b_bl_blx): Likewise.
4401         (arm_copy_b_bl_blx): Likewise.
4402         (thumb2_copy_b_bl_blx): Likewise.
4403         (thumb_copy_b): Likewise.
4404         (install_bx_blx_reg): Likewise.
4405         (arm_copy_bx_blx_reg): Likewise.
4406         (thumb_copy_bx_blx_reg): Likewise.
4407         (cleanup_alu_imm): Likewise.
4408         (arm_copy_alu_imm): Likewise.
4409         (thumb2_copy_alu_imm): Likewise.
4410         (cleanup_alu_reg): Likewise.
4411         (install_alu_reg): Likewise.
4412         (arm_copy_alu_reg): Likewise.
4413         (thumb_copy_alu_reg): Likewise.
4414         (cleanup_alu_shifted_reg): Likewise.
4415         (install_alu_shifted_reg): Likewise.
4416         (arm_copy_alu_shifted_reg): Likewise.
4417         (cleanup_load): Likewise.
4418         (cleanup_store): Likewise.
4419         (arm_copy_extra_ld_st): Likewise.
4420         (install_load_store): Likewise.
4421         (thumb2_copy_load_literal): Likewise.
4422         (thumb2_copy_load_reg_imm): Likewise.
4423         (arm_copy_ldr_str_ldrb_strb): Likewise.
4424         (cleanup_block_load_all): Likewise.
4425         (cleanup_block_store_pc): Likewise.
4426         (cleanup_block_load_pc): Likewise.
4427         (arm_copy_block_xfer): Likewise.
4428         (thumb2_copy_block_xfer): Likewise.
4429         (cleanup_svc): Likewise.
4430         (install_svc): Likewise.
4431         (arm_copy_svc): Likewise.
4432         (thumb_copy_svc): Likewise.
4433         (arm_copy_undef): Likewise.
4434         (thumb_32bit_copy_undef): Likewise.
4435         (arm_copy_unpred): Likewise.
4436         (arm_decode_misc_memhint_neon): Likewise.
4437         (arm_decode_unconditional): Likewise.
4438         (arm_decode_miscellaneous): Likewise.
4439         (arm_decode_dp_misc): Likewise.
4440         (arm_decode_ld_st_word_ubyte): Likewise.
4441         (arm_decode_media): Likewise.
4442         (arm_decode_b_bl_ldmstm): Likewise.
4443         (arm_decode_ext_reg_ld_st): Likewise.
4444         (thumb2_decode_dp_shift_reg): Likewise.
4445         (thumb2_decode_ext_reg_ld_st): Likewise.
4446         (arm_decode_svc_copro): Likewise.
4447         (thumb2_decode_svc_copro): Likewise.
4448         (install_pc_relative): Likewise.
4449         (thumb_copy_pc_relative_16bit): Likewise.
4450         (thumb_decode_pc_relative_16bit): Likewise.
4451         (thumb_copy_pc_relative_32bit): Likewise.
4452         (thumb_copy_16bit_ldr_literal): Likewise.
4453         (thumb_copy_cbnz_cbz): Likewise.
4454         (thumb2_copy_table_branch): Likewise.
4455         (cleanup_pop_pc_16bit_all): Likewise.
4456         (thumb_copy_pop_pc_16bit): Likewise.
4457         (thumb_process_displaced_16bit_insn): Likewise.
4458         (decode_thumb_32bit_ld_mem_hints): Likewise.
4459         (thumb_process_displaced_32bit_insn): Likewise.
4460         (thumb_process_displaced_insn): Likewise.
4461         (arm_process_displaced_insn): Likewise.
4462         (arm_displaced_init_closure): Likewise.
4463         (arm_displaced_step_fixup): Add cast for closure.
4464         * arm-tdep.h: Include infrun.h.
4465         (displaced_step_closure): Rename to ...
4466         (arm_displaced_step_closure): ... this, extend
4467         displaced_step_closure.
4468         <u::svc::copy_svc_os>: Change type of parameter DSC.
4469         <cleanup>: Likewise.
4470         (arm_process_displaced_insn): Likewise.
4471         (arm_displaced_init_closure): Likewise.
4472         (displaced_read_reg): Likewise.
4473         (displaced_write_reg): Likewise.
4474         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4475         Adjust.
4476         * i386-tdep.h: Include infrun.h.
4477         (i386_displaced_step_closure): New typedef.
4478         * i386-tdep.c (i386_displaced_step_copy_insn): Use
4479         i386_displaced_step_closure.
4480         (i386_displaced_step_fixup): Adjust.
4481         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
4482         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
4483         and unique_ptr.
4484         (ppc_displaced_step_fixup): Adjust.
4485         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
4486         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
4487         and unique_ptr.
4488         (s390_displaced_step_fixup): Adjust.
4489
4490 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
4491
4492         * interps.h (interp_resume, interp_suspend, interp_set_temp):
4493         Remove declarations.
4494
4495 2017-10-20  Tom Tromey  <tom@tromey.com>
4496
4497         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
4498         std::vector.
4499         (gdb_bfd_record_inclusion): Update.
4500         (bfdp): Remove typedef.
4501
4502 2017-10-20  Tom Tromey  <tom@tromey.com>
4503
4504         * gdb_bfd.c (gdb_bfd_ref): Use new.
4505         (struct gdb_bfd_data): Add constructor, destructor, and member
4506         initializers.
4507         (gdb_bfd_unref): Use delete.
4508
4509 2017-10-20  Tom Tromey  <tom@tromey.com>
4510
4511         * exec.c (exec_file_attach): Use new_bfd_ref.
4512         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
4513         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
4514         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
4515         new_bfd_ref.
4516         * gdb_bfd.h (new_bfd_ref): New function.
4517
4518 2017-10-20  Pedro Alves  <palves@redhat.com>
4519
4520         * main.c (captured_command_loop): Add attribute noinline.
4521
4522 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
4523
4524         * interps.c (struct interp_factory): Add constructor.
4525         (interp_factory_p): Remove typedef.
4526         (DEF_VEC_P(interp_factory_p)): Remove.
4527         (interpreter_factories): Change type to std::vector.
4528         (interp_factory_register): Adjust.
4529         (interp_lookup): Adjust.
4530         (interpreter_completer): Adjust.
4531
4532 2017-10-19  Tom Tromey  <tom@tromey.com>
4533
4534         * break-catch-syscall.c (catch_syscall_completer): Use
4535         std::string, gdb::unique_xmalloc_ptr.
4536
4537 2017-10-19  Tom Tromey  <tom@tromey.com>
4538
4539         * infcall.c (call_function_by_hand_dummy): Use std::string.
4540
4541 2017-10-19  Tom Tromey  <tom@tromey.com>
4542
4543         * mi/mi-main.c (mi_cmd_execute): Update.
4544         * top.h (prepare_execute_command): Return scoped_value_mark.
4545         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
4546         Add move constructor.
4547         * top.c (prepare_execute_command): Return scoped_value_mark.
4548         (execute_command): Update.
4549
4550 2017-10-19  Pedro Alves  <palves@redhat.com>
4551
4552         * xml-support.c (xml_fetch_content_from_file): Check fread's
4553         return.
4554
4555 2017-10-19  Pedro Alves  <palves@redhat.com>
4556
4557         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
4558         async.
4559         (handle_error_fd): New function.
4560         (ser_base_async): Add/delete an event loop file handler for
4561         error_fd.
4562
4563 2017-10-19  Pedro Alves  <palves@redhat.com>
4564
4565         * xml-support.c (xml_fetch_content_from_file): Don't read in
4566         chunks.  Instead use fseek to determine the file's size, and read
4567         it in one go.
4568
4569 2017-11-18  Keith Seitz  <keiths@redhat.com>
4570
4571         * c-exp.y (oper): Canonicalize conversion operators of user-defined
4572         types.
4573         Add whitespace to front of type name.
4574
4575 2017-10-18  Keith Seitz  <keiths@redhat.com>
4576
4577         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
4578         DW_AT_accessibility.
4579
4580 2017-10-18  Yao Qi  <yao.qi@linaro.org>
4581
4582         * features/tic6x-c62x-linux.c: Remove.
4583
4584 2017-10-17  Tom Tromey  <tom@tromey.com>
4585
4586         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
4587         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
4588         (do_mixed_source_and_assembly): Likewise.
4589
4590 2017-10-17  Tom Tromey  <tom@tromey.com>
4591
4592         * regcache.c (regcache::xfer_part): Remove assertion.
4593
4594 2017-10-17  Pedro Alves  <palves@redhat.com>
4595
4596         * xml-support.c (xml_fetch_content_from_file): Call
4597         unique_ptr::release() instead unique_ptr::get() when passing
4598         through xrealloc.
4599
4600 2017-10-17  Yao Qi  <yao.qi@linaro.org>
4601
4602         * regcache.c (regcache::xfer_part): Remove parameters read and
4603         write, add parameter is_raw.  All callers are updated.
4604
4605 2017-10-16  Keith Seitz  <keiths@redhat.com>
4606
4607         * c-typeprint.c (enum access_specifier): Moved here from
4608         c_type_print_base.
4609         (output_access_specifier): New function.
4610         (c_type_print_base): Consider typedefs when assessing
4611         whether access labels are needed.
4612         Use output_access_specifier as needed.
4613         Output access specifier for typedefs, if needed.
4614         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
4615         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
4616         fields.
4617         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
4618         accessor macros.
4619
4620 2017-10-16  Tom Tromey  <tom@tromey.com>
4621
4622         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
4623         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
4624         * target.c (target_fileio_read_stralloc): Update.
4625         * sparc64-tdep.c (adi_is_addr_mapped): Update.
4626         * target.h (target_fileio_read_stralloc): Return
4627         unique_xmalloc_ptr.
4628
4629 2017-10-16  Tom Tromey  <tom@tromey.com>
4630
4631         * xml-syscall.c (xml_init_syscalls_info): Update.
4632         * xml-support.c (xinclude_start_include): Update.
4633         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
4634         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
4635         (xml_fetch_content_from_file): Likewise.
4636         * osdata.c (get_osdata): Update.
4637         * target.h (target_read_stralloc, target_get_osdata): Return
4638         unique_xmalloc_ptr.
4639         * solib-aix.c (solib_aix_get_library_list): Update.
4640         * solib-target.c (solib_target_current_sos): Update.
4641         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
4642         * xml-tdesc.c (fetch_available_features_from_target): Update.
4643         (target_fetch_description_xml): Update.
4644         (file_read_description_xml): Update.
4645         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
4646         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
4647         (remote_pid_to_exec_file): Update.
4648         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
4649         (target_get_osdata): Likewise.
4650
4651 2017-10-16  Tom Tromey  <tom@tromey.com>
4652
4653         * remote.c (remote_register_number_and_offset): Use std::vector.
4654         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
4655         (putpkt_binary): Use gdb::def_vector.
4656         (compare_sections_command): Use gdb::byte_vector.
4657
4658 2017-10-16  Tom Tromey  <tom@tromey.com>
4659
4660         * ppc-linux-nat.c (hwdebug_insert_point): Use
4661         gdb::unique_xmalloc_ptr, XDUP.
4662
4663 2017-10-16  Tom Tromey  <tom@tromey.com>
4664
4665         * probe.c (parse_probes): Use std::string.
4666         (info_probes_for_ops, enable_probes_command)
4667         (disable_probes_command): Remove cleanups.
4668
4669 2017-10-16  Tom Tromey  <tom@tromey.com>
4670
4671         * buildsym.c (block_compar): Remove.
4672         (end_symtab_get_static_block): Use std::vector.
4673
4674 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
4675
4676         * memrange.h (struct mem_range): Define operator< and operator==.
4677         (mem_range_s): Remove.
4678         (DEF_VEC_O (mem_range_s)): Remove.
4679         (normalize_mem_ranges): Change parameter type to std::vector.
4680         * memrange.c (compare_mem_ranges): Remove.
4681         (normalize_mem_ranges): Change parameter type to std::vector,
4682         adjust to vector change.
4683         * exec.c (section_table_available_memory): Return vector, remove
4684         parameter.
4685         (section_table_read_available_memory): Adjust to std::vector
4686         change.
4687         * remote.c (remote_read_bytes): Adjust to std::vector
4688         change.
4689         * tracepoint.h (traceframe_available_memory): Change parameter
4690         type to std::vector.
4691         * tracepoint.c (traceframe_available_memory): Change parameter
4692         type to std::vector, adjust.
4693         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
4694         std::vector change.
4695         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4696         unittests/memrange-selftests.c.
4697         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
4698         * gdb/unittests/memrange-selftests.c: New file.
4699
4700 2017-10-16  Pedro Alves  <palves@redhat.com>
4701
4702         * elfread.c (probe_key_free): Rename range-for variable.
4703         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
4704         (find_probe_by_pc, collect_probes): Rename range-for variable.
4705
4706 2017-10-16  Yao Qi  <yao.qi@linaro.org>
4707
4708         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
4709         * features/tic6x-c62x.c: Remove.
4710         * features/tic6x-c64x-linux.c: Remove.
4711         * features/tic6x-c64x.c: Remove.
4712         * features/tic6x-c64xp-linux.c: Remove.
4713         * features/tic6x-c64xp.c: Remove.
4714         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
4715         initialize_tdesc_tic6x_*_linux functions.
4716         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
4717         initialize_tdesc_tic6x_* functions.
4718
4719 2017-10-16  Yao Qi  <yao.qi@linaro.org>
4720
4721         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
4722         tic6x-c62x.
4723         * regformats/tic6x-c62x.dat: Remove.
4724         * regformats/tic6x-c64x.dat: Remove.
4725         * regformats/tic6x-c64xp.dat: Remove.
4726
4727 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
4728
4729         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
4730         (the !HAVE_LIBEXPAT version).
4731
4732 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
4733
4734         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
4735         const.
4736
4737 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
4738
4739         * target.h: Include tracepoint.h.
4740         (enum trace_find_type): Move to tracepoint.h.
4741         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
4742         * tracepoint.h: Don't include target.h
4743         (enum trace_find_type): Move from target.h.
4744         (parse_traceframe_info): Return a unique ptr.
4745         * tracepoint.c (current_traceframe_info): Change type to unique
4746         ptr.
4747         (free_traceframe_info): Remove.
4748         (clear_traceframe_info): Don't manually free
4749         current_traceframe_info.
4750         (free_result): Remove.
4751         (parse_traceframe_info): Return a unique ptr.
4752         (get_traceframe_info): Adjust to unique ptr.
4753         * ctf.c (ctf_traceframe_info): Return a unique ptr.
4754         * remote.c (remote_traceframe_info): Return a unique ptr.
4755         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
4756         ptr.
4757         * target-debug.h (target_debug_print_traceframe_info_up): New
4758         macro.
4759         * target-delegates.c: Regenerate.
4760
4761 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
4762
4763         * memrange.h (struct mem_range): Add constructors.
4764         * tracepoint.h (struct traceframe_info) <memory>: Change type to
4765         std::vector<mem_range>.
4766         * tracepoint.c (free_traceframe_info): Don't manually free
4767         vector.
4768         (traceframe_info_start_memory): Adjust to vector change.
4769         (traceframe_available_memory): Likewise.
4770         * tracefile-tfile.c (build_traceframe_info): Likewise.
4771         * ctf.c (ctf_traceframe_info): Likewise.
4772
4773 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
4774
4775         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
4776         std::vector<int>.
4777         * tracepoint.c (free_traceframe_info): Deallocate with delete.
4778         (traceframe_info_start_tvar): Adjust to vector change.
4779         (parse_traceframe_info): Allocate with new.
4780         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
4781         vector change.
4782         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
4783         change.
4784         tfile_traceframe_info): Allocate with new.
4785         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
4786         change.
4787
4788 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
4789
4790         * tracepoint.c (traceframe_info): Rename to...
4791         (current_traceframe_info): ...this.
4792         (clear_traceframe_info): Adjust.
4793         (get_traceframe_info): Adjust.
4794
4795 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
4796
4797         * nat/linux-osdata.c: Include algorithm.
4798         (compare_processes): Remove.
4799         (struct pid_pgid_entry): New struct.
4800         (linux_xfer_osdata_processgroups): Use std::vector instead of
4801         XNEWVEC.
4802
4803 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
4804
4805         * objfiles.h: Don't include symfile.h.
4806         (struct partial_symbol): Remove forward-declaration.
4807         (struct objfile) <global_psymbols, static_psymbols>: Change type
4808         to std::vector<partial_symbol *>.
4809         * objfiles.c (objfile::objfile): Don't memset those fields.
4810         (objfile::~objfile): Don't free those fields.
4811         * psympriv.h (struct psymbol_allocation_list): Remove
4812         forward-declaration.
4813         (add_psymbol_to_list): Change psymbol_allocation_list parameter
4814         to std::vector.
4815         (start_psymtab_common): Change parameters to std::vector.
4816         * psymtab.c: Include algorithm.
4817         (require_partial_symbols): Call shrink_to_fit.
4818         (find_pc_sect_psymbol): Adjust to vector change.
4819         (match_partial_symbol): Likewise.
4820         (lookup_partial_symbol): Likewise.
4821         (psym_relocate): Likewise.
4822         (dump_psymtab): Likewise.
4823         (recursively_search_psymtabs): Likewise.
4824         (compare_psymbols): Remove.
4825         (sort_pst_symbols): Adjust to vector change.
4826         (start_psymtab_common): Likewise.
4827         (end_psymtab_common): Likewise.
4828         (psymbol_bcache_full): De-constify return value.
4829         (add_psymbol_to_bcache): Likewise.
4830         (extend_psymbol_list): Remove.
4831         (append_psymbol_to_list): Adjust to vector change.
4832         (add_psymbol_to_list): Likewise.
4833         (init_psymbol_list): Likewise.
4834         (maintenance_info_psymtabs): Likewise.
4835         (maintenance_check_psymtabs): Likewise.
4836         * symfile.h (struct psymbol_allocation_list): Remove.
4837         * symfile.c (reread_symbols): Adjust to vector change.
4838         * dbxread.c (start_psymtab): Change type of parameters.
4839         (dbx_symfile_read): Adjust to vector change.
4840         (read_dbx_symtab): Likewise.
4841         (start_psymtab): Change type of parameters.
4842         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
4843         (create_partial_symtab): Likewise.
4844         (add_partial_symbol): Likewise.
4845         (write_one_signatured_type): Likewise.
4846         (recursively_write_psymbols): Likewise.
4847         * mdebugread.c (parse_partial_symbols): Likewise.
4848         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
4849         (scan_xcoff_symtab): Adjust to vector change.
4850         (xcoff_initial_scan): Likewise.
4851
4852 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
4853
4854         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
4855
4856 2017-10-13  Yao Qi  <yao.qi@linaro.org>
4857
4858         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
4859         Remove s390x-*-expedite, add s390x-expedite.
4860
4861 2017-10-13  Yao Qi  <yao.qi@linaro.org>
4862
4863         * features/s390-gs-linux64.c: Regenerated.
4864         * features/s390x-gs-linux64.c: Regenerated.
4865
4866 2017-10-13  Tom Tromey  <tom@tromey.com>
4867
4868         * compile/compile-object-run.c (do_module_cleanup): Use delete.
4869         * solib.c (update_solib_list, reload_shared_libraries_1): Use
4870         delete.
4871         * symfile.c (symbol_file_add_with_addrs): Use new.
4872         (symbol_file_add_separate): Update comment.
4873         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
4874         * jit.c (jit_object_close_impl): Use new.
4875         (jit_unregister_code): Use delete.
4876         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
4877         (~objfile): Rename from free_objfile.
4878         (free_objfile_separate_debug, do_free_objfile_cleanup)
4879         (free_all_objfiles, objfile_purge_solibs): Use delete.
4880         * objfiles.h (struct objfile): Add constructor and destructor.
4881         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
4882         (allocate_objfile, free_objfile): Don't declare.
4883         (struct objstats): Add initializers.
4884
4885 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
4886
4887         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
4888         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
4889         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
4890         * gdbarch.h: Regenerate.
4891         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4892         Adjust comment.
4893         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
4894         (i386_displaced_step_fixup): Adjust comment.
4895         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
4896
4897 2017-10-12  Tom Tromey  <tom@tromey.com>
4898
4899         * prologue-value.h (pv_area::store_would_trash): Return bool.
4900         (pv_area::find_reg): Likewise.
4901         * prologue-value.c (pv_area::store_would_trash): Return bool.
4902         (pv_area::find_reg): Likewise.
4903
4904 2017-10-12  Tom Tromey  <tom@tromey.com>
4905
4906         * s390-linux-tdep.c (s390_store, s390_load)
4907         (s390_check_for_saved, s390_analyze_prologue): Update.
4908         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
4909         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
4910         * prologue-value.h (class pv_area): Move from prologue-value.c.
4911         Change names of members.  Add constructor, destructor, member
4912         functions.
4913         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
4914         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
4915         (pv_area_fetch, pv_area_scan): Don't declare.
4916         * prologue-value.c (struct pv_area::area_entry): Now member of
4917         pv_area.
4918         (struct pv_area): Move to prologue-value.h.
4919         (pv_area::pv_area): Rename from make_pv_area.
4920         (pv_area::~pv_area): Rename from free_pv_area.
4921         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
4922         (clear_entries, find_entry, overlaps, store_would_trash, store)
4923         (fetch, find_reg, scan): Now member of pv_area.
4924         Remove "area" argument.  Update.
4925         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
4926         Update.
4927         * mn10300-tdep.c (push_reg, check_for_saved)
4928         (mn10300_analyze_prologue): Update.
4929         * mep-tdep.c (is_arg_spill, check_for_saved)
4930         (mep_analyze_prologue): Update.
4931         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
4932         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
4933         (m32c_is_struct_return, m32c_analyze_prologue): Update.
4934         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
4935         Update.
4936         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
4937         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
4938
4939 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
4940
4941         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
4942         * linux-nat.c (linux_nat_delete_thread): New variable.
4943         (lwp_free): Invoke linux_nat_delete_thread if set.
4944         (linux_nat_set_delete_thread): New function.
4945         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
4946         thread delete callback.
4947         * arm-linux-nat.c (arm_linux_delete_thread): New function.
4948         (_initialize_arm_linux_nat): Assign thread delete callback.
4949         * s390-linux-nat.c (s390_delete_thread): New function.
4950         (_initialize_s390_nat): Assign thread delete callback.
4951         * x86-linux-nat.c (x86_linux_add_target): Likewise.
4952         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
4953         function.
4954         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
4955         declaration.
4956         * nat/x86-linux.c (x86_linux_delete_thread): New function.
4957         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
4958
4959 2017-10-09  Tom Tromey  <tom@tromey.com>
4960
4961         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
4962         std::string.
4963         * tui/tui-layout.c (enum tui_status): Use std::string.
4964
4965 2017-10-11  Tom Tromey  <tom@tromey.com>
4966
4967         * gdbthread.h (thread_command): Constify.
4968         * inferior.h (detach_command): Constify.
4969         * top.h (set_history, show_history): Constify.
4970         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
4971         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
4972         * bsd-kvm.c (bsd_kvm_cmd): Constify.
4973         * printcmd.c (set_command): Constify.
4974         (non_const_set_command): New function.
4975         * dcache.c (set_dcache_command, show_dcache_command): Constify.
4976         * breakpoint.c (enable_command, disable_command, delete_command)
4977         (catch_command, tcatch_command, set_breakpoint_cmd)
4978         (show_breakpoint_cmd): Constify.
4979         * macrocmd.c (macro_command): Constify.
4980         * infcmd.c (unset_command, kill_command, detach_command)
4981         (info_proc_cmd): Constify.
4982         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
4983         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
4984         (info_auto_load_cmd): Constify.
4985         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
4986         (unset_tdesc_cmd): Constify.
4987         * ada-lang.c (set_ada_command, show_ada_command)
4988         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
4989         * guile/guile.c (set_guile_command, show_guile_command)
4990         (info_guile_command): Constify.
4991         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
4992         Constify.
4993         * skip.c (skip_command): Constify.
4994         * compile/compile.c (_initialize_compile): Constify.
4995         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
4996         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
4997         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
4998         (maint_btrace_pt_show_cmd): Constify.
4999         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
5000         Constify.
5001         * python/python.c (user_show_python, user_set_python): Constify.
5002         * mips-tdep.c (set_mips_command, show_mips_command)
5003         (set_mipsfpu_command): Constify.
5004         * record-btrace.c (cmd_record_btrace_start)
5005         (cmd_set_record_btrace, cmd_show_record_btrace)
5006         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
5007         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
5008         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
5009         Constify.
5010         * symfile.c (overlay_command): Constify.
5011         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
5012         * cli/cli-logging.c (set_logging_command, show_logging_command):
5013         Constify.
5014         * cli/cli-dump.c (dump_command, append_command)
5015         (srec_dump_command, ihex_dump_command, verilog_dump_command)
5016         (tekhex_dump_command, binary_dump_command)
5017         (binary_append_command): Constify.
5018         * cli/cli-decode.c (struct cmd_list_element): Change type of
5019         "fun".
5020         * cli/cli-cmds.c (info_command, show_command, set_debug)
5021         (show_debug): Constify.
5022         (show_command): Add non-const overload.
5023         * top.c (set_history, show_history): Constify.
5024         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
5025         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
5026         * target.c (target_command): Constify.
5027         * sparc64-tdep.c (info_adi_command): Constify.
5028         * record-full.c (cmd_record_full_start): Constify.
5029         (set_record_full_command): Constify.  Fix typo.
5030         (show_record_full_command): Constify.
5031         * thread.c (thread_command, thread_apply_command): Constify.
5032         * memattr.c (dummy_cmd): Constify.
5033         * value.c (function_command): Constify.
5034         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
5035         * probe.c (info_probes_command): Constify.
5036         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
5037         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
5038         (show_thread_cmd, set_thread_default_cmd)
5039         (show_thread_default_cmd): Constify.
5040         (check_empty): Constify.
5041         * tracepoint.c (tfind_command): Constify.
5042         * cp-support.c (maint_cplus_command): Constify.
5043         * windows-tdep.c (info_w32_command): Constify.
5044         * record.c (cmd_record_start, set_record_command)
5045         (show_record_command, info_record_command, cmd_record_goto):
5046         Constify.
5047         * ravenscar-thread.c (set_ravenscar_command)
5048         (show_ravenscar_command): Constify.
5049         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
5050         Constify.
5051         (add_internal_problem_command): Remove casts.
5052         * arc-tdep.c (maintenance_print_arc_command): Constify.
5053         * valprint.c (set_print, show_print, set_print_raw)
5054         (show_print_raw): Constify.
5055         * maint.c (maintenance_command, maintenance_info_command)
5056         (maintenance_print_command, maintenance_set_cmd)
5057         (maintenance_show_cmd, set_per_command_cmd)
5058         (show_per_command_cmd, maintenance_check_command): Constify.
5059         * language.c (set_check, show_check): Constify.
5060         * typeprint.c (show_print_type, set_print_type): Constify.
5061         * go32-nat.c (go32_info_dos_command): Constify.
5062
5063 2017-10-11  Tom Tromey  <tom@tromey.com>
5064
5065         * breakpoint.c (prepare_re_set_context): Remove.
5066         (breakpoint_re_set_one): Update.  Don't use cleanups.
5067         (breakpoint_re_set): Use scoped_restore, std::string, and
5068         scoped_restore_current_language.
5069
5070 2017-10-11  Tom Tromey  <tom@tromey.com>
5071
5072         * breakpoint.c (commands_command_1): Use std::string.
5073         (cleanup_executing_breakpoints): Remove.
5074         (bpstat_do_actions_1): Use scoped_restore.
5075         (bpstat_check_watchpoint): Use std::string.
5076         (decode_static_tracepoint_spec): Likewise.
5077         (break_range_command): Likewise.
5078         (watch_command_1): Likewise.
5079         (compare_breakpoints): Change argument types.
5080         (clear_command): Use std::vector.
5081         (cleanup_executing_breakpoints): Remove.
5082         (update_global_location_list): Use unique_xmalloc_ptr.
5083         (strace_command): Remove unused declaration.
5084
5085 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
5086
5087         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
5088         * NEWS: Mention new FreeBSD/arm native configuration.
5089         * configure.host: Add arm*-*-freebsd*.
5090         * configure.nat: Likewise.
5091         * arm-fbsd-nat.c: New file.
5092
5093 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
5094
5095         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
5096         (ALLDEPFILES): Add arm-fbsd-tdep.c.
5097         * NEWS: Mention new FreeBSD/arm target.
5098         * configure.tgt: Add arm*-*-freebsd*.
5099         * arm-fbsd-tdep.c: New file.
5100         * arm-fbsd-tdep.h: New file.
5101
5102 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
5103
5104         * linux-tdep.c (linux_make_corefile_notes): Remove call to
5105         `gdbarch_elfcore_write_linux_prpsinfo'.
5106         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
5107         method.
5108         (elf_internal_linux_prpsinfo): Remove declaration.
5109         * gdbarch.h: Regenerate.
5110         * gdbarch.c: Regenerate.
5111
5112 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
5113
5114         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
5115         `set_gdbarch_elfcore_write_linux_prpsinfo'.
5116
5117 2017-10-11  Pedro Alves  <palves@redhat.com>
5118
5119         * breakpoint.c (reattach_breakpoints): Delete.
5120         * breakpoint.h (reattach_breakpoints): Delete.
5121
5122 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
5123
5124         * symfile.c (registered_sym_fns): Make struct, not typedef.
5125         (DEF_VEC_O (registered_sym_fns)): Remove.
5126         (symtab_fns): Change type to std::vector.
5127         (add_symtab_fns): Adjust.
5128         (find_sym_fns): Adjust.
5129
5130 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
5131
5132         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
5133         * arc-tdep.h (arc_arch_is_em): New function.
5134         (arc_arch_is_hs): Likewise.
5135
5136 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
5137
5138         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
5139         parentheses in the declaration.
5140         (macro_lookup_inclusion): Likewise.
5141         (macro_lookup_definition): Likewise.
5142         * p-lang.h (pascal_builtin_types): Likewise.
5143         * tui/tui-data.c (tui_win_list): Likewise.
5144         * tui/tui-data.h (tui_win_list): Likewise.
5145         * utils.h (make_cleanup_free_section_addr_info): Likewise.
5146
5147 2017-10-11  Mark Rages  <markrages@gmail.com>
5148
5149         * target-memory.c (block_boundaries): Fix for block address not
5150         aligned on block size.
5151
5152 2017-10-10  Pedro Alves <palves@redhat.com>
5153             Tom Tromey  <tom@tromey.com>
5154
5155         * breakpoint.c (struct captured_breakpoint_query_args)
5156         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
5157         (print_breakpoint): New.
5158         * breakpoint.h (print_breakpoint): Declare.
5159         * common/common-exceptions.h (enum return_reason): Remove
5160         references to catch_exceptions.
5161         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
5162         Delete.
5163         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
5164         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
5165         * gdb.h: Delete.
5166         * gdbthread.h (thread_select): Declare.
5167         * mi/mi-cmd-break.c: Don't include gdb.h.
5168         (breakpoint_notify): Use print_breakpoint.
5169         * mi/mi-cmd-catch.c: Don't include gdb.h.
5170         * mi/mi-interp.c: Don't include gdb.h.
5171         (mi_print_breakpoint_for_event): New.
5172         (mi_breakpoint_created, mi_breakpoint_modified): Use
5173         mi_print_breakpoint_for_event.
5174         * mi/mi-main.c: Don't include gdb.h.
5175         (mi_cmd_thread_select): Parse the global thread ID here.  Use
5176         thread_select instead of gdb_thread_select.
5177         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
5178         of using gdb_list_thread_ids.
5179         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
5180         FILEIO_ENOSYS here.
5181         (remote_fileio_request): Use TRY/CATCH instead of
5182         catch_exceptions.
5183         * symfile-mem.c (struct symbol_file_add_from_memory_args)
5184         (symbol_file_add_from_memory_wrapper): Delete.
5185         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
5186         * thread.c: Don't include gdb.h.
5187         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
5188         (thread_alive): Use thread_select.
5189         (do_captured_thread_select): Delete, parts salvaged as ...
5190         (thread_select): ... this new function.
5191         (gdb_thread_select): Delete.
5192
5193 2017-10-10  Pedro Alves  <palves@redhat.com>
5194             Tom Tromey  <tom@tromey.com>
5195
5196         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
5197         and reverse logic.
5198         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
5199         No longer macros.  Instead ...
5200         (enum wp_check_result): They're now values of this new
5201         enumeration.
5202         (watchpoint_check): Change return type to wp_check_result and
5203         parameter type to bpstat.
5204         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
5205         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
5206         catch_errors.  Reverse logic of watchpoint_check call.
5207         (breakpoint_re_set_one): Now returns void and takes a breakpoint
5208         pointer as parameter.
5209         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
5210         * common/common-exceptions.c (throw_exception_sjlj): Update
5211         comments to avoid mentioning catch_errors.
5212         * exceptions.c (catch_errors): Delete.
5213         * exceptions.h: Update comments to avoid mentioning catch_errors.
5214         (catch_errors_ftype, catch_errors): Delete.
5215         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
5216         (hook_stop_stub): Delete.
5217         (restore_selected_frame): Change return type to void, and
5218         parameter type to const frame_id &.
5219         (restore_infcall_control_state): Use TRY/CATCH instead of
5220         catch_errors.
5221         * main.c (captured_command_loop): Return void and remove
5222         parameter.  Remove references to catch_errors.
5223         (captured_main): Use TRY/CATCH instead of catch_errors.
5224         * objc-lang.c (objc_submethod_helper_data)
5225         (find_objc_msgcall_submethod_helper): Delete.
5226         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
5227         catch_errors.
5228         * record-full.c (record_full_message): Return void.
5229         (record_full_message_args, record_full_message_wrapper): Delete.
5230         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
5231         instead of catch_errors.
5232         * solib-aix.c (solib_aix_open_symbol_file_object): Change
5233         parameter type to int.
5234         * solib-darwin.c (open_symbol_file_object): Ditto.
5235         * solib-dsbt.c (open_symbol_file_object): Ditto.
5236         * solib-frv.c (open_symbol_file_object): Ditto.
5237         * solib-svr4.c (open_symbol_file_object): Ditto.
5238         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
5239         * solib.c (update_solib_list): Use TRY/CATCH instead of
5240         catch_errors.
5241         * solist.h (struct target_so_ops) <open_symbol_file_object>:
5242         Change type.
5243         * symmisc.c (struct print_symbol_args): Remove.
5244         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
5245         (print_symbol): Change type.
5246         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
5247         and remove parameters.
5248         (catch_errors): New.
5249         (get_windows_debug_event): Adjust.
5250
5251 2017-10-09  Tom Tromey  <tom@tromey.com>
5252
5253         * mi/mi-main.c (free_splay_tree): Remove.
5254         (list_available_thread_groups): Use splay_tree_up.
5255         * common/gdb_splay_tree.h: New file.
5256
5257 2017-10-09  Tom Tromey  <tom@tromey.com>
5258
5259         * mi/mi-main.c (do_nothing): Remove.
5260         (list_available_thread_groups): Update.
5261
5262 2017-10-09  Pedro Alves  <palves@redhat.com>
5263
5264         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
5265         reading registers when switching context.
5266
5267 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
5268
5269         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
5270         (fbsd_convert_siginfo): Likewise.
5271         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
5272
5273 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
5274
5275         * configure.ac (try_guile_versions): Remove guile-2.2.
5276         * configure: Regenerate.
5277
5278 2017-10-09  Tom Tromey  <tom@tromey.com>
5279
5280         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
5281         (COMPILE.pre): Use $(CXX).
5282
5283 2017-10-09  Pedro Alves  <palves@redhat.com>
5284
5285         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
5286         Use bool.
5287         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5288         * cp-support.h (cp_remove_params): Now returns a
5289         gdb::unique_xmalloc_ptr.
5290         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
5291         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
5292         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
5293         returning a gdb::unique_xmalloc_ptr.
5294         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5295         * stack.c (find_frame_funname): Adjust to cp_remove_params
5296         returning a gdb::unique_xmalloc_ptr.
5297
5298 2017-10-08  Tom Tromey  <tom@tromey.com>
5299
5300         * dwarf2read.c (dwarf2_get_dwz_file): Use
5301         gdb::unique_xmalloc_ptr.
5302         (find_slot_in_mapped_hash): Likewise.
5303         (dwarf2_physname): Likewise.
5304         (create_dwo_unit_in_dwp_v1): Use std::string.
5305         (create_dwo_unit_in_dwp_v2): Likewise.
5306         (lookup_dwo_cutu): Likewise.
5307         (inherit_abstract_dies): Use std::vector.
5308         (read_array_type): Likewise.
5309         (dwarf_decode_macros): Remove unused declaration.
5310         (unsigned_int_compar): Remove.
5311         (dwarf2_build_psymtabs_hard): Use scoped_restore.
5312         (psymtabs_addrmap_cleanup): Remove.
5313
5314 2017-10-08  Tom Tromey  <tom@tromey.com>
5315
5316         * frame-unwind.c (frame_unwind_try_unwinder): Update.
5317         * frame.h (frame_cleanup_after_sniffer): Declare.
5318         (frame_prepare_for_sniffer): Return void.
5319         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
5320         type of argument.
5321         (frame_prepare_for_sniffer): Return void.
5322
5323 2017-10-08  Tom Tromey  <tom@tromey.com>
5324
5325         * utils.h (make_cleanup_value_free): Remove.
5326         * utils.c (do_value_free, struct cleanup): Remove.
5327         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
5328         Use gdb_value_up.
5329         * value.h (struct value_deleter): New.
5330         (gdb_value_up): New typedef.
5331
5332 2017-10-08  Tom Tromey  <tom@tromey.com>
5333
5334         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
5335         (make_cleanup_free_search_symbols): Remove.
5336         (search_symbols): Return std::vector.
5337         (symbol_search::compare_search_syms): Now member of
5338         symbol_search.  Change arguments.
5339         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
5340         (symtab_symbol_info, rbreak_command): Update.
5341         * symtab.h (struct symbol_search) <next>: Remove.
5342         Add constructors.
5343         (symbol_search::operator<): New function.
5344         (symbol_search::operator==): New function.
5345         (search_symbols): Remove std::vector.
5346         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
5347         (symbol_search::compare_search_syms): Declare.
5348
5349 2017-10-06  Yao Qi  <yao.qi@linaro.org>
5350
5351         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
5352         arch/aarch64-insn.o.
5353         Remove one rule.
5354         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
5355
5356 2017-10-06  Yao Qi  <yao.qi@linaro.org>
5357
5358         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
5359         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
5360         arch/arm-linux.o respectively.
5361         * configure.tgt: Likewise.
5362
5363 2017-10-06  Yao Qi  <yao.qi@linaro.org>
5364
5365         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
5366         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
5367
5368 2017-10-06  Pedro Alves  <palves@redhat.com>
5369
5370         * windows-nat.c: Include <algorithm>.
5371
5372 2017-10-06  Yao Qi  <yao.qi@linaro.org>
5373
5374         * configure.tgt (i386_tobjs): New variable.
5375         (amd64_tobjs): New variable.
5376         Set $cpu_obs and $os_obs.
5377
5378 2017-10-06  Yao Qi  <yao.qi@linaro.org>
5379
5380         * Makefile.in (CONFIG_SRC_SUBDIR): New.
5381         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
5382         (clean): Remove object files and dependency files.
5383         (distclean): Remove the directory.
5384         * configure.ac: Invoke AC_CONFIG_COMMANDS.
5385         * configure: Re-generated.
5386         * configure.tgt: Replace amd64.o with arch/amd64.o.
5387
5388 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
5389
5390         PR build/22188
5391         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
5392         and SETEND.
5393
5394 2017-10-05  Pedro Alves  <palves@redhat.com>
5395
5396         * linux-nat.c (linux_child_follow_fork): When following the parent
5397         and detaching the child, consult the parent thread's architecture
5398         instead of the child's.
5399
5400 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
5401
5402         * ax.h: Do not include "doublest.h".
5403         (union agent_val): Remove.
5404
5405 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
5406
5407         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
5408         (decimal_to_string): Return std::string object.
5409         (decimal_from_string): Accept std::string object.  Return bool.
5410         (decimal_from_integral, decimal_from_doublest): Remove.
5411         (decimal_from_longest): Add prototype.
5412         (decimal_from_ulongest): Likewise.
5413         (decimal_to_longest): Likewise.
5414         (decimal_from_doublest): Likewise.
5415         * dfp.c: Do not include "gdbtypes.h" or "value.h".
5416         (MAX_DECIMAL_STRING): Move here.
5417         (decimal_to_string): Return std::string object.
5418         (decimal_from_string): Accept std::string object.  Return bool.
5419         (decimal_from_integral): Remove, replace by ...
5420         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
5421         (decimal_to_longest): New function.
5422         (decimal_from_floating): Remove, replace by ...
5423         (decimal_from_doublest): ... this new function.
5424         (decimal_to_doublest): Update to new decimal_to_string interface.
5425
5426         * value.c (unpack_long): Use decimal_to_longest.
5427         * valops.c (value_cast): Use decimal_from_doublest instead of
5428         decimal_from_floating.  Use decimal_from_[u]longest isntead of
5429         decimal_from_integral.
5430         * valarith.c (value_args_as_decimal): Likewise.
5431         * valprint.c (print_decimal_floating): Update to new
5432         decimal_to_string interface.
5433         * printcmd.c (printf_decfloat): Likewise.
5434         * c-exp.y (parse_number): Update to new decimal_from_string interface.
5435
5436 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
5437
5438         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
5439         * gdbtypes.c: Include "floatformat.h".
5440         * value.c: Likewise.
5441         * m68k-tdep.c: Likewise.
5442
5443         * findvar.c: Do not include "floatformat.h".
5444         * amd64-darwin-tdep.c: Likewise.
5445         * arm-linux-tdep.c: Likewise.
5446         * i386-darwin-tdep.c: Likewise.
5447         * i387-tdep.c: Likewise.
5448         * m68k-linux-tdep.c: Likewise.
5449         * mep-tdep.c: Likewise.
5450         * mips-tdep.c: Likewise.
5451         * nios2-tdep.c: Likewise.
5452         * s390-linux-tdep.c: Likewise.
5453         * sparc-obsd-tdep.c: Likewise.
5454         * sparc-tdep.c: Likewise.
5455         * sparc64-tdep.c: Likewise.
5456         * spu-tdep.c: Likewise.
5457         * tic6x-tdep.c: Likewise.
5458         * tilegx-tdep.c: Likewise.
5459         * vax-tdep.c: Likewise.
5460         * xstormy16-tdep.c: Likewise.
5461         * xtensa-tdep.c: Likewise.
5462
5463         * top.c: Do not include "doublest.h".
5464         * aarch64-tdep.c: Likewise.
5465         * alpha-tdep.c: Likewise.
5466         * arm-linux-tdep.c: Likewise.
5467         * m68k-linux-tdep.c: Likewise.
5468         * tilegx-tdep.c: Likewise.
5469         * xstormy16-tdep.c: Likewise.
5470
5471 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
5472
5473         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
5474         (mipsn32_fbsd_sigframe): Define.
5475         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
5476         for FreeBSD/mipsn32.
5477
5478 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
5479
5480         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
5481         AT_HWCAP.
5482
5483 2017-10-05  Tristan Gingold  <tgingold@free.fr>
5484
5485         * MAINTAINERS (Misc): Update my email address.
5486
5487 2017-10-04  Pedro Alves  <palves@redhat.com>
5488
5489         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
5490         it instead of target_gdbarch.
5491         (get_remote_state, get_remote_packet_size): Adjust
5492         get_remote_arch_state calls, passing down target_gdbarch
5493         explicitly.
5494         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
5495         'gdbarch' and use it instead of target_gdbarch.
5496         (get_memory_packet_size): Adjust get_remote_arch_state calls,
5497         passing down target_gdbarch explicitly.
5498         (struct stop_reply) <arch>: New field.
5499         (remote_parse_stop_reply): Use the stopped thread's architecture,
5500         not the current inferior's.  Save the architecture in the
5501         stop_reply.
5502         (process_stop_reply): Use the stop reply's architecture.
5503         (process_g_packet, remote_fetch_registers)
5504         (remote_prepare_to_store, store_registers_using_G)
5505         (remote_store_registers): Adjust get_remote_arch_state calls,
5506         using the regcache's architecture.
5507         (remote_get_trace_status): Adjust get_remote_arch_state calls,
5508         passing down target_gdbarch explicitly.
5509         * spu-multiarch.c (spu_thread_architecture): Defer to the target
5510         beneath instead of calling target_gdbarch.
5511         * target.c (default_thread_architecture): Use the specified
5512         inferior's architecture, instead of the current inferior's
5513         architecture (via target_gdbarch).
5514
5515 2017-10-04  Pedro Alves  <palves@redhat.com>
5516
5517         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
5518         case.
5519         (regcache_print): Handle !target_has_registers here instead.
5520
5521 2017-10-04  Pedro Alves  <palves@redhat.com>
5522
5523         * frame.c (create_test_frame): Delete.
5524         * frame.h (create_test_frame): Delete.
5525         * gdbarch-selftests.c: Include gdbthread.h and target.h.
5526         (class regcache_test): Delete.
5527         (test_target_has_registers, test_target_has_stack)
5528         (test_target_has_memory, test_target_prepare_to_store)
5529         (test_target_store_registers): New functions.
5530         (test_target_ops): New class.
5531         (register_to_value_test): Error out if there's already a
5532         process_stratum (or higher) target pushed.  Create a fuller mock
5533         environment, with mock target_ops, inferior, address space, thread
5534         and inferior_ptid.
5535         * progspace.c (struct address_space): Move to ...
5536         * progspace.h (struct address_space): ... here.
5537         * regcache.h (regcache::~regcache, regcache::raw_write)
5538         [GDB_SELF_TEST]: No longer virtual.
5539
5540 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
5541
5542         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
5543
5544 2017-10-04  Pedro Alves  <palves@redhat.com>
5545
5546         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
5547         out of 'between TRY and CATCH'.
5548
5549 2017-10-04  Pedro Alves  <palves@redhat.com>
5550
5551         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
5552         * common/common-exceptions.h (TRY): Open an outermost scope.
5553         Expand intro comment.
5554         (CATCH): Reindent.
5555         (END_CATCH): Close the outermost scope.
5556         * completer.c (complete_line_internal): Add missing END_CATCH.
5557
5558 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
5559
5560         * NEWS (Changes since GDB 8.0): Add entry about new
5561         'set-cwd-on-gdbserver' feature.
5562         (New remote packets): Add entry for QSetWorkingDir.
5563         * common/common-inferior.h (set_inferior_cwd): New prototype.
5564         * infcmd.c (set_inferior_cwd): Remove "static".
5565         (show_cwd_command): Expand text to include remote debugging.
5566         * remote.c: Add PACKET_QSetWorkingDir.
5567         (remote_protocol_features) <QSetWorkingDir>: New entry for
5568         PACKET_QSetWorkingDir.
5569         (extended_remote_set_inferior_cwd): New function.
5570         (extended_remote_create_inferior): Call
5571         "extended_remote_set_inferior_cwd".
5572         (_initialize_remote): Call "add_packet_config_cmd" for
5573         QSetWorkingDir.
5574
5575 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
5576
5577         * NEWS (New commands): Mention "set/show cwd".
5578         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
5579         "cd" command's help text.
5580         * common/common-inferior.h (get_inferior_cwd): New prototype.
5581         * infcmd.c (inferior_cwd_scratch): New global variable.
5582         (set_inferior_cwd): New function.
5583         (get_inferior_cwd): Likewise.
5584         (set_cwd_command): Likewise.
5585         (show_cwd_command): Likewise.
5586         (_initialize_infcmd): Add "set/show cwd" commands.
5587         * inferior.h (class inferior) <cwd>: New field.
5588         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
5589         (fork_inferior): Change inferior's cwd before its execution.
5590         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
5591         to CreateProcess.
5592
5593 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
5594
5595         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
5596         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
5597         (COMMON_OBS): Add gdb_tilde_expand.o.
5598         * common/gdb_tilde_expand.c: New file.
5599         * common/gdb_tilde_expand.h: Likewise.
5600
5601 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
5602
5603         * gdbarch.sh (objfile): Remove duplicate declaration.
5604         * gdbarch.h: Regenerate.
5605
5606 2017-10-03  Tom Tromey  <tom@tromey.com>
5607
5608         * utils.c (internal_vproblem): Use string_vprintf.
5609
5610 2017-10-03  Tom Tromey  <tom@tromey.com>
5611
5612         * printcmd.c (info_symbol_command): Use std::string.
5613
5614 2017-10-03  Tom Tromey  <tom@tromey.com>
5615
5616         * top.c (gdb_safe_append_history): Use std::string.
5617
5618 2017-10-03  Tom Tromey  <tom@tromey.com>
5619
5620         * event-top.c (stdin_event_handler): Update.
5621         * main.c (captured_main_1): Update.
5622         * top.h (make_delete_ui_cleanup): Remove.
5623         (struct ui): Add constructor and destructor.
5624         (new_ui, delete_ui): Remove.
5625         * top.c (make_delete_ui_cleanup): Remove.
5626         (new_ui_command): Use std::unique_ptr.
5627         (delete_ui_cleanup): Remove.
5628         (ui::ui): Rename from new_ui.  Update.
5629         (free_ui): Remove.
5630         (ui::~ui): Rename from delete_ui.  Update.
5631
5632 2017-10-03  Tom Tromey  <tom@tromey.com>
5633
5634         * symfile.c (load_progress): Use gdb::byte_vector.
5635
5636 2017-10-03  Tom Tromey  <tom@tromey.com>
5637
5638         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
5639         declaration.
5640         * printcmd.c (x_command): Remove unused declaration.
5641         * symfile.c (symbol_file_command): Remove unused declaration.
5642
5643 2017-10-03  Tom Tromey  <tom@tromey.com>
5644
5645         * utils.c (internal_vproblem): Use std::string.
5646         (defaulted_query): Likewise.
5647
5648 2017-10-03  Tom Tromey  <tom@tromey.com>
5649
5650         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
5651         * top.c (execute_command_to_string): Update.
5652         * utils.c (make_cleanup_restore_page_info): Remove.
5653         (do_restore_page_info_cleanup): Remove.
5654         (set_batch_flag_and_restore_page_info):
5655         New.
5656         (make_cleanup_restore_page_info): Remove.
5657         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
5658         (~set_batch_flag_and_restore_page_info): New
5659         (make_cleanup_restore_uinteger): Remove.
5660         (make_cleanup_restore_integer): Remove.
5661         (struct restore_integer_closure): Remove.
5662         (restore_integer): Remove.
5663         * utils.h (struct set_batch_flag_and_restore_page_info): New
5664         class.
5665         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
5666         (make_cleanup_restore_page_info): Remove.
5667         (make_cleanup_restore_uinteger) Remove.
5668         (make_cleanup_restore_integer) Remove.
5669
5670 2017-10-03  Tom Tromey  <tom@tromey.com>
5671
5672         * record-full.h (record_full_gdb_operation_disable_set): Return
5673         scoped_restore_tmpl<int>.
5674         * infrun.c (adjust_pc_after_break): Update.
5675         (handle_signal_stop): Update.
5676         * record-full.c (record_full_gdb_operation_disable_set): Return
5677         scoped_restore_tmpl<int>.
5678         (record_full_wait_1, record_full_insert_breakpoint)
5679         (record_full_remove_breakpoint, record_full_save)
5680         (record_full_goto_insn): Update.
5681
5682 2017-10-02  Tom Tromey  <tom@tromey.com>
5683
5684         PR rust/22236:
5685         * rust-lang.c (rust_val_print_str): New function.
5686         (val_print_struct): Call it.
5687         (rust_subscript): Preserve name of slice type.
5688
5689 2017-10-02  Tom Tromey  <tom@tromey.com>
5690
5691         * rust-lang.c (rust_subscript): Handle slices in
5692         EVAL_AVOID_SIDE_EFFECTS case.
5693
5694 2017-10-02  Tom Tromey  <tom@tromey.com>
5695
5696         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
5697
5698 2017-10-02  Tom Tromey  <tom@tromey.com>
5699
5700         * rust-lang.h (rust_slice_type): Add "extern".
5701
5702 2017-10-02  Tom Tromey  <tom@tromey.com>
5703             Pedro Alves  <palves@redhat.com>
5704
5705         * ada-lang.h (ada_exc_info::operator<): Make const.
5706         (ada_exc_info::operator==): Make const.
5707         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
5708         Make const.
5709
5710 2017-09-29  Tom Tromey  <tom@tromey.com>
5711
5712         * target.c (read_whatever_is_readable): Change type of "result".
5713         Update.
5714         (free_memory_read_result_vector): Remove.
5715         (read_memory_robust): Change return type.  Update.
5716         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
5717         bin2hex, std::string.
5718         * target.h (memory_read_result_s): Remove typedef.
5719         (free_memory_read_result_vector): Remove.
5720         (read_memory_robust): Return std::vector.
5721
5722 2017-09-29  Tom Tromey  <tom@tromey.com>
5723
5724         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
5725
5726 2017-09-29  Tom Tromey  <tom@tromey.com>
5727
5728         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
5729         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
5730         operator< and operator==.
5731         (ada_exceptions_list): Return a std::vector.
5732         * ada-lang.c (ada_exc_info::operator<): Rename from
5733         compare_ada_exception_info.
5734         (ada_exc_info::operator==): New.
5735         (sort_remove_dups_ada_exceptions_list): Change type of
5736         "exceptions".
5737         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
5738         (ada_add_global_exceptions): Likewise.
5739         (ada_exceptions_list_1): Return a std::vector.
5740         (ada_exceptions_list): Likewise.
5741
5742 2017-09-29  Tom Tromey  <tom@tromey.com>
5743
5744         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
5745         'std::set *'.
5746         (print_one_inferior): Update.
5747         (free_vector_of_ints): Remove.
5748         (list_available_thread_groups): Change "ids" to std::set.
5749         (mi_cmd_list_thread_groups): Update.
5750         (struct collect_cores_data) <core>: Now a std::set.
5751         (collect_cores): Update.
5752         (unique): Remove.
5753         (print_one_inferior): Update.
5754
5755 2017-09-29  Tom Tromey  <tom@tromey.com>
5756
5757         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
5758         (mi_execute_async_cli_command): Likewise.
5759         (mi_cmd_trace_frame_collected): Use field_fmt.
5760
5761 2017-09-29  Tom Tromey  <tom@tromey.com>
5762
5763         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
5764         gdb::byte_vector.
5765
5766 2017-09-29  Tom Tromey  <tom@tromey.com>
5767
5768         * mi/mi-parse.c (mi_parse): Remove unused declaration.
5769
5770 2017-09-29  Tom Tromey  <tom@tromey.com>
5771
5772         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
5773
5774 2017-09-29  Tom Tromey  <tom@tromey.com>
5775
5776         * varobj.h (varobj_gen_name): Return std::string.
5777         * varobj.c (varobj_gen_name): Return std::string.
5778         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
5779         (mi_cmd_var_delete): Don't copy "name".
5780
5781 2017-09-29  Tom Tromey  <tom@tromey.com>
5782
5783         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
5784         (mi_cmd_break_insert_1): Update.
5785
5786 2017-09-29  Tom Tromey  <tom@tromey.com>
5787
5788         * target.h (make_scoped_defer_target_commit_resume): Update.
5789         * target.c (make_scoped_defer_target_commit_resume): Rename from
5790         make_cleanup_defer_target_commit_resume.  Return a
5791         scoped_restore.
5792         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
5793
5794 2017-09-29  Tom Tromey  <tom@tromey.com>
5795
5796         * main.c (captured_main_1): Remove unused declaration.
5797         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
5798
5799 2017-09-29  Tom Tromey  <tom@tromey.com>
5800
5801         * symtab.c (search_symbols): Remove unused outer cleanup.
5802         (make_source_files_completion_list): Remove unused declaration.
5803
5804 2017-09-29  Tom Tromey  <tom@tromey.com>
5805
5806         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
5807
5808 2017-09-29  Tom Tromey  <tom@tromey.com>
5809
5810         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
5811         gdb::byte_vector.
5812
5813 2017-09-29  Tom Tromey  <tom@tromey.com>
5814
5815         * complaints.c (vcomplaint): Use std::string.
5816
5817 2017-09-29  Tom Tromey  <tom@tromey.com>
5818
5819         * tracepoint.c (trace_variable_command): Use std::string.
5820         (encode_actions_1): Remove unused declarations.
5821         (create_tsv_from_upload): Use std::string.
5822
5823 2017-09-29  Tom Tromey  <tom@tromey.com>
5824
5825         * cp-support.c (gdb_demangle): Use std::string.
5826
5827 2017-09-29  Tom Tromey  <tom@tromey.com>
5828
5829         * stack.c (parse_frame_specification): Use std::string
5830         (info_frame_command): Use gdb::unique_xmalloc_ptr.
5831
5832 2017-09-29  Tom Tromey  <tom@tromey.com>
5833
5834         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
5835
5836 2017-09-29  Tom Tromey  <tom@tromey.com>
5837
5838         * utils.c (vfprintf_maybe_filtered): Use std::string.
5839         (vfprintf_unfiltered): Likewise.
5840
5841 2017-09-29  Tom Tromey  <tom@tromey.com>
5842
5843         * event-top.c (top_level_prompt): Return std::string.
5844         (display_gdb_prompt): Update.
5845
5846 2017-09-29  Tom Tromey  <tom@tromey.com>
5847
5848         * unittests/common-utils-selftests.c (format): New function.
5849         (string_vprintf_tests): New function.
5850         (_initialize_common_utils_selftests): Register new tests.
5851         * common/common-utils.c (string_vprintf): New function.
5852         * common/common-utils.h (string_vprintf): Declare.
5853
5854 2017-09-29  Pedro Alves  <palves@redhat.com>
5855
5856         * common/rsp-low.c (unpack_varlen_hex): Constify.
5857         * common/rsp-low.h (unpack_varlen_hex): Constify.
5858         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
5859         Constify.
5860         * remote.c (remote_set_permissions, read_ptid)
5861         (remote_current_thread, remote_get_threads_with_qthreadinfo)
5862         (remote_static_tracepoint_marker_at)
5863         (remote_static_tracepoint_markers_by_strid)
5864         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
5865         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
5866         (parse_tracepoint_definition, parse_tsv_definition)
5867         (parse_static_tracepoint_marker_definition): Constify.
5868         * tracepoint.h (parse_static_tracepoint_marker_definition)
5869         (parse_trace_status, parse_tracepoint_status)
5870         (parse_tracepoint_definition, parse_tsv_definition): Constify.
5871
5872 2017-09-29  Pedro Alves  <palves@redhat.com>
5873
5874         * remote.c (target_buf, target_buf_size): Delete.
5875         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
5876         Use the connection's packet buffer instead.
5877         All callers adjusted.
5878         (_initialize_remote): Remove references to target_buf and
5879         target_buf_size.
5880
5881 2017-09-28  Pedro Alves  <palves@redhat.com>
5882
5883         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5884         unittests/common-utils-selftests.c.
5885         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
5886         (COMMON_OBS): Remove utils-selftests.o.
5887         * utils-selftests.c: Move to ...
5888         * unittests/common-utils-selftests.c: ... here and rename self
5889         test to "string_printf".
5890
5891 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
5892
5893         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
5894         having NULL cus or tus.
5895
5896 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
5897
5898         * arm-tdep.c: (convert_from_extended): Remove.
5899         (convert_to_extended): Likewise.
5900         (arm_extract_return_value): Use convert_typed_floating.
5901         (arm_store_return_value): Likewise.
5902
5903         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5904         * sh-tdep.c: Do not include "floatformat.h".
5905         (sh_littlebyte_bigword_type): New function.
5906         (sh_register_convert_to_virtual): Use convert_typed_floating.
5907         (sh_register_convert_to_raw): Likewise.
5908         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5909         (sh64_littlebyte_bigword_type): New function.
5910         (sh64_extract_return_value): Use convert_typed_floating.
5911         (sh64_register_convert_to_virtual): Likewise.
5912         (sh64_register_convert_to_raw): Likewise.
5913
5914 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
5915
5916         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
5917         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
5918
5919         * gdbtypes.h (union type_specific): Make field floatformat hold
5920         just a single struct floatformat, not an array.
5921         (floatformat_from_type): Move here.
5922         * gdbtypes.c (floatformat_from_type): Move here.  Update to
5923         changed TYPE_FLOATFORMAT definition.
5924         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
5925         (recursive_dump_type): Likewise.
5926         (init_float_type): Install correct floatformat for byte order.
5927         (arch_float_type): Likewise.
5928
5929 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
5930
5931         * gdbtypes.c (init_type): Change incoming argument from
5932         length-in-bytes to length-in-bits.  Assert length is a
5933         multiple of TARGET_CHAR_BITS.
5934         (arch_type, arch_flags_type): Likewise.
5935         (init_integer_type): Update call to init_type.
5936         (init_character_type): Likewise.
5937         (init_boolean_type): Likewise.
5938         (init_float_type): Likewise.
5939         (init_decfloat_type): Likewise.
5940         (init_complex_type): Likewise.
5941         (init_pointer_type): Likewise.
5942         (objfile_type): Likewise.
5943         (arch_integer_type): Update call to arch_type.
5944         (arch_character_type): Likewise.
5945         (arch_boolean_type): Likewise.
5946         (arch_float_type): Likewise.
5947         (arch_decfloat_type): Likewise.
5948         (arch_complex_type): Likewise.
5949         (arch_pointer_type): Likewise.
5950         (gdbtypes_post_init): Likewise.
5951
5952         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
5953         (read_base_type): Likewise.
5954         * mdebugread.c (basic_type): Likewise.
5955         * stabsread.c (dbx_init_float_type): Likewise.
5956         (rs6000_builtin_type): Likewise.
5957         (read_range_type): Likewise.  Also, fix call to init_integer_type
5958         with erroneous length argument.
5959
5960         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
5961         * d-lang.c (build_d_types): Likewise.
5962         * f-lang.c (build_fortran_types): Likewise.
5963         * go-lang.c (build_go_types): Likewise.
5964         * opencl-lang.c (build_opencl_types): Likewise.
5965         * jit.c (finalize_symtab): Likewise.
5966         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
5967         (build_std_type_info_type): Likewise.
5968         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
5969         update call to arch_flags_type.
5970
5971         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
5972         arch_type.
5973         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
5974         * windows-tdep.c (windows_get_tlb_type): Likewise.
5975
5976         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
5977         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5978         * m32c-tdep.c (make_types): Likewise.
5979         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
5980         (rl78_psw_type): Update call to arch_flags_type.
5981         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
5982         * rx-tdep.c (rx_psw_type): Likewise.
5983         (rx_fpsw_type): Likewise.
5984         * sparc-tdep.c (sparc_psr_type): Likewise.
5985         (sparc_fsr_type): Likewise.
5986         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
5987         (sparc64_ccr_type): Likewise.
5988         (sparc64_fsr_type): Likewise.
5989         (sparc64_fprs_type): Likewise.
5990
5991 2017-09-27  Tom Tromey  <tom@tromey.com>
5992
5993         * findcmd.c (find_command): Constify.
5994
5995 2017-09-27  Tom Tromey  <tom@tromey.com>
5996
5997         * ada-tasks.c (task_command_1, task_command): Constify.
5998
5999 2017-09-27  Tom Tromey  <tom@tromey.com>
6000
6001         * symtab.c (maintenance_print_symbol_cache)
6002         (maintenance_flush_symbol_cache)
6003         (maintenance_print_symbol_cache_statistics): Constify.
6004
6005 2017-09-27  Tom Tromey  <tom@tromey.com>
6006
6007         * inferior.c (detach_inferior_command, kill_inferior_command)
6008         (inferior_command): Constify.
6009
6010 2017-09-27  Tom Tromey  <tom@tromey.com>
6011
6012         * regcache.c (regcache_print, maintenance_print_registers)
6013         (maintenance_print_raw_registers)
6014         (maintenance_print_cooked_registers)
6015         (maintenance_print_register_groups)
6016         (maintenance_print_remote_registers): Constify.
6017
6018 2017-09-27  Tom Tromey  <tom@tromey.com>
6019
6020         * printcmd.c (map_display_numbers, undisplay_command)
6021         (enable_disable_display_command, enable_display_command)
6022         (disable_display_command): Constify.
6023
6024 2017-09-27  Tom Tromey  <tom@tromey.com>
6025
6026         * breakpoint.h (delete_command): Don't declare.
6027         * breakpoint.c (delete_command, enable_once_command)
6028         (enable_count_command, enable_delete_command, breakpoint_1)
6029         (maintenance_info_breakpoints, stopin_command, stopat_command)
6030         (delete_command, delete_trace_command, save_breakpoints)
6031         (save_breakpoints_command, save_tracepoints_command): Constify.
6032
6033 2017-09-27  Tom Tromey  <tom@tromey.com>
6034
6035         * macrocmd.c (macro_expand_command, macro_expand_once_command)
6036         (skip_ws, extract_identifier, macro_define_command)
6037         (macro_undef_command, macro_list_command): Constify.
6038
6039 2017-09-27  Tom Tromey  <tom@tromey.com>
6040
6041         * infcmd.c (environment_info, set_environment_command)
6042         (unset_environment_command, path_info, info_proc_cmd_1)
6043         (info_proc_cmd_mappings, info_proc_cmd_stat)
6044         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
6045         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
6046
6047 2017-09-27  Tom Tromey  <tom@tromey.com>
6048
6049         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
6050         Constify.
6051
6052 2017-09-27  Tom Tromey  <tom@tromey.com>
6053
6054         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
6055
6056 2017-09-27  Tom Tromey  <tom@tromey.com>
6057
6058         * demangle.c (demangle_command): Constify.
6059
6060 2017-09-27  Tom Tromey  <tom@tromey.com>
6061
6062         * progspace.c (maintenance_info_program_spaces_command):
6063         Constify.
6064
6065 2017-09-27  Tom Tromey  <tom@tromey.com>
6066
6067         * compile/compile.c (check_raw_argument, compile_file_command)
6068         (compile_code_command, compile_print_command): Constify.
6069
6070 2017-09-27  Tom Tromey  <tom@tromey.com>
6071
6072         * reggroups.c (maintenance_print_reggroups): Constify.
6073
6074 2017-09-27  Tom Tromey  <tom@tromey.com>
6075
6076         * dwarf2read.c (save_gdb_index_command): Constify.
6077
6078 2017-09-27  Tom Tromey  <tom@tromey.com>
6079
6080         * stap-probe.c (info_probes_stap_command): Constify.
6081
6082 2017-09-27  Tom Tromey  <tom@tromey.com>
6083
6084         * fork-child.c (unset_exec_wrapper_command): Constify.
6085
6086 2017-09-27  Tom Tromey  <tom@tromey.com>
6087
6088         * btrace.c (get_uint, get_context_size, no_chunk)
6089         (maint_btrace_packet_history_cmd)
6090         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
6091         (maint_info_btrace_cmd): Constify.
6092
6093 2017-09-27  Tom Tromey  <tom@tromey.com>
6094
6095         * reverse.c (delete_bookmark_command): Constify.
6096
6097 2017-09-27  Tom Tromey  <tom@tromey.com>
6098
6099         * remote.c (set_memory_packet_size)
6100         (set_memory_write_packet_size, show_memory_write_packet_size)
6101         (set_memory_read_packet_size, show_memory_read_packet_size)
6102         (compare_sections_command, packet_command, remote_put_command)
6103         (remote_get_command, remote_delete_command): Constify.
6104
6105 2017-09-27  Tom Tromey  <tom@tromey.com>
6106
6107         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
6108         (set_mipsfpu_double_command, set_mipsfpu_none_command)
6109         (set_mipsfpu_auto_command): Constify.
6110
6111 2017-09-27  Tom Tromey  <tom@tromey.com>
6112
6113         * cli/cli-cmds.h (cd_command): Constify.
6114         * cli/cli-cmds.c (cd_command): Constify.
6115
6116 2017-09-27  Tom Tromey  <tom@tromey.com>
6117
6118         * thread.c (thread_name_command, thread_find_command): Constify.
6119
6120 2017-09-27  Tom Tromey  <tom@tromey.com>
6121
6122         * probe.c (enable_probes_command, disable_probes_command):
6123         Constify.
6124
6125 2017-09-27  Tom Tromey  <tom@tromey.com>
6126
6127         * symfile.c (symbol_file_command): Constify.
6128         * gdbcore.h (deprecated_file_changed_hook): Constify.
6129         * exec.c (deprecated_file_changed_hook, exec_file_command)
6130         (file_command): Constify.
6131         * defs.h (symbol_file_command): Constify.
6132
6133 2017-09-27  Tom Tromey  <tom@tromey.com>
6134
6135         * remote-fileio.c (set_system_call_allowed)
6136         (show_system_call_allowed): Constify.
6137
6138 2017-09-27  Tom Tromey  <tom@tromey.com>
6139
6140         * tracepoint.c (delete_trace_variable_command)
6141         (tfind_end_command, tfind_start_command, tfind_pc_command)
6142         (tfind_tracepoint_command, tfind_line_command)
6143         (tfind_range_command, tfind_outside_command): Constify.
6144
6145 2017-09-27  Tom Tromey  <tom@tromey.com>
6146
6147         * ax-gdb.c (maint_agent_printf_command, agent_command)
6148         (agent_eval_command): Constify.
6149
6150 2017-09-27  Tom Tromey  <tom@tromey.com>
6151
6152         * tracepoint.c (info_scope_command): Constify.
6153         * python/python.c (gdbpy_decode_line): Constify.
6154         * python/py-breakpoint.c (bppy_init): Constify.
6155         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
6156         * location.h: (new_linespec_location)
6157         (string_to_event_location_basic, string_to_event_location):
6158         Constify.
6159         * location.c (new_linespec_location)
6160         (string_to_event_location_basic, string_to_event_location):
6161         Constify.
6162         * linespec.h (decode_line_with_current_source)
6163         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
6164         * linespec.c (linespec_lex_to_end)
6165         (decode_line_with_current_source)
6166         (decode_line_with_last_displayed): Constify.
6167         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
6168         Constify.
6169         * cli/cli-cmds.c (edit_command, list_command): Constify.
6170         * breakpoint.h (until_break_command, watch_command_wrapper)
6171         (awatch_command_wrapper, rwatch_command_wrapper)
6172         (init_ada_exception_breakpoint): Constify.
6173         * breakpoint.c (break_command_1, dprintf_command)
6174         (break_range_command, watch_command_wrapper)
6175         (rwatch_command_wrapper, awatch_command_wrapper)
6176         (until_break_command, init_ada_exception_breakpoint)
6177         (strace_marker_create_sals_from_location, trace_command)
6178         (ftrace_command, strace_command, struct tracepoint): Constify.
6179         * ax-gdb.c (agent_command_1): Constify.
6180         * ada-lang.c (ada_exception_sal): Constify.
6181
6182 2017-09-27  Tom Tromey  <tom@tromey.com>
6183
6184         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
6185         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
6186         (get_context_size, no_chunk, get_insn_history_modifiers)
6187         (cmd_record_insn_history, get_call_history_modifiers)
6188         (cmd_record_call_history): Constify.
6189
6190 2017-09-27  Tom Tromey  <tom@tromey.com>
6191
6192         * source.c (show_substitute_path_command)
6193         (unset_substitute_path_command, set_substitute_path_command):
6194         Constify.
6195
6196 2017-09-27  Tom Tromey  <tom@tromey.com>
6197
6198         * typeprint.c (maintenance_print_type): Constify.
6199         * maint.c (maintenance_dump_me, maintenance_demangle)
6200         (maintenance_time_display, maintenance_info_sections)
6201         (maintenance_print_statistics, maintenance_deprecate)
6202         (maintenance_undeprecate): Constify.
6203         (maintenance_do_deprecate): Constify.  Use std::string.
6204         (maintenance_selftest): Constify.
6205         * gdbtypes.h (maintenance_print_type): Constify.
6206
6207 2017-09-27  Tom Tromey  <tom@tromey.com>
6208
6209         * hppa-tdep.c (unwind_command): Constify.
6210
6211 2017-09-27  Tom Tromey  <tom@tromey.com>
6212
6213         * target-descriptions.c (unset_tdesc_filename_cmd)
6214         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
6215         Constify.
6216
6217 2017-09-27  Tom Tromey  <tom@tromey.com>
6218
6219         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
6220
6221 2017-09-27  Tom Tromey  <tom@tromey.com>
6222
6223         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
6224
6225 2017-09-27  Tom Tromey  <tom@tromey.com>
6226
6227         * tui/tui-regs.c (tui_reg_command): Constify.
6228
6229 2017-09-27  Tom Tromey  <tom@tromey.com>
6230
6231         * skip.c (skip_file_command, skip_function_command)
6232         (skip_enable_command, skip_disable_command, skip_delete_command):
6233         Constify.
6234
6235 2017-09-27  Tom Tromey  <tom@tromey.com>
6236
6237         * record-btrace.c (cmd_record_btrace_bts_start)
6238         (cmd_record_btrace_pt_start): Constify.
6239
6240 2017-09-27  Tom Tromey  <tom@tromey.com>
6241
6242         * symmisc.c (maintenance_print_symbols)
6243         (maintenance_print_msymbols, maintenance_print_objfiles)
6244         (maintenance_info_symtabs, maintenance_check_symtabs)
6245         (maintenance_expand_symtabs, maintenance_info_line_tables):
6246         Constify.
6247
6248 2017-09-27  Tom Tromey  <tom@tromey.com>
6249
6250         * top.c (new_ui_command): Constify.
6251
6252 2017-09-27  Tom Tromey  <tom@tromey.com>
6253
6254         * symfile.c (add_symbol_file_command)
6255         (remove_symbol_file_command, list_overlays_command)
6256         (map_overlay_command, unmap_overlay_command)
6257         (overlay_auto_command, overlay_manual_command)
6258         (overlay_off_command, overlay_load_command): Constify.
6259
6260 2017-09-27  Tom Tromey  <tom@tromey.com>
6261
6262         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
6263         (info_spu_mailbox_command, info_spu_dma_command)
6264         (info_spu_proxydma_command): Constify.
6265
6266 2017-09-27  Tom Tromey  <tom@tromey.com>
6267
6268         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
6269
6270 2017-09-27  Tom Tromey  <tom@tromey.com>
6271
6272         * cli/cli-script.c (user_defined_command): Constify.
6273
6274 2017-09-27  Tom Tromey  <tom@tromey.com>
6275
6276         * cli/cli-dump.c (dump_memory_command, dump_value_command)
6277         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
6278         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
6279         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
6280         (dump_binary_value, append_binary_memory, append_binary_value):
6281         Constify.
6282         (struct dump_context) <func>: Constify.
6283         (add_dump_command): Update.
6284
6285 2017-09-27  Tom Tromey  <tom@tromey.com>
6286
6287         * cli/cli-cmds.c (show_version, show_configuration)
6288         (source_command, show_user): Constify.
6289
6290 2017-09-27  Tom Tromey  <tom@tromey.com>
6291
6292         * target.c (maintenance_print_target_stack): Constify.
6293
6294 2017-09-27  Tom Tromey  <tom@tromey.com>
6295
6296         * interps.c (interpreter_exec_cmd): Constify.
6297
6298 2017-09-27  Tom Tromey  <tom@tromey.com>
6299
6300         * record-full.c (cmd_record_full_restore): Constify.
6301
6302 2017-09-27  Tom Tromey  <tom@tromey.com>
6303
6304         * memattr.c (enable_mem_command, disable_mem_command)
6305         (delete_mem_command): Constify.
6306
6307 2017-09-27  Tom Tromey  <tom@tromey.com>
6308
6309         * value.c (show_convenience): Constify.
6310
6311 2017-09-27  Tom Tromey  <tom@tromey.com>
6312
6313         * gdbcore.h (core_file_command): Update.
6314         * corefile.c (core_file_command): Constify.
6315
6316 2017-09-27  Tom Tromey  <tom@tromey.com>
6317
6318         * user-regs.c (maintenance_print_user_registers): Constify.
6319
6320 2017-09-27  Tom Tromey  <tom@tromey.com>
6321
6322         * cp-namespace.c (maintenance_cplus_namespace): Constify.
6323
6324 2017-09-27  Tom Tromey  <tom@tromey.com>
6325
6326         * cp-support.c (first_component_command): Constify.
6327
6328 2017-09-27  Tom Tromey  <tom@tromey.com>
6329
6330         * psymtab.c (maintenance_print_psymbols)
6331         (maintenance_info_psymtabs, maintenance_check_psymtabs):
6332         Constify.
6333
6334 2017-09-27  Tom Tromey  <tom@tromey.com>
6335
6336         * windows-tdep.c (display_tib): Constify.
6337
6338 2017-09-27  Tom Tromey  <tom@tromey.com>
6339
6340         * linux-fork.c (delete_checkpoint_command)
6341         (detach_checkpoint_command): Constify.
6342
6343 2017-09-27  Tom Tromey  <tom@tromey.com>
6344
6345         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
6346
6347 2017-09-27  Tom Tromey  <tom@tromey.com>
6348
6349         * arc-tdep.c (dump_arc_instruction_command): Constify.
6350
6351 2017-09-27  Tom Tromey  <tom@tromey.com>
6352
6353         * valprint.c (set_radix, show_radix): Constify.
6354
6355 2017-09-27  Tom Tromey  <tom@tromey.com>
6356
6357         * dtrace-probe.c (info_probes_dtrace_command): Constify.
6358
6359 2017-09-27  Tom Tromey  <tom@tromey.com>
6360
6361         * command.h (not_just_help_class_command): Update.
6362         * cli/cli-decode.h (not_just_help_class_command): Update.
6363         * cli/cli-decode.c (not_just_help_class_command): Constify.
6364
6365 2017-09-27  Tom Tromey  <tom@tromey.com>
6366
6367         * gdb_bfd.c (maintenance_info_bfds): Constify.
6368
6369 2017-09-27  Tom Tromey  <tom@tromey.com>
6370
6371         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
6372         overloads.
6373         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
6374         (do_const_cfunc): New function.
6375         (cmd_cfunc_eq): New overload.
6376         (cli_user_command_p): Check do_const_cfunc.
6377         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
6378         const_cfunc.
6379         * command.h (add_cmd): Add const overload and no-function
6380         overload.
6381         (set_cmd_cfunc): Add const overload.
6382         (cmd_const_cfunc_ftype): Declare.
6383         (cmd_cfunc_eq): Add const overload.
6384         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
6385         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
6386         overload.
6387
6388 2017-09-27  Tom Tromey  <tom@tromey.com>
6389
6390         * macroexp.c (get_next_token_for_substitution): New function.
6391         (substitute_args): Call it.  Check for __VA_OPT__.
6392
6393 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
6394             Pedro Alves <palves@redhat.com>
6395
6396         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
6397         producer_is_icc_lt_14.
6398         (producer_is_icc_lt_14): New function.
6399         (check_producer): Add code for checking version of ICC.
6400         (producer_is_icc): Move to producer.c.
6401         (read_structure_type): Restrict ICC workaround to ICC<14.
6402         * producer.c: Include selftest.h.
6403         (producer_is_icc, producer_parsing_tests, _initialize_producer):
6404         New functions.
6405         * producer.h (producer_is_icc): New declaration.
6406
6407 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
6408
6409         * Makefile.in (SFILES): Add producer.c.
6410         (COMMON_OBS): Add producer.o
6411         * amd64-tdep.c (producer.h): Add new include.
6412         * dwarf2read.c (producer.h): Add new include.
6413         * producer.c: New file.
6414         * producer.h: New file.
6415         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
6416         producer.c.
6417         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
6418         producer.h.
6419
6420 2017-09-26  Matthias Klose  <doko@ubuntu.com>
6421
6422         * configure.ac: Search ncursesw before ncurses.
6423         Check ncursesw/ncurses.h before ncurses/ncurses.h.
6424         * gdb_curses.h: Include <ncursesw/ncurses.h>
6425         * config.in, configure: Regenerate.
6426
6427 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6428
6429         PR gdb/22185
6430         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
6431         obsolete.
6432         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
6433         Remove i386sol2 support.
6434         * configure.nat <i386sol2>: Remove.
6435         <sol2-64>: Fold into ...
6436         <sol2>: ... this.
6437         Move common settings to default section.
6438         Add sol-thread.o.
6439         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
6440         x86_64-*-solaris2.1[0-9]*>: Rename to ...
6441         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
6442         <i[34567]86-*-solaris*>: Remove.
6443         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
6444
6445         * configure.ac: Remove wctype in libw check.
6446         (_MSE_INT_H): Don't define on Solaris 7-9.
6447         <solaris*>: Remove libthread_db.so.1 check.
6448         * configure: Regenerate.
6449         * config.in: Regenerate.
6450
6451         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
6452         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
6453         (gdb_ps_size_t): Remove.
6454         Use base types in users.
6455         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
6456
6457         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
6458
6459 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6460
6461         PR build/22206
6462         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
6463         (adi_is_addr_mapped): Likewise.
6464         (PSR_ICC): Don't redefine.
6465         (PSR_IMPL): Likewise.
6466
6467 2017-09-25  Tom Tromey  <tom@tromey.com>
6468
6469         * regcache.c (regcache::dump): Use string_printf.
6470
6471 2017-09-25  Tom Tromey  <tom@tromey.com>
6472
6473         * regcache.c (class regcache_invalidator): New.
6474         (struct register_to_invalidate): Remove.
6475         (make_cleanup_regcache_invalidate): Remove.
6476         (regcache::raw_write): Use regcache_invalidator.
6477
6478 2017-09-25  Tom Tromey  <tom@tromey.com>
6479
6480         * spu-tdep.c (spu2ppu_sniffer): Update.
6481         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
6482         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
6483         Remove.
6484         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
6485         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
6486         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
6487         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
6488         (frame_pop): Update.
6489
6490 2017-09-25  Tom Tromey  <tom@tromey.com>
6491
6492         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
6493         * regcache.h (regcache_xfree): Don't declare.
6494         * regcache.c (regcache_xfree): Remove.
6495         (do_regcache_xfree): Use delete.
6496         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
6497         * linux-fork.c (free_fork): Use delete.
6498         (fork_save_infrun_state): Likewise.
6499         * jit.c (jit_dealloc_cache): Use delete.
6500         * infrun.c (discard_infcall_suspend_state): Use delete.
6501
6502 2017-09-25  Tom Tromey  <tom@tromey.com>
6503
6504         * regcache.h (regcache_xmalloc): Don't declare.
6505         (regcache_raw_set_cached_value): Update comment.
6506         * regcache.c (regcache_xmalloc): Remove.
6507         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
6508         * jit.c (jit_frame_sniffer): Use new.
6509         * frame.c (frame_save_as_regcache): Use new.
6510
6511 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6512
6513         * NEWS: Advertise support for guarded-storage registers on IBM z.
6514
6515 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6516
6517         * s390-linux-nat.c (have_regset_gs): New static variable.
6518         (s390_linux_fetch_inferior_registers): Handle guarded-storage
6519         control block and guarded-storage broadcast control regsets.
6520         (s390_read_description): Detect whether the target has
6521         guarded-storage support, return appropriate tdesc.
6522         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
6523         (features/s390x-gs-linux64.c): Likewise.
6524         (struct gdbarch_tdep) <have_gs>: New field.
6525         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
6526         (s390_gsbc_regset): New variables.
6527         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
6528         and s390_gsbc_regset, if applicable.
6529         (s390_core_read_description): Check whether core file was from a
6530         target with guarded-storage support; include appropriate regsets.
6531         (s390_gdbarch_init): Add registers for guarded-storage support.
6532         (_initialize_s390_tdep): Initialize new target descriptions that
6533         include registers for guarded-storage support.
6534         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
6535         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
6536         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
6537         (S390_NUM_REGS): Adjust macro definition.
6538         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
6539         (tdesc_s390x_gs_linux64): New declarations.
6540
6541 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6542
6543         * features/s390-gs-linux64.xml: New file.
6544         * features/s390-gs.xml: New file.
6545         * features/s390-gsbc.xml: New file.
6546         * features/s390x-gs-linux64.xml: New file.
6547         * features/Makefile (WHICH): Add s390-gs-linux64 and
6548         s390x-gs-linux64.
6549         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
6550         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
6551         * features/s390-gs-linux64.c: New generated file.
6552         * features/s390x-gs-linux64.c: New file.
6553         * regformats/s390-gs-linux64.dat: New file.
6554         * regformats/s390x-gs-linux64.dat: New file.
6555
6556 2017-09-23  Tom Tromey  <tom@tromey.com>
6557
6558         * defs.h (make_cleanup_override_quit_handler): Don't declare.
6559
6560 2017-09-22  Tom Tromey  <tom@tromey.com>
6561
6562         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
6563         type to scoped_restore_tmpl.
6564         <scoped_input_handler>: Initialize m_quit_handler directly.
6565
6566 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
6567
6568         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
6569         (cd_command): Likewise.  Free "current_directory" before
6570         assigning to it.
6571         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
6572         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
6573         * top.c (gdb_dirbuf): Remove global declaration.
6574         * top.h (gdb_dirbuf): Likewise.
6575
6576 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
6577
6578         * gnulib/aclocal.m4: Regenerate.
6579         * gnulib/config.in: Regenerate.
6580         * gnulib/configure: Regenerate.
6581         * gnulib/import/Makefile.am: Regenerate.
6582         * gnulib/import/Makefile.in: Regenerate.
6583         * gnulib/import/assure.h: New file.
6584         * gnulib/import/at-func.c: Likewise
6585         * gnulib/import/chdir-long.c: New file.
6586         * gnulib/import/chdir-long.h: New file.
6587         * gnulib/import/cloexec.c: New file.
6588         * gnulib/import/cloexec.h: New file.
6589         * gnulib/import/close.c: New file.
6590         * gnulib/import/closedir.c: New file.
6591         * gnulib/import/dirent-private.h: New file.
6592         * gnulib/import/dup-safer.c: New file.
6593         * gnulib/import/dup.c: New file.
6594         * gnulib/import/dup2.c: New file.
6595         * gnulib/import/error.c: New file.
6596         * gnulib/import/error.h: New file.
6597         * gnulib/import/exitfail.c: New file.
6598         * gnulib/import/exitfail.h: New file.
6599         * gnulib/import/fchdir.c: New file.
6600         * gnulib/import/fcntl.c: New file.
6601         * gnulib/import/fcntl.in.h: New file.
6602         * gnulib/import/fd-hook.c: New file.
6603         * gnulib/import/fd-hook.h: New file.
6604         * gnulib/import/fd-safer.c: New file.
6605         * gnulib/import/fdopendir.c: New file.
6606         * gnulib/import/filename.h: New file.
6607         * gnulib/import/filenamecat-lgpl.c: New file.
6608         * gnulib/import/filenamecat.h: New file.
6609         * gnulib/import/fstat.c: New file.
6610         * gnulib/import/fstatat.c: New file.
6611         * gnulib/import/getcwd-lgpl.c: New file.
6612         * gnulib/import/getcwd.c: New file.
6613         * gnulib/import/getdtablesize.c: New file.
6614         * gnulib/import/getlogin_r.c: New file.
6615         * gnulib/import/getprogname.c: New file.
6616         * gnulib/import/getprogname.h: New file.
6617         * gnulib/import/gettext.h: New file.
6618         * gnulib/import/glob-libc.h: New file.
6619         * gnulib/import/glob.c: New file.
6620         * gnulib/import/glob.in.h: New file.
6621         * gnulib/import/intprops.h: New file.
6622         * gnulib/import/m4/chdir-long.m4: New file.
6623         * gnulib/import/m4/close.m4: New file.
6624         * gnulib/import/m4/closedir.m4: New file.
6625         * gnulib/import/m4/d-ino.m4: New file.
6626         * gnulib/import/m4/d-type.m4: New file.
6627         * gnulib/import/m4/dup.m4: New file.
6628         * gnulib/import/m4/dup2.m4: New file.
6629         * gnulib/import/m4/error.m4: New file.
6630         * gnulib/import/m4/fchdir.m4: New file.
6631         * gnulib/import/m4/fcntl.m4: New file.
6632         * gnulib/import/m4/fcntl_h.m4: New file.
6633         * gnulib/import/m4/fdopendir.m4: New file.
6634         * gnulib/import/m4/filenamecat.m4: New file.
6635         * gnulib/import/m4/fstat.m4: New file.
6636         * gnulib/import/m4/fstatat.m4: New file.
6637         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
6638         * gnulib/import/m4/getcwd-path-max.m4: New file.
6639         * gnulib/import/m4/getcwd.m4: New file.
6640         * gnulib/import/m4/getdtablesize.m4: New file.
6641         * gnulib/import/m4/getlogin_r.m4: New file.
6642         * gnulib/import/m4/getprogname.m4: New file.
6643         * gnulib/import/m4/glob.m4: New file.
6644         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
6645         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
6646         * gnulib/import/m4/mempcpy.m4: New file.
6647         * gnulib/import/m4/memrchr.m4: New file.
6648         * gnulib/import/m4/mode_t.m4: New file.
6649         * gnulib/import/m4/msvc-inval.m4: New file.
6650         * gnulib/import/m4/msvc-nothrow.m4: New file.
6651         * gnulib/import/m4/open.m4: New file.
6652         * gnulib/import/m4/openat.m4: New file.
6653         * gnulib/import/m4/opendir.m4: New file.
6654         * gnulib/import/m4/readdir.m4: New file.
6655         * gnulib/import/m4/realloc.m4: New file.
6656         * gnulib/import/m4/rewinddir.m4: New file.
6657         * gnulib/import/m4/save-cwd.m4: New file.
6658         * gnulib/import/m4/strdup.m4: New file.
6659         * gnulib/import/m4/strerror.m4: New file.
6660         * gnulib/import/m4/unistd-safer.m4: New file.
6661         * gnulib/import/mempcpy.c: New file.
6662         * gnulib/import/memrchr.c: New file.
6663         * gnulib/import/msvc-inval.c: New file.
6664         * gnulib/import/msvc-inval.h: New file.
6665         * gnulib/import/msvc-nothrow.c: New file.
6666         * gnulib/import/msvc-nothrow.h: New file.
6667         * gnulib/import/open.c: New file.
6668         * gnulib/import/openat-die.c: New file.
6669         * gnulib/import/openat-priv.h: New file.
6670         * gnulib/import/openat-proc.c: New file.
6671         * gnulib/import/openat.c: New file.
6672         * gnulib/import/openat.h: New file.
6673         * gnulib/import/opendir.c: New file.
6674         * gnulib/import/pipe-safer.c: New file.
6675         * gnulib/import/readdir.c: New file.
6676         * gnulib/import/realloc.c: New file.
6677         * gnulib/import/rewinddir.c: New file.
6678         * gnulib/import/save-cwd.c: New file.
6679         * gnulib/import/save-cwd.h: New file.
6680         * gnulib/import/strdup.c: New file.
6681         * gnulib/import/strerror-override.c: New file.
6682         * gnulib/import/strerror-override.h: New file.
6683         * gnulib/import/strerror.c: New file.
6684         * gnulib/import/unistd--.h: New file.
6685         * gnulib/import/unistd-safer.h: New file.
6686         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
6687         "getcwd" and "glob".
6688         * ser-tcp.c: Undefine "close" before redefining it.
6689
6690 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
6691
6692         * guile/scm-value.c (gdbscm_value_address): Initialize address,
6693         get rid of res_val.
6694
6695 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6696
6697         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
6698         <sol2,sparc>: Likewise.
6699         <sol2-64,i386>: Likewise.
6700
6701         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
6702         -Wdeprecated-declarations on *-*-solaris*.
6703         * configure: Regenerate.
6704
6705         * procfs.c: Include "nat/inferior.h".
6706         (procfs_info_proc): Fix typo.
6707
6708 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
6709
6710         * remote.c (vector): Include.
6711         (struct private_thread_info): Add field, thread_handle.
6712         (free_private_thread_info): Deallocate storage associated with
6713         thread handle.
6714         (get_private_info_thread): Initialize `thread_handle' field.
6715         (struct thread_item): Add field, thread_handle.
6716         (clear_threads_listing_context): Deallocate storage associated
6717         with thread handle.
6718         (start_thread): Add support for "handle" attribute.
6719         (thread_attributes): Add "handle".
6720         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
6721         field.
6722         (remote_update_thread_list): Update thread_handle.
6723         (remote_thread_handle_to_thread_info): New function.
6724         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
6725
6726 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
6727
6728         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
6729         function.
6730         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
6731         * python/python-internal.h (thread_object_type): Declare.
6732
6733 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
6734
6735         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
6736         (target_thread_handle_to_thread_info): Declare.
6737         * target.c (target_thread_handle_to_thread_info): New function.
6738         * target-delegates.c: Regenerate.
6739         * gdbthread.h (find_thread_by_handle): Declare.
6740         * thread.c (find_thread_by_handle): New function.
6741         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
6742         function.
6743         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
6744
6745 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
6746
6747         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
6748
6749 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
6750
6751         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
6752
6753 2017-09-21  Yao Qi  <yao.qi@linaro.org>
6754
6755         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
6756         to gdb_target_obs.
6757
6758 2017-09-20  Tom Tromey  <tom@tromey.com>
6759
6760         * breakpoint.c (struct counted_command_line): Remove.
6761         (breakpoint_commands): Update.
6762         (alloc_counted_command_line, incref_counted_command_line)
6763         (decref_counted_command_line, do_cleanup_counted_command_line)
6764         (make_cleanup_decref_counted_command_line): Remove.
6765         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
6766         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
6767         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
6768         (save_breakpoints): Update.
6769         * breakpoint.h (counted_command_line): Now a typedef to
6770         shared_ptr.
6771         (struct breakpoint) <commands>: Now a counted_command_line.
6772         (struct bpstats) <command>: Likewise.
6773
6774 2017-09-20  Tom Tromey  <tom@tromey.com>
6775
6776         * breakpoint.c (struct commands_info, do_map_commands_command):
6777         Remove.
6778         (commands_command_1): Update.
6779         (iterate_over_related_breakpoints): Take a function_view.
6780         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
6781         (delete_command): Update.
6782         (map_breakpoint_numbers): Take a function_view.
6783         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
6784         (disable_command): Update.
6785         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
6786         (enable_command): Update.
6787         (struct disp_data, do_enable_breakpoint_disp)
6788         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
6789         (do_map_enable_delete_breakpoint): Remove.
6790         (enable_once_command, enable_count_command, enable_delete_command)
6791         (delete_trace_variable_command): Update.
6792
6793 2017-09-20  Tom Tromey  <tom@tromey.com>
6794
6795         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
6796         (bpstat_clear): Use delete.
6797         (bpstats): New constructors.
6798         (bpstat_copy, bpstat_stop_status): Use new.
6799         (dprintf_after_condition_true): Update.
6800         * breakpoint.h (bpstats::bpstats): Add constructors.
6801         (bpstats::~bpstats): Add destructor.
6802
6803 2017-09-20  Pedro Alves  <palves@redhat.com>
6804
6805         * eval.c (make_params): Delete, refactored as ...
6806         (class fake_method): ... this new type's ctor.
6807         (fake_method::~fake_method): New.
6808         (evaluate_subexp_standard): Use 'fake_method'.
6809
6810 2017-09-20  Tom Tromey  <tom@tromey.com>
6811
6812         * windows-nat.c (get_windows_debug_event, windows_wait)
6813         (do_initial_windows_stuff, windows_attach): Update.
6814         * utils.c (vwarning, internal_vproblem): Update.
6815         (ui_unregister_input_event_handler_cleanup)
6816         (prepare_to_handle_input): Remove.
6817         (class scoped_input_handler): New.
6818         (defaulted_query, prompt_for_continue): Update.
6819         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
6820         Update.
6821         * top.c (undo_terminal_modifications_before_exit): Update.
6822         * target/target.h (target_terminal_init, target_terminal_inferior)
6823         (target_terminal_ours): Don't declare.
6824         (class target_terminal): New.
6825         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
6826         (target_terminal_ours_for_output)
6827         (make_cleanup_restore_target_terminal): Don't declare.
6828         (target_terminal_info): Remove.
6829         * target.c (enum terminal_state, terminal_state): Remove.
6830         (target_terminal::terminal_state): Define.
6831         (target_terminal::init): Rename from target_terminal_init.
6832         (target_terminal::inferior): Rename from
6833         target_terminal_inferior.
6834         (target_terminal::ours): Rename from target_terminal_ours.
6835         (target_terminal::ours_for_output): Rename from
6836         target_terminal_ours_for_output.
6837         (target_terminal::info): New method.
6838         (cleanup_restore_target_terminal)
6839         (make_cleanup_restore_target_terminal): Remove.
6840         * solib.c (handle_solib_event): Update.
6841         * remote.c (remote_serial_quit_handler): Update.
6842         (remote_terminal_inferior, remote_wait_as): Update.
6843         * record-full.c (record_full_wait_1): Update.
6844         * nto-procfs.c (procfs_create_inferior): Update.
6845         * nat/fork-inferior.c (startup_inferior): Update.
6846         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
6847         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
6848         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
6849         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
6850         (mi_breakpoint_created, mi_breakpoint_deleted)
6851         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
6852         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6853         (mi_user_selected_context_changed, report_initial_inferior):
6854         Update.
6855         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
6856         (linux_nat_terminal_inferior): Update.
6857         * infrun.c (follow_fork_inferior)
6858         (handle_vfork_child_exec_or_exit, do_target_resume)
6859         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
6860         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
6861         Update.
6862         * inflow.c (child_terminal_init, info_terminal_command): Update.
6863         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
6864         (attach_command): Update.
6865         * infcall.c (call_thread_fsm_should_stop): Update.
6866         * gnu-nat.c (gnu_attach): Update.
6867         * extension.c (struct active_ext_lang_state)
6868         (restore_active_ext_lang): Update.
6869         * exceptions.c (print_flush): Update.
6870         * event-top.c (async_enable_stdin, default_quit_handler): Update.
6871         (struct quit_handler_cleanup_data, restore_quit_handler)
6872         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
6873         Remove.
6874         * cp-support.c (gdb_demangle): Update.
6875         * breakpoint.c (update_inserted_breakpoint_locations)
6876         (insert_breakpoint_locations, handle_jit_event)
6877         (disable_breakpoints_in_unloaded_shlib): Update.
6878         * annotate.c (annotate_breakpoints_invalid)
6879         (annotate_frames_invalid): Update.
6880
6881 2017-09-20  Tom Tromey  <tom@tromey.com>
6882
6883         * main.c (catch_command_errors): Rename from
6884         catch_command_errors_const.
6885         (captured_main_1): Update.
6886
6887 2017-09-20  Pedro Alves  <palves@redhat.com>
6888
6889         * cli/cli-cmds.c (list_command): Use print_sal_location.
6890         (print_sal_location): New function.
6891         (ambiguous_line_spec): Use print_sal_location.
6892         * linespec.c (symbol_to_sal): Record the symbol in the sal.
6893         * symtab.c (find_function_start_sal): Likewise.
6894         * symtab.h (symtab_and_line::symbol): New field.
6895
6896 2017-09-20  Pedro Alves  <palves@redhat.com>
6897
6898         * linespec.c (minsym_found): Handle non-text minsyms.
6899         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
6900
6901 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
6902
6903         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
6904         backslash.
6905
6906 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
6907
6908         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
6909         vmovups instead vmovaps.
6910         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
6911
6912 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
6913
6914         * NEWS (Changes since GDB 8.0): Add starti.
6915         * infcmd.c (enum run_break): New.
6916         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
6917         case.
6918         (run_command): Use enum run_how.
6919         (start_command): Likewise.
6920         (starti_command): New function.
6921         (RUN_ARGS_HELP): New macro.
6922         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
6923         commands.  Add starti command.
6924
6925 2017-09-19  Yao Qi  <yao.qi@linaro.org>
6926
6927         * Makefile.in (monitor.o): Remove the rule.
6928
6929 2017-09-19  Yao Qi  <yao.qi@linaro.org>
6930
6931         * annotate.h (struct annotate_arg_emitter): Use
6932         DISABLE_COPY_AND_ASSIGN.
6933         * common/refcounted-object.h (refcounted_object): Likewise.
6934         * completer.h (struct completion_result): Likewise.
6935         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
6936         * filename-seen-cache.h (filename_seen_cache): Likewise.
6937         * gdbcore.h (thread_section_name): Likewise.
6938         * gdb_regex.h (compiled_regex): Likewise.
6939         * gdbthread.h (scoped_restore_current_thread): Likewise.
6940         * inferior.h (scoped_restore_current_inferior): Likewise.
6941         * jit.c (jit_reader): Likewise.
6942         * linespec.h (struct linespec_result): Likewise.
6943         * mi/mi-parse.h (struct mi_parse): Likewise.
6944         * nat/fork-inferior.c (execv_argv): Likewise.
6945         * progspace.h (scoped_restore_current_program_space): Likewise.
6946         * python/python-internal.h (class gdbpy_enter): Likewise.
6947         * regcache.h (regcache): Likewise.
6948         * target-descriptions.c (struct tdesc_reg): Likewise.
6949         (struct tdesc_type): Likewise.
6950         (struct tdesc_feature): Likewise.
6951         * ui-out.h (ui_out_emit_type): Likewise.
6952
6953 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
6954
6955         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
6956         label abort_expression.
6957
6958 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
6959
6960         * common/buffer.c (buffer_xml_printf): Adjust.
6961         * common/xml-utils.c (xml_escape_text): Change return type to
6962         std::string, update code accordingly.
6963         * common/xml-utils.h (xml_escape_text): Change return type to
6964         std::string.
6965         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
6966         * windows-tdep.c (windows_xfer_shared_library): Adjust.
6967         * unittests/xml-utils-selftests.c (test_xml_escape_text):
6968         Adjust.
6969
6970 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
6971
6972         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
6973         (SUBDIR_UNITTESTS_OBS): Add new object file.
6974         * unittests/xml-utils-selftests.c: New file.
6975
6976 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
6977
6978         * common/selftest.h (selftest): New struct/interface.
6979         (register_test): Add name parameter, add new overload.
6980         (run_tests): Add filter parameter.
6981         (for_each_selftest_ftype): New typedef.
6982         (for_each_selftest): New declaration.
6983         * common/selftest.c (tests): Change type to
6984         map<string, unique_ptr<selftest>>.
6985         (simple_selftest): New struct.
6986         (register_test): New function.
6987         (register_test): Add name parameter and use it.
6988         (run_tests): Add filter parameter and use it.  Add prints.
6989         Adjust to vector -> map change.
6990         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
6991         registering selftests.
6992         * arm-tdep.c (_initialize_arm_tdep): Likewise.
6993         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
6994         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
6995         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
6996         * findvar.c (_initialize_findvar): Likewise.
6997         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
6998         * maint.c (maintenance_selftest): Update call to run_tests.
6999         (maintenance_info_selftests): New function.
7000         (_initialize_maint_cmds): Register "maintenance info selftests"
7001         command.  Update "maintenance selftest" doc.
7002         * regcache.c (_initialize_regcache): Add names when registering
7003         selftests.
7004         * rust-exp.y (_initialize_rust_exp): Likewise.
7005         * selftest-arch.c (gdbarch_selftest): New struct.
7006         (gdbarch_tests): Remove.
7007         (register_test_foreach_arch): Add name parameter.  Call
7008         register_test.
7009         (tests_with_arch): Remove, move most content to
7010         gdbarch_selftest::operator().
7011         (_initialize_selftests_foreach_arch): Remove.
7012         * selftest-arch.h (register_test_foreach_arch): Add name
7013         parameter.
7014         (run_tests_with_arch): New declaration.
7015         * utils-selftests.c (_initialize_utils_selftests): Add names
7016         when registering selftests.
7017         * utils.c (_initialize_utils): Likewise.
7018         * unittests/array-view-selftests.c
7019         (_initialize_array_view_selftests): Likewise.
7020         * unittests/environ-selftests.c (_initialize_environ_selftests):
7021         Likewise.
7022         * unittests/function-view-selftests.c
7023         (_initialize_function_view_selftests): Likewise.
7024         * unittests/offset-type-selftests.c
7025         (_initialize_offset_type_selftests): Likewise.
7026         * unittests/optional-selftests.c
7027         (_initialize_optional_selftests): Likewise.
7028         * unittests/scoped_restore-selftests.c
7029         (_initialize_scoped_restore_selftests): Likewise.
7030         * NEWS: Document "maintenance selftest" and "maint info
7031         selftests".
7032
7033 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
7034
7035         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
7036         scoped_restore.
7037
7038 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
7039
7040         * mi/mi-main.c (mi_load_progress): Make uiout variable
7041         a unique_ptr.
7042
7043 2017-09-15  Pedro Alves  <palves@redhat.com>
7044
7045         * compile/compile-c-types.c (convert_enum, convert_int)
7046         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
7047
7048 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
7049
7050         * dwarf2read.c (copy_string): Remove.
7051         (parse_macro_definition): Replace copy_string with savestring.
7052
7053 2017-09-15  Yao Qi  <yao.qi@linaro.org>
7054
7055         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
7056         gdb_target_obs.
7057         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
7058         Likewise.
7059         (i[34567]86-*-linux*): Likewise.
7060
7061 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
7062
7063         * dwarf2expr.h (dwarf_stack_value): Add constructor.
7064         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
7065         <stack>: Change type to std::vector.
7066         <stack_len, stack_allocated>: Remove.
7067         <grow_stack>: Remove.
7068         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
7069         (dwarf_expr_context::~dwarf_expr_context): Remove.
7070         (dwarf_expr_context::grow_stack): Remove.
7071         (dwarf_expr_context::push): Adjust.
7072         (dwarf_expr_context::pop): Adjust.
7073         (dwarf_expr_context::fetch): Adjust.
7074         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
7075         (dwarf_expr_context::stack_empty_p): Adjust.
7076         (dwarf_expr_context::execute_stack_op): Adjust.
7077
7078 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
7079
7080         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
7081         return type to bool.
7082         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
7083
7084 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
7085
7086         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
7087         Change type to bool.
7088         (dwarf_stack_value) <in_stack_memory>: Likewise.
7089         (dwarf_expr_context) <push_address>: Change parameter type to
7090         bool.
7091         <fetch_in_stack_memory>: Change return type to bool.
7092         <push>: Change parameter type to bool.
7093         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
7094         to bool.
7095         (dwarf_expr_context::push_address): Likewise.
7096         (dwarf_expr_context::fetch_in_stack_memory): Change return type
7097         to bool.
7098         (dwarf_expr_context::execute_stack_op): Adjust.
7099         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
7100
7101 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
7102
7103         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
7104         (struct dwarf_expr_context) <n_pieces>: Remove.
7105         <pieces>: Change type to std::vector.
7106         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
7107         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
7108         pieces.
7109         (dwarf_expr_context::add_piece): Adjust.
7110         * dwarf2loc.c (struct piece_closure): Initialize fields.
7111         <n_pieces>: Remove.
7112         <pieces>: Change type to std::vector.
7113         (allocate_piece_closure): Adjust, change parameter to
7114         std::vector rvalue and std::move it to piece_closure.
7115         (rw_pieced_value): Adjust.
7116         (check_pieced_synthetic_pointer): Adjust.
7117         (indirect_synthetic_pointer): Adjust.
7118         (coerce_pieced_ref): Adjust.
7119         (free_pieced_value_closure):  Adjust.  Use delete to free
7120         piece_closure.
7121         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
7122         to allocate_piece_closure.
7123         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
7124
7125 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
7126
7127         * probe.h (probe_ops_cp): Remove typedef.
7128         (DEF_VEC_P (probe_ops_cp)): Remove.
7129         (all_probe_ops): Change type to std::vector.
7130         * probe.c (info_probes_for_ops): Adjust to vector change.
7131         (probe_linespec_to_ops): Likewise.
7132         (all_probe_ops): Change type to std::vector.
7133         (_initialize_probe): Adjust to vector change.
7134         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
7135         * elfread.c (elf_get_probes): Likewise.
7136         * stap-probe.c (_initialize_stap_probe): Likewise.
7137
7138 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
7139
7140         * probe.h (struct bound_probe): Define constructors.
7141         * probe.c (bound_probe_s): Remove typedef.
7142         (DEF_VEC_O (bound_probe_s)): Remove VEC.
7143         (collect_probes): Change return type to std::vector, remove
7144         cleanup.
7145         (compare_probes): Return bool, change parameter type.  Change
7146         semantic to "less than".
7147         (gen_ui_out_table_header_info): Change parameter to std::vector
7148         and update.
7149         (exists_probe_with_pops): Likewise.
7150         (info_probes_for_ops): Update to std::vector change.
7151         (enable_probes_command): Likewise.
7152         (disable_probes_command): Likewise.
7153
7154 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
7155
7156         * probe.h (struct probe_ops) <get_probes>: Change parameter from
7157         vec to std::vector.
7158         * probe.c (parse_probes_in_pspace): Update.
7159         (find_probes_in_objfile): Update.
7160         (find_probe_by_pc): Update.
7161         (collect_probes): Update.
7162         (probe_any_get_probes): Update.
7163         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
7164         return type to reference to std::vector.
7165         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
7166         std::vector and update.
7167         (dtrace_process_dof): Likewise.
7168         (dtrace_get_probes): Likewise.
7169         * elfread.c (elf_get_probes): Change return type to std::vector,
7170         store an std::vector in bfd_data.
7171         (probe_key_free): Update to std::vector.
7172         * stap-probe.c (handle_stap_probe): Change parameter to
7173         std::vector and update.
7174         (stap_get_probes): Likewise.
7175         * symfile-debug.c (debug_sym_get_probes): Change return type to
7176         std::vector and update.
7177
7178 2017-09-11  Tom Tromey  <tom@tromey.com>
7179
7180         * breakpoint.c (program_breakpoint_here_p): Update.
7181         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
7182         from make_show_memory_breakpoints_cleanup.  Return a
7183         scoped_restore_tmpl<int>.
7184         (restore_show_memory_breakpoints): Remove.
7185         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
7186         * mem-break.c (memory_validate_breakpoint): Update.
7187         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
7188         (ia64_memory_remove_breakpoint): Update.
7189         (ia64_breakpoint_from_pc): Update.
7190         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
7191         from make_show_memory_breakpoints_cleanup.
7192
7193 2017-09-11  Tom Tromey  <tom@tromey.com>
7194
7195         * d-namespace.c (d_lookup_symbol): Use std::string.
7196         (find_symbol_in_baseclass): Likewise.
7197
7198 2017-09-11  Tom Tromey  <tom@tromey.com>
7199
7200         * ctf.c (ctf_start): Use std::string.
7201
7202 2017-09-11  Tom Tromey  <tom@tromey.com>
7203
7204         * ada-lang.c (is_known_support_routine): Update.
7205         (ada_unhandled_exception_name_addr_from_raise): Update.
7206         * guile/scm-frame.c (gdbscm_frame_name): Update.
7207         * python/py-frame.c (frapy_name): Update.
7208         (frapy_function): Update.
7209         * stack.h (find_frame_funname): Update.
7210         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
7211         (print_frame): Update.
7212
7213 2017-09-11  Tom Tromey  <tom@tromey.com>
7214
7215         * findcmd.c (put_bits): Take a gdb::byte_vector.
7216         (parse_find_args): Return gdb::byte_vector.  "args" now const.
7217         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
7218         cleanups.
7219         (find_command): Update.
7220
7221 2017-09-11  Tom Tromey  <tom@tromey.com>
7222
7223         * cli/cli-script.c (class scoped_restore_hook_in): New.
7224         (clear_hook_in_cleanup): Remove.
7225         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
7226         scoped_restore_hook_in.
7227
7228 2017-09-11  Tom Tromey  <tom@tromey.com>
7229
7230         * cli/cli-script.c (restore_interp): Remove.
7231         (read_command_lines): Use scoped_restore_interp.
7232         * interps.c (scoped_restore_interp::set_temp): Rename from
7233         interp_set_temp.
7234         * interps.h (class scoped_restore_interp): New.
7235         (interp_set_temp): Remove.
7236
7237 2017-09-11  Tom Tromey  <tom@tromey.com>
7238
7239         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7240         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
7241         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
7242         scoped_restore.
7243         (mi_cmd_break_insert_1): Update.
7244         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
7245         scoped_restore.
7246
7247 2017-09-11  Tom Tromey  <tom@tromey.com>
7248
7249         * demangle.c (demangle_command): Update.
7250         * breakpoint.c (disable_command): Update.
7251         (enable_command): Update.
7252         (find_location_by_number): Make "number" const.  Use
7253         get_number_trailer.
7254         * cli/cli-utils.c (extract_arg): Return std::string.
7255         * probe.c (parse_probe_linespec): Update.  Change types.
7256         (collect_probes): Take string arguments.
7257         (parse_probe_linespec): Likewise.
7258         (info_probes_for_ops): Update.
7259         (enable_probes_command): Update.
7260         (disable_probes_command): Update.
7261         * break-catch-sig.c (catch_signal_split_args): Update.
7262         * mi/mi-parse.c (mi_parse): Update.
7263
7264 2017-09-11  Tom Tromey  <tom@tromey.com>
7265
7266         * language.h (language_enum): Make argument const.
7267         * language.c (language_enum): Make argument const.
7268
7269 2017-09-11  Tom Tromey  <tom@tromey.com>
7270
7271         * common/common-utils.h (skip_to_space): Remove macro, redeclare
7272         as function.
7273         (skip_to_space): Rename from skip_to_space_const.
7274         * common/common-utils.c (skip_to_space): New function.
7275         (skip_to_space): Rename from skip_to_space_const.
7276         * cli/cli-utils.h (get_number): Rename from get_number_const.
7277         (extract_arg): Rename from extract_arg_const.
7278         * cli/cli-utils.c (get_number): Rename from get_number_const.
7279         (extract_arg): Rename from extract_arg_const.
7280         (number_or_range_parser::get_number): Use ::get_number.
7281         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
7282         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
7283         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
7284         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
7285         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
7286         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
7287         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
7288         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
7289
7290 2017-09-11  Tom Tromey  <tom@tromey.com>
7291
7292         * python/python.c (do_start_initialization): Use
7293         py-event-types.def to initialize types.
7294         Define all object type structures.
7295         * python/python-internal.h: Don't declare event initialization
7296         functions.
7297         * python/py-threadevent.c (thread_event_object_type): Don't
7298         define.
7299         * python/py-stopevent.c (stop_event_object_type): Don't define.
7300         * python/py-signalevent.c (signal_event_object_type): Don't
7301         declare or define.
7302         * python/py-newobjfileevent.c (new_objfile_event_object_type)
7303         (clear_objfiles_event_object_type): Don't declare or define.
7304         * python/py-infevents.c (inferior_call_pre_event_object_type)
7305         (inferior_call_post_event_object_type)
7306         (register_changed_event_object_type)
7307         (memory_changed_event_object_type): Don't declare or define.
7308         * python/py-inferior.c (new_thread_event_object_type)
7309         (new_inferior_event_object_type)
7310         (inferior_deleted_event_object_type): Don't declare or define.
7311         * python/py-exitedevent.c (exited_event_object_type): Don't
7312         declare or define.
7313         * python/py-evts.c (gdbpy_initialize_py_events): Use
7314         py-all-events.def.
7315         * python/py-events.h (thread_event_object_type): Don't declare.
7316         (events_object): Use py-all-events.def.
7317         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
7318         py-event-types.def.
7319         * python/py-event-types.def: New file.
7320         * python/py-continueevent.c (create_continue_event_object): Don't
7321         declare or define.
7322         * python/py-bpevent.c (breakpoint_event_object_type): Don't
7323         declare or define.
7324         * python/py-all-events.def: New file.
7325
7326 2017-09-11  Tom Tromey  <tom@tromey.com>
7327
7328         * python/py-threadevent.c (create_thread_event_object): Return
7329         gdbpy_ref.
7330         * python/py-stopevent.h (create_stop_event_object)
7331         (create_breakpoint_event_object, create_signal_event_object):
7332         Update.
7333         * python/py-stopevent.c (create_stop_event_object): Return
7334         gdbpy_ref.
7335         (emit_stop_event): Update.
7336         * python/py-signalevent.c (create_signal_event_object): Return
7337         gdbpy_ref.
7338         * python/py-infevents.c (create_inferior_call_event_object):
7339         Update.
7340         * python/py-event.h (create_event_object)
7341         (create_thread_event_object): Update.
7342         * python/py-event.c (create_event_object): Return gdbpy_ref.
7343         * python/py-continueevent.c: Return gdbpy_ref.
7344         * python/py-bpevent.c (create_breakpoint_event_object): Return
7345         gdbpy_ref.
7346
7347 2017-09-11  Tom Tromey  <tom@tromey.com>
7348
7349         PR python/15622:
7350         * NEWS: Add entry.
7351         * python/python.c (do_start_initialization): Initialize new event
7352         types.
7353         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
7354         (gdbpy_initialize_inferior_deleted_event)
7355         (gdbpy_initialize_new_thread_event): Declare.
7356         * python/py-threadevent.c (create_thread_event_object): Add option
7357         "thread" parameter.
7358         * python/py-inferior.c (new_thread_event_object_type)
7359         (new_inferior_event_object_type)
7360         (inferior_deleted_event_object_type): Declare.
7361         (python_new_inferior, python_inferior_deleted): New functions.
7362         (add_thread_object): Emit new_thread event.
7363         (gdbpy_initialize_inferior): Attach new functions to corresponding
7364         observers.
7365         (new_thread, new_inferior, inferior_deleted): Define new event
7366         types.
7367         * python/py-evts.c (gdbpy_initialize_py_events): Add new
7368         registries.
7369         * python/py-events.h (events_object) <new_inferior,
7370         inferior_deleted, new_thread>: New fields.
7371         * python/py-event.h (create_thread_event_breakpoint): Add optional
7372         "thread" parameter.
7373
7374 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
7375
7376         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
7377         check current_ui instead.
7378         (internal_vproblem): Likewise.
7379
7380 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
7381
7382         * thread.c (print_thread_info_1): Remove unnecessary calls to
7383         uiout->is_mi_like_p.
7384
7385 2017-09-09  Tom Tromey  <tom@tromey.com>
7386
7387         * namespace.h (add_using_directive): Update.
7388         * namespace.c (add_using_directive): Change type of excludes to
7389         std::vector.
7390         * dwarf2read.c (read_import_statement): Use std::vector.
7391         (read_namespace): Update.
7392         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
7393
7394 2017-09-09  Tom Tromey  <tom@tromey.com>
7395
7396         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
7397
7398 2017-09-09  Tom Tromey  <tom@tromey.com>
7399
7400         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
7401
7402 2017-09-09  Tom Tromey  <tom@tromey.com>
7403
7404         * stack.c (func_command): Use gdb::def_vector.
7405
7406 2017-09-09  Tom Tromey  <tom@tromey.com>
7407
7408         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
7409         ui_out_emit_list, ui_out_emit_tuple.
7410         (mi_cmd_var_update): Likewise.
7411
7412 2017-09-09  Tom Tromey  <tom@tromey.com>
7413
7414         * mi/mi-interp.c (mi_user_selected_context_changed): Use
7415         ui_out_redirect_pop.
7416         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7417         ui_out_redirect_pop.
7418         * utils.c (do_ui_out_redirect_pop)
7419         (make_cleanup_ui_out_redirect_pop): Remove.
7420         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
7421         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
7422         * ui-out.h (ui_out_redirect_pop): New class.
7423
7424 2017-09-09  Tom Tromey  <tom@tromey.com>
7425
7426         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
7427         (list_available_thread_groups, mi_cmd_list_thread_groups)
7428         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
7429         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
7430         Likewise.
7431
7432 2017-09-09  Tom Tromey  <tom@tromey.com>
7433
7434         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
7435         ui_out_emit_tuple.
7436
7437 2017-09-09  Tom Tromey  <tom@tromey.com>
7438
7439         * target.c (flash_erase_command): Use ui_out_emit_tuple.
7440         * stack.c (print_frame): Use ui_out_emit_tuple.
7441         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
7442         (info_spu_mailbox_command, info_spu_dma_command)
7443         (info_spu_proxydma_command): Likewise.
7444         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
7445         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
7446         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7447         ui_out_emit_tuple.
7448         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
7449
7450 2017-09-09  Tom Tromey  <tom@tromey.com>
7451
7452         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
7453         (class ui_out_emit_table): Update comment.
7454         * ui-out.c (do_cleanup_table_end)
7455         (make_cleanup_ui_out_table_begin_end): Remove.
7456         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
7457         (info_spu_dma_cmdlist): Likewise.
7458         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
7459         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
7460         ui_out_emit_table.
7461
7462 2017-09-09  Tom Tromey  <tom@tromey.com>
7463
7464         * thread.c (print_thread_info_1): Use ui_out_emit_table,
7465         ui_out_emit_list, gdb::optional.
7466
7467 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
7468
7469         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
7470         prototype.
7471         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
7472         prototype.
7473         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
7474         prototype.
7475         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
7476         * ada-exp.y: Remove _initialize_ada_exp prototype.
7477         * ada-lang.c: Remove _initialize_ada_language prototype.
7478         * ada-tasks.c: Remove _initialize_tasks prototype.
7479         * addrmap.c: Remove _initialize_addrmap prototype.
7480         * agent.c: Remove _initialize_agent prototype.
7481         * aix-thread.c: Remove _initialize_aix_thread prototype.
7482         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
7483         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
7484         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
7485         prototype.
7486         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
7487         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
7488         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
7489         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
7490         prototype.
7491         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
7492         prototype.
7493         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
7494         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
7495         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
7496         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
7497         prototype.
7498         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
7499         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
7500         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
7501         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
7502         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7503         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
7504         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
7505         prototype.
7506         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
7507         prototype.
7508         * annotate.c: Remove _initialize_annotate prototype.
7509         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
7510         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
7511         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
7512         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
7513         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
7514         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
7515         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
7516         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
7517         prototype.
7518         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
7519         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
7520         * auto-load.c: Remove _initialize_auto_load prototype.
7521         * auxv.c: Remove _initialize_auxv prototype.
7522         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
7523         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
7524         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
7525         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
7526         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
7527         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
7528         prototype.
7529         * break-catch-throw.c: Remove _initialize_break_catch_throw
7530         prototype.
7531         * breakpoint.c: Remove _initialize_breakpoint prototype.
7532         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
7533         * btrace.c: Remove _initialize_btrace prototype.
7534         * charset.c: Remove _initialize_charset prototype.
7535         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
7536         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
7537         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
7538         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
7539         * cli/cli-script.c: Remove _initialize_cli_script prototype.
7540         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
7541         * coffread.c: Remove _initialize_coffread prototype.
7542         * compile/compile.c: Remove _initialize_compile prototype.
7543         * complaints.c: Remove _initialize_complaints prototype.
7544         * completer.c: Remove _initialize_completer prototype.
7545         * copying.awk: Remove _initialize_copying prototype.
7546         * copying.c: Regenerate.
7547         * core-regset.c: Remove _initialize_core_regset prototype.
7548         * corefile.c: Remove _initialize_core prototype.
7549         * corelow.c: Remove _initialize_corelow prototype.
7550         * cp-abi.c: Remove _initialize_cp_abi prototype.
7551         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
7552         * cp-support.c: Remove _initialize_cp_support prototype.
7553         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
7554         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
7555         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
7556         * ctf.c: Remove _initialize_ctf prototype.
7557         * d-lang.c: Remove _initialize_d_language prototype.
7558         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
7559         prototype.
7560         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
7561         * dbxread.c: Remove _initialize_dbxread prototype.
7562         * dcache.c: Remove _initialize_dcache prototype.
7563         * demangle.c: Remove _initialize_demangler prototype.
7564         * disasm-selftests.c: Remove _initialize_disasm_selftests
7565         prototype.
7566         * disasm.c: Remove _initialize_disasm prototype.
7567         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
7568         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
7569         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
7570         prototype.
7571         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
7572         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
7573         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
7574         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
7575         * elfread.c: Remove _initialize_elfread prototype.
7576         * exec.c: Remove _initialize_exec prototype.
7577         * extension.c: Remove _initialize_extension prototype.
7578         * f-lang.c: Remove _initialize_f_language prototype.
7579         * f-valprint.c: Remove _initialize_f_valprint prototype.
7580         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
7581         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
7582         * filesystem.c: Remove _initialize_filesystem prototype.
7583         * findcmd.c: Remove _initialize_mem_search prototype.
7584         * fork-child.c: Remove _initialize_fork_child prototype.
7585         * frame-base.c: Remove _initialize_frame_base prototype.
7586         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
7587         * frame.c: Remove _initialize_frame prototype.
7588         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
7589         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
7590         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
7591         * gcore.c: Remove _initialize_gcore prototype.
7592         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
7593         * gdbarch.c: Regenerate.
7594         * gdbarch.sh: Remove _initialize_gdbarch prototype.
7595         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
7596         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
7597         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
7598         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
7599         * go-lang.c: Remove _initialize_go_language prototype.
7600         * go32-nat.c: Remove _initialize_go32_nat prototype.
7601         * guile/guile.c: Remove _initialize_guile prototype.
7602         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
7603         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
7604         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
7605         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
7606         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
7607         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
7608         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
7609         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
7610         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
7611         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
7612         prototype.
7613         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
7614         prototype.
7615         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
7616         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
7617         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
7618         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
7619         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
7620         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
7621         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
7622         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
7623         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
7624         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
7625         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
7626         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
7627         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
7628         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7629         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
7630         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
7631         prototype.
7632         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
7633         prototype.
7634         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
7635         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
7636         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
7637         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
7638         * infcall.c: Remove _initialize_infcall prototype.
7639         * infcmd.c: Remove _initialize_infcmd prototype.
7640         * inferior.c: Remove _initialize_inferiors prototype.
7641         * inflow.c: Remove _initialize_inflow prototype.
7642         * infrun.c: Remove _initialize_infrun prototype.
7643         * interps.c: Remove _initialize_interpreter prototype.
7644         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
7645         * jit.c: Remove _initialize_jit prototype.
7646         * language.c: Remove _initialize_language prototype.
7647         * linux-fork.c: Remove _initialize_linux_fork prototype.
7648         * linux-nat.c: Remove _initialize_linux_nat prototype.
7649         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
7650         * linux-thread-db.c: Remove _initialize_thread_db prototype.
7651         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
7652         * m2-lang.c: Remove _initialize_m2_language prototype.
7653         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
7654         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
7655         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
7656         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
7657         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
7658         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
7659         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
7660         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
7661         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
7662         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
7663         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
7664         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
7665         * machoread.c: Remove _initialize_machoread prototype.
7666         * macrocmd.c: Remove _initialize_macrocmd prototype.
7667         * macroscope.c: Remove _initialize_macroscope prototype.
7668         * maint.c: Remove _initialize_maint_cmds prototype.
7669         * mdebugread.c: Remove _initialize_mdebugread prototype.
7670         * memattr.c: Remove _initialize_mem prototype.
7671         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
7672         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
7673         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
7674         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
7675         * mi/mi-main.c: Remove _initialize_mi_main prototype.
7676         * microblaze-linux-tdep.c: Remove
7677         _initialize_microblaze_linux_tdep prototype.
7678         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
7679         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
7680         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
7681         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
7682         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
7683         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
7684         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
7685         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
7686         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
7687         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
7688         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
7689         prototype.
7690         * mipsread.c: Remove _initialize_mipsread prototype.
7691         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
7692         prototype.
7693         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
7694         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
7695         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
7696         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
7697         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
7698         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
7699         prototype.
7700         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
7701         * nto-procfs.c: Remove _initialize_procfs prototype.
7702         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
7703         * objc-lang.c: Remove _initialize_objc_language prototype.
7704         * objfiles.c: Remove _initialize_objfiles prototype.
7705         * observer.c: Remove observer_test_first_notification_function,
7706         observer_test_second_notification_function,
7707         observer_test_third_notification_function, and
7708         _initialize_observer prototypes.
7709         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
7710         * osabi.c: Remove _initialize_gdb_osabi prototype.
7711         * osdata.c: Remove _initialize_osdata prototype.
7712         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
7713         * parse.c: Remove _initialize_parse prototype.
7714         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
7715         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
7716         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
7717         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
7718         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
7719         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
7720         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
7721         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
7722         * printcmd.c: Remove _initialize_printcmd prototype.
7723         * probe.c: Remove _initialize_probe prototype.
7724         * proc-api.c: Remove _initialize_proc_api prototype.
7725         * proc-events.c: Remove _initialize_proc_events prototype.
7726         * proc-service.c: Remove _initialize_proc_service prototype.
7727         * procfs.c: Remove _initialize_procfs prototype.
7728         * psymtab.c: Remove _initialize_psymtab prototype.
7729         * python/python.c: Remove _initialize_python prototype.
7730         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
7731         * record-btrace.c: Remove _initialize_record_btrace prototype.
7732         * record-full.c: Remove _initialize_record_full prototype.
7733         * record.c: Remove _initialize_record prototype.
7734         * regcache.c: Remove _initialize_regcache prototype.
7735         * reggroups.c: Remove _initialize_reggroup prototype.
7736         * remote-notif.c: Remove _initialize_notif prototype.
7737         * remote-sim.c: Remove _initialize_remote_sim prototype.
7738         * remote.c: Remove _initialize_remote prototype.
7739         * reverse.c: Remove _initialize_reverse prototype.
7740         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
7741         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
7742         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
7743         prototype.
7744         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
7745         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
7746         * rust-exp.y: Remove _initialize_rust_exp prototype.
7747         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
7748         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
7749         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
7750         * score-tdep.c: Remove _initialize_score_tdep prototype.
7751         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
7752         prototype.
7753         * ser-go32.c: Remove _initialize_ser_dos prototype.
7754         * ser-mingw.c: Remove _initialize_ser_windows prototype.
7755         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
7756         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
7757         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
7758         * serial.c: Remove _initialize_serial prototype.
7759         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
7760         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
7761         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
7762         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
7763         * skip.c: Remove _initialize_step_skip prototype.
7764         * sol-thread.c: Remove _initialize_sol_thread prototype.
7765         * solib-aix.c: Remove _initialize_solib_aix prototype.
7766         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
7767         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
7768         * solib-frv.c: Remove _initialize_frv_solib prototype.
7769         * solib-spu.c: Remove _initialize_spu_solib prototype.
7770         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
7771         * solib-target.c: Remove _initialize_solib_target prototype.
7772         * solib.c: Remove _initialize_solib prototype.
7773         * source.c: Remove _initialize_source prototype.
7774         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
7775         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
7776         prototype.
7777         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
7778         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
7779         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
7780         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
7781         prototype.
7782         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
7783         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
7784         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
7785         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
7786         prototype.
7787         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
7788         prototype.
7789         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
7790         prototype.
7791         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
7792         prototype.
7793         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
7794         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
7795         prototype.
7796         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
7797         prototype.
7798         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
7799         prototype.
7800         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
7801         prototype.
7802         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
7803         prototype.
7804         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
7805         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
7806         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
7807         * stabsread.c: Remove _initialize_stabsread prototype.
7808         * stack.c: Remove _initialize_stack prototype.
7809         * stap-probe.c: Remove _initialize_stap_probe prototype.
7810         * std-regs.c: Remove _initialize_frame_reg prototype.
7811         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
7812         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
7813         * symfile.c: Remove _initialize_symfile prototype.
7814         * symmisc.c: Remove _initialize_symmisc prototype.
7815         * symtab.c: Remove _initialize_symtab prototype.
7816         * target-dcache.c: Remove _initialize_target_dcache prototype.
7817         * target-descriptions.c: Remove _initialize_target_descriptions
7818         prototype.
7819         * thread.c: Remove _initialize_thread prototype.
7820         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
7821         prototype.
7822         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
7823         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
7824         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
7825         prototype.
7826         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
7827         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
7828         * tracefile.c: Remove _initialize_tracefile prototype.
7829         * tracepoint.c: Remove _initialize_tracepoint prototype.
7830         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
7831         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
7832         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
7833         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
7834         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
7835         * tui/tui-win.c: Remove _initialize_tui_win prototype.
7836         * tui/tui.c: Remove _initialize_tui prototype.
7837         * typeprint.c: Remove _initialize_typeprint prototype.
7838         * user-regs.c: Remove _initialize_user_regs prototype.
7839         * utils.c: Remove _initialize_utils prototype.
7840         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
7841         * valarith.c: Remove _initialize_valarith prototype.
7842         * valops.c: Remove _initialize_valops prototype.
7843         * valprint.c: Remove _initialize_valprint prototype.
7844         * value.c: Remove _initialize_values prototype.
7845         * varobj.c: Remove _initialize_varobj prototype.
7846         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
7847         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
7848         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
7849         * windows-nat.c: Remove _initialize_windows_nat,
7850         _initialize_check_for_gdb_ini, and _initialize_loadable
7851         prototypes.
7852         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
7853         * xcoffread.c: Remove _initialize_xcoffread prototype.
7854         * xml-support.c: Remove _initialize_xml_support prototype.
7855         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
7856         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
7857         prototype.
7858         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
7859         prototype.
7860         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
7861
7862 2017-09-08  Keith Seitz  <keiths@redhat.com>
7863
7864         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
7865         field.
7866
7867 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
7868
7869         * f-valprint.c (f_val_print): Remove check for one byte
7870         sized integers. Remove printing of character type.
7871
7872 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
7873             Christoph Weinmann  <christoph.t.weinmann@intel.com>
7874             Bernhard Heckel  <bernhard.heckel@intel.com>
7875
7876         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
7877         to maintain proper indentation when printing pointers/refs.
7878
7879 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
7880
7881         GDB 8.0.1 released.
7882
7883 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
7884
7885         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
7886
7887 2017-09-05  Tom Tromey  <tom@tromey.com>
7888
7889         * parse.c (funcall_chain): Now a std::vector.
7890         (start_arglist, end_arglist): Simplify.
7891         (free_funcalls): Remove.
7892         (parse_exp_in_context_1): Remove cleanup.
7893
7894 2017-09-05  Tom Tromey  <tom@tromey.com>
7895
7896         * go-exp.y (go_parse): Don't create a cleanup.
7897
7898 2017-09-05  Tom Tromey  <tom@tromey.com>
7899
7900         * d-exp.y (PrimaryExpression): Use std::string.
7901         (d_parse): Don't create a cleanup.
7902
7903 2017-09-05  Tom Tromey  <tom@tromey.com>
7904
7905         * utils.c (do_clear_parser_state): Remove.
7906         (make_cleanup_clear_parser_state): Remove.
7907         * p-exp.y (pascal_parse): Use scoped_restore.
7908         * m2-exp.y (m2_parse): Use scoped_restore.
7909         * f-exp.y (f_parse): Use scoped_restore.
7910         * d-exp.y (d_parse): Use scoped_restore.
7911         * c-exp.y (c_parse): Use scoped_restore.
7912         * ada-exp.y (ada_parse): Use scoped_restore.
7913         * utils.h (make_cleanup_clear_parser_state): Remove.
7914
7915 2017-09-06  Keith Seitz  <keiths@redhat.com>
7916
7917         * dwarf2read.c (dw2_linkage_name_attr): New function.
7918         (dw2_linkage_name): New function.
7919         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
7920         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
7921         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
7922
7923 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
7924
7925         * config/djgpp/djconfig.sh: Correct shell portability issue.
7926
7927 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
7928
7929         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
7930
7931 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
7932
7933         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
7934         * NEWS: Mention new FreeBSD/mips native configuration.
7935         * configure.host: Add aarch64*-*-freebsd*.
7936         * configure.nat: Likewise.
7937         * aarch64-fbsd-nat.c: New file.
7938
7939 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
7940
7941         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
7942         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
7943         * NEWS: Mention new FreeBSD/aarch64 target.
7944         * configure.tgt: Add aarch64*-*-freebsd*.
7945         * aarch64-fbsd-tdep.c: New file.
7946         * aarch64-fbsd-tdep.h: New file.
7947
7948 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
7949
7950         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
7951
7952 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
7953
7954         * parse.c (find_minsym_type_and_address): Don't relocate addresses
7955         of TLS symbols.
7956
7957 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7958
7959         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
7960         call.
7961
7962 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
7963
7964         * infrun.c (follow_exec): Call add_thread after
7965         target_find_description.
7966
7967 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
7968
7969         * infrun.c (handle_inferior_event_1): When exec'ing, read
7970         stop_pc after follow_exec.
7971
7972 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
7973
7974         * remote.c (process_g_packet): Update error message.
7975
7976 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7977
7978         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
7979         targets.
7980
7981 2017-09-05  Pedro Alves  <palves@redhat.com>
7982
7983         * eval.c (eval_call, evaluate_funcall): New functions, factored
7984         out from ...
7985         (evaluate_subexp_standard): ... this.
7986
7987 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7988
7989         * amd64-tdep.c (amd64_target_description): Create target
7990         descriptions.
7991         (_initialize_amd64_tdep): Don't call functions
7992         initialize_tdesc_amd64_*.  Add self tests.
7993         * arch/amd64.c (amd64_create_target_description): Add parameter
7994         is_linux.  Call set_tdesc_osabi if is_linux is true.
7995         * arch/amd64.h (amd64_create_target_description): Update the
7996         declaration.
7997         * arch/i386.c (i386_create_target_description): Add parameter
7998         is_linux.  Call set_tdesc_osabi if is_linux is true.
7999         * arch/i386.h (i386_create_target_description): Update
8000         declaration.
8001         * configure.tgt: Add i386.o to gdb_target_obs.
8002         * features/Makefile (XMLTOC): Remove i386/*.xml.
8003         * features/i386/amd64-avx-avx512.c: Remove.
8004         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
8005         * features/i386/amd64-avx-mpx.c: Remove.
8006         * features/i386/amd64-avx.c: Remove.
8007         * features/i386/amd64-mpx.c: Remove.
8008         * features/i386/amd64.c: Remove.
8009         * features/i386/i386-avx-avx512.c: Remove.
8010         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
8011         * features/i386/i386-avx-mpx.c: Remove.
8012         * features/i386/i386-avx.c: Remove.
8013         * features/i386/i386-mmx.c: Remove.
8014         * features/i386/i386-mpx.c: Remove.
8015         * features/i386/i386.c: Remove.
8016         * i386-tdep.c: Don't include features/i386/i386*.c., include
8017         target-descriptions.h and arch/i386.h.
8018         (i386_target_description): Create target descriptions.
8019         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
8020         functions.  Do self tests.
8021
8022 2017-09-05  Yao Qi  <yao.qi@linaro.org>
8023
8024         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
8025         * features/i386/amd64-avx-avx512-linux.c: Removed.
8026         * features/i386/amd64-avx-linux.c: Removed.
8027         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
8028         * features/i386/amd64-avx-mpx-linux.c: Removed.
8029         * features/i386/amd64-linux.c: Removed.
8030         * features/i386/amd64-mpx-linux.c: Removed.
8031         * features/i386/x32-avx-avx512-linux.c: Removed.
8032         * features/i386/x32-avx-linux.c: Removed.
8033         * features/i386/x32-linux.c: Removed.
8034
8035 2017-09-05  Yao Qi  <yao.qi@linaro.org>
8036
8037         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
8038         features/i386/*.c.
8039         (amd64_linux_read_description): Call
8040         amd64_create_target_description.
8041         * arch/amd64.c: New file.
8042         * arch/amd64.h: New file.
8043         * configure.tgt (x86_64-*-linux*): Append amd64.o.
8044         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
8045
8046 2017-09-05  Yao Qi  <yao.qi@linaro.org>
8047
8048         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
8049         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
8050         (amd64_linux_read_description): Create target descriptions.
8051         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
8052         functions.  Add unit tests.
8053         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
8054         x32-core.xml.
8055         * features/i386/64bit-avx.c: Generated.
8056         * features/i386/64bit-avx512.c: Generated.
8057         * features/i386/64bit-core.c: Generated.
8058         * features/i386/64bit-linux.c: Generated.
8059         * features/i386/64bit-mpx.c: Generated.
8060         * features/i386/64bit-pkeys.c: Generated.
8061         * features/i386/64bit-segments.c: Generated.
8062         * features/i386/64bit-sse.c: Generated.
8063         * features/i386/x32-core.c: Generated.
8064         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
8065         c files for amd64-linux and x32-linux.
8066
8067 2017-09-05  Yao Qi  <yao.qi@linaro.org>
8068
8069         * amd64-linux-tdep.c (amd64_linux_read_description): New
8070         function.
8071         (amd64_linux_core_read_description): Call
8072         amd64_linux_read_description.
8073         (amd64_linux_init_abi): Likewise.
8074         (amd64_x32_linux_init_abi): Likewise.
8075         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
8076         * x86-linux-nat.c (x86_linux_read_description): Call
8077         amd64_linux_read_description.
8078
8079 2017-09-05  Yao Qi  <yao.qi@linaro.org>
8080
8081         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
8082         comments.
8083
8084 2017-09-05  Yao Qi  <yao.qi@linaro.org>
8085
8086         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
8087         * features/i386/i386-avx-avx512-linux.c: Remove.
8088         * features/i386/i386-avx-linux.c: Remove.
8089         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
8090         * features/i386/i386-avx-mpx-linux.c: Remove.
8091         * features/i386/i386-linux.c: Remove.
8092         * features/i386/i386-mmx-linux.c: Remove.
8093         * features/i386/i386-mpx-linux.c: Remove.
8094
8095 2017-09-05  Yao Qi  <yao.qi@linaro.org>
8096
8097         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
8098         (SFILES): Add arch/i386.c.
8099         (HFILES_NO_SRCDIR): Add arch/i386.h.
8100         * arch/i386.c: New file.
8101         * arch/i386.h: New file.
8102         * arch/tdesc.h (allocate_target_description): Declare.
8103         (set_tdesc_architecture): Declare.
8104         (set_tdesc_osabi): Declare.
8105         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
8106         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
8107         include arch/i386.h.
8108         (i386_linux_read_description): Remove code and call
8109         i386_create_target_description.
8110         (set_tdesc_architecture): New function.
8111         (set_tdesc_osabi): New function.
8112         * target-descriptions.h (allocate_target_description): Remove.
8113
8114 2017-09-05  Yao Qi  <yao.qi@linaro.org>
8115
8116         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
8117         * target-descriptions.c (tdesc_create_feature): Likewise, and
8118         adjust code.
8119         * features/i386/32bit-avx.c: Re-generated.
8120         * features/i386/32bit-avx512.c: Re-generated.
8121         * features/i386/32bit-core.c: Re-generated.
8122         * features/i386/32bit-linux.c: Re-generated.
8123         * features/i386/32bit-mpx.c: Re-generated.
8124         * features/i386/32bit-pkeys.c: Re-generated.
8125         * features/i386/32bit-sse.c: Re-generated.
8126
8127 2017-09-05  Yao Qi  <yao.qi@linaro.org>
8128
8129         * regformats/regdef.h (struct reg): Override operator == and !=.
8130
8131 2017-09-05  Yao Qi  <yao.qi@linaro.org>
8132
8133         * arch/tdesc.h: New file.
8134         * regformats/regdat.sh: Generate code using tdesc_create_reg.
8135         * target-descriptions.c: Update comments.
8136         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
8137         declarations.
8138         * features/i386/32bit-avx.c: Re-generated.
8139         * features/i386/32bit-avx512.c: Re-generated.
8140         * features/i386/32bit-core.c: Re-generated.
8141         * features/i386/32bit-linux.c: Re-generated.
8142         * features/i386/32bit-mpx.c: Re-generated.
8143         * features/i386/32bit-pkeys.c: Re-generated.
8144         * features/i386/32bit-sse.c: Re-generated.
8145
8146 2017-09-05  Yao Qi  <yao.qi@linaro.org>
8147
8148         * regformats/regdat.sh: Update generated code.
8149
8150 2017-09-05  Yao Qi  <yao.qi@linaro.org>
8151
8152         * regformats/regdat.sh: Adjust code order.
8153
8154 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
8155
8156         * expprint.c (dump_subexp_body_standard): Use constant format
8157         string in fprintf_filtered call.
8158
8159 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
8160
8161         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
8162         NetBSD/i386.
8163         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
8164
8165 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
8166
8167         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
8168
8169 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
8170
8171         * bsd-kvm.o: Define _KMEMUSER.
8172         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
8173         * configure: Regenerate.
8174
8175 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
8176
8177         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
8178         * i386-fbsd-nat.c: Likewise.
8179
8180 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
8181
8182         * unittests/array-view-selftests.c: Add include of <array>.
8183
8184 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
8185
8186         * spu-tdep.c (flush_ea_cache): Add missing argument to
8187         call_function_by_hand.
8188
8189 2017-09-04  Pedro Alves  <palves@redhat.com>
8190
8191         * NEWS (Safer support for debugging with no debug info): New.
8192
8193 2017-09-04  Pedro Alves  <palves@redhat.com>
8194
8195         * c-exp.y (function_method, function_method_void): Add current
8196         instance flags to TYPE_INSTANCE.
8197         * dwarf2read.c (check_modifier): New.
8198         (compute_delayed_physnames): Assert that only C++ adds delayed
8199         physnames.  Mark fn_fields as const/volatile depending on
8200         physname.
8201         * eval.c (make_params): New type_instance_flags parameter.  Use
8202         it as the new type's instance flags.
8203         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
8204         flags element and pass it to make_params.
8205         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
8206         instance flags element.
8207         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
8208         * gdbtypes.h: Include "enum-flags.h".
8209         (type_instance_flags): New enum-flags type.
8210         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
8211         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
8212         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
8213         (follow_type_instance_flags): New function.
8214         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
8215         * parser-defs.h (follow_type_instance_flags): Declare.
8216         * valops.c (value_struct_elt_for_reference): const/volatile must
8217         match too.
8218
8219 2017-09-04  Pedro Alves  <palves@redhat.com>
8220
8221         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
8222         function/method scopes; lookup the nested name as a function local
8223         static variable.
8224
8225 2017-09-04  Pedro Alves  <palves@redhat.com>
8226
8227         (%type <voidval>): Add function_method.
8228         * c-exp.y (exp): New production for calls with no arguments.
8229         (function_method, function_method_void_or_typelist): New
8230         productions.
8231         (exp): New production for "method()::static_var".
8232         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
8233         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8234         Handle OP_FUNC_STATIC_VAR.
8235         * parse.c (operator_length_standard):
8236         Handle OP_FUNC_STATIC_VAR.
8237
8238 2017-09-04  Pedro Alves  <palves@redhat.com>
8239
8240         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
8241         handling.
8242         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8243         Ditto.
8244         * parse.c (operator_length_standard, operator_check_standard):
8245         Ditto.
8246         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
8247
8248 2017-09-04  Pedro Alves  <palves@redhat.com>
8249
8250         * ax-gdb.c: Include "typeprint.h".
8251         (gen_expr_for_cast): New function.
8252         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
8253         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
8254         type is unknown.
8255         * dwarf2read.c (new_symbol_full): Fallback to int instead of
8256         nodebug_data_symbol.
8257         * eval.c: Include "typeprint.h".
8258         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
8259         Error out if symbol has unknown type.
8260         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
8261         evaluate_subexp_for_cast.
8262         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
8263         OP_VAR_MSYM_VALUE.
8264         (evaluate_subexp_for_cast): New function.
8265         * gdbtypes.c (init_nodebug_var_type): New function.
8266         (objfile_type): Use it to initialize types of variables with no
8267         debug info.
8268         * typeprint.c (error_unknown_type): New.
8269         * typeprint.h (error_unknown_type): New declaration.
8270         * compile/compile-c-types.c (convert_type_basic): Handle
8271         TYPE_CODE_ERROR; warn and fallback to int for variables with
8272         unknown type.
8273
8274 2017-09-04  Pedro Alves  <palves@redhat.com>
8275
8276         * eval.c (evaluate_var_value): New function, factored out from ...
8277         (evaluate_subexp_standard): ... here.
8278
8279 2017-09-04  Pedro Alves  <palves@redhat.com>
8280
8281         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
8282         Remove useless assignments to 'op'.
8283
8284 2017-09-04  Pedro Alves  <palves@redhat.com>
8285
8286         * eval.c (eval_skip_value): New function.
8287         (evaluate_subexp_standard): Use it.
8288
8289 2017-09-04  Pedro Alves  <palves@redhat.com>
8290
8291         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
8292         function name from symbol/minsym and pass it to
8293         error_call_unknown_return_type.
8294
8295 2017-09-04  Pedro Alves  <palves@redhat.com>
8296
8297         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
8298         * ax-gdb.c (gen_msym_var_ref): New function.
8299         (gen_expr): Handle OP_VAR_MSYM_VALUE.
8300         * eval.c (evaluate_var_msym_value): New function.
8301         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
8302         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
8303         to call_function_by_hand.
8304         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8305         Handle OP_VAR_MSYM_VALUE.
8306         (union exp_element) <msymbol>: New field.
8307         * minsyms.h (struct type): Forward declare.
8308         (find_minsym_type_and_address): Declare.
8309         * parse.c (write_exp_elt_msym): New function.
8310         (write_exp_msymbol): Delete, refactored as ...
8311         (find_minsym_type_and_address): ... this new function.
8312         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
8313         (operator_length_standard, operator_check_standard): Handle
8314         OP_VAR_MSYM_VALUE.
8315         * std-operator.def (OP_VAR_MSYM_VALUE): New.
8316
8317 2017-09-04  Pedro Alves  <palves@redhat.com>
8318
8319         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
8320         TYPE_GNU_IFUNC specially here.  Throw error if return type is
8321         unknown.
8322         * ada-typeprint.c (print_func_type): Handle functions with unknown
8323         return type.
8324         * c-typeprint.c (c_type_print_base): Handle functions and methods
8325         with unknown return type.
8326         * compile/compile-c-symbols.c (convert_symbol_bmsym)
8327         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
8328         * compile/compile-c-types.c: Include "objfiles.h".
8329         (convert_func): For functions with unknown return type, warn and
8330         default to int.
8331         * compile/compile-object-run.c (compile_object_run): Adjust call
8332         to call_function_by_hand_dummy.
8333         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
8334         call_function_by_hand.
8335         * eval.c (evaluate_subexp_standard): Adjust calls to
8336         call_function_by_hand.  Handle functions and methods with unknown
8337         return type.  Pass expect_type to call_function_by_hand.
8338         * f-typeprint.c (f_type_print_base): Handle functions with unknown
8339         return type.
8340         * gcore.c (call_target_sbrk): Adjust call to
8341         call_function_by_hand.
8342         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
8343         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
8344         an integer address type instead of nodebug.
8345         * guile/scm-value.c (gdbscm_value_call): Adjust call to
8346         call_function_by_hand.
8347         * infcall.c (error_call_unknown_return_type): New function.
8348         (call_function_by_hand): New "default_return_type" parameter.
8349         Pass it down.
8350         (call_function_by_hand_dummy): New "default_return_type"
8351         parameter.  Use it instead of defaulting to int.  If there's no
8352         default and the return type is unknown, throw an error.  If
8353         there's a default return type, and the called function has no
8354         debug info, then assume the function is prototyped.
8355         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
8356         New "default_return_type" parameter.
8357         (error_call_unknown_return_type): New declaration.
8358         * linux-fork.c (call_lseek): Cast return type of lseek.
8359         (inferior_call_waitpid, checkpoint_command): Adjust calls to
8360         call_function_by_hand.
8361         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
8362         calls to call_function_by_hand.
8363         * m2-typeprint.c (m2_procedure): Handle functions with unknown
8364         return type.
8365         * objc-lang.c (lookup_objc_class, lookup_child_selector)
8366         (value_nsstring, print_object_command): Adjust calls to
8367         call_function_by_hand.
8368         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
8369         functions with unknown return type.
8370         (pascal_type_print_func_varspec_suffix): New function.
8371         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
8372         TYPE_CODE_METHOD>: Use it.
8373         * python/py-value.c (valpy_call): Adjust call to
8374         call_function_by_hand.
8375         * rust-lang.c (rust_evaluate_funcall): Adjust call to
8376         call_function_by_hand.
8377         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
8378         call_function_by_hand.
8379         * valops.c (value_allocate_space_in_inferior): Adjust call to
8380         call_function_by_hand.
8381         * typeprint.c (type_print_unknown_return_type): New function.
8382         * typeprint.h (type_print_unknown_return_type): New declaration.
8383
8384 2017-09-04  Pedro Alves  <palves@redhat.com>
8385
8386         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
8387         types with more than one parameter as prototyped.
8388
8389 2017-09-04  Pedro Alves  <palves@redhat.com>
8390
8391         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
8392         (disassemble_command): Use gdb_disassembly_flags instead of bare
8393         int.
8394         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
8395         (dump_insns, do_mixed_source_and_assembly_deprecated)
8396         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
8397         Use gdb_disassembly_flags instead of bare int.
8398         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
8399         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
8400         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
8401         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
8402         (enum gdb_disassembly_flag): ... values of this new enumeration.
8403         (gdb_disassembly_flags): Define.
8404         (gdb_disassembly)
8405         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
8406         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
8407         gdb_disassembly_flags instead of bare int.
8408         * record-btrace.c (btrace_insn_history)
8409         (record_btrace_insn_history, record_btrace_insn_history_range)
8410         (record_btrace_insn_history_from): Use gdb_disassembly_flags
8411         instead of bare int.
8412         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
8413         Use gdb_disassembly_flags instead of bare int.
8414         * target-debug.h (target_debug_print_gdb_disassembly_flags):
8415         Define.
8416         * target-delegates.c: Regenerate.
8417         * target.c (target_insn_history, target_insn_history_from)
8418         (target_insn_history_range): Use gdb_disassembly_flags instead of
8419         bare int.
8420         * target.h: Include "disasm.h".
8421         (struct target_ops) <to_insn_history, to_insn_history_from,
8422         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
8423         int.
8424         (target_insn_history, target_insn_history_from)
8425         (target_insn_history_range): Use gdb_disassembly_flags instead of
8426         bare int.
8427
8428 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
8429
8430         * cli/cli-script.c (build_command_line): For if/while commands,
8431         check whether args is empty.
8432
8433 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
8434
8435         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
8436         (enum command_control_type): Likewise.
8437         (struct command_line): Likewise.
8438         (free_command_lines): Likewise.
8439         (struct command_lines_deleter): Likewise.
8440         (command_line_up): Likewise.
8441         (read_command_lines): Likewise.
8442         (read_command_lines_1): Likewise.
8443         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
8444         (enum command_control_type): Likewise.
8445         (struct command_line): Likewise.
8446         (free_command_lines): Likewise.
8447         (struct command_lines_deleter): Likewise.
8448         (command_line_up): Likewise.
8449         (read_command_lines): Likewise.
8450         (read_command_lines_1): Likewise.
8451         * breakpoint.h: Include cli/cli-script.h.
8452         * extension-priv.h: Likewise.
8453         * gdbcmd.h: Likewise.
8454
8455 2017-09-04  Pedro Alves  <palves@redhat.com>
8456
8457         * ada-lang.c (is_known_support_routine): Move sal declaration to
8458         where it is initialized.
8459         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
8460         (parse_breakpoint_sals, decode_static_tracepoint_spec)
8461         (clear_command, update_static_tracepoint): Remove init_sal
8462         references.  Move declarations closer to initializations.
8463         * cli/cli-cmds.c (list_command): Move sal declarations closer to
8464         initializations.
8465         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
8466         references.  Move sal declarations closer to initializations.
8467         * frame.c (find_frame_sal): Return a symtab_and_line via function
8468         return instead of output parameter.  Remove init_sal references.
8469         * frame.h (find_frame_sal): Return a symtab_and_line via function
8470         return instead of output parameter.
8471         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
8472         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
8473         instead of memset.
8474         (gdbscm_find_pc_line): Remove init_sal reference.
8475         * infcall.c (call_function_by_hand_dummy): Remove init_sal
8476         references.  Move declarations closer to initializations.
8477         * infcmd.c (set_step_frame): Update.  Move declarations closer to
8478         initializations.
8479         (finish_backward): Remove init_sal references.  Move declarations
8480         closer to initializations.
8481         * infrun.c (process_event_stop_test, handle_step_into_function)
8482         (insert_hp_step_resume_breakpoint_at_frame)
8483         (insert_step_resume_breakpoint_at_caller): Likewise.
8484         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
8485         (symbol_to_sal): Likewise.
8486         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
8487         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
8488         to its initialization.
8489         * reverse.c (save_bookmark_command): Use new/delete.  Remove
8490         init_sal references.  Move declarations closer to initializations.
8491         * source.c (get_current_source_symtab_and_line): Remove brace
8492         initialization.
8493         (set_current_source_symtab_and_line): Now takes the sal by const
8494         reference.  Remove brace initialization.
8495         (line_info): Remove init_sal reference.
8496         * source.h (set_current_source_symtab_and_line): Now takes a
8497         symtab_and_line via const reference.
8498         * stack.c (set_current_sal_from_frame): Adjust.
8499         (print_frame_info): Adjust.
8500         (get_last_displayed_sal): Return the sal via function return
8501         instead of via output parameter.  Simplify.
8502         (frame_info): Adjust.
8503         * stack.h (get_last_displayed_sal): Return the sal via function
8504         return instead of via output parameter.
8505         * symtab.c (init_sal): Delete.
8506         (find_pc_sect_line): Remove init_sal references.  Move
8507         declarations closer to initializations.
8508         (find_function_start_sal): Remove init_sal references.  Move
8509         declarations closer to initializations.
8510         * symtab.h (struct symtab_and_line): In-class initialize all
8511         fields.
8512         * tracepoint.c (set_traceframe_context)
8513         (print_one_static_tracepoint_marker): Remove init_sal references.
8514         Move declarations closer to initializations.
8515         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
8516         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
8517         declarations closer to initializations.
8518         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
8519         init_sal references.  Adjust.
8520
8521 2017-09-04  Pedro Alves  <palves@redhat.com>
8522
8523         * ax-gdb.c (agent_command_1): Use range-for.
8524         * break-catch-throw.c (re_set_exception_catchpoint): Update.
8525         * breakpoint.c: Include "common/array-view.h".
8526         (init_breakpoint_sal, create_breakpoint_sal): Change sals
8527         parameter from struct symtabs_and_lines to
8528         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
8529         (breakpoint_sals_to_pc): Change sals parameter from struct
8530         symtabs_and_lines to std::vector reference.
8531         (check_fast_tracepoint_sals): Change sals parameter from struct
8532         symtabs_and_lines to std::array_view.  Use range-for.
8533         (decode_static_tracepoint_spec): Return a std::vector instead of
8534         symtabs_and_lines.  Update.
8535         (create_breakpoint): Update.
8536         (break_range_command, until_break_command, clear_command): Update.
8537         (base_breakpoint_decode_location, bkpt_decode_location)
8538         (bkpt_probe_create_sals_from_location)
8539         (bkpt_probe_decode_location, tracepoint_decode_location)
8540         (tracepoint_probe_decode_location)
8541         (strace_marker_create_sals_from_location): Return a std::vector
8542         instead of symtabs_and_lines.
8543         (strace_marker_create_breakpoints_sal): Update.
8544         (strace_marker_decode_location): Return a std::vector instead of
8545         symtabs_and_lines.  Update.
8546         (update_breakpoint_locations): Change struct symtabs_and_lines
8547         parameters to gdb::array_view.  Adjust.
8548         (location_to_sals): Return a std::vector instead of
8549         symtabs_and_lines.  Update.
8550         (breakpoint_re_set_default): Use std::vector instead of struct
8551         symtabs_and_lines.
8552         (decode_location_default): Return a std::vector instead of
8553         symtabs_and_lines.  Update.
8554         * breakpoint.h: Include "common/array-view.h".
8555         (struct breakpoint_ops) <decode_location>: Now returns a
8556         std::vector instead of returning a symtabs_and_lines via output
8557         parameter.
8558         (update_breakpoint_locations): Change sals parameters to use
8559         gdb::array_view.
8560         * cli/cli-cmds.c (edit_command, list_command): Update to use
8561         std::vector and gdb::array_view.
8562         (ambiguous_line_spec): Adjust to use gdb::array_view and
8563         range-for.
8564         (compare_symtabs): Rename to ...
8565         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
8566         const reference and adjust.
8567         (filter_sals): Rewrite using std::vector and standard algorithms.
8568         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
8569         (jump_command): Update to use std::vector.
8570         * linespec.c (struct linespec_state) <canonical_names>: Update
8571         comment.
8572         (add_sal_to_sals_basic): Delete.
8573         (add_sal_to_sals, filter_results, convert_results_to_lsals)
8574         (decode_line_2, create_sals_line_offset)
8575         (convert_address_location_to_sals, convert_linespec_to_sals)
8576         (convert_explicit_location_to_sals, parse_linespec)
8577         (event_location_to_sals, decode_line_full, decode_line_1)
8578         (decode_line_with_current_source)
8579         (decode_line_with_last_displayed, decode_objc)
8580         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
8581         (linespec_result::~linespec_result): Adjust to use std::vector
8582         instead of symtabs_and_lines.
8583         * linespec.h (linespec_sals::sals): Now a std::vector.
8584         (struct linespec_result): Use std::vector, bool, and in-class
8585         initialization.
8586         (decode_line_1, decode_line_with_current_source)
8587         (decode_line_with_last_displayed): Return std::vector.
8588         * macrocmd.c (info_macros_command): Use std::vector.
8589         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
8590         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
8591         std::vector.
8592         * probe.h (parse_probes): Return a std::vector.
8593         * python/python.c (gdbpy_decode_line): Use std::vector and
8594         gdb::array_view.
8595         * source.c (select_source_symtab, line_info): Use std::vector.
8596         * stack.c (func_command): Use std::vector.
8597         * symtab.h (struct symtabs_and_lines): Delete.
8598         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
8599
8600 2017-09-04  Pedro Alves  <palves@redhat.com>
8601
8602         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8603         unittests/array-view-selftests.c.
8604         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
8605         * common/array-view.h: New file.
8606         * unittests/array-view-selftests.c: New file.
8607
8608 2017-09-04  Pedro Alves  <palves@redhat.com>
8609
8610         * cli/cli-cmds.c (edit_command): Pass message to
8611         ambiguous_line_spec.
8612         (list_command): Pass message to ambiguous_line_spec.  Say
8613         "first"/"last" instead of "start" and "end" to be consistent with
8614         the manual.
8615         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
8616         them to print formatted message.
8617
8618 2017-09-04  Pedro Alves  <palves@redhat.com>
8619
8620         * btrace.c (ftrace_add_pt): Pass btrace_insn to
8621         ftrace_update_insns by reference instead of pointer.
8622
8623 2017-09-04  Yao Qi  <yao.qi@linaro.org>
8624
8625         * i386-go32-tdep.c: Include x86-xstate.h.
8626         (i386_go32_init_abi): Call i386_target_description.
8627         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
8628         if xcr0 is X86_XSTATE_X87_MASK.
8629         * i386-tdep.h (tdesc_i386): Remove the declaration.
8630         (tdesc_i386_mmx): Likewise.
8631
8632 2017-09-04  Yao Qi  <yao.qi@linaro.org>
8633
8634         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
8635         X86_XSTATE_SSE_MASK instead of 0.
8636
8637 2017-09-04  Yao Qi  <yao.qi@linaro.org>
8638
8639         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
8640         i386_target_description.
8641         * i386-fbsd-nat.c (i386fbsd_read_description): Call
8642         i386_target_description.
8643         * i386-tdep.c (i386_gdbarch_init): Likewise.
8644
8645 2017-09-04  Yao Qi  <yao.qi@linaro.org>
8646
8647         * amd64-darwin-tdep.c: Include "x86-xstate.h".
8648         (x86_darwin_init_abi_64): Call amd64_target_description.
8649         * amd64-dicos-tdep.c: Likewise.
8650         * amd64-fbsd-nat.c: Likewise.
8651         * amd64-fbsd-tdep.c: Likewise.
8652         * amd64-nbsd-tdep.c: Likewise.
8653         * amd64-obsd-tdep.c: Likewise.
8654         * amd64-sol2-tdep.c: Likewise.
8655         * amd64-windows-tdep.c: Likewise.
8656         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
8657
8658 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
8659
8660         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
8661         (btrace_function) <insn>: Change type to use std::vector.
8662         * btrace.c (ftrace_debug, ftrace_call_num_insn,
8663         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
8664         ftrace_update_insns, ftrace_compute_global_level_offset,
8665         btrace_stitch_bts, btrace_clear, btrace_insn_get,
8666         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
8667         change to std::vector.
8668         (ftrace_update_insns): Adjust to change to std::vector, change
8669         type of INSN parameter.
8670         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
8671         * record-btrace.c (btrace_call_history_insn_range,
8672         btrace_compute_src_line_range,
8673         record_btrace_frame_prev_register): Adjust to change to
8674         std::vector.
8675         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
8676         to change to std::vector.
8677
8678 2017-09-03  Tom Tromey  <tom@tromey.com>
8679
8680         * corefile.c (reopen_exec_file): Use std::string.
8681
8682 2017-09-03  Tom Tromey  <tom@tromey.com>
8683
8684         * compile/compile.c (compile_register_name_mangled): Return
8685         std::string.
8686         * compile/compile-loc2c.c (pushf_register_address): Update.
8687         (pushf_register): Update.
8688         * compile/compile-c-types.c (convert_array): Update.
8689         * compile/compile-c-symbols.c (generate_vla_size): Update.
8690         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
8691         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
8692         (convert_one_symbol): Update.
8693         (generate_c_for_for_one_variable): Update.
8694         * compile/compile-c-support.c (c_get_range_decl_name): Return a
8695         std::string.
8696         (generate_register_struct): Update.
8697         * compile/compile-internal.h (c_get_range_decl_name): Return a
8698         std::string.
8699         (compile_register_name_mangled): Return std::string.
8700
8701 2017-09-03  Tom Tromey  <tom@tromey.com>
8702
8703         * utils.c (perror_string): Return a std::string.
8704         (throw_perror_with_name, perror_warning_with_name): Update.
8705
8706 2017-09-03  Tom Tromey  <tom@tromey.com>
8707
8708         * demangle.c (demangle_command): Use std::string,
8709         unique_xmalloc_ptr.
8710
8711 2017-09-03  Tom Tromey  <tom@tromey.com>
8712
8713         * cli/cli-setshow.c (do_set_command): Use std::string.
8714
8715 2017-09-03  Tom Tromey  <tom@tromey.com>
8716
8717         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
8718
8719 2017-09-03  Tom Tromey  <tom@tromey.com>
8720
8721         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
8722
8723 2017-09-03  Tom Tromey  <tom@tromey.com>
8724
8725         * mi/mi-cmd-env.c (env_execute_cli_command): Use
8726         gdb::unique_xmalloc_ptr.
8727
8728 2017-09-03  Tom Tromey  <tom@tromey.com>
8729
8730         * thread.c (print_thread_info_1): Use string_printf.
8731         (thread_apply_command, thread_apply_all_command): Use
8732         std::string.
8733
8734 2017-09-03  Tom Tromey  <tom@tromey.com>
8735
8736         * valprint.c (val_print_string): Update.
8737         * gdbcore.h (memory_error_message): Return std::string.
8738         * corefile.c (memory_error_message): Return std::string.
8739         (memory_error): Update.
8740         * breakpoint.c (insert_bp_location): Update.
8741
8742 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
8743
8744         * target/waitstatus.h (target_waitstatus_to_string): Change
8745         return type to std::string.
8746         * target/waitstatus.c (target_waitstatus_to_string): Return
8747         std::string.
8748         * target.h (target_waitstatus_to_string): Remove declaration.
8749         * infrun.c (resume, clear_proceed_status_thread,
8750         print_target_wait_results, do_target_wait, save_waitstatus,
8751         stop_all_threads): Adjust.
8752         * record-btrace.c (record_btrace_wait): Adjust.
8753         * target-debug.h
8754         (target_debug_print_struct_target_waitstatus_p): Adjust.
8755
8756 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
8757
8758         PR gdb/22046
8759         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
8760         detection.
8761
8762 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
8763
8764         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
8765         for setting/unsetting environment variables on the remote target.
8766         (New remote packets): Add entries for QEnvironmentHexEncoded,
8767         QEnvironmentUnset and QEnvironmentReset.
8768         * common/environ.c (gdb_environ::operator=): Extend method to
8769         handle m_user_set_env_list and m_user_unset_env_list.
8770         (gdb_environ::clear): Likewise.
8771         (match_var_in_string): Change type of first parameter from 'char
8772         *' to 'const char *'.
8773         (gdb_environ::set): Extend method to handle
8774         m_user_set_env_list and m_user_unset_env_list.
8775         (gdb_environ::unset): Likewise.
8776         (gdb_environ::clear_user_set_env): New method.
8777         (gdb_environ::user_set_envp): Likewise.
8778         (gdb_environ::user_unset_envp): Likewise.
8779         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
8780         m_user_unset_env_list on move constructor/assignment.
8781         (unset): Add new default parameter 'update_unset_list = true'.
8782         (clear_user_set_env): New method.
8783         (user_set_envp): Likewise.
8784         (user_unset_envp): Likewise.
8785         (m_user_set_env_list): New std::set.
8786         (m_user_unset_env_list): Likewise.
8787         * common/rsp-low.c (hex2str): New function.
8788         (bin2hex): New overload for bin2hex function.
8789         * common/rsp-low.c (hex2str): New prototype.
8790         (str2hex): New overload prototype.
8791         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
8792         QEnvironmentUnset and QEnvironmentReset.
8793         (remote_protocol_features): Add QEnvironmentHexEncoded,
8794         QEnvironmentUnset and QEnvironmentReset packets.
8795         (send_environment_packet): New function.
8796         (extended_remote_environment_support): Likewise.
8797         (extended_remote_create_inferior): Call
8798         extended_remote_environment_support.
8799         (_initialize_remote): Add QEnvironmentHexEncoded,
8800         QEnvironmentUnset and QEnvironmentReset packet configs.
8801         * unittests/environ-selftests.c (gdb_selftest_env_var):
8802         New variable.
8803         (test_vector_initialization): New function.
8804         (test_init_from_host_environ): Likewise.
8805         (test_reinit_from_host_environ): Likewise.
8806         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
8807         Likewise.
8808         (test_unset_set_empty_vector): Likewise.
8809         (test_vector_clear): Likewise.
8810         (test_std_move): Likewise.
8811         (test_move_constructor):
8812         (test_self_move): Likewise.
8813         (test_set_unset_reset): Likewise.
8814         (run_tests): Rewrite in terms of the functions above.
8815
8816 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
8817
8818         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
8819         (adi_available): Use a temp variable of type CORE_ADDR as argument
8820         3 when calling target_auxv_search.
8821         (adi_normalize_address): Use masks and xor operators to calculate
8822         normalized address.
8823         (adi_read_versions, adi_write_versions, adi_print_versions)
8824         (do_examine, do_assign): Use paddress.
8825
8826 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
8827
8828         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
8829         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
8830         out of loop and add supply of FIR.
8831         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
8832         add collect of FIR.
8833
8834 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
8835
8836         PR gdb/21827
8837         * cli/cli-script.c (define_command): Don't convert command name
8838         to lower case.
8839
8840 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
8841
8842         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
8843         Update all callers accordingly. Remove all code blocks handling
8844         the case where DISPP is not NULL.
8845
8846 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
8847
8848         PR symtab/22003
8849         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
8850         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8851         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
8852
8853 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
8854
8855         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
8856         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
8857         (read_comp_units_from_section): New parameter abbrev_section, use
8858         read_and_check_comp_unit_head, allocate signatured_type if needed.
8859         (create_all_comp_units): Update read_comp_units_from_section caller.
8860
8861 2017-08-23  Pedro Alves  <palves@redhat.com>
8862
8863         PR remote/21852
8864         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
8865         to null_ptid and switch to thread without reading the registers
8866         after adding the inferior.
8867
8868 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
8869
8870         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
8871         compile-gcc.
8872         * compile/compile.c (compile_gcc, show_compile_gcc): New.
8873         (compile_to_object): Implement compile_gcc.
8874         (_initialize_compile): Install "set compile-gcc".  Initialize
8875         compile_gcc.
8876
8877 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
8878
8879         * compile/compile.c (compile_to_object): Conditionally call
8880         set_verbose.  Conditionally call compile or compile_v0.
8881
8882 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
8883
8884         * sparc64-tdep.h: (adi_normalize_address): New export.
8885         * sparc-nat.h: (open_adi_tag_fd): New export.
8886         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
8887         * sparc64-linux-tdep.c:
8888         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
8889         (sparc64_linux_handle_segmentation_fault): New function.
8890         (sparc64_linux_init_abi): Register
8891         sparc64_linux_handle_segmentation_fault
8892         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
8893         (sparc64_addr_bits_remove): New function.
8894         (sparc64_init_abi): Register sparc64_addr_bits_remove.
8895         (MAX_PROC_NAME_SIZE): New macro.
8896         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
8897         (sparc64adilist): New variable.
8898         (adi_proc_list): New variable.
8899         (find_adi_info): New function.
8900         (add_adi_info): New function.
8901         (get_adi_info_proc): New function.
8902         (get_adi_info): New function.
8903         (info_adi_command): New function.
8904         (read_maps_entry): New function.
8905         (adi_available): New function.
8906         (adi_normalize_address): New function.
8907         (adi_align_address): New function.
8908         (adi_convert_byte_count): New function.
8909         (adi_tag_fd): New function.
8910         (adi_is_addr_mapped): New function.
8911         (adi_read_versions): New function.
8912         (adi_write_versions): New function.
8913         (adi_print_versions): New function.
8914         (do_examine): New function.
8915         (do_assign): New function.
8916         (adi_examine_command): New function.
8917         (adi_assign_command): New function.
8918         (_initialize_sparc64_adi_tdep): New function.
8919
8920 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
8921
8922         * breakpoint.c (breakpoints_info): Rename to ...
8923         (info_breakpoints_command): ... this.
8924         (watchpoints_info): Rename to ...
8925         (info_watchpoints_command): ... this.
8926         (tracepoints_info): Rename to ...
8927         (info_tracepoints_command): ... this.
8928         (_initialize_breakpoint): Adjust.
8929         * dcache.c (dcache_info): Rename to ...
8930         (info_display_command): ... this.
8931         (_initialize_dcache): Adjust.
8932         * frame.h (args_info): Rename to ...
8933         (info_args_command): ... this.
8934         (locals_info): Rename to ...
8935         (info_locals_command): ... this.
8936         * infcmd.c (nofp_registers_info): Rename to ...
8937         (info_registers_command): ... this.
8938         (float_info): Rename to ...
8939         (info_float_command): ... this.
8940         (program_info): Rename to ...
8941         (info_program_command): ... this.
8942         (all_registers_info): Rename to ...
8943         (info_all_registers_command): ... this.
8944         (vector_info): Rename to ...
8945         (info_vector_command): ... this.
8946         (float_info): Rename to ...
8947         (info_float_command): ... this.
8948         (_initialize_infcmd): Adjust.
8949         * inferior.h (term_info): Rename to ...
8950         (info_terminal_command): ... this.
8951         * inflow.c (term_info): Rename to ...
8952         (info_terminal_command): ... this.
8953         (_initialize_inflow): Adjust.
8954         * infrun.c (signals_info): Rename to ...
8955         (info_signals_command): ... this.
8956         (_initialize_infrun): Adjust.
8957         * objc-lang.c (classes_info): Rename to ...
8958         (info_classes_command): ... this.
8959         (selectors_info): Rename to ...
8960         (info_selectors_command): ... this.
8961         (_initialize_objc_language): Adjust.
8962         * printcmd.c (sym_info): Rename to ...
8963         (info_symbol_command): ... this.
8964         (address_info): Rename to ...
8965         (info_address_command): ... this.
8966         (display_info): Rename to ...
8967         (info_display_command): ... this.
8968         (_initialize_printcmd): Adjust.
8969         * reverse.c (bookmarks_info): Rename to ...
8970         (info_breakpoints_command): ... this.
8971         (_initialize_reverse): Adjust.
8972         * ser-go32.c (dos_info): Rename to ...
8973         (info_serial_command): ... this.
8974         (_initialize_ser_dos): Adjust.
8975         * skip.c (skip_info): Rename to ...
8976         (info_skip_command): ... this.
8977         (_initialize_step_skip): Adjust.
8978         * source.c (line_info): Rename to ...
8979         (info_line_command): ... this.
8980         (source_info): Rename to ...
8981         (info_source_command)
8982         * stack.c (frame_info): Rename to ...
8983         (info_frame_command): ... this.
8984         (locals_info): Rename to ...
8985         (info_locals_command): ... this.
8986         (args_info): Rename to ...
8987         (info_args_command): ... this.
8988         (_initialize_stack): Adjust.
8989         * symtab.c (sources_info): Rename to ...
8990         (info_sources_command): ... this.
8991         (variables_info): Rename to ...
8992         (info_variables_command): ... this.
8993         (functions_info): Rename to ...
8994         (info_functions_command): ... this.
8995         (types_info): Rename to ...
8996         (info_types_command): ... this.
8997         (_initialize_symtab): Adjust.
8998         * target.c (target_info): Rename to ...
8999         (info_target_command): ... this.
9000         (initialize_targets): Adjust.
9001         * tracepoint.c (tvariables_info): Rename to ...
9002         (info_tvariables_command): ... this.
9003         (scope_info): Rename to ...
9004         (info_scope_command): ... this.
9005         (trace_dump_actions): Adjust.
9006         (_initialize_tracepoint): Adjust.
9007
9008 2017-08-22  Tom Tromey  <tom@tromey.com>
9009
9010         * breakpoint.h (install_breakpoint): Update.
9011         * breakpoint.c (add_solib_catchpoint): Update.
9012         (install_breakpoint): Change argument to a std::unique_ptr.
9013         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
9014         (create_breakpoint_sal, create_breakpoint): Update.
9015         (watch_command_1, catch_exec_command_1)
9016         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
9017         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
9018         Return the breakpoint.
9019         (set_raw_breakpoint_without_location, set_raw_breakpoint)
9020         (new_single_step_breakpoint): Update.
9021         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
9022         std::unique_ptr.
9023         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
9024         std::unique_ptr.
9025         * break-catch-sig.c (create_signal_catchpoint): Use
9026         std::unique_ptr.
9027         * ada-lang.c (create_ada_exception_catchpoint): Use
9028         std::unique_ptr.
9029
9030 2017-08-22  Tom Tromey  <tom@tromey.com>
9031
9032         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
9033
9034 2017-08-22  Tom Tromey  <tom@tromey.com>
9035
9036         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
9037         (lookup_partial_symbol): Update.
9038
9039 2017-08-22  Tom Tromey  <tom@tromey.com>
9040
9041         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
9042         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
9043         (find_and_open_source, symtab_to_fullname): Update.
9044         * psymtab.c (psymtab_to_fullname): Update.
9045
9046 2017-08-22  Tom Tromey  <tom@tromey.com>
9047
9048         * exec.c (exec_file_attach): Update.
9049         * linux-thread-db.c (try_thread_db_load): Update.
9050         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
9051         * utils.c (gdb_realpath): Change return type.
9052         (gdb_realpath_keepfile): Update.
9053         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
9054         (_initialize_utils): Register the new self test.
9055         * source.c (openp): Update.
9056         (find_and_open_source): Update.
9057         * nto-tdep.c (nto_find_and_open_solib): Update.
9058         * main.c (set_gdb_data_directory): Update.
9059         (captured_main_1): Update.
9060         * dwarf2read.c (dwarf2_get_dwz_file): Update
9061         (dw2_map_symbol_filenames): Update.
9062         * auto-load.c (auto_load_safe_path_vec_update): Update.
9063         (filename_is_in_auto_load_safe_path_vec): Change type of
9064         "filename_realp".
9065         (auto_load_objfile_script): Update.
9066         (file_is_auto_load_safe): Update.  Use std::string.
9067         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
9068
9069 2017-08-22  Tom Tromey  <tom@tromey.com>
9070
9071         * utils.c (gdb_realpath_keepfile): Return a
9072         gdb::unique_xmalloc_ptr.
9073         * exec.c (exec_file_attach): Update.
9074         * utils.h (gdb_realpath_keepfile): Return a
9075         gdb::unique_xmalloc_ptr.
9076
9077 2017-08-22  Tom Tromey  <tom@tromey.com>
9078
9079         * compile/compile.c (compile_file_command): Use
9080         gdb::unique_xmalloc_ptr, std::string.
9081         * utils.c (gdb_abspath): Change return type.
9082         * source.c (openp): Update.
9083         * objfiles.c (allocate_objfile): Update.
9084         * main.c (set_gdb_data_directory): Update.
9085         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
9086
9087 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
9088
9089         * cli-cmds.c (list_commands): List actual code around more than
9090         one location.
9091
9092 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
9093
9094         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
9095
9096 2017-08-21  Pedro Alves  <palves@redhat.com>
9097
9098         PR gdb/19487
9099         * c-exp.y (variable production): Handle function aliases.
9100         * minsyms.c (msymbol_is_text): New function.
9101         * minsyms.h (msymbol_is_text): Declare.
9102         * symtab.c (find_function_alias_target): New function.
9103         * symtab.h (find_function_alias_target): Declare.
9104
9105 2017-08-21  Pedro Alves  <palves@redhat.com>
9106
9107         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
9108         typedefs.
9109         * typeprint.c (whatis_exp): If handling "whatis", and expression
9110         is OP_TYPE, strip one typedef level.  Otherwise don't strip
9111         typedefs here.
9112         * valops.c (value_cast): Save "to" type before resolving
9113         stubs/typedefs.  Use that type as resulting value's type.
9114
9115 2017-08-18  Tom Tromey  <tom@tromey.com>
9116             Pedro Alves  <palves@redhat.com>
9117
9118         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
9119         * sol-thread.c (sol_thread_resume, sol_thread_wait)
9120         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
9121         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
9122         * proc-service.c (ps_xfer_memory): Use scoped_restore.
9123         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
9124         (linux_get_siginfo_data): Add "thread" argument.  Use
9125         scoped_restore.
9126         * linux-nat.c (linux_child_follow_fork)
9127         (check_stopped_by_watchpoint): Use scoped_restore.
9128         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
9129         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
9130         (restore_inferior_ptid, save_inferior_ptid): Remove.
9131         * btrace.c (btrace_fetch): Use scoped_restore.
9132         * bsd-uthread.c (bsd_uthread_fetch_registers)
9133         (bsd_uthread_store_registers): Use scoped_restore.
9134         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
9135         scoped_restore.
9136         * aix-thread.c (aix_thread_resume, aix_thread_wait)
9137         (aix_thread_xfer_partial): Use scoped_restore.
9138         * inferior.h (save_inferior_ptid): Remove.
9139
9140 2017-08-18  Yao Qi  <yao.qi@linaro.org>
9141
9142         PR tdep/21818
9143         * arm-tdep.c (gdb_print_insn_arm): Mark
9144         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
9145
9146 2017-08-18  Yao Qi  <yao.qi@linaro.org>
9147
9148         * NEWS: Mention GDBserver's new option "--selftest".
9149         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
9150         * selftest.c: Move it to common/selftest.c.
9151         * selftest.h: Move it to common/selftest.h.
9152         * selftest-arch.c (reset): New function.
9153         (tests_with_arch): Call reset.
9154
9155 2017-08-18  Yao Qi  <yao.qi@linaro.org>
9156
9157         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
9158         instead of exception_fprintf and printf_filtered.
9159
9160 2017-08-18  Yao Qi  <yao.qi@linaro.org>
9161
9162         * selftest.c (register_self_test): Rename it to
9163         selftests::register_test.
9164         (run_self_tests): selftest::run_tests.
9165         * selftest.h: Update declarations.
9166         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
9167         selftests::register_test_foreach_arch.
9168         * selftest-arch.h: Update declaration.
9169         * aarch64-tdep.c: Update.
9170         * arm-tdep.c: Likewise.
9171         * disasm-selftests.c: Likewise.
9172         * dwarf2loc.c: Likewise.
9173         * dwarf2-frame.c: Likewise.
9174         * findvar.c: Likewise.
9175         * gdbarch-selftests.c: Likewise.
9176         * maint.c (maintenance_selftest): Likewise.
9177         * regcache.c: Likewise.
9178         * rust-exp.y: Likewise.
9179         * selftest-arch.c: Likewise.
9180         * unittests/environ-selftests.c: Likewise.
9181         * unittests/function-view-selftests.c: Likewise.
9182         * unittests/offset-type-selftests.c: Likewise.
9183         * unittests/optional-selftests.c: Likewise.
9184         * unittests/scoped_restore-selftests.c: Likewise.
9185         * utils-selftests.c: Likewise.
9186
9187 2017-08-17  Pedro Alves  <palves@redhat.com>
9188
9189         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
9190         local.
9191
9192 2017-08-17  Pedro Alves  <palves@redhat.com>
9193
9194         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
9195         field.
9196         (reset_die_in_process): Delete, replaced by ...
9197         (process_die_scope): ... this new class.  Make it responsible for
9198         freeing cu->line_header too.
9199         (process_die): Use process_die_scope.
9200         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
9201         cu->line_header_die_owner.  Don't release the line header if it's
9202         owned by the CU.
9203         (setup_type_unit_groups): Make the CU/DIE own the line header.
9204         Don't release the line header here.
9205
9206 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
9207
9208         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
9209
9210 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
9211
9212         * NEWS: Mention new shortcuts for nexti and stepi in TUI
9213         Single-Key mode
9214
9215 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
9216
9217         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
9218         mode command list.
9219
9220 2017-08-15  Stafford Horne  <shorne@gmail.com>
9221
9222         * MAINTAINERS (Write After Approval): Add Stafford Horne.
9223
9224 2017-08-15  Stafford Horne  <shorne@gmail.com>
9225
9226         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
9227
9228 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
9229
9230         PR gdb/21954
9231         * infcmd.c (unset_environment_command): Use the 'clear' method on
9232         the environment instead of resetting it.
9233
9234 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
9235
9236         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
9237         platforms.
9238
9239 2017-08-14  Tom Tromey  <tom@tromey.com>
9240
9241         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
9242         (print_binary_chars): Likewise.
9243         (BITS_IN_BYTES): Remove.
9244
9245 2017-08-14  Tom Tromey  <tom@tromey.com>
9246
9247         PR gdb/21675
9248         * valprint.c (LOW_ZERO): Change value to 034.
9249         (print_octal_chars): Add static_asserts for octal constants.
9250         * printcmd.c (print_scalar_formatted): Add 'd' case.
9251
9252 2017-08-11  Tom Tromey  <tom@tromey.com>
9253
9254         * symfile.c (add_symbol_file_command): Use std::vector.
9255
9256 2017-08-14  Tom Tromey  <tom@tromey.com>
9257
9258         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
9259         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
9260         std::move.
9261         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
9262
9263 2017-08-11  Pedro Alves  <palves@redhat.com>
9264
9265         * infrun.c (process_event_stop_test): Adjust
9266         function_name_is_marked_for_skip call.
9267         * skip.c: Include <list>.
9268         (skiplist_entry): Make it a class with private fields, and
9269         getters/setters.
9270         (skiplist_entry_chain): Delete.
9271         (skiplist_entries): New.
9272         (skiplist_entry_count): Delete.
9273         (highest_skiplist_entry_num): New.
9274         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
9275         (add_skiplist_entry): Delete.
9276         (skiplist_entry::skiplist_entry): New.
9277         (skiplist_entry::add_entry): New.
9278         (skip_file_command, skip_function): Adjust.
9279         (compile_skip_regexp): Delete.
9280         (skip_command): Don't compile regexp here.  Adjust to use
9281         skiplist_entry::add_entry.
9282         (skip_info): Adjust to use range-for and getters.
9283         (skip_enable_command, skip_disable_command): Adjust to use
9284         range-for and setters.
9285         (skip_delete_command): Adjust to use std::list.
9286         (add_skiplist_entry): Delete.
9287         (skip_file_p): Delete, refactored as ...
9288         (skiplist_entry::do_skip_file_p): ... this new method.
9289         (skip_gfile_p): Delete, refactored as ...
9290         (skiplist_entry::do_gskip_file_p): ... this new method.
9291         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
9292         (skiplist_entry::skip_function_p): ... this new method.
9293         (function_name_is_marked_for_skip): Now returns bool, and takes
9294         the function sal by const reference.  Adjust to use range-for and
9295         skiplist_entry methods.
9296         (_initialize_step_skip): Remove references to
9297         skiplist_entry_chain, skiplist_entry_count.
9298         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
9299         takes the function sal by const reference.
9300
9301 2017-08-11  Yao Qi  <yao.qi@linaro.org>
9302
9303         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
9304         (dwarf2_frame_cache): Remove reset_cache_cleanup.
9305         (dwarf2_frame_cache):
9306         * frame-unwind.c (frame_unwind_try_unwinder): Catch
9307         RETURN_MASK_ALL and set *this_case to NULL.
9308         * frame-unwind.h: Update comments.
9309
9310 2017-08-11  Yao Qi  <yao.qi@linaro.org>
9311
9312         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
9313         (dwarf2_frame_state_copy_regs): Remove.
9314         (dwarf2_frame_state_free_regs): Remove.
9315         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
9316         (dwarf2_restore_rule): Call method .alloc_regs instead of
9317         dwarf2_frame_state_alloc_regs.
9318         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
9319         constructor.  Call std::move.
9320         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
9321         (dwarf2_frame_cache): Likewise.
9322
9323         [GDB_SELF_TEST]: Include selftest.h and
9324         selftest-arch.h.
9325         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
9326         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
9327         execute_cfa_program_test.
9328
9329         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
9330         copy ctor, assignment operator, move assignment.
9331         <alloc_regs>: New method.
9332         <swap>: New method.
9333         (struct dwarf2_frame_state): Delete dtor.
9334         (dwarf2_frame_state_alloc_regs): Remove declaration.
9335         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
9336         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
9337
9338 2017-08-11  Yao Qi  <yao.qi@linaro.org>
9339
9340         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
9341         (dwarf2_frame_state::dwarf2_frame_state): New.
9342         (dwarf2_frame_state::~dwarf2_frame_state): New.
9343         (dwarf2_fetch_cfa_info): Update.
9344         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
9345         rather than a pointer.  Update code.
9346         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
9347         dtor.
9348         <data_align, code_align, retaddr_column>: Change them to const.
9349         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
9350         to bool.
9351
9352 2017-08-11  Yao Qi  <yao.qi@linaro.org>
9353
9354         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
9355         <loc.exp>: New field.
9356         * dwarf2-frame.c (execute_cfa_program): Update.
9357         (dwarf2_frame_prev_register): Update.
9358
9359 2017-08-10  Pedro Alves  <palves@redhat.com>
9360
9361         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
9362
9363 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
9364
9365         * fbsd-nat.c (struct fbsd_fork_info): Remove.
9366         (fbsd_pending_children): Use std::list.
9367         (fbsd_remember_child): Likewise.
9368         (fbsd_is_child_pending): Likewise.
9369         (fbsd_pending_vfork_done): Use std::forward_list.
9370         (fbsd_add_vfork_done): Likewise.
9371         (fbsd_is_vfork_done_pending): Likewise.
9372         (fbsd_next_vfork_done): Likewise.
9373
9374 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
9375
9376         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
9377         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
9378         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
9379         for `mapfilename'.
9380         (fbsd_xfer_partial): Use gdb::byte_vector.
9381         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
9382
9383 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
9384
9385         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
9386         "filestuff.h".
9387         (fbsd_find_memory_regions): Fix `mapfile' initialization.
9388
9389 2017-08-09  Tom Tromey  <tom@tromey.com>
9390
9391         * skip.c (skiplist_entry): New constructor.
9392         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
9393         (skiplist_entry::file_is_glob): Now bool.
9394         (skiplist_entry::file, skiplist_entry::function): Now
9395         std::string.
9396         (make_skip_entry): Return a unique_ptr.  Use new.
9397         (free_skiplist_entry, free_skiplist_entry_cleanup)
9398         (make_free_skiplist_entry_cleanup): Remove.
9399         (skip_command, skip_disable_command, add_skiplist_entry)
9400         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
9401         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
9402         (function_name_is_marked_for_skip): Update.
9403         (skip_delete_command): Update.  Use delete.
9404
9405 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
9406
9407         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
9408         (aarch64_linux_core_read_description): New function.
9409         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
9410
9411 2017-08-09  Pedro Alves  <palves@redhat.com>
9412
9413         * cp-name-parser.y (cp_comp_to_string): Return a
9414         gdb::unique_xmalloc_ptr<char>.
9415         * cp-support.c (replace_typedefs_qualified_name)
9416         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
9417         (cp_canonicalize_string_full): Use op= instead of explicit
9418         convertion.
9419         (cp_class_name_from_physname, method_name_from_physname)
9420         (cp_func_name, cp_remove_params): Adjust to use
9421         gdb::unique_xmalloc_ptr<char>.
9422         * cp-support.h (cp_comp_to_string): Return a
9423         gdb::unique_xmalloc_ptr<char>.
9424         * python/py-type.c (typy_lookup_type): Adjust to use
9425         gdb::unique_xmalloc_ptr<char>.
9426
9427 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
9428
9429         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
9430
9431 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
9432             Yao Qi  <yao.qi@linaro.org>
9433
9434         * cp-support.c (cp_canonicalize_string_full): Use
9435         gdb::unique_xmalloc_ptr<char>.
9436         (cp_canonicalize_string): Likewise.
9437
9438 2017-08-09  Yao Qi  <yao.qi@linaro.org>
9439
9440         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
9441         * regformats/i386/amd64-avx-avx512.dat: Remove.
9442         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
9443         * regformats/i386/amd64-avx-mpx.dat:Remove.
9444         * regformats/i386/amd64-avx.dat: Remove.
9445         * regformats/i386/amd64-mpx.dat: Remove.
9446         * regformats/i386/i386-avx-avx512.dat: Remove.
9447         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
9448         * regformats/i386/i386-avx-mpx.dat: Remove.
9449         * regformats/i386/i386-mmx.dat: Remove.
9450         * regformats/i386/i386-mpx.dat: Remove.
9451
9452 2017-08-09  Yao Qi  <yao.qi@linaro.org>
9453
9454         * amd64-tdep.h (tdesc_x32): Remove the declaration.
9455         * amd64-tdep.c: Don't include features/i386/x32*.c.
9456         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
9457         functions.
9458         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
9459         and i386/x32-avx-avx512.
9460         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
9461         and i386/x32.xml.
9462         * features/i386/x32-avx-avx512.c: Removed.
9463         * features/i386/x32-avx-avx512.xml: Removed.
9464         * features/i386/x32-avx.c: Removed.
9465         * features/i386/x32-avx.xml: Removed.
9466         * features/i386/x32.c: Removed.
9467         * features/i386/x32.xml: Removed.
9468         * regformats/i386/x32-avx-avx512.dat: Removed.
9469         * regformats/i386/x32-avx.dat: Removed.
9470         * regformats/i386/x32.dat: Removed.
9471
9472 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
9473
9474         PR breakpoints/21886
9475         * mem-break.c (default_memory_insert_breakpoint): Use
9476         `->placed_address' rather than `->reqstd_address' for the
9477         breakpoint location.
9478
9479 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
9480
9481         * arch-utils.c (default_print_insn): Remove arch/mach/endian
9482         assertions.
9483
9484 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
9485
9486         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
9487         a union of `tdep_info', `tdesc_data' and `id'.
9488         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
9489         rather than `info.tdep_info'.
9490         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
9491         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9492         * i386-tdep.c (i386_gdbarch_init): Likewise.
9493         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
9494         * mips-tdep.c (mips_gdbarch_init): Likewise.
9495         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9496         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9497         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
9498         `info.tdep_info'.
9499         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
9500         `info.tdep_info'.
9501         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9502         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
9503         `info.tdep_info'.
9504         * spu-tdep.c (spu_gdbarch_init): Likewise.
9505         * gdbarch.h: Regenerate.
9506
9507 2017-08-07  Leszek Swirski  <leszeks@google.com>
9508
9509         PR symtab/20899
9510         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
9511
9512 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
9513
9514         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
9515         (gdbsim_open): Rename gdb_argv args object to argv.
9516
9517 2017-08-05  Tom Tromey  <tom@tromey.com>
9518
9519         * compile/compile-object-load.c (compile_object_load): Use
9520         gdb::unique_xmalloc_ptr.
9521         * cli/cli-dump.c (scan_filename): Rename from
9522         scan_filename_with_cleanup.  Change return type.
9523         (scan_expression): Rename from scan_expression_with_cleanup.
9524         Change return type.
9525         (dump_memory_to_file, dump_value_to_file, restore_command):
9526         Use gdb::unique_xmalloc_ptr.  Update.
9527         * cli/cli-cmds.c (find_and_open_script): Use
9528         gdb::unique_xmalloc_ptr.
9529         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
9530         * symmisc.c (maintenance_print_symbols)
9531         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
9532         * symfile.c (symfile_bfd_open, generic_load)
9533         (add_symbol_file_command, remove_symbol_file_command): Use
9534         gdb::unique_xmalloc_ptr.
9535         * source.c (openp): Use gdb::unique_xmalloc_ptr.
9536         * psymtab.c (maintenance_print_psymbols): Use
9537         gdb::unique_xmalloc_ptr.
9538         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
9539         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
9540         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
9541         (reload_shared_libraries_1): Likewise.
9542
9543 2017-08-05  Tom Tromey  <tom@tromey.com>
9544
9545         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
9546         (rust_op_vector, rust_set_vector): New typedefs.
9547         (current_parser): New global.
9548         (work_obstack): Change to pointer type.  Update all users.
9549         (rust_ast, pstate): Remove globals.
9550         (struct rust_parser): New.
9551         (%union) <params, field_inits>: Change type.
9552         (start, tuple_expr, unit_expr, struct_expr_list, literal)
9553         (field_expr, expr_list, maybe_expr_list, type_list): Update.
9554         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
9555         (convert_params_to_types, convert_params_to_expression): Change
9556         type of "params".
9557         (ast_string): Change type of "fields".
9558         (rust_parse): Make a rust_parser.  Remove cleanups.
9559         (rust_lex_tests): Make and install an auto_obstack.
9560
9561 2017-08-04  Yao Qi  <yao.qi@linaro.org>
9562
9563         * configure.srv (ipa_x32_linux_regobj): New.
9564         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
9565         instead of X86_TDESC_AVX512.
9566         (initialize_low_tracepoint): Call
9567         init_registers_x32_avx_avx512_linux.
9568
9569 2017-08-04  Yao Qi  <yao.qi@linaro.org>
9570
9571         * utils.h (gdb_argv): Add namespace std for nullptr_t.
9572
9573 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
9574
9575         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
9576
9577 2017-08-03  Tom Tromey  <tom@tromey.com>
9578
9579         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
9580         Remove.
9581         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
9582
9583 2017-08-03  Tom Tromey  <tom@tromey.com>
9584
9585         * python/py-param.c (compute_enum_values): Use gdb_argv.
9586
9587 2017-08-03  Tom Tromey  <tom@tromey.com>
9588
9589         * utils.h (struct gdb_argv_deleter): New.
9590         (gdb_argv): New class.
9591         * utils.c (gdb_argv::reset): New method.
9592         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
9593         * tracefile.c (tsave_command): Use gdb_argv.
9594         * top.c (new_ui_command): Use gdb_argv.
9595         * symmisc.c (maintenance_print_symbols)
9596         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
9597         * symfile.c (symbol_file_command, generic_load)
9598         (remove_symbol_file_command): Use gdb_argv.
9599         * stack.c (backtrace_command): Use gdb_argv.
9600         * source.c (add_path, show_substitute_path_command)
9601         (unset_substitute_path_command, set_substitute_path_command):
9602         Use gdb_argv.
9603         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
9604         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
9605         * remote.c (extended_remote_run, remote_put_command)
9606         (remote_get_command, remote_delete_command): Use gdb_argv.
9607         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
9608         (gdbsim_open): Use gdb_argv.
9609         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
9610         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
9611         * procfs.c (procfs_info_proc): Use gdb_argv.
9612         * interps.c (interpreter_exec_cmd): Use gdb_argv.
9613         * infrun.c (handle_command): Use gdb_argv.
9614         * inferior.c (add_inferior_command, clone_inferior_command):
9615         Use gdb_argv.
9616         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
9617         * exec.c (exec_file_command): Use gdb_argv.
9618         * cli/cli-cmds.c (alias_command): Use gdb_argv.
9619         * compile/compile.c (build_argc_argv): Use gdb_argv.
9620
9621 2017-08-03  Tom Tromey  <tom@tromey.com>
9622
9623         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
9624
9625 2017-08-03  Tom Tromey  <tom@tromey.com>
9626
9627         * python/python.c (compute_python_string): Return std::string.
9628         (gdbpy_eval_from_control_command): Update.
9629         (do_start_initialization): Use std::string.
9630         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
9631         xstrprintf.
9632         * python/py-breakpoint.c (local_setattro): Use string_printf, not
9633         xstrprintf.
9634
9635 2017-08-03  Tom Tromey  <tom@tromey.com>
9636
9637         * top.h (do_restore_instream_cleanup): Remove.
9638         * top.c (do_restore_instream_cleanup): Remove.
9639         (read_command_file): Use scoped_restore.
9640         * cli/cli-script.c (execute_user_command): Use scoped_restore.
9641
9642 2017-08-03  Tom Tromey  <tom@tromey.com>
9643
9644         * cli/cli-script.c (execute_user_command)
9645         (execute_control_command): Use scoped_restore.
9646
9647 2017-08-03  Tom Tromey  <tom@tromey.com>
9648
9649         * cli/cli-script.c (do_restore_user_call_depth): Remove.
9650         (execute_user_command): Remove user_call_depth; use
9651         user_args_stack's size instead.
9652
9653 2017-08-03  Tom Tromey  <tom@tromey.com>
9654
9655         * top.h (in_user_command): Remove.
9656         * top.c (in_user_command): Remove.
9657         * cli/cli-script.c (do_restore_user_call_depth)
9658         (execute_user_command): Update.
9659
9660 2017-08-03  Tom Tromey  <tom@tromey.com>
9661
9662         * valops.c (search_struct_method): Use gdb::byte_vector.
9663         * valarith.c (value_concat): Use std::vector.
9664         * target.c (memory_xfer_partial): Use gdb::byte_vector.
9665         (simple_search_memory): Likewise.
9666         * printcmd.c (find_string_backward): Use gdb::byte_vector.
9667         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
9668         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
9669         * elfread.c (elf_rel_plt_read): Use std::string.
9670         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
9671         * cli/cli-dump.c (restore_section_callback): Use
9672         gdb::byte_vector.
9673
9674 2017-08-03  Tom Tromey  <tom@tromey.com>
9675
9676         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
9677
9678 2017-08-03  Tom Tromey  <tom@tromey.com>
9679
9680         * tui/tui-regs.c (tui_restore_gdbout): Remove.
9681         (tui_register_format): Use scoped_restore.
9682
9683 2017-08-03  Tom Tromey  <tom@tromey.com>
9684
9685         * reverse.c (exec_direction_default): Remove.
9686         (exec_reverse_once): Use scoped_restore.
9687         * remote.c (restore_remote_timeout): Remove.
9688         (remote_flash_erase, remote_flash_write, remote_flash_done)
9689         (readchar, remote_serial_write): Use scoped_restore.
9690         * cli/cli-script.c (struct source_cleanup_lines_args)
9691         (source_cleanup_lines): Remove.
9692         (script_from_file): Use scoped_restore.
9693         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
9694         (source_command): Use scoped_restore.
9695
9696 2017-08-03  Tom Tromey  <tom@tromey.com>
9697
9698         * utils.h (make_cleanup_free_so): Remove.
9699         * utils.c (do_free_so, make_cleanup_free_so): Remove.
9700         * solist.h (struct so_deleter): New.
9701         (so_list_up): New typedef.
9702         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
9703
9704 2017-08-03  Tom Tromey  <tom@tromey.com>
9705
9706         * utils.h (make_cleanup_restore_current_language): Remove.
9707         * utils.c (do_restore_current_language)
9708         (make_cleanup_restore_current_language): Remove.
9709         * parse.c (parse_exp_in_context_1)
9710         (parse_expression_with_language): Use
9711         scoped_restore_current_language.
9712         * mi/mi-main.c (mi_cmd_execute): Use
9713         scoped_restore_current_language.
9714         * language.h (scoped_restore_current_language): New class.
9715
9716 2017-08-03  Tom Tromey  <tom@tromey.com>
9717
9718         * compile/compile.c (cleanup_unlink_file): Remove.
9719         (compile_to_object): Use gdb::unlinker.
9720         (eval_compile_command): Likewise.
9721
9722 2017-08-03  Tom Tromey  <tom@tromey.com>
9723
9724         * utils.h (make_cleanup_fclose): Remove.
9725         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
9726
9727 2017-08-03  Tom Tromey  <tom@tromey.com>
9728
9729         * top.c (open_terminal_stream): Return gdb_file_up.
9730         (new_ui_command): Update.
9731
9732 2017-08-03  Tom Tromey  <tom@tromey.com>
9733
9734         * source.c (print_source_lines_base, forward_search_command)
9735         (reverse_search_command): Use gdb_file_up.
9736
9737 2017-08-03  Tom Tromey  <tom@tromey.com>
9738
9739         * fbsd-nat.c (fbsd_find_memory_regions): Update.
9740
9741 2017-08-03  Tom Tromey  <tom@tromey.com>
9742
9743         * cli/cli-cmds.c (find_and_open_script): Change return type.
9744         Remove "streamp" and "full_path" parameters.
9745         (source_script_with_search): Update.
9746         * auto-load.c (source_script_file): Update.
9747         * cli/cli-cmds.h (find_and_open_script): Change type.
9748         (open_script): New struct.
9749
9750 2017-08-03  Tom Tromey  <tom@tromey.com>
9751
9752         * xml-support.c (xml_fetch_content_from_file): Update.
9753         * ui-file.c (stdio_file::open): Update.
9754         * tracefile-tfile.c (tfile_start): Update.
9755         * remote.c (remote_file_put, remote_file_get): Update.
9756         * nat/linux-procfs.c (linux_proc_get_int)
9757         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
9758         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
9759         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
9760         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
9761         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
9762         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
9763         * linux-nat.c (linux_proc_pending_signals): Update.
9764         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
9765         (file_closer): Remove.
9766         * compile/compile.c (compile_to_object): Update.
9767         * common/filestuff.h (struct gdb_file_deleter): New.
9768         (gdb_file_up): New typedef.
9769         (gdb_fopen_cloexec): Change return type.
9770         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
9771         * cli/cli-dump.c (fopen_with_cleanup): Remove.
9772         (dump_binary_file, restore_binary_file): Update.
9773         * auto-load.c (auto_load_objfile_script_1): Update.
9774
9775 2017-08-03  Tom Tromey  <tom@tromey.com>
9776
9777         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
9778         (info_static_tracepoint_markers_command): Likewise.
9779         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
9780         * skip.c (skip_info): Use ui_out_emit_table.
9781         * progspace.c (print_program_space): Use ui_out_emit_table.
9782         * osdata.c (info_osdata): Use ui_out_emit_table.
9783         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
9784         ui_out_emit_table.
9785         * linux-thread-db.c (info_auto_load_libthread_db): Use
9786         ui_out_emit_table.
9787         * inferior.c (print_inferior): Use ui_out_emit_table.
9788         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
9789         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
9790         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
9791         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
9792         * ui-out.h (class ui_out_emit_table): New.
9793
9794 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
9795
9796         * mips-tdep.c (mips_fpu_type_str): New function.
9797         (mips_dump_tdep): Call it.
9798
9799 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
9800
9801         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
9802         `->mips_fpu_type'.
9803
9804 2017-07-31  Xavier Roirand  <roirand@adacore.com>
9805
9806         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
9807
9808 2017-07-27  Xavier Roirand  <roirand@adacore.com>
9809
9810         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
9811
9812 2017-07-26  Yao Qi  <yao.qi@linaro.org>
9813
9814         * cli/cli-cmds.c (maintenancechecklist): New variable.
9815         * gdbcmd.h (maintenancechecklist): Declare it.
9816         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
9817         Call i386_linux_read_description with different masks.
9818         * maint.c (maintenance_check_command): New function.
9819         (_initialize_maint_cmds): Call add_prefix_cmd.
9820         * target-descriptions.c (tdesc_reg): override operator != and ==.
9821         (tdesc_type): Likewise.
9822         (tdesc_feature): Likewise.
9823         (target_desc): Likewise.
9824         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
9825         (maintenance_check_xml_descriptions): New function.
9826         (_initialize_target_descriptions) Add command "xml-descriptions".
9827         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
9828
9829 2017-07-26  Yao Qi  <yao.qi@linaro.org>
9830
9831         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
9832         Include features/i386/32bit-*.c.
9833         (i386_linux_read_description): Generate target description if it
9834         doesn't exist.
9835         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
9836         functions.
9837         * features/i386/32bit-linux.c: Re-generated.
9838         * features/i386/32bit-sse.c: Likewise.
9839         * target-descriptions.c (print_c_feature::visit): Print code to
9840         set register number if needed.
9841         (print_c_feature) <m_next_regnum>: New field.
9842
9843 2017-07-26  Yao Qi  <yao.qi@linaro.org>
9844
9845         * features/Makefile (CFILES): Rename with TDESC_CFILES.
9846         (FEATURE_XMLFILES): New.
9847         (FEATURE_CFILES): New.
9848         New rules.
9849         (clean-cfiles): Remove generated c files.
9850         * features/i386/32bit-avx.c: Generated.
9851         * features/i386/32bit-avx512.c: Generated.
9852         * features/i386/32bit-core.c: Generated.
9853         * features/i386/32bit-linux.c: Generated.
9854         * features/i386/32bit-mpx.c: Generated.
9855         * features/i386/32bit-pkeys.c: Generated.
9856         * features/i386/32bit-sse.c: Generated.
9857         * target-descriptions.c: Include algorithm.
9858         (tdesc_element_visitor): Add method visit_end.
9859         (print_c_tdesc): Implement visit_end.
9860         (print_c_tdesc:: m_filename_after_features): Move it to
9861         protected.
9862         (print_c_feature): New class.
9863         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
9864         name starts with "i386/32bit-".
9865
9866 2017-07-26  Yao Qi  <yao.qi@linaro.org>
9867
9868         * target-descriptions.c (tdesc_element_visitor): New class.
9869         (tdesc_element): New class.
9870         (tdesc_reg): Inherit from tdesc_element.
9871         (tdesc_reg::accept): New function.
9872         (tdesc_type): Inherit from tdesc_element.
9873         (tdesc_type::accept): New function.
9874         (tdesc_feature): Inherit from tdesc_element.
9875         (tdesc_feature::accept): New function.
9876         (target_desc): Inherit from tdesc_element.
9877         (target_desc::target_desc): New.
9878         (target_desc::~target_desc): New.
9879         (target_desc::accept): New.
9880         (allocate_target_description): Use new.
9881         (free_target_description): Use delete.
9882         (print_c_tdesc): New class.
9883         (maint_print_c_tdesc_cmd): Adjust.
9884
9885         * features/aarch64.c: Re-generated.
9886         * features/arc-arcompact.c: Re-generated.
9887         * features/arc-v2.c: Re-generated.
9888         * features/arm/arm-with-iwmmxt.c: Re-generated.
9889         * features/arm/arm-with-m.c: Re-generated.
9890         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
9891         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
9892         * features/arm/arm-with-neon.c: Re-generated.
9893         * features/arm/arm-with-vfpv2.c: Re-generated.
9894         * features/arm/arm-with-vfpv3.c: Re-generated.
9895         * features/i386/amd64-avx-avx512.c: Re-generated.
9896         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9897         * features/i386/amd64-avx.c: Re-generated.
9898         * features/i386/amd64-avx-linux.c: Re-generated.
9899         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
9900         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9901         * features/i386/amd64-avx-mpx.c: Re-generated.
9902         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
9903         * features/i386/amd64.c: Re-generated.
9904         * features/i386/amd64-linux.c: Re-generated.
9905         * features/i386/amd64-mpx.c: Re-generated.
9906         * features/i386/amd64-mpx-linux.c: Re-generated.
9907         * features/i386/i386-avx-avx512.c: Re-generated.
9908         * features/i386/i386-avx-avx512-linux.c: Re-generated.
9909         * features/i386/i386-avx.c: Re-generated.
9910         * features/i386/i386-avx-linux.c: Re-generated.
9911         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
9912         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
9913         * features/i386/i386-avx-mpx.c: Re-generated.
9914         * features/i386/i386-avx-mpx-linux.c: Re-generated.
9915         * features/i386/i386.c: Re-generated.
9916         * features/i386/i386-linux.c: Re-generated.
9917         * features/i386/i386-mmx.c: Re-generated.
9918         * features/i386/i386-mmx-linux.c: Re-generated.
9919         * features/i386/i386-mpx.c: Re-generated.
9920         * features/i386/i386-mpx-linux.c: Re-generated.
9921         * features/i386/x32-avx-avx512.c: Re-generated.
9922         * features/i386/x32-avx-avx512-linux.c: Re-generated.
9923         * features/i386/x32-avx.c: Re-generated.
9924         * features/i386/x32-avx-linux.c: Re-generated.
9925         * features/i386/x32.c: Re-generated.
9926         * features/i386/x32-linux.c: Re-generated.
9927         * features/microblaze.c: Re-generated.
9928         * features/microblaze-with-stack-protect.c: Re-generated.
9929         * features/mips64-dsp-linux.c: Re-generated.
9930         * features/mips64-linux.c: Re-generated.
9931         * features/mips-dsp-linux.c: Re-generated.
9932         * features/mips-linux.c: Re-generated.
9933         * features/nds32.c: Re-generated.
9934         * features/nios2.c: Re-generated.
9935         * features/nios2-linux.c: Re-generated.
9936         * features/rs6000/powerpc-32.c: Re-generated.
9937         * features/rs6000/powerpc-32l.c: Re-generated.
9938         * features/rs6000/powerpc-403.c: Re-generated.
9939         * features/rs6000/powerpc-403gc.c : Re-generated.
9940         * features/rs6000/powerpc-405.c: Re-generated.
9941         * features/rs6000/powerpc-505.c: Re-generated.
9942         * features/rs6000/powerpc-601.c: Re-generated.
9943         * features/rs6000/powerpc-602.c: Re-generated.
9944         * features/rs6000/powerpc-603.c: Re-generated.
9945         * features/rs6000/powerpc-604.c: Re-generated.
9946         * features/rs6000/powerpc-64.c: Re-generated.
9947         * features/rs6000/powerpc-64l.c: Re-generated.
9948         * features/rs6000/powerpc-7400.c: Re-generated.
9949         * features/rs6000/powerpc-750.c: Re-generated.
9950         * features/rs6000/powerpc-860.c: Re-generated.
9951         * features/rs6000/powerpc-altivec32.c: Re-generated.
9952         * features/rs6000/powerpc-altivec32l.c: Re-generated.
9953         * features/rs6000/powerpc-altivec64.c: Re-generated.
9954         * features/rs6000/powerpc-altivec64l.c: Re-generated.
9955         * features/rs6000/powerpc-cell32l.c: Re-generated.
9956         * features/rs6000/powerpc-cell64l.c: Re-generated.
9957         * features/rs6000/powerpc-e500.c: Re-generated.
9958         * features/rs6000/powerpc-e500l.c: Re-generated.
9959         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
9960         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
9961         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
9962         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
9963         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
9964         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
9965         * features/rs6000/powerpc-vsx32.c: Re-generated.
9966         * features/rs6000/powerpc-vsx32l.c: Re-generated.
9967         * features/rs6000/powerpc-vsx64.c: Re-generated.
9968         * features/rs6000/powerpc-vsx64l.c: Re-generated.
9969         * features/rs6000/rs6000.c: Re-generated.
9970         * features/s390-linux32.c: Re-generated.
9971         * features/s390-linux32v1.c: Re-generated.
9972         * features/s390-linux32v2.c: Re-generated.
9973         * features/s390-linux64.c: Re-generated.
9974         * features/s390-linux64v1.c: Re-generated.
9975         * features/s390-linux64v2.c: Re-generated.
9976         * features/s390-te-linux64.c: Re-generated.
9977         * features/s390-tevx-linux64.c: Re-generated.
9978         * features/s390-vx-linux64.c: Re-generated.
9979         * features/s390x-linux64.c: Re-generated.
9980         * features/s390x-linux64v1.c: Re-generated.
9981         * features/s390x-linux64v2.c: Re-generated.
9982         * features/s390x-te-linux64.c: Re-generated.
9983         * features/s390x-tevx-linux64.c: Re-generated.
9984         * features/s390x-vx-linux64.c: Re-generated.
9985         * features/sparc/sparc32-solaris.c: Re-generated.
9986         * features/sparc/sparc64-solaris.c: Re-generated.
9987         * features/tic6x-c62x.c: Re-generated.
9988         * features/tic6x-c62x-linux.c: Re-generated.
9989         * features/tic6x-c64x.c: Re-generated.
9990         * features/tic6x-c64x-linux.c: Re-generated.
9991         * features/tic6x-c64xp.c: Re-generated.
9992         * features/tic6x-c64xp-linux.c: Re-generated.
9993
9994 2017-07-26  Yao Qi  <yao.qi@linaro.org>
9995
9996         * i386-linux-tdep.c (i386_linux_read_description): New function.
9997         (i386_linux_core_read_description): Call
9998         i386_linux_read_description.
9999         * i386-linux-tdep.h (i386_linux_read_description): Declare.
10000         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
10001         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
10002         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
10003         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
10004         * x86-linux-nat.c (x86_linux_read_description): Call
10005         i386_linux_read_description.
10006
10007 2017-07-26  Yao Qi  <yao.qi@linaro.org>
10008
10009         * NEWS: Mention it.
10010         * features/Makefile (%.c: %.xml): Pass the xml file name to
10011         command "maint print c-tdesc".
10012         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
10013         name from 'arg'.
10014
10015 2017-07-26  Yao Qi  <yao.qi@linaro.org>
10016
10017         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
10018         in-class initialization.
10019         (tdesc_create_feature): Call new instead of XCNEW.
10020         (free_target_description): Ue delete.
10021
10022 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
10023
10024         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
10025
10026 2017-07-25  Yao Qi  <yao.qi@linaro.org>
10027
10028         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
10029         constant.
10030         (amd64_x32_init_abi): Likewise.
10031         * amd64-tdep.h (amd64_init_abi): Update declaration.
10032         (amd64_x32_init_abi): Likewise.
10033
10034 2017-07-25  Yao Qi  <yao.qi@linaro.org>
10035
10036         PR tdep/21717
10037         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
10038         condition for FPSCR.
10039         (arm_linux_store_inferior_registers): Likewise.
10040
10041 2017-07-22  Tom Tromey  <tom@tromey.com>
10042
10043         * break-catch-syscall.c (struct catch_syscall_inferior_data)
10044         <syscalls_counts>: Now a std::vector.
10045         (get_catch_syscall_inferior_data): Use "new".
10046         (catch_syscall_inferior_data_cleanup): Use "delete".
10047         (insert_catch_syscall, remove_catch_syscall)
10048         (clear_syscall_counts): Update.
10049
10050 2017-07-22  Tom Tromey  <tom@tromey.com>
10051
10052         * break-catch-syscall.c (syscall_catchpoint)
10053         <syscalls_to_be_caught>: Now a std::vector<int>
10054         (~syscall_catchpoint): Remove.
10055         (insert_catch_syscall, remove_catch_syscall)
10056         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
10057         (print_mention_catch_syscall, print_recreate_catch_syscall):
10058         Update.
10059         (create_syscall_event_catchpoint): Change type of "filter"
10060         parameter.
10061         (catch_syscall_split_args): Return a std::vector.
10062         (catch_syscall_command_1, catching_syscall_number_1): Update.
10063
10064 2017-07-22  Tom Tromey  <tom@tromey.com>
10065
10066         * break-catch-throw.c (struct exception_catchpoint)
10067         <exception_rx>: Now a std::string.
10068         (~exception_catchpoint): Remove.
10069         (print_one_detail_exception_catchpoint): Update.
10070         (handle_gnu_v3_exceptions): Change type of except_rx.
10071         (extract_exception_regexp): Return a std::string.
10072         (catch_exception_command_1): Update.
10073
10074 2017-07-22  Tom Tromey  <tom@tromey.com>
10075
10076         * break-catch-sig.c (gdb_signal_type): Remove typedef.
10077         (struct signal_catchpoint) <signals_to_be_caught>: Now a
10078         std::vector.
10079         <catch_all>: Now a bool.
10080         (~signal_catchpoint): Remove.
10081         (signal_catchpoint_insert_location)
10082         (signal_catchpoint_remove_location)
10083         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
10084         (signal_catchpoint_print_mention)
10085         (signal_catchpoint_print_recreate)
10086         (signal_catchpoint_explains_signal): Update.
10087         (create_signal_catchpoint): Change type of "filter" and
10088         "catch_all".
10089         (catch_signal_split_args): Return a std::vector.  Change type of
10090         "catch_all".
10091         (catch_signal_command): Update.
10092
10093 2017-07-20  Pedro Alves  <palves@redhat.com>
10094
10095         * ada-lang.c (ada_language_defn): Make extern.
10096         (_initialize_ada_language): Remove add_language call.
10097         * c-lang.c (c_language_defn, cplus_language_defn)
10098         (asm_language_defn, minimal_language_defn): Make extern.
10099         (_initialize_c_language): Delete.
10100         * completer.c (compare_cstrings): Delete, moved to utils.h.
10101         * d-lang.c (d_language_defn): Make extern.
10102         (_initialize_d_language): Remove add_language calls.
10103         * defs.h (enum language): Add comment.
10104         * f-lang.c (f_language_defn): Make extern.
10105         (_initialize_f_language): Remove add_language call.
10106         * go-lang.c (go_language_defn): Make extern.
10107         (_initialize_go_language): Remove add_language call.
10108         * language.c: Include <algorithm>.
10109         (languages): Redefine as const array.
10110         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
10111         (set_language_command): Handle "local".  Use for-range loop.
10112         (set_language): Remove loop.
10113         (language_enum): Rewrite.
10114         (language_def, language_str): Remove loops.
10115         (add_language): Delete.
10116         (add_set_language_command): New, based on add_languages.
10117         (skip_language_trampoline): Adjust.
10118         (local_language_defn): Delete.
10119         (language_gdbarch_post_init): Adjust.
10120         (_initialize_language): Remove add_language calls.  Call
10121         add_set_language_command.
10122         * language.h (add_language): Delete.
10123         (auto_language_defn)
10124         (unknown_language_defn, minimal_language_defn, ada_language_defn)
10125         (asm_language_defn, c_language_defn, cplus_language_defn)
10126         (d_language_defn, f_language_defn, go_language_defn)
10127         (m2_language_defn, objc_language_defn, opencl_language_defn)
10128         (pascal_language_defn, rust_language_defn): Declare.
10129         * m2-lang.c (m2_language_defn): Make extern.
10130         (_initialize_m2_language): Remove add_language call.
10131         * objc-lang.c (objc_language_defn): Make extern.
10132         (_initialize_objc_language): Remove add_language call.
10133         * opencl-lang.c (opencl_language_defn): Make extern.
10134         (_initialize_opencl_language): Remove add_language call.
10135         * p-lang.c (pascal_language_defn): Make extern.
10136         (_initialize_pascal_language): Delete.
10137         * rust-lang.c (rust_language_defn): Make extern.
10138         (_initialize_rust_language): Delete.
10139         * utils.h (compare_cstrings): New static inline function.
10140
10141 2017-07-20  Pedro Alves  <palves@redhat.com>
10142
10143         * ada-lang.c (ada_to_fixed_type_1): Adjust.
10144         (get_var_value): Constify parameters.
10145         (get_int_var_value): Change prototype.
10146         (to_fixed_range_type): Adjust.
10147         * ada-lang.h (get_int_var_value): Change prototype.
10148
10149 2017-07-20  Pedro Alves  <palves@redhat.com>
10150
10151         * dwarf2read.c (dw2_lookup_symbol): Use
10152         SYMBOL_MATCHES_SEARCH_NAME.
10153         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
10154
10155 2017-07-20  Pedro Alves  <palves@redhat.com>
10156
10157         * block.c (block_iter_name_step, block_iter_name_first)
10158         (block_iter_name_next): Delete.
10159         (block_lookup_symbol_primary): Adjust to use
10160         dict_iter_match_first/dict_iter_match_next.
10161         * block.h (block_iter_name_first, block_iter_name_next): Delete
10162         declarations.
10163         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
10164         dict_iter_match_first/dict_iter_match_next.
10165
10166 2017-07-20  Pedro Alves  <palves@redhat.com>
10167
10168         * cp-support.c (cp_find_first_component_aux): Add missing case for
10169         end of string.
10170
10171 2017-07-18  David Blaikie  <dblaikie@gmail.com>
10172
10173         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
10174         of dwo_cu's dwo_file.
10175
10176 2017-07-18  Yao Qi  <yao.qi@linaro.org>
10177
10178         * remote.c (store_registers_using_G): Remove one line comment.
10179
10180 2017-07-18  Yao Qi  <yao.qi@linaro.org>
10181
10182         * regcache.c (regcache_cpy): Simplify it.
10183         (regcache::cpy_no_passthrough): Remove it.
10184         * regcache.h (cpy_no_passthrough): Remove it.
10185         (regcache_dup, regcache_cpy): Update comments.
10186
10187 2017-07-18  Pedro Alves  <palves@redhat.com>
10188
10189         * remote-sim.c (sim_command_completer): Adjust to work with a
10190         completion_tracker instead of a VEC.
10191
10192 2017-07-17  Pedro Alves  <palves@redhat.com>
10193
10194         * completer.c (complete_source_filenames): New function.
10195         (complete_address_and_linespec_locations): New function.
10196         (location_completer): Use complete_address_and_linespec_locations.
10197         (completion_tracker::build_completion_result): Honor the tracker's
10198         request to suppress append.
10199         * completer.h (completion_tracker::suppress_append_ws)
10200         (completion_tracker::set_suppress_append_ws): New methods.
10201         (completion_tracker::m_suppress_append_ws): New field.
10202         (complete_source_filenames): New declaration.
10203         * linespec.c (linespec_complete_what): New.
10204         (struct ls_parser) <complete_what, completion_word,
10205         completion_quote_char, completion_quote_end, completion_tracker>:
10206         New fields.
10207         (string_find_incomplete_keyword_at_end): New.
10208         (linespec_lexer_lex_string): Record quote char.  If in completion
10209         mode, don't throw.
10210         (linespec_lexer_consume_token): Advance the completion word point.
10211         (linespec_lexer_peek_token): Save/restore completion info.
10212         (save_stream_and_consume_token): New.
10213         (set_completion_after_number): New.
10214         (linespec_parse_basic): Set what to complete next depending on
10215         token.  Handle function and label completions specially.
10216         (parse_linespec): Disable objc shortcut in completion mode.  Set
10217         what to complete next depending on token type.  Skip keyword if in
10218         completion mode.
10219         (complete_linespec_component, linespec_complete): New.
10220         * linespec.h (linespec_complete): Declare.
10221
10222 2017-07-17  Pedro Alves  <palves@redhat.com>
10223
10224         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
10225         Handle 'operator<' / 'operator<<'.
10226
10227 2017-07-17  Pedro Alves  <palves@redhat.com>
10228
10229         * completer.c (collect_explicit_location_matches): Handle
10230         MATCH_LABEL.
10231         (convert_explicit_location_to_linespec): New, factored out from
10232         ...
10233         (convert_explicit_location_to_sals): ... this.
10234         (complete_label): New.
10235         (linespec_complete_label, find_label_symbols_in_block): New.
10236         (find_label_symbols): Add completion_mode parameter and adjust to
10237         call find_label_symbols_in_block.
10238         * linespec.h (linespec_complete_label): Declare.
10239
10240 2017-07-17  Pedro Alves  <palves@redhat.com>
10241
10242         * ada-lang.c (ada_collect_symbol_completion_matches): Add
10243         complete_symbol_mode parameter.
10244         * cli/cli-cmds.c (complete_command): Get the completion result out
10245         of the handle_brkchars tracker if used a custom word point.
10246         * completer.c: Include "linespec.h".
10247         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
10248         (advance_to_expression_complete_word_point): New.
10249         (completion_tracker::completes_to_completion_word): New.
10250         (complete_files_symbols): Pass down
10251         complete_symbol_mode::EXPRESSION.
10252         (explicit_options, probe_options): New.
10253         (collect_explicit_location_matches): Complete on the
10254         explictit_loc->foo instead of word.  Use
10255         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
10256         keyword and options completions.
10257         (backup_text_ptr): Delete.
10258         (skip_keyword): New.
10259         (complete_explicit_location): Remove 'word' parameter.  Add
10260         language, quoted_arg_start and quoted_arg_end parameters.
10261         Rewrite, parsing left to right.
10262         (location_completer): Rewrite.
10263         (location_completer_handle_brkchars): New function.
10264         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
10265         (enum complete_line_internal_reason): Adjust comments.
10266         (completion_tracker::discard_completions): New.
10267         (completer_handle_brkchars_func_for_completer): Handle
10268         location_completer.
10269         (gdb_custom_word_point_brkchars)
10270         (gdb_org_rl_basic_quote_characters): New.
10271         (gdb_completion_word_break_characters_throw)
10272         (completion_find_completion_word): Handle trackers that use a
10273         custom word point.
10274         (completion_tracker::advance_custom_word_point_by): New.
10275         (completion_tracker::build_completion_result): Don't rely on
10276         readline appending the quote char.
10277         (gdb_rl_attempted_completion_function_throw): Handle trackers that
10278         use a custom word point.
10279         (gdb_rl_attempted_completion_function): Restore
10280         rl_basic_quote_characters.
10281         * completer.h (class completion_tracker): Extend intro comment.
10282         (completion_tracker::set_quote_char)
10283         (completion_tracker::quote_char)
10284         (completion_tracker::set_use_custom_word_point)
10285         (completion_tracker::use_custom_word_point)
10286         (completion_tracker::custom_word_point)
10287         (completion_tracker::set_custom_word_point)
10288         (completion_tracker::advance_custom_word_point_by)
10289         (completion_tracker::completes_to_completion_word)
10290         (completion_tracker::discard_completions): New methods.
10291         (completion_tracker::m_quote_char)
10292         (completion_tracker::m_use_custom_word_point)
10293         (completion_tracker::m_custom_word_point): New fields.
10294         (advance_to_expression_complete_word_point): Declare.
10295         * f-lang.c (f_collect_symbol_completion_matches): Add
10296         complete_symbol_mode parameter.
10297         * language.h (struct language_defn)
10298         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
10299         parameter.
10300         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
10301         (linespec_complete_function): New function.
10302         (linespec_lexer_lex_keyword): Adjust.
10303         * linespec.h (linespec_keywords, linespec_complete_function): New
10304         declarations.
10305         * location.c (find_end_quote): New function.
10306         (explicit_location_lex_one): Add explicit_completion_info
10307         parameter.  Save quoting info.  Don't throw if being called for
10308         completion.  Don't handle Ada operators here.
10309         (is_cp_operator, skip_op_false_positives, first_of)
10310         (explicit_location_lex_one_function): New function.
10311         (string_to_explicit_location): Replace 'dont_throw' parameter with
10312         an explicit_completion_info pointer parameter.  Handle it.  Don't
10313         use explicit_location_lex_one to lex function names.  Use
10314         explicit_location_lex_one_function instead.
10315         * location.h (struct explicit_completion_info): New.
10316         (string_to_explicit_location): Replace 'dont_throw' parameter with
10317         an explicit_completion_info pointer parameter.
10318         * symtab.c (default_collect_symbol_completion_matches_break_on):
10319         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
10320         (default_collect_symbol_completion_matches)
10321         (collect_symbol_completion_matches): Add complete_symbol_mode
10322         parameter.
10323         (collect_symbol_completion_matches_type): Pass down
10324         complete_symbol_mode::EXPRESSION.
10325         (collect_file_symbol_completion_matches): Add complete_symbol_mode
10326         parameter.  Handle LINESPEC mode.
10327         * symtab.h (complete_symbol_mode): New.
10328         (default_collect_symbol_completion_matches_break_on)
10329         (default_collect_symbol_completion_matches)
10330         (collect_symbol_completion_matches)
10331         (collect_file_symbol_completion_matches): Add complete_symbol_mode
10332         parameter.
10333
10334 2017-07-17  Pedro Alves  <palves@redhat.com>
10335
10336         * utils.c (enum class strncmp_iw_mode): New.
10337         (strcmp_iw): Rename to ...
10338         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
10339         parameters.  Handle them.
10340         (strncmp_iw): New.
10341         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
10342         * utils.h (strncmp_iw): Declare.
10343         (strcmp_iw): Move describing comments here.
10344
10345 2017-07-17  Pedro Alves  <palves@redhat.com>
10346
10347         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
10348         CP_OPERATOR_STR.
10349         * c-typeprint.c (is_type_conversion_operator): Use
10350         CP_OPERATOR_STR.
10351         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
10352         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
10353         CP_OPERATOR_LEN.
10354         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
10355         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
10356         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
10357         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
10358         CP_OPERATOR_STR.
10359         * location.c: Include "cp-support.h".
10360         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
10361         CP_OPERATOR_STR.
10362         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
10363         CP_OPERATOR_LEN.
10364
10365 2017-07-17  Pedro Alves  <palves@redhat.com>
10366
10367         * cli/cli-cmds.c (complete_command): Use a completion tracker
10368         along with completion_find_completion_word for handle_brkchars
10369         phase.
10370         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
10371         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
10372         (struct gdb_rl_completion_word_info): New.
10373         (gdb_rl_find_completion_word): New.
10374         (completion_find_completion_word): New.
10375         * completer.h (completion_find_completion_word): Declare.
10376
10377 2017-07-17  Pedro Alves  <palves@redhat.com>
10378
10379         * ada-lang.c (symbol_completion_match): Adjust comments.
10380         (symbol_completion_add): Replace vector parameter with
10381         completion_tracker parameter.  Use it.
10382         (ada_make_symbol_completion_list): Rename to...
10383         (ada_collect_symbol_completion_matches): ... this.  Add
10384         completion_tracker parameter and use it.
10385         (ada_language_defn): Adjust.
10386         * break-catch-syscall.c (catch_syscall_completer): Adjust
10387         prototype and work with completion_tracker instead of VEC.
10388         * breakpoint.c (condition_completer): Adjust prototype and work
10389         with completion_tracker instead of VEC.
10390         * c-lang.c (c_language_defn, cplus_language_defn)
10391         (asm_language_defn, minimal_language_defn): Adjust to renames.
10392         * cli/cli-cmds.c (complete_command): Rework using
10393         completion_tracker.  Catch exceptions when completing.
10394         * cli/cli-decode.c (integer_unlimited_completer)
10395         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
10396         with completion_tracker instead of VEC.
10397         * command.h (struct completion_tracker): Forward declare.
10398         (completer_ftype, completer_handle_brkchars_ftype): Change
10399         types.
10400         (complete_on_cmdlist, complete_on_enum): Adjust.
10401         * completer.c: Include <algorithm>.
10402         (struct gdb_completer_state): New.
10403         (current_completion): New global.
10404         (readline_line_completion_function): Delete.
10405         (noop_completer, filename_completer)
10406         (filename_completer_handle_brkchars, complete_files_symbols)
10407         (linespec_location_completer): Adjust to work with a
10408         completion_tracker instead of a VEC.
10409         (string_or_empty): New.
10410         (collect_explicit_location_matches): Adjust to work with a
10411         completion_tracker instead of a VEC.
10412         (explicit_location_completer): Rename to ...
10413         (complete_explicit_location): ... this and adjust to work with a
10414         completion_tracker instead of a VEC.
10415         (location_completer): Adjust to work with a completion_tracker
10416         instead of a VEC.
10417         (add_struct_fields): Adjust to work with a completion_list instead
10418         of VEC.
10419         (expression_completer): Rename to ...
10420         (complete_expression): ... this and adjust to work with a
10421         completion_tracker instead of a VEC.  Use complete_files_symbols.
10422         (expression_completer): Reimplement on top of complete_expression.
10423         (symbol_completer): Adjust to work with a completion_tracker
10424         instead of a VEC.
10425         (enum complete_line_internal_reason): Add describing comments.
10426         (complete_line_internal_normal_command): Adjust to work with a
10427         completion_tracker instead of a VEC.
10428         (complete_line_internal): Rename to ...
10429         (complete_line_internal_1): ... this and adjust to work with a
10430         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
10431         handle_brkchars phase.
10432         (new_completion_tracker): Delete.
10433         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
10434         complete_line_internal_1.
10435         (free_completion_tracker): Delete.
10436         (INITIAL_COMPLETION_HTAB_SIZE): New.
10437         (completion_tracker::completion_tracker)
10438         (completion_tracker::~completion_tracker): New.
10439         (maybe_add_completion): Delete.
10440         (completion_tracker::maybe_add_completion)
10441         (completion_tracker::add_completion)
10442         (completion_tracker::add_completions): New.
10443         (throw_max_completions_reached_error): Delete.
10444         (complete_line): Adjust to work with a completion_tracker instead
10445         of a VEC.  Don't create a completion_tracker_t or check for max
10446         completions here.
10447         (command_completer, command_completer_handle_brkchars)
10448         (signal_completer, reg_or_group_completer_1)
10449         (reg_or_group_completer, default_completer_handle_brkchars):
10450         Adjust to work with a completion_tracker.
10451         (gdb_completion_word_break_characters_throw): New.
10452         (gdb_completion_word_break_characters): Reimplement.
10453         (line_completion_function): Delete.
10454         (completion_tracker::recompute_lowest_common_denominator)
10455         (expand_preserving_ws)
10456         (completion_tracker::build_completion_result)
10457         (completion_result::completion_result)
10458         (completion_result::completion_result)
10459         (completion_result::~completion_result)
10460         (completion_result::completion_result)
10461         (completion_result::release_match_list, compare_cstrings)
10462         (completion_result::sort_match_list)
10463         (completion_result::reset_match_list)
10464         (gdb_rl_attempted_completion_function_throw)
10465         (gdb_rl_attempted_completion_function): New.
10466         * completer.h (completion_list, struct completion_result)
10467         (class completion_tracker): New.
10468         (complete_line): Add completion_tracker parameter.
10469         (readline_line_completion_function): Delete.
10470         (gdb_rl_attempted_completion_function): New.
10471         (noop_completer, filename_completer, expression_completer)
10472         (location_completer, symbol_completer, command_completer)
10473         (signal_completer, reg_or_group_completer): Update prototypes.
10474         (completion_tracker_t, new_completion_tracker)
10475         (make_cleanup_free_completion_tracker): Delete.
10476         (enum maybe_add_completion_enum): Delete.
10477         (maybe_add_completion): Delete.
10478         (throw_max_completions_reached_error): Delete.
10479         * corefile.c (complete_set_gnutarget): Adjust to work with a
10480         completion_tracker instead of a VEC.
10481         * cp-abi.c (cp_abi_completer): Adjust to work with a
10482         completion_tracker instead of a VEC.
10483         * d-lang.c (d_language_defn): Adjust.
10484         * disasm.c (disassembler_options_completer): Adjust to work with a
10485         completion_tracker instead of a VEC.
10486         * f-lang.c (f_make_symbol_completion_list): Rename to ...
10487         (f_collect_symbol_completion_matches): ... this.  Adjust to work
10488         with a completion_tracker instead of a VEC.
10489         (f_language_defn): Adjust.
10490         * go-lang.c (go_language_defn): Adjust.
10491         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
10492         Adjust to work with a completion_tracker instead of a VEC.
10493         * infrun.c (handle_completer): Likewise.
10494         * interps.c (interpreter_completer): Likewise.
10495         * interps.h (interpreter_completer): Likewise.
10496         * language.c (unknown_language_defn, auto_language_defn)
10497         (local_language_defn): Adjust.
10498         * language.h (language_defn::la_make_symbol_completion_list):
10499         Rename to ...
10500         (language_defn::la_collect_symbol_completion_matches): ... this
10501         and adjust to work with a completion_tracker instead of a VEC.
10502         * m2-lang.c (m2_language_defn): Adjust.
10503         * objc-lang.c (objc_language_defn): Adjust.
10504         * opencl-lang.c (opencl_language_defn): Adjust.
10505         * p-lang.c (pascal_language_defn): Adjust.
10506         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
10507         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
10508         with a completion_tracker.
10509         * rust-lang.c (rust_language_defn): Adjust.
10510         * symtab.c (free_completion_list, do_free_completion_list)
10511         (return_val, completion_tracker): Delete.
10512         (completion_list_add_name, completion_list_add_symbol)
10513         (completion_list_add_msymbol, completion_list_objc_symbol)
10514         (completion_list_add_fields, add_symtab_completions): Add
10515         completion_tracker parameter and use it.
10516         (default_make_symbol_completion_list_break_on_1): Rename to...
10517         (default_collect_symbol_completion_matches_break_on): ... this.
10518         Add completion_tracker parameter and use it instead of allocating
10519         a completion tracker here.
10520         (default_make_symbol_completion_list_break_on): Delete old
10521         implementation.
10522         (default_make_symbol_completion_list): Delete.
10523         (default_collect_symbol_completion_matches): New.
10524         (make_symbol_completion_list): Delete.
10525         (collect_symbol_completion_matches): New.
10526         (make_symbol_completion_type): Rename to ...
10527         (collect_symbol_completion_matches_type): ... this.  Add
10528         completion_tracker parameter and use it instead of VEC.
10529         (make_file_symbol_completion_list_1): Rename to...
10530         (collect_file_symbol_completion_matches): ... this.  Add
10531         completion_tracker parameter and use it instead of VEC.
10532         (make_file_symbol_completion_list): Delete.
10533         (add_filename_to_list): Use completion_list instead of a VEC.
10534         (add_partial_filename_data::list): Now a completion_list.
10535         (make_source_files_completion_list): Work with a completion_list
10536         instead of a VEC.
10537         * symtab.h: Include "completer.h".
10538         (default_make_symbol_completion_list_break_on)
10539         (default_make_symbol_completion_list, make_symbol_completion_list)
10540         (make_symbol_completion_type, make_file_symbol_completion_list)
10541         (make_source_files_completion_list): Delete.
10542         (default_collect_symbol_completion_matches_break_on)
10543         (default_collect_symbol_completion_matches)
10544         (collect_symbol_completion_matches)
10545         (collect_symbol_completion_matches_type)
10546         (collect_file_symbol_completion_matches)
10547         (make_source_files_completion_list): New.
10548         * top.c (init_main): Don't install a rl_completion_entry_function
10549         hook.  Install a rl_attempted_completion_function hook instead.
10550         * tui/tui-layout.c (layout_completer): Adjust to work with a
10551         completion_tracker.
10552         * tui/tui-regs.c (tui_reggroup_completer):
10553         * tui/tui-win.c (window_name_completer, focus_completer)
10554         (winheight_completer): Adjust to work with a completion_tracker.
10555         * value.c: Include "completer.h".
10556         (complete_internalvar): Adjust to work with a completion_tracker.
10557         * value.h (complete_internalvar): Likewise.
10558
10559 2017-07-17  Pedro Alves  <palves@redhat.com>
10560
10561         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
10562         renames.
10563         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
10564         comments to completer_ftype's declaration.
10565         <completer_handle_brkchars>: Change type to
10566         completer_handle_brkchars_ftype.
10567         * command.h (completer_ftype): Add describing comment and give
10568         names to parameters.
10569         (completer_ftype_void): Rename to ...
10570         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
10571         (set_cmd_completer_handle_brkchars): Adjust.
10572         * completer.c (filename_completer_handle_brkchars): New function.
10573         (complete_line_internal_normal_command): New function, factored
10574         out from ...
10575         (complete_line_internal): ... here.
10576         (command_completer_handle_brkchars)
10577         (default_completer_handle_brkchars)
10578         (completer_handle_brkchars_func_for_completer): New functions.
10579         * completer.h (set_gdb_completion_word_break_characters): Delete
10580         declaration.
10581         (completer_handle_brkchars_func_for_completer): New declaration.
10582         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
10583         completer_handle_brkchars_func_for_completer.
10584
10585 2017-07-17  Pedro Alves  <palves@redhat.com>
10586
10587         * completer.c (symbol_completer): New function, based on
10588         make_symbol_completion_list_fn.
10589         * completer.h (symbol_completer): New declaration.
10590         * guile/scm-cmd.c (cmdscm_completers): Adjust.
10591         * python/py-cmd.c (completers): Adjust.
10592         * symtab.c (make_symbol_completion_list_fn): Delete.
10593         * symtab.h (make_symbol_completion_list_fn): Delete.
10594         * cli/cli-decode.c (add_cmd): Adjust.
10595
10596 2017-07-17  Pedro Alves  <palves@redhat.com>
10597
10598         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
10599         * dwarf2read.c: Include "filename-seen-cache.h".
10600         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
10601         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
10602         * filename-seen-cache.c: New file.
10603         * filename-seen-cache.h: New file.
10604         * symtab.c: Include "filename-seen-cache.h".
10605         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
10606         (create_filename_seen_cache, clear_filename_seen_cache)
10607         (delete_filename_seen_cache, filename_seen): Delete, parts moved
10608         to filename-seen-cache.h/filename-seen-cache.c.
10609         (output_source_filename, sources_info)
10610         (maybe_add_partial_symtab_filename)
10611         (make_source_files_completion_list): Adjust to use
10612         filename_seen_cache.
10613
10614 2017-07-17  Pedro Alves  <palves@redhat.com>
10615
10616         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
10617         fields.
10618         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
10619         dwarf2_debug_sections*)): New.
10620         (dwarf2_per_objfile::dwarf2_per_objfile(const
10621         dwarf2_per_objfile&)): Declare as deleted.
10622         (dwarf2_per_objfile::operator=): Declare as deleted.
10623         (dwarf2_per_objfile::dwarf2_per_objfile)
10624         (dwarf2_per_objfile::~dwarf2_per_objfile)
10625         (dwarf2_per_objfile::free_cached_comp_units): New.
10626         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
10627         ctor.  Call dwarf2_per_objfile's ctor manually.
10628         (dwarf2_locate_sections): Deleted/refactored as ...
10629         (dwarf2_per_objfile::locate_sections): ... this new method.
10630         (free_cached_comp_units): Defer to
10631         dwarf2_per_objfile::free_cached_comp_units.
10632         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
10633
10634 2017-07-14  Tom Tromey  <tom@tromey.com>
10635
10636         PR rust/21764:
10637         * rust-exp.y (convert_ast_to_expression): Add "want_type"
10638         parameter.
10639         <UNOP_SIZEOF>: Split into separate case.
10640         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
10641
10642 2017-07-14  Tom Tromey  <tom@tromey.com>
10643
10644         PR rust/21763:
10645         * symtab.c (symbol_matches_domain): Add language_rust to special
10646         case.
10647         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
10648         treat LOC_TYPEDEF symbols as variables.
10649
10650 2017-07-14  Pedro Alves  <palves@redhat.com>
10651
10652         * symtab.c (make_file_symbol_completion_list_1): Iterate over
10653         symtabs matching all symtabs with SRCFILE as file name instead of
10654         only considering the first hit, with lookup_symtab.
10655
10656 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
10657
10658         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
10659         operator_name parameters.
10660         (gen_expr): Update function call.
10661
10662 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
10663
10664         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
10665         parameter.
10666         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
10667         Likewise.
10668         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
10669         parameter, use agent_expr::gdbarch instead, update function
10670         calls.
10671         (locexpr_tracepoint_var_ref): Likewise.
10672         (loclist_tracepoint_var_ref): Likewise.
10673         * ax-gdb.c (gen_trace_static_fields): Likewise.
10674         (gen_traced_pop): Likewise.
10675         (gen_frame_args_address): Likewise.
10676         (gen_frame_locals_address): Likewise.
10677         (gen_var_ref): Likewise.
10678         (gen_struct_ref_recursive): Likewise.
10679         (gen_static_field): Likewise.
10680         (gen_maybe_namespace_elt): Likewise.
10681         (gen_expr): Likewise.
10682         (gen_trace_for_var): Likewise.
10683         (gen_trace_for_expr): Likewise.
10684         (gen_trace_for_return_address): Likewise.
10685
10686 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
10687
10688         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
10689         parameter.
10690         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
10691
10692 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
10693
10694         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
10695         from ax, update calls.
10696         (gen_usual_arithmetic): Likewise.
10697         (gen_integral_promotions): Likewise.
10698         (gen_bitfield_ref): Likewise.
10699         (gen_primitive_field): Likewise.
10700         (gen_struct_ref_recursive): Likewise.
10701         (gen_struct_ref): Likewise.
10702         (gen_maybe_namespace_elt): Likewise.
10703         (gen_struct_elt_for_reference): Likewise.
10704         (gen_namespace_elt): Likewise.
10705         (gen_aggregate_elt_ref): Likewise.
10706         (gen_expr): Get gdbarch from ax, update calls.
10707         (gen_expr_binop_rest): Likewise.
10708
10709 2017-07-13  Pedro Alves  <palves@redhat.com>
10710
10711         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
10712         as default tdesc.
10713         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
10714         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
10715         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
10716         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
10717         tdep.
10718         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
10719         Get final tdesc from the tdep.
10720         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
10721         default tdesc.
10722         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
10723         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
10724         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
10725         Use it as default tdesc.
10726         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
10727         down to amd_init_abi.  No longer handle fallback tdesc here.
10728         * amd64-tdep.h (tdesc_x32): Declare.
10729         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
10730         parameter.
10731         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
10732         as default tdesc.
10733
10734 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10735
10736         * s390-linux-tdep.c (s390_process_record): Add support for
10737         instructions new in arch12.
10738
10739 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
10740
10741         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
10742         PT_GETFSBASE and PT_GETGSBASE.
10743         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
10744         PT_SETGSBASE.
10745
10746 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
10747
10748         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
10749         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
10750         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
10751         those rules.
10752         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
10753         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
10754         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
10755         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
10756         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
10757         * features/i386/amd64.xml: Add 64bit-segments.xml.
10758         * features/i386/amd64-avx-avx512.c: Regenerated.
10759         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
10760         * features/i386/amd64-avx-mpx.c: Regenerated.
10761         * features/i386/amd64-avx.c: Regenerated.
10762         * features/i386/amd64-mpx.c: Regenerated.
10763         * features/i386/amd64.c: Regenerated.
10764         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
10765         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
10766         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
10767         * regformats/i386/amd64-avx.dat: Regenerated.
10768         * regformats/i386/amd64-mpx.dat: Regenerated.
10769         * regformats/i386/amd64.dat: Regenerated.
10770
10771 2017-07-10  Yao Qi  <yao.qi@linaro.org>
10772
10773         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
10774         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
10775
10776 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
10777
10778         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
10779         unsetenv.
10780         * gnulib/aclocal.m4: Regenerate.
10781         * gnulib/config.in: Regenerate.
10782         * gnulib/configure: Regenerate.
10783         * gnulib/import/Makefile.am: Regenerate.
10784         * gnulib/import/Makefile.in: Regenerate.
10785         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
10786         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
10787         * gnulib/import/m4/environ.m4: New file.
10788         * gnulib/import/m4/setenv.m4: New file.
10789         * gnulib/import/setenv.c: New file.
10790         * gnulib/import/unsetenv.c: New file.
10791
10792 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
10793
10794         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
10795         address when op is DW_OP_addr.
10796
10797 2017-07-09  Tom Tromey  <tom@tromey.com>
10798
10799         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
10800         check and apply to outer type.
10801
10802 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
10803
10804         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
10805         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
10806         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
10807         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
10808
10809 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
10810
10811         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
10812
10813 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
10814
10815         * corelow.c (get_core_siginfo): Remove.
10816         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
10817         instead of get_core_siginfo.
10818         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
10819         * gdbarch.h: Re-generate.
10820         * gdbarch.c: Re-generate.
10821         * linux-tdep.c (linux_core_xfer_siginfo): New.
10822         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
10823
10824 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
10825
10826         * corelow.c (thread_section_name): Move to ...
10827         * gdbcore.h (thread_section_name): ... here.
10828
10829 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
10830
10831         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
10832         (struct siginfo32): New.
10833         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
10834         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
10835         via ptrace(PT_LWPINFO).
10836
10837 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
10838
10839         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
10840         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
10841         (fbsd_get_siginfo_type): New.
10842         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
10843         (_initialize_fbsd_tdep): New.
10844
10845 2017-07-06  David Blaikie  <dblaikie@gmail.com>
10846
10847         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
10848         a singular dwo_unit*) to support multiple CUs in the same way that
10849         multiple TUs are supported.
10850         (create_cus_hash_table): Replace create_dwo_cu with a function for
10851         parsing multiple CUs from a DWO file.
10852         (open_and_init_dwo_file): Use create_cus_hash_table rather than
10853         create_dwo_cu.
10854         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
10855         htab_find, rather than comparing the signature to a singleton CU in
10856         the dwo_file.
10857
10858 2017-07-06  Pedro Alves  <palves@redhat.com>
10859
10860         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
10861
10862 2017-07-04  Pedro Alves  <palves@redhat.com>
10863
10864         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
10865         * gdbtypes.h (TYPE_STATIC): Delete.
10866         (struct fn_field) <is_public, is_abstract, is_static, is_final,
10867         is_synchronized, is_native>: Delete.
10868         <dummy>: Bump.
10869         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
10870         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
10871         (TYPE_FN_FIELD_ABSTRACT): Delete.
10872
10873 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
10874
10875         * buffer.h (buffer_finish): Fix spelling mistakes.
10876
10877 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
10878
10879         * .dir-locals.el: Automatically switch to C-style comments in
10880         versions of Emacs that support the feature.
10881
10882 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
10883             Pedro Alves  <palves@redhat.com>
10884
10885         PR cli/21688
10886         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
10887         (process_next_line): New variable 'inline_cmd'.
10888         Adjust 'if' clauses for "python", "compile" and "guile" to use
10889         'command_name_equals' and check for '!inline_cmd'.
10890
10891 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
10892
10893         PR cli/21688
10894         * cli/cli-script.c (command_name_equals_not_inline): New function.
10895         (process_next_line): Adjust 'if' clauses for "python", "compile"
10896         and "guile" to use command_name_equals_not_inline.
10897
10898 2017-06-29  Pedro Alves  <palves@redhat.com>
10899
10900         * completer.c (expression_completer): Call
10901         linespec_location_completer instead of location_completer.
10902
10903 2017-06-29  Pedro Alves  <palves@redhat.com>
10904
10905         * completer.c (expression_completer): Remove code that recomputes
10906         'text' from 'word'.
10907
10908 2017-06-29  Yao Qi  <yao.qi@linaro.org>
10909
10910         * regformats/regdat.sh: Generate code with
10911         "ifndef IN_PROCESS_AGENT".
10912
10913 2017-06-28  Pedro Alves  <palves@redhat.com>
10914
10915         * command.h: Include "common/scoped_restore.h".
10916
10917 2017-06-28  Yao Qi  <yao.qi@linaro.org>
10918
10919         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
10920         instead of obstack_grow.
10921
10922 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
10923
10924         PR gdb/21337
10925         * symfile.c (reread_symbols): Call objfiles_changed just before
10926         read_symbols.
10927
10928 2017-06-27  Pedro Alves  <palves@redhat.com>
10929
10930         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
10931         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
10932         (completion_list_add_symbol, completion_list_add_msymbol):
10933         ... these new functions.
10934         (add_symtab_completions)
10935         (default_make_symbol_completion_list_break_on_1): Adjust.
10936
10937 2017-06-27  Pedro Alves  <palves@redhat.com>
10938
10939         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
10940         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
10941         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
10942         dtor.
10943         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
10944         'storage_obstack' field an auto_obstack.  In-class initialize all
10945         non-bitfield fields.  Make minsyms_read bool.
10946         * symfile.c (read_symbols): Adjust.
10947
10948 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
10949
10950         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
10951         (gdbsim_store_register): Likewise.
10952
10953 2017-06-27  Pedro Alves  <palves@redhat.com>
10954
10955         * c-exp.y (name_obstack): Now an auto_obstack.
10956         (yylex): Use auto_obstack::clear.
10957         (c_parse): Use auto_obstack::clear instead of reinitializing and
10958         freeing the obstack.
10959         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
10960         * d-exp.y (name_obstack): Now an auto_obstack.
10961         (yylex): Use auto_obstack::clear.
10962         (d_parse): Use auto_obstack::clear instead of reinitializing and
10963         freeing the obstack.
10964         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
10965         auto_obstack.
10966         * dwarf2read.c (create_addrmap_from_index)
10967         (dwarf2_build_psymtabs_hard)
10968         (update_enumeration_type_from_children): Likewise.
10969         * gdb_obstack.h (auto_obstack): New type.
10970         * go-exp.y (name_obstack): Now an auto_obstack.
10971         (build_packaged_name): Use auto_obstack::clear.
10972         (go_parse): Use auto_obstack::clear instead of reinitializing and
10973         freeing the obstack.
10974         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
10975         auto_obstack.
10976         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
10977         * rust-exp.y (work_obstack): Now an auto_obstack.
10978         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
10979         reinitializing and freeing the obstack.
10980         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
10981         (host_char_to_target): Use auto_obstack.
10982         * utils.h (make_cleanup_obstack_free): Delete declaration.
10983         * valprint.c (generic_emit_char, generic_printstr): Use
10984         auto_obstack.
10985
10986 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
10987
10988         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
10989         thread.
10990         (darwin_init_thread_list): Don't update dummy thread.
10991         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
10992
10993 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
10994
10995         * record-full.c (netorder16): Remove.
10996
10997 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
10998
10999         * common/diagnostics.h: Define macros for GCC.
11000         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
11001         * common/vec.h: Include diagnostics.h.
11002         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
11003         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
11004         warning.
11005
11006 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
11007
11008         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
11009         New macro.
11010         * ada-lex.l: Ignore deprecated register warnings.
11011
11012 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
11013
11014         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
11015         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
11016
11017 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
11018
11019         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
11020         its own line.
11021
11022 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
11023
11024         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
11025
11026 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
11027
11028         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
11029         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
11030         (xtensa_register_read_masked): Likewise.
11031
11032 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
11033
11034         * common/environ.c (gdb_environ::unset): Update comment.
11035
11036 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
11037
11038         * python/py-unwind.c (pyuw_sniffer): Allocate space for
11039         registers.
11040
11041 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
11042
11043         * record-full.c (record_full_exec_insn): Use byte_vector.
11044
11045 2017-06-22  Yao Qi  <yao.qi@linaro.org>
11046
11047         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
11048         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
11049
11050 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
11051
11052         * remote.c (cached_reg): Move from here...
11053         * regcache.h (cached_reg): ...to here.
11054         * python/py-unwind.c (struct reg_info): Remove.
11055         (cached_frame_info): Use cached_reg_t.
11056         (pyuw_prev_register): Likewise.
11057         (pyuw_sniffer): Use cached_reg_t and allocate registers.
11058         (pyuw_dealloc_cache): Free all registers.
11059
11060 2017-06-22  Pedro Alves  <palves@redhat.com>
11061             Simon Marchi  <simon.marchi@ericsson.com>
11062
11063         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
11064         warning.
11065         * common/diagnostics.h: New file.
11066
11067 2017-06-22  Pedro Alves  <palves@redhat.com>
11068
11069         * common/agent.h: Add include guards.
11070
11071 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
11072
11073         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
11074         talk about addressable units instead of bytes.
11075
11076 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
11077
11078         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
11079         of '::const_iterator'.
11080
11081 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
11082
11083         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11084         'unittests/environ-selftests.c'.
11085         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
11086         * charset.c (find_charset_names): Declare object 'iconv_env'.
11087         Update code to use 'iconv_env' object.  Remove call to
11088         'free_environ'.
11089         * common/environ.c: Include <utility>.
11090         (make_environ): Delete function.
11091         (free_environ): Delete function.
11092         (gdb_environ::clear): New function.
11093         (gdb_environ::operator=): New function.
11094         (gdb_environ::get): Likewise.
11095         (environ_vector): Delete function.
11096         (set_in_environ): Delete function.
11097         (gdb_environ::set): New function.
11098         (unset_in_environ): Delete function.
11099         (gdb_environ::unset): New function.
11100         (gdb_environ::envp): Likewise.
11101         * common/environ.h: Include <vector>.
11102         (struct gdb_environ): Delete; transform into...
11103         (class gdb_environ): ... this class.
11104         (free_environ): Delete prototype.
11105         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
11106         environ_vector): Likewise.
11107         * infcmd.c (run_command_1): Update code to call
11108         'envp' from 'gdb_environ' class.
11109         (environment_info): Update code to call methods from 'gdb_environ'
11110         class.
11111         (unset_environment_command): Likewise.
11112         (path_info): Likewise.
11113         (path_command): Likewise.
11114         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
11115         (inferior::inferior): Initialize 'environment' using the host's
11116         information.
11117         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
11118         Include "environ.h".
11119         (class inferior) <environment>: Change type from 'struct
11120         gdb_environ' to 'gdb_environ'.
11121         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
11122         methods from 'gdb_environ' class.
11123         * solib.c (solib_find_1): Likewise
11124         * unittests/environ-selftests.c: New file.
11125
11126 2017-06-20  Yao Qi  <yao.qi@linaro.org>
11127
11128         * features/i386/i386-linux.xml: Exchange the order of including
11129         32bit-linux.xml and 32bit-sse.xml.
11130         * features/i386/i386-linux.c: Regenerated.
11131
11132 2017-06-20  Yao Qi  <yao.qi@linaro.org>
11133
11134         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
11135         Delete copy ctor and assignment operator.
11136         (tdesc_type): Likewise.
11137         (tdesc_feature): Likewise.
11138         (tdesc_free_reg): Remove.
11139         (tdesc_create_reg): Use new.
11140         (tdesc_free_type): Remove.
11141         (tdesc_create_vector): Use new.
11142         (tdesc_create_union): Likewise.
11143         (tdesc_create_flags): Likewise.
11144         (tdesc_create_enum): Likewise.
11145         (tdesc_free_feature): Delete.
11146         (free_target_description): Use delete.
11147
11148 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
11149
11150         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
11151         registers.
11152
11153 2017-06-19  Pedro Alves  <palves@redhat.com>
11154
11155         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
11156         after gdb::unlinker.
11157
11158 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
11159
11160         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
11161         gdb_environ to access an environment variable.
11162
11163 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
11164
11165         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
11166         gdb_byte*.
11167
11168 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
11169
11170         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
11171
11172 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
11173
11174         * configure: Re-generate.
11175         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
11176
11177 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
11178
11179         * configure: Re-generate.
11180         * warning.m4: Pass -Werror to compiler when checking for
11181         supported warning flags.
11182
11183 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
11184
11185         * Makefile.in (COMPILE.pre): Add "-x c++".
11186
11187 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
11188             Pedro Alves  <palves@redhat.com>
11189             Yao Qi  <yao.qi@linaro.org>
11190
11191         * defs.h (RequireLongest): New.
11192         (extract_integer): Declare function template.
11193         (extract_signed_integer): Remove the declaration, but define it
11194         static inline.
11195         (extract_unsigned_integer): Likewise.
11196         (store_integer): Declare function template.
11197         (store_signed_integer): Remove the declaration, but define it
11198         static inline.
11199         (store_unsigned_integer): Likewise.
11200         * findvar.c (extract_integer): New function template.
11201         (extract_signed_integer): Remove.
11202         (extract_unsigned_integer): Remove.
11203         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
11204         instantiations.
11205         (store_integer): New function template.
11206         (store_signed_integer): Remove.
11207         (store_unsigned_integer): Remove.
11208         (store_integer): Explicit instantiations.
11209         * regcache.c (regcache_raw_read_signed): Update.
11210         (regcache::raw_read): New function.
11211         (regcache::raw_read_signed): Remove.
11212         (regcache::raw_read_unsigned): Remove.
11213         (regcache_raw_read_unsigned): Update.
11214         (regcache_raw_write_unsigned): Update.
11215         (regcache::raw_write_signed): Remove.
11216         (regcache::raw_write): New function.
11217         (regcache_cooked_read_signed): Update.
11218         (regcache::raw_write_unsigned): Remove.
11219         (regcache::cooked_read_signed): Remove.
11220         (regcache_cooked_read_unsigned): Update.
11221         (regcache::cooked_read_unsigned): Remove.
11222         (regcache_cooked_write_signed): Update.
11223         (regcache_cooked_write_unsigned): Update.
11224         * regcache.h (regcache) <raw_read_signed>: Remove.
11225         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
11226         <raw_read, raw_write>: New.
11227         <cooked_read_signed, cooked_write_signed>: Remove.
11228         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
11229         <cooked_read, cooked_write>: New.
11230         * sh64-tdep.c (sh64_pseudo_register_read): Update.
11231         (sh64_pseudo_register_write): Update.
11232
11233 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
11234
11235         * arc-tdep.c (arc_disassembler_options): New variable.
11236         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
11237         of default_print_insn.
11238         (arc_delayed_print_insn): Set info->section when needed,
11239         use default_print_insn to retrieve a disassembler.
11240
11241 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
11242
11243         PR gdb/21574
11244         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
11245         to mention $SHELL and startup-with-shell.
11246
11247 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
11248
11249         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
11250
11251 2017-06-14  Yao Qi  <yao.qi@linaro.org>
11252
11253         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
11254         default_print_insn instead of print_insn_aarch64.
11255         * arm-tdep.c (gdb_print_insn_arm): Call
11256         default_print_insn instead of print_insn_big_arm
11257         and print_insn_little_arm.
11258         * i386-tdep.c (i386_print_insn): Call default_print_insn
11259         instead of print_insn_i386.
11260         * ia64-tdep.c (ia64_print_insn): Call
11261         default_print_insn instead of print_insn_ia64.
11262         * mips-tdep.c (gdb_print_insn_mips): Call
11263         default_print_insn instead of print_insn_big_mips
11264         and print_insn_little_mips.
11265         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
11266         instead of print_insn_spu.
11267
11268 2017-06-14  Pedro Alves  <palves@redhat.com>
11269
11270         * ada-lang.c: Include "common/byte-vector.h".
11271         (ada_value_primitive_packed_val): Use gdb::byte_vector.
11272         * charset.c (wchar_iterator::iterate): Resize the vector instead
11273         of reserving it.
11274         * common/byte-vector.h: Include "common/def-vector.h".
11275         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
11276         * cli/cli-dump.c: Include "common/byte-vector.h".
11277         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
11278         * common/byte-vector.h: New file.
11279         * common/def-vector.h: New file.
11280         * common/default-init-alloc.h: New file.
11281         * dwarf2loc.c: Include "common/byte-vector.h".
11282         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
11283         instead of reserving it.
11284         * dwarf2read.c: Include "common/byte-vector.h".
11285         (data_buf::m_vec): Now a gdb::byte_vector.
11286         * gdb_regex.c: Include "common/def-vector.h".
11287         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
11288         * mi/mi-main.c: Include "common/byte-vector.h".
11289         (mi_cmd_data_read_memory): Use gdb::byte_vector.
11290         * printcmd.c: Include "common/byte-vector.h".
11291         (print_scalar_formatted): Use gdb::byte_vector.
11292         * valprint.c: Include "common/byte-vector.h".
11293         (maybe_negate_by_bytes, print_decimal_chars): Use
11294         gdb::byte_vector.
11295
11296 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
11297
11298         * darwin-nat.c: Include "nat/fork-inferior.h".
11299
11300 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
11301
11302         * configure.nat: Factor out Darwin bits that are not
11303         architecture-specific.  Add fork-inferior.o.
11304
11305 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
11306
11307         * configure.nat: Factor out AIX bits that are not
11308         architecture-specific.  Add fork-inferior.o.
11309
11310 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11311
11312         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
11313         (read_pieced_value, write_pieced_value): ...here.  Reduce to
11314         wrappers that just call rw_pieced_value.
11315
11316 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11317
11318         * dwarf2loc.c (write_pieced_value): When writing the data for a
11319         memory piece, use write_memory_with_notification instead of
11320         write_memory.
11321
11322 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11323
11324         * valops.c (read_value_memory): Change embedded_offset to
11325         represent a bit offset instead of a byte offset.
11326         * value.h (read_value_memory): Adjust comment.
11327
11328 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11329
11330         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
11331         dest_offset_bits and source_offset_bits.
11332         (write_pieced_value): Likewise.
11333
11334 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11335
11336         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
11337         given by DW_OP_bit_piece.
11338         (write_pieced_value): Likewise.
11339
11340 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11341
11342         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
11343         some other preparations to the places where sufficient information
11344         is available.
11345         (write_pieced_value): Likewise.
11346
11347 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11348
11349         * dwarf2loc.c (bits_to_bytes): New function.
11350         (read_pieced_value): Fix offset calculations for register pieces
11351         on big-endian targets.
11352         (write_pieced_value): Likewise.
11353
11354 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11355
11356         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
11357         (write_pieced_value): Likewise.
11358
11359 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11360
11361         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
11362         transfer the source value's least significant bits, instead of its
11363         lowest-addressed ones.  Rename type_len to max_offset.
11364         (read_pieced_value): Mirror above changes to write_pieced_value as
11365         applicable.
11366
11367 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11368
11369         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
11370         truncate full bytes from dest_offset_bits before using it as an
11371         offset into the buffer.
11372
11373 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11374
11375         * dwarf2loc.c (write_pieced_value): Include transfer size in
11376         byte-wise check.
11377
11378 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11379
11380         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
11381         calculation of this_size.
11382
11383 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11384
11385         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
11386         when targeting a bit-field.
11387         (write_pieced_value): Likewise.
11388
11389 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11390
11391         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
11392         (allocate_piece_closure): Drop addr_size parameter.
11393         (dwarf2_evaluate_loc_desc_full): Adjust call to
11394         allocate_piece_closure.
11395
11396 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11397
11398         PR gdb/21226
11399         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
11400         the LSB end, independent of endianness.
11401
11402 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11403
11404         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
11405         size capping.
11406
11407 2017-06-13  Yao Qi  <yao.qi@linaro.org>
11408
11409         * mips-linux-nat.c: Move include features/mips*-linux.c to
11410         mips-linux-tdep.c.
11411         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
11412         to mips-linux-tdep.c.
11413         * mips-linux-tdep.c: Include features/mips*-linux.c
11414         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
11415         functions.
11416         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
11417         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
11418         (tdesc_mips64_dsp_linux): Declare.
11419
11420 2017-06-12  Tom Tromey  <tom@tromey.com>
11421
11422         * valprint.h (val_print_type_code_int): Remove.
11423         * valprint.c (generic_val_print_int): Always call
11424         val_print_scalar_formatted.
11425         (val_print_type_code_int): Remove.
11426         * printcmd.c (print_scalar_formatted): Handle options->format==0.
11427         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
11428         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
11429         * ada-valprint.c (ada_val_print_num): Use
11430         val_print_scalar_formatted.
11431
11432 2017-06-12  Tom Tromey  <tom@tromey.com>
11433
11434         * printcmd.c (print_scalar_formatted): Unify the two switches.
11435         Don't convert scalars to LONGEST.
11436
11437 2017-06-12  Tom Tromey  <tom@tromey.com>
11438
11439         PR exp/16225:
11440         * valprint.h (print_decimal_chars): Update.
11441         * valprint.c (maybe_negate_by_bytes): New function.
11442         (print_decimal_chars): Add "is_signed" argument.
11443         * printcmd.c (print_scalar_formatted): Update.
11444
11445 2017-06-12  Tom Tromey  <tom@tromey.com>
11446
11447         PR exp/16225:
11448         * valprint.h (print_binary_chars, print_hex_chars): Update.
11449         * valprint.c (val_print_type_code_int): Update.
11450         (print_binary_chars): Add "zero_pad" argument.
11451         (emit_octal_digit): New function.
11452         (print_octal_chars): Don't zero-pad.
11453         (print_decimal_chars): Likewise.
11454         (print_hex_chars): Add "zero_pad" argument.
11455         * sh64-tdep.c (sh64_do_fp_register): Update.
11456         * regcache.c (regcache::dump): Update.
11457         * printcmd.c (print_scalar_formatted): Update.
11458         * infcmd.c (default_print_one_register_info): Update.
11459
11460 2017-06-12  Pedro Alves  <palves@redhat.com>
11461             Alan Hayward  <alan.hayward@arm.com>
11462
11463         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
11464         (mips_eabi_push_dummy_call): Rename local 'regsize' to
11465         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
11466         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
11467         Assert that abi_regsize bytes fit in 'ref_valbuf'.
11468
11469 2017-06-12  Pedro Alves  <palves@redhat.com>
11470
11471         * dwarf2read.c (mapped_symtab::data): Now a vector of
11472         symtab_index_entry instead of vector of
11473         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
11474         whether an element's name is NULL instead of checking whether the
11475         element itself is NULL.
11476         (find_slot): Change return type.  Adjust.
11477         (hash_expand, , add_index_entry, uniquify_cu_indices)
11478         (write_hash_table): Adjust.
11479
11480 2017-06-12  Pedro Alves  <palves@redhat.com>
11481
11482         * dwarf2read.c (recursively_count_psymbols): New function.
11483         (write_psymtabs_to_index): Call it to compute number of psyms and
11484         pass estimate size of psyms_seen to unordered_set's ctor.
11485
11486 2017-06-12  Pedro Alves  <palves@redhat.com>
11487
11488         * dwarf2read.c (write_hash_table): Check if key already exists
11489         before emplacing.
11490
11491 2017-06-12  Pedro Alves  <palves@redhat.com>
11492
11493         * dwarf2read.c (data_buf::append_space): Rename to...
11494         (data_buf::grow): ... this, and make private.  Adjust all callers.
11495         (data_buf::append_uint): New method.
11496         (add_address_entry, write_one_signatured_type)
11497         (write_psymtabs_to_index): Use it.
11498
11499 2017-06-12  Pedro Alves  <palves@redhat.com>
11500
11501         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
11502         (file_write (FILE *, const std::vector<Elem>&)): Delete.
11503         (data_buf::file_write): Call ::fwrite directly.
11504
11505 2017-06-12  Pedro Alves  <palves@redhat.com>
11506
11507         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
11508         std::vector::erase.
11509
11510 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
11511
11512         Code cleanup: C++ify .gdb_index producer.
11513         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
11514         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
11515         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
11516         (create_strtab, add_string): Remove.
11517         (file_write, data_buf): New.
11518         (struct symtab_index_entry): Use std::vector for cu_indices.
11519         (struct mapped_symtab): Use std::vector for data.
11520         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
11521         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
11522         Remove.
11523         (find_slot): Change return type.  Update it to the new data structures.
11524         (hash_expand, add_index_entry): Update it to the new data structures.
11525         (offset_type_compare): Remove.
11526         (uniquify_cu_indices): Update it to the new data structures.
11527         (c_str_view, c_str_view_hasher, vector_hasher): New.
11528         (add_indices_to_cpool): Remove.
11529         (write_hash_table): Update it to the new data structures.
11530         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
11531         (eq_psymtab_cu_index): Remove.
11532         (psym_index_map): New typedef.
11533         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
11534         reference and std::unordered_map for cu_index_htab.
11535         (add_address_entry, add_address_entry_worker, write_address_map)
11536         (write_psymbols): Update it to the new data structures.
11537         (write_obstack): Remove.
11538         (struct signatured_type_index_data): Change types_list to a data_buf
11539         reference and psyms_seen to a std::unordered_set reference.
11540         (write_one_signatured_type, recursively_write_psymbols)
11541         (write_psymtabs_to_index): Update it to the new data structures.
11542
11543 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
11544
11545         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
11546         separate-debug-file commands.
11547         * symfile.h (separate_debug_file_debug): New global.
11548         * symfile.c (separate_debug_file_debug): New global.
11549         (separate_debug_file_exists, find_separate_debug_file): Add
11550         debug output.
11551         (_initialize_symfile): Add "set debug separate-debug-file"
11552         command.
11553         * build-id.c (build_id_to_debug_bfd,
11554         find_separate_debug_file_by_buildid): Add debug output.
11555
11556 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
11557
11558         * gdbarch.sh (displaced_step_free_closure): Remove.
11559         * gdbarch.h, gdbarch.c: Re-generate.
11560         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
11561         displaced_step_free_closure.
11562         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
11563         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
11564         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
11565         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11566         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
11567         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11568         * arch-utils.h (simple_displaced_step_free_closure): Remove.
11569         * arch-utils.c (simple_displaced_step_free_closure): Remove.
11570         * infrun.c (displaced_step_clear): Call xfree instead of
11571         gdbarch_displaced_step_free_closure.
11572
11573 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
11574
11575         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
11576         NULL".
11577
11578 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
11579
11580         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
11581         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
11582         (mn10300_push_dummy_call): Likewise.
11583
11584 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
11585
11586         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
11587
11588 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
11589
11590         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
11591
11592 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
11593
11594         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
11595         able to start inferiors using a shell.
11596         (New remote packets): Announce new packet "QStartupWithShell".
11597         * remote.c: Add PACKET_QStartupWithShell.
11598         (extended_remote_create_inferior): Handle new
11599         PACKET_QStartupWithShell.
11600         (remote_protocol_features) <QStartupWithShell>: New entry for
11601         PACKET_QStartupWithShell.
11602         (_initialize_remote): Call "add_packet_config_cmd" for
11603         QStartupShell.
11604
11605 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
11606             Pedro Alves  <palves@redhat.com>
11607
11608         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
11609         and "nat/fork-inferior.h".
11610         * common/common-inferior.h: New file, with contents from
11611         "gdb/inferior.h".
11612         * commom/common-utils.c: Include "common-utils.h".
11613         (stringify_argv): New function.
11614         * common/common-utils.h (stringify_argv): New prototype.
11615         * configure.nat: Add "fork-inferior.o" as a dependency for
11616         "*linux*", "fbsd*" and "nbsd*" hosts.
11617         * corefile.c (get_exec_file): Update comment.
11618         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
11619         instead of "startup_inferior".
11620         (darwin_create_inferior): Call "add_thread_silent" after
11621         "fork_inferior".
11622         * fork-child.c: Cleanup unnecessary includes.
11623         (SHELL_FILE): Move to "common/common-fork-child.c".
11624         (environ): Likewise.
11625         (exec_wrapper): Initialize.
11626         (get_exec_wrapper): New function.
11627         (breakup_args): Move to "common/common-fork-child.c"; rename to
11628         "breakup_args_for_exec".
11629         (escape_bang_in_quoted_argument): Move to
11630         "common/common-fork-child.c".
11631         (saved_ui): New variable.
11632         (prefork_hook): New function.
11633         (postfork_hook): Likewise.
11634         (postfork_child_hook): Likewise.
11635         (gdb_startup_inferior): Likewise.
11636         (fork_inferior): Move to "common/common-fork-child.c".  Update
11637         function to support gdbserver.
11638         (startup_inferior): Likewise.
11639         * gdbcore.h (get_exec_file): Remove declaration.
11640         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
11641         instead of "startup_inferior".  Call "add_thread_silent" after
11642         "fork_inferior".
11643         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
11644         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
11645         instead of "startup_inferior".  Call "add_thread_silent" after
11646         "fork_inferior".
11647         * inferior.h: Include "common-inferior.h".
11648         (trace_start_error): Move to "common/common-utils.h".
11649         (trace_start_error_with_name): Likewise.
11650         (fork_inferior): Move prototype to "nat/fork-inferior.h".
11651         (startup_inferior): Likewise.
11652         (gdb_startup_inferior): New prototype.
11653         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
11654         * nat/fork-inferior.h: New file.
11655         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
11656         instead of "startup_inferior".  Call "add_thread_silent" after
11657         "fork_inferior".
11658         * target.h (target_terminal_init): Move prototype to
11659         "target/target.h".
11660         (target_terminal_inferior): Likewise.
11661         (target_terminal_ours): Likewise.
11662         * target/target.h (target_terminal_init): New prototype, moved
11663         from "target.h".
11664         (target_terminal_inferior): Likewise.
11665         (target_terminal_ours): Likewise.
11666         * utils.c (gdb_flush_out_err): New function.
11667
11668 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
11669
11670         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
11671         * common/common-gdbthread.h: New file, with parts from
11672         "gdb/gdbthread.h".
11673         * gdbthread.h: Include "common-gdbthread.h".
11674         (switch_to_thread): Moved to "common/common-gdbthread.h".
11675
11676 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
11677
11678         * Makefile.in (SFILES): Add "common/job-control.c".
11679         (HFILES_NO_SRCDIR): Add "common/job-control.h".
11680         (COMMON_OBS): Add "job-control.o".
11681         * common/job-control.c: New file, with contents from
11682         "gdb/inflow.c".
11683         * common/job-control.h: New file, with contents from "terminal.h".
11684         * fork-child.c: Include "job-control.h".
11685         * inflow.c: Include "job-control.h".
11686         (gdb_setpgid): Move to "common/common-inflow.c".
11687         (_initialize_inflow): Move setting of "job_control" to
11688         "handle_job_control".
11689         * terminal.h (job_control): Moved to "common/common-terminal.h".
11690         (gdb_setpgid): Likewise.
11691         * top.c: Include "job_control.h".
11692         * utils.c: Likewise.
11693         (job_control): Moved to "job-control.c".
11694
11695 2017-06-07  Pedro Alves  <palves@redhat.com>
11696
11697         * Makefile.in (SFILES): Add gdb_regex.c.
11698         (COMMON_OBS): Add gdb_regex.o.
11699         * ada-lang.c (ada_add_standard_exceptions)
11700         (ada_add_exceptions_from_frame, name_matches_regex)
11701         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
11702         parameter type to compiled_regex.  Adjust.
11703         (ada_exceptions_list): Use compiled_regex.
11704         * break-catch-throw.c (exception_catchpoint::pattern): Now a
11705         std::unique_ptr<compiled_regex>.
11706         (exception_catchpoint::~exception_catchpoint): Remove regfree
11707         call.
11708         (check_status_exception_catchpoint): Adjust to use compiled_regex.
11709         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
11710         * breakpoint.c (solib_catchpoint::compiled): Now a
11711         std::unique_ptr<compiled_regex>.
11712         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
11713         (check_status_catch_solib): Adjust to use compiled_regex.
11714         (add_solib_catchpoint): Adjust to use compiled_regex.
11715         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
11716         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
11717         compiled_regex reference.  Adjust to use it.
11718         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
11719         declaration.  Include "gdb_regex.h".
11720         (apropos_cmd): Change regex parameter to compiled_regex reference.
11721         * gdb_regex.c: New file.
11722         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
11723         declarations.
11724         (class compiled_regex): New.
11725         * linux-tdep.c: Include "common/gdb_optional.h".
11726         (struct mapping_regexes): New, factored out from
11727         mapping_is_anonymous_p, and adjusted to use compiled_regex.
11728         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
11729         gdb::optional and remove cleanups.  Adjust to compiled_regex.
11730         * probe.c: Include "common/gdb_optional.h".
11731         (collect_probes): Use compiled_regex and gdb::optional and remove
11732         cleanups.
11733         * skip.c: Include "common/gdb_optional.h".
11734         (skiplist_entry::compiled_function_regexp): Now a
11735         gdb::optional<compiled_regex>.
11736         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
11737         (free_skiplist_entry): Remove regfree call.
11738         (compile_skip_regexp, skip_rfunction_p): Adjust to use
11739         compiled_regex and gdb::optional.
11740         * symtab.c: Include "common/gdb_optional.h".
11741         (search_symbols): Use compiled_regex and gdb::optional.
11742         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
11743         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
11744         to gdb_regex.c.
11745
11746 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
11747
11748         * regcache.c (regcache::save): Avoid buffer use.
11749         (regcache::dump): Likewise.
11750
11751 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
11752
11753         * sh-tdep.c (sh_pseudo_register_read): Remove
11754         MAX_REGISTER_SIZE.
11755         (sh_pseudo_register_write): Likewise.
11756         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
11757         (sh64_pseudo_register_write): Likewise
11758
11759 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
11760
11761         * aarch64-tdep.c (aarch64_store_return_value): Use
11762         V_REGISTER_SIZE.
11763         (aarch64_pseudo_read_value): Likewise.
11764         (aarch64_pseudo_write): Likewise.
11765
11766 2017-06-06  Yao Qi  <yao.qi@linaro.org>
11767
11768         * regformats/regdef.h (set_register_cache): Remove the
11769         declaration.
11770
11771 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
11772
11773         * frame.c (frame_unwind_register_signed): Use
11774         frame_unwind_register_value.
11775
11776 2017-06-06  Pedro Alves  <palves@redhat.com>
11777
11778         PR breakpoints/21553
11779         * breakpoint.c (create_breakpoints_sal_default)
11780         (init_breakpoint_sal, create_breakpoint_sal): Use
11781         gdb::unique_xmalloc_ptr for string parameters.
11782         (create_breakpoint): Constify 'extra_string' and 'cond_string'
11783         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
11784         (base_breakpoint_create_breakpoints_sal)
11785         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
11786         (strace_marker_create_breakpoints_sal)
11787         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
11788         string parameters.
11789         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
11790         gdb::unique_xmalloc_ptr for string parameters.
11791         (create_breakpoint): Constify 'extra_string' and 'cond_string'
11792         parameters.
11793
11794 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
11795
11796         * alpha-tdep.c (alpha_register_to_value): Use
11797         get_frame_register_value.
11798         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
11799
11800 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
11801
11802         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
11803         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
11804         (ia64_value_to_register): Likewise.
11805         (ia64_extract_return_value): Likewise.
11806         (ia64_store_return_value): Likewise.
11807         (ia64_push_dummy_call): Likewise.
11808
11809 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
11810
11811         GDB 8.0 released.
11812
11813 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
11814
11815         * x86-linux-nat.c (struct arch_lwp_info): Remove.
11816
11817 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
11818
11819         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
11820         parameter.
11821         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
11822
11823 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
11824
11825         * event-loop.c (poll_timers): Unallocate timer using delete
11826         instead of xfree.
11827
11828 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
11829
11830         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
11831         (struct breakpoint) <~breakpoint>: New.
11832         (struct watchpoint): Inherit from breakpoint.
11833         <~watchpoint>: New.
11834         <base>: Remove.
11835         (struct tracepoint): Inherit from breakpoint.
11836         <base>: Remove.
11837         * breakpoint.c (longjmp_breakpoint_ops): Remove.
11838         (struct longjmp_breakpoint): Inherit from breakpoint.
11839         <~longjmp_breakpoint>: New.
11840         <base>: Remove.
11841         (new_breakpoint_from_type): Remove casts.
11842         (watchpoint_in_thread_scope): Remove reference to base field.
11843         (watchpoint_del_at_next_stop): Likewise.
11844         (update_watchpoint): Likewise.
11845         (watchpoint_check): Likewise.
11846         (bpstat_check_watchpoint): Likewise.
11847         (set_longjmp_breakpoint): Likewise.
11848         (struct fork_catchpoint): Inherit from breakpoint.
11849         <base>: Remove.
11850         (struct solib_catchpoint): Inherit from breakpoint.
11851         <~solib_catchpoint>: New.
11852         <base>: Remove.
11853         (dtor_catch_solib): Change to ...
11854         (solib_catchpoint::~solib_catchpoint): ... this.
11855         (breakpoint_hit_catch_solib): Remove reference to base field.
11856         (add_solib_catchpoint): Likewise.
11857         (create_fork_vfork_event_catchpoint): Likewise.
11858         (struct exec_catchpoint): Inherit from breakpoint.
11859         <~exec_catchpoint>: New.
11860         <base>: Remove.
11861         (dtor_catch_exec): Change to ...
11862         (exec_catchpoint::~exec_catchpoint): ... this.
11863         (dtor_watchpoint): Change to ...
11864         (watchpoint::~watchpoint): ... this.
11865         (watch_command_1): Remove reference to base field.
11866         (catch_exec_command_1): Likewise.
11867         (base_breakpoint_dtor): Change to ...
11868         (breakpoint::~breakpoint): ... this.
11869         (base_breakpoint_ops): Remove dtor field value.
11870         (longjmp_bkpt_dtor): Change to ...
11871         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
11872         (strace_marker_create_breakpoints_sal): Remove reference to base
11873         field.
11874         (delete_breakpoint): Don't manually call breakpoint destructor.
11875         (create_tracepoint_from_upload): Remove reference to base field.
11876         (trace_pass_set_count): Likewise.
11877         (initialize_breakpoint_ops): Don't initialize
11878         momentary_breakpoint_ops, don't set dtors.
11879         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
11880         <~ada_catchpoint>: New.
11881         <base>: Remove.
11882         (create_excep_cond_exprs): Remove reference to base field.
11883         (dtor_exception): Change to ...
11884         (ada_catchpoint::~ada_catchpoint): ... this.
11885         (dtor_catch_exception): Remove.
11886         (dtor_catch_exception_unhandled): Remove.
11887         (dtor_catch_assert): Remove.
11888         (create_ada_exception_catchpoint): Remove reference to base
11889         field.
11890         (initialize_ada_catchpoint_ops): Don't set dtors.
11891         * break-catch-sig.c (struct signal_catchpoint): Inherit from
11892         breakpoint.
11893         <~signal_catchpoint>: New.
11894         <base>: Remove.
11895         (signal_catchpoint_dtor): Change to ...
11896         (signal_catchpoint::~signal_catchpoint): ... this.
11897         (create_signal_catchpoint): Remove reference to base field.
11898         (initialize_signal_catchpoint_ops): Don't set dtor.
11899         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
11900         from breakpoint.
11901         <~syscall_catchpoint>: New.
11902         <base>: Remove.
11903         (dtor_catch_syscall): Change to ...
11904         (syscall_catchpoint::~syscall_catchpoint): ... this.
11905         (create_syscall_event_catchpoint): Remove reference to base
11906         field.
11907         (initialize_syscall_catchpoint_ops): Don't set dtor.
11908         * break-catch-throw.c (struct exception_catchpoint): Inherit
11909         from breakpoint.
11910         <~exception_catchpoint>: New.
11911         <base>: Remove.
11912         (dtor_exception_catchpoint): Change to ...
11913         (exception_catchpoint::~exception_catchpoint): ... this.
11914         (handle_gnu_v3_exceptions): Remove reference to base field.
11915         (initialize_throw_catchpoint_ops): Don't set dtor.
11916         * ctf.c (ctf_get_traceframe_address): Remove reference to base
11917         field.
11918         * remote.c (remote_get_tracepoint_status): Likewise.
11919         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
11920         * tracefile.c (tracefile_fetch_registers): Likewise.
11921         * tracepoint.c (actions_command): Likewise.
11922         (validate_actionline): Likewise.
11923         (tfind_1): Likewise.
11924         (get_traceframe_location): Likewise.
11925         (find_matching_tracepoint_location): Likewise.
11926         (parse_tracepoint_status): Likewise.
11927         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
11928
11929 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
11930
11931         * breakpoint.c (struct longjmp_breakpoint): New struct.
11932         (is_tracepoint_type): Change return type to bool.
11933         (is_longjmp_type): New function.
11934         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
11935         (set_raw_breakpoint_without_location): Use
11936         new_breakpoint_from_type.
11937         (set_raw_breakpoint): Likewise.
11938
11939 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
11940
11941         * breakpoint.c (new_breakpoint_from_type): New function.
11942         (create_breakpoint_sal): Use new_breakpoint_from_type and
11943         unique_ptr.
11944         (create_breakpoint): Likewise.
11945
11946 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
11947
11948         * memattr.c (mem_info_command): Rename to ...
11949         (info_mem_command): ... this.
11950         (mem_enable_command): Rename to ...
11951         (enable_mem_command): ... this.
11952         (mem_disable_command): Rename to ...
11953         (disable_mem_command): ... this.
11954         (mem_delete_command): Rename to ...
11955         (delete_mem_command): ... this.
11956         (_initialize_mem): Adjust function names.
11957
11958 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
11959
11960         * btrace.c (handle_pt_insn_events): New.
11961         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
11962         STATUS.  Split into this and ...
11963         (handle_pt_insn_event_flags): ... this.
11964
11965 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
11966
11967         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
11968         and struct pt_insn.resynced.
11969         * configure: Regenerated.
11970         * config.in: Regenerated.
11971
11972 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11973
11974         * btrace.c (ftrace_find_call_by_number): New function.
11975         (ftrace_new_function): Store objects, not pointers.
11976         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
11977         ftrace_new_gap, ftrace_update_function,
11978         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
11979         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
11980         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
11981         btrace_ends_with_single_insn, btrace_call_get): Account for
11982         btrace_thread_info::functions now storing objects.
11983         * btrace.h (struct btrace_thread_info): Add constructor.
11984         (struct btrace_thread_info) <functions>: Make std::vector.
11985         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
11986         Initialize with default values.
11987         * record-btrace.c (record_btrace_frame_sniffer): Account for
11988         btrace_thread_info::functions now storing objects.
11989
11990 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11991
11992         * btrace.c: Remove typedef bfun_s.
11993         (ftrace_new_gap): Directly add gaps to the list of gaps.
11994         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
11995         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
11996         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
11997         instead of gdb VEC.
11998
11999 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
12000
12001         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
12002         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
12003         with btrace_thread_info::next_segment and
12004         btrace_thread_info::prev_segment.
12005         * btrace.h: Remove struct btrace_func_link.
12006         (struct btrace_function): Replace pair of function segment pointers
12007         with pair of indices.
12008         * python/py-record-btrace.c (btpy_call_prev_sibling,
12009         btpy_call_next_sibling): Replace references to
12010         btrace_thread_info::segment with btrace_thread_info::next_segment and
12011         btrace_thread_info::prev_segment.
12012         * record-btrace.c (record_btrace_frame_this_id): Use
12013         btrace_find_call_by_number.
12014
12015 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
12016
12017         * btrace.c (ftrace_new_function, ftrace_fixup_level,
12018         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
12019         btrace_insn_next, btrace_insn_prev): Remove references to
12020         btrace_thread_info::flow.
12021         * btrace.h (struct btrace_function): Remove FLOW.
12022
12023 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
12024
12025         * btrace.c (ftrace_find_call_by_number): New function.
12026         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
12027         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
12028         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
12029         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
12030         index.
12031         * btrace.h (struct btrace_function): Turn UP into an index.
12032         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
12033         as an index.
12034         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
12035         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
12036         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
12037
12038 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
12039
12040         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
12041         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
12042         ftrace_update_function, ftrace_compute_global_level_offset,
12043         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
12044         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
12045         btrace_insn_end, btrace_is_empty): Remove references to
12046         btrace_thread_info::begin and btrace_thread_info::end.
12047         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
12048         (struct btrace_thread_info) <functions>: Adjust comment.
12049         * record-btrace.c (record_btrace_start_replaying): Remove reference to
12050         btrace_thread_info::begin.
12051
12052 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
12053
12054         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
12055         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
12056         ftrace_update_function): Remove arguments that implicitly were always
12057         BTINFO->END.
12058         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
12059         Don't pass BTINFO->END.
12060
12061 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
12062
12063         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
12064         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
12065         btrace_find_insn_by_number): Replace function segment pointer with
12066         index.
12067         (btrace_insn_cmp): Simplify.
12068         * btrace.h: (struct btrace_insn_iterator) Rename index to
12069         insn_index.  Replace function segment pointer with index into function
12070         segment vector.
12071         * record-btrace.c (record_btrace_call_history): Replace function
12072         segment pointer use with index.
12073         (record_btrace_frame_sniffer): Retrieve function call segment through
12074         vector.
12075         (record_btrace_set_replay): Remove defunc't safety check.
12076
12077 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
12078
12079         * btrace.c (btrace_ends_with_single_insn): New function.
12080         (btrace_call_get, btrace_call_number, btrace_call_begin,
12081         btrace_call_end, btrace_call_next, btrace_call_prev,
12082         btrace_find_call_by_number): Use index into call segment vector
12083         instead of pointer.
12084         (btrace_call_cmp): Simplify.
12085         * btrace.h (struct btrace_call_iterator): Replace function call segment
12086         pointer with index into vector.
12087         * record-btrace.c (record_btrace_call_history): Use index instead of
12088         pointer.
12089
12090 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
12091
12092         * btrace.c (btrace_insn_begin, btrace_insn_end,
12093         btrace_find_insn_by_number): Add btinfo to iterator.
12094         * btrace.h (struct btrace_insn_iterator): Add btinfo.
12095
12096 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
12097
12098         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
12099         and save pointers directly.
12100         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
12101         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
12102         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
12103         changed signature of functions.
12104         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
12105         (btrace_fetch): Remove code that adds btrace_function pointers to
12106         vector of btrace_functions.
12107         (btrace_clear): Simplify freeing vector of btrace_functions.
12108
12109 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
12110
12111         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
12112         Replace VEC_* with std::vector functions.
12113         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
12114         (struct btrace_thread_info)<functions>: Change type to std::vector.
12115
12116 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
12117
12118         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
12119         "Removed targets and native configurations" up.  Merge duplicate
12120         "New commands" sub-sections.  Add "New options" sub-sections.
12121
12122 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
12123
12124         * defs.h (copy_integer_to_size): New declaration.
12125         * findvar.c (copy_integer_to_size): New function.
12126         (do_cint_test): New selftest function.
12127         (copy_integer_to_size_test): Likewise.
12128         (_initialize_findvar): Likewise.
12129         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
12130         (mips_fbsd_collect_reg): Use raw_collect_integer.
12131         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
12132         (mips64_fill_gregset): Use raw_collect_integer
12133         (mips64_fill_fpregset): Use raw_supply_integer.
12134         * regcache.c (regcache::raw_supply_integer): New function.
12135         (regcache::raw_collect_integer): Likewise.
12136         * regcache.h: (regcache::raw_supply_integer): New declaration.
12137         (regcache::raw_collect_integer): Likewise.
12138
12139 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12140
12141         * Makefile.in (SFILES): Add gdbarch-selftests.c.
12142         (COMMON_OBS): Add gdbarch-selftests.o.
12143         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
12144         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
12145         * gdbarch-selftests.c: New file.
12146         * regcache.h (regcache) <~regcache>: Mark it virtual if
12147         GDB_SELF_TEST.
12148         <raw_write>: Likewise.
12149
12150 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12151
12152         * regcache.c (current_regcache): Change it to
12153         regcache::current_regcache.
12154         (regcache_observer_target_changed): Update.
12155         (regcache_thread_ptid_changed): Make it a regcache static
12156         method.
12157         (regcache_thread_ptid_changed): Update.
12158         (class regcache_access): New.
12159         (current_regcache_test): Update.
12160         (_initialize_regcache): Update.
12161         * regcache.h: Include forward_list.
12162         (regcache): Declare regcache_thread_ptid_changed and declare
12163         registers_changed_ptid as friend.
12164
12165 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12166
12167         * i387-tdep.c (i387_register_to_value): Use register_size
12168         instead of TYPE_LENGTH.
12169         * m68k-tdep.c (m68k_register_to_value): Likewise.
12170
12171 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12172
12173         * i387-tdep.c (i387_convert_register_p): Return false if type
12174         code isn't TYPE_CODE_FLT.
12175
12176 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12177
12178         * alpha-tdep.c (alpha_convert_register_p): Return true if type
12179         length is 4.
12180         (alpha_register_to_value): Remove type length check.
12181         (alpha_value_to_register): Likewise.
12182
12183 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12184
12185         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
12186         TYPE_CODE_FLT.
12187
12188 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12189
12190         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
12191         TYPE_CODE_FLT or not.
12192
12193 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12194
12195         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
12196         * avr-tdep.c (avr_gdbarch_init): Likewise.
12197         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12198         * cris-tdep.c (cris_gdbarch_init): Likewise.
12199         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12200         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12201         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12202         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
12203         * mep-tdep.c (mep_gdbarch_init): Likewise.
12204         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12205         * mips-tdep.c (mips_gdbarch_init): Likewise.
12206         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12207         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12208         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12209         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12210         * v850-tdep.c (v850_gdbarch_init): Likewise.
12211
12212 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12213
12214         * selftest-arch.c (tests_with_arch): Call registers_changed
12215         and reinit_frame_cache.
12216         * selftest.c (run_self_tests): Likewise.
12217
12218 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12219
12220         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
12221         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
12222
12223 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12224
12225         * rl78-tdep.c (rl78_gdbarch_init): Don't call
12226         set_gdbarch_print_insn.
12227
12228 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12229
12230         * h8300-tdep.c (h8300_gdbarch_init): Don't call
12231         set_gdbarch_print_insn.
12232
12233 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12234
12235         * alpha-tdep.c (alpha_gdbarch_init): Don't call
12236         set_gdbarch_print_insn.
12237         * arc-tdep.c (arc_gdbarch_init): Likewise.
12238         * arch-utils.c: include dis-asm.h.
12239         (default_print_insn): New function.
12240         * arch-utils.h (default_print_insn): Declare.
12241         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
12242         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12243         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
12244         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
12245         * frv-tdep.c (frv_gdbarch_init): Likewise.
12246         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12247         * gdbarch.sh (print_insn): Use default_print_insn.
12248         * gdbarch.c: Regenerated.
12249         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
12250         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
12251         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12252         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
12253         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12254         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
12255         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
12256         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
12257         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
12258         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12259         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12260         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12261         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12262         * mt-tdep.c (mt_gdbarch_init): Likewise.
12263         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12264         * nios2-tdep.c (nios2_print_insn): Remove.
12265         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
12266         * rx-tdep.c (rx_gdbarch_init): Likewise.
12267         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
12268         * score-tdep.c (score_print_insn): Remove.
12269         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
12270         * sh-tdep.c (sh_gdbarch_init): Likewise.
12271         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12272         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12273         * tic6x-tdep.c (tic6x_print_insn): Remove.
12274         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
12275         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
12276         * v850-tdep.c (v850_gdbarch_init): Likewise.
12277         * vax-tdep.c (vax_gdbarch_init): Likewise.
12278         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12279         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
12280
12281 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
12282
12283         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
12284         (MIPS_FP0_REGNUM): Remove.
12285         (MIPS_FSR_REGNUM): Remove.
12286         (mips_fbsd_supply_fpregs): Use mips_regnum.
12287         (mips_fbsd_supply_gregs): Likewise.
12288         (mips_fbsd_collect_fpregs): Likewise.
12289         (mips_fbsd_collect_gregs): Likewise.
12290
12291 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
12292
12293         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
12294         (getpfpregs_supplies): New function.
12295         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
12296         getfpregs_supplies.
12297         (mips_fbsd_store_inferior_registers): Likewise.
12298
12299 2017-05-22  Pedro Alves <palves@redhat.com>
12300
12301         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
12302         maintainer.
12303
12304 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
12305
12306         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
12307         (store_register): Likewise.
12308         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
12309         (get_decimal_float_return_value): Likewise.
12310         (do_ppc_sysv_return_value): Likewise.
12311         (ppc64_sysv_abi_push_integer): Likewise.
12312         (ppc64_sysv_abi_push_freg): Likewise.
12313         (ppc64_sysv_abi_return_value_base): Likewise.
12314         (ppc64_sysv_abi_return_value): Likewise.
12315         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
12316         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
12317         * rs6000-nat.c: Likewise.
12318         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
12319         (rs6000_value_to_register): Likewise.
12320         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
12321
12322 2017-05-21  Tom Tromey  <tom@tromey.com>
12323
12324         PR rust/21466:
12325         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
12326         arrays as "[T]", not "[T; ]".
12327
12328 2017-05-19  Tom Tromey  <tom@tromey.com>
12329
12330         PR rust/21484:
12331         * rust-lang.c (exp_descriptor_rust): New function.
12332         (rust_language_defn): Use it.
12333         * p-lang.c (pascal_language_defn): Update.
12334         * opencl-lang.c (opencl_language_defn): Update.
12335         * objc-lang.c (objc_language_defn): Update.
12336         * m2-lang.c (m2_language_defn): Update.
12337         * language.h (struct language_defn)
12338         <la_watch_location_expression>: New member.
12339         * language.c (unknown_language_defn, auto_language_defn)
12340         (local_language_defn): Update.
12341         * go-lang.c (go_language_defn): Update.
12342         * f-lang.c (f_language_defn): Update.
12343         * d-lang.c (d_language_defn): Update.
12344         * c-lang.h (c_watch_location_expression): Declare.
12345         * c-lang.c (c_watch_location_expression): New function.
12346         (c_language_defn, cplus_language_defn, asm_language_defn)
12347         (minimal_language_defn): Use it.
12348         * breakpoint.c (watch_command_1): Call
12349         la_watch_location_expression.
12350         * ada-lang.c (ada_language_defn): Update.
12351
12352 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12353
12354         PR tui/21482
12355         * gdb_curses.h (NOMACROS): Define.
12356         (NCURSES_NOMACROS): Define.
12357
12358 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12359
12360         PR tui/21482
12361         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
12362         arg to char *.
12363         * tui/tui-wingeneral.c (box_win): Likewise.
12364         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
12365         (tui_show_source_line): Likewise.
12366         (tui_show_exec_info_content): Likewise.
12367
12368 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
12369
12370         * sparc-tdep.c (sparc_structure_return_p)
12371         (sparc_arg_on_registers_p): New functions.
12372         (sparc32_store_arguments): Use them.
12373         * sparc64-tdep.c (sparc64_16_byte_align_p)
12374         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
12375         Handle TYPE_CODE_ARRAY.
12376
12377 2017-05-17  Yao Qi  <yao.qi@linaro.org>
12378
12379         * cli/cli-decode.c (add_alias_cmd): New function.
12380         * command.h (add_alias_cmd): Declare.
12381         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
12382         instead call add_alias_cmd.
12383
12384 2017-05-17  Pedro Alves  <palves@redhat.com>
12385
12386         * Makefile.in (nat_extra_makefile_frag): Rename to ...
12387         (nat_makefile_frag): ... this.  All references updated.
12388         * configure.ac: Likewise.
12389         * configure.nat: Likewise.  Enhance comments.
12390         * configure: Regenerate.
12391
12392 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12393
12394         * procfs.c (procfs_create_inferior): Change prototype to match
12395         definition.
12396
12397 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
12398
12399         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
12400         C++ compiler warning.
12401
12402 2017-05-12  Tom Tromey  <tom@tromey.com>
12403
12404         PR rust/21483:
12405         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
12406         recurse, just call value_struct_elt directly.
12407
12408 2017-05-12  Tom Tromey  <tom@tromey.com>
12409
12410         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
12411         OP_RUST_ARRAY>: Fix.
12412
12413 2017-05-12  Tom Tromey  <tom@tromey.com>
12414
12415         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
12416
12417 2017-05-09  Yao Qi  <yao.qi@linaro.org>
12418
12419         * regcache.c: Include <forward_list>.
12420         (struct regcache_list): Remove.
12421         (current_regcache): Update.
12422         (get_thread_arch_aspace_regcache): Update for std::forward_list.
12423         (regcache_thread_ptid_changed): Likewise.
12424         (registers_changed_ptid): Likewise.
12425         (current_regcache_size): Likewise.
12426
12427 2017-05-09  Yao Qi  <yao.qi@linaro.org>
12428
12429         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
12430         (current_regcache_size): New function.
12431         (current_regcache_test): New function.
12432         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
12433
12434 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
12435
12436         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
12437         (print_gp_register_row): Use get_frame_register_value.
12438
12439 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
12440
12441         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
12442         (mips_supply_fpregset): Likewise.
12443         (mips64_supply_gregset): Likewise.
12444
12445 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
12446
12447         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
12448         regcache->raw_supply_zeroed.
12449
12450 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
12451
12452         * configure.nat: Rearrange 'case' statements to match
12453         host before cpu.
12454
12455 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
12456
12457         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
12458         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
12459         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
12460         "@nat_extra_makefile_frag@".
12461         (Makefile): Remove dependency on "@frags@".
12462         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
12463         (data-directory/Makefile): Likewise.
12464         * config/aarch64/linux.mh: Deleted; moved contents to
12465         "gdb/configure.nat".
12466         * config/alpha/alpha-linux.mh: Likewise.
12467         * config/alpha/nbsd.mh: Likewise.
12468         * config/arm/linux.mh: Likewise.
12469         * config/arm/nbsdelf.mh: Likewise.
12470         * config/i386/cygwin.mh: Likewise.
12471         * config/i386/cygwin64.mh: Likewise.
12472         * config/i386/darwin.mh: Likewise.
12473         * config/i386/fbsd.mh: Likewise.
12474         * config/i386/fbsd64.mh: Likewise.
12475         * config/i386/go32.mh: Likewise.
12476         * config/i386/i386gnu.mh: Likewise.
12477         * config/i386/i386sol2.mh: Likewise.
12478         * config/i386/linux.mh: Likewise.
12479         * config/i386/linux64.mh: Likewise.
12480         * config/i386/mingw.mh: Likewise.
12481         * config/i386/mingw64.mh: Likewise.
12482         * config/i386/nbsd64.mh: Likewise.
12483         * config/i386/nbsdelf.mh: Likewise.
12484         * config/i386/nto.mh: Likewise.
12485         * config/i386/obsd.mh: Likewise.
12486         * config/i386/obsd64.mh: Likewise.
12487         * config/i386/sol2-64.mh: Likewise.
12488         * config/ia64/linux.mh: Likewise.
12489         * config/m32r/linux.mh: Likewise.
12490         * config/m68k/linux.mh: Likewise.
12491         * config/m68k/nbsdelf.mh: Likewise.
12492         * config/m68k/obsd.mh: Likewise.
12493         * config/m88k/obsd.mh: Likewise.
12494         * config/mips/fbsd.mh: Likewise.
12495         * config/mips/linux.mh: Likewise.
12496         * config/mips/nbsd.mh: Likewise.
12497         * config/mips/obsd64.mh: Likewise.
12498         * config/pa/linux.mh: Likewise.
12499         * config/pa/nbsd.mh: Likewise.
12500         * config/pa/obsd.mh: Likewise.
12501         * config/powerpc/aix.mh: Likewise.
12502         * config/powerpc/fbsd.mh: Likewise.
12503         * config/powerpc/linux.mh: Likewise.
12504         * config/powerpc/nbsd.mh: Likewise.
12505         * config/powerpc/obsd.mh: Likewise.
12506         * config/powerpc/ppc64-linux.mh: Likewise.
12507         * config/powerpc/spu-linux.mh: Likewise.
12508         * config/s390/linux.mh: Likewise.
12509         * config/sh/nbsd.mh: Likewise.
12510         * config/sparc/fbsd.mh: Likewise.
12511         * config/sparc/linux.mh: Likewise.
12512         * config/sparc/linux64.mh: Likewise.
12513         * config/sparc/nbsd64.mh: Likewise.
12514         * config/sparc/nbsdelf.mh: Likewise.
12515         * config/sparc/obsd64.mh: Likewise.
12516         * config/sparc/sol2.mh: Likewise.
12517         * config/tilegx/linux.mh: Likewise.
12518         * config/vax/nbsdelf.mh: Likewise.
12519         * config/vax/obsd.mh: Likewise.
12520         * config/xtensa/linux.mh: Likewise.
12521         * config/i386/i386gnu.mn: New file, with excerpts from
12522         "config/i386/i386gnu.mh".
12523         * configure: Regenerate.
12524         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
12525         *.mh files under "gdb/config".
12526         * configure.nat: New file, with contents from the
12527         "gdb/config/*/*.mh" files.
12528
12529 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
12530
12531         * btrace.c (btrace_clear): Free insn vector.
12532
12533 2017-05-05  Pedro Alves  <palves@redhat.com>
12534
12535         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
12536         * configure: Regenerate.
12537
12538 2017-05-04  Pedro Alves  <palves@redhat.com>
12539
12540         * Makefile.in (SFILES): Add progspace-and-thread.c.
12541         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
12542         (COMMON_OBS): Add progspace-and-thread.o.
12543         * breakpoint.c: Include "progspace-and-thread.h".
12544         (update_inserted_breakpoint_locations)
12545         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
12546         Use scoped_restore_current_pspace_and_thread.
12547         (create_std_terminate_master_breakpoint): Use
12548         scoped_restore_current_program_space.
12549         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
12550         (print_breakpoint_location): Use
12551         scoped_restore_current_program_space.
12552         (bp_loc_is_permanent): Use
12553         scoped_restore_current_pspace_and_thread.
12554         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
12555         (download_tracepoint_locations): Use
12556         scoped_restore_current_pspace_and_thread.
12557         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
12558         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
12559         (enum step_over_calls_kind): Moved from inferior.h.
12560         (class scoped_restore_current_thread): New class.
12561         * gdbthread.h (make_cleanup_restore_current_thread): Delete
12562         declaration.
12563         (scoped_restore_current_thread): New class.
12564         * infcmd.c: Include "common/gdb_optional.h".
12565         (continue_1, proceed_after_attach): Use
12566         scoped_restore_current_thread.
12567         (notice_new_inferior): Use scoped_restore_current_thread.
12568         * inferior.c: Include "progspace-and-thread.h".
12569         (restore_inferior, save_current_inferior): Delete.
12570         (add_inferior_command, clone_inferior_command): Use
12571         scoped_restore_current_pspace_and_thread.
12572         * inferior.h (scoped_restore_current_inferior): New class.
12573         * infrun.c: Include "progspace-and-thread.h" and
12574         "common/gdb_optional.h".
12575         (follow_fork_inferior): Use
12576         scoped_restore_current_pspace_and_thread.
12577         (scoped_restore_exited_inferior): New class.
12578         (handle_vfork_child_exec_or_exit): Use
12579         scoped_restore_exited_inferior,
12580         scoped_restore_current_pspace_and_thread,
12581         scoped_restore_current_thread and scoped_restore.
12582         (fetch_inferior_event): Use scoped_restore_current_thread.
12583         * linespec.c (decode_line_full, decode_line_1): Use
12584         scoped_restore_current_program_space.
12585         * mi/mi-main.c: Include "progspace-and-thread.h".
12586         (exec_continue): Use scoped_restore_current_thread.
12587         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
12588         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
12589         * proc-service.c (ps_pglobal_lookup): Use
12590         scoped_restore_current_program_space.
12591         * progspace-and-thread.c: New file.
12592         * progspace-and-thread.h: New file.
12593         * progspace.c (release_program_space, clone_program_space): Use
12594         scoped_restore_current_program_space.
12595         (restore_program_space, save_current_program_space)
12596         (save_current_space_and_thread): Delete.
12597         (switch_to_program_space_and_thread): Moved to
12598         progspace-and-thread.c.
12599         * progspace.h (save_current_program_space)
12600         (save_current_space_and_thread): Delete declarations.
12601         (scoped_restore_current_program_space): New class.
12602         * remote.c (remote_btrace_maybe_reopen): Use
12603         scoped_restore_current_thread.
12604         * symtab.c: Include "progspace-and-thread.h".
12605         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
12606         * thread.c (print_thread_info_1): Use
12607         scoped_restore_current_thread.
12608         (struct current_thread_cleanup): Delete.
12609         (do_restore_current_thread_cleanup)
12610         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
12611         (scoped_restore_current_thread::~scoped_restore_current_thread):
12612         ... this new dtor.
12613         (make_cleanup_restore_current_thread): Rename/convert to ...
12614         (scoped_restore_current_thread::scoped_restore_current_thread):
12615         ... this new ctor.
12616         (thread_apply_all_command): Use scoped_restore_current_thread.
12617         (thread_apply_command): Use scoped_restore_current_thread.
12618         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
12619         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
12620
12621 2017-05-04  Pedro Alves  <palves@redhat.com>
12622
12623         * thread.c (make_cleanup_restore_current_thread): Move
12624         find_thread_ptid call before the is_stopped call.  Assert that the
12625         thread is found.  Replace is_stopped call by checking the thread's
12626         state directly.  Remove unnecessary NULL-thread check.
12627
12628 2017-05-04  Pedro Alves  <palves@redhat.com>
12629
12630         * corelow.c (thread_section_name): New class.
12631         (get_core_register_section, get_core_siginfo): Use it.
12632
12633 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12634
12635         * corelow.c (sniff_core_bfd): Remove extra semicolon.
12636         (get_core_register_section): Remove xfree of NULL pointer.
12637
12638 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
12639
12640         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
12641         * regcache.c (regcache::raw_supply_zeroed): New function.
12642         * regcache.h (regcache::raw_supply_zeroed): New declaration.
12643
12644 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
12645
12646         * gdbarch.sh: Remove commented out definition of
12647         TARGET_CHAR_BIT.
12648         * gdbarch.h: Re-generate.
12649
12650 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
12651
12652         * configure: Regenerate.
12653
12654 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
12655
12656         * solib-target.c (solib_target_relocate_section_addresses):
12657         Remove num_section_bases, num_bases, segment_bases variables.
12658
12659 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
12660
12661         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
12662
12663 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
12664
12665         * solib-target.c: Include <vector>
12666         (struct lm_info_target) <~lm_info_target>: Remove.
12667         <segment_bases, section_bases>: Change type to
12668         std::vector<CORE_ADDR>.
12669         (library_list_start_segment, library_list_start_section,
12670         library_list_end_library,
12671         solib_target_relocate_section_addresses): Adjust.
12672
12673 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
12674
12675         * gdbarch.sh (software_single_step): Change return type to
12676         std::vector<CORE_ADDR>.
12677         * gdbarch.c, gdbarch.h: Re-generate.
12678         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
12679         Adjust.
12680         (arm_deal_with_atomic_sequence_raw): Adjust.
12681         (thumb_get_next_pcs_raw): Adjust.
12682         (arm_get_next_pcs_raw): Adjust.
12683         (arm_get_next_pcs): Adjust.
12684         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
12685         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
12686         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
12687         (alpha_software_single_step): Adjust.
12688         * alpha-tdep.h (alpha_software_single_step): Adjust.
12689         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
12690         * arm-tdep.c (arm_software_single_step): Adjust.
12691         (arm_breakpoint_kind_from_current_state): Adjust.
12692         * arm-tdep.h (arm_software_single_step): Adjust.
12693         * breakpoint.c (insert_single_step_breakpoint): Adjust.
12694         * cris-tdep.c (cris_software_single_step): Adjust.
12695         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
12696         (micromips_deal_with_atomic_sequence): Adjust.
12697         (deal_with_atomic_sequence): Adjust.
12698         (mips_software_single_step): Adjust.
12699         * mips-tdep.h (mips_software_single_step): Adjust.
12700         * moxie-tdep.c (moxie_software_single_step): Adjust.
12701         * nios2-tdep.c (nios2_software_single_step): Adjust.
12702         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
12703         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
12704         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
12705         * s390-linux-tdep.c (s390_software_single_step): Adjust.
12706         * sparc-tdep.c (sparc_software_single_step): Adjust.
12707         * spu-tdep.c (spu_software_single_step): Adjust.
12708         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
12709
12710 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
12711
12712         * gdbarch.sh: Use semi-colon as field separator instead of colon.
12713         * gdbarch.h: Re-generate.
12714
12715 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
12716
12717         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
12718         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
12719         * python/py-instruction.c, python/py-instruction.h: New file.
12720         * python/py-record.c: Add py-instruction.h include.
12721         (gdbpy_initialize_record): Make gdb.Instruction a super class of
12722         gdb.RecordInstruction.
12723         * python/python-internal.h: Add gdbpy_initialize_instruction
12724         declaration.
12725         * python/python.c (do_start_initialization): Add
12726         gdbpy_initialize_instruction.
12727
12728 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
12729
12730         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
12731         Remove.
12732         (btrace_func_from_recpy_func): New function.
12733         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
12734         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
12735         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
12736         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
12737         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
12738         Also, use new helper functions.
12739         (btpy_list_item): Use new helper functions.
12740         (recpy_bt_function_call_history): Use new type name.
12741         (btpy_call_getset): Remove.
12742         (gdbpy_initialize_btrace): Remove code to initialize
12743         gdb.BtraceFunctionCall.
12744         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
12745         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
12746         recpy_bt_func_prev, recpy_bt_func_next): New export.
12747         * python/py-record.c (recpy_func_type): New static object.
12748         (recpy_func_new, recpy_func_level, recpy_func_symbol,
12749         recpy_func_instructions, recpy_func_up, recpy_func_prev,
12750         recpy_func_next): New function.
12751         (recpy_element_hash, recpy_element_richcompare): Updated comment.
12752         (recpy_func_getset): New static object.
12753         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
12754         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
12755
12756 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
12757
12758         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
12759         (btpy_object, btpy_insn_type, btpy_new): Remove.
12760         (btpy_list_object): Use gdb.RecordInstruction type instead of
12761         gdb.BtraceInstruction type.
12762         (btrace_insn_from_recpy_insn): New function.
12763         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
12764         btpy_new.
12765         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
12766         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
12767         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
12768         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
12769         instead of btpy_object.
12770         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12771         btpy_insn_data, btpy_insn_decode): Rename to ...
12772         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
12773         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
12774         recpy_bt_insn_decode): This.  Also, use new helper functions.
12775         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
12776         recpy_insn_type.
12777         (btpy_insn_getset): Remove.
12778         (gdbpy_initialize_btrace): Remove code to initialize
12779         gdb.BtraceInstruction.  Use recpy_element_object.
12780         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
12781         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
12782         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
12783         * python/py-record.c (recpy_insn_type): New static object.
12784         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
12785         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
12786         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
12787         New function.
12788         (recpy_insn_getset): New static object.
12789         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
12790         * python/py-record.h (recpy_element_object): New typedef.
12791         (recpy_insn_type, recpy_insn_new): New export.
12792
12793 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
12794
12795         * py-record-btrace.c (btpy_insn_new): Removed.
12796         (btpy_insn_or_gap_new): New function.
12797         (btpy_insn_error): Removed.
12798         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12799         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
12800         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
12801         btpy_insn_or_gap_new instead of btpy_insn_new.
12802         (btpy_insn_getset): Remove btpy_insn_error.
12803         * py-record.c (recpy_gap_type): New static object.
12804         (recpy_gap_object): New typedef.
12805         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
12806         recpy_gap_reason_string): New function.
12807         (recpy_gap_getset): New static object.
12808         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
12809         * py-record.h (recpy_gap_new): New export.
12810
12811 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
12812
12813         * python/py-record.c (recpy_ptid): Remove.
12814         (recpy_record_getset): Remove recpy_ptid.
12815
12816 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
12817
12818         * btrace.c (btrace_fetch): Set inferior_ptid.
12819         * python/py-record-btrace.c: Add "py-record.h" include.
12820         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
12821         recpy_bt_end, recpy_bt_instruction_history,
12822         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
12823         in gdb.Record object instead of current ptid.
12824         * python/py-record.c: Include new "py-record.h" file.
12825         (recpy_record_object): Moved to py-record.h.
12826         * python/py-record.h: New file.
12827
12828 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
12829
12830         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
12831         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
12832         indentation.
12833
12834 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
12835
12836         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
12837         the past maintainers section.
12838
12839 2017-04-28  Yao Qi  <yao.qi@linaro.org>
12840
12841         * infcmd.c (get_return_value): Use regcache ctor, and remove
12842         cleanup.
12843
12844 2017-04-28  Yao Qi  <yao.qi@linaro.org>
12845             Pedro Alves  <palves@redhat.com>
12846
12847         * regcache.c (regcache::regcache): New tag dispatch ctor.
12848         (do_cooked_read): Moved above.
12849         (regcache_dup): Use the tag dispatch ctor..
12850         * regcache.h (regcache): Declare ctor, delete copy ctor and
12851         assignment operator, remove friend regcache_dup.
12852
12853 2017-04-28  Yao Qi  <yao.qi@linaro.org>
12854
12855         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
12856         call method save instead of regcache_cpy.
12857         * regcache.h (struct regcache): Make regcache_dup a friend.
12858
12859 2017-04-28  Yao Qi  <yao.qi@linaro.org>
12860
12861         * regcache.c (struct regcache): Move to regcache.h
12862         (regcache::arch): New method.
12863         (regcache_get_ptid): Update.
12864         (get_regcache_arch): Call arch method.
12865         (get_regcache_aspace): Call method aspace.
12866         (register_buffer): Change it to method.
12867         (regcache_save): Change it to regcache::save.
12868         (regcache_restore): Likewise.
12869         (regcache_cpy_no_passthrough): Remove the declaration.
12870         (regcache_cpy): Call methods restore and cpy_no_passthrough.
12871         (regcache_cpy_no_passthrough): Change it to method
12872         cpy_no_passthrough.
12873         (regcache_register_status): Change it to method
12874         get_register_status.
12875         (regcache_invalidate): Change it to method invalidate.
12876         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
12877         (regcache_raw_update): Change it to method raw_update.
12878         (regcache_raw_read): Likewise.
12879         (regcache_raw_read_signed): Likewise.
12880         (regcache_raw_read_unsigned): Likewise.
12881         (regcache_raw_write_signed): Likewise.
12882         (regcache_raw_write_unsigned): Likewise.
12883         (regcache_cooked_read): Likewise.
12884         (regcache_cooked_read_value): Likewise.
12885         (regcache_cooked_read_signed): Likewise.
12886         (regcache_cooked_read_unsigned): Likewise.
12887         (regcache_cooked_write_signed): Likewise.
12888         (regcache_cooked_write_unsigned): Likewise.
12889         (regcache_raw_set_cached_value): Likewise.
12890         (regcache_raw_write): Likewise.
12891         (regcache_cooked_write): Likewise.
12892         (regcache_xfer_part): Likewise.
12893         (regcache_raw_read_part): Likewise.
12894         (regcache_raw_write_part): Likewise.
12895         (regcache_cooked_read_part): Likewise.
12896         (regcache_cooked_write_part): Likewise.
12897         (regcache_raw_supply): Likewise.
12898         (regcache_raw_collect): Likewise.
12899         (regcache_transfer_regset): Likewise.
12900         (regcache_supply_regset): Likewise.
12901         (regcache_collect_regset): Likewise.
12902         (regcache_debug_print_register): Likewise.
12903         (enum regcache_dump_what): Move it to regcache.h.
12904         (regcache_dump): Change it to method dump.
12905         * regcache.h (enum regcache_dump_what): New.
12906         (class regcache): New.
12907         * target.c (target_fetch_registers): Call method
12908         debug_print_register.
12909         (target_store_registers): Likewise.
12910
12911 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12912
12913         * windows-nat.c (struct lm_info_windows): Initialize field.
12914         (windows_make_so): Allocate lm_info_windows with new.
12915         (windows_free_so): Free lm_info_windows with delete.
12916
12917 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12918
12919         * solib-darwin.c (struct lm_info_darwin): Initialize field.
12920         (darwin_current_sos): Allocate lm_info_darwin with new, remove
12921         cleanup.
12922         (darwin_free_so): Free lm_info_darwin with delete.
12923
12924 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12925
12926         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
12927         <l_addr_p>: Change type to bool.
12928         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
12929         (svr4_free_so): Free lm_info_svr4 with delete.
12930         (svr4_copy_library_list): Replace memcpy with call to copy
12931         constructor.
12932         (library_list_start_library, svr4_default_sos): Allocate
12933         lm_info_svr4 with new.
12934
12935 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12936
12937         * solib-target.c (struct lm_info_target): Add destructor,
12938         initialize fields.
12939         <name>: Change type to std::string.
12940         (library_list_start_library): Allocate lm_info_target with new.
12941         (solib_target_free_library_list): Free lm_info_target with
12942         delete.
12943         (solib_target_current_sos): Adapt to std::string.
12944         (solib_target_free_so): Free lm_info_target with delete.
12945
12946 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12947
12948         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
12949         fields.
12950         (frv_current_sos): Allocate lm_info_frv with new.
12951         (frv_relocate_main_executable): Free lm_info_frv with delete,
12952         allocate with new.
12953         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
12954
12955 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12956
12957         * solib-frv.c (struct lm_info_frv): Fix indentation.
12958
12959 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12960
12961         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
12962         map field.
12963         (dsbt_current_sos): Allocate lm_info_dsbt with new.
12964         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
12965         and allocate with new.
12966         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
12967
12968 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12969
12970         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
12971         <filename, member_name>: Change type to std::string.
12972         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
12973         (library_list_start_library): Allocate lm_info_aix with new.
12974         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
12975         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
12976         with copy constructor.
12977
12978 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12979
12980         * solist.h (struct lm_info): Remove.
12981         (struct lm_info_base): New class.
12982         (struct so_list) <lm_info>: Change type to lm_info_base *.
12983         * nto-tdep.c (struct lm_info): Remove.
12984         (lm_addr): Adjust.
12985         * solib-aix.c (struct lm_info): Rename to ...
12986         (struct lm_info_aix): ... this.  Extend lm_info_base.
12987         (lm_info_p): Rename to ...
12988         (lm_info_aix_p): ... this, and adjust.
12989         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
12990         solib_aix_parse_libraries, library_list_start_library,
12991         solib_aix_free_library_list, solib_aix_parse_libraries,
12992         solib_aix_get_library_list,
12993         solib_aix_relocate_section_addresses, solib_aix_free_so,
12994         solib_aix_get_section_offsets,
12995         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
12996         Adjust.
12997         (struct solib_aix_inferior_data) <library_list>: Adjust.
12998         * solib-darwin.c (struct lm_info): Rename to ...
12999         (struct lm_info_darwin): ... this.  Extend lm_info_base.
13000         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
13001         * solib-dsbt.c (struct lm_info): Rename to ...
13002         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
13003         (struct dsbt_info) <main_executable_lm_info): Adjust.
13004         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
13005         dsbt_relocate_section_addresses): Adjust.
13006         * solib-frv.c (struct lm_info): Rename to ...
13007         (struct lm_info_frv): ... this.  Extend lm_info_base.
13008         (main_executable_lm_info): Adjust.
13009         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
13010         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
13011         find_canonical_descriptor_in_load_object,
13012         frv_fdpic_find_canonical_descriptor): Adjust.
13013         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
13014         to lm_info_svr4.
13015         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
13016         svr4_clear_so, svr4_copy_library_list,
13017         library_list_start_library, svr4_default_sos, svr4_read_so_list,
13018         svr4_current_sos, svr4_fetch_objfile_link_map,
13019         solist_update_incremental): Adjust.
13020         * solib-svr4.h (struct lm_info_svr4): Move here from
13021         solib-svr4.c.
13022         * solib-target.c (struct lm_info): Rename to ...
13023         (struct lm_info_target): ... this.  Extend lm_info_base.
13024         (lm_info_p): Rename to ...
13025         (lm_info_target_p): ... this.
13026         (solib_target_parse_libraries, library_list_start_segment,
13027         library_list_start_section, library_list_start_library,
13028         library_list_end_library, solib_target_free_library_list,
13029         solib_target_current_sos, solib_target_free_so,
13030         solib_target_relocate_section_addresses): Adjust.
13031         * windows-nat.c (struct lm_info): Rename to ...
13032         (struct lm_info_windows): ... this.  Extend lm_info_base.
13033         (windows_make_so, handle_load_dll, handle_unload_dll,
13034         windows_xfer_shared_libraries): Adjust.
13035
13036 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
13037
13038         * solib-darwin.c (struct darwin_so_list): Remove.
13039         (darwin_current_sos): Allocate an so_list object instead of a
13040         darwin_so_list, separately allocate an lm_info object.
13041         (darwin_free_so): Free lm_info.
13042
13043 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
13044
13045         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
13046         with fprintf_filtered.
13047
13048 2017-04-28  Yao Qi  <yao.qi@linaro.org>
13049
13050         * regcache.c (regcache::regcache): New function.
13051         (regcache::~regcache): New function.
13052         (regcache_xmalloc_1): Remove.
13053         (regcache_xmalloc): Call new regcache.
13054         (regcache_xfree): Call delete regcache.
13055         (get_thread_arch_aspace_regcache): Call new regcache.
13056
13057 2017-04-28  Yao Qi  <yao.qi@linaro.org>
13058
13059         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
13060         lwp instead of ptid_get_lwp.
13061
13062 2017-04-28  Yao Qi  <yao.qi@linaro.org>
13063
13064         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
13065         lwp_info instead of getting from inferior_ptid.
13066
13067 2017-04-27  Keith Seitz  <keiths@redhat.com>
13068
13069         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
13070         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
13071         (CV_CONVERSION_BADNESS): Define.
13072         (rank_one_type): Remove overly restrictive rvalue reference
13073         rank checks.
13074         Add cv-qualifier checks and subranks for type equality.
13075         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
13076         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
13077         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
13078
13079 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
13080
13081         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
13082         count when creating the object.
13083
13084 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
13085             Ulrich Weigand  <uweigand@de.ibm.com>
13086
13087         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
13088         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
13089         is used in AIX.
13090         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
13091         (process_xcoff_symbol): Likewise.
13092         (scan_xcoff_symtab): Likewise.
13093
13094 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
13095
13096         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
13097         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
13098         (ia64_access_reg): Use get_frame_register_unsigned.
13099         (ia64_access_rse_reg): Likewise.
13100         (ia64_libunwind_frame_prev_register): Likewise.
13101
13102 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
13103
13104         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
13105         * gdbarch.c: Regenerated.
13106         * gdbarch.h: Regenerated.
13107         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
13108         visibility external.
13109         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
13110         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
13111         (enum cfa_how_kind): Move to ...
13112         (struct dwarf2_frame_state_reg_info): Likewise.
13113         (struct dwarf2_frame_state): Likewise.
13114         * dwarf2-frame.h: ... here.
13115         (dwarf2_frame_state_alloc_regs): New declaration.
13116         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
13117         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
13118
13119 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
13120
13121         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
13122         regcache_raw_read_unsigned.
13123         (xtensa_pseudo_register_write): Likewise.
13124
13125 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
13126
13127         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
13128         (nds32_pseudo_register_write): Likewise.
13129
13130 2017-04-25  Yao Qi  <yao.qi@linaro.org>
13131
13132         * regcache.c (struct regcache) <readonly_p>: Change its type
13133         to bool.
13134         (regcache_xmalloc_1): Update parameter type and callers update.
13135
13136 2017-04-25  Yao Qi  <yao.qi@linaro.org>
13137
13138         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
13139         set_gdbarch_wchar_bit.
13140         * arm-tdep.c (arm_gdbarch_init): Likewise.
13141
13142 2017-04-25  Pedro Alves  <palves@redhat.com>
13143
13144         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
13145         (BothAreRelocatable, memcopy, memmove): Don't define.
13146         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
13147         macros.
13148
13149 2017-04-25  Pedro Alves  <palves@redhat.com>
13150
13151         * common/common-defs.h: Include "common/poison.h".
13152         * common/function-view.h: (Not, Or, Requires): Move to traits.h
13153         and adjust.
13154         * common/poison.h: New file.
13155         * common/traits.h: Include <type_traits>.
13156         (Not, Or, Requires): New, moved from common/function-view.h.
13157
13158 2017-04-25  Pedro Alves  <palves@redhat.com>
13159
13160         * breakpoint.h (struct breakpoint): In-class initialize all
13161         fields.  Make boolean fields "bool".
13162         * breakpoint.c (init_raw_breakpoint_without_location): Remove
13163         memset call and initializations no longer necessary.
13164
13165 2017-04-25  Pedro Alves  <palves@redhat.com>
13166
13167         * btrace.c (pt_btrace_insn_flags): Change parameter type to
13168         reference.
13169         (pt_btrace_insn): New function.
13170         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
13171
13172 2017-04-25  Pedro Alves  <palves@redhat.com>
13173
13174         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
13175         "base" field and inherit from "bp_location" instead.  Add
13176         non-default ctor.
13177         (allocate_location_exception): Use new non-default ctor.
13178         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
13179         (init_bp_location): Convert to ...
13180         (bp_location::bp_location): ... this new ctor, and remove memset
13181         call.
13182         (base_breakpoint_allocate_location): Use the new non-default ctor.
13183         * breakpoint.h (bp_location): Now a class.  Declare default and
13184         non-default ctors.  In-class initialize all members.
13185         (init_bp_location): Remove declaration.
13186
13187 2017-04-25  Pedro Alves  <palves@redhat.com>
13188
13189         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
13190         assignment operator.
13191
13192 2017-04-24  Yao Qi  <yao.qi@linaro.org>
13193
13194         * doublest.c (convert_doublest_to_floatformat): Call
13195         floatformat_totalsize_bytes.
13196
13197 2017-04-22  Tom Tromey  <tom@tromey.com>
13198
13199         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
13200         ui_out_emit_list.
13201         * stack.c (print_frame): Use ui_out_emit_list.
13202         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13203         ui_out_emit_list.
13204         * mi/mi-main.c (print_one_inferior)
13205         (mi_cmd_data_list_register_names)
13206         (mi_cmd_data_list_register_values, mi_cmd_list_features)
13207         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
13208         ui_out_emit_list.
13209         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
13210         (mi_output_solib_attribs): Use ui_out_emit_list,
13211         ui_out_emit_tuple.
13212         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
13213         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
13214         (mi_cmd_stack_list_args, list_args_or_locals): Use
13215         ui_out_emit_list.
13216         * disasm.c (do_assembly_only): Use ui_out_emit_list.
13217         * breakpoint.c (print_solib_event, output_thread_groups): Use
13218         ui_out_emit_list.
13219
13220 2017-04-22  Tom Tromey  <tom@tromey.com>
13221
13222         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
13223         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
13224         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
13225
13226 2017-04-22  Tom Tromey  <tom@tromey.com>
13227
13228         * tracepoint.c (tvariables_info_1)
13229         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
13230
13231 2017-04-22  Tom Tromey  <tom@tromey.com>
13232
13233         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
13234         annotate_arg_emitter.
13235         * breakpoint.c (print_mention_watchpoint)
13236         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
13237         * annotate.h (struct annotate_arg_emitter): New.
13238
13239 2017-04-22  Tom Tromey  <tom@tromey.com>
13240
13241         * record-btrace.c (record_btrace_insn_history)
13242         (record_btrace_insn_history_range, record_btrace_call_history)
13243         (record_btrace_call_history_range): Use ui_out_emit_tuple.
13244         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
13245         ui_out_emit_tuple.
13246         * stack.c (print_frame_info): Use ui_out_emit_tuple.
13247         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
13248         * skip.c (skip_info): Use ui_out_emit_tuple.
13249         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
13250         * progspace.c (print_program_space): Use ui_out_emit_tuple.
13251         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
13252         * osdata.c (info_osdata): Use ui_out_emit_tuple.
13253         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13254         ui_out_emit_tuple.
13255         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
13256         (output_register, mi_cmd_data_read_memory)
13257         (mi_cmd_data_read_memory_bytes, mi_load_progress)
13258         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
13259         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
13260         Use ui_out_emit_tuple.
13261         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
13262         ui_out_emit_tuple.
13263         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13264         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
13265         * linux-thread-db.c (info_auto_load_libthread_db): Use
13266         ui_out_emit_tuple.
13267         * inferior.c (print_inferior): Use ui_out_emit_tuple.
13268         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
13269         * disasm.c (do_mixed_source_and_assembly_deprecated)
13270         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
13271         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
13272         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
13273         * breakpoint.c (print_one_breakpoint_location)
13274         (print_one_breakpoint): Use ui_out_emit_tuple.
13275         * auto-load.c (print_script, info_auto_load_cmd): Use
13276         ui_out_emit_tuple.
13277         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
13278
13279 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
13280
13281         * thread.c (print_thread_info_1): Remove dead code.
13282
13283 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13284
13285         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
13286         GDB_SELF_TEST.
13287         * arm-tdep.c (selftests::arm_record_test): Likewise.
13288
13289 2017-04-21  Yao Qi  <yao.qi@linaro.org>
13290
13291         * regcache.c (regcache_restore): Remove argument 2.  Replace
13292         argument 3 with regcache.  Get register status from
13293         src->register_status and get register contents from
13294         register_buffer (src, regnum).
13295         (regcache_cpy): Update.
13296
13297 2017-04-19  Pedro Alves  <palves@redhat.com>
13298
13299         * gdbthread.h (thread): Add missing closing parenthesis in
13300         comment.
13301
13302 2017-04-19  Pedro Alves  <palves@redhat.com>
13303
13304         * common/refcounted-object.h: New file.
13305         * gdbthread.h: Include "common/refcounted-object.h".
13306         (thread_info): Inherit from refcounted_object and add comments.
13307         (thread_info::incref, thread_info::decref)
13308         (thread_info::m_refcount): Delete.
13309         (thread_info::deletable): Use the refcounted_object::refcount()
13310         method.
13311         * inferior.c (current_inferior_): Add comment.
13312         (set_current_inferior): Increment/decrement refcounts.
13313         (prune_inferiors, remove_inferior_command): Skip inferiors marked
13314         not-deletable instead of comparing with the current inferior.
13315         (initialize_inferiors): Increment the initial inferior's refcount.
13316         * inferior.h (struct inferior): Forward declare.
13317         Include "common/refcounted-object.h".
13318         (current_inferior, set_current_inferior): Move declaration to
13319         before struct inferior's definition, and fix comment.
13320         (inferior): Inherit from refcounted_object.  Add comments.
13321         * thread.c (switch_to_thread_no_regs): Reference the thread's
13322         inferior pointer directly instead of doing a ptid lookup.
13323         (switch_to_no_thread): New function.
13324         (switch_to_thread(thread_info *)): New function, factored out
13325         from ...
13326         (switch_to_thread(ptid_t)): ... this.
13327         (restore_current_thread): Delete.
13328         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
13329         fields, and add 'inf' field.
13330         (do_restore_current_thread_cleanup): Check whether old->inf is
13331         alive instead of looking up an inferior by ptid.  Use
13332         switch_to_thread and switch_to_no_thread.
13333         (restore_current_thread_cleanup_dtor): Use old->inf directly
13334         instead of lookup up an inferior by id.  Decref the inferior.
13335         Don't restore 'removable'.
13336         (make_cleanup_restore_current_thread): Same the inferior pointer
13337         in old, instead of the inferior number.  Incref the inferior.
13338         Don't save/clear 'removable'.
13339
13340 2017-04-19  Pedro Alves  <palves@redhat.com>
13341
13342         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13343         unittests/scoped_restore-selftests.c.
13344         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
13345         * common/scoped_restore.h (scoped_restore_base): Make "class".
13346         (scoped_restore_base::release): New public method.
13347         (scoped_restore_base::scoped_restore_base): New protected ctor.
13348         (scoped_restore_base::m_saved_var): New protected field.
13349         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
13350         scoped_restore_base base class instead of m_saved_var directly.
13351         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
13352         (scoped_restore_tmpl::scoped_restore_tmpl(const
13353         scoped_restore_tmpl<T>&)): Likewise.
13354         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
13355         method.
13356         (scoped_restore_tmpl::saved_var): New method.
13357         (scoped_restore_tmpl::m_saved_var): Delete.
13358         * inferior.h (inferior::detaching): Now a bool.
13359         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
13360         cleanup.
13361         * unittests/scoped_restore-selftests.c: New file.
13362
13363 2017-04-19  Pedro Alves  <palves@redhat.com>
13364
13365         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
13366         Re-sort in alphabetic order.
13367
13368 2017-04-18  Pedro Alves  <palves@redhat.com>
13369
13370         * xml-support.c (obstack_xml_printf): Delete.
13371         * xml-support.h (obstack_xml_printf): Delete.
13372
13373 2017-04-18  Pedro Alves  <palves@redhat.com>
13374
13375         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
13376         vdebug, verror, body_text, start_element, end_element, name,
13377         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
13378         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
13379         is_xinclude>: Make private and add m_ prefix.
13380         (gdb_xml_parser::body_text): New method, based on ...
13381         (gdb_xml_body_text): ... this.  Adjust.
13382         (gdb_xml_parser::vdebug): New method, based on ...
13383         (gdb_xml_debug): ... this.  Adjust.
13384         (gdb_xml_parser::verror): New method, based on ...
13385         (gdb_xml_error): ... this.  Adjust.
13386         (gdb_xml_parser::start_element): New method, based on ...
13387         (gdb_xml_start_element): ... this.  Adjust.
13388         (gdb_xml_start_element_wrapper): Defer to
13389         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
13390         (gdb_xml_parser::end_element): New method, based on ...
13391         (gdb_xml_end_element_wrapper): ... this.  Adjust.
13392         (gdb_xml_parser::~gdb_xml_parser): Adjust.
13393         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
13394         (gdb_xml_parser::use_dtd): New method, based on ...
13395         (gdb_xml_use_dtd): ... this.  Adjust.
13396         (gdb_xml_parser::parse): New method, based on ...
13397         (gdb_xml_parse): ... this.  Adjust.
13398         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
13399         (xinclude_start_include): Adjust to call the parser's name method.
13400         (xml_xinclude_default, xml_xinclude_start_doctype)
13401         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
13402         method.
13403         (xml_process_xincludes): Adjust to call parser methods.
13404         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
13405         declarations.
13406
13407 2017-04-18  Pedro Alves  <palves@redhat.com>
13408
13409         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
13410         gdb::optional<std::string>.
13411         * xml-support.c: Include <string>.
13412         (scope_level::scope_level(scope_level &&))
13413         (scope_level::~scope_level): Delete.
13414         (scope_level::body): Now a std::string.
13415         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
13416         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
13417         parameter.
13418         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
13419         (xinclude_parsing_data::output): Now a std::string reference.
13420         (xinclude_start_include): Adjust.
13421         (xml_xinclude_default): Adjust.
13422         (xml_process_xincludes): Add 'output' parameter, and return bool.
13423         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
13424         and return bool.
13425         * xml-tdesc.c: Include <unordered_map> and <string>.
13426         (tdesc_xml_cache): Delete.
13427         (tdesc_xml_cache_s): Delete.
13428         (xml_cache): Now an std::unordered_map.
13429         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
13430         (target_fetch_description_xml): Change return type to
13431         gdb::optional<std::string>, and adjust.
13432         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
13433         (target_fetch_description_xml): Change return type to
13434         gdb::optional<std::string>.
13435
13436 2017-04-18  Pedro Alves  <palves@redhat.com>
13437
13438         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13439         unittests/optional-selftests.c.
13440         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
13441         * unittests/optional-selftests.c: New file.
13442         * unittests/optional/assignment/1.cc: New file.
13443         * unittests/optional/assignment/2.cc: New file.
13444         * unittests/optional/assignment/3.cc: New file.
13445         * unittests/optional/assignment/4.cc: New file.
13446         * unittests/optional/assignment/5.cc: New file.
13447         * unittests/optional/assignment/6.cc: New file.
13448         * unittests/optional/assignment/7.cc: New file.
13449         * unittests/optional/cons/copy.cc: New file.
13450         * unittests/optional/cons/default.cc: New file.
13451         * unittests/optional/cons/move.cc: New file.
13452         * unittests/optional/cons/value.cc: New file.
13453         * unittests/optional/in_place.cc: New file.
13454         * unittests/optional/observers/1.cc: New file.
13455         * unittests/optional/observers/2.cc: New file.
13456
13457 2017-04-18  Pedro Alves  <palves@redhat.com>
13458
13459         * common/gdb_optional.h: Include common/traits.h.
13460         (in_place_t): New type.
13461         (in_place): New constexpr variable.
13462         (optional::optional): Remove member initialization of
13463         m_instantiated.
13464         (optional::optional(in_place_t...)): New constructor.
13465         (optional::~optional): Use reset.
13466         (optional::optional(const optional&)): New.
13467         (optional::optional(const optional&&)): New.
13468         (optional::optional(T &)): New.
13469         (optional::optional(T &&)): New.
13470         (operator::operator=(const optional &)): New.
13471         (operator::operator=(optional &&)): New.
13472         (operator::operator= (const T &))
13473         (operator::operator= (T &&))
13474         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
13475         (operator::reset): New.
13476         (operator::m_instantiated):: Add in-class initializer.
13477         * common/traits.h: Include <type_traits>.
13478         (struct And): New types.
13479
13480 2017-04-18  Pedro Alves  <palves@redhat.com>
13481
13482         * xml-support.c: Include <vector>.
13483         (scope_level::scope_level(const gdb_xml_element *))
13484         (scope_level::scope_level(scope_level&&)): New.
13485         (scope_level::~scope_level): New.
13486         (scope_level_s): Delete.
13487         (gdb_xml_parser::scopes): Now a std::vector.
13488         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
13489         Use std::vector.
13490         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
13491         scope cleanup code.
13492         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
13493         of the scopes member.  Use std::vector::emplace_back.
13494
13495 2017-04-18  Pedro Alves  <palves@redhat.com>
13496
13497         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
13498         a bool.
13499         (gdb_xml_end_element): Change type of first parameter.
13500         (gdb_xml_cleanup): Rename to ...
13501         (gdb_xml_parser::~gdb_xml_parser): ... this.
13502         (gdb_xml_create_parser_and_cleanup): Delete with ...
13503         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
13504         to this new ctor.
13505         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
13506         using gdb_xml_create_parser_and_cleanup.
13507         (xinclude_parsing_data): Add ctor/dtor.
13508         (xml_xinclude_cleanup): Delete.
13509         (xml_process_xincludes): Create a local xinclude_parsing_data
13510         instead of heap-allocating one.  Create a local gdb_xml_parser
13511         instead of heap-allocating one with
13512         gdb_xml_create_parser_and_cleanup.
13513
13514 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
13515
13516         PR threads/20743
13517         * fbsd-nat.c (resume_one_thread_cb): Remove.
13518         (resume_all_threads_cb): Remove.
13519         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
13520         iterate_over_threads.
13521
13522 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
13523
13524         * NEWS: Create a new section for the next release branch.
13525         Rename the section of the current branch, now that it has
13526         been cut.
13527
13528 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
13529
13530         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
13531         * version.in: Bump version to 8.0.50.DATE-git.
13532
13533 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
13534
13535         PR gdb/21385
13536         * windows-nat.c (windows_create_inferior): Declare 'allargs'
13537         independently of the host, and fix build breakage on Cygwin.
13538
13539 2017-04-13  Pedro Alves  <palves@redhat.com>
13540
13541         * inferior.c (free_inferior): Convert to ...
13542         (inferior::~inferior): ... this dtor.
13543         (inferior::inferior): New ctor, factored out from ...
13544         (add_inferior_silent): ... here.  Allocate the inferior with a new
13545         expression.
13546         (delete_inferior): Call delete instead of free_inferior.
13547         * inferior.h (gdb_environ, continuation): Forward declare.
13548         (inferior): Now a class.  Add in-class initialization to all
13549         members.  Make boolean fields bool, except 'detaching'.
13550         (inferior::inferior): New explicit ctor.
13551         (inferior::~inferior): New.
13552
13553 2017-04-13  Pedro Alves  <palves@redhat.com>
13554
13555         * inferior.c (init_inferior_list): Delete.
13556         * inferior.h (init_inferior_list): Delete.
13557
13558 2017-04-13  Pedro Alves  <palves@redhat.com>
13559
13560         PR threads/13217
13561         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
13562         (top level): Call it twice, with different thread sets.
13563
13564 2017-04-13  Pedro Alves  <palves@redhat.com>
13565
13566         * thread.c: Include <algorithm>.
13567         (thread_array_cleanup): Delete.
13568         (scoped_inc_dec_ref): New class.
13569         (live_threads_count): New function.
13570         (set_thread_refcount): Delete.
13571         (tp_array_compar_ascending): Now a bool.
13572         (tp_array_compar): Convert to a std::sort comparison function.
13573         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
13574         and live_threads_count.
13575
13576 2017-04-13  Pedro Alves  <palves@redhat.com>
13577
13578         * infrun.c (follow_fork_inferior): Also switch the current
13579         inferior.
13580
13581 2017-04-13  Pedro Alves  <palves@redhat.com>
13582
13583         * breakpoint.c (watch_command_1): Save watchpoint-frame info
13584         before calling create_internal_breakpoint.
13585
13586 2017-04-13  Pedro Alves  <palves@redhat.com>
13587
13588         * fork-child.c (execv_argv): New class.
13589         (breakup_args): Refactored as ...
13590         (execv_argv::init_for_no_shell): .. this method of execv_argv.
13591         Copy arguments to storage and replace separators with NULL
13592         terminators in place.
13593         (escape_bang_in_quoted_argument): Adjust to return bool.
13594         (execv_argv::execv_argv): New ctor.
13595         (execv_argv::init_for_shell): New method, factored out from
13596         fork_inferior.  Don't strdup strings into the vector.
13597         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
13598         Remove free_vector_argv call.
13599
13600 2017-04-13  Yao Qi  <yao.qi@linaro.org>
13601
13602         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
13603         tdep->rx_psw_type.
13604
13605 2017-04-13  Yao Qi  <yao.qi@linaro.org>
13606
13607         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
13608         * rx-tdep.c (rx_gdbarch_init): Likewise.
13609
13610 2017-04-13  Pedro Alves  <palves@redhat.com>
13611
13612         * breakpoint.h (struct breakpoint): Reindent.
13613
13614 2017-04-13  Pedro Alves  <palves@redhat.com>
13615
13616         * breakpoint.c (bp_location): Rename to ...
13617         (bp_locations): ... this.  All references updated.
13618         (bp_location_count): Rename to ...
13619         (bp_locations_count): ... this.  All references updated.
13620         (bp_location_placed_address_before_address_max): Rename to ...
13621         (bp_locations_placed_address_before_address_max): ... this.  All
13622         references updated.
13623         (bp_location_shadow_len_after_address_max): Rename to ...
13624         (bp_locations_shadow_len_after_address_max): ... this.  All
13625         references updated.
13626         (bp_location_compare_addrs): Rename to ...
13627         (bp_locations_compare_addrs): ... this.  All references updated.
13628         (bp_location_compare):Rename to ...
13629         (bp_locations_compare): ... this.  All references updated.
13630         (bp_location_target_extensions_update): Rename to ...
13631         (bp_locations_target_extensions_update): ... this.  All references
13632         updated.
13633
13634 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
13635
13636         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
13637         * common/common.m4: Check headers 'termios.h', 'termio.h' and
13638         'sgtty.h'.
13639         * common/gdb_termios.h: New file, with parts of "terminal.h".
13640         * inflow.c: Include "gdb_termios.h".
13641         * ser-unix.c: Include "gdb_termios.h".
13642         * terminal.h: Move terminal-related defines to
13643         "common/gdb_termios.h".
13644
13645 2017-04-12  Tom Tromey  <tom@tromey.com>
13646
13647         * probe.c (parse_probes): Update.
13648         * location.h (delete_event_location): Don't declare.
13649         (event_location_deleter::operator()): Update.
13650         * location.c (event_location_deleter::operator()): Rename from
13651         delete_event_location.
13652         * linespec.h (linespec_result) <location>: Change type to
13653         event_location_up.
13654         * linespec.c (canonicalize_linespec, event_location_to_sals)
13655         (decode_objc): Update.
13656         (linespec_result): Don't call delete_event_location.
13657         * breakpoint.c (create_breakpoints_sal)
13658         (bkpt_probe_create_sals_from_location)
13659         (strace_marker_create_sals_from_location): Update.
13660
13661 2017-04-12  Tom Tromey  <tom@tromey.com>
13662
13663         * linespec.h (struct linespec_result): Add constructor and
13664         destructor.
13665         (init_linespec_result, destroy_linespec_result)
13666         (make_cleanup_destroy_linespec_result): Don't declare.
13667         * linespec.c (init_linespec_result): Remove.
13668         (linespec_result::~linespec_result): Rename from
13669         destroy_linespec_result.  Update.
13670         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
13671         Remove.
13672         * breakpoint.c (create_breakpoint, break_range_command)
13673         (decode_location_default): Update.
13674         * ax-gdb.c (agent_command_1): Update.
13675
13676 2017-04-12  Tom Tromey  <tom@tromey.com>
13677
13678         * remote.c (remote_download_tracepoint): Update.
13679         * python/py-breakpoint.c (bppy_get_location): Update.
13680         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
13681         (gdbscm_breakpoint_location): Update.
13682         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
13683         * breakpoint.h (struct breakpoint) <location, location_range_end>:
13684         Change type to event_location_up.
13685         * breakpoint.c (create_overlay_event_breakpoint)
13686         (create_longjmp_master_breakpoint)
13687         (create_std_terminate_master_breakpoint)
13688         (create_exception_master_breakpoint)
13689         (breakpoint_event_location_empty_p, print_breakpoint_location)
13690         (print_one_breakpoint_location, create_thread_event_breakpoint)
13691         (init_breakpoint_sal, create_breakpoint)
13692         (print_recreate_ranged_breakpoint, break_range_command)
13693         (init_ada_exception_breakpoint, say_where): Update.
13694         (base_breakpoint_dtor): Don't call delete_event_location.
13695         (bkpt_print_recreate, tracepoint_print_recreate)
13696         (dprintf_print_recreate, update_static_tracepoint)
13697         (breakpoint_re_set_default): Update.
13698
13699 2017-04-12  Tom Tromey  <tom@tromey.com>
13700
13701         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
13702         type of "to_do".  Update.
13703         (compute_stack_depth): Use std::vector.
13704
13705 2017-04-12  Tom Tromey  <tom@tromey.com>
13706
13707         * printcmd.c (find_instruction_backward): Use std::vector.
13708
13709 2017-04-12  Tom Tromey  <tom@tromey.com>
13710
13711         * symfile.c (objfilep): Remove typedef.
13712         (reread_symbols): Use a std::vector.
13713
13714 2017-04-12  Tom Tromey  <tom@tromey.com>
13715
13716         * mi/mi-main.c (exec_direction_forward): Remove.
13717         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
13718         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
13719         scoped_restore.
13720         * guile/guile.c (guile_repl_command, guile_command)
13721         (gdbscm_execute_gdb_command): Use scoped_restore.
13722         * go-exp.y (go_parse): Use scoped_restore.
13723         * d-exp.y (d_parse): Use scoped_restore.
13724         * cli/cli-decode.c (cmd_func): Use scoped_restore.
13725         * c-exp.y (c_parse): Use scoped_restore.
13726
13727 2017-04-12  Tom Tromey  <tom@tromey.com>
13728
13729         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
13730         (mi_parse): Update return type.
13731         (mi_parse_free): Remove.
13732         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
13733         (mi_parse::~mi_parse): Rename from mi_parse_free.
13734         (mi_parse_cleanup): Remove.
13735         (mi_parse): Return a unique_ptr.  Use new.
13736         * mi/mi-main.c (mi_execute_command): Update.
13737
13738 2017-04-12  Tom Tromey  <tom@tromey.com>
13739
13740         * location.c (explicit_location_lex_one): Return a
13741         unique_xmalloc_ptr.
13742         (string_to_explicit_location): Update.  Remove cleanups.
13743
13744 2017-04-12  Tom Tromey  <tom@tromey.com>
13745
13746         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
13747         (compare_value_and_voffset): Change type.  Update.
13748         (compute_vtable_size): Change type of "offset_vec".
13749         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
13750         (gnuv3_get_typeid): Remove extraneous declaration.
13751
13752 2017-04-12  Tom Tromey  <tom@tromey.com>
13753
13754         * charset.h (wchar_iterator): Fix comment.
13755
13756 2017-04-12  Tom Tromey  <tom@tromey.com>
13757
13758         * charset.c (iconv_wrapper): New class.
13759         (cleanup_iconv): Remove.
13760         (convert_between_encodings): Use it.
13761
13762 2017-04-12  Tom Tromey  <tom@tromey.com>
13763
13764         * symfile.h (increment_reading_symtab): Update type.
13765         * symfile.c (decrement_reading_symtab): Remove.
13766         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
13767         * psymtab.c (psymtab_to_symtab): Update.
13768         * dwarf2read.c (dw2_instantiate_symtab): Update.
13769
13770 2017-04-12  Tom Tromey  <tom@tromey.com>
13771
13772         * jit.c (struct jit_reader): Declare separately.  Add constructor
13773         and destructor.  Change type of "handle".
13774         (loaded_jit_reader): Define separately.
13775         (jit_reader_load): Update.  New "new".
13776         (jit_reader_unload_command): Use "delete".
13777         * gdb-dlfcn.h (struct dlclose_deleter): New.
13778         (gdb_dlhandle_up): New typedef.
13779         (gdb_dlopen, gdb_dlsym): Update types.
13780         (gdb_dlclose): Remove.
13781         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
13782         (gdb_dlsym): Change type of "handle".
13783         (make_cleanup_dlclose): Remove.
13784         (dlclose_deleter::operator()): Rename from gdb_dlclose.
13785         * compile/compile-c-support.c (load_libcc): Update.
13786
13787 2017-04-12  Tom Tromey  <tom@tromey.com>
13788
13789         * symtab.h (find_pcs_for_symtab_line): Change return type.
13790         * symtab.c (find_pcs_for_symtab_line): Change return type.
13791         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
13792         type of "vec".  Update.
13793         (ltpy_get_pcs_for_line): Update.
13794         * linespec.c (decode_digits_ordinary): Update.
13795
13796 2017-04-12  Tom Tromey  <tom@tromey.com>
13797
13798         * tracepoint.c (actions_command): Update.
13799         * python/python.c (python_command, python_interactive_command):
13800         Update.
13801         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
13802         * guile/guile.c (guile_command): Update.
13803         * defs.h (read_command_lines, read_command_lines_1): Return
13804         command_line_up.
13805         (command_lines_deleter): New struct.
13806         (command_line_up): New typedef.
13807         * compile/compile.c (compile_code_command)
13808         (compile_print_command): Update.
13809         * cli/cli-script.h (get_command_line, copy_command_lines): Return
13810         command_line_up.
13811         (make_cleanup_free_command_lines): Remove.
13812         * cli/cli-script.c (get_command_line, read_command_lines_1)
13813         (copy_command_lines): Return command_line_up.
13814         (while_command, if_command, read_command_lines, define_command)
13815         (document_command): Update.
13816         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
13817         Remove.
13818         * breakpoint.h (breakpoint_set_commands): Change type of
13819         "commands".
13820         * breakpoint.c (breakpoint_set_commands): Change type of
13821         "commands".  Update.
13822         (do_map_commands_command, update_dprintf_command_list)
13823         (create_tracepoint_from_upload): Update.
13824
13825 2017-04-12  Tom Tromey  <tom@tromey.com>
13826
13827         * tracepoint.c (scope_info): Update.
13828         * spu-tdep.c (spu_catch_start): Update.
13829         * python/python.c (gdbpy_decode_line): Update.
13830         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
13831         * python/py-breakpoint.c (bppy_init): Update.
13832         * probe.c (parse_probes): Update.
13833         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
13834         * location.h (event_location_deleter): New struct.
13835         (event_location_up): New typedef.
13836         (new_linespec_location, new_address_location, new_probe_location)
13837         (new_explicit_location, copy_event_location)
13838         (string_to_event_location, string_to_event_location_basic)
13839         (string_to_explicit_location): Update return type.
13840         (make_cleanup_delete_event_location): Remove.
13841         * location.c (new_linespec_location, new_address_location)
13842         (new_probe_location, new_explicit_location, copy_event_location):
13843         Return event_location_up.
13844         (delete_event_location_cleanup)
13845         (make_cleanup_delete_event_location): Remove.
13846         (string_to_explicit_location, string_to_event_location_basic)
13847         (string_to_event_location): Return event_location_up.
13848         * linespec.c (canonicalize_linespec, event_location_to_sals)
13849         (decode_line_with_current_source)
13850         (decode_line_with_last_displayed, decode_objc): Update.
13851         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
13852         * completer.c (location_completer): Update.
13853         * cli/cli-cmds.c (edit_command, list_command): Update.
13854         * breakpoint.c (create_overlay_event_breakpoint)
13855         (create_longjmp_master_breakpoint)
13856         (create_std_terminate_master_breakpoint)
13857         (create_exception_master_breakpoint)
13858         (create_thread_event_breakpoint): Update.
13859         (init_breakpoint_sal): Update.  Remove some dead code.
13860         (create_breakpoint_sal): Change type of "location".  Update.
13861         (create_breakpoints_sal, create_breakpoint, break_command_1)
13862         (dprintf_command, break_range_command, until_break_command)
13863         (init_ada_exception_breakpoint)
13864         (strace_marker_create_sals_from_location)
13865         (update_static_tracepoint, trace_command, ftrace_command)
13866         (strace_command, create_tracepoint_from_upload): Update.
13867         * break-catch-throw.c (re_set_exception_catchpoint): Update.
13868         * ax-gdb.c (agent_command_1): Update.
13869
13870 2017-04-12  Pedro Alves  <palves@redhat.com>
13871
13872         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
13873         * configure.tgt: Handle i[34567]86-*-go32* and
13874         i[34567]86-*-msdosdjgpp*.
13875         * i386-tdep.c (i386_svr4_reg_to_regnum):
13876         Make extern.
13877         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
13878         i386-go32-tdep.c.
13879         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
13880         * i386-go32-tdep.c: New file.
13881         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
13882         declarations.
13883
13884 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
13885
13886         * aix-thread.c (pd_status2str): Change return type to const char *.
13887
13888 2017-04-12  Pedro Alves  <palves@redhat.com>
13889
13890         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
13891         calls to set_gdbarch_gnu_triplet_regexp.
13892
13893 2017-04-12  Pedro Alves  <palves@redhat.com>
13894
13895         PR gdb/21323
13896         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
13897         New enum value.
13898         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
13899         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
13900         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
13901         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
13902         * gdbarch.h, gdbarch.c: Regenerate.
13903         * aarch64-tdep.c (aarch64_gdbarch_init): Override
13904         gdbarch_wchar_bit and gdbarch_wchar_signed.
13905         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
13906         * arm-tdep.c (arm_gdbarch_init): Likewise.
13907         * avr-tdep.c (avr_gdbarch_init): Likewise.
13908         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
13909         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
13910         * i386-tdep.c (i386_go32_init_abi): Likewise.
13911         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
13912         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
13913         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
13914         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
13915         * sh-tdep.c (sh_gdbarch_init): Likewise.
13916         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
13917         * sparc64-tdep.c (sparc64_init_abi): Likewise.
13918         * windows-tdep.c (windows_init_abi): Likewise.
13919         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
13920
13921 2017-04-12  Pedro Alves  <palves@redhat.com>
13922
13923         PR c++/21323
13924         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
13925         cplus_primitive_type_char32_t>: New enum values.
13926         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
13927         and cplus_primitive_type_char32_t.
13928         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
13929         32, use the archtecture's built-in type for char16_t and char32_t,
13930         respectively.  Otherwise, fallback to init_integer_type as before,
13931         but make the type unsigned, and issue a complaint.
13932         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
13933
13934 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
13935
13936         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
13937         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
13938
13939 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
13940
13941         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
13942         'const char *'.
13943
13944 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
13945
13946         * common/common-utils.c (free_vector_argv): New function.
13947         * common/common-utils.h: Include <vector>.
13948         (free_vector_argv): New prototype.
13949         * darwin-nat.c (darwin_create_inferior): Rewrite function
13950         prototype in order to constify "exec_file" and accept a
13951         "std::string" for "allargs".
13952         * fork-child.c: Include <vector>.
13953         (breakup_args): Rewrite function, using C++.
13954         (fork_inferior): Rewrite function header, constify "exec_file_arg"
13955         and accept "std::string" for "allargs".  Update the code to
13956         calculate "argv" based on "allargs".  Update calls to "exec_fun"
13957         and "execvp".
13958         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
13959         order to constify "exec_file" and accept a "std::string" for
13960         "allargs".
13961         * go32-nat.c (go32_create_inferior): Likewise.
13962         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
13963         * infcmd.c (run_command_1): Constify "exec_file".  Use
13964         "std::string" for inferior arguments.
13965         * inferior.h (fork_inferior): Update prototype.
13966         * linux-nat.c (linux_nat_create_inferior): Rewrite function
13967         prototype in order to constify "exec_file" and accept a
13968         "std::string" for "allargs".
13969         * nto-procfs.c (procfs_create_inferior): Likewise.
13970         * procfs.c (procfs_create_inferior): Likewise.
13971         * remote-sim.c (gdbsim_create_inferior): Likewise.
13972         * remote.c (extended_remote_run): Update code to accept
13973         "std::string" as argument.
13974         (extended_remote_create_inferior): Rewrite function prototype in
13975         order to constify "exec_file" and accept a "std::string" for
13976         "allargs".
13977         * rs6000-nat.c (super_create_inferior): Likewise.
13978         (rs6000_create_inferior): Likewise.
13979         * target.h (struct target_ops) <to_create_inferior>: Likewise.
13980         * windows-nat.c (windows_create_inferior): Likewise.
13981
13982 2017-04-11  Pedro Alves  <palves@redhat.com>
13983
13984         * thread.c: Fix whitespace throughout.
13985
13986 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13987
13988         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
13989
13990 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
13991
13992         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
13993
13994 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
13995
13996         PR gdb/21364
13997         * osdata.c (info_osdata): Check if 'type' is an empty string
13998         instead of NULL.
13999
14000 2017-04-10  Pedro Alves  <palves@redhat.com>
14001
14002         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
14003         (ptid_to_global_thread_id, in_thread_list)
14004         (do_captured_list_thread_ids, set_resumed, set_running)
14005         (set_executing, set_stop_requested, finish_thread_state)
14006         (validate_registers_access, can_access_registers_ptid)
14007         (print_thread_info_1, switch_to_thread)
14008         (do_restore_current_thread_cleanup)
14009         (make_cleanup_restore_current_thread, thread_command)
14010         (thread_name_command): Use operator== instead of ptid_equal.
14011
14012 2017-04-10  Pedro Alves  <palves@redhat.com>
14013
14014         * thread.c (struct current_thread_cleanup) <next>: Delete field.
14015         (current_thread_cleanup_chain): Delete.
14016         (restore_current_thread_cleanup_dtor)
14017         (make_cleanup_restore_current_thread): Remove references to
14018         current_thread_cleanup_chain.
14019
14020 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
14021
14022         * msp430-tdep.c (msp430_pseudo_register_read): Never return
14023         REG_UNKNOWN.
14024
14025 2017-04-10  Yao Qi  <yao.qi@linaro.org>
14026
14027         PR gdb/19942
14028         * gdbthread.h (thread_info::deletable): New method.
14029         (thread_info::incref): New method.
14030         (thread_info::decref): New method.
14031         (thread_info::refcount): Move it to private.
14032         * infrun.c (save_stop_context): Call inc_refcount.
14033         (release_stop_context_cleanup): Likewise.
14034         * thread.c (set_thread_exited): New function.
14035         (init_thread_list): Delete "tp" only it is deletable, otherwise
14036         call set_thread_exited.
14037         (delete_thread_1): Call set_thread_exited.
14038         (current_thread_cleanup) <inferior_pid>: Remove.
14039         <thread>: New field.
14040         (restore_current_thread_ptid_changed): Removed.
14041         (do_restore_current_thread_cleanup): Adjust.
14042         (restore_current_thread_cleanup_dtor): Don't call
14043         find_thread_ptid.
14044         (set_thread_refcount): Use dec_refcount.
14045         (make_cleanup_restore_current_thread): Adjust.
14046         (thread_apply_all_command): Call inc_refcount.
14047         (_initialize_thread): Don't call
14048         observer_attach_thread_ptid_changed.
14049
14050 2017-04-10  Yao Qi  <yao.qi@linaro.org>
14051
14052         * thread.c (delete_thread_1): Hoist code on marking thread as
14053         exited.
14054
14055 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
14056
14057         * windows-nat.c (windows_detach): Initialize ptid with
14058         minus_one_ptid.
14059
14060 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
14061
14062         * unittests/ptid-selftests.c: Fix erroneous assert messages.
14063
14064 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
14065
14066         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
14067         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
14068         (bfin_pseudo_register_write): Likewise
14069
14070 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
14071
14072         * common/ptid.h (struct ptid): Change to...
14073         (class ptid_t): ... this.
14074         <ptid_t>: New constructors.
14075         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
14076         matches>: New methods.
14077         <make_null, make_minus_one>: New static methods.
14078         <pid>: Rename to...
14079         <m_pid>: ...this.
14080         <lwp>: Rename to...
14081         <m_lwp>: ...this.
14082         <tid>: Rename to...
14083         <m_tid>: ...this.
14084         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
14085         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
14086         as references, move comment to class ptid_t.
14087         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
14088         ptid_t static methods.
14089         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
14090         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
14091         Take ptid arguments as references, implement using ptid_t methods.
14092         * unittests/ptid-selftests.c: New file.
14093         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14094         unittests/ptid-selftests.c.
14095         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
14096
14097 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
14098
14099         * python/python.c (python_run_simple_file): Cast mode literal to
14100         non-const char pointer as expected by PyFile_FromString.
14101
14102 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
14103
14104         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
14105         minus_one_ptid and null_ptid.
14106
14107 2017-04-05  Pedro Alves  <palves@redhat.com>
14108
14109         * warning.m4 (build_warnings): Remove -Wno-write-strings.
14110         * configure: Regenerate.
14111
14112 2017-04-05  Pedro Alves  <palves@redhat.com>
14113
14114         * ada-exp.y (yyerror): Constify.
14115         * ada-lang.c (bound_name, get_selections)
14116         (ada_variant_discrim_type)
14117         (ada_variant_discrim_name, ada_value_struct_elt)
14118         (ada_lookup_struct_elt_type, is_unchecked_variant)
14119         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
14120         (catch_ada_exception_command_split)
14121         (catch_ada_assert_command_split, catch_assert_command)
14122         (ada_op_name): Constify.
14123         * ada-lang.h (ada_yyerror, get_selections)
14124         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
14125         * arc-tdep.c (arc_print_frame_cache): Constify.
14126         * arm-tdep.c (arm_skip_stub): Constify.
14127         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
14128         (gen_aggregate_elt_ref): Constify.
14129         * bcache.c (print_bcache_statistics): Constify.
14130         * bcache.h (print_bcache_statistics): Constify.
14131         * break-catch-throw.c (catch_exception_command_1):
14132         * breakpoint.c (struct ep_type_description::description):
14133         Constify.
14134         (add_solib_catchpoint): Constify.
14135         (catch_fork_command_1): Add cast.
14136         (add_catch_command): Constify.
14137         * breakpoint.h (add_catch_command, add_solib_catchpoint):
14138         Constify.
14139         * bsd-uthread.c (bsd_uthread_state): Constify.
14140         * buildsym.c (patch_subfile_names): Constify.
14141         * buildsym.h (next_symbol_text_func, patch_subfile_names):
14142         Constify.
14143         * c-exp.y (yyerror): Constify.
14144         (token::oper): Constify.
14145         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
14146         * c-varobj.c (cplus_describe_child): Constify.
14147         * charset.c (find_charset_names): Add cast.
14148         (find_charset_names): Constify array and add const_cast.
14149         * cli/cli-cmds.c (complete_command, cd_command): Constify.
14150         (edit_command): Constify.
14151         * cli/cli-decode.c (lookup_cmd): Constify.
14152         * cli/cli-dump.c (dump_memory_command, dump_value_command):
14153         Constify.
14154         (struct dump_context): Constify.
14155         (add_dump_command, restore_command): Constify.
14156         * cli/cli-script.c (get_command_line): Constify.
14157         * cli/cli-script.h (get_command_line): Constify.
14158         * cli/cli-utils.c (check_for_argument): Constify.
14159         * cli/cli-utils.h (check_for_argument): Constify.
14160         * coff-pe-read.c (struct read_pe_section_data): Constify.
14161         * command.h (lookup_cmd): Constify.
14162         * common/print-utils.c (decimal2str): Constify.
14163         * completer.c (gdb_print_filename): Constify.
14164         * corefile.c (set_gnutarget): Constify.
14165         * cp-name-parser.y (yyerror): Constify.
14166         * cp-valprint.c (cp_print_class_member): Constify.
14167         * cris-tdep.c (cris_register_name, crisv32_register_name):
14168         Constify.
14169         * d-exp.y (yyerror): Constify.
14170         (struct token::oper): Constify.
14171         * d-lang.h (d_yyerror): Constify.
14172         * dbxread.c (struct header_file_location::name): Constify.
14173         (add_old_header_file, add_new_header_file, last_function_name)
14174         (dbx_next_symbol_text, add_bincl_to_list)
14175         (find_corresponding_bincl_psymtab, set_namestring)
14176         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
14177         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
14178         * defs.h (command_line_input, print_address_symbolic)
14179         (deprecated_readline_begin_hook): Constify.
14180         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
14181         Constify.
14182         * event-top.c (handle_line_of_input): Constify and add cast.
14183         * exceptions.c (catch_errors): Constify.
14184         * exceptions.h (catch_errors): Constify.
14185         * expprint.c (print_subexp_standard, op_string, op_name)
14186         (op_name_standard, dump_raw_expression, dump_raw_expression):
14187         * expression.h (op_name, op_string, dump_raw_expression):
14188         Constify.
14189         * f-exp.y (yyerror): Constify.
14190         (struct token::oper): Constify.
14191         (struct f77_boolean_val::name): Constify.
14192         * f-lang.c (f_word_break_characters): Constify.
14193         * f-lang.h (f_yyerror): Constify.
14194         * fork-child.c (fork_inferior): Add cast.
14195         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
14196         (new_variant): Constify.
14197         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
14198         * gdbarch.c: Regenerate.
14199         * gdbcore.h (set_gnutarget): Constify.
14200         * go-exp.y (yyerror): Constify.
14201         (token::oper): Constify.
14202         * go-lang.h (go_yyerror): Constify.
14203         * go32-nat.c (go32_sysinfo): Constify.
14204         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
14205         * guile/scm-cmd.c (cmdscm_function): Constify.
14206         * guile/scm-param.c (pascm_param_value): Constify.
14207         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
14208         (h8300sx_register_name): Constify.
14209         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
14210         Constify.
14211         * ia64-tdep.c (ia64_register_names): Constify.
14212         * infcmd.c (construct_inferior_arguments): Constify.
14213         (path_command, attach_post_wait): Constify.
14214         * language.c (show_range_command, show_case_command)
14215         (unk_lang_error): Constify.
14216         * language.h (language_defn::la_error)
14217         (language_defn::la_name_of_this): Constify.
14218         * linespec.c (decode_line_2): Constify.
14219         * linux-thread-db.c (thread_db_err_str): Constify.
14220         * lm32-tdep.c (lm32_register_name): Constify.
14221         * m2-exp.y (yyerror): Constify.
14222         * m2-lang.h (m2_yyerror): Constify.
14223         * m32r-tdep.c (m32r_register_names): Constify and make static.
14224         * m68hc11-tdep.c (m68hc11_register_names): Constify.
14225         * m88k-tdep.c (m88k_register_name): Constify.
14226         * macroexp.c (appendmem): Constify.
14227         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
14228         (upgrade_type, parse_external, parse_partial_symbols)
14229         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
14230         (new_symbol): Constify.
14231         * memattr.c (mem_info_command): Constify.
14232         * mep-tdep.c (register_name_from_keyword): Constify.
14233         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
14234         Constify.
14235         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
14236         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
14237         * mi/mi-main.c (captured_mi_execute_command): Constify and add
14238         cast.
14239         (mi_execute_async_cli_command): Constify.
14240         * mips-tdep.c (mips_register_name): Constify.
14241         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
14242         (am33_register_name, am33_2_register_name)
14243         * moxie-tdep.c (moxie_register_names): Constify.
14244         * nat/linux-osdata.c (osdata_type): Constify fields.
14245         * nto-tdep.c (nto_parse_redirection): Constify.
14246         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
14247         (lookup_child_selector): Constify.
14248         (objc_methcall::name): Constify.
14249         * objc-lang.h (lookup_objc_class, lookup_child_selector)
14250         (lookup_struct_typedef): Constify.
14251         * objfiles.c (pc_in_section): Constify.
14252         * objfiles.h (pc_in_section): Constify.
14253         * p-exp.y (struct token::oper): Constify.
14254         (yyerror): Constify.
14255         * p-lang.h (pascal_yyerror): Constify.
14256         * parser-defs.h (op_name_standard): Constify.
14257         (op_print::string): Constify.
14258         (exp_descriptor::op_name): Constify.
14259         * printcmd.c (print_address_symbolic): Constify.
14260         * psymtab.c (print_partial_symbols): Constify.
14261         * python/py-breakpoint.c (stop_func): Constify.
14262         (bppy_get_expression): Constify.
14263         * python/py-cmd.c (cmdpy_completer::name): Constify.
14264         (cmdpy_function): Constify.
14265         * python/py-event.c (evpy_add_attribute)
14266         (gdbpy_initialize_event_generic): Constify.
14267         * python/py-event.h (evpy_add_attribute)
14268         (gdbpy_initialize_event_generic): Constify.
14269         * python/py-evts.c (add_new_registry): Constify.
14270         * python/py-finishbreakpoint.c (outofscope_func): Constify.
14271         * python/py-framefilter.c (get_py_iter_from_func): Constify.
14272         * python/py-inferior.c (get_buffer): Add cast.
14273         * python/py-param.c (parm_constant::name): Constify.
14274         * python/py-unwind.c (fprint_frame_id): Constify.
14275         * python/python.c (gdbpy_parameter_value): Constify.
14276         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
14277         * remote.c (memory_packet_config::name): Constify.
14278         (show_packet_config_cmd, remote_write_bytes)
14279         (remote_buffer_add_string):
14280         * reverse.c (exec_reverse_once): Constify.
14281         * rs6000-tdep.c (variant::name, variant::description): Constify.
14282         * rust-exp.y (rustyyerror): Constify.
14283         * rust-lang.c (rust_op_name): Constify.
14284         * rust-lang.h (rustyyerror): Constify.
14285         * serial.h (serial_ops::name): Constify.
14286         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
14287         (sh_sh3e_register_name, sh_sh2e_register_name)
14288         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
14289         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
14290         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
14291         (sh_sh4al_dsp_register_name): Constify.
14292         * sh64-tdep.c (sh64_register_name): Constify.
14293         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
14294         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
14295         * stabsread.c (patch_block_stabs, read_type_number)
14296         (ref_map::stabs, ref_add, process_reference)
14297         (symbol_reference_defined, define_symbol, define_symbol)
14298         (error_type, read_type, read_member_functions, read_cpp_abbrev)
14299         (read_one_struct_field, read_struct_fields, read_baseclasses)
14300         (read_tilde_fields, read_struct_type, read_array_type)
14301         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
14302         (read_huge_number, read_range_type, read_args, common_block_start)
14303         (find_name_end): Constify.
14304         * stabsread.h (common_block_start, define_symbol)
14305         (process_one_symbol, symbol_reference_defined, ref_add):
14306         * symfile.c (get_section_index, add_symbol_file_command):
14307         * symfile.h (get_section_index): Constify.
14308         * target-descriptions.c (tdesc_type::name): Constify.
14309         (tdesc_free_type): Add cast.
14310         * target.c (find_default_run_target):
14311         (add_deprecated_target_alias, find_default_run_target)
14312         (target_announce_detach): Constify.
14313         (do_option): Constify.
14314         * target.h (add_deprecated_target_alias): Constify.
14315         * thread.c (print_thread_info_1): Constify.
14316         * top.c (deprecated_readline_begin_hook, command_line_input):
14317         Constify.
14318         (init_main): Add casts.
14319         * top.h (handle_line_of_input): Constify.
14320         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
14321         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
14322         (tfind_command): Rename to ...
14323         (tfind_command_1): ... this and constify.
14324         (tfind_command): New function.
14325         (tfind_end_command, tfind_start_command): Adjust.
14326         (encode_source_string): Constify.
14327         * tracepoint.h (encode_source_string): Constify.
14328         * tui/tui-data.c (tui_partial_win_by_name): Constify.
14329         * tui/tui-data.h (tui_partial_win_by_name): Constify.
14330         * tui/tui-source.c (tui_set_source_content_nil): Constify.
14331         * tui/tui-source.h (tui_set_source_content_nil): Constify.
14332         * tui/tui-win.c (parse_scrolling_args): Constify.
14333         * tui/tui-windata.c (tui_erase_data_content): Constify.
14334         * tui/tui-windata.h (tui_erase_data_content): Constify.
14335         * tui/tui-winsource.c (tui_erase_source_content): Constify.
14336         * tui/tui.c (tui_enable): Add cast.
14337         * utils.c (defaulted_query): Constify.
14338         (init_page_info): Add cast.
14339         (puts_debug, subset_compare): Constify.
14340         * utils.h (subset_compare): Constify.
14341         * varobj.c (varobj_format_string): Constify.
14342         * varobj.h (varobj_format_string): Constify.
14343         * vax-tdep.c (vax_register_name): Constify.
14344         * windows-nat.c (windows_detach): Constify.
14345         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
14346         * xml-support.c (gdb_xml_end_element): Constify.
14347         * xml-tdesc.c (tdesc_start_reg): Constify.
14348         * xstormy16-tdep.c (xstormy16_register_name): Constify.
14349         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
14350         * xtensa-tdep.h (xtensa_register_t::name): Constify.
14351
14352 2017-04-05  Pedro Alves  <palves@redhat.com>
14353
14354         * proc-api.c (struct trans): Constify.
14355         (procfs_note): Constify.
14356         * proc-events.c (struct trans, syscall_table):
14357         * proc-flags.c (struct trans): Constify.
14358         * proc-utils.h (procfs_note): Constify.
14359         * proc-why.c (struct trans): Constify.
14360         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
14361         (procfs_detach): Constify.
14362         * sol-thread.c (struct string_map): Constify.
14363         (td_err_string, td_state_string): Constify.
14364
14365 2017-04-05  Pedro Alves  <palves@redhat.com>
14366
14367         * proc-api.c (procfs_filename): Don't initialize
14368         procfs_filename.
14369         (prepare_to_trace): Assume procfs_filename is non-NULL.
14370         (_initialize_proc_api): Give procfs_filename a default value here.
14371
14372 2017-04-05  Pedro Alves  <palves@redhat.com>
14373
14374         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
14375         'cond_string' parameter.
14376         (extract_exception_regexp): Constify 'string' parameter.
14377         (catch_exception_command_1): Constify.
14378         * breakpoint.c (init_catchpoint)
14379         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
14380         parameter.
14381         (ep_parse_optional_if_clause, catch_fork_command_1)
14382         (catch_exec_command_1): Constify.
14383         * breakpoint.h (init_catchpoint): Constify 'cond_string'
14384         parameter.
14385         (ep_parse_optional_if_clause): Constify.
14386         * cli/cli-utils.c (remove_trailing_whitespace)
14387         (check_for_argument): Constify.
14388         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
14389         non-const overload.
14390         (check_for_argument): Likewise.
14391
14392 2017-04-05  Pedro Alves  <palves@redhat.com>
14393
14394         * event-top.c (command_line_handler): Add cast to execute_command
14395         call.
14396         * record-btrace.c (cmd_record_btrace_bts_start)
14397         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
14398         (cmd_record_btrace_start): Add cast to execute_command call.
14399         * record-full.c (record_full_goto_insn):
14400         * record.c (record_start, record_stop): Add cast to
14401         execute_command_to_string calls.
14402         (cmd_record_start): Add cast to execute_command calls.
14403
14404 2017-04-05  Pedro Alves  <palves@redhat.com>
14405
14406         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
14407         static inline function.
14408         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
14409         array and use gdb_PyArg_ParseTupleAndKeywords.
14410         * python/py-cmd.c (cmdpy_init): Likewise.
14411         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
14412         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
14413         (infpy_search_memory): Likewise.
14414         * python/py-objfile.c (objfpy_add_separate_debug_file)
14415         (gdbpy_lookup_objfile): Likewise.
14416         * python/py-symbol.c (gdbpy_lookup_symbol)
14417         (gdbpy_lookup_global_symbol): Likewise.
14418         * python/py-type.c (gdbpy_lookup_type): Likewise.
14419         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
14420         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
14421         Likewise.
14422
14423 2017-04-05  Pedro Alves  <palves@redhat.com>
14424
14425         * python/python-internal.h (gdb_PyGetSetDef): New type.
14426         * python/py-block.c (block_object_getset)
14427         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
14428         * python/py-event.c (event_object_getset)
14429         (finish_breakpoint_object_getset): Likewise.
14430         * python/py-inferior.c (inferior_object_getset): Likewise.
14431         * python/py-infthread.c (thread_object_getset): Likewise.
14432         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
14433         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
14434         * python/py-objfile.c (objfile_getset): Likewise.
14435         * python/py-progspace.c (pspace_getset): Likewise.
14436         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
14437         Likewise.
14438         * python/py-record.c (recpy_record_getset): Likewise.
14439         * python/py-symbol.c (symbol_object_getset): Likewise.
14440         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
14441         Likewise.
14442         * python/py-type.c (type_object_getset, field_object_getset):
14443         Likewise.
14444         * python/py-value.c (value_object_getset): Likewise.
14445
14446 2017-04-05  Pedro Alves  <palves@redhat.com>
14447
14448         * python/python-internal.h (gdb_PyObject_CallMethod)
14449         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
14450         New functions.
14451         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
14452         (PySys_GetObject, PySys_SetPath): New macros.
14453
14454 2017-04-05  Pedro Alves  <palves@redhat.com>
14455
14456         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
14457         info_osdata_command.
14458         * osdata.c (info_osdata_command): Rename to ...
14459         (info_osdata): ... this.  Constify 'type' parameter, and remove
14460         the 'from_tty' parameter.  Accept NULL TYPE.
14461         (info_osdata_command): New function.
14462         * osdata.h (info_osdata_command): Remove declaration.
14463         (info_osdata): New declaration.
14464
14465 2017-04-05  Pedro Alves  <palves@redhat.com>
14466
14467         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
14468         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
14469         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
14470         parameter.
14471         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
14472         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
14473         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
14474         parameter.
14475         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
14476         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
14477         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
14478         (mi_cmd_file_list_exec_source_files)
14479         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
14480         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
14481         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
14482         parameter.
14483         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
14484         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
14485         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
14486         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
14487         (mi_cmd_stack_info_frame): Constify 'command' parameter.
14488         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
14489         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
14490         'command' parameter.
14491         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
14492         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
14493         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
14494         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
14495         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
14496         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
14497         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
14498         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
14499         (mi_cmd_var_set_update_range): Constify 'command' parameter.
14500         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
14501         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
14502         parameter.
14503         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
14504         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
14505         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
14506         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
14507         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
14508         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
14509         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
14510         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
14511         (mi_cmd_data_list_changed_registers)
14512         (mi_cmd_data_write_register_values)
14513         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
14514         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
14515         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
14516         (mi_cmd_list_features, mi_cmd_list_target_features)
14517         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
14518         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
14519         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
14520         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
14521         (mi_cmd_trace_frame_collected): Constify 'command'
14522         parameter.
14523         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
14524         'command' parameter.
14525
14526 2017-04-05  Pedro Alves  <palves@redhat.com>
14527
14528         * ada-lang.c (ada_completer_word_break_characters): Now a const
14529         array.
14530         (ada_get_gdb_completer_word_break_characters): Constify.
14531         * completer.c (gdb_completer_command_word_break_characters)
14532         (gdb_completer_file_name_break_characters)
14533         (gdb_completer_quote_characters): Now const arrays.
14534         (get_gdb_completer_quote_characters): Constify.
14535         (set_rl_completer_word_break_characters): New function.
14536         (set_gdb_completion_word_break_characters)
14537         (complete_line_internal): Use it.
14538         * completer.h (get_gdb_completer_quote_characters): Constify.
14539         (set_rl_completer_word_break_characters): Declare.
14540         * f-lang.c (f_word_break_characters): Constify.
14541         * language.c (default_word_break_characters): Constify.
14542         * language.h (language_defn::la_word_break_characters): Constify.
14543         (default_word_break_characters): Constify.
14544         * top.c (init_main): Use set_rl_completer_word_break_characters.
14545
14546 2017-04-05  Pedro Alves  <palves@redhat.com>
14547
14548         * aix-thread.c (aix_thread_pid_to_str)
14549         (aix_thread_extra_thread_info): Constify.
14550         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
14551         * bsd-uthread.c (bsd_uthread_extra_thread_info)
14552         (bsd_uthread_pid_to_str): Constify.
14553         * corelow.c (core_pid_to_str): Constify.
14554         * darwin-nat.c (darwin_pid_to_str): Constify.
14555         * fbsd-nat.c (fbsd_pid_to_str): Constify.
14556         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
14557         Constify.
14558         * gnu-nat.c (gnu_pid_to_str): Constify.
14559         * go32-nat.c (go32_pid_to_str): Constify.
14560         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
14561         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
14562         * inferior.c (inferior_pid_to_str): Constify.
14563         * linux-nat.c (linux_nat_pid_to_str): Constify.
14564         * linux-tdep.c (linux_core_pid_to_str): Constify.
14565         * linux-thread-db.c (thread_db_pid_to_str)
14566         (thread_db_extra_thread_info): Constify.
14567         * nto-tdep.c (nto_extra_thread_info): Constify.
14568         * nto-tdep.h (nto_extra_thread_info): Constify.
14569         * obsd-nat.c (obsd_pid_to_str): Constify.
14570         * procfs.c (procfs_pid_to_str): Constify.
14571         * ravenscar-thread.c (ravenscar_extra_thread_info)
14572         (ravenscar_pid_to_str): Constify.
14573         * remote-sim.c (gdbsim_pid_to_str): Constify.
14574         * remote.c (remote_threads_extra_info, remote_pid_to_str):
14575         Constify.
14576         * sol-thread.c (solaris_pid_to_str): Constify.
14577         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
14578         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
14579         * target.c (default_pid_to_str, target_pid_to_str)
14580         (normal_pid_to_str, default_pid_to_str): Constify.
14581         * target.h (target_ops::to_pid_to_str)
14582         (target_ops::to_extra_thread_info): Constify.
14583         (target_pid_to_str, normal_pid_to_str): Constify.
14584         * windows-nat.c (windows_pid_to_str): Constify.
14585         * gdbarch.sh (core_pid_to_str): Constify.
14586         * target-delegates.c: Regenerate.
14587         * gdbarch.h, gdbarch.c: Regenerate.
14588
14589 2017-04-05  Pedro Alves  <palves@redhat.com>
14590
14591         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
14592         the memory of the temporary warning_pre_print override.
14593         * utils.c (warning_pre_print): Constify.
14594         * utils.h (warning_pre_print): Constify.
14595
14596 2017-04-05  Pedro Alves  <palves@redhat.com>
14597
14598         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
14599         (shell_command): New function.
14600         (make_command): Use std::string.
14601         (init_cli_cmds): Register shell_command instead of shell_escape.
14602
14603 2017-04-05  Pedro Alves  <palves@redhat.com>
14604
14605         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
14606         * tracepoint.c (default_collect): Don't initialize.
14607
14608 2017-04-05  Pedro Alves  <palves@redhat.com>
14609
14610         * macroexp.c (macro_buffer::shared): Now a bool.
14611         (init_buffer): Update.
14612         (init_shared_buffer): Constify 'addr' parameter.
14613         (substitute_args, expand, macro_expand, macro_expand_next): Remove
14614         casts.
14615
14616 2017-04-05  Pedro Alves  <palves@redhat.com>
14617
14618         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
14619         * disasm.c (set_disassembler_options): Constify local.
14620         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
14621
14622 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
14623
14624         PR gdb/21352
14625         * tracefile.c (tsave_command): Fix argument parsing for '-r'
14626         option.
14627
14628 2017-04-05  Yao Qi  <yao.qi@linaro.org>
14629
14630         * frame.c (frame_unwind_register_unsigned): Call
14631         frame_unwind_register_value.
14632
14633 2017-04-05  Yao Qi  <yao.qi@linaro.org>
14634
14635         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
14636         Use gdb_test_multiple, and don't match anchor.
14637
14638 2017-04-05  Pedro Alves  <palves@redhat.com>
14639
14640         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
14641         (Write After Approval): Remove Simon Marchi.
14642
14643 2017-04-05  Pedro Alves  <palves@redhat.com>
14644
14645         * common/gdb_optional.h (optional::optional): Make constexpr and
14646         initialize m_dummy.
14647
14648 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
14649
14650         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
14651         (amd64fbsd_jmp_buf_reg_offset): Remove.
14652         (amd64fbsd_supply_uthread): Remove function.
14653         (amd64fbsd_collect_uthread): Remove function.
14654         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
14655         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
14656         (x86_64-*-freebsd*): Remove bsd-uthread.o.
14657         (fbsd-nat.c): Update comment.
14658         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
14659         (i386fbsd_jmp_buf_reg_offset): Remove.
14660         (i386fbsd_supply_uthread): Remove function.
14661         (i386fbsd_collect_uthread): Remove function.
14662         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
14663
14664 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
14665
14666         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
14667         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
14668         * NEWS: Mention that support for FreeBSD/alpha was removed.
14669         * alpha-fbsd-tdep.c: Delete file.
14670         * config/alpha/fbsd.mh: Delete file.
14671         * configure.host: Delete alpha*-*-freebsd* and
14672         alpha*-*-kfreebsd*-gnu.
14673         * configure.tgt: Delete alpha*-*-freebsd* and
14674         alpha*-*-kfreebsd*-gnu.
14675
14676 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
14677
14678         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
14679         amd64bsd_store_inferior_registers): Use ptid from regcache.
14680
14681 2017-04-04  Pedro Alves  <palves@redhat.com>
14682
14683         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
14684         data fields, make them private and add "m_" prefixes.
14685         (lnp_state_machine::lnp_state_machine): New ctor.
14686         (record_line, check_line_address, handle_set_discriminator)
14687         (handle_set_address, handle_advance_pc, handle_special_opcode)
14688         (handle_advance_line, handle_set_file, handle_negate_stmt)
14689         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
14690         (end_sequence, advance_line): New methods.
14691         (m_gdbarch, m_record_lines_p): New fields.
14692         (lnp_reader_state): Delete.
14693         (dwarf_record_line): Rename to ...
14694         (lnp_state_machine::record_line): ... adjust.
14695         (init_lnp_state_machine): Delete.
14696         (lnp_state_machine::lnp_state_machine): New.
14697         (check_line_address): Rename to ...
14698         (lnp_state_machine::check_line_address): This.
14699         (dwarf_decode_lines_1): Remove reference to "reader_state".
14700         Adjust lnp_state_machine having a non-default ctor.  Use bool.
14701         State machine internal state manipulation moved to
14702         lnp_state_machine methods.
14703
14704 2017-04-04  Pedro Alves  <palves@redhat.com>
14705
14706         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14707         unittests/offset-type-selftests.c.
14708         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
14709         * common/offset-type.h: New file.
14710         * common/preprocessor.h: New file.
14711         * common/traits.h: New file.
14712         * common/valid-expr.h: New file.
14713         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
14714         sect_offset and cu_offset strong typedefs throughout.
14715         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
14716         typedefs throughout.
14717         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
14718         sect_offset and cu_offset strong typedefs throughout.
14719         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
14720         typedefs throughout.
14721         * gdbtypes.h: Include "common/offset-type.h".
14722         (cu_offset): Now an offset type (strong typedef) instead of a
14723         struct.
14724         (sect_offset): Likewise.
14725         (union call_site_parameter_u): Rename "param_offset" field to
14726         "param_cu_off".
14727         * unittests/offset-type-selftests.c: New file.
14728
14729 2017-04-04  Pedro Alves  <palves@redhat.com>
14730
14731         * common/underlying.h: New file.
14732         * dwarf2read.c: Include "common/gdb_optional.h" and
14733         "common/underlying.h".
14734         (dir_index, file_name_index): New types.
14735         (file_entry): Use them.
14736         (file_entry::include): Use to_underlying.
14737         (line_header::add_file_name): Use dir_index.
14738         (read_formatted_entries): Use gdb::optional.  Read form before
14739         writting to file_entry.
14740         (dwarf_decode_line_header): Use dir_index.
14741         (lnp_state_machine::current_file): Use to_underlying.
14742         (lnp_state_machine::file): Change type to file_name_index.
14743         (dwarf_record_line): Use to_underlying.
14744         (init_lnp_state_machine): Use file_name_index.
14745         (dwarf_decode_lines_1): Use dir_index and file_name_index.
14746
14747 2017-04-04  Pedro Alves  <palves@redhat.com>
14748
14749         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
14750         operator bool, has_value and get methods.
14751
14752 2017-04-04  Pedro Alves  <palves@redhat.com>
14753
14754         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
14755         fields.
14756         (line_header): Initialize all data fields.  Change type of
14757         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
14758         Change type of include_dirs to std::vector<const char *>.  Remove
14759         num_include_dirs, include_dirs_size.  Change type of file_names to
14760         std::vector<file_entry>.  Remove num_file_names, file_names_size.
14761         (line_header::line_header): New.
14762         (line_header::add_include_dir, line_header::add_file_name): New
14763         methods.
14764         (line_header::include_dir_at): Remove NULL check.
14765         (line_header::file_name_at): Add const overload.
14766         (line_header_up): New unique_ptr typedef.
14767         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
14768         std::vector.  Remove free_line_header call.
14769         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
14770         free_line_header call.
14771         (free_cu_line_header): Delete.
14772         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
14773         (setup_type_unit_groups): Use line_header_up instead of cleanups.
14774         Adjust to use std::vector.
14775         (free_line_header): Delete.
14776         (free_line_header_voidp): Use delete.
14777         (add_include_dir): Replace with ...
14778         (line_header::add_include_dir): ... this method.  Use std::vector.
14779         (add_file_name): Replace with ...
14780         (line_header::add_file_name): ... this method.  Use std::vector.
14781         (add_include_dir_stub): Delete.
14782         (read_formatted_entries): Remove memset.
14783         (dwarf_decode_line_header): Return a line_header_up instead of a
14784         raw pointer.  Remove cleanup handling.  Pass lambdas to
14785         read_formatted_entries.  Adjust to use line_header methods.
14786         (dwarf_decode_lines_1): Adjust to use line_header methods.
14787         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
14788         use std::vector.
14789
14790 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
14791
14792         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
14793         instead of struct ptid.
14794
14795 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
14796
14797         * frame.c (get_frame_register_bytes): Unwind using value.
14798         (put_frame_register_bytes): Likewise.
14799
14800 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
14801
14802         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
14803         aggregate-like.
14804
14805 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
14806
14807         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
14808
14809 2017-03-29  Yao Qi  <yao.qi@linaro.org>
14810
14811         * gdbthread.h (struct thread_info): Declare constructor and
14812         destructor.  Add some in-class member initializers.
14813         * thread.c (free_thread): Remove.
14814         (init_thread_list): Call delete instead of free_thread.
14815         (new_thread): Call thread_info constructor.
14816         (thread_info::thread_info): New function.
14817         (thread_info::~thread_info): New function.
14818         (delete_thread_1): Call delete instead of free_thread.
14819         (make_cleanup_restore_current_thread): Move tp and frame to
14820         inner block.
14821
14822 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
14823
14824         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
14825         (arc_skip_prologue): Likewise.
14826         (arc_make_frame_cache): Likewise.
14827         (arc_pv_get_operand): New function.
14828         (arc_is_in_prologue): Likewise.
14829         (arc_analyze_prologue): Likewise.
14830         (arc_print_frame_cache): Likewise.
14831         (MAX_PROLOGUE_LENGTH): New constant.
14832
14833 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
14834
14835         * configure.tgt: Add arc-insn.o.
14836         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
14837         (dump_arc_instruction_command): New function.
14838         (arc_fprintf_disasm): Likewise.
14839         (arc_disassemble_info): Likewise.
14840         (arc_insn_get_operand_value): Likewise.
14841         (arc_insn_get_operand_value_signed): Likewise.
14842         (arc_insn_get_memory_base_reg): Likewise.
14843         (arc_insn_get_memory_offset): Likewise.
14844         (arc_insn_get_branch_target): Likewise.
14845         (arc_insn_dump): Likewise.
14846         (arc_insn_get_linear_next_pc): Likewise.
14847         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
14848         (arc_disassemble_info): Likewise.
14849         (arc_insn_get_branch_target): Likewise.
14850         (arc_insn_get_linear_next_pc): Likewise.
14851         * NEWS: Mention new "maint print arc arc-instruction".
14852
14853 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
14854
14855         * arc-tdep (maintenance_print_arc_list): New variable.
14856         (maintenance_print_arc_command): New function.
14857
14858 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
14859
14860         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
14861         Add "limm" and "reserved".
14862         (arc_cannot_fetch_register, arc_cannot_store_register): Add
14863         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
14864         * arc-tdep.h (arc_regnum): Likewise.
14865
14866 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
14867
14868         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14869         for THREADPTR register.
14870         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
14871         register.
14872         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
14873         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
14874         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
14875
14876 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
14877
14878         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
14879         registers above gdbarch_num_regs (gdbarch) as privileged in
14880         call0 ABI.
14881
14882 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
14883
14884         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14885         for a single specified register or for all registers in
14886         a0_base..a0_base + C0_NREGS range.
14887         (supply_gregset_reg): Call regcache_raw_supply for a single
14888         specified register or for all registers in a0_base..a0_base +
14889         C0_NREGS range.
14890
14891 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
14892
14893         * arch/xtensa.h (C0_NREGS): Add definition.
14894         * xtensa-tdep.c (C0_NREGS): Remove definition.
14895
14896 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
14897
14898         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
14899         Drop xtensa_default_isa initialization.
14900         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
14901
14902 2017-03-27  Pedro Alves  <palves@redhat.com>
14903
14904         * dwarf2read.c (file_entry) <dir_index>: Add comment.
14905         (file_entry::include_dir): New method.
14906         (line_header::include_dir_at, line_header::file_name_at): New
14907         methods.
14908         (setup_type_unit_groups, setup_type_unit_groups)
14909         (psymtab_include_file_name): Simplify using the new methods.
14910         (lnp_state_machine) <the_line_header>: New field.
14911         <file>: Add comment.
14912         (lnp_state_machine::current_file): New method.
14913         (dwarf_record_line): Simplify using the new methods.
14914         (init_lnp_state_machine): Initialize the "the_line_header" field.
14915         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
14916         Simplify using the new methods.
14917
14918 2017-03-27  Pedro Alves  <palves@redhat.com>
14919
14920         * cp-name-parser.y (make_empty): Delete.
14921         (demangler_special, nested_name, ptr_operator, array_indicator)
14922         (direct_declarator, declarator_1): Use fill_comp instead of
14923         make_empty.
14924
14925 2017-03-27  Pedro Alves  <palves@redhat.com>
14926
14927         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
14928         to ATTRIBUTE_PRINTF.
14929         * solib-target.c (library_list_start_list): Print "string" not
14930         "version".
14931         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
14932         gdb_xml_error call.
14933
14934 2017-03-27  Pedro Alves  <palves@redhat.com>
14935
14936         * dwarf2read.c (struct file_and_directory): New.
14937         (dwarf2_get_dwz_file): Adjust to use std::string.
14938         (dw2_get_file_names_reader): Adjust to use file_and_directory.
14939         (find_file_and_directory): Adjust to return a file_and_directory
14940         object.
14941         (read_file_scope): Adjust to use file_and_directory.  Remove
14942         make_cleanup/do_cleanups calls.
14943         (open_and_init_dwp_file): Adjust to use std::string.  Remove
14944         make_cleanup/do_cleanups calls.
14945         * python/python.c (do_start_initialization): Adjust to ldirname
14946         returning a std::string.
14947         * utils.c (ldirname): Now returns a std::string.
14948         * utils.h (ldirname): Change return type to std::string.
14949         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
14950         returning a std::string.
14951         * xml-tdesc.c (file_read_description_xml): Likewise.
14952
14953 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
14954
14955         * regcache.c (regcache_debug_print_register): New function.
14956         * regcache.h (regcache_debug_print_register): New declaration.
14957         * target.c (debug_print_register): Remove.
14958         (target_fetch_registers): Call regcache_debug_print_register.
14959         (target_store_registers): Likewise.
14960
14961 2017-03-24  Pádraig Brady  <pbrady@fb.com>
14962
14963         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
14964         reference beyond the 'lh->include_dirs' array before accessing to
14965         it.
14966         (psymtab_include_file_name): Likewise.
14967         (dwarf_decode_lines_1): Likewise.
14968         (dwarf_decode_lines): Likewise.
14969         (file_file_name): Likewise.
14970
14971 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
14972
14973         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
14974         inferior_ptid.
14975         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14976         ps_lsetfpregs): Likewise.
14977         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
14978         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14979         ps_lsetfpregs): Likewise.
14980         * target.c (target_fetch_registers, target_store_registers):
14981         Remove asserts.
14982
14983 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
14984
14985         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
14986
14987 2017-03-23  Yao Qi  <yao.qi@linaro.org>
14988
14989         * aarch64-tdep.c (aarch64_process_record_test): Declare.
14990         (_initialize_aarch64_tdep): Register it.
14991         (aarch64_record_load_store): Handle PRFM instruction.
14992         (aarch64_process_record_test): New function.
14993
14994 2017-03-23  Yao Qi  <yao.qi@linaro.org>
14995
14996         * aarch64-tdep.c (aarch64_record_load_store): Fix code
14997         indentation.
14998
14999 2017-03-23  Yao Qi  <yao.qi@linaro.org>
15000
15001         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
15002
15003 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15004
15005         python/python.c (do_start_initialization): Fix memory leak.
15006
15007 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
15008
15009         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
15010         using get_ptrace_pid.
15011         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
15012         inferior_ptid.
15013         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
15014         inferior_ptid instead of pid.
15015
15016 2017-03-22  Yao Qi  <yao.qi@linaro.org>
15017
15018         * aarch64-tdep.c: Wrap locally used classes in anonymous
15019         namespace.
15020         * arm-tdep.c: Likewise.
15021         * linespec.c: Likewise.
15022         * ui-out.c: Likewise.
15023
15024 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
15025
15026         PR gdb/19637
15027         * python/lib/gdb/printer/bound_registers.py: Import sys.
15028
15029 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
15030
15031         * windows-nat.c (do_windows_fetch_inferior_registers): Add
15032         windows_thread_info parameter and use it instead of
15033         current_thread.
15034         (windows_fetch_inferior_registers): Don't set current_thread,
15035         pass the thread to do_windows_fetch_inferior_registers.  Use
15036         ptid from regcache instead of inferior_ptid.
15037         (do_windows_store_inferior_registers): Add windows_thread_info
15038         parameter and use it instead of current_thread.
15039         (windows_store_inferior_registers): Don't set current_thread,
15040         pass the thread to do_windows_store_inferior_registers.  Use
15041         ptid from regcache instead of inferior_ptid.
15042
15043 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
15044
15045         * ser-mingw.c (ser_windows_raw): Remove reference to
15046         struct serial::current_timeout.
15047
15048 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
15049
15050         PR tdep/20928
15051         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
15052         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
15053         (sparc64_fsr_type): Fix %fsr decoding.
15054
15055 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
15056
15057         * python/py-record-btrace.c (btpy_insn_data): Change return type
15058         for Python 2.
15059
15060 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
15061
15062         * spu-linux-nat.c (spu_fetch_inferior_registers,
15063         spu_store_inferior_registers): Use ptid from regcache, set and
15064         restore inferior_ptid.
15065         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
15066         Likewise.
15067
15068 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
15069
15070         * i386-linux-nat.c (fetch_register, store_register,
15071         i386_linux_fetch_inferior_registers,
15072         i386_linux_store_inferior_registers): Use ptid from regcache.
15073         * ia64-linux-nat.c (ia64_linux_fetch_register,
15074         ia64_linux_store_register): Likewise.
15075         * inf-ptrace.c (inf_ptrace_fetch_register,
15076         inf_ptrace_store_register): Likewise.
15077         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
15078         m32r_linux_store_inferior_registers): Likewise.
15079         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
15080         m68kbsd_store_inferior_registers): Likewise.
15081         * m68k-linux-nat.c (fetch_register, store_register,
15082         m68k_linux_fetch_inferior_registers,
15083         m68k_linux_store_inferior_registers): Likewise.
15084         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
15085         m88kbsd_store_inferior_registers): Likewise.
15086         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
15087         mips_fbsd_store_inferior_registers): Likewise.
15088         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
15089         mips64_linux_regsets_store_registers): Likewise.
15090         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
15091         mipsnbsd_store_inferior_registers): Likewise.
15092         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
15093         mips64obsd_store_inferior_registers): Likewise.
15094         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
15095         Likewise.
15096         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
15097         ppcfbsd_store_inferior_registers): Likewise.
15098         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
15099         ppc_linux_store_inferior_registers): Likewise.
15100         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
15101         ppcnbsd_store_inferior_registers): Likewise.
15102         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
15103         ppcobsd_store_registers): Likewise.
15104         * procfs.c (procfs_fetch_registers, procfs_store_registers):
15105         Likewise.
15106         * ravenscar-thread.c (ravenscar_fetch_registers,
15107         ravenscar_store_registers, ravenscar_prepare_to_store):
15108         Likewise.
15109         * record-btrace.c (record_btrace_fetch_registers,
15110         record_btrace_store_registers, record_btrace_prepare_to_store):
15111         Likewise.
15112         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
15113         Lookup inferior using ptid from regcache, instead of
15114         current_inferior.
15115         * remote.c (remote_fetch_registers, remote_store_registers): Use
15116         ptid from regcache.
15117         * rs6000-nat.c (fetch_register, store_register): Likewise.
15118         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
15119         s390_linux_store_inferior_registers): Likewise.
15120         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
15121         shnbsd_store_inferior_registers): Likewise.
15122         * sol-thread.c (sol_thread_fetch_registers,
15123         sol_thread_store_registers): Likewise.
15124         * sparc-nat.c (sparc_fetch_inferior_registers,
15125         sparc_store_inferior_registers): Likewise.
15126         * tilegx-linux-nat.c (fetch_inferior_registers,
15127         store_inferior_registers): Likewise.
15128         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
15129         vaxbsd_store_inferior_registers): Likewise.
15130         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
15131         store_xtregs): Likewise.
15132
15133 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15134
15135         PR gdb/14441
15136         * NEWS: Mention support for rvalue references in GDB and python.
15137         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
15138         supports both lvalue and rvalue references.
15139
15140 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15141
15142         PR gdb/14441
15143         * gdbtypes.c (rank_one_type): Implement overloading
15144         resolution rules regarding rvalue references.
15145
15146 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15147
15148         PR gdb/14441
15149         * aarch64-tdep.c (aarch64_type_align)
15150         (aarch64_extract_return_value, aarch64_store_return_value): Change
15151         lvalue reference type checks to general reference type checks.
15152         * amd64-tdep.c (amd64_classify): Likewise.
15153         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
15154         Likewise.
15155         * arm-tdep.c (arm_type_align, arm_extract_return_value)
15156         (arm_store_return_value): Likewise.
15157         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
15158         * c-typeprint.c (c_print_type): Likewise.
15159         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
15160         (cplus_number_of_children, cplus_describe_child): Likewise.
15161         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
15162         * completer.c (expression_completer): Likewise.
15163         * cp-support.c (make_symbol_overload_list_adl_namespace):
15164         Likewise.
15165         * darwin-nat-info.c (info_mach_region_command): Likewise.
15166         * dwarf2loc.c (entry_data_value_coerce_ref)
15167         (value_of_dwarf_reg_entry): Likewise.
15168         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
15169         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
15170         Likewise.
15171         * findvar.c (extract_typed_address, store_typed_address):
15172         Likewise.
15173         * gdbtypes.c (rank_one_type): Likewise.
15174         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
15175         * infcall.c (value_arg_coerce): Likewise.
15176         * language.c (pointer_type): Likewise.
15177         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
15178         Likewise.
15179         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
15180         * mn10300-tdep.c (mn10300_type_align): Likewise.
15181         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
15182         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
15183         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
15184         Likewise.
15185         * printcmd.c (print_formatted, x_command): Likewise.
15186         * python/py-type.c (typy_get_composite, typy_template_argument):
15187         Likewise.
15188         * python/py-value.c (valpy_referenced_value)
15189         (valpy_get_dynamic_type, value_has_field): Likewise.
15190         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
15191         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
15192         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
15193         * spu-tdep.c (spu_scalar_value_p): Likewise.
15194         * symtab.c (lookup_symbol_aux): Likewise.
15195         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
15196         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
15197         Likewise.
15198         * valops.c (value_cast_pointers, value_cast)
15199         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
15200         (value_struct_elt, value_struct_elt_bitpos)
15201         (value_find_oload_method_list, find_overload_match)
15202         (value_rtti_indirect_type): Likewise.
15203         * valprint.c (val_print_scalar_type_p, generic_val_print):
15204         Likewise.
15205         * value.c (value_actual_type, value_as_address, unpack_long)
15206         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
15207         (coerce_ref): Likewise.
15208         * varobj.c (varobj_get_value_type): Likewise.
15209
15210 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15211
15212         PR gdb/14441
15213         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
15214         table of constants.
15215         * python/lib/gdb/command/explore.py: Support exploring values
15216         of rvalue reference types.
15217         * python/lib/gdb/types.py: Implement get_basic_type() for
15218         rvalue reference types.
15219         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
15220         constant.
15221         * python/py-value.c (valpy_getitem): Add an rvalue reference
15222         check.
15223         (valpy_reference_value): Add new parameter "refcode".
15224         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
15225         New wrappers for valpy_reference_value().
15226         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15227         (gdbpy_invoke_xmethod): Likewise.
15228
15229 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15230
15231         PR gdb/14441
15232         * dwarf2read.c (process_die, read_type_die_1): Handle the
15233         DW_TAG_rvalue_reference_type DIE.
15234         (read_tag_reference_type): Add new parameter "refcode".
15235
15236 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15237
15238         PR gdb/14441
15239         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
15240         (c_type_print_modifier, c_type_print_varspec_suffix)
15241         (c_type_print_base): Support printing rvalue reference types.
15242         * c-valprint.c (c_val_print, c_value_print): Support printing
15243         rvalue reference values.
15244
15245 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15246
15247         PR gdb/14441
15248         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
15249         typename.
15250         * cp-support.c (replace_typedefs): Handle
15251         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
15252         * python/py-type.c (typy_lookup_type): Likewise.
15253
15254 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15255
15256         PR gdb/14441
15257         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
15258         * parse.c (insert_type): Change assert statement.
15259         (follow_types): Handle rvalue reference types.
15260         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
15261         constant.
15262
15263 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15264
15265         PR gdb/14441
15266         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
15267         value_ref() interface.
15268         * c-valprint.c (c_value_print): Likewise.
15269         * infcall.c (value_arg_coerce): Likewise.
15270         * python/py-value.c (valpy_reference_value): Likewise.
15271         * valops.c (value_cast, value_reinterpret_cast)
15272         (value_dynamic_cast, typecmp): Likewise.
15273         (value_ref): Parameterize by kind of return value reference type.
15274         * value.h (value_ref): Add new parameter "refcode".
15275
15276 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15277
15278         PR gdb/14441
15279         * dwarf2read.c (read_tag_reference_type): Use
15280         lookup_lvalue_reference_type() instead of lookup_reference_type().
15281         * eval.c (evaluate_subexp_standard): Likewise.
15282         * f-exp.y: Likewise.
15283         * gdbtypes.c (make_reference_type, lookup_reference_type):
15284         Generalize with rvalue reference types.
15285         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
15286         convenience wrappers for lookup_reference_type().
15287         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
15288         reference kind parameter.
15289         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
15290         wrappers for lookup_reference_type().
15291         * guile/scm-type.c (gdbscm_type_reference): Use
15292         lookup_lvalue_reference_type() instead of lookup_reference_type().
15293         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
15294         * parse.c (follow_types): Likewise.
15295         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
15296         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
15297         Likewise.
15298         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15299         (gdbpy_invoke_xmethod): Likewise.
15300         * stabsread.c: Provide extra argument to make_reference_type()
15301         call.
15302         * valops.c (value_ref, value_rtti_indirect_type): Use
15303         lookup_lvalue_reference_type() instead of lookup_reference_type().
15304
15305 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15306
15307         PR gdb/14441
15308         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
15309         (TYPE_IS_REFERENCE): New macro.
15310         (struct type): Add rvalue_reference_type field.
15311         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
15312
15313 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
15314
15315         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
15316         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
15317         New function definition.
15318         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
15319         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
15320         New function declaration.
15321         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
15322         * mi/mi-interp.h: New file.
15323         * solib.c (info_sharedlibrary_command): Replace for loop with
15324         ALL_SO_LIBS macro
15325         * solib.h (update_solib_list): New function declaration.
15326         (so_list_head): Move macro.
15327         * solist.h (ALL_SO_LIBS): New macro.
15328
15329 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
15330
15331         * infcmd.c (post_create_inferior): Remove unused argument in
15332         call to solib_add.
15333         * remote.c (remote_start_remote): Likewise.
15334         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
15335         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
15336         (enable_break): Likewise.
15337         * solib.c (update_solib_list): Remove unused target argument
15338         and its documentation.
15339         (solib_add): Remove unused target argument.  Remove unused
15340         argument in call to update_solib_list.
15341         (info_sharedlibrary_command): Remove unused argument in call
15342         to update_solib_list.
15343         (sharedlibrary_command): Remove unused argument in call to
15344         solib_add.
15345         (handle_solib_event): Likewise.
15346         (reload_shared_libraries): Likewise.
15347         * solib.h (solib_add): Remove unused target argument.
15348
15349 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15350
15351         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
15352         (s390_displaced_step_fixup): Cover relative branches with the
15353         default fixup handling.  This fixes lack of support for some
15354         relative branch instructions.
15355
15356 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15357
15358         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
15359         ptid from regcache.
15360
15361 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15362
15363         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
15364         i386_darwin_store_inferior_registers): Use ptid from regcache.
15365
15366 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15367
15368         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
15369         i386bsd_store_inferior_registers): Use ptid from regcache.
15370
15371 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15372
15373         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
15374         hppaobsd_store_registers): Use ptid from regcache.
15375
15376 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15377
15378         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
15379         hppanbsd_store_registers): Use ptid from regcache.
15380
15381 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15382
15383         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
15384         from regcache.  Use get_ptrace_pid.
15385
15386 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15387
15388         * corelow.c (get_core_register_section): Use ptid from regcache,
15389         update doc.
15390
15391 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15392
15393         * bsd-uthread.c (bsd_uthread_fetch_registers,
15394         bsd_uthread_store_registers): Use ptid from regcache, set and
15395         restore inferior_ptid.
15396
15397 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15398
15399         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
15400         fetch_fp_regs, store_register, store_regs, store_fp_register,
15401         store_fp_regs): Use ptid from regcache.
15402
15403 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15404
15405         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
15406         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
15407         store_vfp_regs): Use ptid from regcache.
15408
15409 2017-03-17  Pedro Alves  <palves@redhat.com>
15410
15411         PR remote/21188
15412         * ser-base.c (ser_base_wait_for): Add comment.
15413         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
15414         version.
15415         * ser-unix.c (hardwire_raw): Remove reference to
15416         scb->current_timeout.
15417         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
15418         (hardwire_ops): Install ser_base_readchar instead of
15419         hardwire_readchar.
15420         * serial.h (struct serial) <current_timeout, timeout_remaining>:
15421         Remove fields.
15422
15423 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
15424
15425         PR gdb/19637
15426         * python/lib/gdb/printer/bound_registers.py: Add support for
15427         Python 3.
15428
15429 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15430
15431         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
15432         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
15433         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
15434         byte_offset to subobj_byte_offset.  Fix the handling of
15435         DWARF_VALUE_STACK on big-endian targets when coming via an
15436         implicit pointer.
15437         (dwarf2_evaluate_loc_desc): Adjust call to
15438         dwarf2_evaluate_loc_desc_full.
15439         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
15440         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
15441
15442 2017-03-16  Yao Qi  <yao.qi@linaro.org>
15443
15444         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
15445         and REVSH instructions.
15446
15447 2017-03-16  Yao Qi  <yao.qi@linaro.org>
15448
15449         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
15450         (arm_record_test): Declare.
15451         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
15452         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
15453         align with the manual.
15454         (thumb_record_misc): Adjust the code order to align with the
15455         manual.
15456         (thumb2_record_decode_insn_handler): Fix instruction matching.
15457         (instruction_reader_thumb): New class.
15458         (arm_record_test): New function.
15459
15460 2017-03-16  Yao Qi  <yao.qi@linaro.org>
15461
15462         * arm-tdep.c (abstract_memory_reader): New class.
15463         (instruction_reader): New class.
15464         (extract_arm_insn): Add argument 'reader'.  Callers updated.
15465         (decode_insn): Likewise.
15466
15467 2017-03-16  Doug Evans  <dje@google.com>
15468
15469         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
15470         member.  Change type of TYPE member to SCM.  All uses updated.
15471         (lsscm_make_lazy_string_smob): Add assert.
15472         (lsscm_make_lazy_string): Flag bad length values.
15473         (lsscm_elt_type): New function.
15474         (gdbscm_lazy_string_to_value): Rewrite to use
15475         lsscm_safe_lazy_string_to_value.
15476         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
15477         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
15478         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
15479         in incoming type.
15480         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15481         * guile/scm-type.c (tyscm_scm_to_type): New function.
15482
15483 2017-03-15  Doug Evans  <dje@google.com>
15484
15485         PR python/17728, python/18439, python/18779
15486         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
15487         member.  Change type of TYPE member to PyObject *.  All uses updated.
15488         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
15489         (gdbpy_create_lazy_string_object): Flag bad length values.
15490         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
15491         Handle typedefs in incoming type.
15492         (stpy_lazy_string_elt_type): New function.
15493         (gdbpy_extract_lazy_string): Call it.
15494         * python/py-value.c (valpy_lazy_string): Flag bad length values.
15495         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
15496         typedefs in incoming type.
15497
15498 2017-03-16  Doug Evans  <dje@google.com>
15499
15500         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15501         * guile/scm-type.c (tyscm_scm_to_type): New function.
15502
15503 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
15504
15505         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
15506         "ULONGEST" for "skip".
15507
15508 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15509
15510         PR gdb/21220
15511         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
15512         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
15513         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
15514         over ptrace peek/poke until end of buffer or error.
15515
15516 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
15517
15518         * parse.c (length_of_subexp): Make static.
15519         * parser-defs.h (length_of_subexp): Remove.
15520
15521 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15522
15523         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
15524         as well.
15525
15526 2017-03-14  Pedro Alves  <palves@redhat.com>
15527
15528         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
15529         (main): Use std::unique_ptr.  Remove calls to
15530         cp_demangled_name_parse_free.
15531
15532 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
15533
15534         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
15535         alphabsd_store_inferior_registers): Use regcache->ptid instead
15536         of inferior_ptid.
15537
15538 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
15539
15540         * aix-thread.c (aix_thread_fetch_registers,
15541         aix_thread_store_registers): Use regcache->ptid instead of
15542         inferior_ptid.
15543
15544 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
15545
15546         * aarch64-linux-nat.c (fetch_gregs_from_thread,
15547         store_gregs_to_thread, fetch_fpregs_from_thread,
15548         store_fpregs_to_thread): Use regcache->ptid instead of
15549         inferior_ptid.
15550
15551 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
15552
15553         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
15554         amd64_linux_fetch_inferior_registers): Use regcache->ptid
15555         instead of inferior_ptid.
15556
15557 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
15558
15559         * target.c (target_fetch_registers, target_store_registers): Add
15560         assert.
15561
15562 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
15563
15564         * regcache.h (regcache_get_ptid): New function.
15565         * regcache.c (regcache_get_ptid): New function.
15566
15567 2017-03-13  Mark Wielaard  <mark@klomp.org>
15568
15569         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
15570
15571 2017-03-10  Keith Seitz  <keiths@redhat.com>
15572
15573         PR c++/8218
15574         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
15575
15576 2017-03-08  Pedro Alves  <palves@redhat.com>
15577
15578         PR gdb/18360
15579         * infrun.c (start_step_over, do_target_resume, resume)
15580         (restart_threads): Assert we're not resuming a thread that is
15581         meant to be stopped.
15582         (infrun_thread_stop_requested_callback): Delete.
15583         (infrun_thread_stop_requested): If the thread is internally
15584         stopped, queue a pending stop event and clear the thread's
15585         inline-frame state.
15586         (handle_stop_requested): New function.
15587         (handle_syscall_event, handle_inferior_event_1): Use
15588         handle_stop_requested.
15589         (handle_stop_requested): New function.
15590         (handle_signal_stop): Set the thread's stop_signal here instead of
15591         at caller.
15592         (finish_step_over): Clear step over info unconditionally.
15593         (handle_signal_stop): If the user had interrupted the event
15594         thread, consider the stop a random signal.
15595         (handle_signal_stop) <signal arrived while stepping over
15596         breakpoint>: Don't restart threads here.
15597         (stop_waiting): Don't clear step-over info here.
15598
15599 2017-03-08  Pedro Alves  <palves@redhat.com>
15600
15601         PR 21206
15602         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
15603         goes to argument 2, not 1.
15604
15605 2017-03-08  Pedro Alves  <palves@redhat.com>
15606
15607         PR cli/21218
15608         * top.c (gdb_readline_wrapper): Avoid passing NULL to
15609         display_gdb_prompt.
15610         (command_line_input): Add comment.
15611
15612 2017-03-08  Pedro Alves  <palves@redhat.com>
15613
15614         PR tui/21216
15615         * tui/tui-file.c (tui_file::write): New.
15616         * tui/tui-file.h (tui_file): Override "write".
15617         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
15618         factored out from ...
15619         (tui_puts): ... here.
15620         (tui_putc): Use them.
15621         (tui_write): New function.
15622         * tui/tui-io.h (tui_write): Declare.
15623
15624 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
15625
15626         * Makefile.in (SFILES): Replace "environ.c" with
15627         "common/environ.c".
15628         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
15629         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
15630         to...
15631         * common/environ.c: ... here.
15632         * environ.h: Moved to...
15633         * common/environ.h: ... here.
15634
15635 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
15636
15637         * gdbarch.sh (pstring_ptr): New static function.
15638         (gdbarch_disassembler_options): Use it.
15639         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
15640         not valid_disassembler_option->name.
15641         * gdbarch.c: Regenerate.
15642
15643 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
15644
15645         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
15646
15647 2017-03-07  Pedro Alves  <palves@redhat.com>
15648
15649         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
15650
15651 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15652
15653         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
15654         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
15655         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
15656         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
15657
15658 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
15659
15660         * xtensa-linux-nat.c (fetch_gregs): Remove const.
15661
15662 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
15663
15664         * remote.c (remote_add_target_side_commands): Use range-based
15665         for loop.
15666
15667 2017-03-03  Yao Qi  <yao.qi@linaro.org>
15668
15669         PR gdb/21165
15670         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
15671         value is lazy.
15672         * valprint.c (common_val_print): Likewise.
15673
15674 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
15675
15676         * NEWS: Mention new set/show disassembler-options commands.
15677         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
15678         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
15679         (prospective_options): New static variable.
15680         (gdb_disassembler::gdb_disassembler): Initialize
15681         m_di.disassembler_options.
15682         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
15683         (get_disassembler_options): New function.
15684         (set_disassembler_options): Likewise.
15685         (set_disassembler_options_sfunc): Likewise.
15686         (show_disassembler_options_sfunc): Likewise.
15687         (disassembler_options_completer): Likewise.
15688         (_initialize_disasm): Likewise.
15689         * disasm.h (get_disassembler_options): New prototype.
15690         (set_disassembler_options): Likewise.
15691         * gdbarch.sh (gdbarch_disassembler_options): New variable.
15692         (gdbarch_verify_disassembler_options): Likewise.
15693         * gdbarch.c: Regenerate.
15694         * gdbarch.h: Likewise.
15695         * arm-tdep.c (num_disassembly_options): Delete.
15696         (set_disassembly_style): Likewise.
15697         (arm_disassembler_options): New static variable.
15698         (set_disassembly_style_sfunc): Convert short style name into long
15699         option name.  Call set_disassembler_options.
15700         (show_disassembly_style_sfunc): New function.
15701         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
15702         set_gdbarch_verify_disassembler_options.
15703         (_initialize_arm_tdep): Delete regnames variable and update callers.
15704         (arm_disassembler_options): Initialize.
15705         (disasm_options): New variable.
15706         (num_disassembly_options): Rename from this...
15707         (num_disassembly_styles): ...to this.  Compute by scanning through
15708         disasm_options.
15709         (valid_disassembly_styles): Initialize using disasm_options.
15710         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
15711         set_arm_regname_option.
15712         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
15713         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
15714         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
15715         set_gdbarch_verify_disassembler_options.
15716         * s390-tdep.c (s390_disassembler_options): New static variable.
15717         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
15718         set_gdbarch_verify_disassembler_options.
15719
15720 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
15721
15722         * remote.c (remote_add_target_side_condition): Remove "struct"
15723         keyword from range-based for loop.
15724
15725 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
15726
15727         * remote.c (remote_add_target_side_condition): Use range-based
15728         for loop.  Update comment.
15729
15730 2017-02-27  Yao Qi  <yao.qi@linaro.org>
15731
15732         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
15733
15734 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
15735
15736         * regcache.c (regcache_raw_update): New function.
15737         (regcache_raw_read): Move code to regcache_raw_update.
15738         * regcache.h (regcache_raw_update): New declaration.
15739         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
15740
15741 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
15742
15743         * dwarf2read.c (create_debug_type_hash_table): Initialize
15744         header.signature and header.type_offset_in_tu.
15745
15746 2017-02-24  Pedro Alves  <palves@redhat.com>
15747
15748         * symtab.c (make_file_symbol_completion_list_1): Use
15749         add_symtab_completions.
15750
15751 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
15752
15753         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
15754
15755 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
15756
15757         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
15758         I386_MAX_REGISTER_SIZE.
15759         (i386_pseudo_register_write): Likewise.
15760         (i386_process_record): Likewise.
15761         * i387-tdep.c (i387_supply_xsave): Likewise.
15762         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
15763         (store_register): Likewise.
15764
15765 2017-02-23  Pedro Alves  <palves@redhat.com>
15766
15767         * ada-lang.c: Include "common/function-view.h".
15768         (ada_iterate_over_symbols): Adjust to use function_view as
15769         callback type.
15770         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
15771         (ada_make_symbol_completion_list): Use a lambda.
15772         (ada_exc_search_name_matches): Delete.
15773         (name_matches_regex): New.
15774         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
15775         * compile/compile-c-support.c: Include "common/function-view.h".
15776         (print_one_macro): Change prototype to accept a ui_file pointer.
15777         (write_macro_definitions): Use a lambda.
15778         * dwarf2read.c: Include "common/function-view.h".
15779         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
15780         (dw2_expand_symtabs_matching): Adjust to use function_view as
15781         callback type.
15782         * language.h: Include "common/function-view.h".
15783         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
15784         function_view as callback type.
15785         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
15786         * linespec.c: Include "common/function-view.h".
15787         (collect_info::add_symbol): New method.
15788         (struct symbol_and_data_callback, iterate_inline_only, struct
15789         symbol_matcher_data, iterate_name_matcher): Delete.
15790         (iterate_over_all_matching_symtabs): Adjust to use function_view
15791         as callback type and lambdas.
15792         (iterate_over_file_blocks): Adjust to use function_view as
15793         callback type.
15794         (decode_compound_collector): Now a class with private fields.
15795         (decode_compound_collector::release_symbols): New method.
15796         (collect_one_symbol): Rename to...
15797         (decode_compound_collector::operator()): ... this and adjust.
15798         (lookup_prefix_sym): decode_compound_collector construction bits
15799         move to decode_compound_collector ctor.  Pass the
15800         decode_compound_collector object directly as callback.  Remove
15801         cleanups and use decode_compound_collector::release_symbols
15802         instead.
15803         (symtab_collector): Now a class with private fields.
15804         (symtab_collector::release_symtabs): New method.
15805         (add_symtabs_to_list): Rename to...
15806         (symtab_collector::operator()): ... this and adjust.
15807         (collect_symtabs_from_filename): symtab_collector construction
15808         bits move to symtab_collector ctor.  Pass the symtab_collector
15809         object directly as callback.  Remove cleanups and use
15810         symtab_collector::release_symtabs instead.
15811         (collect_symbols): Delete.
15812         (add_matching_symbols_to_info): Use lambdas.
15813         * macrocmd.c (print_macro_callback): Delete.
15814         (info_macro_command): Use a lambda.
15815         (info_macros_command): Pass print_macro_definition as callable
15816         directly.
15817         (print_one_macro): Remove 'ignore' parameter.
15818         (macro_list_command): Adjust.
15819         * macrotab.c (macro_for_each_data::fn): Now a function_view.
15820         (macro_for_each_data::user_data): Delete field.
15821         (foreach_macro): Adjust to call the function_view.
15822         (macro_for_each): Adjust to use function_view as callback type.
15823         (foreach_macro_in_scope): Adjust to call the function_view.
15824         (macro_for_each_in_scope): Adjust to use function_view as callback
15825         type.
15826         * macrotab.h: Include "common/function-view.h".
15827         (macro_callback_fn): Declare a prototype instead of a pointer.
15828         Remove "user_data" parameter.
15829         (macro_for_each, macro_for_each_in_scope): Adjust to use
15830         function_view as callback type.
15831         * psymtab.c (partial_map_expand_apply)
15832         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
15833         Adjust to use function_view as callback type and to return bool.
15834         (psym_expand_symtabs_matching): Adjust to use function_view as
15835         callback types.
15836         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
15837         to use function_view as callback type and to return bool.
15838         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
15839         callback types.
15840         * symfile.c (expand_symtabs_matching): Adjust to use function_view
15841         as callback types.
15842         * symfile.h: Include "common/function-view.h".
15843         (expand_symtabs_file_matcher_ftype)
15844         (expand_symtabs_symbol_matcher_ftype)
15845         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
15846         return bool.
15847         (quick_symbol_functions::map_symtabs_matching_filename)
15848         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
15849         function_view as callback type and return bool.
15850         (expand_symtabs_matching): Adjust to use function_view as callback
15851         type.
15852         (maintenance_expand_name_matcher)
15853         (maintenance_expand_file_matcher): Delete.
15854         (maintenance_expand_symtabs): Use lambdas.
15855         * symtab.c (iterate_over_some_symtabs): Adjust to use
15856         function_view as callback types and return bool.
15857         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
15858         of a cleanup.
15859         (lookup_symtab_callback): Delete.
15860         (lookup_symtab): Use a lambda.
15861         (iterate_over_symbols): Adjust to use function_view as callback
15862         type.
15863         (struct search_symbols_data, search_symbols_file_matches)
15864         (search_symbols_name_matches): Delete.
15865         (search_symbols): Use a pair of lambdas.
15866         (struct add_name_data, add_macro_name, symbol_completion_matcher)
15867         (symtab_expansion_callback): Delete.
15868         (default_make_symbol_completion_list_break_on_1): Use lambdas.
15869         * symtab.h: Include "common/function-view.h".
15870         (iterate_over_some_symtabs): Adjust to use function_view as
15871         callback type and return bool.
15872         (iterate_over_symtabs): Adjust to use function_view as callback
15873         type.
15874         (symbol_found_callback_ftype): Remove 'data' parameter and return
15875         bool.
15876         (iterate_over_symbols): Adjust to use function_view as callback
15877         type.
15878
15879 2017-02-23  Pedro Alves  <palves@redhat.com>
15880
15881         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
15882         (%.o) <unittests/%.c>: New pattern.
15883         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
15884         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
15885         * common/function-view.h: New file.
15886         * unittests/function-view-selftests.c: New file.
15887         * configure: Regenerate.
15888
15889 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
15890
15891         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
15892         inferior_ptid.
15893         * go32-nat.c (go32_thread_alive): Likewise.
15894
15895 2017-02-23  Yao Qi  <yao.qi@linaro.org>
15896
15897         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
15898         delete.
15899
15900 2017-02-23  Yao Qi  <yao.qi@linaro.org>
15901
15902         * varobj.c (varobj_clear_saved_item): Use delete instead of
15903         xfree.
15904         (update_dynamic_varobj_children): Likewise.
15905
15906 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
15907
15908         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
15909
15910 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
15911
15912         * common/enum-flags.h (enum_flags::enum_flags): Initialize
15913         m_enum_value to 0 in default constructor.
15914
15915 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
15916
15917         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
15918         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
15919         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
15920         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
15921         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
15922         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
15923         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
15924         IS_STORE_CONDITIONAL_INSN.
15925
15926 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
15927
15928         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
15929
15930 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
15931
15932         * NEWS (Changes since GDB 7.12): Add DWARF-5.
15933
15934 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
15935
15936         * dwarf2read.c (skip_one_die, read_attribute_value)
15937         (dwarf2_const_value_attr, dump_die_shallow)
15938         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
15939         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
15940
15941 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
15942
15943         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
15944         (dwarf_parse_macro_header): Accept DWARF version 5.
15945         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
15946
15947 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
15948
15949         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
15950         DW_AT_GNU_*.
15951         * common/common-exceptions.h (enum errors): Likewise.
15952         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
15953         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
15954         (dwarf_expr_context::execute_stack_op): Likewise.
15955         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
15956         Likewise.
15957         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
15958         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
15959         (show_entry_values_debug, call_site_to_target_addr)
15960         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
15961         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
15962         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
15963         (value_of_dwarf_block_entry, indirect_pieced_value)
15964         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
15965         (disassemble_dwarf_expression): Likewise.
15966         * dwarf2read.c (process_die, inherit_abstract_dies)
15967         (read_call_site_scope): Likewise.
15968         * gdbtypes.h (struct func_type, struct call_site_parameter)
15969         (struct call_site): Likewise.
15970         * stack.c (read_frame_arg): Likewise.
15971         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
15972
15973 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
15974
15975         * defs.h (read_unsigned_leb128): New declaration.
15976         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
15977         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
15978         (dwarf2_find_location_expression): Call also
15979         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
15980         * dwarf2loc.h (dwarf2_version): New declaration.
15981         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
15982         rnglists.
15983         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
15984         .debug_rnglists.
15985         (struct dwop_section_names): Add loclists_dwo.
15986         (dwop_section_names): Add .debug_loclists.dwo.
15987         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
15988         (struct dwarf2_per_cu_data): Add dwarf_version.
15989         (struct dwo_sections): Add loclists.
15990         (struct attr_abbrev): Add implicit_const.
15991         (read_indirect_line_string): New declaration.
15992         (read_unsigned_leb128): Delete declaration.
15993         (rcuh_kind): New definition.
15994         (read_and_check_comp_unit_head): Change parameter
15995         is_debug_types_section to section_kind.
15996         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
15997         (read_comp_unit_head): Change parameter abfd to section, add parameter
15998         section_kind.  Handle DWARF-5.
15999         (error_check_comp_unit_head): Accept also DWARF version 5.
16000         (read_and_check_comp_unit_head): Change parameter
16001         is_debug_types_section to section_kind.
16002         (read_and_check_type_unit_head): Delete function.
16003         (read_abbrev_offset): Handle DWARF-5.
16004         (create_debug_type_hash_table): Add parameter section_kind.  Process
16005         only DW_UT_type.  Use signature and type_offset_in_tu from struct
16006         comp_unit_head.
16007         (create_debug_types_hash_table): Update create_debug_type_hash_table
16008         caller.
16009         (create_all_type_units): Call create_debug_type_hash_table.
16010         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
16011         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
16012         caller.
16013         (skip_one_die): Handle DW_FORM_implicit_const.
16014         (dwarf2_rnglists_process): New function.
16015         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
16016         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
16017         (read_attribute_value): Handle DW_FORM_implicit_const,
16018         DW_FORM_line_strp.
16019         (read_attribute): Handle DW_FORM_implicit_const.
16020         (read_indirect_string_at_offset_from): New function from
16021         read_indirect_string_at_offset.
16022         (read_indirect_string_at_offset): Call
16023         read_indirect_string_at_offset_from.
16024         (read_indirect_line_string_at_offset): New function.
16025         (read_indirect_string): New function comment.
16026         (read_indirect_line_string): New function.
16027         (read_unsigned_leb128): Make it global.
16028         (dwarf2_string_attr): Handle DWARF-5.
16029         (add_include_dir_stub, read_formatted_entries): New functions.
16030         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
16031         Handle DWARF-5.
16032         (per_cu_header_read_in): Update read_comp_unit_head caller.
16033         (dwarf2_version): New function.
16034         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
16035         rnglists.
16036         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
16037         fields.
16038
16039 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
16040
16041         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
16042
16043 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
16044
16045         * dwarf2read.c (dwarf2_ranges_process): New function from
16046         dwarf2_ranges_read.
16047         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
16048         dwarf2_ranges_process.
16049
16050 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
16051
16052         * dwarf2read.c (create_debug_type_hash_table): New function from
16053         create_debug_types_hash_table.
16054         (create_debug_types_hash_table): Call create_debug_type_hash_table.
16055         (create_all_type_units, open_and_init_dwo_file): Update
16056         create_debug_types_hash_table callers.
16057
16058 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
16059
16060         PR gdb/16188
16061         * fork-child.c (trace_start_error): Fix thinko.  va_end should
16062         refer to 'ap', not 'args'.
16063
16064 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
16065             Pedro Alves  <palves@redhat.com>
16066
16067         PR gdb/16188
16068         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
16069         calls succeeded.
16070         * fork-child.c (trace_start_error): New function.
16071         (trace_start_error_with_name): Likewise.
16072         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
16073         * inf-ptrace.c (inf_ptrace_me): Likewise.
16074         * inferior.h (trace_start_error): New prototype.
16075         (trace_start_error_with_name): Likewise.
16076
16077 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
16078
16079         PR gdb/21164
16080         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
16081         NULL before using it.
16082         * symmisc.c (maintenance_print_symbols): Likewise.
16083         (maintenance_print_msymbols): Likewise.
16084
16085 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
16086
16087         * NEWS: Add record Python bindings entry.
16088
16089 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
16090
16091         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
16092         py-record-full.o.
16093         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
16094         * python/py-record-btrace.c, python/py-record-btrace.h,
16095         python/py-record-full.c, python/py-record-full.h: New file.
16096         * python/py-record.c: Add include for py-record-btrace.h and
16097         py-record-full.h.
16098         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
16099         recpy_instruction_history, recpy_function_call_history, recpy_begin,
16100         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
16101         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
16102         New definition.
16103         (gdbpy_initialize_btrace): New export.
16104         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
16105
16106 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
16107
16108         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
16109         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
16110         * python/py-record.c: New file.
16111         * python/python-internal.h (gdbpy_start_recording,
16112         gdbpy_current_recording, gdpy_stop_recording,
16113         gdbpy_initialize_record): New export.
16114         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
16115         (python_GdbMethods): Add gdbpy_start_recording,
16116         gdbpy_current_recording and gdbpy_stop_recording.
16117
16118 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
16119
16120         * record-btrace.c (record_btrace_record_method): New function.
16121         (init_record_btrace_ops): Initialize to_record_method.
16122         * record-full.c (record_full_record_method): New function.
16123         (init_record_full_ops, init_record_full_core_ops): Add
16124         record_full_record_method.
16125         * record.h (enum record_method): New enum.
16126         * target-debug.h (target_debug_print_enum_record_method: New define.
16127         * target-delegates.c: Regenerate.
16128         * target.c (target_record_method): New function.
16129         * target.h: Include record.h.
16130         (struct target_ops) <to_record_method>: New field.
16131         (target_record_method): New export.
16132
16133 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
16134
16135         * record.h (record_start, record_stop): New export.
16136         * record.c (record_start, record_stop): New function.
16137
16138 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
16139
16140         * btrace.c (btrace_fetch): Copy function call segments pointer
16141         into a vector.
16142         (btrace_clear): Clear the vector.
16143         (btrace_find_insn_by_number): Use binary search to find the correct
16144         function call segment.
16145         * btrace.h (brace_fun_p): New typedef.
16146         (struct btrace_thread_info) <functions>: New field.
16147
16148 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
16149
16150         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
16151         * btrace.c (btrace_decode_error): ... here.  New function.
16152         * btrace.h (btrace_decode_error): New export.
16153
16154 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
16155
16156         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
16157         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
16158         btrace_find_insn_by_number): Remove special case for gaps.
16159         * btrace.h (btrace_insn_get_error): New export.
16160         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
16161         * record-btrace.c (btrace_insn_history): Print number for gaps.
16162         (record_btrace_info, record_btrace_goto): Handle gaps.
16163
16164 2017-02-14  Tom Tromey  <tom@tromey.com>
16165
16166         PR python/13598:
16167         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
16168         event.
16169         * python/py-evts.c (gdbpy_initialize_py_events): Add
16170         before_prompt registry.
16171         * python/py-events.h (events_object) <before_prompt>: New field.
16172
16173 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
16174
16175         * btrace.c (ftrace_new_switch): Preserve up link and flags.
16176
16177 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
16178
16179         * symfile (_initialize_symfile): Add usage text to the load command's
16180         help text.
16181
16182 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
16183
16184         * utils.c (defaulted_query): Don't query on secondary UIs.
16185
16186 2017-02-10  Tom Tromey  <tom@tromey.com>
16187
16188         * rust-lang.c (rust_get_disr_info): Remove unused variable.
16189
16190 2017-02-10  Tom Tromey  <tom@tromey.com>
16191
16192         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
16193         "cleanup" local.
16194         * python/py-type.c (typy_legacy_template_argument): Remove
16195         unnecessary "cleanup" local.
16196
16197 2017-02-10  Tom Tromey  <tom@tromey.com>
16198
16199         * python/python.c (do_start_initialization): New function, from
16200         _initialize_python.
16201         (_initialize_python): Call do_start_initialization.
16202         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
16203         goto.
16204
16205 2017-02-10  Tom Tromey  <tom@tromey.com>
16206
16207         * python/py-prettyprint.c (pretty_print_one_value): Use
16208         gdbpy_ref.
16209
16210 2017-02-10  Tom Tromey  <tom@tromey.com>
16211
16212         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
16213         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
16214         gdbpy_ref.
16215         * python/py-type.c (field_new): Use gdbpy_ref.
16216         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
16217         gdbpy_ref.
16218         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
16219         (py_free_pspace): Likewise.
16220         (pspace_to_pspace_object): Likewise.
16221         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
16222         (py_free_objfile): Likewise.
16223         (objfile_to_objfile_object): Likewise.
16224         * python/py-inferior.c (delete_thread_object): Use
16225         gdbpy_ref.
16226         (infpy_read_memory): Likewise.
16227         (py_free_inferior): Likewise.
16228         * python/py-evtregistry.c (create_eventregistry_object): Use
16229         gdbpy_ref.
16230         * python/py-event.c (create_event_object): Use gdbpy_ref.
16231
16232 2017-02-10  Tom Tromey  <tom@tromey.com>
16233
16234         * python/py-ref.h (gdbpy_ref_policy): Now a template.
16235         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
16236         used.
16237         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
16238         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
16239         python/py-exitedevent.c, python/py-finishbreakpoint.c,
16240         python/py-framefilter.c, python/py-function.c,
16241         python/py-inferior.c, python/py-infevents.c,
16242         python/py-linetable.c, python/py-newobjfileevent.c,
16243         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
16244         python/py-signalevent.c, python/py-stopevent.c,
16245         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
16246         python/py-unwind.c, python/py-utils.c, python/py-value.c,
16247         python/py-varobj.c, python/py-xmethods.c, python/python.c,
16248         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
16249
16250 2017-02-10  Tom Tromey  <tom@tromey.com>
16251
16252         * ui-out.h (ui_out_emit_type): New class.
16253         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
16254         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
16255         and ui_out_emit_tuple.
16256         (enumerate_locals): Likewise.
16257         (py_mi_print_variables, py_print_locals, py_print_args): Use
16258         ui_out_emit_list.
16259         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
16260         ui_out_emit_list.
16261         * common/gdb_optional.h: New file.
16262
16263 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
16264
16265         * MAINTAINERS (Write After Approval): Update my e-mail address.
16266
16267 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
16268
16269         PR gdb/21122
16270         * breakpoint.c (_initialize_breakpoint): Update the help description
16271         of the 'commands' command to indicate that it takes a list argument.
16272
16273 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
16274
16275         * interps.c (current_interp_set_logging): Remove "return".
16276
16277 2017-02-09  Gary Benson  <gbenson@redhat.com>
16278
16279         * symtab.c (add_symtab_completions): Prevent NULL pointer
16280         dereference.
16281
16282 2017-02-08  Pedro Alves  <palves@redhat.com>
16283
16284         * interps.c (interp::interp): Remove reference to quiet_p.
16285         (interp_set): Make static.  Remove dead "Switching to" output
16286         code.
16287         (interp_quiet_p, interp_set_quiet): Delete.
16288         (interpreter_exec_cmd): Don't set the interpreter quiet.
16289         * interps.h (interp_quiet_p): Make static.
16290         (class interp) <quiet_p>: Remove field
16291
16292 2017-02-08  Jerome Guitton  <guitton@adacore.com>
16293
16294         * cli/cli-decode.c (find_command_name_length): Make it extern.
16295         * cli/cli-decode.h (find_command_name_length): Declare.
16296         * cli/cli-script.c (command_name_equals, line_first_arg):
16297         New functions.
16298         (process_next_line): Use cli-decode to parse command names.
16299         (build_command_line): Make args a constant pointer.
16300
16301 2017-02-08  Jerome Guitton  <guitton@adacore.com>
16302
16303         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
16304         Remove case-insensitive search.
16305
16306 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
16307
16308         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
16309         at the end of the line.  Avoids an ARI warning.
16310
16311 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
16312
16313         * NEWS: Mention support for record/replay of Intel 64 rdrand and
16314         rdseed instructions.
16315         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
16316
16317 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
16318
16319         PR tdep/20936
16320         Provide and use sparc32 and sparc64 target description XML files.
16321         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
16322         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
16323         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
16324         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
16325         * features/sparc/sparc32-solaris.xml: New file.
16326         * features/sparc/sparc64-solaris.xml: New file.
16327         * features/sparc/sparc32-solaris.c: Generated.
16328         * features/sparc/sparc64-solaris.c: Generated.
16329         * sparc-tdep.h: Account for differences in target descriptions.
16330         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
16331         (sparc32_register_type): Use target provided registers.
16332         (validate_tdesc_registers): New function.
16333         (sparc32_gdbarch_init): Use tdesc_has_registers.
16334         Set pseudoregister functions.
16335         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
16336         (sparc64_register_type): Use target provided registers.
16337         (sparc64_init_abi): Set pseudoregister functions.
16338
16339 2017-02-03  Tom Tromey  <tom@tromey.com>
16340
16341         PR rust/21097:
16342         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
16343         with a single member.
16344
16345 2017-02-03  Pedro Alves  <palves@redhat.com>
16346
16347         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
16348         (cli_interp_base::~cli_interp_base): New.
16349         (cli_interp): New struct.
16350         (as_cli_interp): Cast the interp itself to cli_interp.
16351         (cli_interpreter_pre_command_loop): Rename to ...
16352         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
16353         parameter.
16354         (cli_interpreter_init): Rename to ...
16355         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
16356         boolean.  Make extern.
16357         (cli_interpreter_resume): Rename to ...
16358         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
16359         extern.
16360         (cli_interpreter_suspend): Rename to ...
16361         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
16362         extern.
16363         (cli_interpreter_exec): Rename to ...
16364         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
16365         extern.
16366         (cli_interpreter_supports_command_editing): Rename to ...
16367         (cli_interp_base::supports_command_editing): ... this.  Remove
16368         'interp' parameter.  Make extern.
16369         (cli_ui_out): Rename to ...
16370         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
16371         Make extern.
16372         (cli_set_logging): Rename to ...
16373         (cli_interp_base::set_logging): ... this.  Remove 'interp'
16374         parameter.  Make extern.
16375         (cli_interp_procs): Delete.
16376         (cli_interp_factory): Adjust to use "new".
16377         * cli/cli-interp.h: Include "interps.h".
16378         (struct cli_interp_base): New struct.
16379         * interps.c (struct interp): Delete.  Fields moved to interps.h.
16380         (interp_new): Delete.
16381         (interp::interp, interp::~interp): New.
16382         (interp_set): Use bool, and return void.  Assume the interpreter
16383         has suspend, init and resume methods, and that the all return
16384         void.
16385         (set_top_level_interpreter): interp_set returns void.
16386         (interp_ui_out): Adapt.
16387         (current_interp_set_logging): Adapt.
16388         (interp_data): Delete.
16389         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
16390         (interp_exec): Adapt.
16391         (top_level_interpreter_data): Delete.
16392         * interps.h (interp_init_ftype, interp_resume_ftype)
16393         (interp_suspend_ftype, interp_exec_ftype)
16394         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
16395         (class interp): New.
16396         (interp_new): Delete.
16397         (interp_set): Now returns void.  Use bool.
16398         (interp_data, top_level_interpreter_data): Delete.
16399         * mi/mi-common.h: Include interps.h.
16400         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
16401         init, resume, suspect, exec, interp_ui_out, set_logging and
16402         pre_command_loop methods.
16403         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
16404         (mi_interpreter_init): Rename to ...
16405         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
16406         bool, return void and make extern.  Adjust.
16407         (mi_interpreter_resume): ... Rename to ...
16408         (mi_interp::resume): ... this.  Remove the 'data' parameter,
16409         return void and make extern.  Adjust.
16410         (mi_interpreter_suspend): ... Rename to ...
16411         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
16412         return void and make extern.  Adjust.
16413         (mi_interpreter_exec): ... Rename to ...
16414         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
16415         extern.  Adjust.
16416         (mi_interpreter_pre_command_loop): ... Rename to ...
16417         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
16418         parameter and make extern.
16419         (mi_on_normal_stop_1): Adjust.
16420         (mi_ui_out): Rename to ...
16421         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
16422         parameter and make extern.  Adjust.
16423         (mi_set_logging): Rename to ...
16424         (mi_interp::set_logging): ... this.  Remove the 'interp'
16425         parameter and make extern.  Adjust.
16426         (mi_interp_procs): Delete.
16427         (mi_interp_factory): Adjust to use 'new'.
16428         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
16429         (mi_print_exception, mi_execute_command, mi_load_progress):
16430         Adjust.
16431         * tui/tui-interp.c (tui_interp): New class.
16432         (as_tui_interp): Return a tui_interp pointer.
16433         (tui_on_normal_stop, tui_on_signal_received)
16434         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
16435         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
16436         to use interp::interp_ui_out.
16437         (tui_init): Rename to ...
16438         (tui_interp::init): ... this.  Remove the 'self' parameter, use
16439         bool, return void and make extern.  Adjust.
16440         (tui_resume): Rename to ...
16441         (tui_interp::resume): ... this.  Remove the 'data' parameter,
16442         return void and make extern.  Adjust.
16443         (tui_suspend): Rename to ...
16444         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
16445         return void and make extern.  Adjust.
16446         (tui_ui_out): Rename to ...
16447         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
16448         parameter, and make extern.  Adjust.
16449         (tui_exec): Rename to ...
16450         (tui_interp::exec): ... this.  Remove the 'data' parameter and
16451         make extern.
16452         (tui_interp_procs): Delete.
16453         (tui_interp_factory): Use "new".
16454
16455 2017-02-02  Tom Tromey  <tom@tromey.com>
16456
16457         * rust-exp.y (ends_raw_string, space_then_number)
16458         (rust_identifier_start_p): Return bool.
16459         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
16460         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
16461         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
16462         (rust_chartype_p): Return bool.
16463         (val_print_struct, rust_print_struct_def, rust_print_type):
16464         Update.
16465         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
16466         Return bool.
16467
16468 2017-02-02  Tom Tromey  <tom@tromey.com>
16469
16470         * rust-lang.c: Reindent.
16471
16472 2017-02-02  Tom Tromey  <tom@tromey.com>
16473
16474         * rust-lang.h (rust_crate_for_block): Update.
16475         * rust-lang.c (rust_crate_for_block): Return std::string.
16476         (rust_get_disr_info): Use std:;string, not
16477         gdb::unique_xmalloc_ptr.
16478         * rust-exp.y (crate_name): Update.
16479
16480 2017-02-02  Pedro Alves  <palves@redhat.com>
16481
16482         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
16483         field out of gdb_disassembler_test and make it static.
16484
16485 2017-02-02  Pedro Alves  <palves@redhat.com>
16486
16487         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
16488         mi1_interp and mi_interp fields.
16489
16490 2017-02-02  Pedro Alves  <palves@redhat.com>
16491
16492         * cli/cli-interp.c (struct saved_output_files, saved_output):
16493         Moved from cli/cli-logging.c.
16494         (cli_set_logging): New function.
16495         (cli_interp_procs): Install cli_set_logging.
16496         * cli/cli-interp.h (make_logging_output, cli_set_logging):
16497         Declare.
16498         * cli/cli-logging.c (struct saved_output_files, saved_output):
16499         Moved to cli/cli-interp.c.
16500         (pop_output_files): Don't save outputs here.
16501         (make_logging_output): New function.
16502         (handle_redirections): Don't build tee nor save previous outputs
16503         here.
16504         * interps.c (current_interp_set_logging): Change prototype.
16505         Assume there's always a set_logging_proc method installed.
16506         * interps.h (interp_set_logging_ftype): Change prototype.
16507         (current_interp_set_logging): Change prototype and adjust comment.
16508         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
16509         use make_logging_output.
16510         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
16511 2017-02-02  Pedro Alves  <palves@redhat.com>
16512
16513         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
16514         from ...
16515         (set_logging_overwrite): ... here.
16516         (logging_no_redirect_file): Delete.
16517         (set_logging_redirect): Don't handle redirection on the fly.
16518         Instead warn that "logging off" / "logging on" is necessary.
16519         (pop_output_files): Delete references to logging_no_redirect_file.
16520         (show_logging_command): Always speak in terms of what will happen
16521         once logging is reenabled.
16522
16523 2017-02-02  Pedro Alves  <palves@redhat.com>
16524
16525         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
16526
16527 2017-02-02  Pedro Alves  <palves@redhat.com>
16528
16529         * disasm.c (gdb_pretty_print_insn): Rename to ...
16530         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
16531         Remove gdbarch parameter.  Adapt to clear the object's buffers
16532         instead of allocating new buffers, and to print using the object's
16533         gdb_disassembler instead of calling gdb_print_insn.
16534         (dump_insns): Use gdb_pretty_print_disassembler.
16535         * disasm.h (gdb_pretty_print_insn): Delete declaration.
16536         (gdb_pretty_print_disassembler): New class.
16537         * record-btrace.c (btrace_insn_history): Use
16538         gdb_pretty_print_disassembler.
16539
16540 2017-02-02  Pedro Alves  <palves@redhat.com>
16541
16542         * ada-lang.c (type_as_string): Use string_file.
16543         * ada-valprint.c (ada_print_floating): Use string_file.
16544         * ada-varobj.c (ada_varobj_scalar_image)
16545         (ada_varobj_get_value_image): Use string_file.
16546         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
16547         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
16548         * breakpoint.c (update_inserted_breakpoint_locations)
16549         (insert_breakpoint_locations, reattach_breakpoints)
16550         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
16551         (print_it_watchpoint): Use string_file.
16552         (save_breakpoints): Use stdio_file.
16553         * c-exp.y (oper): Use string_file.
16554         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
16555         tee_file.
16556         (pop_output_files): Use delete.
16557         (handle_redirections): Use stdio_file and tee_file.
16558         * cli/cli-setshow.c (do_show_command): Use string_file.
16559         * compile/compile-c-support.c (c_compute_program): Use
16560         string_file.
16561         * compile/compile-c-symbols.c (generate_vla_size): Take a
16562         'string_file &' instead of a 'ui_file *'.
16563         (generate_c_for_for_one_variable): Take a 'string_file &' instead
16564         of a 'ui_file *'.  Use string_file.
16565         (generate_c_for_variable_locations): Take a 'string_file &'
16566         instead of a 'ui_file *'.
16567         * compile/compile-internal.h (generate_c_for_for_one_variable):
16568         Take a 'string_file &' instead of a 'ui_file *'.
16569         * compile/compile-loc2c.c (push, pushf, unary, binary)
16570         (print_label, pushf_register_address, pushf_register)
16571         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
16572         'ui_file *'.  Adjust.
16573         * compile/compile.c (compile_to_object): Use string_file.
16574         * compile/compile.h (compile_dwarf_expr_to_c)
16575         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
16576         'ui_file *'.
16577         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
16578         (replace_typedefs_qualified_name): Use string_file and
16579         obstack_copy0.
16580         * disasm.c (gdb_pretty_print_insn): Use string_file.
16581         (gdb_disassembly): Adjust reference the null_stream global.
16582         (do_ui_file_delete): Delete.
16583         (gdb_insn_length): Use null_stream.
16584         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
16585         * dwarf2loc.c (dwarf2_compile_property_to_c)
16586         (locexpr_generate_c_location, loclist_generate_c_location): Take a
16587         'string_file &' instead of a 'ui_file *'.
16588         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
16589         * dwarf2read.c (do_ui_file_peek_last): Delete.
16590         (dwarf2_compute_name): Use string_file.
16591         * event-top.c (gdb_setup_readline): Use stdio_file.
16592         * gdbarch.sh (verify_gdbarch): Use string_file.
16593         * gdbtypes.c (safe_parse_type): Use null_stream.
16594         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
16595         string_file.
16596         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
16597         'string_file *' instead of a 'ui_file *'.
16598         (gdbscm_arch_disassemble): Use string_file.
16599         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
16600         * guile/scm-ports.c (class ioscm_file_port): Now a class that
16601         inherits from ui_file.
16602         (ioscm_file_port_delete, ioscm_file_port_rewind)
16603         (ioscm_file_port_put): Delete.
16604         (ioscm_file_port_write): Rename to ...
16605         (ioscm_file_port::write): ... this.  Remove file_port_magic
16606         checks.
16607         (ioscm_file_port_new): Delete.
16608         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
16609         ui_file_up.
16610         * guile/scm-type.c (tyscm_type_name): Use string_file.
16611         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
16612         Use string_file.
16613         * infcmd.c (print_return_value_1): Use string_file.
16614         * infrun.c (print_target_wait_results): Use string_file.
16615         * language.c (add_language): Use string_file.
16616         * location.c (explicit_to_string_internal): Use string_file.
16617         * main.c (captured_main_1): Use null_file.
16618         * maint.c (maintenance_print_architecture): Use stdio_file.
16619         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
16620         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
16621         event_channel>: Change type to mi_console_file pointer.
16622         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
16623         (mi_console_file_delete): Delete.
16624         (struct mi_console_file): Delete.
16625         (mi_console_file_magic): Delete.
16626         (mi_console_file_new): Delete.
16627         (mi_console_file::mi_console_file): New.
16628         (mi_console_file_delete): Delete.
16629         (mi_console_file_fputs): Delete.
16630         (mi_console_file::write): New.
16631         (mi_console_raw_packet): Delete.
16632         (mi_console_file::flush): New.
16633         (mi_console_file_flush): Delete.
16634         (mi_console_set_raw): Rename to ...
16635         (mi_console_file::set_raw): ... this.
16636         * mi/mi-console.h (class mi_console_file): New class.
16637         (mi_console_file_new, mi_console_set_raw): Delete.
16638         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
16639         (mi_set_logging): Use delete and tee_file.  Adjust.
16640         * mi/mi-main.c (output_register): Use string_file.
16641         (mi_cmd_data_evaluate_expression): Use string_file.
16642         (mi_cmd_data_read_memory): Use string_file.
16643         (mi_cmd_execute, print_variable_or_computed): Use string_file.
16644         * mi/mi-out.c (mi_ui_out::main_stream): New.
16645         (mi_ui_out::rewind): Use main_stream and
16646         string_file.
16647         (mi_ui_out::put): Use main_stream and string_file.
16648         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
16649         Allocate a 'string_file' instead.
16650         (mi_out_new): Don't allocate a mem_fileopen stream here.
16651         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
16652         (mi_ui_out::main_stream): Declare method.
16653         * printcmd.c (eval_command): Use string_file.
16654         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
16655         * python/py-arch.c (archpy_disassemble): Use string_file.
16656         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
16657         * python/py-frame.c (frapy_str): Use string_file.
16658         * python/py-framefilter.c (py_print_type, py_print_single_arg):
16659         Use string_file.
16660         * python/py-type.c (typy_str): Use string_file.
16661         * python/py-unwind.c (unwind_infopy_str): Use string_file.
16662         * python/py-value.c (valpy_str): Use string_file.
16663         * record-btrace.c (btrace_insn_history): Use string_file.
16664         * regcache.c (regcache_print): Use stdio_file.
16665         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
16666         * remote.c (escape_buffer): Use string_file.
16667         * rust-lang.c (rust_get_disr_info): Use string_file.
16668         * serial.c (serial_open_ops_1): Use stdio_file.
16669         (do_serial_close): Use delete.
16670         * stack.c (print_frame_arg): Use string_file.
16671         (print_frame_args): Remove local mem_fileopen stream, not used.
16672         (print_frame): Use string_file.
16673         * symmisc.c (maintenance_print_symbols): Use stdio_file.
16674         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
16675         Take a 'string_file *' instead of a 'ui_file *'.
16676         * top.c (new_ui): Use stdio_file and stderr_file.
16677         (free_ui): Use delete.
16678         (execute_command_to_string): Use string_file.
16679         (quit_confirm): Use string_file.
16680         * tracepoint.c (collection_list::append_exp): Use string_file.
16681         * tui/tui-disasm.c (tui_disassemble): Use string_file.
16682         * tui/tui-file.c: Don't include "ui-file.h".
16683         (enum streamtype, struct tui_stream): Delete.
16684         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
16685         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
16686         (tui_file::tui_file): New method.
16687         (tui_file_fputs): Delete.
16688         (tui_file_get_strbuf): Delete.
16689         (tui_file::puts): New method.
16690         (tui_file_adjust_strbuf): Delete.
16691         (tui_file_flush): Delete.
16692         (tui_file::flush): New method.
16693         * tui/tui-file.h: Tweak intro comment.
16694         Include ui-file.h.
16695         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
16696         (tui_file_adjust_strbuf): Delete declarations.
16697         (class tui_file): New class.
16698         * tui/tui-io.c (tui_initialize_io): Use tui_file.
16699         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
16700         (tui_register_format): Use string_stream.
16701         * tui/tui-stack.c (tui_make_status_line): Use string_file.
16702         (tui_get_function_from_frame): Use string_file.
16703         * typeprint.c (type_to_string): Use string_file.
16704         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
16705         (null_stream): New global.
16706         (ui_file_delete): Delete.
16707         (ui_file::ui_file): New.
16708         (null_file_isatty): Delete.
16709         (ui_file::~ui_file): New.
16710         (null_file_rewind): Delete.
16711         (ui_file::printf): New.
16712         (null_file_put): Delete.
16713         (null_file_flush): Delete.
16714         (ui_file::putstr): New.
16715         (null_file_write): Delete.
16716         (ui_file::putstrn): New.
16717         (null_file_read): Delete.
16718         (ui_file::putc): New.
16719         (null_file_fputs): Delete.
16720         (null_file_write_async_safe): Delete.
16721         (ui_file::vprintf): New.
16722         (null_file_delete): Delete.
16723         (null_file::write): New.
16724         (null_file_fseek): Delete.
16725         (null_file::puts): New.
16726         (ui_file_data): Delete.
16727         (null_file::write_async_safe): New.
16728         (gdb_flush, ui_file_isatty): Adjust.
16729         (ui_file_put, ui_file_rewind): Delete.
16730         (ui_file_write): Adjust.
16731         (ui_file_write_for_put): Delete.
16732         (ui_file_write_async_safe, ui_file_read): Adjust.
16733         (ui_file_fseek): Delete.
16734         (fputs_unfiltered): Adjust.
16735         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
16736         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
16737         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
16738         (set_ui_file_data): Delete.
16739         (string_file::~string_file, string_file::write)
16740         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
16741         (do_ui_file_as_string, ui_file_as_string): Delete.
16742         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
16743         (struct mem_file): Delete.
16744         (mem_file_new): Delete.
16745         (stdio_file::stdio_file): New.
16746         (mem_file_delete): Delete.
16747         (stdio_file::stdio_file): New.
16748         (mem_fileopen): Delete.
16749         (stdio_file::~stdio_file): New.
16750         (mem_file_rewind): Delete.
16751         (stdio_file::set_stream): New.
16752         (mem_file_put): Delete.
16753         (stdio_file::open): New.
16754         (mem_file_write): Delete.
16755         (stdio_file_magic, struct stdio_file): Delete.
16756         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
16757         (stdio_file::flush): New.
16758         (stdio_file_read): Rename to ...
16759         (stdio_file::read): ... this.  Adjust.
16760         (stdio_file_write): Rename to ...
16761         (stdio_file::write): ... this.  Adjust.
16762         (stdio_file_write_async_safe): Rename to ...
16763         (stdio_file::write_async_safe) ... this.  Adjust.
16764         (stdio_file_fputs): Rename to ...
16765         (stdio_file::puts) ... this.  Adjust.
16766         (stdio_file_isatty): Delete.
16767         (stdio_file_fseek): Delete.
16768         (stdio_file::isatty): New.
16769         (stderr_file_write): Rename to ...
16770         (stderr_file::write) ... this.  Adjust.
16771         (stderr_file_fputs): Rename to ...
16772         (stderr_file::puts) ... this.  Adjust.
16773         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
16774         (stderr_file::stderr_file): New.
16775         (tee_file_magic): Delete.
16776         (struct tee_file): Delete.
16777         (tee_file::tee_file): New.
16778         (tee_file_new): Delete.
16779         (tee_file::~tee_file): New.
16780         (tee_file_delete): Delete.
16781         (tee_file_flush): Rename to ...
16782         (tee_file::flush): ... this.  Adjust.
16783         (tee_file_write): Rename to ...
16784         (tee_file::write): ... this.  Adjust.
16785         (tee_file::write_async_safe): New.
16786         (tee_file_fputs): Rename to ...
16787         (tee_file::puts): ... this.  Adjust.
16788         (tee_file_isatty): Rename to ...
16789         (tee_file::isatty): ... this.  Adjust.
16790         * ui-file.h (struct obstack, struct ui_file): Don't
16791         forward-declare.
16792         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
16793         (ui_file_write_ftype)
16794         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
16795         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
16796         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
16797         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
16798         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
16799         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
16800         (set_ui_file_fseek): Delete.
16801         (ui_file_data, ui_file_delete, ui_file_rewind)
16802         (struct ui_file): New.
16803         (ui_file_up): New.
16804         (class null_file): New.
16805         (null_stream): Declare.
16806         (ui_file_write_for_put, ui_file_put): Delete.
16807         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
16808         Delete.
16809         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
16810         (gdb_fopen, tee_file_new): Delete.
16811         (struct string_file): New.
16812         (struct stdio_file): New.
16813         (stdio_file_up): New.
16814         (struct stderr_file): New.
16815         (class tee_file): New.
16816         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
16817         of a 'ui_file *'.  Adjust.
16818         * ui-out.h (class ui_out) <field_stream>: Likewise.
16819         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
16820         (null_stream): Delete.
16821         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
16822         Adjust.
16823         * utils.h (struct ui_file): Delete forward declaration..
16824         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
16825         (error_stream): Take a 'string_file &' instead of a
16826         'ui_file *'.
16827         * varobj.c (varobj_value_get_print_value): Use string_file.
16828         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
16829         * gdbarch.c: Regenerate.
16830
16831 2017-02-02  Pedro Alves  <palves@redhat.com>
16832
16833         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
16834         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
16835         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
16836         Adjust to call gdb_print_insn instead of
16837         gdb_disassembler::print_insn.
16838         (dump_insns, do_mixed_source_and_assembly_deprecated)
16839         (do_mixed_source_and_assembly, do_assembly_only): Add back a
16840         'gdbarch' parameter.  Remove gdb_disassembler parameter.
16841         (gdb_disassembly): Don't allocate a gdb_disassembler here.
16842         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
16843         declaration.
16844         (gdb_pretty_print_insn): Re-add declaration.
16845         * record-btrace.c (btrace_insn_history): Don't allocate a
16846         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
16847
16848 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
16849
16850         * disasm.h (gdb_disassembly): Remove file_string parameter.
16851         * disasm.c (gdb_disassembly): Likewise.
16852         * cli/cli-cmds.c (print_disassembly): Adapt.
16853         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
16854         * stack.c (do_gdb_disassembly): Likewise.
16855
16856 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
16857
16858         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
16859         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
16860         targets.  And if the implicit value is longer than needed, extract
16861         the first bytes instead of the "least significant" ones.
16862
16863 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
16864
16865         * btrace.c (btrace_enable): Do not call btrace_add_pc for
16866         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
16867         (btrace_fetch): Assert can_access_registers_ptid.
16868         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
16869         validate_registers_access.
16870
16871 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
16872
16873         * gdbthread.h (can_access_registers_ptid): New.
16874         * thread.c (can_access_registers_ptid): New.
16875
16876 2017-02-01  Pedro Alves  <palves@redhat.com>
16877
16878         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
16879
16880 2017-01-31  Pedro Alves  <palves@redhat.com>
16881
16882         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
16883         Fix typos.
16884
16885 2017-01-31  Pedro Alves  <palves@redhat.com>
16886
16887         * stack.c (print_frame_args): Remove local mem_fileopen stream,
16888         not used.
16889
16890 2017-01-31  Pedro Alves  <palves@redhat.com>
16891
16892         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
16893
16894 2017-01-31  Pedro Alves  <palves@redhat.com>
16895
16896         * common/scoped_restore.h
16897         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
16898         change the value's parameter type to T2.
16899         (make_scoped_restore): Likewise.
16900
16901 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
16902             Richard Henderson  <rth@redhat.com>
16903
16904         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
16905         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
16906         GS_BASE for older kernels.
16907         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
16908         GS_BASE for older kernels.
16909         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
16910         and GS_BASE to the offset table.
16911         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
16912         system register group.
16913         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
16914         for older kernels.
16915         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
16916         amd64 ABI.
16917         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
16918         AMD64_GSBASE_REGNUM.
16919         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
16920         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
16921         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
16922         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
16923         i386/64bit-segments.xml in those rules.
16924         * features/i386/64bit-segments.xml: New file.
16925         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
16926         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
16927         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
16928         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
16929         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
16930         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
16931         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
16932         * features/i386/amd64-avx-linux.c: Regenerated.
16933         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
16934         * features/i386/amd64-avx-mpx.c: Regenerated.
16935         * features/i386/amd64-avx512-linux.c: Regenerated.
16936         * features/i386/amd64-linux.c: Regenerated.
16937         * features/i386/amd64-mpx-linux.c: Regenerated.
16938         * features/i386/i386-avx-mpx-linux.c: Regenerated.
16939         * features/i386/i386-avx-mpx.c: Regenerated.
16940         * features/i386/x32-avx-linux.c: Regenerated.
16941         * features/i386/x32-avx512-linux.c: Regenerated.
16942         * regformats/i386/amd64-avx-linux.dat: Regenerated.
16943         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
16944         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
16945         * regformats/i386/amd64-linux.dat: Regenerated.
16946         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
16947         * regformats/i386/x32-avx-linux.dat: Regenerated.
16948         * regformats/i386/x32-avx512-linux.dat: Regenerated.
16949         * regformats/i386/x32-linux.dat: Regenerated.
16950
16951 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
16952
16953         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
16954         Set to AMD64_NUM_REGS.
16955
16956 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
16957
16958         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
16959         that checks validity of a register number.
16960
16961 2017-01-27  Kees Cook  <keescook@google.com>
16962
16963         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
16964         fetch_fpregs if target has fpa registers.
16965         (arm_linux_store_inferior_registers): Call store_fpregs if target
16966         has fpa registers.
16967
16968 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
16969
16970         * cris-tdep.c (cris_gdbarch_init): Remove check for
16971         info.byte_order and force it to BFD_ENDIAN_LITTLE.
16972
16973 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
16974
16975         * corelow.c (get_core_register_section): Check for regset
16976         existence before checking for REGSET_VARIABLE_SIZE.
16977
16978 2017-01-26  Yao Qi  <yao.qi@linaro.org>
16979             Pedro Alves  <palves@redhat.com>
16980
16981         PR gdb/20939
16982         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
16983         call memory_error, save memaddr instead.
16984         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
16985         negative, cal memory_error.
16986         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
16987
16988 2017-01-26  Yao Qi  <yao.qi@linaro.org>
16989
16990         * disasm-selftests.c (memory_error_test): New function.
16991         (_initialize_disasm_selftests): Register memory_error_test.
16992
16993 2017-01-26  Yao Qi  <yao.qi@linaro.org>
16994
16995         * Makefile.in (SFILES): Add disasm-selftests.c and
16996         selftest-arch.c.
16997         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
16998         * disasm-selftests.c: New file.
16999         * selftest-arch.c: New file.
17000         * selftest-arch.h: New file.
17001
17002 2017-01-26  Yao Qi  <yao.qi@linaro.org>
17003
17004         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
17005         to bfd_arch_mep.  Don't return 0 if section is not
17006         found.  Call print_insn_mep.
17007
17008 2017-01-26  Pedro Alves  <palves@redhat.com>
17009             Yao Qi  <yao.qi@linaro.org>
17010
17011         * arm-tdep.c: Include "disasm.h".
17012         (gdb_print_insn_arm): Update code to get gdbarch.
17013         * disasm.c (dis_asm_read_memory): Change it to
17014         gdb_disassembler::dis_asm_read_memory.
17015         (dis_asm_memory_error): Likewise.
17016         (dis_asm_print_address): Likewise.
17017         (gdb_pretty_print_insn): Change it to
17018         gdb_disassembler::pretty_print_insn.
17019         (dump_insns): Add one argument gdb_disassemlber.  All
17020         callers updated.
17021         (do_mixed_source_and_assembly_deprecated): Likewise.
17022         (do_mixed_source_and_assembly): Likewise.
17023         (do_assembly_only): Likewise.
17024         (gdb_disassembler::gdb_disassembler): New.
17025         (gdb_disassembler::print_insn): New.
17026         * disasm.h (class gdb_disassembler): New.
17027         (gdb_pretty_print_insn): Remove declaration.
17028         (gdb_disassemble_info): Likewise.
17029         * guile/scm-disasm.c (class gdbscm_disassembler): New.
17030         (gdbscm_disasm_read_memory_worker): Update.
17031         (gdbscm_disasm_read_memory): Update.
17032         (gdbscm_disasm_memory_error): Remove.
17033         (gdbscm_disasm_print_address): Remove.
17034         (gdbscm_disassembler::gdbscm_disassembler): New.
17035         (gdbscm_print_insn_from_port): Update.
17036         * mips-tdep.c: Include disasm.h.
17037         (gdb_print_insn_mips): Update code to get gdbarch.
17038         * record-btrace.c (btrace_insn_history): Update.
17039         * spu-tdep.c: Include disasm.h.
17040         (struct spu_dis_asm_data): Remove.
17041         (struct spu_dis_asm_info): New.
17042         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
17043         SPU id.
17044         (gdb_print_insn_spu): Cast disassemble_info to
17045         spu_dis_asm_info.
17046
17047 2017-01-26  Yao Qi  <yao.qi@linaro.org>
17048
17049         * disasm.c (do_ui_file_delete): Delete.
17050         (gdb_insn_length): Move code creating stream to ...
17051         * utils.c (null_stream): ... here.  New function.
17052         * utils.h (null_stream): Declare.
17053
17054 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
17055
17056         * python/py-inferior.c (find_thread_object): Return directly
17057         from the loop.  Remove "found" variable.
17058
17059 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
17060
17061         GDB 7.12.1 released.
17062
17063 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
17064
17065         * python/py-function.c (fnpy_call): Reorder declarations to have
17066         the gdbpy_enter object declared first.
17067         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
17068
17069 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
17070
17071         PR python/21068
17072         * python/python-internal.h (PyMem_RawMalloc): Define for
17073         Python < 3.4.
17074         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
17075         PyMem_RawMalloc instead of PyMem_Malloc.
17076
17077 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
17078             Luis Machado  <lgustavo@codesourcery.com>
17079
17080         * NEWS (New commands): Mention flash-erase.
17081         (New MI commands): Mention target-flash-erase.
17082         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
17083         command.
17084         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
17085         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
17086         * target.c (flash_erase_command): New function.
17087         (initialize_targets): Add new flash-erase command.
17088         * target.h (flash_erase_command): New declaration.
17089
17090 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
17091
17092         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
17093         HAVE_SYS_PROCFS_H is defined.
17094
17095 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
17096
17097         * remote.c (struct cached_reg): Change data into a pointer.
17098         * (stop_reply_dtr): Free data pointers before deleting vector.
17099         (process_stop_reply): Likewise.
17100         (remote_parse_stop_reply): Allocate space for data
17101
17102 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
17103
17104         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
17105         MAX_REGISTER_SIZE.
17106         (amd64_pseudo_register_read_value): Likewise.
17107         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
17108         (store_register_using_P): Likewise.
17109         * regcache.c (regcache_xfer_part): Likewise.
17110
17111 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
17112
17113         Split real and pseudo registers.
17114         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
17115         (sparc32_pseudo_regnum): New enum.
17116         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
17117         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
17118         (SPARC32_CP0_REGISTERS): New macro.
17119         (sparc32_pseudo_register_name): New function.
17120         (sparc32_register_name): Use sparc32_pseudo_register_name.
17121         (sparc32_pseudo_register_type): New function.
17122         (sparc32_register_type): Use sparc32_pseudo_register_type.
17123         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
17124         pseudo register numbers.
17125         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
17126         (SPARC64_CP0_REGISTERS): New macro.
17127         (sparc64_pseudo_register_name): New function.
17128         (sparc64_register_name): Use sparc64_pseudo_register_name.
17129         (sparc64_pseudo_register_type): New function.
17130         (sparc64_register_type): Use sparc64_pseudo_register_type.
17131         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
17132         pseudo register numbers.
17133         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
17134         sparc64_store_arguments): Handle pseudo register numbers.
17135
17136 2017-01-13  Yao Qi  <yao.qi@linaro.org>
17137
17138         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
17139         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
17140         output.
17141         (getpkt_or_notif_sane_1): Likewise.
17142
17143 2017-01-13  Yao Qi  <yao.qi@linaro.org>
17144
17145         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
17146         of CC.  Pass "-x c++-header" instead of "-x c".
17147
17148 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
17149
17150         * remote.c (remote_can_async_p): Update comment.
17151
17152 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
17153
17154         * linux-nat.c (linux_nat_can_async_p): Update comment.
17155
17156 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
17157
17158         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
17159
17160 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
17161
17162         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
17163
17164 2017-01-10  Tom Tromey  <tom@tromey.com>
17165
17166         * python/py-type.c (typy_legacy_template_argument): Update.
17167         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
17168         ~demangle_parse_info): Declare new members.
17169         (cp_demangled_name_to_comp): Return unique_ptr.
17170         (cp_demangled_name_parse_free)
17171         (make_cleanup_cp_demangled_name_parse_free)
17172         (cp_new_demangle_parse_info): Remove.
17173         * cp-support.c (do_demangled_name_parse_free_cleanup)
17174         (make_cleanup_cp_demangled_name_parse_free): Remove.
17175         (inspect_type, cp_canonicalize_string_full)
17176         (cp_canonicalize_string): Update.
17177         (mangled_name_to_comp): Change return type.
17178         (cp_class_name_from_physname, method_name_from_physname)
17179         (cp_func_name, cp_remove_params): Update.
17180         * cp-name-parser.y (demangle_parse_info): New constructor, from
17181         cp_new_demangle_parse_info.
17182         (~demangle_parse_info): New destructor, from
17183         cp_demangled_name_parse_free.
17184         (cp_merge_demangle_parse_infos): Update.
17185         (cp_demangled_name_to_comp): Change return type.
17186
17187 2017-01-10  Tom Tromey  <tom@tromey.com>
17188
17189         * top.c (prevent_dont_repeat): Change return type.
17190         * python/python.c (execute_gdb_command): Use std::string.
17191         Update.
17192         * guile/guile.c (gdbscm_execute_gdb_command): Update.
17193         * command.h (prevent_dont_repeat): Change return type.
17194         * breakpoint.c (bpstat_do_actions_1): Update.
17195
17196 2017-01-10  Tom Tromey  <tom@tromey.com>
17197
17198         * value.h (scoped_value_mark::~scoped_value_mark): Call
17199         free_to_mark.
17200         (scoped_value_mark::free_to_mark): New method.
17201         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
17202         scoped_value_mark.
17203
17204 2017-01-10  Tom Tromey  <tom@tromey.com>
17205
17206         * python/py-value.c (valpy_dereference, valpy_referenced_value)
17207         (valpy_reference_value, valpy_const_value, valpy_get_address)
17208         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
17209         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
17210         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
17211         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
17212         scoped_value_mark.
17213         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
17214         * value.h (scoped_value_mark): New class.
17215
17216 2017-01-10  Tom Tromey  <tom@tromey.com>
17217
17218         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
17219         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
17220         * psymtab.c (discard_psymtabs_upto): Remove.
17221         (make_cleanup_discard_psymtabs): Remove.
17222         (struct psymtab_state): Remove.
17223
17224 2017-01-10  Tom Tromey  <tom@tromey.com>
17225
17226         * record-full.c (record_full_save_cleanups): Remove.
17227         (record_full_save): Use gdb::unlinker.
17228         * gcore.c (do_bfd_delete_cleanup): Remove.
17229         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
17230         cleanups.
17231         * dwarf2read.c (unlink_if_set): Remove.
17232         (write_psymtabs_to_index): Use gdb::unlinker.
17233         * common/gdb_unlinker.h: New file.
17234
17235 2017-01-10  Tom Tromey  <tom@tromey.com>
17236
17237         * windows-tdep.c (windows_xfer_shared_library): Update.
17238         * windows-nat.c (windows_make_so): Update.
17239         * utils.h (make_cleanup_bfd_unref): Remove.
17240         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
17241         * symfile.h (symfile_bfd_open)
17242         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
17243         * symfile.c (read_symbols, symbol_file_add)
17244         (separate_debug_file_exists): Update.
17245         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
17246         (generic_load, reread_symbols): Update.
17247         * symfile-mem.c (symbol_file_add_from_memory): Update.
17248         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
17249         (spu_symbol_file_add_from_memory): Update.
17250         * solist.h (struct target_so_ops) <bfd_open>: Return
17251         gdb_bfd_ref_ptr.
17252         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
17253         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
17254         gdb_bfd_ref_ptr.
17255         (solib_map_sections, reload_shared_libraries_1): Update.
17256         * solib-svr4.c (enable_break): Update.
17257         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
17258         * solib-frv.c (enable_break2): Update.
17259         * solib-dsbt.c (enable_break): Update.
17260         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
17261         gdb_bfd_ref_ptr.
17262         (darwin_solib_get_all_image_info_addr_at_init): Update.
17263         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
17264         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
17265         * record-full.c (record_full_save): Update.
17266         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
17267         * procfs.c (insert_dbx_link_bpt_in_file): Update.
17268         * minidebug.c (find_separate_debug_file_in_section): Return
17269         gdb_bfd_ref_ptr.
17270         * machoread.c (macho_add_oso_symfile): Change abfd to
17271         gdb_bfd_ref_ptr.
17272         (macho_symfile_read_all_oso): Update.
17273         (macho_check_dsym): Return gdb_bfd_ref_ptr.
17274         (macho_symfile_read): Update.
17275         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
17276         (jit_bfd_try_read_symtab): Update.
17277         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
17278         (gdb_bfd_openw, gdb_bfd_openr_iovec)
17279         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
17280         gdb_bfd_ref_ptr.
17281         (gdb_bfd_ref_policy): New struct.
17282         (gdb_bfd_ref_ptr): New typedef.
17283         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
17284         (gdb_bfd_openw, gdb_bfd_openr_iovec)
17285         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
17286         gdb_bfd_ref_ptr.
17287         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17288         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17289         (gcore_command): Update.
17290         * exec.c (exec_file_attach): Update.
17291         * elfread.c (elf_symfile_read): Update.
17292         * dwarf2read.c (dwarf2_get_dwz_file): Update.
17293         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
17294         (open_and_init_dwo_file): Update.
17295         (open_dwp_file): Return gdb_bfd_ref_ptr.
17296         (open_and_init_dwp_file): Update.
17297         * corelow.c (core_open): Update.
17298         * compile/compile-object-load.c (compile_object_load): Update.
17299         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
17300         * coffread.c (coff_symfile_read): Update.
17301         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
17302         gdb_bfd_ref_ptr.  Rename.
17303         (dump_bfd_file, restore_command): Update.
17304         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17305         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17306         (find_separate_debug_file_by_buildid): Update.
17307
17308 2017-01-10  Tom Tromey  <tom@tromey.com>
17309
17310         * common/gdb_ref_ptr.h: New file.
17311         * python/py-ref.h (struct gdbpy_ref_policy): New.
17312         (gdbpy_ref): Now a typedef.
17313
17314 2017-01-10  Tom Tromey  <tom@tromey.com>
17315
17316         * utils.h (make_cleanup_htab_delete): Don't declare.
17317         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
17318         Remove.
17319         * linespec.c (decode_compound_collector): Add constructor,
17320         destructor.
17321         (lookup_prefix_sym): Remove cleanup.
17322         (symtab_collector): Add constructor, destructor.
17323         (collect_symtabs_from_filename): Remove cleanup.
17324         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
17325         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
17326         Use htab_up.
17327         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
17328         * dwarf2read.c (dw2_expand_symtabs_matching)
17329         (dw2_map_symbol_filenames, dwarf_decode_macros)
17330         (write_psymtabs_to_index): Use htab_up.
17331         * dwarf2loc.c (func_verify_no_selftailcall)
17332         (call_site_find_chain_1, func_verify_no_selftailcall)
17333         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
17334         std::vector, gdb::unique_xmalloc_ptr.
17335         (call_sitep): Remove typedef.
17336         (dwarf2_locexpr_baton_eval): Remove unused variable.
17337
17338 2017-01-10  Tom Tromey  <tom@tromey.com>
17339
17340         * python/python-internal.h (make_cleanup_py_decref)
17341         (make_cleanup_py_xdecref): Don't declare.
17342         * python/py-utils.c (py_decref, make_cleanup_py_decref)
17343         (py_xdecref, make_cleanup_py_xdecref): Remove.
17344
17345 2017-01-10  Tom Tromey  <tom@tromey.com>
17346
17347         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
17348         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
17349
17350 2017-01-10  Tom Tromey  <tom@tromey.com>
17351
17352         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
17353
17354 2017-01-10  Tom Tromey  <tom@tromey.com>
17355
17356         * python/py-utils.c (unicode_to_encoded_string)
17357         (python_string_to_target_string)
17358         (python_string_to_target_python_string)
17359         (python_string_to_host_string, gdbpy_obj_to_string)
17360         (get_addr_from_python): Use gdbpy_ref.
17361
17362 2017-01-10  Tom Tromey  <tom@tromey.com>
17363
17364         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
17365         gdbpy_ref.
17366
17367 2017-01-10  Tom Tromey  <tom@tromey.com>
17368
17369         * python/python.c (eval_python_command, gdbpy_decode_line)
17370         (gdbpy_run_events, gdbpy_start_type_printers)
17371         (gdbpy_apply_type_printers): Use gdbpy_ref.
17372
17373 2017-01-10  Tom Tromey  <tom@tromey.com>
17374
17375         * python/py-param.c (get_doc_string, compute_enum_values): Use
17376         gdbpy_ref.
17377
17378 2017-01-10  Tom Tromey  <tom@tromey.com>
17379
17380         * python/py-inferior.c (find_thread_object, build_inferior_list):
17381         Use gdbpy_ref.
17382
17383 2017-01-10  Tom Tromey  <tom@tromey.com>
17384
17385         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
17386
17387 2017-01-10  Tom Tromey  <tom@tromey.com>
17388
17389         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
17390         gdbpy_ref.
17391
17392 2017-01-10  Tom Tromey  <tom@tromey.com>
17393
17394         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
17395         extra incref.
17396         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
17397         Use gdbpy_ref.
17398
17399 2017-01-10  Tom Tromey  <tom@tromey.com>
17400
17401         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
17402         gdbpy_ref.
17403
17404 2017-01-10  Tom Tromey  <tom@tromey.com>
17405
17406         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
17407         decref results of PyArg_ParseTupleAndKeywords.
17408
17409 2017-01-10  Tom Tromey  <tom@tromey.com>
17410
17411         * python/python.c (python_run_simple_file): Use
17412         unique_xmalloc_ptr, gdbpy_ref.
17413
17414 2017-01-10  Tom Tromey  <tom@tromey.com>
17415
17416         * python/py-prettyprint.c (print_stack_unless_memory_error)
17417         (print_string_repr, print_children): Use gdbpy_ref.
17418         (dummy_python_frame): New class.
17419         (dummy_python_frame::dummy_python_frame): Rename from
17420         push_dummy_python_frame.
17421         (py_restore_tstate): Remove.
17422
17423 2017-01-10  Tom Tromey  <tom@tromey.com>
17424
17425         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
17426
17427 2017-01-10  Tom Tromey  <tom@tromey.com>
17428
17429         * python/python.c (ensure_python_env, restore_python_env):
17430         Remove.
17431         * python/python-internal.h (ensure_python_env): Don't declare.
17432         * varobj.h (varobj_ensure_python_env): Don't declare.
17433         * varobj.c (varobj_ensure_python_env): Remove.
17434
17435 2017-01-10  Tom Tromey  <tom@tromey.com>
17436
17437         * varobj.c (varobj_value_get_print_value): Use
17438         gdbpy_enter_varobj.
17439
17440 2017-01-10  Tom Tromey  <tom@tromey.com>
17441
17442         * python/py-prettyprint.c (print_string_repr, print_children):
17443         Update.
17444         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
17445         of "encoding".
17446         * varobj.c (varobj_value_get_print_value): Update.
17447         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
17448
17449 2017-01-10  Tom Tromey  <tom@tromey.com>
17450
17451         * varobj.c (varobj_get_display_hint)
17452         (dynamic_varobj_has_child_method, install_new_value_visualizer)
17453         (varobj_set_visualizer, free_variable): Use
17454         gdbpy_enter_varobj.
17455
17456 2017-01-10  Tom Tromey  <tom@tromey.com>
17457
17458         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
17459         (do_finish_initialization): New function.  Use gdbpy_ref.
17460         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
17461         do_finish_initialization.
17462
17463 2017-01-10  Tom Tromey  <tom@tromey.com>
17464
17465         * python/py-param.c (get_set_value, get_show_value): Use
17466         gdbpy_enter, gdbpy_ref.
17467
17468 2017-01-10  Tom Tromey  <tom@tromey.com>
17469
17470         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
17471
17472 2017-01-10  Tom Tromey  <tom@tromey.com>
17473
17474         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
17475
17476 2017-01-10  Tom Tromey  <tom@tromey.com>
17477
17478         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
17479         Use gdbpy_enter_varobj.
17480
17481 2017-01-10  Tom Tromey  <tom@tromey.com>
17482
17483         * varobj.c (gdbpy_enter_varobj): New constructor.
17484         * python/python-internal.h (gdbpy_enter_varobj): New class.
17485         * python/py-varobj.c (py_varobj_get_iterator): Use
17486         gdbpy_enter_varobj.
17487
17488 2017-01-10  Tom Tromey  <tom@tromey.com>
17489
17490         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
17491         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17492         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
17493         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
17494         unique_xmalloc_ptr.
17495         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
17496
17497 2017-01-10  Tom Tromey  <tom@tromey.com>
17498
17499         * python/py-xmethods.c (invoke_match_method): Use
17500         gdbpy_ref.
17501
17502 2017-01-10  Tom Tromey  <tom@tromey.com>
17503
17504         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
17505         gdbpy_enter, gdbpy_ref.
17506
17507 2017-01-10  Tom Tromey  <tom@tromey.com>
17508
17509         * python/python.c (python_interactive_command): Use gdbpy_enter.
17510
17511 2017-01-10  Tom Tromey  <tom@tromey.com>
17512
17513         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
17514         gdbpy_ref.
17515
17516 2017-01-10  Tom Tromey  <tom@tromey.com>
17517
17518         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
17519         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17520
17521 2017-01-10  Tom Tromey  <tom@tromey.com>
17522
17523         * utils.h (htab_deleter): New struct.
17524         (htab_up): New typedef.
17525         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
17526         gdbpy_enter, gdbpy_ref, htab_up.
17527
17528 2017-01-10  Tom Tromey  <tom@tromey.com>
17529
17530         * python/py-unwind.c (pending_frame_invalidate): Remove.
17531         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
17532
17533 2017-01-10  Tom Tromey  <tom@tromey.com>
17534
17535         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
17536         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
17537
17538 2017-01-10  Tom Tromey  <tom@tromey.com>
17539
17540         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
17541
17542 2017-01-10  Tom Tromey  <tom@tromey.com>
17543
17544         * python/python.c (gdbpy_eval_from_control_command)
17545         (gdbpy_source_script, gdbpy_run_events)
17546         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
17547         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
17548         gdbpy_enter.
17549
17550 2017-01-10  Tom Tromey  <tom@tromey.com>
17551
17552         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
17553
17554 2017-01-10  Tom Tromey  <tom@tromey.com>
17555
17556         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
17557
17558 2017-01-10  Tom Tromey  <tom@tromey.com>
17559
17560         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
17561         (python_on_inferior_call_pre, python_on_inferior_call_post)
17562         (python_on_memory_change, python_on_register_change)
17563         (python_inferior_exit, python_new_objfile, add_thread_object)
17564         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
17565
17566 2017-01-10  Tom Tromey  <tom@tromey.com>
17567
17568         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
17569         (bpfinishpy_handle_exit): Use gdbpy_enter.
17570
17571 2017-01-10  Tom Tromey  <tom@tromey.com>
17572
17573         * python/py-cmd.c (cmdpy_destroyer)
17574         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
17575         gdbpy_enter.
17576
17577 2017-01-10  Tom Tromey  <tom@tromey.com>
17578
17579         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
17580         gdbpy_enter.
17581         (gdbpy_breakpoint_has_cond): Likewise.
17582
17583 2017-01-10  Tom Tromey  <tom@tromey.com>
17584
17585         * python/python.c (gdbpy_enter): New constructor.
17586         (~gdbpy_enter): New destructor.
17587         (restore_python_env, ensure_python_env): Rewrite.
17588         * python/python-internal.h (gdbpy_enter): New class.
17589
17590 2017-01-10  Tom Tromey  <tom@tromey.com>
17591
17592         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
17593
17594 2017-01-10  Tom Tromey  <tom@tromey.com>
17595
17596         * python/py-value.c (value_has_field, get_field_flag)
17597         (get_field_type, valpy_getitem, convert_value_from_python): Use
17598         gdbpy_ref.
17599
17600 2017-01-10  Tom Tromey  <tom@tromey.com>
17601
17602         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
17603         gdbpy_ref.
17604
17605 2017-01-10  Tom Tromey  <tom@tromey.com>
17606
17607         * python/py-prettyprint.c (search_pp_list)
17608         (find_pretty_printer_from_objfiles)
17609         (find_pretty_printer_from_progspace)
17610         (find_pretty_printer_from_gdb, find_pretty_printer)
17611         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
17612         gdbpy_ref.
17613
17614 2017-01-10  Tom Tromey  <tom@tromey.com>
17615
17616         * python/py-param.c (call_doc_function): Use gdbpy_ref.
17617
17618 2017-01-10  Tom Tromey  <tom@tromey.com>
17619
17620         * python/py-linetable.c (build_line_table_tuple_from_pcs)
17621         (ltpy_get_all_source_lines): Use gdbpy_ref.
17622
17623 2017-01-10  Tom Tromey  <tom@tromey.com>
17624
17625         * python/py-framefilter.c (extract_sym, extract_value)
17626         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
17627         gdbpy_ref.
17628
17629 2017-01-10  Tom Tromey  <tom@tromey.com>
17630
17631         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
17632
17633 2017-01-10  Tom Tromey  <tom@tromey.com>
17634
17635         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
17636
17637 2017-01-10  Tom Tromey  <tom@tromey.com>
17638
17639         * python/py-function.c (convert_values_to_python, fnpy_init): Use
17640         gdbpy_ref.
17641
17642 2017-01-10  Tom Tromey  <tom@tromey.com>
17643
17644         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
17645
17646 2017-01-10  Tom Tromey  <tom@tromey.com>
17647
17648         * python/py-type.c (convert_field, make_fielditem, typy_fields)
17649         (typy_range): Use gdbpy_ref.
17650
17651 2017-01-10  Tom Tromey  <tom@tromey.com>
17652
17653         * python/py-threadevent.c (create_thread_event_object): Use
17654         gdbpy_ref.
17655         * python/py-stopevent.c (create_stop_event_object): Simplify.
17656         (emit_stop_event): Use gdbpy_ref.
17657         * python/py-signalevent.c (create_signal_event_object): Use
17658         gdbpy_ref.
17659         * python/py-newobjfileevent.c (create_new_objfile_event_object)
17660         (emit_new_objfile_event, create_clear_objfiles_event_object)
17661         (emit_clear_objfiles_event): Use gdbpy_ref.
17662         * python/py-infevents.c (create_inferior_call_event_object)
17663         (create_register_changed_event_object)
17664         (create_memory_changed_event_object, emit_inferior_call_event)
17665         (emit_memory_changed_event, emit_register_changed_event): Use
17666         gdbpy_ref.
17667         * python/py-exitedevent.c (create_exited_event_object)
17668         (emit_exited_event): Use gdbpy_ref.
17669         * python/py-event.h (evpy_emit_event): Remove
17670         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
17671         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
17672         * python/py-continueevent.c (emit_continue_event): Use
17673         gdbpy_ref.
17674         * python/py-breakpoint.c (gdbpy_breakpoint_created)
17675         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
17676         gdbpy_ref.
17677         * python/py-bpevent.c (create_breakpoint_event_object): Use
17678         gdbpy_ref.
17679
17680 2017-01-10  Tom Tromey  <tom@tromey.com>
17681
17682         * python/py-ref.h: New file.
17683
17684 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
17685
17686         * cli-out.c (cli_ui_out::do_redirect): Change return type to
17687         void.
17688         * cli-out.h (cli_ui_out::do_redirect): Likewise.
17689         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
17690         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
17691         * ui-out.c (ui_out::redirect): Likewise.
17692         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
17693         * cli/cli-logging.c (set_logging_redirect): Update call site of
17694         ui_out::redirect.
17695         (handle_redirections): Likewise.
17696         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
17697         * top.c (execute_command_to_string): Likewise.
17698         * utils.c (do_ui_out_redirect_pop): Likewise.
17699
17700 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
17701
17702         * stack.c (_initialize_stack): Update "frame" command help message.
17703
17704 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
17705
17706         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
17707
17708 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17709
17710         * x86-linux-nat.h: Include gdb_proc_service.h.
17711
17712 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17713
17714         * ser-base.h: Include serial.h.
17715
17716 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17717
17718         * ppc-linux-tdep.h: Include ppc-tdep.h.
17719
17720 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17721
17722         * nat/amd64-linux-siginfo.h: Include signal.h.
17723
17724 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17725
17726         * nat/aarch64-linux-hw-point.h: Include break-common.h.
17727
17728 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17729
17730         * mi/mi-parse.h: Include mi-cmds.h.
17731
17732 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17733
17734         * inf-loop.c: Don't include "target.h".
17735         * inf-loop.h: Include it here.
17736
17737 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17738
17739         * dfp.h: Include "dboulest.h" and "expression.h".
17740
17741 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17742
17743         * ax-gdb.h: Include "ax.h".
17744
17745 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17746
17747         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
17748         with nat/gdb_ptrace.h.
17749
17750 2017-01-05  Yao Qi  <yao.qi@linaro.org>
17751
17752         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
17753         new line.
17754         (mips64_fbsd_sigframe_init): Likewise.
17755
17756 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
17757
17758         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
17759         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
17760
17761 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
17762
17763         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
17764         * NEWS: Mention new FreeBSD/mips native configuration.
17765         * config/mips/fbsd.mh: New file.
17766         * configure.host: Add mips*-*-freebsd*.
17767         * mips-fbsd-nat.c: New file.
17768
17769 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
17770
17771         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
17772         (ALLDEPFILES): Add mips-fbsd-tdep.c.
17773         * NEWS: Mention new FreeBSD/mips target.
17774         * configure.tgt: Add mips*-*-freebsd*.
17775         * mips-fbsd-tdep.c: New file.
17776         * mips-fbsd-tdep.h: New file.
17777
17778 2017-01-04  Yao Qi  <yao.qi@linaro.org>
17779
17780         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
17781         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
17782
17783 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
17784
17785         Update copyright year range in all GDB files.
17786
17787 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
17788
17789         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
17790
17791 For older changes see ChangeLog-2016.
17792 \f
17793 Local Variables:
17794 mode: change-log
17795 left-margin: 8
17796 fill-column: 74
17797 version-control: never
17798 coding: utf-8
17799 End: