Thread language through c_type_print_args
[external/binutils.git] / gdb / ChangeLog
1 2018-06-01  Tom Tromey  <tom@tromey.com>
2
3         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4         c_print_type.
5         * c-typeprint.c (c_print_type_1): Add "language" parameter.
6         (c_print_type): Update.
7         (c_print_type): New overload.
8         (c_type_print_varspec_prefix, c_type_print_args)
9         (c_type_print_varspec_suffix, c_print_type_no_offsets)
10         (c_type_print_base_struct_union, c_type_print_base_1)
11         (cp_type_print_method_args): Add "language" parameter.
12         (c_type_print_base): Update.
13         * c-lang.h (c_print_type): Add new overload.
14
15 2018-06-01  Tom Tromey  <tom@tromey.com>
16
17         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
18         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
19
20 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
21
22         * aarch64-tdep.c (aarch64_sve_register_names): New const
23         var.
24         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
25         (AARCH64_SVE_Z_REGS_NUM): New define.
26         (AARCH64_SVE_P_REGS_NUM): Likewise.
27         (AARCH64_SVE_NUM_REGS): Likewise.
28
29 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
30
31         * nat/linux-ptrace.h [__alpha__]
32         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
33         definitions.
34
35 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
36
37         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
38         the endianness selected.
39         * NEWS: Document `set endian auto' mode operation update.
40
41 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
42
43         * Makefile.in: Add new header.
44         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
45         (sve_vl_from_vg): Likewise.
46         (sve_vq_from_vl): Likewise.
47         (sve_vl_from_vq): Likewise.
48         (sve_vq_from_vg): Likewise.
49         (sve_vg_from_vq): Likewise.
50         * configure.nat: Add new c file.
51         * nat/aarch64-sve-linux-ptrace.c: New file.
52         * nat/aarch64-sve-linux-ptrace.h: New file.
53
54 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
55
56         * aarch64-linux-nat.c (aarch64_linux_read_description):
57         Add parmeter zero.
58         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
59         Likewise.
60         * aarch64-tdep.c (tdesc_aarch64_list): Add.
61         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
62         (aarch64_gdbarch_init): Add parmeter zero.
63         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
64         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
65         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
66         parmeter.
67         * doc/gdb.texinfo: Describe SVE feature
68         * features/aarch64-sve.c: New file.
69
70 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
71
72         PR gdb/23210
73         * gdbarch.sh (significant_addr_bit): Default to zero when
74         not set by target architecture.
75         * gdbarch.c: Re-generated.
76         * utils.c (address_significant): Update.
77
78 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
79
80         * stack.c (func_command): Remove trailing newline in call to error.
81
82 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
83
84         * regcache.h (regcache_raw_collect): Remove, update callers to
85         use regcache::raw_collect.
86         * regcache.c (regcache_raw_collect): Remove.
87
88 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
89
90         * regcache.h (regcache_raw_supply): Remove, update callers to
91         use detached_regcache::raw_supply.
92         * regcache.c (regcache_raw_supply): Remove.
93
94 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
95
96         * regcache.h (regcache_cooked_write_part): Remove, update
97         callers to use regcache::cooked_write_part.
98         * regcache.c (regcache_cooked_write_part): Remove.
99
100 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
101
102         * regcache.h (regcache_cooked_read_part): Remove, update callers
103         to use readable_regcache::cooked_read_part.
104         * regcache.c (regcache_cooked_read_part): Remove.
105
106 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
107
108         * regcache.h (regcache_cooked_read_value): Remove, update
109         callers to use readable_regcache::cooked_read_value.
110         * regcache.c (regcache_cooked_read_value): Remove.
111
112 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
113
114         * regcache.h (regcache_cooked_write): Remove, update callers to
115         use regcache::cooked_write.
116         * regcache.c (regcache_cooked_write): Remove.
117
118 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
119
120         * regcache.h (regcache_invalidate): Remove, update callers to
121         use detached_regcache::invalidate instead.
122         * regcache.c (regcache_invalidate): Remove.
123
124 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
125
126         * regcache.h (regcache_raw_write_part): Remove, update callers
127         to use regcache::raw_write_part instead.
128         * regcache.c (regcache_raw_write_part): Remove.
129
130 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
131
132         * regcache.h (regcache_raw_read_part): Remove, update callers to
133         use readable_regcache::raw_read_part instead.
134         * regcache.c (regcache_raw_read_part): Remove.
135
136 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
137
138         * regcache.h (regcache_cooked_read): Remove, update callers to
139         use readable_regcache::cooked_read instead.
140         * regcache.c (regcache_cooked_read): Remove.
141
142 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
143
144         * regcache.h (regcache_raw_write): Remove, update callers to use
145         regcache::raw_write instead.
146         * regcache.c (regcache_raw_write): Remove.
147
148 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
149
150         * regcache.h (regcache_raw_read): Remove, update callers to use
151         readable_regcache::raw_read instead.
152         * regcache.c (regcache_raw_read): Remove.
153
154 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
155
156         * regcache.h (regcache_raw_update): Remove, update callers to
157         use readable_regcache::raw_update instead.
158         * regcache.c (regcache_raw_update): Remove.
159
160 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
161
162         * regcache.h (regcache_register_status): Remove, update callers
163         to use reg_buffer::get_register_status directly instead.
164         * regcache.c (regcache_register_status): Remove.
165
166 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
167
168         * regcache.h (regcache_get_ptid): Remove, update all callers to
169         call regcache::ptid instead.
170         * regcache.c (regcache_get_ptid): Remove.
171
172 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
173
174         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
175
176 2018-05-30  Pedro Alves  <palves@redhat.com>
177
178         * common/common-exceptions.h (exception_rethrow): Use
179         ATTRIBUTE_NORETURN.
180
181 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
182
183         * breakpoint.c (print_solib_event, check_status_catch_solib):
184         Remove struct keyword in range-based for loops.
185         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
186         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
187         Likewise.
188         * linespec.c (find_superclass_methods, search_minsyms_for_name):
189         Likewise.
190         * symfile.c (addr_info_make_relative): Likewise.
191         * thread.c (value_in_thread_stack_temporaries): Likewise.
192
193 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
194
195         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
196         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
197         * coff-pe-read.c (add_pe_forwarded_sym): Replace
198         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
199         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
200         * jit.c (jit_breakpoint_re_set_internal): Likewise.
201         * printcmd.c (info_address_command): Likewise.
202
203 2018-05-29  Tom Tromey  <tom@tromey.com>
204
205         * windows-nat.c (handle_exception): Update fall-through comment.
206
207 2018-05-29  Tom Tromey  <tom@tromey.com>
208
209         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
210         (struct program_space) <added_solibs>: Now a std::vector.
211         * breakpoint.c (print_solib_event): Update.
212         (check_status_catch_solib): Update.
213         * progspace.c (clear_program_space_solib_cache): Update.
214         * solib.c (update_solib_list): Update.
215
216 2018-05-29  Tom Tromey  <tom@tromey.com>
217
218         * python/py-type.c (typy_richcompare): Update.
219         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
220         * gdbtypes.h (types_deeply_equal): Return bool.
221         (types_equal): Likewise.
222         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
223         declare VEC.
224         (check_types_equal): Change worklist to std::vector.  Return
225         bool.
226         (struct type_equality_entry): Add constructor.
227         (compare_maybe_null_strings): Return bool.
228         (check_types_worklist): Return bool.  Change worklist to
229         std::vector.
230         (types_deeply_equal): Use std::vector.
231         (types_equal): Return bool.
232         (compare_maybe_null_strings): Simplify.
233
234 2018-05-29  Tom Tromey  <tom@tromey.com>
235
236         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
237
238 2018-05-29  Tom Tromey  <tom@tromey.com>
239
240         * objc-lang.h: Don't include cp-support.h.
241         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
242         declare VEC.
243
244 2018-05-27  Tom Tromey  <tom@tromey.com>
245
246         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
247
248 2018-05-25  Tom Tromey  <tom@tromey.com>
249
250         * value.c (value::location): Initialize.
251
252 2018-05-25  Tom Tromey  <tom@tromey.com>
253
254         * dbxread.c (init_bincl_list): Remove.
255         (bincl_list): Now a std::vector.
256         (bincls_allocated, next_bincl): Remove.
257         (free_bincl_list, do_free_bincl_list_cleanup)
258         (make_cleanup_free_bincl_list): Remove.
259         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
260         unique_xmalloc_ptr.
261         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
262         (struct header_file_location): Add constructor.
263         (add_bincl_to_list): Remove.
264
265 2018-05-25  Tom Tromey  <tom@tromey.com>
266
267         * tui/tui.c (tui_enable): Update.
268         * mi/mi-interp.c (mi_interp::init): Update.
269         * interps.h (class interp) <name>: New method.
270         <m_name>: Rename from name.
271         (~scoped_restore_interp): Update.
272         * interps.c (interp::interp): Update.
273         (interp_add, interp_set, interp_lookup_existing)
274         (current_interp_named_p): Update.
275
276 2018-05-25  Tom Tromey  <tom@tromey.com>
277
278         * interps.c (interp_name): Remove.
279         * mi/mi-interp.c (mi_interp::init): Update.
280         * interps.h (interp_name): Remove.
281         (~scoped_restore_interp): Update.
282         * tui/tui.c (tui_enable): Update.
283
284 2018-05-25  Tom Tromey  <tom@tromey.com>
285
286         * utils.c (fputs_maybe_filtered): Update.
287         * linespec.c (decode_line_full): Update.
288         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
289         (mi_print_breakpoint_for_event, mi_solib_loaded)
290         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
291         (mi_user_selected_context_changed): Update.
292         * mi/mi-main.c (mi_execute_command): Update.
293         * cli/cli-script.c (execute_control_command): Update.
294         * python/python.c (execute_gdb_command): Update.
295         * solib.c (info_sharedlibrary_command): Update.
296         * interps.c (interp_ui_out): Remove.
297         * interps.h (interp_ui_out): Remove.
298
299 2018-05-25  Tom Tromey  <tom@tromey.com>
300
301         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
302         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
303         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
304
305 2018-05-25  Tom Tromey  <tom@tromey.com>
306
307         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
308         * interps.c (interp_exec): Use scoped_restore.
309
310 2018-05-25  Tom Tromey  <tom@tromey.com>
311
312         * remote.c (remote_target::remote_file_get): Use
313         gdb::byte_vector.
314         (remote_target::remote_file_put): Likewise.
315
316 2018-05-25  Tom Tromey  <tom@tromey.com>
317
318         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
319         a std::string.
320         (get_pe_section_index, add_pe_exported_sym): Update.
321         (read_pe_exported_syms): Use gdb::def_vector.
322
323 2018-05-25  Tom Tromey  <tom@tromey.com>
324
325         * frame.c (remove_prev_frame): Remove.
326         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
327
328 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
329
330         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
331         Remove prototypes.
332         * mips-linux-nat.c (supply_fpregset): Always call
333         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
334         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
335         `mips_fill_fpregset'.
336         * mips-linux-tdep.c (mips_supply_fpregset)
337         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
338         (mips_fill_fpregset_wrapper): Remove functions.
339         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
340         (mips_linux_fpregset): Remove variable.
341         (mips_linux_iterate_over_regset_sections): Use
342         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
343         (mips_linux_o32_sigframe_init): Remove comment.
344
345 2018-05-25  Pedro Alves  <palves@redhat.com>
346
347         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
348         (struct readahead_cache, struct packet_reg, struct
349         remote_arch_state, class remote_state): Move higher up in the
350         file.
351         (remote_target::m_remote_state): Now an object instead of a pointer.
352         (remote_target::get_remote_state): Adjust.
353
354 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
355
356         * stack.c (select_and_print_frame): Delete.
357         (struct function_bounds): Move struct within function.
358         (func_command): Most content moved into new function
359         find_frame_for_function, use new function, print result, add
360         function comment.
361         (find_frame_for_function): New function, now returns a result.
362
363 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
364
365         * stack.c (iterate_over_block_arg_vars): Fix comment.
366         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
367
368 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
369
370         PR gdb/23203
371         * frame.c
372         (scoped_restore_selected_frame::scoped_restore_selected_frame):
373         Define.
374         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
375         Define.
376         * frame.h (class scoped_restore_selected_frame): New class.
377         * stack.c (print_frame_local_vars): Remove catching and rethrowing
378         of any exception, use scoped_restore_selected_frame to restore the
379         frame instead.
380
381 2018-05-24  Pedro Alves  <palves@redhat.com>
382
383         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
384         override.
385
386 2018-05-23  Tom Tromey  <tom@tromey.com>
387
388         * complaints.c (struct complaints): Remove.
389         (symfile_complaint_book): Remove.
390         (series): New global.
391         (complaint_internal): Update.
392         (clear_complaints): Update.
393
394 2018-05-23  Tom Tromey  <tom@tromey.com>
395
396         * complaints.c (counters): New global.
397         (struct complain): Remove.
398         (struct complaints) <root>: Remove.
399         (complaint_sentinel): Remove.
400         (symfile_complaint_book): Update.
401         (find_complaint) Remove.
402         (complaint_internal, clear_complaints): Update.
403
404 2018-05-23  Tom Tromey  <tom@tromey.com>
405
406         * complaints.c (struct complain) <file, line>: Remove.
407         (find_complaint): Remove file, line parameters.
408         (complaint_internal): Update.
409
410 2018-05-23  Tom Tromey  <tom@tromey.com>
411
412         * complaints.c (vcomplaint): Remove.
413         (complaint_internal) Merge in contents of vcomplaint.
414
415 2018-05-23  Tom Tromey  <tom@tromey.com>
416
417         * complaints.c (struct complaints) <explanation>: Remove.
418         (symfile_explanations): Remove.
419         (symfile_complaint_book): Update.
420         (vcomplaint): Update.
421         (struct explanation): Remove.
422
423 2018-05-23  Tom Tromey  <tom@tromey.com>
424
425         * complaints.c (symfile_complaints): Remove.
426         (complaint_internal): Remove "complaints" parameter.
427         (clear_complaints, vcomplaint): Remove "c" parameter.
428         (get_complaints): Remove.
429         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
430         (dwarf2_debug_line_missing_file_complaint)
431         (dwarf2_debug_line_missing_end_sequence_complaint)
432         (dwarf2_complex_location_expr_complaint)
433         (dwarf2_const_value_length_mismatch_complaint)
434         (dwarf2_section_buffer_overflow_complaint)
435         (dwarf2_macro_malformed_definition_complaint)
436         (dwarf2_invalid_attrib_class_complaint)
437         (create_addrmap_from_index, dw2_symtab_iter_next)
438         (dw2_expand_marked_cus)
439         (dw2_debug_names_iterator::find_vec_in_debug_names)
440         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
441         (create_debug_type_hash_table, init_cutu_and_read_dies)
442         (partial_die_parent_scope, add_partial_enumeration)
443         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
444         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
445         (read_import_statement, read_file_scope, create_dwo_cu_reader)
446         (create_cus_hash_table, create_dwp_hash_table)
447         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
448         (dwarf2_rnglists_process, dwarf2_ranges_process)
449         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
450         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
451         (handle_struct_member_die, process_structure_scope)
452         (read_array_type, read_common_block, read_module_type)
453         (read_tag_pointer_type, read_typedef, read_base_type)
454         (read_subrange_type, load_partial_dies, partial_die_info::read)
455         (partial_die_info::read, partial_die_info::read)
456         (partial_die_info::read, read_checked_initial_length_and_offset)
457         (dwarf2_string_attr, read_formatted_entries)
458         (dwarf_decode_line_header)
459         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
460         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
461         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
462         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
463         (get_signatured_type, get_DW_AT_signature_type)
464         (decode_locdesc, file_file_name, consume_improper_spaces)
465         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
466         (dwarf_decode_macro_bytes, dwarf_decode_macros)
467         (dwarf2_symbol_mark_computed, set_die_type)
468         (read_attribute_value): Update.
469         * stap-probe.c (handle_stap_probe, get_stap_base_address):
470         Update.
471         * dbxread.c (unknown_symtype_complaint)
472         (lbrac_mismatch_complaint, repeated_header_complaint)
473         (set_namestring, function_outside_compilation_unit_complaint)
474         (read_dbx_symtab, process_one_symbol): Update.
475         * gdbtypes.c (stub_noname_complaint): Update.
476         * windows-nat.c (handle_unload_dll): Update.
477         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
478         (decode_base_type): Update.
479         * xcoffread.c (bf_notfound_complaint, ef_complaint)
480         (eb_complaint, record_include_begin, record_include_end)
481         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
482         (process_xcoff_symbol, read_symbol)
483         (function_outside_compilation_unit_complaint)
484         (scan_xcoff_symtab): Update.
485         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
486         * buildsym.c (finish_block_internal, make_blockvector)
487         (end_symtab_get_static_block, augment_type_symtab): Update.
488         * dtrace-probe.c (dtrace_process_dof)
489         (dtrace_static_probe_ops::get_probes): Update.
490         * complaints.h (struct complaint): Don't declare.
491         (symfile_complaints): Remove.
492         (complaint_internal): Remove "complaints" parameter.
493         (complaint): Likewise.
494         (clear_complaints): Likewise.
495         * symfile.c (syms_from_objfile_1, finish_new_objfile)
496         (reread_symbols): Update.
497         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
498         (dwarf2_frame_cache, decode_frame_entry): Update.
499         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
500         * objc-lang.c (lookup_objc_class, lookup_child_selector)
501         (info_selectors_command): Update.
502         * macrotab.c (macro_include, check_for_redefinition)
503         (macro_undef): Update.
504         * objfiles.c (filter_overlapping_sections): Update.
505         * stabsread.c (invalid_cpp_abbrev_complaint)
506         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
507         (define_symbol, error_type, read_type, rs6000_builtin_type)
508         (stabs_method_name_from_physname, read_member_functions)
509         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
510         (attach_fields_to_type, complain_about_struct_wipeout)
511         (read_range_type, read_args, common_block_start)
512         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
513         Update.
514         * mdebugread.c (index_complaint, unknown_ext_complaint)
515         (basic_type_complaint, bad_tag_guess_complaint)
516         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
517         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
518         (parse_procedure, parse_lines)
519         (function_outside_compilation_unit_complaint)
520         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
521         (bad_tag_guess_complaint, reg_value_complaint): Update.
522         * cp-support.c (demangled_name_complaint): Update.
523         * macroscope.c (sal_macro_scope): Update.
524         * dwarf-index-write.c (class debug_names): Update.
525
526 2018-05-23  Tom Tromey  <tom@tromey.com>
527
528         * complaints.c (clear_complaints): Remove "noisy" parameter.
529         * complaints.h (clear_complaints): Update.
530         * symfile.c (syms_from_objfile_1, finish_new_objfile)
531         (reread_symbols): Update.
532
533 2018-05-23  Tom Tromey  <tom@tromey.com>
534
535         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
536         SUBSEQUENT_MESSAGE.
537         (vcomplaint, clear_complaints): Update.
538         (symfile_explanations): Remove some messages.
539
540 2018-05-23  Tom Tromey  <tom@tromey.com>
541
542         * complaints.c (internal_complaint): Remove.
543         * complaints.h (internal_complaint): Remove.
544
545 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
546
547         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
548
549 2018-05-22  Pedro Alves  <palves@redhat.com>
550
551         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
552         (remote_fileio_badfd, remote_fileio_return_errno)
553         (remote_fileio_return_success, remote_fileio_func_open)
554         (remote_fileio_func_open, remote_fileio_func_close)
555         (remote_fileio_func_read, remote_fileio_func_write)
556         (remote_fileio_func_lseek, remote_fileio_func_rename)
557         (remote_fileio_func_unlink, remote_fileio_func_stat)
558         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
559         (remote_fileio_func_isatty, remote_fileio_func_system): Add
560         remote_target parameter.
561         (remote_fio_func_map) <func>: Add remote_target parameter.
562         (do_remote_fileio_request, remote_fileio_request):
563         * remote-fileio.h (remote_fileio_request):
564         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
565         remote_target parameter.
566         (remote_notif_process, handle_notification): Adjust to pass down
567         the remote.
568         (remote_notif_state_allocate): Add remote_target parameter.  Save
569         it.
570         * remote-notif.h (struct remote_target): Forward declare.
571         (struct notif_client) <parse, ack, can_get_pending_events>: Add
572         remote_target parameter.
573         (struct remote_notif_state) <remote>: New field.
574         (remote_notif_ack, remote_notif_parse): Add remote_target
575         parameter.
576         (remote_notif_state_allocate, remote_notif_state_allocate): Add
577         remote_target parameter.
578         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
579         (threads_listing_context, rmt_thread_action, protocol_feature)
580         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
581         (packet_result, struct threads_listing_context, remote_state):
582         Move definitions and declarations higher up.
583         (remote_target) <~remote_target>: Declare.
584         (remote_download_command_source, remote_file_put, remote_file_get)
585         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
586         (remote_hostio_pread_vFile, remote_hostio_send_command)
587         (remote_hostio_set_filesystem, remote_hostio_open)
588         (remote_hostio_close, remote_hostio_unlink, remote_state)
589         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
590         (get_memory_write_packet_size, get_memory_read_packet_size)
591         (append_pending_thread_resumptions, remote_detach_1)
592         (append_resumption, remote_resume_with_vcont)
593         (add_current_inferior_and_thread, wait_ns, wait_as)
594         (process_stop_reply, remote_notice_new_inferior)
595         (process_initial_stop_replies, remote_add_thread)
596         (btrace_sync_conf, remote_btrace_maybe_reopen)
597         (remove_new_fork_children, kill_new_fork_children)
598         (discard_pending_stop_replies, stop_reply_queue_length)
599         (check_pending_events_prevent_wildcard_vcont)
600         (discard_pending_stop_replies_in_queue, stop_reply)
601         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
602         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
603         (remote_interrupt_as, remote_interrupt_ns)
604         (remote_get_noisy_reply, remote_query_attached)
605         (remote_add_inferior, remote_current_thread, get_current_thread)
606         (set_thread, set_general_thread, set_continue_thread)
607         (set_general_process, write_ptid)
608         (remote_unpack_thread_info_response, remote_get_threadinfo)
609         (parse_threadlist_response, remote_get_threadlist)
610         (remote_threadlist_iterator, remote_get_threads_with_ql)
611         (remote_get_threads_with_qxfer)
612         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
613         (get_offsets, remote_check_symbols, remote_supported_packet)
614         (remote_query_supported, remote_packet_size)
615         (remote_serial_quit_handler, remote_detach_pid)
616         (remote_vcont_probe, remote_resume_with_hc)
617         (send_interrupt_sequence, interrupt_query)
618         (remote_notif_get_pending_events, fetch_register_using_p)
619         (send_g_packet, process_g_packet, fetch_registers_using_g)
620         (store_register_using_P, store_registers_using_G)
621         (set_remote_traceframe, check_binary_download)
622         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
623         (remote_xfer_live_readonly_partial, remote_read_bytes)
624         (remote_send_printf, remote_flash_write, readchar)
625         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
626         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
627         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
628         (extended_remote_disable_randomization, extended_remote_run)
629         (send_environment_packet, extended_remote_environment_support)
630         (extended_remote_set_inferior_cwd, remote_write_qxfer)
631         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
632         (packet_command): Now methods of ...
633         (remote_target): ... this class.
634         (m_remote_state) <remote_target>: New field.
635         (struct remote_state) <stop_reply_queue,
636         remote_async_inferior_event_token, wait_forever_enabled_p>: New
637         fields.
638         (remote_state::remote_state): Allocate stop_reply_queue.
639         (remote_state): Delete global.
640         (get_remote_state_raw): Delete.
641         (remote_target::get_remote_state): Allocate m_remote_state on
642         demand.
643         (get_current_remote_target): New.
644         (remote_ops, extended_remote_ops): Delete.
645         (wait_forever_enabled_p, remote_async_inferior_event_token):
646         Delete, moved to struct remote_state.
647         (remote_target::close): Delete self.  Destruction bits split to
648         ...
649         (remote_target::~remote_target): ... this.
650         (show_memory_packet_size): Adjust to use
651         get_current_remote_target.
652         (struct protocol_feature) <func>: Add remote_target parameter.
653         All callers adjusted.
654         (curr_quit_handler_target): New.
655         (remote_serial_quit_handler): Reimplement.
656         (remote_target::open_1): Adjust to use get_current_remote_target.
657         Heap-allocate remote_target/extended_remote_target instances.
658         (vcont_builder::vcont_builder): Add remote_target parameter, and
659         save it in m_remote.  All callers adjusted.
660         (vcont_builder::m_remote): New field.
661         (vcont_builder::restart, vcont_builder::flush)
662         (vcont_builder::push_action): Use it.
663         (remote_target::commit_resume): Use it.
664         (struct queue_iter_param) <remote>: New field.
665         (remote_target::remove_new_fork_children): Fill in 'remote' field.
666         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
667         (check_pending_event_prevents_wildcard_vcont_callback)
668         (remote_target::check_pending_events_prevent_wildcard_vcont)
669         (remote_target::discard_pending_stop_replies)
670         (remote_target::discard_pending_stop_replies_in_queue)
671         (remote_target::remote_notif_remove_queued_reply): Fill in
672         'remote' field.
673         (remote_notif_get_pending_events): New.
674         (remote_target::readchar, remote_target::remote_serial_write):
675         Save/restore curr_quit_handler_target.
676         (putpkt): New.
677         (kill_new_fork_children): Fill in 'remote' field.
678         (packet_command): Use get_current_remote_target, defer to
679         remote_target method of same name.
680         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
681         parameter, and save it in m_remote.  All callers adjusted.
682         (scoped_remote_fd::release): Use m_remote.
683         (scoped_remote_fd::m_remote): New field.
684         (remote_file_put, remote_file_get, remote_file_delete): Use
685         get_current_remote_target, defer to remote_target method of same
686         name.
687         (remote_btrace_reset): Add remote_state paremeter.  Update all
688         callers.
689         (remote_async_inferior_event_handler). Pass down 'data'.
690         (remote_new_objfile): Use get_current_remote_target.
691         (remote_target::vcont_r_supported): New.
692         (set_range_stepping): Use get_current_remote_target and
693         remote_target::vcont_r_supported.
694         (_initialize_remote): Don't allocate 'remote_state' and
695         'stop_reply_queue' globals.
696         * remote.h (struct remote_target): Forward declare.
697         (getpkt, putpkt, remote_notif_get_pending_events): Add
698         'remote_target' parameter.
699
700 2018-05-22  Pedro Alves  <palves@redhat.com>
701
702         * remote.c (vcont_builder): Now a class.  Make all data members
703         private.
704         (vcont_builder) <vcont_builder, restart, flush, push_action>:
705         Declare methods.
706         (vcont_builder_restart): Rename to ...
707         (vcont_builder::restart): ... this.
708         (vcont_builder_flush): Rename to ...
709         (vcont_builder::flush): ... this.
710         (vcont_builder_push_action): Rename to ...
711         (vcont_builder::push_action): ... this.
712         (remote_target::commit_resume): Adjust.
713
714 2018-05-22  Pedro Alves  <palves@redhat.com>
715
716         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
717         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
718         (get_fixed_memory_packet_size): New.
719         (get_memory_packet_size): Use it.
720         (set_memory_packet_size): Don't override the config size with
721         DEFAULT_MAX_MEMORY_PACKET_SIZE.
722         (show_memory_packet_size): Use get_fixed_memory_packet_size.
723         Don't refer to get_memory_packet_size if not connected to a remote
724         target.  Show "(default)" if configured size is 0.
725
726 2018-05-22  Pedro Alves  <palves@redhat.com>
727
728         * remote.c (remote_target::mourn_inferior): Move
729         discard_pending_stop_replies call here from ...
730         (_initialize_remote): ... here.
731
732 2018-05-22  Pedro Alves  <palves@redhat.com>
733
734         * remote.c (compare_section_command): Remove set_general_process
735         call.
736
737 2018-05-22  Pedro Alves  <palves@redhat.com>
738
739         * remote.c (struct packet_reg, struct remote_arch_state):
740         Move higher up in the file.
741         (remote_state) <m_arch_states>: Store remote_arch_state values
742         instead of remote_arch_state pointers.
743         (remote_state::get_remote_arch_state): Adjust.
744
745 2018-05-22  Pedro Alves  <palves@redhat.com>
746
747         * remote.c: Include <unordered_map>.
748         (remote_state): Now a class.
749         (remote_state) <get_remote_arch_state>: Declare method.
750         <get_remote_arch_state>: New field.
751         (remote_arch_state) <remote_arch_state>: Declare ctor.
752         <regs>: Now a unique_ptr.
753         (remote_gdbarch_data_handle): Delete.
754         (get_remote_arch_state): Delete.
755         (remote_state::get_remote_arch_state): New.
756         (get_remote_state): Adjust to call remote_state's
757         get_remote_arch_state method.
758         (init_remote_state): Delete, bits factored out to ...
759         (remote_arch_state::remote_arch_state): ... this new method.
760         (get_remote_packet_size, get_memory_packet_size)
761         (process_g_packet, remote_target::fetch_registers)
762         (remote_target::prepare_to_store, store_registers_using_G)
763         (remote_target::store_registers, remote_target::get_trace_status):
764         Adjust to call remote_state's method.
765         (_initialize_remote): Remove reference to
766         remote_gdbarch_data_handle.
767
768 2018-05-22  Pedro Alves  <palves@redhat.com>
769
770         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
771         pread>: New method declarations.
772         (remote_target::open_1): Adjust.
773         (readahead_cache_invalidate): Rename to ...
774         (readahead_cache::invalidate): ... this, and adjust to be a class
775         method.
776         (readahead_cache_invalidate_fd): Rename to ...
777         (readahead_cache::invalidate_fd): ... this, and adjust to be a
778         class method.
779         (remote_hostio_pwrite): Adjust.
780         (remote_hostio_pread_from_cache): Rename to ...
781         (readahead_cache::pread): ... this, and adjust to be a class
782         method.
783         (remote_hostio_close): Adjust.
784
785 2018-05-22  Pedro Alves  <palves@redhat.com>
786
787         * remote.c (remote_hostio_close_cleanup): Delete.
788         (class scoped_remote_fd): New.
789         (remote_file_put, remote_file_get): Use it.
790
791 2018-05-22  Pedro Alves  <palves@redhat.com>
792
793         (struct vCont_action_support): Use bool and initialize all fields.
794         (struct readahead_cache): Initialize all fields.
795         (remote_state): Use bool and initialize all fields.
796         (remote_state::remote_state, remote_state::~remote_state): New.
797         (new_remote_state): Delete.
798         (_initialize_remote): Use new to allocate remote_state.
799
800 2018-05-22  Pedro Alves  <palves@redhat.com>
801             張俊芝  <zjz@zjz.name>
802
803         PR gdb/22973
804         * c-exp.y: Include "c-support.h".
805         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
806         of tolower.  Use c_ident_is_alpha to scan names.
807         * c-lang.c: Include "c-support.h".
808         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
809         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
810         * c-support.h: New file, with bits factored out from ...
811         * cp-name-parser.y: ... this file.
812         Include "c-support.h".
813         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
814         c-support.h and renamed.
815         (symbol_end, yylex): Adjust.
816
817 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
818
819         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
820         parameter type to CORE_ADDR.
821         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
822         parameter type in declaration to CORE_ADDR.
823         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
824         target_auxv_search to get AT_HWCAP and use the result to get the
825         target description.
826         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
827         to CORE_ADDR. Remove the cast of the return value to unsigned
828         long. Fix error predicate of target_auxv_search.
829         (ppc_linux_nat_target::read_description): Change the type of the
830         hwcap variable to CORE_ADDR.
831
832 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
833
834         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
835         if the size of fpscr is larger than 32 bits.
836
837 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
838
839         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
840         (ppc32_linux_vsxregmap): New global.
841         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
842         regcache_supply_regset, and regcache_collect_regset.
843         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
844         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
845         (fetch_vsx_register, store_vsx_register): Remove.
846         (fetch_vsx_registers): Add regno parameter. Get regset using
847         ppc_linux_vsxregset. Use regset to supply registers.
848         (store_vsx_registers): Add regno parameter. Get regset using
849         ppc_linux_vsxregset. Use regset to collect registers.
850         (fetch_register): Call fetch_vsx_registers instead of
851         fetch_vsx_register.
852         (store_register): Call store_vsx_registers instead of
853         store_vsx_register.
854         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
855         new regno parameter.
856         (store_ppc_registers): Call store_vsx_registers with -1 for the
857         new regno parameter.
858         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
859         (ppc_collect_vsxregset): Remove.
860
861 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
862
863         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
864         offset fields.
865         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
866         for vector register offset fields.
867         (ppc64_fbsd_reg_offsets): Likewise.
868         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
869         to vector register offset fields.
870         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
871         to vector register offset fields.
872         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
873         vector register offset fields.
874         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
875         initializers for vector register offset fields.
876         (rs6000_aix64_reg_offsets): Likewise.
877         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
878         (ppc_supply_vrregset): Remove.
879         (ppc_collect_vrregset): Remove.
880         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
881         (ppc_linux_vrregset) : New function.
882         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
883         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
884         (ppc32_linux_vrregset): Remove.
885         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
886         and use result instead of ppc32_linux_vrregset.
887         (ppc32_linux_reg_offsets): Remove initializers for vector register
888         offset fields.
889         (ppc64_linux_reg_offsets): Likewise.
890         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
891         * ppc-linux-nat.c: Include regset.h.
892         (gdb_vrregset_t): Adjust comment to account for little-endian
893         mode.
894         (supply_vrregset, fill_vrregset): Remove.
895         (fetch_altivec_register, store_altivec_register): Remove.
896         (fetch_altivec_registers): Add regno parameter. Get regset using
897         ppc_linux_vrregset. Use regset to supply registers.
898         (store_altivec_registers): Add regno parameter. Get regset using
899         ppc_linux_vrregset. Use regset to collect registers.
900         (fetch_register): Call fetch_altivec_registers instead of
901         fetch_altivec_register.
902         (store_register): Call store_altivec_registers instead of
903         store_altivec_register.
904         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
905         the new regno parameter.
906         (store_ppc_registers): Call store_altivec_registers with -1 for
907         the new regno parameter.
908
909 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
910
911         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
912         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
913         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
914         (gdb_vrregset_t): Change array type size to
915         PPC_LINUX_SIZEOF_VRREGSET.
916         (gdb_vsxregset_t): Change array type size to
917         PPC_LINUX_SIZEOF_VSXREGSET.
918         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
919         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
920         PPC_LINUX_SIZEOF_VSXREGSET.
921
922 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
923
924         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
925         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
926         nat/ppc-linux.c.
927         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
928         ppc_linux_target_wordsize with tid.
929         (ppc_linux_nat_target::read_description): Call ppc_linux_target
930         wordsize with tid.
931         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
932         (ppc64_64bit_inferior_p): Add static and inline specifiers.
933         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
934         tid parameter. Remove static specifier.
935         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
936         (ppc_linux_target_wordsize): New declaration.
937
938 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
939
940         * arch/ppc-linux-common.c: New file.
941         * arch/ppc-linux-common.h: New file.
942         * arch/ppc-linux-tdesc.h: New file.
943         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
944         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
945         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
946         arch/ppc-linux-tdesc.h.
947         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
948         arch/ppc-linux-tdesc.h.
949         (ppc_linux_nat_target::read_description): Remove target
950         description matching code. Fill a ppc_linux_features struct and
951         call ppc_linux_match_description with it. Move comment about ISA
952         2.05 to ppc-linux-common.c.
953         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
954         arch/ppc-linux-tdesc.h.
955         (ppc_linux_core_read_description): Remove target description
956         matching code. Fill a ppc_linux_features struct and call
957         ppc_linux_match_description with it.
958         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
959         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
960         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
961         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
962         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
963         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
964         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
965         (tdesc_powerpc_e500l): Remove.
966
967 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
968
969         * ada-lang.c (catch_assert_command): Pass empty string instead
970         of NULL for excep_string argument.
971
972 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
973
974         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
975         the width of the requested register exceeds the width of the
976         `ptrace' data type.
977
978 2018-05-21  Tom Tromey  <tom@tromey.com>
979
980         * printcmd.c (output_command): Remove.
981         (output_command_const): Rename to output_command.
982         * valprint.h (output_command): Rename from output_command_const.
983         * tracepoint.c (trace_dump_actions): Call output_command.
984
985 2018-05-21  Tom Tromey  <tom@tromey.com>
986
987         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
988         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
989         * ada-lang.h (create_ada_exception_catchpoint): Update.
990         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
991         std::string.
992         (create_excep_cond_exprs, ~ada_catchpoint)
993         (should_stop_exception, print_one_exception)
994         (print_mention_exception, print_recreate_exception): Update.
995         (ada_get_next_arg): Remove.
996         (catch_ada_exception_command_split): Use std::string.  Change type
997         of "excep_string", "cond_string".
998         (catch_ada_exception_command): Update.
999         (create_ada_exception_catchpoint): Change type of excep_string.
1000         (ada_exception_sal): Remove excep_string parameter.
1001         (~ada_catchpoint): Remove.
1002
1003 2018-05-21  Tom Tromey  <tom@tromey.com>
1004
1005         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
1006         cleanup.
1007
1008 2018-05-21  Tom Tromey  <tom@tromey.com>
1009
1010         * ada-lang.c (ada_exception_message_1, ada_exception_message):
1011         Return unique_xmalloc_ptr.
1012         (print_it_exception): Update.
1013
1014 2018-05-21  Tom Tromey  <tom@tromey.com>
1015
1016         * tracepoint.c (trace_dump_actions): Use std::string.
1017
1018 2018-05-21  Tom Tromey  <tom@tromey.com>
1019
1020         * symfile.c (reread_symbols): Use std::string for original_name.
1021
1022 2018-05-21  Tom Tromey  <tom@tromey.com>
1023
1024         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
1025         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
1026         constructor.
1027
1028 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
1029
1030         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
1031         instance to...
1032         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
1033         * objfiles.c (get_objfile_bfd_data): Allocate
1034         objfile_per_bfd_storage with obstack_new when allocating on
1035         obstack.
1036
1037 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
1038
1039         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
1040         OBSTACK_ZALLOC.
1041         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
1042         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
1043         * mdebugread.c (mdebug_build_psymtabs): Likewise.
1044         (add_pending): Likewise.
1045         (parse_symbol): Likewise.
1046         (parse_partial_symbols): Likewise.
1047         (psymtab_to_symtab_1): Likewise.
1048         (new_psymtab): Likewise.
1049         (elfmdebug_build_psymtabs): Likewise.
1050         * minsyms.c (terminate_minimal_symbol_table): Likewise.
1051         * objfiles.c (get_objfile_bfd_data): Likewise.
1052         (objfile_register_static_link): Likewise.
1053         * psymtab.c (allocate_psymtab): Likewise.
1054         * stabsread.c (read_member_functions): Likewise.
1055         * xcoffread.c (xcoff_end_psymtab): Likewise.
1056
1057 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
1058
1059         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
1060         compiler supports std::is_trivially_constructible.
1061         * common/poison.h: Include obstack.h.
1062         (IsMallocable): Define to is_trivially_constructible if the
1063         compiler supports it, define to true_type otherwise.
1064         (xobnew): New.
1065         (XOBNEW): Redefine.
1066         (xobnewvec): New.
1067         (XOBNEWVEC): Redefine.
1068         * gdb_obstack.h (obstack_zalloc): New.
1069         (OBSTACK_ZALLOC): Redefine.
1070         (obstack_calloc): New.
1071         (OBSTACK_CALLOC): Redefine.
1072         (obstack_new): New.
1073         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
1074         (gdbarch_obstack): New declaration in gdbarch.h, definition in
1075         gdbarch.c.
1076         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
1077         obstack_calloc/obstack_zalloc.
1078         (gdbarch_obstack_zalloc): Remove.
1079         * target-descriptions.c (tdesc_data_init): Use obstack_new.
1080
1081 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1082
1083         * stack.c (backtrace_command_1): Remove useless variable int i.
1084
1085 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1086
1087         * stack.c (print_frame_info): Fix comment.
1088
1089 2018-05-18  Tom Tromey  <tom@tromey.com>
1090
1091         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
1092         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
1093         (~dwarf2_per_objfile): Update
1094         (dwarf2_get_dwz_file): Use new.
1095         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
1096         unique_ptr.
1097
1098 2018-05-18  Tom Tromey  <tom@tromey.com>
1099
1100         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
1101         unique_ptr.
1102         * dwarf2read.c (struct dwp_file): Add constructor and
1103         initializers.
1104         (open_and_init_dwp_file): Return a unique_ptr.
1105         (dwarf2_per_objfile, create_dwp_hash_table)
1106         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
1107         (lookup_dwo_unit_in_dwp): Update.
1108         (open_and_init_dwp_file, get_dwp_file): Update.
1109
1110 2018-05-18  Tom Tromey  <tom@tromey.com>
1111
1112         * dwarf2read.c (dwarf2_per_objfile): Update.
1113         (struct mapped_index): Add initializers.
1114         (dwarf2_read_index): Use new.
1115         (dw2_symtab_iter_init): Update.
1116         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
1117         unique_ptr.
1118
1119 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
1120
1121         * dwarf2read.c (mapped_index) <total_size>: Remove.
1122
1123 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
1124
1125         * unittests/format_pieces-selftests.c (test_format_specifier):
1126         Add ARI comments.
1127
1128 2018-05-18  Tom Tromey  <tom@tromey.com>
1129
1130         * c-typeprint.c (maybe_print_hole): New function.
1131         (c_print_type_struct_field_offset): Update.
1132         (c_type_print_base_struct_union): Call maybe_print_hole.
1133
1134 2018-05-17  Keith Seitz  <keiths@redhat.com>
1135
1136         * breakpoint.c (build_bpstat_chain): New function, moved from
1137         bpstat_stop_status.
1138         (bpstat_stop_status): Add optional parameter, `stop_chain'.
1139         If no stop chain is passed, call build_bpstat_chain to build it.
1140         * breakpoint.h (build_bpstat_chain): Declare.
1141         (bpstat_stop_status): Move documentation here from breakpoint.c.
1142         * infrun.c (handle_signal_stop): Before eliding inlined frames,
1143         build the stop chain and pass it to skip_inline_frames.
1144         Pass this stop chain to bpstat_stop_status.
1145         * inline-frame.c: Include breakpoint.h.
1146         (stopped_by_user_bp_inline_frame): New function.
1147         (skip_inline_frames): Add parameter `stop_chain'.
1148         Move documention to inline-frame.h.
1149         If non-NULL, use stopped_by_user_bp_inline_frame to determine
1150         whether the frame should be elided.
1151         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
1152         Add moved documentation and update for new parameter.
1153
1154 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
1155
1156         PR cli/14975
1157         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1158         unittests/format_pieces-selftests.c.
1159         * common/format.h (format_piece) <operator==>: New.
1160         (format_pieces) <operator[]>: Remove.
1161         * common/format.c (format_pieces::format_pieces): Handle \e.
1162         * unittests/format_pieces-selftests.c: New.
1163
1164 2018-05-17  Tom Tromey  <tom@tromey.com>
1165
1166         PR symtab/23010:
1167         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
1168         (dw2_instantiate_symtab): Add skip_partial parameter.
1169         (dw2_find_last_source_symtab, dw2_map_expand_apply)
1170         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
1171         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
1172         (dw2_expand_symtabs_matching_one)
1173         (dw2_find_pc_sect_compunit_symtab)
1174         (dw2_debug_names_lookup_symbol)
1175         (dw2_debug_names_expand_symtabs_for_function): Update.
1176         (init_cutu_and_read_dies): Add skip_partial parameter.
1177         (process_psymtab_comp_unit, build_type_psymtabs_1)
1178         (process_skeletonless_type_unit, load_partial_comp_unit)
1179         (psymtab_to_symtab_1): Update.
1180         (load_full_comp_unit): Add skip_partial parameter.
1181         (process_imported_unit_die, dwarf2_read_addr_index)
1182         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
1183         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
1184         (read_signatured_type): Update.
1185
1186 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
1187
1188         * value.c (release_value): Remove unused variable.
1189         (record_latest_value): Likewise.
1190         (access_value_history): Likewise.
1191         (preserve_values): Likewise.
1192
1193 2018-05-17  Tom Tromey  <tom@tromey.com>
1194
1195         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
1196         Initialize.
1197
1198 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
1199
1200         PR gdb/22286
1201         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
1202         Also handle registers whose width is not a multiple of
1203         PTRACE_TYPE_RET.
1204         (linux_nat_trad_target::store_register): Likewise.
1205
1206 2018-05-16  Tom Tromey  <tom@tromey.com>
1207
1208         * gdbcore.h (core_bfd): Redefine.
1209         * corelow.c (core_target::close): Update.
1210         (core_target_open): Update.
1211         * progspace.h (struct program_space) <cbfd>: Now a
1212         gdb_bfd_ref_ptr.
1213
1214 2018-05-16  Tom Tromey  <tom@tromey.com>
1215
1216         PR cli/19551:
1217         * symfile-add-flags.h (enum symfile_add_flags)
1218         <SYMFILE_NOT_FILENAME>: New constant.
1219         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
1220         objfile name from BFD.
1221         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
1222         * minidebug.c (find_separate_debug_file_in_section): Put
1223         ".gnu_debugdata" into BFD's file name.
1224
1225 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
1226
1227         * regcache.c (regcache_read_ftype, regcache_write_ftype):
1228         Remove.
1229
1230 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
1231
1232         PR binutils/21446
1233         * aarch64-tdep.c (aarch64_analyze_prologue,
1234         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
1235         Indicate not interested in errors.
1236
1237 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
1238
1239         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
1240         Supply the MIPS_ZERO_REGNUM register.
1241
1242 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
1243
1244         * mips-tdep.c (mask_address_var): Make variable static.
1245
1246 2018-05-14  Tom Tromey  <tom@tromey.com>
1247
1248         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
1249
1250 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
1251
1252         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
1253         FXSAVE_ADDR for the mxcsr register.
1254
1255 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
1256
1257         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
1258
1259 2018-05-11  Pedro Alves  <palves@redhat.com>
1260
1261         * corelow.c (core_target) <core_target>: No longer inline.
1262         Initialize m_core_gdbarch, m_core_vec and build the section table
1263         here.
1264         <~core_target>: New.
1265         <core_gdbarch, get_core_register_section>: New methods.
1266         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
1267         factored out from ...
1268         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
1269         (core_ops): Delete.
1270         (sniff_core_bfd): Add gdbarch parameter.
1271         (core_close): Delete, merged into ...
1272         (core_target::close): ... here.  Delete self.
1273         (core_close_cleanup): Delete.
1274         (core_target_open): Allocate a core_target on the heap.  Use a
1275         unique_ptr instead of a cleanup.  Bits moved into the core_target
1276         ctor.  Adjust to use core_target methods instead of globals.
1277         (get_core_register_section): Rename to ...
1278         (core_target::get_core_register_section): ... this and adjust.
1279         (struct get_core_registers_cb_data): New.
1280         (get_core_registers_cb): Use it.  Use bool.
1281         (core_target::fetch_registers, core_target::files_info)
1282         (core_target::xfer_partial, core_target::read_description)
1283         (core_target::pid_to, core_target::thread_name): Adjust to
1284         reference class fields instead of globals.
1285         * target.h (struct target_ops_deleter, target_ops_up): New.
1286
1287 2018-05-11  Pedro Alves  <palves@redhat.com>
1288
1289         * corefile.c (core_file_command): Move to corelow.c.
1290         * corelow.c (the_core_target): Delete.
1291         (core_file_command): Moved from corefile.c.  Check exec_bfd
1292         instead of the_core_target.  Use target_detach instead of calling
1293         into the_core_target directly.
1294         (maybe_say_no_core_file_now): New.
1295         (core_target::detach): Use it.
1296         (_initialize_corelow): Remove references to the_core_target.
1297         * gdbcore.h (the_core_target): Delete.
1298
1299 2018-05-11  Tom Tromey  <tromey@redhat.com>
1300             Pedro Alves  <palves@redhat.com>
1301
1302         * corefile.c (core_bfd): Remove.
1303         * gdbcore.h (core_bfd): Now a macro.
1304         * progspace.h (struct program_space) <cbfd>: New field.
1305
1306 2018-05-11  Tom Tromey  <tom@tromey.com>
1307
1308         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
1309         gdb::def_vector.
1310
1311 2018-05-10  Tom Tromey  <tom@tromey.com>
1312
1313         * configure: Rebuild.
1314         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
1315
1316 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
1317
1318         PR server/23158:
1319         * regformats/regdat.sh: Adjust script, following the addition
1320         of the new expedite_regs parameter to init_target_desc.
1321
1322 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
1323     
1324         PR gdb/23127
1325         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
1326         set_gdbarch_significant_addr_bit.
1327         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
1328         set_gdbarch_significant_addr_bit.
1329         * utils.c (address_significant): Update to sign extend addr.
1330
1331 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
1332
1333         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
1334         (xtensa_linux_init_abi): Limit tdep->num_regs by
1335         tdep->num_nopriv_regs.
1336         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
1337         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
1338         not initialized.
1339
1340 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
1341
1342         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
1343
1344 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
1345
1346         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
1347         (I387_MXCSR_INIT_VAL): New constant.
1348         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
1349         buffer if it was supplied by the inferior.
1350         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
1351         (i387_xsave_get_clear_bv): New function.
1352         (i387_supply_xsave): Only read x87 control registers from the
1353         xsave buffer if the feature is enabled, and the state will have
1354         been written, otherwise, provide a suitable default.
1355         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
1356         including x87 control registers.  Update control registers if they
1357         have changed from the default value, and mark features as enabled
1358         as required.
1359         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
1360
1361 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
1362
1363         * spu-tdep.c (info_spu_event_command): Fix output formatting.
1364
1365 2018-05-07  Tom Tromey  <tom@tromey.com>
1366
1367         * configure: Rebuild.
1368         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
1369
1370 2018-05-07  Tom Tromey  <tom@tromey.com>
1371
1372         PR tdep/20362:
1373         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
1374         bit.  Use correct value for VDIV.
1375
1376 2018-05-04  Tom Tromey  <tom@tromey.com>
1377
1378         * configure: Rebuild.
1379         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
1380
1381 2018-05-04  Tom Tromey  <tom@tromey.com>
1382
1383         * linux-record.c (record_linux_system_call) <case
1384         RECORD_SYS_RECVFROM>: Add "break".
1385
1386 2018-05-04  Tom Tromey  <tom@tromey.com>
1387
1388         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
1389         Add missing "break".
1390         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
1391         Add missing "break".
1392
1393 2018-05-04  Tom Tromey  <tom@tromey.com>
1394
1395         * rs6000-tdep.c (ppc_process_record_op4)
1396         (ppc_process_record_op63): Add fall-through comment.
1397
1398 2018-05-04  Tom Tromey  <tom@tromey.com>
1399
1400         * i386-tdep.c (i386_process_record): Add fall-through comment.
1401
1402 2018-05-04  Tom Tromey  <tom@tromey.com>
1403
1404         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
1405         comment.
1406
1407 2018-05-04  Tom Tromey  <tom@tromey.com>
1408
1409         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
1410         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
1411         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
1412         comment.
1413         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
1414         comment.
1415         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
1416         comment.
1417
1418 2018-05-04  Tom Tromey  <tom@tromey.com>
1419
1420         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
1421
1422 2018-05-04  Tom Tromey  <tom@tromey.com>
1423
1424         * s390-tdep.c (s390_process_record): Fix fall-through comments.
1425         * xcoffread.c (scan_xcoff_symtab): Move comment later.
1426         * symfile.c (section_is_mapped): Fix fall-through comment.
1427         * stabsread.c (define_symbol, read_member_functions): Fix
1428         fall-through comment.
1429         * s390-linux-tdep.c (s390_process_record): Fix fall-through
1430         comment.
1431         * remote.c (remote_wait_as): Fix fall-through comment.
1432         * p-exp.y (yylex): Fix fall-through comment.
1433         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
1434         comment.
1435         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
1436         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
1437         * jv-exp.y (yylex): Fix fall-through comment.
1438         * go-exp.y (lex_one_token): Fix fall-through comment.
1439         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
1440         fall-through comment.
1441         * f-exp.y (yylex): Fix fall-through comment.
1442         * dwarf2read.c (process_die): Fix fall-through comments.
1443         * dbxread.c (process_one_symbol): Fix fall-through comment.
1444         * d-exp.y (lex_one_token): Fix fall-through comment.
1445         * cp-name-parser.y (yylex): Fix fall-through comment.
1446         * coffread.c (coff_symtab_read): Fix fall-through comment.
1447         * c-exp.y (lex_one_token): Fix fall-through comment.
1448         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
1449         comment.
1450         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
1451         comment.
1452
1453 2018-05-04  Tom Tromey  <tom@tromey.com>
1454
1455         PR python/22730:
1456         * NEWS: Mention gdb.execute change.
1457         * gdbcmd.h (execute_control_command): Don't declare.
1458         * python/python.c (execute_gdb_command): Use read_command_lines_1,
1459         execute_control_commands, execute_control_commands_to_string.
1460         * cli/cli-script.h (execute_control_commands)
1461         (execute_control_commands_to_string): Declare.
1462         (execute_control_command): Add from_tty parameter.
1463         * cli/cli-script.c (execute_control_commands)
1464         (execute_control_commands_to_string): New functions.
1465         (execute_user_command): Use execute_control_commands.
1466         (execute_control_command_1): Add "from_tty" parameter.  Update.
1467         (execute_control_command): Likewise.
1468
1469 2018-05-04  Tom Tromey  <tom@tromey.com>
1470
1471         PR python/22731:
1472         * NEWS: Mention that breakpoint commands are writable.
1473         * python/py-breakpoint.c (bppy_set_commands): New function.
1474         (breakpoint_object_getset) <"commands">: Use it.
1475
1476 2018-05-04  Tom Tromey  <tom@tromey.com>
1477
1478         * tracepoint.c (actions_command): Update.
1479         * mi/mi-cmd-break.c (mi_command_line_array)
1480         (mi_command_line_array_cnt, mi_command_line_array_ptr)
1481         (mi_read_next_line): Remove.
1482         (mi_cmd_break_commands): Update.
1483         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
1484         function_view.
1485         * cli/cli-script.c (get_command_line): Update.
1486         (process_next_line): Use function_view.  Constify.
1487         (recurse_read_control_structure, read_command_lines)
1488         (read_command_lines_1): Change argument types to function_view.
1489         (do_define_command, document_command): Update.
1490         * breakpoint.h (check_tracepoint_command): Don't declare.
1491         * breakpoint.c (check_tracepoint_command): Remove.
1492         (commands_command_1, create_tracepoint_from_upload): Update.
1493
1494 2018-05-04  Tom Tromey  <tom@tromey.com>
1495
1496         PR gdb/11750:
1497         * cli/cli-script.h (enum command_control_type) <define_control>:
1498         New constant.
1499         * cli/cli-script.c (multi_line_command_p): Handle define_control.
1500         (build_command_line, execute_control_command_1)
1501         (process_next_line): Likewise.
1502         (do_define_command): New function, extracted from define_command.
1503         (define_command): Use it.
1504
1505 2018-05-04  Tom Tromey  <tom@tromey.com>
1506
1507         * tracepoint.c (actions_command): Update.
1508         * cli/cli-script.h (read_command_lines): Update.
1509         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
1510         (MAX_TMPBUF): Remove define.
1511         (define_command): Use string_printf.
1512         (document_command): Likewise.
1513         * breakpoint.c (commands_command_1): Update.
1514
1515 2018-05-04  Tom Tromey  <tom@tromey.com>
1516
1517         * top.c (execute_command): Update.
1518         * cli/cli-script.h (print_command_lines): Now varargs.
1519         * cli/cli-script.c (print_command_lines): Now varargs.
1520         (execute_control_command_1) <case while_control, case if_control>:
1521         Update.
1522
1523 2018-05-04  Tom Tromey  <tom@tromey.com>
1524
1525         * tracepoint.c (all_tracepoint_actions): Rename from
1526         all_tracepoint_actions_and_cleanup.  Change return type.
1527         (actions_command, encode_actions_1, encode_actions)
1528         (trace_dump_actions, tdump_command): Update.
1529         * remote.c (remote_download_command_source): Update.
1530         * python/python.c (gdbpy_eval_from_control_command)
1531         (python_command, python_interactive_command): Update.
1532         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
1533         * guile/guile.c (guile_command)
1534         (gdbscm_eval_from_control_command, guile_command): Update.
1535         * compile/compile.c (compile_code_command)
1536         (compile_print_command, compile_to_object): Update.
1537         * cli/cli-script.h (struct command_lines_deleter): New.
1538         (counted_command_line): New typedef.
1539         (struct command_line): Add constructor, destructor.
1540         <body_list>: Remove.
1541         <body_list_0, body_list_1>: New members.
1542         (command_line_up): Remove typedef.
1543         (read_command_lines, read_command_lines_1, get_command_line):
1544         Update.
1545         (copy_command_lines): Don't declare.
1546         * cli/cli-script.c (build_command_line): Use "new".
1547         (get_command_line): Return counted_command_line.
1548         (print_command_lines, execute_user_command)
1549         (execute_control_command_1, while_command, if_command): Update.
1550         (realloc_body_list): Remove.
1551         (process_next_line, recurse_read_control_structure): Update.
1552         (read_command_lines, read_command_lines_1): Return counted_command_line.
1553         (free_command_lines): Use "delete".
1554         (copy_command_lines): Remove.
1555         (define_command, document_command, show_user_1): Update.
1556         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
1557         a counted_command_line.
1558         * breakpoint.h (counted_command_line): Remove typedef.
1559         (breakpoint_set_commands): Update.
1560         * breakpoint.c (check_no_tracepoint_commands)
1561         (validate_commands_for_breakpoint): Update.
1562         (breakpoint_set_commands): Change commands to be a
1563         counted_command_line.
1564         (commands_command_1, update_dprintf_command_list)
1565         (create_tracepoint_from_upload): Update.
1566
1567 2018-05-04  Tom Tromey  <tom@tromey.com>
1568
1569         * cli/cli-decode.h (cmd_list_element): New constructor.
1570         (~cmd_list_element): New destructor.
1571         (struct cmd_list_element): Add initializers.
1572         * cli/cli-decode.c (do_add_cmd): Use "new".
1573         (delete_cmd): Use "delete".
1574
1575 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
1576             Pedro Alves <palves@redhat.com>
1577
1578         PR breakpoints/19806 and support for PR external/20207.
1579         * NEWS: Mention Aarch64 watchpoint improvements.
1580         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
1581         watchpoints and PR external/20207 watchpoints.
1582         * nat/aarch64-linux-hw-point.c
1583         (kernel_supports_any_contiguous_range): New.
1584         (aarch64_watchpoint_offset): New.
1585         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
1586         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
1587         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
1588         (aarch64_align_watchpoint): New parameters aligned_offset_p and
1589         next_addr_orig_p.  Support PR external/20207 watchpoints.
1590         (aarch64_downgrade_regs): New.
1591         (aarch64_dr_state_insert_one_point): New parameters offset and
1592         addr_orig.
1593         (aarch64_dr_state_remove_one_point): Likewise.
1594         (aarch64_handle_breakpoint): Update caller.
1595         (aarch64_handle_aligned_watchpoint): Likewise.
1596         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
1597         aligned_offset.
1598         (aarch64_linux_set_debug_regs): Remove const from state.  Call
1599         aarch64_downgrade_regs.
1600         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
1601         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
1602         (DR_CONTROL_MASK): ... this.
1603         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
1604         (unsigned int aarch64_watchpoint_offset): New prototype.
1605         (aarch64_linux_set_debug_regs): Remove const from state.
1606         * utils.c (align_up, align_down): Move to ...
1607         * common/common-utils.c (align_up, align_down): ... here.
1608         * utils.h (align_up, align_down): Move to ...
1609         * common/common-utils.h (align_up, align_down): ... here.
1610
1611 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
1612
1613         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
1614         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
1615         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
1616         Re-implement to match the ABI as summarized in GCC's
1617         gcc/config/sparc/sparc.c.  All callers updated.
1618         (sparc32_store_arguments): Remove assertion.
1619
1620 2018-05-04  Tom Tromey  <tom@tromey.com>
1621
1622         * printcmd.c: Don't include tui.h.
1623         (decode_format): Use skip_spaces.
1624
1625 2018-05-04  Tom Tromey  <tom@tromey.com>
1626
1627         PR gdb/22619:
1628         * printcmd.c (last_count): New global.
1629         (x_command): Use saved count when repeating.
1630
1631 2018-05-04  Tom Tromey  <tom@tromey.com>
1632
1633         * nto-procfs.c (do_closedir_cleanup): Remove.
1634         (procfs_pidlist): Use gdb_dir_up.
1635         * procfs.c (do_closedir_cleanup): Remove.
1636         (proc_update_threads): Use gdb_dir_up.
1637         * common/filestuff.h (struct gdb_dir_deleter): New.
1638         (gdb_dir_up): New typedef.
1639
1640 2018-05-04  Tom Tromey  <tom@tromey.com>
1641
1642         * ada-lang.c (print_mention_exception): Use std::string.
1643
1644 2018-05-04  Tom Tromey  <tom@tromey.com>
1645
1646         * ada-lang.c (create_excep_cond_exprs): Update.
1647         (ada_exception_catchpoint_cond_string): Use std::string.
1648
1649 2018-05-04  Tom Tromey  <tom@tromey.com>
1650
1651         * ada-lang.c (xget_renaming_scope): Return std::string.
1652         (old_renaming_is_invisible): Update.
1653
1654 2018-05-04  Tom Tromey  <tom@tromey.com>
1655
1656         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
1657         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
1658
1659 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
1660
1661         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
1662
1663 2018-05-04  Tom Tromey  <tom@tromey.com>
1664
1665         * remote.c (remote_query_supported_append): Change type.
1666         (remote_check_symbols): Update.
1667
1668 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
1669
1670         PR gdb/11420
1671         * configure.ac: Prepend libpython.
1672         * python/python-config.py: Likewise.
1673         * configure: Regenerate.
1674
1675 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
1676
1677         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
1678
1679 2018-05-03  Pedro Alves  <palves@redhat.com>
1680
1681         * s390-linux-nat.c
1682         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
1683         override.  Write 'true' instead of '1'.
1684         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
1685         declaration.
1686
1687 2018-05-02  Pedro Alves  <palves@redhat.com>
1688
1689         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
1690         add_inf_child_target.
1691         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
1692         add_inf_child_target.
1693         * aix-thread.c (aix_thread_target_info): New.
1694         (aix_thread_target) <shortname, longname, doc>: Delete.
1695         <info>: New.
1696         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
1697         add_inf_child_target.
1698         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
1699         add_inf_child_target.
1700         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
1701         add_inf_child_target.
1702         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
1703         add_inf_child_target.
1704         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
1705         add_inf_child_target.
1706         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
1707         add_inf_child_target.
1708         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
1709         add_inf_child_target.
1710         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
1711         add_inf_child_target.
1712         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
1713         add_inf_child_target.
1714         * bfd-target.c (target_bfd_target_info): New.
1715         (target_bfd) <shortname, longname, doc>: Delete.
1716         <info>: New.
1717         * bsd-kvm.c (bsd_kvm_target_info): New.
1718         (bsd_kvm_target) <shortname, longname, doc>: Delete.
1719         <info>: New.
1720         (bsd_kvm_target::open): Rename to ...
1721         (bsd_kvm_target_open): ... this.  Adjust.
1722         * bsd-uthread.c (bsd_uthread_target_info): New.
1723         (bsd_uthread_target) <shortname, longname, doc>: Delete.
1724         <info>: New.
1725         * corefile.c (core_file_command): Adjust.
1726         * corelow.c (core_target_info): New.
1727         (core_target) <shortname, longname, doc>: Delete.
1728         <info>: New.
1729         (core_target::open): Rename to ...
1730         (core_target_open): ... this.  Adjust.
1731         * ctf.c (ctf_target_info): New.
1732         (ctf_target) <shortname, longname, doc>: Delete.
1733         <info>: New.
1734         (ctf_target::open): Rename to ...
1735         (ctf_target_open): ... this.
1736         (_initialize_ctf): Adjust.
1737         * exec.c (exec_target_info): New.
1738         (exec_target) <shortname, longname, doc>: Delete.
1739         <info>: New.
1740         (exec_target::open): Rename to ...
1741         (exec_target_open): ... this.
1742         * gdbcore.h (core_target_open): Declare.
1743         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
1744         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
1745         add_inf_child_target.
1746         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
1747         add_inf_child_target.
1748         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
1749         add_inf_child_target.
1750         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
1751         add_inf_child_target.
1752         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
1753         add_inf_child_target.
1754         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
1755         add_inf_child_target.
1756         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
1757         add_inf_child_target.
1758         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
1759         add_inf_child_target.
1760         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
1761         add_inf_child_target.
1762         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
1763         add_inf_child_target.
1764         * inf-child.c (inf_child_target_info): New.
1765         (inf_child_target::info): New.
1766         (inf_child_open_target): Remove 'target' parameter.  Use
1767         get_native_target instead.
1768         (inf_child_target::open): Delete.
1769         (add_inf_child_target): New.
1770         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
1771         Delete.
1772         <info>: New.
1773         (add_inf_child_target): Declare.
1774         (inf_child_open_target): Declare.
1775         * linux-thread-db.c (thread_db_target_info): New.
1776         (thread_db_target) <shortname, longname, doc>: Delete.
1777         <info>: New.
1778         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
1779         add_inf_child_target.
1780         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
1781         add_inf_child_target.
1782         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
1783         add_inf_child_target.
1784         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
1785         add_inf_child_target.
1786         * make-target-delegates (print_class): Adjust.
1787         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
1788         add_inf_child_target.
1789         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
1790         add_inf_child_target.
1791         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
1792         add_inf_child_target.
1793         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
1794         add_inf_child_target.
1795         * nto-procfs.c (nto_native_target_info): New.
1796         (nto_procfs_target_native) <shortname, longname, doc>:
1797         Delete.
1798         <info>: New.
1799         (nto_procfs_target_info): New.
1800         (nto_procfs_target_procfs) <shortname, longname, doc>:
1801         Delete.
1802         <info>: New.
1803         (init_procfs_targets): Adjust.
1804         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
1805         add_inf_child_target.
1806         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
1807         add_inf_child_target.
1808         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
1809         add_inf_child_target.
1810         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
1811         add_inf_child_target.
1812         * ravenscar-thread.c (ravenscar_target_info): New.
1813         (ravenscar_thread_target) <shortname, longname, doc>:
1814         Delete.
1815         <info>: New.
1816         * record-btrace.c (record_btrace_target_info):
1817         (record_btrace_target) <shortname, longname, doc>: Delete.
1818         <info>: New.
1819         (record_btrace_target::open): Rename to ...
1820         (record_btrace_target_open): ... this.  Adjust.
1821         * record-full.c (record_longname, record_doc): New.
1822         (record_full_base_target) <shortname, longname, doc>: Delete.
1823         <info>: New.
1824         (record_full_target_info): New.
1825         (record_full_target): <shortname>: Delete.
1826         <info>: New.
1827         (record_full_core_open_1, record_full_open_1): Update comments.
1828         (record_full_base_target::open): Rename to ...
1829         (record_full_open): ... this.
1830         (cmd_record_full_restore): Update.
1831         (_initialize_record_full): Update.
1832         * remote-sim.c (remote_sim_target_info): New.
1833         (gdbsim_target) <shortname, longname, doc>: Delete.
1834         <info>: New.
1835         (gdbsim_target::open): Rename to ...
1836         (gdbsim_target_open): ... this.
1837         (_initialize_remote_sim): Adjust.
1838         * remote.c (remote_doc): New.
1839         (remote_target_info): New.
1840         (remote_target) <shortname, longname, doc>: Delete.
1841         <info>: New.
1842         (extended_remote_target_info): New.
1843         (extended_remote_target) <shortname, longname, doc>: Delete.
1844         <info>: New.
1845         (remote_target::open_1): Make static.  Adjust.
1846         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
1847         * s390-linux-nat.c (_initialize_s390_nat): Use
1848         add_inf_child_target.
1849         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
1850         add_inf_child_target.
1851         * sol-thread.c (thread_db_target_info): New.
1852         (sol_thread_target) <shortname, longname, doc>: Delete.
1853         <info>: New.
1854         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
1855         add_inf_child_target.
1856         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
1857         add_inf_child_target.
1858         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
1859         add_inf_child_target.
1860         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
1861         add_inf_child_target.
1862         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
1863         add_inf_child_target.
1864         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
1865         add_inf_child_target.
1866         * spu-linux-nat.c (_initialize_spu_nat): Use
1867         add_inf_child_target.
1868         * spu-multiarch.c (spu_multiarch_target_info): New.
1869         (spu_multiarch_target) <shortname, longname, doc>: Delete.
1870         <info>: New.
1871         * target-delegates.c: Regenerate.
1872         * target.c: Include <unordered_map>.
1873         (target_ops_p): Delete.
1874         (DEF_VEC_P(target_ops_p)): Delete.
1875         (target_factories): New.
1876         (test_target_info): New.
1877         (test_target_ops::info): New.
1878         (open_target): Adjust to use target_factories.
1879         (add_target_with_completer): Rename to ...
1880         (add_target): ... this.  Change prototype.  Register target_info
1881         and open callback in target_factories.  Register target_info in
1882         command context instead of target_ops.
1883         (add_target): Delete old implementation.
1884         (add_deprecated_target_alias): Change prototype.  Adjust.
1885         (the_native_target): New.
1886         (set_native_target, get_native_target): New.
1887         (find_default_run_target): Use the_native_target.
1888         (find_attach_target, find_run_target): Simplify.
1889         (target_ops::open): Delete.
1890         (dummy_target_info): New.
1891         (dummy_target::shortname, dummy_target::longname)
1892         (dummy_target::doc): Delete.
1893         (dummy_target::info): New.
1894         (debug_target::shortname, debug_target::longname)
1895         (debug_target::doc): Delete.
1896         (debug_target::info): New.
1897         * target.h (struct target_info): New.
1898         (target_ops::~target_ops): Add comment.
1899         (target_ops::info): New.
1900         (target_ops::shortname, target_ops::longname, target_ops::doc): No
1901         longer virtual.  Implement in terms of target_info.
1902         (set_native_target, get_native_target): Declare.
1903         (target_open_ftype): New.
1904         (add_target, add_target_with_completer)
1905         (add_deprecated_target_alias): Change prototype.
1906         (test_target) <shortname, longname, doc>: Delete.
1907         <info>: New.
1908         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
1909         add_inf_child_target.
1910         * tracefile-tfile.c (tfile_target_info): New.
1911         (tfile_target) <shortname, longname, doc>: Delete.
1912         <info>: New.
1913         (tfile_target::open): Rename to ...
1914         (tfile_target_open): ... this.
1915         (_initialize_tracefile_tfile): Adjust.
1916         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
1917         add_inf_child_target.
1918         * windows-nat.c (_initialize_windows_nat): Use
1919         add_inf_child_target.
1920         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
1921         add_inf_child_target.
1922
1923 2018-05-02  Pedro Alves  <palves@redhat.com>
1924
1925         * linux-nat.h (linux_nat_target) <low_new_thread,
1926         low_delete_thread, low_new_fork, low_forget_process,
1927         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
1928         New virtual methods.
1929         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
1930         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
1931         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
1932         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
1933         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
1934         Delete.
1935         * linux-fork.c (delete_fork): Adjust to call low method.
1936         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
1937         (linux_nat_new_fork, linux_nat_forget_process_hook)
1938         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
1939         (linux_nat_status_is_event):
1940         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
1941         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
1942         to call low method.
1943         (sigtrap_is_event): Rename to ...
1944         (linux_nat_target::low_status_is_event): ... this.
1945         (linux_nat_set_status_is_event): Delete.
1946         (save_stop_reason, linux_nat_wait_1)
1947         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
1948         low methods.
1949         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
1950         (linux_nat_set_new_fork, linux_nat_set_forget_process)
1951         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
1952         (linux_nat_set_prepare_to_resume): Delete.
1953         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
1954         low virtual methods.
1955         * amd64-linux-nat.c: Likewise.
1956         * arm-linux-nat.c: Likewise.
1957         * i386-linux-nat.c: Likewise.
1958         * ia64-linux-nat.c: Likewise.
1959         * mips-linux-nat.c: Likewise.
1960         * ppc-linux-nat.c: Likewise.
1961         * s390-linux-nat.c: Likewise.
1962         * sparc64-linux-nat.c: Likewise.
1963         * x86-linux-nat.c: Likewise.
1964         * x86-linux-nat.h: Include "nat/x86-linux.h".
1965         (x86_linux_nat_target) <low_new_fork, low_forget_process,
1966         low_prepare_to_resume, low_new_thread, low_delete_thread>:
1967         Override methods.
1968
1969 2018-05-02  Pedro Alves  <palves@redhat.com>
1970
1971         * target.h (target_ops)
1972         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1973         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
1974         stopped_by_watchpoint, have_continuable_watchpoint,
1975         stopped_data_address, watchpoint_addr_within_range,
1976         can_accel_watchpoint_condition, can_run, thread_alive,
1977         has_all_memory, has_memory, has_stack, has_registers,
1978         has_execution, can_async_p, is_async_p, supports_non_stop,
1979         always_non_stop_p, can_execute_reverse, supports_multi_process,
1980         supports_enable_disable_tracepoint,
1981         supports_disable_randomization, supports_string_tracing,
1982         supports_evaluation_of_breakpoint_conditions,
1983         can_run_breakpoint_commands, filesystem_is_local,
1984         can_download_tracepoint, get_trace_state_variable_value,
1985         set_trace_notes, get_tib_address, use_agent, can_use_agent,
1986         record_is_replaying, record_will_replay,
1987         augmented_libraries_svr4_read>: Adjust to return bool.
1988         * aarch64-linux-nat.c: All implementations adjusted.
1989         * aix-thread.c: All implementations adjusted.
1990         * arm-linux-nat.c: All implementations adjusted.
1991         * breakpoint.c: All implementations adjusted.
1992         * bsd-kvm.c: All implementations adjusted.
1993         * bsd-uthread.c: All implementations adjusted.
1994         * corelow.c: All implementations adjusted.
1995         * ctf.c: All implementations adjusted.
1996         * darwin-nat.c: All implementations adjusted.
1997         * darwin-nat.h: All implementations adjusted.
1998         * exec.c: All implementations adjusted.
1999         * fbsd-nat.c: All implementations adjusted.
2000         * fbsd-nat.h: All implementations adjusted.
2001         * gnu-nat.c: All implementations adjusted.
2002         * gnu-nat.h: All implementations adjusted.
2003         * go32-nat.c: All implementations adjusted.
2004         * ia64-linux-nat.c: All implementations adjusted.
2005         * inf-child.c: All implementations adjusted.
2006         * inf-child.h: All implementations adjusted.
2007         * inf-ptrace.c: All implementations adjusted.
2008         * inf-ptrace.h: All implementations adjusted.
2009         * linux-nat.c: All implementations adjusted.
2010         * linux-nat.h: All implementations adjusted.
2011         * mips-linux-nat.c: All implementations adjusted.
2012         * nto-procfs.c: All implementations adjusted.
2013         * ppc-linux-nat.c: All implementations adjusted.
2014         * procfs.c: All implementations adjusted.
2015         * ravenscar-thread.c: All implementations adjusted.
2016         * record-btrace.c: All implementations adjusted.
2017         * record-full.c: All implementations adjusted.
2018         * remote-sim.c: All implementations adjusted.
2019         * remote.c: All implementations adjusted.
2020         * s390-linux-nat.c: All implementations adjusted.
2021         * sol-thread.c: All implementations adjusted.
2022         * spu-multiarch.c: All implementations adjusted.
2023         * target-delegates.c: All implementations adjusted.
2024         * target.c: All implementations adjusted.
2025         * target.h: All implementations adjusted.
2026         * tracefile-tfile.c: All implementations adjusted.
2027         * tracefile.c: All implementations adjusted.
2028         * tracefile.h: All implementations adjusted.
2029         * windows-nat.c: All implementations adjusted.
2030         * x86-linux-nat.h: All implementations adjusted.
2031         * x86-nat.h: All implementations adjusted.
2032
2033 2018-05-02  Pedro Alves  <palves@redhat.com>
2034
2035         * make-target-delegates (scan_target_h): Don't trim lines here.
2036         Replace sequences of tabs and/or whitespace with a single
2037         whitespace.
2038         (top level, parsing methods): Trim each line before processing it
2039         here.
2040
2041 2018-05-02  Pedro Alves  <palves@redhat.com>
2042             John Baldwin  <jhb@freebsd.org>
2043
2044         * target.h (enum strata) <debug_stratum>: New.
2045         (struct target_ops) <all delegation methods>: Replace by C++
2046         virtual methods, and drop "to_" prefix.  All references updated
2047         throughout.
2048         <to_shortname, to_longname, to_doc, to_data,
2049         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
2050         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
2051         virtual methods.  All references updated throughout.
2052         <can_attach, supports_terminal_ours, can_create_inferior,
2053         get_thread_control_capabilities, attach_no_wait>: New
2054         virtual methods.
2055         <insert_breakpoint, remove_breakpoint>: Now
2056         TARGET_DEFAULT_NORETURN methods.
2057         <info_proc>: Now returns bool.
2058         <to_magic>: Delete.
2059         (OPS_MAGIC): Delete.
2060         (current_target): Delete.  All references replaced by references
2061         to ...
2062         (target_stack): ... this.  New.
2063         (target_shortname, target_longname): Adjust.
2064         (target_can_run): Now a function declaration.
2065         (default_child_has_all_memory, default_child_has_memory)
2066         (default_child_has_stack, default_child_has_registers)
2067         (default_child_has_execution): Remove target_ops parameter.
2068         (complete_target_initialization): Delete.
2069         (memory_breakpoint_target): New template class.
2070         (test_target_ops): Refactor as a C++ class with virtual methods.
2071         * make-target-delegates (NAME_PART): Tighten.
2072         (POINTER_PART, CP_SYMBOL): New.
2073         (SIMPLE_RETURN_PART): Reimplement.
2074         (VEC_RETURN_PART): Expect less.
2075         (RETURN_PART, VIRTUAL_PART): New.
2076         (METHOD): Adjust to C++ virtual methods.
2077         (scan_target_h): Remove reference to C99.
2078         (dname): Output "target_ops::" prefix.
2079         (write_function_header): Adjust to output a C++ class method.
2080         (write_declaration): New.
2081         (write_delegator): Adjust to output a C++ class method.
2082         (tdname): Output "dummy_target::" prefix.
2083         (write_tdefault, write_debugmethod): Adjust to output a C++ class
2084         method.
2085         (tdefault_names, debug_names): Delete.
2086         (return_types, tdefaults, styles, argtypes_array): New.
2087         (top level): All methods are delegators.
2088         (print_class): New.
2089         (top level): Print dummy_target and debug_target classes.
2090         * target-delegates.c: Regenerate.
2091         * target-debug.h (target_debug_print_enum_info_proc_what)
2092         (target_debug_print_thread_control_capabilities)
2093         (target_debug_print_thread_info_p): New.
2094         * target.c (dummy_target): Delete.
2095         (the_dummy_target, the_debug_target): New.
2096         (target_stack): Now extern.
2097         (set_targetdebug): Push/unpush debug target.
2098         (default_child_has_all_memory, default_child_has_memory)
2099         (default_child_has_stack, default_child_has_registers)
2100         (default_child_has_execution): Remove target_ops parameter.
2101         (complete_target_initialization): Delete.
2102         (add_target_with_completer): No longer call
2103         complete_target_initialization.
2104         (target_supports_terminal_ours): Use regular delegation.
2105         (update_current_target): Delete.
2106         (push_target): No longer check magic number.  Don't call
2107         update_current_target.
2108         (unpush_target): Don't call update_current_target.
2109         (target_is_pushed): No longer check magic number.
2110         (target_require_runnable): Skip for all stratums over
2111         process_stratum.
2112         (target_ops::info_proc): New.
2113         (target_info_proc): Use find_target_at and
2114         find_default_run_target.
2115         (target_supports_disable_randomization): Use regular delegation.
2116         (target_get_osdata): Use find_target_at.
2117         (target_ops::open, target_ops::close, target_ops::can_attach)
2118         (target_ops::attach, target_ops::can_create_inferior)
2119         (target_ops::create_inferior, target_ops::can_run)
2120         (target_can_run): New.
2121         (default_fileio_target): Use regular delegation.
2122         (target_ops::fileio_open, target_ops::fileio_pwrite)
2123         (target_ops::fileio_pread, target_ops::fileio_fstat)
2124         (target_ops::fileio_close, target_ops::fileio_unlink)
2125         (target_ops::fileio_readlink): New.
2126         (target_fileio_open_1, target_fileio_unlink)
2127         (target_fileio_readlink): Always call the target method.  Handle
2128         FILEIO_ENOSYS.
2129         (return_zero, return_zero_has_execution): Delete.
2130         (init_dummy_target): Delete.
2131         (dummy_target::dummy_target, dummy_target::shortname)
2132         (dummy_target::longname, dummy_target::doc)
2133         (debug_target::debug_target, debug_target::shortname)
2134         (debug_target::longname, debug_target::doc): New.
2135         (target_supports_delete_record): Use regular delegation.
2136         (setup_target_debug): Delete.
2137         (maintenance_print_target_stack): Skip debug_stratum.
2138         (initialize_targets): Instantiate the_dummy_target and
2139         the_debug_target.
2140         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
2141         use target_stack.
2142         (target_auxv_search, fprint_target_auxv): Adjust.
2143         (info_auxv_command): Adjust to use target_stack.
2144         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
2145         * exceptions.c (print_flush): Handle a NULL target_stack.
2146         * regcache.c (target_ops_no_register): Refactor as class with
2147         virtual methods.
2148
2149         * exec.c (exec_target): New class.
2150         (exec_ops): Now an exec_target.
2151         (exec_open, exec_close_1, exec_get_section_table)
2152         (exec_xfer_partial, exec_files_info, exec_has_memory)
2153         (exec_make_note_section): Refactor as exec_target methods.
2154         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
2155         Delete.
2156         (exec_target::find_memory_regions): New.
2157         (_initialize_exec): Don't call init_exec_ops.
2158         * gdbcore.h (exec_file_clear): Delete.
2159
2160         * corefile.c (core_target): Delete.
2161         (core_file_command): Adjust.
2162         * corelow.c (core_target): New class.
2163         (the_core_target): New.
2164         (core_close): Remove target_ops parameter.
2165         (core_close_cleanup): Adjust.
2166         (core_target::close): New.
2167         (core_open, core_detach, get_core_registers, core_files_info)
2168         (core_xfer_partial, core_thread_alive, core_read_description)
2169         (core_pid_to_str, core_thread_name, core_has_memory)
2170         (core_has_stack, core_has_registers, core_info_proc): Rework as
2171         core_target methods.
2172         (ignore, core_remove_breakpoint, init_core_ops): Delete.
2173         (_initialize_corelow): Initialize the_core_target.
2174         * gdbcore.h (core_target): Delete.
2175         (the_core_target): New.
2176
2177         * ctf.c: (ctf_target): New class.
2178         (ctf_ops): Now a ctf_target.
2179         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
2180         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
2181         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
2182         methods.
2183         (init_ctf_ops): Delete.
2184         (_initialize_ctf): Don't call it.
2185         * tracefile-tfile.c (tfile_target): New class.
2186         (tfile_ops): Now a tfile_target.
2187         (tfile_open, tfile_close, tfile_files_info)
2188         (tfile_get_tracepoint_status, tfile_trace_find)
2189         (tfile_fetch_registers, tfile_xfer_partial)
2190         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
2191         Refactor as tfile_target methods.
2192         (tfile_xfer_partial_features): Remove target_ops parameter.
2193         (init_tfile_ops): Delete.
2194         (_initialize_tracefile_tfile): Don't call it.
2195         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
2196         (tracefile_has_stack, tracefile_has_registers)
2197         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
2198         tracefile_target methods.
2199         (init_tracefile_ops): Delete.
2200         (tracefile_target::tracefile_target): New.
2201         * tracefile.h: Include "target.h".
2202         (tracefile_target): New class.
2203         (init_tracefile_ops): Delete.
2204
2205         * spu-multiarch.c (spu_multiarch_target): New class.
2206         (spu_ops): Now a spu_multiarch_target.
2207         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
2208         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
2209         (spu_search_memory, spu_mourn_inferior): Refactor as
2210         spu_multiarch_target methods.
2211         (init_spu_ops): Delete.
2212         (_initialize_spu_multiarch): Remove references to init_spu_ops,
2213         complete_target_initialization.
2214
2215         * ravenscar-thread.c (ravenscar_thread_target): New class.
2216         (ravenscar_ops): Now a ravenscar_thread_target.
2217         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
2218         (ravenscar_thread_alive, ravenscar_pid_to_str)
2219         (ravenscar_fetch_registers, ravenscar_store_registers)
2220         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
2221         (ravenscar_stopped_by_hw_breakpoint)
2222         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
2223         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
2224         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
2225         methods.
2226         (init_ravenscar_thread_ops): Delete.
2227         (_initialize_ravenscar): Remove references to
2228         init_ravenscar_thread_ops and complete_target_initialization.
2229
2230         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
2231         (bsd_uthread_target): New class.
2232         (bsd_uthread_ops): Now a bsd_uthread_target.
2233         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
2234         (bsd_uthread_close, bsd_uthread_mourn_inferior)
2235         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
2236         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
2237         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
2238         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
2239         (bsd_uthread_target): Delete function.
2240         (_initialize_bsd_uthread): Remove reference to
2241         complete_target_initialization.
2242
2243         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
2244         (target_bfd): ... this new class.
2245         (target_bfd_xfer_partial, target_bfd_get_section_table)
2246         (target_bfd_close): Refactor as target_bfd methods.
2247         (target_bfd::~target_bfd): New.
2248         (target_bfd_reopen): Adjust.
2249         (target_bfd::close): New.
2250
2251         * record-btrace.c (record_btrace_target): New class.
2252         (record_btrace_ops): Now a record_btrace_target.
2253         (record_btrace_open, record_btrace_stop_recording)
2254         (record_btrace_disconnect, record_btrace_close)
2255         (record_btrace_async, record_btrace_info)
2256         (record_btrace_insn_history, record_btrace_insn_history_range)
2257         (record_btrace_insn_history_from, record_btrace_call_history)
2258         (record_btrace_call_history_range)
2259         (record_btrace_call_history_from, record_btrace_record_method)
2260         (record_btrace_is_replaying, record_btrace_will_replay)
2261         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
2262         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
2263         (record_btrace_store_registers, record_btrace_prepare_to_store)
2264         (record_btrace_to_get_unwinder)
2265         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
2266         (record_btrace_commit_resume, record_btrace_wait)
2267         (record_btrace_stop, record_btrace_can_execute_reverse)
2268         (record_btrace_stopped_by_sw_breakpoint)
2269         (record_btrace_supports_stopped_by_sw_breakpoint)
2270         (record_btrace_stopped_by_hw_breakpoint)
2271         (record_btrace_supports_stopped_by_hw_breakpoint)
2272         (record_btrace_update_thread_list, record_btrace_thread_alive)
2273         (record_btrace_goto_begin, record_btrace_goto_end)
2274         (record_btrace_goto, record_btrace_stop_replaying_all)
2275         (record_btrace_execution_direction)
2276         (record_btrace_prepare_to_generate_core)
2277         (record_btrace_done_generating_core): Refactor as
2278         record_btrace_target methods.
2279         (init_record_btrace_ops): Delete.
2280         (_initialize_record_btrace): Remove reference to
2281         init_record_btrace_ops.
2282         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
2283         the execution_direction global.
2284         (record_full_base_target, record_full_target)
2285         (record_full_core_target): New classes.
2286         (record_full_ops): Now a record_full_target.
2287         (record_full_core_ops): Now a record_full_core_target.
2288         (record_full_target::detach, record_full_target::disconnect)
2289         (record_full_core_target::disconnect)
2290         (record_full_target::mourn_inferior, record_full_target::kill):
2291         New.
2292         (record_full_open, record_full_close, record_full_async): Refactor
2293         as methods of the record_full_base_target class.
2294         (record_full_resume, record_full_commit_resume): Refactor
2295         as methods of the record_full_target class.
2296         (record_full_wait, record_full_stopped_by_watchpoint)
2297         (record_full_stopped_data_address)
2298         (record_full_stopped_by_sw_breakpoint)
2299         (record_full_supports_stopped_by_sw_breakpoint)
2300         (record_full_stopped_by_hw_breakpoint)
2301         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
2302         methods of the record_full_base_target class.
2303         (record_full_store_registers, record_full_xfer_partial)
2304         (record_full_insert_breakpoint, record_full_remove_breakpoint):
2305         Refactor as methods of the record_full_target class.
2306         (record_full_can_execute_reverse, record_full_get_bookmark)
2307         (record_full_goto_bookmark, record_full_execution_direction)
2308         (record_full_record_method, record_full_info, record_full_delete)
2309         (record_full_is_replaying, record_full_will_replay)
2310         (record_full_goto_begin, record_full_goto_end, record_full_goto)
2311         (record_full_stop_replaying): Refactor as methods of the
2312         record_full_base_target class.
2313         (record_full_core_resume, record_full_core_kill)
2314         (record_full_core_fetch_registers)
2315         (record_full_core_prepare_to_store)
2316         (record_full_core_store_registers, record_full_core_xfer_partial)
2317         (record_full_core_insert_breakpoint)
2318         (record_full_core_remove_breakpoint)
2319         (record_full_core_has_execution): Refactor
2320         as methods of the record_full_core_target class.
2321         (record_full_base_target::supports_delete_record): New.
2322         (init_record_full_ops): Delete.
2323         (init_record_full_core_ops): Delete.
2324         (record_full_save): Refactor as method of the
2325         record_full_base_target class.
2326         (_initialize_record_full): Remove references to
2327         init_record_full_ops and init_record_full_core_ops.
2328
2329         * remote.c (remote_target, extended_remote_target): New classes.
2330         (remote_ops): Now a remote_target.
2331         (extended_remote_ops): Now an extended_remote_target.
2332         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
2333         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
2334         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
2335         (remote_pass_signals, remote_set_syscall_catchpoint)
2336         (remote_program_signals, )
2337         (remote_thread_always_alive): Remove target_ops parameter.
2338         (remote_thread_alive, remote_thread_name)
2339         (remote_update_thread_list, remote_threads_extra_info)
2340         (remote_static_tracepoint_marker_at)
2341         (remote_static_tracepoint_markers_by_strid)
2342         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
2343         (remote_open): Refactor as methods of remote_target.
2344         (extended_remote_open, extended_remote_detach)
2345         (extended_remote_attach, extended_remote_post_attach):
2346         (extended_remote_supports_disable_randomization)
2347         (extended_remote_create_inferior): : Refactor as method of
2348         extended_remote_target.
2349         (remote_set_permissions, remote_open_1, remote_detach)
2350         (remote_follow_fork, remote_follow_exec, remote_disconnect)
2351         (remote_resume, remote_commit_resume, remote_stop)
2352         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
2353         (remote_terminal_ours, remote_wait, remote_fetch_registers)
2354         (remote_prepare_to_store, remote_store_registers)
2355         (remote_flash_erase, remote_flash_done, remote_files_info)
2356         (remote_kill, remote_mourn, remote_insert_breakpoint)
2357         (remote_remove_breakpoint, remote_insert_watchpoint)
2358         (remote_watchpoint_addr_within_range)
2359         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
2360         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
2361         (remote_supports_stopped_by_sw_breakpoint)
2362         (remote_stopped_by_hw_breakpoint)
2363         (remote_supports_stopped_by_hw_breakpoint)
2364         (remote_stopped_by_watchpoint, remote_stopped_data_address)
2365         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
2366         (remote_verify_memory): Refactor as methods of remote_target.
2367         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
2368         parameter.
2369         (remote_xfer_partial, remote_get_memory_xfer_limit)
2370         (remote_search_memory, remote_rcmd, remote_memory_map)
2371         (remote_pid_to_str, remote_get_thread_local_address)
2372         (remote_get_tib_address, remote_read_description): Refactor as
2373         methods of remote_target.
2374         (remote_target::fileio_open, remote_target::fileio_pwrite)
2375         (remote_target::fileio_pread, remote_target::fileio_close): New.
2376         (remote_hostio_readlink, remote_hostio_fstat)
2377         (remote_filesystem_is_local, remote_can_execute_reverse)
2378         (remote_supports_non_stop, remote_supports_disable_randomization)
2379         (remote_supports_multi_process, remote_supports_cond_breakpoints)
2380         (remote_supports_enable_disable_tracepoint)
2381         (remote_supports_string_tracing)
2382         (remote_can_run_breakpoint_commands, remote_trace_init)
2383         (remote_download_tracepoint, remote_can_download_tracepoint)
2384         (remote_download_trace_state_variable, remote_enable_tracepoint)
2385         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
2386         (remote_trace_start, remote_get_trace_status)
2387         (remote_get_tracepoint_status, remote_trace_stop)
2388         (remote_trace_find, remote_get_trace_state_variable_value)
2389         (remote_save_trace_data, remote_get_raw_trace_data)
2390         (remote_set_disconnected_tracing, remote_core_of_thread)
2391         (remote_set_circular_trace_buffer, remote_traceframe_info)
2392         (remote_get_min_fast_tracepoint_insn_len)
2393         (remote_set_trace_buffer_size, remote_set_trace_notes)
2394         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
2395         (remote_disable_btrace, remote_teardown_btrace)
2396         (remote_read_btrace, remote_btrace_conf)
2397         (remote_augmented_libraries_svr4_read, remote_load)
2398         (remote_pid_to_exec_file, remote_can_do_single_step)
2399         (remote_execution_direction, remote_thread_handle_to_thread_info):
2400         Refactor as methods of remote_target.
2401         (init_remote_ops, init_extended_remote_ops): Delete.
2402         (remote_can_async_p, remote_is_async_p, remote_async)
2403         (remote_thread_events, remote_upload_tracepoints)
2404         (remote_upload_trace_state_variables): Refactor as methods of
2405         remote_target.
2406         (_initialize_remote): Remove references to init_remote_ops and
2407         init_extended_remote_ops.
2408
2409         * remote-sim.c (gdbsim_target): New class.
2410         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
2411         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
2412         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
2413         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
2414         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
2415         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
2416         Refactor as methods of gdbsim_target.
2417         (gdbsim_ops): Now a gdbsim_target.
2418         (init_gdbsim_ops): Delete.
2419         (gdbsim_cntrl_c): Adjust.
2420         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
2421
2422         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
2423         (the_amd64_linux_nat_target): New.
2424         (amd64_linux_fetch_inferior_registers)
2425         (amd64_linux_store_inferior_registers): Refactor as methods of
2426         amd64_linux_nat_target.
2427         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
2428         * i386-linux-nat.c: Don't include "linux-nat.h".
2429         (i386_linux_nat_target): New class.
2430         (the_i386_linux_nat_target): New.
2431         (i386_linux_fetch_inferior_registers)
2432         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
2433         as methods of i386_linux_nat_target.
2434         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
2435         * inf-child.c (inf_child_ops): Delete.
2436         (inf_child_fetch_inferior_registers)
2437         (inf_child_store_inferior_registers): Delete.
2438         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
2439         methods of inf_child_target.
2440         (inf_child_target::supports_terminal_ours)
2441         (inf_child_target::terminal_init)
2442         (inf_child_target::terminal_inferior)
2443         (inf_child_target::terminal_ours_for_output)
2444         (inf_child_target::terminal_ours, inf_child_target::interrupt)
2445         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
2446         New.
2447         (inf_child_open, inf_child_disconnect, inf_child_close)
2448         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
2449         (inf_child_post_startup_inferior, inf_child_can_run)
2450         (inf_child_pid_to_exec_file): Refactor as methods of
2451         inf_child_target.
2452         (inf_child_follow_fork): Delete.
2453         (inf_child_target::can_create_inferior)
2454         (inf_child_target::can_attach): New.
2455         (inf_child_target::has_all_memory, inf_child_target::has_memory)
2456         (inf_child_target::has_stack, inf_child_target::has_registers)
2457         (inf_child_target::has_execution): New.
2458         (inf_child_fileio_open, inf_child_fileio_pwrite)
2459         (inf_child_fileio_pread, inf_child_fileio_fstat)
2460         (inf_child_fileio_close, inf_child_fileio_unlink)
2461         (inf_child_fileio_readlink, inf_child_use_agent)
2462         (inf_child_can_use_agent): Refactor as methods of
2463         inf_child_target.
2464         (return_zero, inf_child_target): Delete.
2465         (inf_child_target::inf_child_target): New.
2466         * inf-child.h: Include "target.h".
2467         (inf_child_target): Delete function prototype.
2468         (inf_child_target): New class.
2469         (inf_child_open_target, inf_child_mourn_inferior)
2470         (inf_child_maybe_unpush_target): Delete.
2471         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
2472         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
2473         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
2474         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
2475         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
2476         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
2477         (inf_ptrace_wait, inf_ptrace_xfer_partial)
2478         (inf_ptrace_thread_alive, inf_ptrace_files_info)
2479         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
2480         methods of inf_ptrace_target.
2481         (inf_ptrace_target): Delete function.
2482         * inf-ptrace.h: Include "inf-child.h".
2483         (inf_ptrace_target): Delete function declaration.
2484         (inf_ptrace_target): New class.
2485         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
2486         * linux-nat.c (linux_target): New.
2487         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
2488         (linux_nat_target::~linux_nat_target): New.
2489         (linux_child_post_attach, linux_child_post_startup_inferior)
2490         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
2491         (linux_child_remove_fork_catchpoint)
2492         (linux_child_insert_vfork_catchpoint)
2493         (linux_child_remove_vfork_catchpoint)
2494         (linux_child_insert_exec_catchpoint)
2495         (linux_child_remove_exec_catchpoint)
2496         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
2497         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
2498         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
2499         (linux_nat_stopped_data_address)
2500         (linux_nat_stopped_by_sw_breakpoint)
2501         (linux_nat_supports_stopped_by_sw_breakpoint)
2502         (linux_nat_stopped_by_hw_breakpoint)
2503         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
2504         (linux_nat_kill, linux_nat_mourn_inferior)
2505         (linux_nat_xfer_partial, linux_nat_thread_alive)
2506         (linux_nat_update_thread_list, linux_nat_pid_to_str)
2507         (linux_nat_thread_name, linux_child_pid_to_exec_file)
2508         (linux_child_static_tracepoint_markers_by_strid)
2509         (linux_nat_is_async_p, linux_nat_can_async_p)
2510         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
2511         (linux_nat_supports_multi_process)
2512         (linux_nat_supports_disable_randomization, linux_nat_async)
2513         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
2514         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
2515         (linux_nat_fileio_open, linux_nat_fileio_readlink)
2516         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
2517         methods of linux_nat_target.
2518         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
2519         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
2520         parameter.
2521         (check_stopped_by_watchpoint): Adjust.
2522         (linux_xfer_partial): Delete.
2523         (linux_target_install_ops, linux_target, linux_nat_add_target):
2524         Delete.
2525         (linux_nat_target::linux_nat_target): New.
2526         * linux-nat.h: Include "inf-ptrace.h".
2527         (linux_nat_target): New.
2528         (linux_target, linux_target_install_ops, linux_nat_add_target):
2529         Delete function declarations.
2530         (linux_target): Declare global.
2531         * linux-thread-db.c (thread_db_target): New.
2532         (thread_db_target::thread_db_target): New.
2533         (thread_db_ops): Delete.
2534         (the_thread_db_target): New.
2535         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
2536         (thread_db_update_thread_list, thread_db_pid_to_str)
2537         (thread_db_extra_thread_info)
2538         (thread_db_thread_handle_to_thread_info)
2539         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
2540         (thread_db_resume): Refactor as methods of thread_db_target.
2541         (init_thread_db_ops): Delete.
2542         (_initialize_thread_db): Remove reference to init_thread_db_ops.
2543         * x86-linux-nat.c: Don't include "linux-nat.h".
2544         (super_post_startup_inferior): Delete.
2545         (x86_linux_nat_target::~x86_linux_nat_target): New.
2546         (x86_linux_child_post_startup_inferior)
2547         (x86_linux_read_description, x86_linux_enable_btrace)
2548         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
2549         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
2550         methods of x86_linux_nat_target.
2551         (x86_linux_create_target): Delete.  Bits folded ...
2552         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
2553         pointer.
2554         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
2555         (x86_linux_nat_target): New class.
2556         (x86_linux_create_target): Delete.
2557         (x86_linux_add_target): Now takes a linux_nat_target pointer.
2558         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
2559         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
2560         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
2561         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
2562         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
2563         make extern.
2564         (x86_use_watchpoints): Delete.
2565         * x86-nat.h: Include "breakpoint.h" and "target.h".
2566         (x86_use_watchpoints): Delete.
2567         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
2568         (x86_stopped_by_watchpoint, x86_stopped_data_address)
2569         (x86_insert_watchpoint, x86_remove_watchpoint)
2570         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
2571         (x86_stopped_by_hw_breakpoint): New declarations.
2572         (x86_nat_target): New template class.
2573
2574         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
2575         (the_ppc_linux_nat_target): New.
2576         (ppc_linux_fetch_inferior_registers)
2577         (ppc_linux_can_use_hw_breakpoint)
2578         (ppc_linux_region_ok_for_hw_watchpoint)
2579         (ppc_linux_ranged_break_num_registers)
2580         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
2581         (ppc_linux_insert_mask_watchpoint)
2582         (ppc_linux_remove_mask_watchpoint)
2583         (ppc_linux_can_accel_watchpoint_condition)
2584         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
2585         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
2586         (ppc_linux_watchpoint_addr_within_range)
2587         (ppc_linux_masked_watch_num_registers)
2588         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
2589         (ppc_linux_read_description): Refactor as methods of
2590         ppc_linux_nat_target.
2591         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
2592
2593         * procfs.c (procfs_xfer_partial): Delete forward declaration.
2594         (procfs_target): New class.
2595         (the_procfs_target): New.
2596         (procfs_target): Delete function.
2597         (procfs_auxv_parse, procfs_attach, procfs_detach)
2598         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
2599         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
2600         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
2601         (procfs_create_inferior, procfs_update_thread_list)
2602         (procfs_thread_alive, procfs_pid_to_str)
2603         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
2604         (procfs_stopped_data_address, procfs_insert_watchpoint)
2605         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
2606         (proc_find_memory_regions, procfs_info_proc)
2607         (procfs_make_note_section): Refactor as methods of procfs_target.
2608         (_initialize_procfs): Adjust.
2609         * sol-thread.c (sol_thread_target): New class.
2610         (sol_thread_ops): Now a sol_thread_target.
2611         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
2612         (sol_thread_fetch_registers, sol_thread_store_registers)
2613         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
2614         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
2615         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
2616         (init_sol_thread_ops): Delete.
2617         (_initialize_sol_thread): Adjust.  Remove references to
2618         init_sol_thread_ops and complete_target_initialization.
2619
2620         * windows-nat.c (windows_nat_target): New class.
2621         (windows_fetch_inferior_registers)
2622         (windows_store_inferior_registers, windows_resume, windows_wait)
2623         (windows_attach, windows_detach, windows_pid_to_exec_file)
2624         (windows_files_info, windows_create_inferior)
2625         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
2626         (windows_close, windows_pid_to_str, windows_xfer_partial)
2627         (windows_get_tib_address, windows_get_ada_task_ptid)
2628         (windows_thread_name, windows_thread_alive): Refactor as
2629         windows_nat_target methods.
2630         (do_initial_windows_stuff): Adjust.
2631         (windows_target): Delete function.
2632         (_initialize_windows_nat): Adjust.
2633
2634         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
2635         (darwin_mourn_inferior, darwin_kill_inferior)
2636         (darwin_create_inferior, darwin_attach, darwin_detach)
2637         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
2638         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
2639         (darwin_supports_multi_process): Refactor as darwin_nat_target
2640         methods.
2641         (darwin_resume_to, darwin_files_info): Delete.
2642         (_initialize_darwin_inferior): Rename to ...
2643         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
2644         * darwin-nat.h: Include "inf-child.h".
2645         (darwin_nat_target): New class.
2646         (darwin_complete_target): Delete.
2647         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
2648         (darwin_target): New.
2649         (i386_darwin_fetch_inferior_registers)
2650         (i386_darwin_store_inferior_registers): Refactor as methods of
2651         darwin_nat_target.
2652         (darwin_complete_target): Delete, with ...
2653         (_initialize_i386_darwin_nat): ... bits factored out here.
2654
2655         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
2656         (the_alpha_linux_nat_target): New.
2657         (alpha_linux_register_u_offset): Refactor as
2658         alpha_linux_nat_target method.
2659         (_initialize_alpha_linux_nat): Adjust.
2660         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
2661         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
2662         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
2663         methods of linux_nat_trad_target.
2664         (linux_trad_target): Delete.
2665         * linux-nat-trad.h (linux_trad_target): Delete function.
2666         (linux_nat_trad_target): New class.
2667         * mips-linux-nat.c (mips_linux_nat_target): New class.
2668         (super_fetch_registers, super_store_registers, super_close):
2669         Delete.
2670         (the_mips_linux_nat_target): New.
2671         (mips64_linux_regsets_fetch_registers)
2672         (mips64_linux_regsets_store_registers)
2673         (mips64_linux_fetch_registers, mips64_linux_store_registers)
2674         (mips_linux_register_u_offset, mips_linux_read_description)
2675         (mips_linux_can_use_hw_breakpoint)
2676         (mips_linux_stopped_by_watchpoint)
2677         (mips_linux_stopped_data_address)
2678         (mips_linux_region_ok_for_hw_watchpoint)
2679         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
2680         (mips_linux_close): Refactor as methods of mips_linux_nat.
2681         (_initialize_mips_linux_nat): Adjust to C++ification.
2682
2683         * aix-thread.c (aix_thread_target): New class.
2684         (aix_thread_ops): Now an aix_thread_target.
2685         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
2686         (aix_thread_fetch_registers, aix_thread_store_registers)
2687         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
2688         (aix_thread_thread_alive, aix_thread_pid_to_str)
2689         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
2690         Refactor as methods of aix_thread_target.
2691         (init_aix_thread_ops): Delete.
2692         (_initialize_aix_thread): Remove references to init_aix_thread_ops
2693         and complete_target_initialization.
2694         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
2695         (rs6000_nat_target): New class.
2696         (the_rs6000_nat_target): New.
2697         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
2698         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
2699         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
2700         (super_create_inferior): Delete.
2701         (_initialize_rs6000_nat): Adjust to C++ification.
2702
2703         * arm-linux-nat.c (arm_linux_nat_target): New class.
2704         (the_arm_linux_nat_target): New.
2705         (arm_linux_fetch_inferior_registers)
2706         (arm_linux_store_inferior_registers, arm_linux_read_description)
2707         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
2708         (arm_linux_remove_hw_breakpoint)
2709         (arm_linux_region_ok_for_hw_watchpoint)
2710         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
2711         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
2712         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
2713         arm_linux_nat_target.
2714         (_initialize_arm_linux_nat): Adjust to C++ification.
2715
2716         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
2717         (the_aarch64_linux_nat_target): New.
2718         (aarch64_linux_fetch_inferior_registers)
2719         (aarch64_linux_store_inferior_registers)
2720         (aarch64_linux_child_post_startup_inferior)
2721         (aarch64_linux_read_description)
2722         (aarch64_linux_can_use_hw_breakpoint)
2723         (aarch64_linux_insert_hw_breakpoint)
2724         (aarch64_linux_remove_hw_breakpoint)
2725         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
2726         (aarch64_linux_region_ok_for_hw_watchpoint)
2727         (aarch64_linux_stopped_data_address)
2728         (aarch64_linux_stopped_by_watchpoint)
2729         (aarch64_linux_watchpoint_addr_within_range)
2730         (aarch64_linux_can_do_single_step): Refactor as methods of
2731         aarch64_linux_nat_target.
2732         (super_post_startup_inferior): Delete.
2733         (_initialize_aarch64_linux_nat): Adjust to C++ification.
2734
2735         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
2736         (the_hppa_linux_nat_target): New.
2737         (hppa_linux_fetch_inferior_registers)
2738         (hppa_linux_store_inferior_registers): Refactor as methods of
2739         hppa_linux_nat_target.
2740         (_initialize_hppa_linux_nat): Adjust to C++ification.
2741
2742         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
2743         (the_ia64_linux_nat_target): New.
2744         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
2745         (ia64_linux_stopped_data_address)
2746         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
2747         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
2748         ia64_linux_nat_target methods.
2749         (super_xfer_partial): Delete.
2750         (_initialize_ia64_linux_nat): Adjust to C++ification.
2751
2752         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
2753         (the_m32r_linux_nat_target): New.
2754         (m32r_linux_fetch_inferior_registers)
2755         (m32r_linux_store_inferior_registers): Refactor as
2756         m32r_linux_nat_target methods.
2757         (_initialize_m32r_linux_nat): Adjust to C++ification.
2758
2759         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
2760         (the_m68k_linux_nat_target): New.
2761         (m68k_linux_fetch_inferior_registers)
2762         (m68k_linux_store_inferior_registers): Refactor as
2763         m68k_linux_nat_target methods.
2764         (_initialize_m68k_linux_nat): Adjust to C++ification.
2765
2766         * s390-linux-nat.c (s390_linux_nat_target): New class.
2767         (the_s390_linux_nat_target): New.
2768         (s390_linux_fetch_inferior_registers)
2769         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
2770         (s390_insert_watchpoint, s390_remove_watchpoint)
2771         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
2772         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
2773         (s390_auxv_parse, s390_read_description): Refactor as methods of
2774         s390_linux_nat_target.
2775         (_initialize_s390_nat): Adjust to C++ification.
2776
2777         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
2778         (the_sparc_linux_nat_target): New.
2779         (_initialize_sparc_linux_nat): Adjust to C++ification.
2780         * sparc-nat.c (sparc_fetch_inferior_registers)
2781         (sparc_store_inferior_registers): Remove target_ops parameter.
2782         * sparc-nat.h (sparc_fetch_inferior_registers)
2783         (sparc_store_inferior_registers): Remove target_ops parameter.
2784         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
2785         (the_sparc64_linux_nat_target): New.
2786         (_initialize_sparc64_linux_nat): Adjust to C++ification.
2787
2788         * spu-linux-nat.c (spu_linux_nat_target): New class.
2789         (the_spu_linux_nat_target): New.
2790         (spu_child_post_startup_inferior, spu_child_post_attach)
2791         (spu_child_wait, spu_fetch_inferior_registers)
2792         (spu_store_inferior_registers, spu_xfer_partial)
2793         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
2794         methods.
2795         (_initialize_spu_nat): Adjust to C++ification.
2796
2797         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
2798         (the_tilegx_linux_nat_target): New.
2799         (fetch_inferior_registers, store_inferior_registers):
2800         Refactor as methods.
2801         (_initialize_tile_linux_nat): Adjust to C++ification.
2802
2803         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
2804         (the_xtensa_linux_nat_target): New.
2805         (xtensa_linux_fetch_inferior_registers)
2806         (xtensa_linux_store_inferior_registers): Refactor as
2807         xtensa_linux_nat_target methods.
2808         (_initialize_xtensa_linux_nat): Adjust to C++ification.
2809
2810         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
2811         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
2812         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
2813         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
2814         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
2815         (fbsd_stopped_by_sw_breakpoint)
2816         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
2817         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
2818         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
2819         (fbsd_post_startup_inferior, fbsd_post_attach)
2820         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
2821         (fbsd_set_syscall_catchpoint)
2822         (super_xfer_partial, super_resume, super_wait)
2823         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
2824         (fbsd_handle_debug_trap): Remove target_ops parameter.
2825         (fbsd_nat_add_target): Delete.
2826         * fbsd-nat.h: Include "inf-ptrace.h".
2827         (fbsd_nat_add_target): Delete.
2828         (USE_SIGTRAP_SIGINFO): Define.
2829         (fbsd_nat_target): New class.
2830
2831         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
2832         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
2833         (amd64bsd_target): Delete.
2834         * amd64-bsd-nat.h: New file.
2835         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
2836         "x86-bsd-nat.h".
2837         (amd64_fbsd_nat_target): New class.
2838         (the_amd64_fbsd_nat_target): New.
2839         (amd64fbsd_read_description): Refactor as method of
2840         amd64_fbsd_nat_target.
2841         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
2842         (_initialize_amd64fbsd_nat): Adjust to C++ification.
2843         * amd64-nat.h (amd64bsd_target): Delete function declaration.
2844         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
2845         (i386bsd_store_inferior_registers): Remove target_ops parameter.
2846         (i386bsd_target): Delete.
2847         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
2848         (i386bsd_fetch_inferior_registers)
2849         (i386bsd_store_inferior_registers): Declare.
2850         (i386_bsd_nat_target): New class.
2851         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
2852         (the_i386_fbsd_nat_target): New.
2853         (i386fbsd_resume, i386fbsd_read_description): Refactor as
2854         i386_fbsd_nat_target methods.
2855         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
2856         (_initialize_i386fbsd_nat): Adjust to C++ification.
2857         * x86-bsd-nat.c (super_mourn_inferior): Delete.
2858         (x86bsd_mourn_inferior, x86bsd_target): Delete.
2859         (_initialize_x86_bsd_nat): Adjust to C++ification.
2860         * x86-bsd-nat.h: Include "x86-nat.h".
2861         (x86bsd_target): Delete declaration.
2862         (x86bsd_nat_target): New class.
2863
2864         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
2865         (the_aarch64_fbsd_nat_target): New.
2866         (aarch64_fbsd_fetch_inferior_registers)
2867         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
2868         aarch64_fbsd_nat_target.
2869         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
2870         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
2871         (the_alpha_bsd_nat_target): New.
2872         (alphabsd_fetch_inferior_registers)
2873         (alphabsd_store_inferior_registers): Refactor as
2874         alpha_bsd_nat_target methods.
2875         (_initialize_alphabsd_nat): Refactor as methods of
2876         alpha_bsd_nat_target.
2877         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
2878         (the_amd64_nbsd_nat_target): New.
2879         (_initialize_amd64nbsd_nat): Adjust to C++ification.
2880         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
2881         (the_amd64_obsd_nat_target): New.
2882         (_initialize_amd64obsd_nat): Adjust to C++ification.
2883         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
2884         (the_arm_fbsd_nat_target): New.
2885         (arm_fbsd_fetch_inferior_registers)
2886         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
2887         (_initialize_arm_fbsd_nat): Refactor as methods of
2888         arm_fbsd_nat_target.
2889         (_initialize_arm_fbsd_nat): Adjust to C++ification.
2890         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
2891         (the_arm_netbsd_nat_target): New.
2892         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
2893         arm_netbsd_nat_target.
2894         (_initialize_arm_netbsd_nat): Adjust to C++ification.
2895         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
2896         (the_hppa_nbsd_nat_target): New.
2897         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
2898         hppa_nbsd_nat_target methods.
2899         (_initialize_hppanbsd_nat): Adjust to C++ification.
2900         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
2901         (the_hppa_obsd_nat_target): New.
2902         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
2903         methods of hppa_obsd_nat_target.
2904         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
2905         add_target.
2906         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
2907         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
2908         add_target.
2909         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
2910         (_initialize_i386obsd_nat): Use add_target.
2911         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
2912         (the_m68k_bsd_nat_target): New.
2913         (m68kbsd_fetch_inferior_registers)
2914         (m68kbsd_store_inferior_registers): Refactor as methods of
2915         m68k_bsd_nat_target.
2916         (_initialize_m68kbsd_nat): Adjust to C++ification.
2917         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
2918         (the_mips_fbsd_nat_target): New.
2919         (mips_fbsd_fetch_inferior_registers)
2920         (mips_fbsd_store_inferior_registers): Refactor as methods of
2921         mips_fbsd_nat_target.
2922         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
2923         add_target.
2924         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
2925         (the_mips_nbsd_nat_target): New.
2926         (mipsnbsd_fetch_inferior_registers)
2927         (mipsnbsd_store_inferior_registers): Refactor as methods of
2928         mips_nbsd_nat_target.
2929         (_initialize_mipsnbsd_nat): Adjust to C++ification.
2930         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
2931         (the_mips64_obsd_nat_target): New.
2932         (mips64obsd_fetch_inferior_registers)
2933         (mips64obsd_store_inferior_registers): Refactor as methods of
2934         mips64_obsd_nat_target.
2935         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
2936         add_target.
2937         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
2938         nbsd_nat_target.
2939         * nbsd-nat.h: Include "inf-ptrace.h".
2940         (nbsd_nat_target): New class.
2941         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
2942         (obsd_wait): Refactor as methods of obsd_nat_target.
2943         (obsd_add_target): Delete.
2944         * obsd-nat.h: Include "inf-ptrace.h".
2945         (obsd_nat_target): New class.
2946         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
2947         (the_ppc_fbsd_nat_target): New.
2948         (ppcfbsd_fetch_inferior_registers)
2949         (ppcfbsd_store_inferior_registers): Refactor as methods of
2950         ppc_fbsd_nat_target.
2951         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
2952         add_target.
2953         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
2954         (the_ppc_nbsd_nat_target): New.
2955         (ppcnbsd_fetch_inferior_registers)
2956         (ppcnbsd_store_inferior_registers): Refactor as methods of
2957         ppc_nbsd_nat_target.
2958         (_initialize_ppcnbsd_nat): Adjust to C++ification.
2959         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
2960         (the_ppc_obsd_nat_target): New.
2961         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
2962         methods of ppc_obsd_nat_target.
2963         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
2964         add_target.
2965         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
2966         (the_sh_nbsd_nat_target): New.
2967         (shnbsd_fetch_inferior_registers)
2968         (shnbsd_store_inferior_registers): Refactor as methods of
2969         sh_nbsd_nat_target.
2970         (_initialize_shnbsd_nat): Adjust to C++ification.
2971         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
2972         (inf_ptrace_xfer_partial): Delete.
2973         (sparc_xfer_partial, sparc_target): Delete.
2974         * sparc-nat.h (sparc_fetch_inferior_registers)
2975         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
2976         (sparc_target): Delete function declaration.
2977         (sparc_target): New template class.
2978         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
2979         (_initialize_sparcnbsd_nat): Adjust to C++ification.
2980         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
2981         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
2982         add_target.
2983         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
2984         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
2985         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
2986         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
2987         add_target.
2988         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
2989         (the_vax_bsd_nat_target): New.
2990         (vaxbsd_fetch_inferior_registers)
2991         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
2992         methods.
2993         (_initialize_vaxbsd_nat): Adjust to C++ification.
2994
2995         * bsd-kvm.c (bsd_kvm_target): New class.
2996         (bsd_kvm_ops): Now a bsd_kvm_target.
2997         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
2998         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
2999         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
3000         bsd_kvm_target.
3001         (bsd_kvm_return_one): Delete.
3002         (bsd_kvm_add_target): Adjust to C++ification.
3003
3004         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
3005         (nto_procfs_target_procfs): New classes.
3006         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
3007         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
3008         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
3009         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
3010         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
3011         (procfs_remove_hw_breakpoint, procfs_resume)
3012         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
3013         (procfs_kill_inferior, procfs_store_registers)
3014         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
3015         as methods of nto_procfs_target.
3016         (nto_procfs_ops): Now an nto_procfs_target_procfs.
3017         (nto_native_ops): Delete.
3018         (procfs_open, procfs_native_open): Delete.
3019         (nto_native_ops): Now an nto_procfs_target_native.
3020         (init_procfs_targets): Adjust to C++ification.
3021         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
3022         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
3023         Refactor as methods of nto_procfs_target.
3024
3025         * go32-nat.c (go32_nat_target): New class.
3026         (the_go32_nat_target): New.
3027         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
3028         (go32_store_registers, go32_xfer_partial, go32_files_info)
3029         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
3030         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
3031         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
3032         (go32_pid_to_str): Refactor as methods of go32_nat_target.
3033         (go32_target): Delete.
3034         (_initialize_go32_nat): Adjust to C++ification.
3035
3036         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
3037         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
3038         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
3039         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
3040         gnu_nat_target.
3041         (gnu_target): Delete.
3042         * gnu-nat.h (gnu_target): Delete.
3043         (gnu_nat_target): New class.
3044         * i386-gnu-nat.c (gnu_base_target): New.
3045         (i386_gnu_nat_target): New class.
3046         (the_i386_gnu_nat_target): New.
3047         (_initialize_i386gnu_nat): Adjust to C++ification.
3048
3049 2018-05-02  Pedro Alves  <palves@redhat.com>
3050
3051         * bfd-target.c (target_bfd_xclose): Rename to ...
3052         (target_bfd_close): ... this.
3053         (target_bfd_reopen): Adjust.
3054         * target.c (target_close): Remove references to to_xclose.
3055         * target.h (target_ops::to_xclose): Delete.
3056         (target_ops::to_close): Update comments.
3057
3058 2018-05-02  Pedro Alves  <palves@redhat.com>
3059
3060         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
3061         "linux-nat.h".
3062         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
3063         * inf-ptrace.c (inf_ptrace_register_u_offset)
3064         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
3065         (inf_ptrace_store_register, inf_ptrace_store_registers)
3066         (inf_ptrace_trad_target): Move to ...
3067         * linux-nat-trad.c: ... this new file.
3068         * linux-nat-trad.h: New file.
3069         * linux-nat.c (linux_target_install_ops): Make extern.
3070         (linux_trad_target): Delete.
3071         * linux-nat.h (linux_trad_target): Delete declaration.
3072         (linux_target_install_ops): Declare.
3073         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
3074         "linux-nat.h".
3075
3076 2018-05-02  Pedro Alves  <palves@redhat.com>
3077
3078         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
3079         procfs_target/add_target here.
3080         * procfs.c (procfs_target): Make static.
3081         (_initialize_procfs): Call add_target here.
3082         * procfs.h (struct target_ops): Remove forward declaration.
3083         (procfs_target): Remove declaration.
3084         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
3085
3086 2018-05-02  Pedro Alves  <palves@redhat.com>
3087
3088         * procfs.c (procfs_stopped_by_watchpoint)
3089         (procfs_insert_watchpoint, procfs_remove_watchpoint)
3090         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
3091         Forward declare.
3092         (procfs_use_watchpoints): Delete, move contents...
3093         (procfs_target): ... here.
3094         * procfs.h (procfs_use_watchpoints): Delete declaration.
3095         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
3096         procfs_use_watchpoints.
3097         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
3098         procfs_use_watchpoints.
3099
3100 2018-05-02  Tom Tromey  <tom@tromey.com>
3101
3102         PR python/20084:
3103         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
3104         and var_zuinteger_unlimited.
3105         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
3106         and PARAM_ZUINTEGER_UNLIMITED.
3107         (set_parameter_value): Handle var_zuinteger and
3108         var_zuinteger_unlimited.
3109         (add_setshow_generic): Likewise.
3110         (parmpy_init): Likewise.
3111
3112 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
3113
3114         PR rust/23124
3115         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
3116         pointer is not null before dereferencing it.
3117
3118 2018-04-30  Tom Tromey  <tom@tromey.com>
3119
3120         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
3121         is_mi_like_p.
3122
3123 2018-04-30  Tom Tromey  <tom@tromey.com>
3124
3125         * breakpoint.c (mention): Remove use of is_mi_like_p.
3126         (print_mention_ranged_breakpoint): Likewise.
3127         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
3128         of is_mi_like_p.
3129
3130 2018-04-30  Tom Tromey  <tom@tromey.com>
3131
3132         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
3133
3134 2018-04-30  Tom Tromey  <tom@tromey.com>
3135
3136         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
3137         (info_spu_event_command): Remove some uses of is_mi_like_p.
3138
3139 2018-04-30  Tom Tromey  <tom@tromey.com>
3140
3141         * python/py-framefilter.c (py_print_single_arg)
3142         (enumerate_locals, py_print_args, py_print_frame): Remove some
3143         uses of is_mi_like_p.
3144
3145 2018-04-30  Tom Tromey  <tom@tromey.com>
3146
3147         * ui-out.c: Update.
3148         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
3149         * ui-out.h (ui_out::is_mi_like_p): Now const.
3150         (ui_out::do_is_mi_like_p): Now const.
3151         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
3152
3153 2018-04-30  Tom Tromey  <tom@tromey.com>
3154
3155         * varobj.c (varobj_set_visualizer): Use new_reference.
3156         * python/python.c (gdbpy_decode_line): Use new_reference.
3157         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
3158         new_reference.
3159
3160 2018-04-30  Tom Tromey  <tom@tromey.com>
3161
3162         * varobj.c (install_new_value): Use new_reference.
3163         * value.h (value_incref): Return void.  Swap intro comment with
3164         value_decref.
3165         * value.c (set_value_parent): Use new_reference.
3166         (value_incref): Return void.  Update intro comment.
3167         (release_value): Use new_reference.
3168         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
3169
3170 2018-04-30  Tom Tromey  <tom@tromey.com>
3171
3172         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
3173         * gdb_bfd.h (new_bfd_ref): Remove.
3174         (gdb_bfd_open): Update comment.
3175         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
3176         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
3177         (gdb_bfd_fdopenr): Use new_reference.
3178         * exec.c (exec_file_attach): Use new_reference.
3179
3180 2018-04-30  Tom Tromey  <tom@tromey.com>
3181
3182         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
3183         method.
3184
3185 2018-04-30  Tom Tromey  <tom@tromey.com>
3186
3187         * jit.c (jit_read_code_entry): Use type_align.
3188         * i386-tdep.c (i386_gdbarch_init): Don't call
3189         set_gdbarch_long_long_align_bit.
3190         * gdbarch.sh: Remove long_long_align_bit.
3191         * gdbarch.c, gdbarch.h: Rebuild.
3192         * arc-tdep.c (arc_type_align): New function.
3193         (arc_gdbarch_init): Use arc_type_align.  Don't call
3194         set_gdbarch_long_long_align_bit.
3195
3196 2018-04-30  Tom Tromey  <tom@tromey.com>
3197
3198         * rust-lang.c (rust_type_alignment): Remove.
3199         (rust_composite_type): Use type_align.
3200
3201 2018-04-30  Tom Tromey  <tom@tromey.com>
3202
3203         * NEWS: Mention Type.align.
3204         * python/py-type.c (typy_get_alignof): New function.
3205         (type_object_getset): Add "alignof".
3206
3207 2018-04-30  Tom Tromey  <tom@tromey.com>
3208
3209         PR exp/17095:
3210         * NEWS: Update.
3211         * std-operator.def (UNOP_ALIGNOF): New operator.
3212         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
3213         New.
3214         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
3215         * c-lang.c (c_op_print_tab): Add alignof.
3216         * c-exp.y (ALIGNOF): New token.
3217         (exp): Add "ALIGNOF" production.
3218         (ident_tokens): Add _Alignof and alignof.
3219
3220 2018-04-30  Tom Tromey  <tom@tromey.com>
3221
3222         * i386-tdep.c (i386_type_align): New function.
3223         (i386_gdbarch_init): Update.
3224         * gdbarch.sh (type_align): New method.
3225         * gdbarch.c, gdbarch.h: Rebuild.
3226         * arch-utils.h (default_type_align): Declare.
3227         * arch-utils.c (default_type_align): New function.
3228         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
3229         (struct type) <align_log2>: New field.
3230         <instance_flags>: Now a bitfield.
3231         (TYPE_RAW_ALIGN): New macro.
3232         (type_align, type_raw_align, set_type_align): Declare.
3233         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
3234         functions.
3235         * dwarf2read.c (quirk_rust_enum): Set type alignment.
3236         (get_alignment, maybe_set_alignment): New functions.
3237         (read_structure_type, read_enumeration_type, read_array_type)
3238         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
3239         (read_subrange_type, read_base_type): Set type alignment.
3240
3241 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
3242
3243         * dwarf2read.c (read_index_from_section): Use bool.
3244
3245 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
3246
3247         PR gdb/22950
3248         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
3249         with #ifdef.
3250
3251 2018-04-29  John Reiser  <jreiser@BitWagon.com>
3252
3253         PR build/22873
3254         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
3255         last step, and do it atomically.
3256
3257 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
3258
3259         * compile/compile-c-types.c (convert_int, convert_float):
3260         Update for C FE v1.
3261
3262 2018-04-27  Tom Tromey  <tom@tromey.com>
3263
3264         PR rust/22545:
3265         * rust-lang.c (rust_inclusive_range_type_p): New function.
3266         (rust_range): Handle inclusive ranges.
3267         (rust_compute_range): Likewise.
3268         * rust-exp.y (struct rust_op) <inclusive>: New field.
3269         (DOTDOTEQ): New constant.
3270         (range_expr): Add "..=" productions.
3271         (operator_tokens): Add "..=" token.
3272         (ast_range): Add "inclusive" parameter.
3273         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
3274         ranges.
3275         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
3276         bounds values.
3277         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
3278         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
3279         Update comments.
3280         * expprint.c (print_subexp_standard): Handle new bounds values.
3281         (dump_subexp_body_standard): Likewise.
3282
3283 2018-04-27  Tom Tromey  <tom@tromey.com>
3284
3285         * configure: Rebuild.
3286         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
3287         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
3288         "OVERRIDE".
3289         (class symbol_needs_eval_context): Likewise.
3290         * dwarf2read.c (mock_mapped_index::symbol_name_count)
3291         (mock_mapped_index::symbol_name_at): Use "override".  Remove
3292         "virtual".
3293         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
3294         "override".
3295         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
3296         * aarch64-tdep.c (instruction_reader::read): Use "override".
3297         (instruction_reader_test::read): Likewise.
3298         * arm-tdep.c (instruction_reader::read): Use "override".
3299         (instruction_reader_thumb::read): Likewise.
3300
3301 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
3302
3303         PR remote/9665
3304         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
3305         instead of remote_send.
3306         (remote_send): Remove.
3307
3308 2018-04-26  Pedro Alves  <palves@redhat.com>
3309
3310         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
3311         find_function_start_sal instead of find_pc_line.
3312
3313 2018-04-26  Pedro Alves  <palves@redhat.com>
3314
3315         * breakpoint.c (set_breakpoint_location_function): Handle
3316         mst_data_gnu_ifunc.
3317         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
3318         * elfread.c (elf_symtab_read): Give data symbols with
3319         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
3320         (elf_rel_plt_read): Update comment.
3321         * linespec.c (convert_linespec_to_sals): Handle
3322         mst_data_gnu_ifunc.
3323         (minsym_found): Handle mst_data_gnu_ifunc.
3324         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
3325         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
3326         * parse.c (find_minsym_type_and_address): Handle
3327         mst_data_gnu_ifunc.
3328         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
3329         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
3330         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
3331         comment.
3332         <mst_data_gnu_ifunc>: New enumerator.
3333
3334 2018-04-26  Pedro Alves  <palves@redhat.com>
3335
3336         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
3337         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
3338         'want_trampoline' parameter by a lookup_msym_prefer parameter.
3339         Handle it.
3340         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
3341         (lookup_minimal_symbol_by_pc): Adjust.
3342         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
3343         (lookup_solib_trampoline_symbol_by_pc): Adjust.
3344         * minsyms.h (lookup_msym_prefer): New enum.
3345         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
3346         parameter by a lookup_msym_prefer parameter.
3347
3348 2018-04-26  Pedro Alves  <palves@redhat.com>
3349
3350         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
3351         ends in "@plt" instead of looking at the symbol's section.
3352
3353 2018-04-26  Pedro Alves  <palves@redhat.com>
3354
3355         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
3356         all references.
3357         (find_pc_partial_function_gnu_ifunc): Rename to ...
3358         (find_pc_partial_function): ... this, and remove references to
3359         'is_gnu_ifunc_p'.
3360         (find_pc_partial_function): Delete old implementation.
3361         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
3362
3363 2018-04-26  Pedro Alves  <palves@redhat.com>
3364
3365         * linespec.c (struct bound_minimal_symbol_search_key): New.
3366         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
3367         skip first line if we found a GNU ifunc minimal symbol by name.
3368         (compare_msymbols): Change parameters to work with a destructured
3369         lhs minsym.
3370         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
3371         functions.
3372
3373 2018-04-26  Pedro Alves  <palves@redhat.com>
3374
3375         * breakpoint.c (set_breakpoint_location_function): Don't resolve
3376         ifunc targets here.  Instead, if we have an ifunc minsym, use its
3377         address/name.
3378         (add_location_to_breakpoint): Store the minsym and the objfile in
3379         the breakpoint location.
3380         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
3381         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
3382         Record the minsym in the sal.
3383         * symtab.h (symtab_and_line) <msymbol>: New field.
3384
3385 2018-04-26  Pedro Alves  <palves@redhat.com>
3386
3387         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
3388         unless we actually resolved the ifunc.
3389
3390 2018-04-26  Pedro Alves  <palves@redhat.com>
3391
3392         * c-exp.y (variable production): Prefer ifunc minsyms over
3393         regular function symbols.
3394         * symtab.c (find_gnu_ifunc): New function.
3395         * minsyms.h (lookup_msym_prefer): New enum.
3396         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
3397         parameter by a lookup_msym_prefer parameter.
3398         * symtab.h (find_gnu_ifunc): New declaration.
3399
3400 2018-04-26  Pedro Alves  <palves@redhat.com>
3401
3402         * blockframe.c (find_gnu_ifunc_target_type): New function.
3403         (find_function_type): New.
3404         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
3405         return a value with a memory address.
3406         (eval_call): For calls to GNU ifunc functions, try to find the
3407         type of the target function from the type that the resolver
3408         returns.
3409         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
3410         symbols.
3411         * infcall.c (find_function_return_type): Delete.
3412         (find_function_addr): Add 'function_type' parameter.  For calls to
3413         GNU ifunc functions, try to find the type of the target function
3414         from the type that the resolver returns, and return it via
3415         FUNCTION_TYPE.
3416         (call_function_by_hand_dummy): Adjust to use the function type
3417         returned by find_function_addr.
3418         (find_function_addr): Add 'function_type' parameter and move
3419         description here.
3420         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
3421         declarations.
3422
3423 2018-04-26  Pedro Alves  <palves@redhat.com>
3424
3425         * c-exp.y (variable production): Skip finding an alias for ifunc
3426         symbols.
3427
3428 2018-04-26  Pedro Alves  <palves@redhat.com>
3429
3430         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
3431
3432 2018-04-25  Pedro Alves  <palves@redhat.com>
3433
3434         * infcmd.c (kill_command): Print the pid as string, not the whole
3435         thread's ptid.  Add comment.  s/has been killed/killed/ in output
3436         message.
3437         * remote.c (remote_detach_1): Print the pid as string, not the
3438         whole thread's ptid.
3439
3440 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
3441             Sergio Durigan Junior  <sergiodj@redhat.com>
3442             Pedro Alves  <palves@redhat.com>
3443
3444         * infcmd.c (kill_command): Print message when inferior has
3445         been killed.
3446         * inferior.c (print_inferior_events): Remove 'static'.  Set as
3447         '1'.
3448         (add_inferior): Improve message printed when
3449         'print_inferior_events' is on.
3450         (exit_inferior): Remove message printed when
3451         'print_inferior_events' is on.
3452         (detach_inferior): Improve message printed when
3453         'print_inferior_events' is on.
3454         (initialize_inferiors): Use 'add_inferior_silent' to set
3455         'current_inferior_'.
3456         * inferior.h (print_inferior_events): Declare here as
3457         'extern'.
3458         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
3459         '[Detaching...]' messages when 'print_inferior_events' is on.
3460         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
3461         as prefix/suffix for messages.  Remove periods.  Fix erroneous
3462         'Detaching after fork from child...', replace it by '... from
3463         parent...'.
3464         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
3465         prefix/suffix when printing 'Detaching...' messages.  Print
3466         them when 'print_inferior_events' is on.
3467         * remote.c (remote_detach_1): Print message when detaching
3468         from inferior and '!is_fork_parent'.
3469
3470 2018-04-24  Tom Tromey  <tom@tromey.com>
3471
3472         * cli-out.h: Reindent.
3473
3474 2018-04-24  Tom Tromey  <tom@tromey.com>
3475
3476         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
3477         (cli_ui_out::do_field_string): Use fputs_filtered.
3478         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
3479
3480 2018-04-23  Tom Tromey  <tom@tromey.com>
3481
3482         * guile/scm-frame.c (gdbscm_frame_read_var): Use
3483         gdb::unique_xmalloc_ptr.
3484
3485 2018-04-23  Tom Tromey  <tom@tromey.com>
3486
3487         * configure: Rebuild.
3488
3489 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
3490
3491         PR gdb/23095
3492         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
3493         prepare_for_testing.  Set normal_bp to r_debug_state if target
3494         is bsd.
3495
3496 2018-04-21  Pedro Alves  <palves@redhat.com>
3497             Rajendra SY  <rajendra.sy@gmail.com>
3498
3499         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
3500         * remote.c (extended_remote_attach): In all-stop mode, mark the
3501         thread as executing.
3502
3503 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3504
3505         * thread.c (thread_apply_all_command): Fix comment.
3506         (thread_command): Fix comment.
3507
3508 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
3509
3510         * common/tdesc.h (tdesc_create_feature): Remove xml filename
3511         parameter.
3512         * features/aarch64-core.c (create_feature_aarch64_core):
3513         Regenerate.
3514         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
3515         Likewise.
3516         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
3517         Likewise.
3518         * features/i386/32bit-avx512.c
3519         (create_feature_i386_32bit_avx512): Likewise.
3520         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
3521         Likewise.
3522         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
3523         Likewise.
3524         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
3525         Likewise.
3526         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
3527         Likewise.
3528         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
3529         Likewise.
3530         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
3531         Likewise.
3532         * features/i386/64bit-avx512.c
3533         (create_feature_i386_64bit_avx512): Likewise.
3534         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
3535         Likewise.
3536         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
3537         Likewise.
3538         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
3539         Likewise.
3540         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
3541         Likewise.
3542         * features/i386/64bit-segments.c
3543         (create_feature_i386_64bit_segments): Likewise.
3544         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
3545         Likewise.
3546         * features/i386/x32-core.c
3547         (create_feature_i386_x32_core): Likewise.
3548         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
3549         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
3550         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
3551         * target-descriptions.c: In generated code, don't pass xml
3552         filename.
3553
3554 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
3555
3556         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
3557         (print_xml_feature::visit_post): Likewise.
3558         (print_xml_feature::visit): Likewise.
3559         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
3560         (print_xml_feature): Add new class.
3561         * regformats/regdat.sh: Null xmltarget on feature targets.
3562         * target-descriptions.c (struct target_desc): Add xmltarget.
3563         (maintenance_check_tdesc_xml_convert): Add unittest function.
3564         (tdesc_get_features_xml): Add function to get xml.
3565         (maintenance_check_xml_descriptions): Test xml generation.
3566         * xml-tdesc.c (string_read_description_xml): Add function.
3567         * xml-tdesc.h (string_read_description_xml): Add declaration.
3568
3569 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
3570
3571         * features/Makefile: Add feature marker to targets with new style
3572         target descriptions.
3573         * regformats/aarch64.dat: Regenerate.
3574         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
3575         * regformats/i386/amd64-avx-linux.dat: Likewise.
3576         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
3577         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
3578         * regformats/i386/amd64-linux.dat: Likewise.
3579         * regformats/i386/amd64-mpx-linux.dat: Likewise.
3580         * regformats/i386/amd64.dat: Likewise.
3581         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
3582         * regformats/i386/i386-avx-linux.dat: Likewise.
3583         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
3584         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
3585         * regformats/i386/i386-linux.dat: Likewise.
3586         * regformats/i386/i386-mmx-linux.dat: Likewise.
3587         * regformats/i386/i386-mpx-linux.dat: Likewise.
3588         * regformats/i386/i386.dat: Likewise.
3589         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
3590         * regformats/i386/x32-avx-linux.dat: Likewise.
3591         * regformats/i386/x32-linux.dat: Likewise.
3592         * regformats/tic6x-c62x-linux.dat: Likewise.
3593         * regformats/tic6x-c64x-linux.dat: Likewise.
3594         * regformats/tic6x-c64xp-linux.dat: Likewise.
3595         * regformats/regdat.sh: Parse feature marker.
3596
3597 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
3598
3599         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
3600         (tdesc_osabi_name): Likewise.
3601         * target-descriptions.c (tdesc_architecture_name): Add new
3602         function.
3603         (tdesc_osabi_name): Likewise.
3604
3605 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
3606
3607         * common/tdesc.c (tdesc_predefined_type): Move to here.
3608         (tdesc_named_type): Likewise.
3609         (tdesc_create_vector): Likewise.
3610         (tdesc_create_struct): Likewise.
3611         (tdesc_set_struct_size): Likewise.
3612         (tdesc_create_union): Likewise.
3613         (tdesc_create_flags): Likewise.
3614         (tdesc_create_enum): Likewise.
3615         (tdesc_add_field): Likewise.
3616         (tdesc_add_typed_bitfield): Likewise.
3617         (tdesc_add_bitfield): Likewise.
3618         (tdesc_add_flag): Likewise.
3619         (tdesc_add_enum_value): Likewise.
3620         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
3621         (struct tdesc_type_vector): Likewise.
3622         (struct tdesc_type_field): Likewise.
3623         (struct tdesc_type_with_fields): Likewise.
3624         (tdesc_create_enum): Add declaration.
3625         (tdesc_add_typed_bitfield): Likewise.
3626         (tdesc_add_enum_value): Likewise.
3627         * target-descriptions.c (tdesc_type_field): Move from here.
3628         (tdesc_type_builtin): Likewise.
3629         (tdesc_type_vector): Likewise.
3630         (tdesc_type_with_fields): Likewise.
3631         (tdesc_predefined_types): Likewise.
3632         (tdesc_named_type): Likewise.
3633         (tdesc_create_vector): Likewise.
3634         (tdesc_create_struct): Likewise.
3635         (tdesc_set_struct_size): Likewise.
3636         (tdesc_create_union): Likewise.
3637         (tdesc_create_flags): Likewise.
3638         (tdesc_create_enum): Likewise.
3639         (tdesc_add_field): Likewise.
3640         (tdesc_add_typed_bitfield): Likewise.
3641         (tdesc_add_bitfield): Likewise.
3642         (tdesc_add_flag): Likewise.
3643         (tdesc_add_enum_value): Likewise.
3644         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
3645         (tdesc_add_typed_bitfield): Likewise.
3646         (tdesc_add_enum_value): Likewise.
3647
3648 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
3649
3650         * common/tdesc.c (tdesc_feature::accept): Move to here.
3651         (tdesc_feature::operator==): Likewise.
3652         (tdesc_create_reg): Likewise.
3653         * common/tdesc.h (tdesc_type_kind): Likewise.
3654         (struct tdesc_type): Likewise.
3655         (struct tdesc_feature): Likewise.
3656         * regformats/regdat.sh: Create a feature.
3657         * target-descriptions.c (tdesc_type_kind): Move from here.
3658         (tdesc_type): Likewise.
3659         (tdesc_type_up): Likewise.
3660         (tdesc_feature): Likewise.
3661         (tdesc_create_reg): Likewise.
3662
3663 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
3664
3665         * Makefile.in: Add arch/tdesc.c
3666         * common/tdesc.c: New file.
3667         * common/tdesc.h (tdesc_element_visitor): Move to here.
3668         (tdesc_element): Likewise.
3669         (tdesc_reg): Likewise.
3670         (tdesc_reg_up): Likewise.
3671         * regformats/regdef.h (reg): Add offset to constructors.
3672         * target-descriptions.c (tdesc_element_visitor): Move from here.
3673         (tdesc_element): Likewise.
3674         (tdesc_reg): Likewise.
3675         (tdesc_reg_up): Likewise.
3676
3677 2018-04-17  Tom Tromey  <tom@tromey.com>
3678
3679         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
3680         discriminant field.
3681
3682 2018-04-17  Tom Tromey  <tom@tromey.com>
3683
3684         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
3685
3686 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3687
3688         * symtab.c (print_symbol_info): Skip printing filename and line
3689         number when `last' is NULL.
3690         (symtab_symbol_info): Use empty string instead of NULL for first
3691         invocation of print_symbol_info.
3692         (rbreak_command): Pass NULL to `last' parameter of
3693         print_symbol_info.
3694
3695 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
3696
3697         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
3698         instead of nullptr.
3699
3700 2018-04-16  Pedro Alves  <palves@redhat.com>
3701
3702         * MAINTAINERS (sh): Remove.
3703         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
3704         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
3705         (ALLDEPFILES): Remove sh64-tdep.c.
3706         * NEWS: Mentions that support for SH-5/SH64 is removed.
3707         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
3708         (sh*-*-openbsd*): Ditto.
3709         (sh64-*-elf*): Remove.
3710         (sh*): Remove.
3711         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
3712         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
3713         * sh-tdep.c: No longer include "sh64-tdep.h".
3714         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
3715         * sh64-tdep.c, sh64-tdep.h: Remove files.
3716
3717 2018-04-16  Pedro Alves  <palves@redhat.com>
3718
3719         * MAINTAINERS: Remove m88k.
3720         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
3721         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
3722         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
3723         * NEWS: Mention that support for m88k was removed.
3724         * configure.host (m88*-*-*): Remove support.
3725         * configure.nat (m88k-*-*): Remove support.
3726         * configure.tgt (m88*-*-openbsd*): Remove.
3727         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
3728
3729 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
3730
3731         * configure.tgt (x86_tobjs): New variable.
3732         (amd64_tobjs, i386_tobjs): Use it.
3733
3734 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3735
3736         * symtab.c (print_symbol_info): Precede the symbol definition by
3737         the line number when available.
3738         * NEWS: Advertise this enhancement.
3739
3740 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
3741
3742         * NEWS (New options): announce set/show record btrace cpu.
3743         * btrace.c: Include record-btrace.h.
3744         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
3745         the vendor is unknown.
3746         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
3747         Maybe overwrite the btrace configuration's cpu.
3748         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
3749         (btrace_fetch): Add cpu parameter.  Update callers.
3750         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
3751         Maybe overwrite the btrace configuration's cpu.  Skip enabling
3752         errata workarounds if the vendor is unknown.
3753         * python/py-record-btrace.c: Include record-btrace.h.
3754         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
3755         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
3756         * record-btrace.c (record_btrace_cpu_state_kind): New.
3757         (record_btrace_cpu): New.
3758         (set_record_btrace_cpu_cmdlist): New.
3759         (record_btrace_get_cpu): New.
3760         (require_btrace_thread, record_btrace_info)
3761         (record_btrace_resume_thread): Call record_btrace_get_cpu.
3762         (cmd_set_record_btrace_cpu_none): New.
3763         (cmd_set_record_btrace_cpu_auto): New.
3764         (cmd_set_record_btrace_cpu): New.
3765         (cmd_show_record_btrace_cpu): New.
3766         (_initialize_record_btrace): Initialize set/show record btrace cpu
3767         commands.
3768         * record-btrace.h (record_btrace_get_cpu): New.
3769
3770 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
3771
3772         * record.c (set_record_command): Fix typo in message.
3773
3774 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
3775
3776         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
3777
3778 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
3779
3780         * infrun.c (process_event_stop_test): Call
3781         gdbarch_in_indirect_branch_thunk.
3782         * gdbarch.sh (in_indirect_branch_thunk): New.
3783         * gdbarch.c: Regenerated.
3784         * gdbarch.h: Regenerated.
3785         * x86-tdep.h: New.
3786         * x86-tdep.c: New.
3787         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
3788         (HFILES_NO_SRCDIR): Add x86-tdep.h.
3789         (ALLDEPFILES): Add x86-tdep.c.
3790         * arch-utils.h (default_in_indirect_branch_thunk): New.
3791         * arch-utils.c (default_in_indirect_branch_thunk): New.
3792         * i386-tdep: Include x86-tdep.h.
3793         (i386_in_indirect_branch_thunk): New.
3794         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
3795         function.
3796         * amd64-tdep: Include x86-tdep.h.
3797         (amd64_in_indirect_branch_thunk): New.
3798         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
3799
3800 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
3801
3802         PR gdb/23053
3803         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
3804         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
3805         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
3806         regression.
3807
3808 2018-04-12  Tom Tromey  <tom@tromey.com>
3809
3810         * rust-lang.c (rust_print_struct_def): Remove univariant code.
3811         (rust_evaluate_subexp): Likewise.
3812
3813 2018-04-12  Pedro Alves  <palves@redhat.com>
3814
3815         * procfs.c (procfs_detach): Make forward declaration's prototype
3816         match definition's protototype.
3817         (proc_get_LDT_entry): Remove stale do_cleanups call.
3818
3819 2018-04-12  Pedro Alves  <palves@redhat.com>
3820
3821         * target.h (target_ops::to_has_exited): Delete.
3822         (target_has_exited): Delete.
3823         * target-delegates.c: Regenerate.
3824
3825 2018-04-11  Pedro Alves  <palves@redhat.com>
3826
3827         * target.c (fileio_fh_t::t): Add comment.
3828         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
3829         (target_fileio_close): Handle a NULL target.
3830         (invalidate_fileio_fh): New.
3831         (target_close): Call it.
3832         * remote.c (remote_hostio_send_command): No longer check whether
3833         remote_desc is open.
3834
3835 2018-04-11  Pedro Alves  <palves@redhat.com>
3836
3837         * target.c (fileio_fh_t): Make it a named struct instead of a
3838         typedef.
3839         (fileio_fh_t::is_closed): New method.
3840         (DEF_VEC_O (fileio_fh_t)): Remove.
3841         (fileio_fhandles): Now a std::vector.
3842         (is_closed_fileio_fh): Delete.
3843         (acquire_fileio_fd): Adjust.  Rename parameters.
3844         (release_fileio_fd): Adjust.
3845         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
3846         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
3847         (target_fileio_close): Adjust.
3848
3849 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
3850
3851         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
3852         index.
3853
3854 2018-04-10  Pedro Alves  <palves@redhat.com>
3855
3856         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
3857         (scoped_finish_thread_state): New class.
3858         * infcmd.c (run_command_1): Use it instead of finish_thread_state
3859         cleanup.
3860         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
3861         (fetch_inferior_event, normal_stop): Likewise.
3862         * thread.c (finish_thread_state_cleanup): Delete.
3863
3864 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
3865             Pedro Alves  <palves@redhat.com>
3866
3867         * value.c: Include "selftest.h" and "common/array-view.h".
3868         (struct range) <operator ==>: New.
3869         (test_ranges_contain): New.
3870         (check_ranges_vector): New.
3871         (test_insert_into_bit_range_vector): New.
3872         (_initialize_values): Register selftests.
3873         * common/array-view.h (operator==, operator!=): New.
3874
3875 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
3876
3877         * common/gdb_vecs.h (unordered_remove): Add overload that takes
3878         an iterator.
3879         * inline-frame.c: Include <algorithm>.
3880         (struct inline_state): Add constructor.
3881         (inline_state_s): Remove.
3882         (DEF_VEC_O(inline_state_s)): Remove.
3883         (inline_states): Change type to std::vector.
3884         (find_inline_frame_state): Adjust to std::vector.
3885         (allocate_inline_frame_state): Remove.
3886         (clear_inline_frame_state): Adjust to std::vector.
3887         (skip_inline_frames): Adjust to std::vector.
3888
3889 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
3890
3891         * tracepoint.h (struct trace_state_variable): Add constructor.
3892         <name>: Change type to std::string.
3893         * tracepoint.c (tsv_s): Remove.
3894         (DEF_VEC_O(tsv_s)): Remove.
3895         (tvariables): Change to std::vector.
3896         (create_trace_state_variable): Adjust to std::vector.
3897         (find_trace_state_variable): Likewise.
3898         (find_trace_state_variable_by_number): Likewise.
3899         (delete_trace_state_variable): Likewise.
3900         (trace_variable_command): Adjust to std::string.
3901         (delete_trace_variable_command): Likewise.
3902         (tvariables_info_1): Adjust to std::vector.
3903         (save_trace_state_variables): Likewise.
3904         (start_tracing): Likewise.
3905         (merge_uploaded_trace_state_variables): Adjust to std::vector
3906         and std::string.
3907         * target.h (struct target_ops)
3908         <to_download_trace_state_variable>: Pass reference to
3909         trace_state_variable.
3910         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
3911         * target-delegates.c: Re-generate.
3912         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
3913         (mi_tsv_deleted): Likewise.
3914         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
3915         * remote.c (remote_download_trace_state_variable): Change
3916         pointer to reference and adjust.
3917         * make-target-delegates (parse_argtypes): Handle references.
3918         (write_function_header): Likewise.
3919         (munge_type): Likewise.
3920
3921 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
3922
3923         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3924         string_view-selftests.c.
3925         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
3926         testsuite.
3927         * unittests/basic_string_view/cons/char/1.cc: Likewise.
3928         * unittests/basic_string_view/cons/char/2.cc: Likewise.
3929         * unittests/basic_string_view/cons/char/3.cc: Likewise.
3930         * unittests/basic_string_view/element_access/char/1.cc:
3931         Likewise.
3932         * unittests/basic_string_view/element_access/char/empty.cc:
3933         Likewise.
3934         * unittests/basic_string_view/element_access/char/front_back.cc:
3935         Likewise.
3936         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
3937         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
3938         Likewise.
3939         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
3940         Likewise.
3941         * unittests/basic_string_view/modifiers/swap/char/1.cc:
3942         Likewise.
3943         * unittests/basic_string_view/operations/compare/char/1.cc:
3944         Likewise.
3945         * unittests/basic_string_view/operations/compare/char/13650.cc:
3946         Likewise.
3947         * unittests/basic_string_view/operations/copy/char/1.cc:
3948         Likewise.
3949         * unittests/basic_string_view/operations/data/char/1.cc:
3950         Likewise.
3951         * unittests/basic_string_view/operations/find/char/1.cc:
3952         Likewise.
3953         * unittests/basic_string_view/operations/find/char/2.cc:
3954         Likewise.
3955         * unittests/basic_string_view/operations/find/char/3.cc:
3956         Likewise.
3957         * unittests/basic_string_view/operations/find/char/4.cc:
3958         Likewise.
3959         * unittests/basic_string_view/operations/rfind/char/1.cc:
3960         Likewise.
3961         * unittests/basic_string_view/operations/rfind/char/2.cc:
3962         Likewise.
3963         * unittests/basic_string_view/operations/rfind/char/3.cc:
3964         Likewise.
3965         * unittests/basic_string_view/operations/substr/char/1.cc:
3966         Likewise.
3967         * unittests/basic_string_view/operators/char/2.cc: Likewise.
3968         * unittests/string_view-selftests.c: New file.
3969
3970 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
3971
3972         * unittests/basic_string_view/capacity/1.cc: New file.
3973         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
3974         * unittests/basic_string_view/cons/char/1.cc: New file.
3975         * unittests/basic_string_view/cons/char/2.cc: New file.
3976         * unittests/basic_string_view/cons/char/3.cc: New file.
3977         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
3978         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
3979         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
3980         * unittests/basic_string_view/element_access/char/1.cc: New file.
3981         * unittests/basic_string_view/element_access/char/2.cc: New file.
3982         * unittests/basic_string_view/element_access/char/empty.cc: New file.
3983         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
3984         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
3985         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
3986         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
3987         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
3988         * unittests/basic_string_view/include.cc: New file.
3989         * unittests/basic_string_view/inserters/char/1.cc: New file.
3990         * unittests/basic_string_view/inserters/char/2.cc: New file.
3991         * unittests/basic_string_view/inserters/char/3.cc: New file.
3992         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
3993         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
3994         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
3995         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
3996         * unittests/basic_string_view/literals/types.cc: New file.
3997         * unittests/basic_string_view/literals/values.cc: New file.
3998         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
3999         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
4000         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
4001         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
4002         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
4003         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
4004         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
4005         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
4006         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
4007         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
4008         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
4009         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
4010         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
4011         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
4012         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
4013         * unittests/basic_string_view/operations/data/char/1.cc: New file.
4014         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
4015         * unittests/basic_string_view/operations/find/char/1.cc: New file.
4016         * unittests/basic_string_view/operations/find/char/2.cc: New file.
4017         * unittests/basic_string_view/operations/find/char/3.cc: New file.
4018         * unittests/basic_string_view/operations/find/char/4.cc: New file.
4019         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
4020         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
4021         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
4022         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
4023         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
4024         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
4025         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
4026         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
4027         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
4028         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
4029         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
4030         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
4031         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
4032         * unittests/basic_string_view/operators/char/2.cc: New file.
4033         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
4034         * unittests/basic_string_view/range_access/char/1.cc: New file.
4035         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
4036         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
4037         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
4038         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
4039         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
4040         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
4041         * unittests/basic_string_view/requirements/typedefs.cc: New file.
4042         * unittests/basic_string_view/typedefs.cc: New file.
4043         * unittests/basic_string_view/types/1.cc: New file.
4044
4045 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
4046
4047         * common/gdb_string_view.h: Remove libstdc++ implementation
4048         details, adjust to gdb reality.
4049         * common/gdb_string_view.tcc: Likewise.
4050         * cli/cli-script.c (struct string_view): Remove.
4051         (user_args) <m_args>: Change element type to gdb::string_view.
4052         (user_args::insert_args): Adjust.
4053
4054 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
4055
4056         * common/gdb_string_view.h: New file.
4057         * common/gdb_string_view.tcc: New file.
4058
4059 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
4060
4061         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
4062         * configure: Re-generate.
4063
4064 2018-04-09  Pedro Alves  <palves@redhat.com>
4065
4066         * gdbarch.sh: Include "observable.h" instead of "observer.h".
4067         (set_target_gdbarch): Call
4068         gdb::observers::architecture_changed.notify instead of
4069         observer_notify_architecture_changed.
4070
4071 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
4072
4073         * tracepoint.c (struct current_traceframe_cleanup): Remove.
4074         (do_restore_current_traceframe_cleanup): Remove.
4075         (restore_current_traceframe_cleanup_dtor): Remove.
4076         (make_cleanup_restore_current_traceframe): Remove.
4077         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
4078         New.
4079         * tracepoint.h (struct scoped_restore_current_traceframe): New.
4080         * infrun.c (fetch_inferior_event): Use
4081         scoped_restore_current_traceframe.
4082
4083 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
4084
4085         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
4086         Remove.
4087         <n_allocated_type_units>: Remove.
4088         <all_type_units>: Change to std::vector.
4089         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
4090         to std::vector change.
4091         (dwarf2_per_objfile::get_cutu): Likewise.
4092         (dwarf2_per_objfile::get_tu): Likewise.
4093         (create_signatured_type_table_from_index): Likewise.
4094         (create_signatured_type_table_from_debug_names): Likewise.
4095         (dw2_symtab_iter_next): Likewise.
4096         (dw2_print_stats): Likewise.
4097         (dw2_expand_all_symtabs): Likewise.
4098         (dw2_expand_marked_cus): Likewise.
4099         (dw2_debug_names_iterator::next): Likewise.
4100         (dwarf2_initialize_objfile): Likewise.
4101         (add_signatured_type_cu_to_table): Likewise.
4102         (create_all_type_units): Likewise.
4103         (add_type_unit): Likewise.
4104         (struct tu_abbrev_offset): Add constructor.
4105         (build_type_psymtabs_1): Adjust to std::vector change.
4106         (print_tu_stats): Likewise.
4107         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
4108         (write_debug_names): Likewise.
4109
4110 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
4111
4112         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
4113         Make an std::vector.
4114         <n_comp_units>: Remove.
4115         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
4116         to std::vector change.
4117         (dwarf2_per_objfile::get_cutu): Likewise.
4118         (dwarf2_per_objfile::get_cu): Likewise.
4119         (create_cus_from_index): Likewise.
4120         (create_addrmap_from_index): Likewise.
4121         (create_addrmap_from_aranges): Likewise.
4122         (dwarf2_read_index): Likewise.
4123         (dw2_find_last_source_symtab): Likewise.
4124         (dw2_map_symtabs_matching_filename): Likewise.
4125         (dw2_symtab_iter_next): Likewise.
4126         (dw2_print_stats): Likewise.
4127         (dw2_expand_all_symtabs): Likewise.
4128         (dw2_expand_symtabs_with_fullname): Likewise.
4129         (dw2_expand_marked_cus): Likewise.
4130         (dw2_map_symbol_filenames): Likewise.
4131         (create_cus_from_debug_names): Likewise.
4132         (dwarf2_read_debug_names): Likewise.
4133         (dw2_debug_names_iterator::next): Likewise.
4134         (dwarf2_initialize_objfile): Likewise.
4135         (set_partial_user): Likewise.
4136         (dwarf2_build_psymtabs_hard): Likewise.
4137         (read_comp_units_from_section): Remove arguments, adjust to
4138         std::vector change.
4139         (create_all_comp_units): Adjust to std::vector and
4140         read_comp_units_from_section changes.
4141         (dwarf2_find_containing_comp_unit): Adjust to std::vector
4142         change.
4143         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
4144         (psyms_seen_size): Likewise.
4145         (write_gdbindex): Likewise.
4146         (write_debug_names): Likewise.
4147
4148 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
4149
4150         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
4151         with dwarf2_per_objfile.
4152         (create_cus_from_index): Likewise.
4153         (create_signatured_type_table_from_index): Likewise.
4154         (dwarf2_read_index): Likewise.
4155         (dwarf2_initialize_objfile): Likewise.
4156         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
4157         per_cu rather than get_dwarf2_per_objfile.
4158
4159 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
4160
4161         * dwarf2read.h (struct signatured_type): Forward declare.
4162         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
4163         New methods.
4164         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
4165         (dw2_get_cutu): ...this.
4166         (dwarf2_per_objfile::get_cu): Rename from...
4167         (dw2_get_cu): ...this.
4168         (dwarf2_per_objfile::get_tu): New.
4169         (create_addrmap_from_index): Adjust.
4170         (create_addrmap_from_aranges): Adjust.
4171         (dw2_find_last_source_symtab): Adjust.
4172         (dw2_map_symtabs_matching_filename): Adjust.
4173         (dw2_symtab_iter_next): Adjust.
4174         (dw2_print_stats): Adjust.
4175         (dw2_expand_all_symtabs): Adjust.
4176         (dw2_expand_symtabs_with_fullname): Adjust.
4177         (dw2_expand_marked_cus): Adjust.
4178         (dw_expand_symtabs_matching_file_matcher): Adjust.
4179         (dw2_map_symbol_filenames): Adjust.
4180         (dw2_debug_names_iterator::next): Adjust.
4181         (dwarf2_initialize_objfile): Adjust.
4182         (set_partial_user): Adjust.
4183         (dwarf2_build_psymtabs_hard): Adjust.
4184
4185 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
4186
4187         * dwarf2read.c (create_signatured_type_table_from_debug_names):
4188         Remove unused variables.
4189         (dw2_map_symtabs_matching_filename): Likewise.
4190         (dwarf2_record_block_ranges): Likewise.
4191         (dwarf2_read_addr_index): Likewise.
4192         (follow_die_offset): Likewise.
4193
4194 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
4195
4196         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
4197         to symbol_file_add_main.
4198
4199 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
4200
4201         PR mi/22299
4202         * mi/mi-console.c (do_fputc_async_safe): New.
4203         (mi_console_file::write_async_safe): New.
4204         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
4205         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
4206         New.
4207         * ui-file.c (ui_file::putstrn): Adjust call to
4208         fputstrn_unfiltered.
4209         * utils.c (printchar): Replace do_fputs and do_fprintf
4210         parameters by do_fputc.
4211         (fputstr_filtered): Adjust call to printchar.
4212         (fputstr_unfiltered): Likewise.
4213         (fputstrn_filtered): Likewise.
4214         (fputstrn_unfiltered): Add do_fputc parameter, pass to
4215         printchar.
4216         * utils.h (do_fputc_ftype): New typedef.
4217         (fputstrn_unfiltered): Add do_fputc parameter.
4218
4219 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
4220
4221         * regformats/i386/i386-avx.dat: Remove.
4222
4223 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
4224
4225         PR gdb/22979
4226         * amd64-tdep.c (amd64_none_init_abi): New function.
4227         (amd64_x32_none_init_abi): New function.
4228         (_initialize_amd64_tdep): Register handlers for x86-64 and
4229         x64_32 with GDB_OSABI_NONE.
4230         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
4231         GDB_OSABI_NONE osabi.
4232
4233 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
4234
4235         PR gdb/22980
4236         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
4237         GDB_OSABI_NONE.
4238         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
4239         * osabi.c (gdb_osabi_names): Add "unknown" entry.
4240
4241 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
4242
4243         * common/byte-vector.h (char_vector): New type.
4244         * target.h (target_read_alloc): Return
4245         gdb::optional<byte_vector>.
4246         (target_read_stralloc): Return gdb::optional<char_vector>.
4247         (target_get_osdata): Return gdb::optional<char_vector>.
4248         * target.c (target_read_alloc_1): Templatize.  Replacement
4249         manual memory management with vector.
4250         (target_read_alloc): Change return type, adjust.
4251         (target_read_stralloc): Change return type, adjust.
4252         (target_get_osdata): Change return type, adjust.
4253         * auxv.c (struct auxv_info) <length>: Remove.
4254         <data>: Change type to gdb::optional<byte_vector>.
4255         (auxv_inferior_data_cleanup): Free auxv_info with delete.
4256         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
4257         (target_auxv_search): Adjust.
4258         (fprint_target_auxv): Adjust.
4259         * avr-tdep.c (avr_io_reg_read_command): Adjust.
4260         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
4261         (linux_make_corefile_notes): Adjust.
4262         * osdata.c (get_osdata): Adjust.
4263         * remote.c (remote_get_threads_with_qxfer): Adjust.
4264         (remote_memory_map): Adjust.
4265         (remote_traceframe_info): Adjust.
4266         (btrace_read_config): Adjust.
4267         (remote_read_btrace): Adjust.
4268         (remote_pid_to_exec_file): Adjust.
4269         * solib-aix.c (solib_aix_get_library_list): Adjust.
4270         * solib-dsbt.c (decode_loadmap): Don't free buf.
4271         (dsbt_get_initial_loadmaps): Adjust.
4272         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
4273         * solib-target.c (solib_target_current_sos): Adjust.
4274         * tracepoint.c (sdata_make_value): Adjust.
4275         * xml-support.c (xinclude_start_include): Adjust.
4276         (xml_fetch_content_from_file): Adjust.
4277         * xml-support.h (xml_fetch_another): Change return type.
4278         (xml_fetch_content_from_file): Change return type.
4279         * xml-syscall.c (xml_init_syscalls_info): Adjust.
4280         * xml-tdesc.c (file_read_description_xml): Adjust.
4281         (fetch_available_features_from_target): Change return type.
4282         (target_fetch_description_xml): Adjust.
4283         (target_read_description_xml): Adjust.
4284
4285 2018-04-06  Tom Tromey  <tom@tromey.com>
4286
4287         * value.c (~value): Update.
4288         (struct value) <contents>: Now unique_xmalloc_ptr.
4289         (value_contents_bits_eq, allocate_value_contents)
4290         (value_contents_raw, value_contents_all_raw)
4291         (value_contents_for_printing, value_contents_for_printing_const)
4292         (set_value_enclosing_type): Update.
4293
4294 2018-04-06  Tom Tromey  <tom@tromey.com>
4295
4296         * value.c (range_s): Remove typedef, VEC.
4297         (struct range): Add operator<.
4298         (range_lessthan): Remove.
4299         (ranges_contain): Change type.
4300         (~value): Update.
4301         (struct value) <unavailable, optimized_out>: Now std::vector.
4302         (value_entirely_available)
4303         (value_entirely_covered_by_range_vector)
4304         (value_entirely_unavailable, value_entirely_optimized_out):
4305         Update.
4306         (insert_into_bit_range_vector): Change argument type.
4307         (find_first_range_overlap): Likewise.
4308         (struct ranges_and_idx, value_contents_bits_eq)
4309         (require_not_optimized_out, require_available): Update.
4310         (ranges_copy_adjusted): Change argument types.
4311         (value_optimized_out, value_copy, value_fetch_lazy): Update.
4312
4313 2018-04-06  Tom Tromey  <tom@tromey.com>
4314
4315         * value.c (~value): Update.
4316         (struct value) <parent>: Now a value_ref_ptr.
4317         (value_parent, set_value_parent, value_address, value_copy):
4318         Update.
4319
4320 2018-04-06  Tom Tromey  <tom@tromey.com>
4321
4322         * value.c (struct value): Add constructor, destructor, and member
4323         initializers.
4324         (allocate_value_lazy, value_decref): Update.
4325
4326 2018-04-06  Tom Tromey  <tom@tromey.com>
4327
4328         * value.c (struct value) <released, next>: Remove.
4329         (all_values): Now a std::vector.
4330         (allocate_value_lazy): Update.
4331         (value_next): Remove.
4332         (value_mark, value_free_to_mark, release_value)
4333         (value_release_to_mark): Update.
4334
4335 2018-04-06  Tom Tromey  <tom@tromey.com>
4336
4337         * value.h (fetch_subexp_value, value_release_to_mark): Update.
4338         (free_value_chain): Remove.
4339         * value.c (free_value_chain): Remove.
4340         (value_release_to_mark): Return a std::vector.
4341         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
4342         std::vector.
4343         (check_condition): Update.
4344         * eval.c (fetch_subexp_value): Change "val_chain" to a
4345         std::vector.
4346         * breakpoint.c (update_watchpoint): Update.
4347         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
4348
4349 2018-04-06  Tom Tromey  <tom@tromey.com>
4350
4351         * value.h (free_all_values): Remove.
4352         * value.c (free_all_values): Remove.
4353
4354 2018-04-06  Tom Tromey  <tom@tromey.com>
4355
4356         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
4357         (value_history_chain, value_history_count): Remove.
4358         (value_history): New global.
4359         (record_latest_value, access_value_history, show_values)
4360         (preserve_values): Update.
4361
4362 2018-04-06  Tom Tromey  <tom@tromey.com>
4363
4364         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
4365         * varobj.c (varobj_set_display_format, varobj_set_value)
4366         (install_default_visualizer, construct_visualizer)
4367         (install_new_value, ~varobj, varobj_get_value_type)
4368         (my_value_of_variable, varobj_editable_p): Update.
4369         * c-varobj.c (c_describe_child, c_value_of_variable)
4370         (cplus_number_of_children, cplus_describe_child): Update.
4371         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
4372         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
4373         (ada_value_of_variable, ada_value_is_changeable_p): Update.
4374
4375 2018-04-06  Tom Tromey  <tom@tromey.com>
4376
4377         * printcmd.c (last_examine_address): Change type to
4378         value_ref_ptr.
4379         (do_examine, x_command): Update.
4380
4381 2018-04-06  Tom Tromey  <tom@tromey.com>
4382
4383         * value.c (release_value): Update.
4384         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
4385         (struct bpstats) <val>: Now a value_ref_ptr.
4386         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
4387         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
4388         (~watchpoint, print_it_watchpoint, watch_command_1)
4389         (invalidate_bp_value_on_memory_change): Update.
4390
4391 2018-04-06  Tom Tromey  <tom@tromey.com>
4392
4393         * varobj.c (varobj_clear_saved_item)
4394         (update_dynamic_varobj_children, install_new_value, ~varobj):
4395         Update.
4396         * value.h (value_incref): Move declaration earlier.
4397         (value_decref): Rename from value_free.
4398         (struct value_ref_policy): New.
4399         (value_ref_ptr): New typedef.
4400         (struct value_deleter): Remove.
4401         (gdb_value_up): Remove typedef.
4402         (release_value): Change return type.
4403         (release_value_or_incref): Remove.
4404         * value.c (set_value_parent): Update.
4405         (value_incref): Change return type.
4406         (value_decref): Rename from value_free.
4407         (value_free_to_mark, free_all_values, free_value_chain): Update.
4408         (release_value): Return value_ref_ptr.
4409         (release_value_or_incref): Remove.
4410         (record_latest_value, set_internalvar, clear_internalvar):
4411         Update.
4412         * stack.c (info_frame_command): Don't call value_free.
4413         * python/py-value.c (valpy_dealloc, valpy_new)
4414         (value_to_value_object): Update.
4415         * printcmd.c (do_examine): Update.
4416         * opencl-lang.c (lval_func_free_closure): Update.
4417         * mi/mi-main.c (register_changed_p): Don't call value_free.
4418         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
4419         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
4420         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
4421         value_free.
4422         * guile/scm-value.c (vlscm_free_value_smob)
4423         (vlscm_scm_from_value): Update.
4424         * frame.c (frame_register_unwind, frame_unwind_register_signed)
4425         (frame_unwind_register_unsigned, get_frame_register_bytes)
4426         (put_frame_register_bytes): Don't call value_free.
4427         * findvar.c (address_from_register): Don't call value_free.
4428         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
4429         * dwarf2loc.c (entry_data_value_free_closure)
4430         (value_of_dwarf_reg_entry, free_pieced_value_closure)
4431         (dwarf2_evaluate_loc_desc_full): Update.
4432         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
4433         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
4434         (~watchpoint, watch_command_1)
4435         (invalidate_bp_value_on_memory_change): Update.
4436         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
4437
4438 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
4439
4440         PR gdb/23022
4441         * warning.m4: Add -Wno-error=deprecated-register.
4442         * configure: Re-generate.
4443
4444 2018-04-05  Tom Tromey  <tom@tromey.com>
4445
4446         * linespec.h: Remove include of "vec.h".
4447
4448 2018-04-05  Tom Tromey  <tom@tromey.com>
4449
4450         * linespec.c (typep): Remove typedef.
4451         (find_methods, find_superclass_methods): Take a std::vector.
4452         (find_method): Use std::vector.
4453
4454 2018-04-05  Tom Tromey  <tom@tromey.com>
4455
4456         * utils.c (compare_strings): Remove.
4457         * utils.h (compare_strings): Remove.
4458         * objc-lang.h (find_imps): Update.
4459         * objc-lang.c (find_methods): Take a std::vector.
4460         (uniquify_strings, find_imps): Likewise.
4461         * linespec.c (find_methods): Take a std::vector.
4462         (decode_objc): Use std::vector.
4463         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
4464         a std::vector.
4465         (find_method, find_function_symbols): Use std::vector.
4466
4467 2018-04-05  Tom Tromey  <tom@tromey.com>
4468
4469         * completer.c (completion_tracker::completion_tracker): Remove
4470         cast.
4471         (completion_tracker::discard_completions): Likewise.
4472         * breakpoint.c (ambiguous_names_p): Remove cast.
4473         * ada-lang.c (_initialize_ada_language): Remove cast.
4474         * utils.h (streq): Update.
4475         (streq_hash): Add new declaration.
4476         * utils.c (streq): Return bool.
4477         (streq_hash): New function.
4478
4479 2018-04-05  Tom Tromey  <tom@tromey.com>
4480
4481         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
4482         Remove a string copy.
4483
4484 2018-04-05  Tom Tromey  <tom@tromey.com>
4485
4486         * linespec.c (filter_results): Use std::vector.
4487         (decode_line_2, decode_line_full): Update.
4488
4489 2018-04-05  Tom Tromey  <tom@tromey.com>
4490
4491         * linespec.c (canonical_to_fullform): Return std::string.
4492         (filter_results): Update.
4493         (struct decode_line_2_item): Add constructor.
4494         <fullform, displayform>: Now std::string.
4495         (decode_line_2_compare_items): Now a std::sort comparator.
4496         (decode_line_2): Update.
4497
4498 2018-04-05  Tom Tromey  <tom@tromey.com>
4499
4500         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
4501         (unexpected_linespec_error): Update.
4502         (linespec_parse_basic, parse_linespec): Update.
4503
4504 2018-04-05  Tom Tromey  <tom@tromey.com>
4505
4506         * linespec.c (linespec_parse_basic): Reindent.
4507
4508 2018-04-05  Tom Tromey  <tom@tromey.com>
4509
4510         * minsyms.h (iterate_over_minimal_symbols): Update.
4511         * minsyms.c (iterate_over_minimal_symbols): Take a
4512         gdb::function_view.
4513         * linespec.c (struct collect_minsyms): Remove.
4514         (compare_msyms): Now a std::sort comparator.
4515         (add_minsym): Add parameters.
4516         (search_minsyms_for_name): Update.  Use std::vector.
4517
4518 2018-04-03  Tom Tromey  <tom@tromey.com>
4519
4520         * mipsread.c (read_alphacoff_dynamic_symtab): Use
4521         gdb::byte_vector.
4522
4523 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
4524
4525         * MAINTAINERS (Write After Approval): Add Weimin Pan.
4526
4527 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
4528
4529         PR gdb/16959
4530         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
4531         printing static type.
4532
4533 2018-04-01  Tom Tromey  <tom@tromey.com>
4534
4535         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
4536         (rs6000_xfer_shared_libraries): Update.
4537
4538 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
4539
4540         * common/gdb_vecs.h (char_ptr): Remove.
4541         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
4542
4543 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
4544
4545         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
4546         with std::vector.
4547         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
4548
4549 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
4550
4551         * tracepoint.h (struct uploaded_tp): Initialize fields.
4552         <actions, step_actions, cmd_strings>: Change type to
4553         std::vector<char *>.
4554         * tracepoint.c (get_uploaded_tp): Allocate with new.
4555         (free_uploaded_tps): Free with delete.
4556         (parse_tracepoint_definition): Adjust to std::vector change.
4557         * breakpoint.c (read_uploaded_action): Likewise.
4558         (create_tracepoint_from_upload): Likewise.
4559         * ctf.c (ctf_write_uploaded_tp): Likewise.
4560         (SET_ARRAY_FIELD): Likewise.
4561         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
4562
4563 2018-03-30  Tom Tromey  <tom@tromey.com>
4564
4565         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
4566         std::unique_ptr.
4567         (svr4_keep_data_in_core): Update.
4568         (svr4_read_so_list): Update.
4569
4570 2018-03-30  Tom Tromey  <tom@tromey.com>
4571
4572         * windows-nat.c (handle_output_debug_string, handle_exception):
4573         Update.
4574         * target.h (target_read_string): Update.
4575         * target.c (target_read_string): Change "string" to
4576         unique_xmalloc_ptr.
4577         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
4578         Update.
4579         * solib-frv.c (frv_current_sos): Update.
4580         * solib-dsbt.c (dsbt_current_sos): Update.
4581         * solib-darwin.c (darwin_current_sos): Update.
4582         * linux-thread-db.c (inferior_has_bug): Update.
4583         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
4584         Update.  Remove alloca.
4585         * ada-lang.c (ada_main_name): Update.
4586
4587 2018-03-30  Tom Tromey  <tom@tromey.com>
4588
4589         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
4590         (struct dwo_file_deleter): New.
4591         (dwo_file_up): New typedef.
4592         (open_and_init_dwo_file): Use dwo_file_up.
4593         (free_dwo_file_cleanup): Remove.
4594
4595 2018-03-30  Tom Tromey  <tom@tromey.com>
4596
4597         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
4598         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
4599
4600 2018-03-30  Tom Tromey  <tom@tromey.com>
4601
4602         * dwarf2read.c (class free_cached_comp_units): New class.
4603         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
4604         (free_cached_comp_units): Remove function.
4605
4606 2018-03-30  Tom Tromey  <tom@tromey.com>
4607
4608         * utils.h (make_cleanup_unpush_target): Remove.
4609         * inf-ptrace.c (struct target_unpusher): New.
4610         (target_unpush_up) New typedef.
4611         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
4612         target_unpush_up.
4613         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
4614
4615 2018-03-27  Tom Tromey  <tom@tromey.com>
4616
4617         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
4618
4619 2018-03-27  Pedro Alves  <palves@redhat.com>
4620             Tom Tromey  <tom@tromey.com>
4621
4622         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
4623         destructor.  Now a class.
4624         (gdb_readline_wrapper_cleanup): Remove function.
4625         (gdb_readline_wrapper): Remove cleanups.
4626
4627 2018-03-27  Tom Tromey  <tom@tromey.com>
4628
4629         * typeprint.h (struct type_print_options) <local_typedefs,
4630         global_typedefs>: Remove "struct" keyword.
4631         (class typedef_hash_table): New class.
4632         (recursively_update_typedef_hash, add_template_parameters)
4633         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
4634         (find_typedef_in_hash): Don't declare.
4635         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
4636         (typedef_hash_table::recursively_update): Rename from
4637         recursively_update_typedef_hash.  Now a member.
4638         (typedef_hash_table::add_template_parameters): Rename from
4639         add_template_parameters.  Now a member.
4640         (typedef_hash_table::typedef_hash_table): Now a constructor;
4641         rename from create_typedef_hash.
4642         (typedef_hash_table::~typedef_hash_table): Now a destructor;
4643         rename from free_typedef_hash.
4644         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
4645         (do_free_global_table): Remove.
4646         (typedef_hash_table::typedef_hash_table): New constructor; renamed
4647         from copy_type_recursive.
4648         (create_global_typedef_table): Remove.
4649         (typedef_hash_table::find_global_typedef): Now a member of
4650         typedef_hash_table.
4651         (typedef_hash_table::find_typedef): Rename from
4652         find_typedef_in_hash; now a member.
4653         (whatis_exp): Update.
4654         * extension.h (struct ext_lang_type_printers): Add constructor and
4655         destructor.
4656         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
4657         declare.
4658         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
4659         Now a constructor; rename from start_ext_lang_type_printers.
4660         (ext_lang_type_printers): Now a destructor; rename from
4661         free_ext_lang_type_printers.
4662         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
4663         Update.
4664         (c_type_print_base_struct_union): Update.  Remove cleanups.
4665
4666 2018-03-27  Tom Tromey  <tom@tromey.com>
4667
4668         * dwarf-index-write.c: Include <cmath>.
4669
4670 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
4671
4672         * NEWS: Add entry describing new "set|show varsize-limit" command.
4673         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
4674         command.
4675         * printcmd.c (_initialize_printcmd): Add "set var" alias of
4676         "set variable".
4677
4678 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
4679
4680         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
4681         dwarf-index-write.c
4682         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
4683         * dwarf-index-common.c: New file.
4684         * dwarf-index-common.h: New file.
4685         * dwarf-index-write.c: New file.
4686         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
4687         (struct dwarf2_section_info): Move from here.
4688         (dwarf2_section_info_def): Likewise.
4689         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
4690         (offset_type): Likewise.
4691         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
4692         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
4693         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
4694         (byte_swap): Likewise.
4695         (MAYBE_SWAP): Likewise.
4696         (dwarf2_per_cu_ptr): Likewise.
4697         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
4698         (struct tu_stats): Likewise.
4699         (struct dwarf2_per_objfile): Likewise.
4700         (struct dwarf2_per_cu_data): Likewise.
4701         (struct signatured_type): Likewise.
4702         (sig_type_ptr): Likewise.
4703         (DEF_VEC_P (sig_type_ptr)): Likewise.
4704         (INDEX4_SUFFIX): Likewise.
4705         (INDEX5_SUFFIX): Likewise.
4706         (DEBUG_STR_SUFFIX): Likewise.
4707         (dwarf2_read_section): Make non-static.
4708         (mapped_index_string_hash): Move from here.
4709         (dwarf5_djb_hash): Likewise.
4710         (file_write): Likewise.
4711         (class data_buf): Likewise.
4712         (struct symtab_index_entry): Likewise.
4713         (struct mapped_symtab): Likewise.
4714         (find_slot): Likewise.
4715         (hash_expand): Likewise.
4716         (add_index_entry): Likewise.
4717         (uniquify_cu_indices): Likewise.
4718         (class c_str_view): Likewise.
4719         (class c_str_view_hasher): Likewise.
4720         (class vector_hasher): Likewise.
4721         (write_hash_table): Likewise.
4722         (psym_index_map): Likewise.
4723         (struct addrmap_index_data): Likewise.
4724         (add_address_entry): Likewise.
4725         (add_address_entry_worker): Likewise.
4726         (write_address_map): Likewise.
4727         (symbol_kind): Likewise.
4728         (write_psymbols): Likewise.
4729         (struct signatured_type_index_data): Likewise.
4730         (write_one_signatured_type): Likewise.
4731         (recursively_count_psymbols): Likewise.
4732         (recursively_write_psymbols): Likewise.
4733         (class debug_names): Likewise.
4734         (check_dwarf64_offsets): Likewise.
4735         (psyms_seen_size): Likewise.
4736         (write_gdbindex): Likewise.
4737         (write_debug_names): Likewise.
4738         (assert_file_size): Likewise.
4739         (write_psymtabs_to_index): Likewise.
4740         (save_gdb_index_command): Likewise.
4741         (_initialize_dwarf2_read): Don't register the "save gdb-index"
4742         command.
4743         * dwarf2read.h: New file.
4744
4745 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
4746
4747         PR gdb/22670
4748         * dwarf2read.c (dwarf2_physname): Do not return the demangled
4749         symbol name if the CU's language stores symbol names in linkage
4750         format.
4751         * language.h (struct language_defn)
4752         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
4753         all instances of this struct.
4754
4755 2018-03-26  Tom Tromey  <tom@tromey.com>
4756
4757         * stack.c (backtrace_command_1): Remove verbose code.
4758
4759 2018-03-26  Tom Tromey  <tom@tromey.com>
4760
4761         * python/py-framefilter.c (py_print_type): Don't catch
4762         exceptions.  Return void.
4763         (py_print_value): Likewise.
4764         (py_print_single_arg): Likewise.
4765         (enumerate_args): Don't catch exceptions.
4766         (py_print_args): Likewise.
4767         (py_print_frame): Likewise.
4768         (gdbpy_apply_frame_filter): Catch exceptions here.
4769
4770 2018-03-26  Tom Tromey  <tom@tromey.com>
4771
4772         * stack.c (_initialize_stack): Remove trailing newlines from help
4773         text.  Add "Usage" line to "backtrace" help.
4774
4775 2018-03-26  Tom Tromey  <tom@tromey.com>
4776
4777         PR python/16486:
4778         * python/py-framefilter.c (py_print_args): Call wrap_hint.
4779
4780 2018-03-26  Tom Tromey  <tom@tromey.com>
4781
4782         * python/py-framefilter.c (py_print_single_arg): Return
4783         EXT_LANG_BT_ERROR from catch.
4784
4785 2018-03-26  Tom Tromey  <tom@tromey.com>
4786
4787         PR backtrace/15584:
4788         * stack.c (backtrace_command_1): Move some code into no-filters
4789         "if".
4790
4791 2018-03-26  Tom Tromey  <tom@tromey.com>
4792
4793         * python/py-framefilter.c (throw_quit_or_print_exception): New
4794         function.
4795         (gdbpy_apply_frame_filter): Use it.
4796
4797 2018-03-26  Tom Tromey  <tom@tromey.com>
4798
4799         PR cli/17716:
4800         * python/py-framefilter.c (py_print_type, py_print_value)
4801         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
4802         RETURN_MASK_ERROR.
4803
4804 2018-03-26  Tom Tromey  <tom@tromey.com>
4805
4806         * python/py-framefilter.c (enumerate_args): Use
4807         gdb::unique_xmalloc_ptr.
4808
4809 2018-03-26  Tom Tromey  <tom@tromey.com>
4810
4811         * python/py-framefilter.c (py_print_frame): Return
4812         EXT_LANG_BT_OK.
4813         (gdbpy_apply_frame_filter): Update comment.
4814         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
4815         Remove.
4816         <EXT_LANG_BT_NO_FILTERS>: Change value.
4817
4818 2018-03-26  Tom Tromey  <tom@tromey.com>
4819
4820         PR backtrace/15582:
4821         * stack.c (backtrace_command): Parse "hide" argument.
4822         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
4823         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
4824         constant.
4825
4826 2018-03-26  Tom Tromey  <tom@tromey.com>
4827
4828         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
4829         add "flags".
4830         (backtrace_command): Remove "fulltrace", add "flags".
4831
4832 2018-03-26  Tom Tromey  <tom@tromey.com>
4833
4834         * stack.c (backtrace_command): Rewrite command line parsing.
4835
4836 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
4837
4838         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
4839
4840 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
4841
4842         * filename-seen-cache.h: Add include guard.
4843
4844 2018-03-26  Keith Seitz  <keiths@redhat.com>
4845
4846         * symfile.c (place_section): Remove "struct" from section_addr_info
4847         in comment.
4848         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
4849         "struct" keyword from section_addr_info.
4850
4851 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
4852
4853         * regformats/regdef.h (reg): Add constructors.
4854
4855 2018-03-25  Pedro Alves  <palves@redhat.com>
4856
4857         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
4858         if then/else bodies in var_func_name extraction.
4859
4860 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
4861
4862         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
4863         lookup_minimal_symbol() to find symbol entry.
4864         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
4865
4866 2018-03-23  Keith Seitz  <keiths@redhat.com>
4867
4868         PR c++/22968
4869         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
4870         nested type definitions for C++, too.
4871
4872 2018-03-23  Tom Tromey  <tom@tromey.com>
4873
4874         * machoread.c (struct oso_el): Add a constructor.  Don't define as
4875         a typedef.
4876         (macho_register_oso): Remove.
4877         (macho_symtab_read): Take a std::vector.
4878         (oso_el_compare_name): Now a std::sort comparator.
4879         (macho_symfile_read_all_oso): Take a std::vector.
4880         (macho_symfile_read): Use std::vector.  Remove cleanups.
4881
4882 2018-03-22  Tom Tromey  <tom@tromey.com>
4883
4884         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
4885         (record_full_goto_bookmark): Use std::string.
4886
4887 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4888
4889         PR tdep/18295
4890         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
4891         a single mask.
4892
4893 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4894
4895         * rs6000-tdep.c (store_insn_p): New function.
4896         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
4897         and cr_reg to their unshifted values. Use store_insn_p to
4898         match LR saves using either R1 or fdata->alloca_reg. Use
4899         store_insn_p to match CR saves. Set alloca_reg_offset
4900         when alloca_reg and framep are set. Remove lr_reg shift
4901         when assigning to fdata->lr_register.
4902
4903 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4904
4905         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
4906         command line args instead of emitting a warning.
4907
4908 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
4909
4910         * tracepoint.h (struct static_tracepoint_marker): Initialize
4911         fields, define default constructor, move constructor and move
4912         assignment, disable the rest.
4913         <str_id, extra>: Make std::string.
4914         (release_static_tracepoint_marker): Remove.
4915         (free_current_marker): Remove.
4916         * tracepoint.c (free_current_marker): Remove.
4917         (parse_static_tracepoint_marker_definition): Adjust to
4918         std::string, use new hex2str overload.
4919         (release_static_tracepoint_marker): Remove.
4920         (print_one_static_tracepoint_marker): Get marker by reference
4921         and adjust to std::string.
4922         (info_static_tracepoint_markers_command): Adjust to std::vector
4923         changes
4924         * target.h (static_tracepoint_marker_p): Remove typedef.
4925         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
4926         (struct target_ops) <to_static_tracepoint_marker_at>: Return
4927         bool.
4928         <to_static_tracepoint_markers_by_strid>: Return std::vector.
4929         * target-debug.h
4930         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
4931         (target_debug_print_std_vector_static_tracepoint_marker): New.
4932         (target_debug_print_struct_static_tracepoint_marker_p): Rename
4933         to...
4934         (target_debug_print_static_tracepoint_marker_p): ... this.
4935         * target-delegates.c: Re-generate.
4936         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
4937         Make std::string.
4938         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
4939         (decode_static_tracepoint_spec): Adjust to std::vector.
4940         (tracepoint_print_one_detail): Adjust to std::string.
4941         (strace_marker_decode_location): Adjust to std::string.
4942         (update_static_tracepoint): Adjust to std::string, remove call
4943         to release_static_tracepoint_marker.
4944         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
4945         Adjust to std::vector.
4946         * remote.c (remote_static_tracepoint_marker_at): Return bool.
4947         (remote_static_tracepoint_markers_by_strid): Adjust to
4948         std::vector.
4949         * common/rsp-low.h (hex2str): New overload with explicit count
4950         of bytes.
4951         * common/rsp-low.c (hex2str): New overload with explicit count
4952         of bytes.
4953         * unittests/rsp-low-selftests.c (test_hex2str): New function.
4954         (_initialize_rsp_low_selftests): Add test_hex2str test.
4955         * unittests/tracepoint-selftests.c
4956         (test_parse_static_tracepoint_marker_definition): Adjust to
4957         std::string.
4958
4959 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
4960
4961         * tracepoint.c (parse_static_tracepoint_marker_definition):
4962         Consider case where the definition is followed by more
4963         definitions.
4964         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4965         tracepoint-selftests.c.
4966         * unittests/tracepoint-selftests.c: New.
4967
4968 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4969
4970         * MAINTAINERS (Write After Approval): Add Pedro Franco de
4971         Carvalho.
4972
4973 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
4974
4975         * symtab.c (find_pc_sect_line): fixed indentation.
4976
4977 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
4978
4979         * symtab.c (find_pc_sect_line): now uses binary search.
4980
4981 2018-03-19  Tom Tromey  <tom@tromey.com>
4982
4983         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
4984         "IDENT" production.
4985
4986 2018-03-19  Pedro Alves  <palves@redhat.com>
4987             Tom Tromey  <tom@tromey.com>
4988
4989         * unittests/observable-selftests.c: New file.
4990         * common/observable.h: New file.
4991         * observable.h: New file.
4992         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
4993         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
4994         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
4995         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
4996         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
4997         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
4998         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
4999         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
5000         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
5001         python/py-breakpoint.c, python/py-finishbreakpoint.c,
5002         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
5003         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
5004         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
5005         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
5006         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
5007         tui/tui-interp.c, valops.c: Update all users.
5008         * tui/tui-hooks.c (tui_bp_created_observer)
5009         (tui_bp_deleted_observer, tui_bp_modified_observer)
5010         (tui_inferior_exit_observer, tui_before_prompt_observer)
5011         (tui_normal_stop_observer, tui_register_changed_observer):
5012         Remove.
5013         (tui_observers_token): New global.
5014         (attach_or_detach, tui_attach_detach_observers): New functions.
5015         (tui_install_hooks, tui_remove_hooks): Use
5016         tui_attach_detach_observers.
5017         * record-btrace.c (record_btrace_thread_observer): Remove.
5018         (record_btrace_thread_observer_token): New global.
5019         * observer.sh: Remove.
5020         * observer.c: Rename to observable.c.
5021         * observable.c (namespace gdb_observers): Define new objects.
5022         (observer_debug): Move into gdb_observers namespace.
5023         (struct observer, struct observer_list, xalloc_observer_list_node)
5024         (xfree_observer_list_node, generic_observer_attach)
5025         (generic_observer_detach, generic_observer_notify): Remove.
5026         (_initialize_observer): Update.
5027         Don't include observer.inc.
5028         * Makefile.in (generated_files): Remove observer.h, observer.inc.
5029         (clean mostlyclean): Likewise.
5030         (observer.h, observer.inc): Remove targets.
5031         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
5032         (COMMON_SFILES): Use observable.c, not observer.c.
5033         * .gitignore: Remove observer.h.
5034
5035 2018-03-18  Tom Tromey  <tom@tromey.com>
5036
5037         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
5038         gdb::def_vector.
5039         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
5040
5041 2018-03-17  Tom Tromey  <tom@tromey.com>
5042
5043         * auto-load.c (auto_load_objfile_script_1): Use std::string.
5044
5045 2018-03-17  Tom Tromey  <tom@tromey.com>
5046
5047         * target.c (class scoped_target_fd): New.
5048         (target_fileio_close_cleanup): Remove.
5049         (target_fileio_read_alloc_1): Use scoped_target_fd.
5050
5051 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
5052
5053         * silent-rules.mk: New.
5054         * Makefile.in: Include silent-rules.mk
5055         (srcdir, VPATH, top_srcdir): Move up.
5056         (COMPILE): Add ECHO_CXX.
5057         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
5058         (init.c): Add ECHO_INIT_C.
5059         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5060         (version.c): Add ECHO_GEN.
5061         (printcmd.o): Add ECHO_CXX.
5062         (target-float.o): Add ECHO_CXX.
5063         (ada-exp.o): Add ECHO_CXX.
5064         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
5065         (insight$(EXEEXT)): Add ECHO_CXXLD.
5066         * gnulib/configure.ac: Add AM_SILENT_RULES.
5067         * gnulib/aclocal.m4: Re-generate.
5068         * gnulib/configure: Re-generate.
5069         * gnulib/import/Makefile.in: Re-generate.
5070
5071 2018-03-16  Tom Tromey  <tom@tromey.com>
5072
5073         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
5074         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
5075         * utils.c (do_free_section_addr_info)
5076         (make_cleanup_free_section_addr_info): Remove.
5077         * symfile.h (struct other_sections): Add constructor.
5078         (struct section_addr_info): Remove.
5079         (section_addr_info): New typedef.
5080         (struct sym_fns) <sym_offsets>: Change type of parameter.
5081         (build_section_addr_info_from_objfile)
5082         (relative_addr_info_to_section_offsets, addr_info_make_relative)
5083         (default_symfile_offsets, symbol_file_add)
5084         (symbol_file_add_from_bfd)
5085         (build_section_addr_info_from_section_table): Update.
5086         (alloc_section_addr_info, free_section_addr_info): Don't declare.
5087         * symfile.c (alloc_section_addr_info): Remove.
5088         (build_section_addr_info_from_section_table): Change return type.
5089         Update.
5090         (build_section_addr_info_from_bfd)
5091         (build_section_addr_info_from_objfile): Likewise.
5092         (free_section_addr_info): Remove.
5093         (relative_addr_info_to_section_offsets): Change type of "addrs".
5094         (addrs_section_compar): Now a std::sort comparator.
5095         (addrs_section_sort): Change return type.
5096         (addr_info_make_relative): Change type of "addrs".  Update.
5097         (default_symfile_offsets, syms_from_objfile_1)
5098         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
5099         (symbol_file_add_separate): Update.
5100         (symbol_file_add): Change type of "addrs".  Update.
5101         (add_symbol_file_command): Update.  Remove cleanups.
5102         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
5103         cleanups.
5104         * symfile-debug.c (debug_sym_offsets): Change type of "info".
5105         * solib.c (solib_read_symbols): Update.
5106         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
5107         * machoread.c (macho_symfile_offsets): Update.
5108         * jit.c (jit_bfd_try_read_symtab): Update.
5109
5110 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
5111
5112         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5113         unittests/utils-selftests.c.
5114         * unittests/utils-selftests.c: New file.
5115
5116 2018-03-14  Tom Tromey  <tom@tromey.com>
5117
5118         PR cli/14977:
5119         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
5120         for NULL.
5121
5122 2018-03-14  Tom Tromey  <tom@tromey.com>
5123
5124         PR cli/19918:
5125         * printcmd.c (printf_pointer): Allow "-" in format.
5126
5127 2018-03-14  Tom Tromey  <tom@tromey.com>
5128
5129         * printcmd.c (_initialize_printcmd): Add usage to printf.
5130
5131 2018-03-14  Yao Qi  <qiyao@sourceware.org>
5132
5133         * MAINTAINERS: Update my email address.
5134
5135 2018-03-13  Tom Tromey  <tom@tromey.com>
5136
5137         * machoread.c (macho_check_dsym): Change filenamep to a
5138         std::string*.
5139         (macho_symfile_read): Update.
5140         * symfile.c (load_command): Use std::string.
5141
5142 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5143
5144         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
5145         to error message string.
5146         (riscv_register_name): Use xsnprintf instead of sprintf.
5147         (riscv_insn::fetch_instruction): Use gdb_assert instead of
5148         internal_error.
5149         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
5150         error.
5151         (riscv_push_dummy_call): Likewise.
5152
5153 2018-03-12  Tom Tromey  <tom@tromey.com>
5154
5155         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
5156         Use gdb::byte_vector.
5157         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
5158
5159 2018-03-12  Yao Qi  <yao.qi@linaro.org>
5160
5161         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
5162         parameter type to readable_regcache.
5163         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
5164         the declaration.
5165
5166 2018-03-11  Tom Tromey  <tom@tromey.com>
5167
5168         * dwarf2read.c (struct nextfield): Add initializers.
5169         (struct nextfnfield): Remove.
5170         (struct fnfieldlist): Add initializers.  Remove "length" and
5171         "head", use std::vector.
5172         (struct decl_field_list): Remove.
5173         (struct field_info): Add initializers.
5174         <fields, baseclasses>: Now std::vector.
5175         <nbaseclasses, nfnfields, typedef_field_list_count,
5176         nested_types_list_count>: Remove.
5177         (dwarf2_add_field, dwarf2_add_type_defn)
5178         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
5179         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
5180         (process_structure_scope): Update.
5181
5182 2018-03-11  Tom Tromey  <tom@tromey.com>
5183
5184         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
5185         for use by std::sort.
5186         (build_type_psymtabs_1): Use std::vector.
5187
5188 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
5189
5190         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
5191         and LIBMPFR in the printed configuration.
5192
5193 2018-03-08  Tom Tromey  <tom@tromey.com>
5194
5195         * source.c (get_filename_and_charpos): Use scoped_fd.
5196         * nto-procfs.c (procfs_open_1): Use scoped_fd.
5197         (procfs_pidlist): Likewise.
5198         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
5199         (iterate_over_mappings): Likewise.
5200
5201 2018-03-08  Tom Tromey  <tom@tromey.com>
5202
5203         * infcall.c (struct call_return_meta_info)
5204         <stack_temporaries_enabled>: Remove.
5205         (get_call_return_value, call_function_by_hand_dummy): Update.
5206         * thread.c (disable_thread_stack_temporaries): Remove.
5207         (enable_thread_stack_temporaries): Remove.
5208         (thread_stack_temporaries_enabled_p): Return bool.
5209         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
5210         (get_last_thread_stack_temporary): Update.
5211         * eval.c (evaluate_subexp): Update.
5212         * gdbthread.h (class enable_thread_stack_temporaries): Now a
5213         class, not a function.
5214         (value_ptr, value_vec): Remove typedefs.
5215         (class thread_info) <stack_temporaries_enabled>: Now bool.
5216         <stack_temporaries>: Now a std::vector.
5217         (thread_stack_temporaries_enabled_p)
5218         (value_in_thread_stack_temporaries): Return bool.
5219
5220 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
5221
5222         * remote.c (putpkt_binary): Fix omitted bytes reporting.
5223         (getpkt_or_notif_sane_1): Likewise.
5224
5225 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
5226
5227         * build-id.c (build_id_to_debug_bfd): Use std::string.
5228
5229 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
5230
5231         * build-id.c (find_separate_debug_file_by_buildid): Return
5232         std::string.
5233         * build-id.h (find_separate_debug_file_by_buildid): Return
5234         std::string.
5235         * coffread.c (coff_symfile_read): Adjust to std::string.
5236         * elfread.c (elf_symfile_read): Adjust to std::string.
5237         * symfile.c (separate_debug_file_exists): Change parameter to
5238         std::string.
5239         (find_separate_debug_file): Return std::string.
5240         (find_separate_debug_file_by_debuglink): Return std::string.
5241         * symfile.h (find_separate_debug_file_by_debuglink): Return
5242         std::string.
5243
5244 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
5245
5246         * common/xml-utils.c (xml_escape_text): Move code to...
5247         (xml_escape_text_append): ... this new function.
5248         * common/xml-utils.h (xml_escape_text_append): New declaration.
5249         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
5250         New function.
5251         (_initialize_xml_utils): register test_xml_escape_text_append as
5252         a selftest.
5253
5254 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
5255
5256         * defs.h: Remove MAX_REGISTER_SIZE.
5257         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
5258         asserts.
5259         * python/py-unwind.c (pyuw_sniffer): Likewise.
5260
5261 2018-03-07  Tom Tromey  <tom@tromey.com>
5262
5263         * linux-tdep.c (linux_info_proc): Update.
5264         * target.h (struct target_ops) <to_fileio_readlink>: Return
5265         optional<string>.
5266         (target_fileio_readlink): Return optional<string>.
5267         * remote.c (remote_hostio_readlink): Return optional<string>.
5268         * inf-child.c (inf_child_fileio_readlink): Return
5269         optional<string>.
5270         * target.c (target_fileio_readlink): Return optional<string>.
5271
5272 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
5273
5274         * regcache.c (cooked_read_test): Add riscv to the list of
5275         architectures that have a save_reggroup.
5276
5277 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5278
5279         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
5280         value is not a dynamic class object.
5281
5282 2018-03-06  Tom Tromey  <tom@tromey.com>
5283
5284         * rust-exp.y: Formatting fixes.
5285
5286 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
5287
5288         * riscv-tdep.c (riscv_register_name): Remove target description
5289         support.
5290         (riscv_gdbarch_init): Remove target description check.
5291
5292 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
5293
5294         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
5295         comment.
5296         * riscv-tdep.h: Likewise.
5297
5298 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
5299
5300         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
5301         (riscv_pseudo_register_write): Delete.
5302         (riscv_gdbarch_init): Remove all use of pseudo registers.
5303
5304 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
5305
5306         * record-btrace.c (btrace_print_lines): Replace cleanup
5307         parameter with RAII equivalents.
5308         (btrace_insn_history): Replace cleanup with RAII equivalents.
5309         * ui-out.h (make_cleanup_ui_out_list_begin_end,
5310         make_cleanup_ui_out_tuple_begin_end): Remove.
5311         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
5312         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
5313         make_cleanup_ui_out_list_begin_end): Remove.
5314
5315 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
5316
5317         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
5318         parameter types to std::vector.  Use bool.
5319         (record_btrace_wait): Replace VEC(tp_t) with
5320         std::vector<thread_info *>.
5321         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
5322
5323 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
5324
5325         * record-btrace.c (record_btrace_disable_callback): Remove.
5326         (struct scoped_btrace_disable): New.
5327         (record_btrace_open): Use scoped_btrace_disable.
5328
5329 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
5330
5331         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
5332         reading values from registers.
5333
5334 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
5335
5336         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
5337         where appropriate.
5338
5339 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
5340
5341         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
5342         change parameter type.  Use GDB's print functions, and use
5343         core_addr_to_string where appropriate.
5344         (riscv_push_dummy_call): Use core_addr_to_string where
5345         appropriate, update call to riscv_print_arg_location, and reindent
5346         a few lines.
5347         (riscv_return_value): Update call to riscv_print_arg_location.
5348
5349 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
5350             Tim Newsome <tim@sifive.com>
5351             Albert Ou <a0u@eecs.berkeley.edu>
5352             Darius Rad <darius@bluespec.com>
5353
5354         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
5355         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
5356         (ALLDEPFILES): Add riscv-tdep.c
5357         * configure.tgt: Add riscv support.
5358         * riscv-tdep.c: New file.
5359         * riscv-tdep.h: New file.
5360         * NEWS: Mention new target.
5361         * MAINTAINERS: Add entry for riscv.
5362
5363 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
5364
5365         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
5366         fields within aggregates.
5367
5368 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
5369
5370         * record-btrace.c (btrace_print_lines): Change type of flags to
5371         gdb_disassembly_flags.
5372
5373 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
5374
5375         * fbsd-nat.c: Include "inf-ptrace.h".
5376         (USE_SIGTRAP_SIGINFO): Conditionally define.
5377         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
5378         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
5379         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
5380         function.
5381         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
5382         Likewise.
5383         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
5384         Likewise.
5385         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
5386         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
5387         "supports_stopped_by_hw_breakpoint" target methods.
5388
5389 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
5390
5391         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
5392         * fbsd-nat.c (debug_fbsd_nat): New variable.
5393         (show_fbsd_nat_debug): New function.
5394         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
5395         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
5396
5397 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
5398
5399         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
5400         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
5401         prototype.
5402         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
5403         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
5404         method.
5405
5406 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
5407
5408         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
5409         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
5410
5411 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
5412
5413         * charset.c (struct charset_vector): New.
5414         (charsets): Change type to charset_vector.
5415         (find_charset_names): Adjust.
5416         (add_one): Adjust.
5417         (_initialize_charset): Adjust.
5418
5419 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
5420
5421         * progspace.h (struct program_space) <deleted_solibs>: Change
5422         type to std::vector<std::string>.
5423         * progspace.c (clear_program_space_solib_cache): Adjust.
5424         * breakpoint.c (print_solib_event): Adjust.
5425         (check_status_catch_solib): Adjust.
5426         * solib.c (update_solib_list): Adjust.
5427         * ui-out.h (class ui_out) <field_string>: New overload.
5428         * ui-out.c (ui_out::field_string): New overload.
5429
5430 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
5431
5432         * progspace.h (struct program_space): Add constructor and
5433         destructor, initialize fields.
5434         (add_program_space): Remove.
5435         * progspace.c (add_program_space): Rename to...
5436         (program_space::program_space): ... this.
5437         (release_program_space): Rename to...
5438         (program_space::~program_space): ... this.
5439         (delete_program_space): Use delete to delete program_space.
5440         (initialize_progspace): Use new to allocate program_space.
5441         * inferior.c (add_inferior_with_spaces): Likewise.
5442         (clone_inferior_command): Likewise.
5443         * infrun.c (follow_fork_inferior): Likewise.
5444         (handle_vfork_child_exec_or_exit): Likewise.
5445
5446 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
5447
5448         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
5449         (delim_string_to_char_ptr_vec): Return std::vector of
5450         gdb::unique_xmalloc_ptr.
5451         (dirnames_to_char_ptr_vec_append): Take std::vector of
5452         gdb::unique_xmalloc_ptr.
5453         (dirnames_to_char_ptr_vec): Return std::vector of
5454         gdb::unique_xmalloc_ptr.
5455         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
5456         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
5457         (delim_string_to_char_ptr_vec): Return an std::vector of
5458         gdb::unique_xmalloc_ptr, adjust the code.
5459         (dirnames_to_char_ptr_vec_append): Take an std::vector of
5460         gdb::unique_xmalloc_ptr, adjust the code.
5461         (dirnames_to_char_ptr_vec): Return an std::vector of
5462         gdb::unique_xmalloc_ptr, adjust the code.
5463         * auto-load.c (auto_load_safe_path_vec): Change type to
5464         std::vector of gdb::unique_xmalloc_ptr.
5465         (auto_load_expand_dir_vars): Return an std::vector of
5466         gdb::unique_xmalloc_ptr, adjust the code.
5467         (auto_load_safe_path_vec_update): Adjust.
5468         (filename_is_in_auto_load_safe_path_vec): Adjust.
5469         (auto_load_objfile_script_1): Adjust.
5470         * build-id.c (build_id_to_debug_bfd): Adjust.
5471         * linux-thread-db.c (thread_db_load_search): Adjust.
5472         * source.c (add_path): Adjust.
5473         (openp): Adjust.
5474         * symfile.c (find_separate_debug_file): Adjust.
5475         * utils.c (do_free_char_ptr_vec): Remove.
5476         (make_cleanup_free_char_ptr_vec): Remove.
5477
5478 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
5479
5480         PR gdb/22907
5481         * common/pathstuff.c: Conditionally include "<windows.h>".
5482
5483 2018-03-01  Georg Sauthoff  <mail@georg.so>
5484
5485         PR gdb/22888
5486         * gcore.in: Quote variables and switch interpreter to bash.
5487
5488 2018-03-01  Tom Tromey  <tom@tromey.com>
5489
5490         * dwarf2read.c (alloc_discriminant_info): Fix default_index
5491         assertion.  Add assertion for discriminant_index.
5492         (quirk_rust_enum): Use correct base type name in univariant case.
5493
5494 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
5495
5496         * record.c (get_call_history_modifiers): Return a
5497         record_print_flags.
5498         (cmd_record_call_history): Adjust.
5499         * record-btrace.c (record_btrace_call_history): Adjust.
5500         (record_btrace_call_history_range): Adjust.
5501         (record_btrace_call_history_from): Adjust.
5502         * target-debug.h (target_debug_print_record_print_flags): New.
5503         * target-delegates.c: Re-generate.
5504         * target.c (target_call_history): Change flags type.
5505         (target_call_history_from): Likewise.
5506         (target_call_history_range): Likewise.
5507         * target.h (struct target_ops) <target_call_history>: Likewise.
5508         (target_call_history_from): Likewise.
5509         (target_call_history_range): Likewise.
5510
5511 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
5512             Simon Marchi  <simon.marchi@polymtl.ca>
5513
5514         * common/common-utils.c: Include "sys/stat.h".
5515         (is_regular_file): Move here from "source.c"; change return
5516         type to "bool".
5517         * common/common-utils.h (is_regular_file): New prototype.
5518         * common/pathstuff.c (contains_dir_separator): New function.
5519         * common/pathstuff.h (contains_dir_separator): New prototype.
5520         * source.c: Don't include "sys/stat.h".
5521         (is_regular_file): Move to "common/common-utils.c".
5522
5523 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
5524
5525         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
5526         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
5527         * auto-load.c: Include "common/pathstuff.h".
5528         * common/common-def.h (current_directory): Move here.
5529         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
5530         function.
5531         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
5532         prototype.
5533         * common/pathstuff.c: New file.
5534         * common/pathstuff.h: New file.
5535         * compile/compile.c: Include "common/pathstuff.h".
5536         * defs.h (current_directory): Move to "common/common-defs.h".
5537         * dwarf2read.c: Include "common/pathstuff.h".
5538         * exec.c: Likewise.
5539         * guile/scm-safe-call.c: Likewise.
5540         * linux-thread-db.c: Likewise.
5541         * main.c: Likewise.
5542         * nto-tdep.c: Likewise.
5543         * objfiles.c: Likewise.
5544         * source.c: Likewise.
5545         * symtab.c: Likewise.
5546         * utils.c: Include "common/pathstuff.h".
5547         (gdb_realpath): Move to "common/pathstuff.c".
5548         (gdb_realpath_keepfile): Likewise.
5549         (gdb_abspath): Likewise.
5550         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
5551         (gdb_realpath_keepfile): Likewise.
5552         (gdb_abspath): Likewise.
5553
5554 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
5555
5556         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
5557         wildcard process pid for super_resume for kernels with a
5558         specific bug.
5559
5560 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
5561
5562         * compile/compile.c (get_args): Add additional comments
5563         explaining function.
5564
5565 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
5566             Tom Tromey  <tom@tromey.com>
5567
5568         * target.h (memory_write_request_s): Remove typedef.  Don't define
5569         VEC.
5570         (target_write_memory_blocks): Change argument to std::vector.
5571         (struct memory_write_request): Add constructor.
5572         * target-memory.c (compare_block_starting_address): Return bool.
5573         Change argument types.
5574         (claim_memory): Change arguments to use std::vector.
5575         (split_regular_and_flash_blocks, blocks_to_erase)
5576         (compute_garbled_blocks): Likewise.
5577         (cleanup_request_data, cleanup_write_requests_vector): Remove.
5578         (target_write_memory_blocks): Change argument to std::vector.
5579         * symfile.c (struct load_section_data): Add constructor and
5580         destructor.  Use std::vector for "requests".
5581         (struct load_progress_data): Add initializers.
5582         (load_section_callback): Update.  Use "new".
5583         (clear_memory_write_data): Remove.
5584         (generic_load): Update.
5585
5586 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
5587
5588         * arch/aarch64.h: Use common/tdesc.h.
5589
5590 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
5591
5592         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
5593         architecture with a 64-bit ABI.
5594
5595 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
5596
5597         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
5598         ahead of target description loading.
5599
5600 2018-02-26  Tom Tromey  <tom@tromey.com>
5601
5602         * stack.c (backtrace_command_1): Update.
5603         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
5604         of "flags".
5605         * python/py-framefilter.c (py_print_frame)
5606         (gdbpy_apply_frame_filter): Change type of "flags".
5607         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
5608         of "flags".
5609         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
5610         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
5611         * extension.h (enum frame_filter_flag): Rename from
5612         frame_filter_flags.
5613         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
5614         (apply_ext_lang_frame_filter): Change type of "flags".
5615         * extension.c (apply_ext_lang_frame_filter): Change type of
5616         "flags".
5617         * extension-priv.h (struct extension_language_ops)
5618         <apply_frame_filter>: Change type of "flags".
5619
5620 2018-02-26  Tom Tromey  <tom@tromey.com>
5621
5622         PR python/16497:
5623         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
5624         off-by-one in py_end computation.
5625         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
5626         PRINT_MORE_FRAMES.
5627         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
5628         constant.
5629
5630 2018-02-26  Tom Tromey  <tom@tromey.com>
5631
5632         * dwarf2read.c (struct variant_field): New.
5633         (struct nextfield) <variant>: New field.
5634         (dwarf2_add_field): Handle DW_TAG_variant_part.
5635         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
5636         discriminated union.
5637         (read_structure_type): Handle DW_TAG_variant_part.
5638         (handle_struct_member_die): New function, extracted from
5639         process_structure_scope.  Handle DW_TAG_variant.
5640         (process_structure_scope): Handle discriminated unions.  Call
5641         handle_struct_member_die.
5642
5643 2018-02-26  Tom Tromey  <tom@tromey.com>
5644
5645         * rust-lang.h (rust_last_path_segment): Declare.
5646         * rust-lang.c (rust_last_path_segment): Now public.  Change
5647         contract.
5648         (struct disr_info): Remove.
5649         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
5650         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
5651         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
5652         (rust_enum_p, rust_enum_variant): New function.
5653         (rust_underscore_fields): Remove "offset" parameter.
5654         (rust_print_enum): New function.
5655         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
5656         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
5657         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
5658         enums.
5659         (rust_internal_print_type): New function, from rust_print_type.
5660         Remove enum code.
5661         (rust_print_type): Call rust_internal_print_type.
5662         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
5663         Update enum handling.
5664         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
5665         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
5666         (rust_union_quirks): New functions.
5667         (process_full_comp_unit, process_full_type_unit): Call
5668         rust_union_quirks.
5669         (process_structure_scope): Update rust_unions if necessary.
5670
5671 2018-02-26  Tom Tromey  <tom@tromey.com>
5672
5673         * value.h (value_union_variant): Declare.
5674         * valops.c (value_union_variant): New function.
5675         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
5676         (struct discriminant_info): New.
5677         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
5678         enumerator.
5679         (struct main_type) <flag_discriminated_union>: New field.
5680
5681 2018-02-26  Tom Tromey  <tom@tromey.com>
5682
5683         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5684         unittests/unpack-selftests.c.
5685         * unittests/unpack-selftests.c: New file.
5686         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
5687
5688 2018-02-26  Yao Qi  <yao.qi@linaro.org>
5689
5690         * dwarf2read.c (struct partial_die_info) <read>: New method.
5691         (read_partial_die): Remove the declaration.
5692         (load_partial_dies): Update.
5693         (partial_die_info::partial_die_info):
5694         (read_partial_die): Change it to partial_die_info::read.
5695
5696 2018-02-26  Yao Qi  <yao.qi@linaro.org>
5697
5698         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
5699         (fixup_partial_die): Remove declaration.
5700         (scan_partial_symbols): Update.
5701         (partial_die_parent_scope): Likewise.
5702         (partial_die_full_name): Likewise.
5703         (fixup_partial_die): Change it to partial_die_info::fixup.
5704
5705 2018-02-26  Yao Qi  <yao.qi@linaro.org>
5706
5707         * dwarf2read.c (read_partial_die): Update the declaration.
5708         (load_partial_dies): Caller update.
5709         (read_partial_die): Remove one argument abbrev_len.
5710
5711 2018-02-26  Yao Qi  <yao.qi@linaro.org>
5712
5713         * dwarf2read.c (struct partial_die_info): Add ctor, delete
5714         assignment operator.
5715         (load_partial_dies): Use ctor and copy ctor.
5716         (read_partial_die): Update.
5717         (dwarf2_cu::find_partial_die): Use ctor.
5718
5719 2018-02-26  Yao Qi  <yao.qi@linaro.org>
5720
5721         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
5722         (find_partial_die_in_comp_unit): Change it to
5723         dwarf2_cu::find_partial_die.
5724         (find_partial_die): Update.
5725
5726 2018-02-26  Yao Qi  <yao.qi@linaro.org>
5727
5728         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
5729         is NULL.
5730
5731 2018-02-26  Yao Qi  <yao.qi@linaro.org>
5732
5733         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
5734
5735 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
5736
5737         * arch/amd64.h: Use common/tdesc.h.
5738         * arch/i386.c: Likewise.
5739         * arch/i386.h: Likewise.
5740         * arch/tic6x.c: Likewise.
5741         * arch/tdesc.h: Move file from here...
5742         * common/tdesc.h: ...to here.
5743         * features/aarch64-core.c: Regenerate.
5744         * features/aarch64-fpu.c: Regenerate.
5745         * features/i386/32bit-avx.c: Regenerate.
5746         * features/i386/32bit-avx512.c: Regenerate.
5747         * features/i386/32bit-core.c: Regenerate.
5748         * features/i386/32bit-linux.c: Regenerate.
5749         * features/i386/32bit-mpx.c: Regenerate.
5750         * features/i386/32bit-pkeys.c: Regenerate.
5751         * features/i386/32bit-sse.c: Regenerate.
5752         * features/i386/64bit-avx.c: Regenerate.
5753         * features/i386/64bit-avx512.c: Regenerate.
5754         * features/i386/64bit-core.c: Regenerate.
5755         * features/i386/64bit-linux.c: Regenerate.
5756         * features/i386/64bit-mpx.c: Regenerate.
5757         * features/i386/64bit-pkeys.c: Regenerate.
5758         * features/i386/64bit-segments.c: Regenerate.
5759         * features/i386/64bit-sse.c: Regenerate.
5760         * features/i386/x32-core.c: Regenerate.
5761         * features/tic6x-c6xp.c: Regenerate.
5762         * features/tic6x-core.c: Regenerate.
5763         * features/tic6x-gp.c: Regenerate.
5764         * target-descriptions.c: Use common/tdesc.h.
5765         * target-descriptions.h: Likewise.
5766
5767 2018-02-24  Tom Tromey  <tom@tromey.com>
5768
5769         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
5770         (try_thread_db_load_from_dir, thread_db_load_search): Use
5771         std::string.
5772         (info_auto_load_libthread_db_compare): Return bool.  Change
5773         argument types.
5774         (info_auto_load_libthread_db): Use std::vector, std::string.
5775         Remove cleanups.
5776
5777 2018-02-24  Tom Tromey  <tom@tromey.com>
5778
5779         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
5780         std::string.
5781         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
5782         std::string*.
5783         * gdbarch.c: Rebuild.
5784         * gdbarch.h: Rebuild.
5785         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
5786         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
5787         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
5788         std::string*.
5789
5790 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
5791
5792         * gdbtypes.h (sect_offset): Change type to uint64_t.
5793         (sect_offset_str): New function.
5794         * dwarf2read.c (create_addrmap_from_aranges): Use
5795         sect_offset_str.
5796         (error_check_comp_unit_head): Likewise.
5797         (create_debug_type_hash_table): Likewise.
5798         (read_cutu_die_from_dwo): Likewise.
5799         (init_cutu_and_read_dies): Likewise.
5800         (init_cutu_and_read_dies_no_follow): Likewise.
5801         (process_psymtab_comp_unit_reader): Likewise.
5802         (partial_die_parent_scope): Likewise.
5803         (peek_die_abbrev): Likewise.
5804         (process_queue): Likewise.
5805         (dwarf2_physname): Likewise.
5806         (read_namespace_alias): Likewise.
5807         (read_import_statement): Likewise.
5808         (create_dwo_cu_reader): Likewise.
5809         (create_cus_hash_table): Likewise.
5810         (lookup_dwo_cutu): Likewise.
5811         (inherit_abstract_dies): Likewise.
5812         (read_func_scope): Likewise.
5813         (read_call_site_scope): Likewise.
5814         (dwarf2_add_member_fn): Likewise.
5815         (read_common_block): Likewise.
5816         (read_module_type): Likewise.
5817         (read_typedef): Likewise.
5818         (read_subrange_type): Likewise.
5819         (load_partial_dies): Likewise.
5820         (read_partial_die): Likewise.
5821         (find_partial_die): Likewise.
5822         (read_str_index): Likewise.
5823         (dwarf2_string_attr): Likewise.
5824         (build_error_marker_type): Likewise.
5825         (lookup_die_type): Likewise.
5826         (dump_die_shallow): Likewise.
5827         (follow_die_ref): Likewise.
5828         (dwarf2_fetch_die_loc_sect_off): Likewise.
5829         (dwarf2_fetch_constant_bytes): Likewise.
5830         (follow_die_sig): Likewise.
5831         (get_signatured_type): Likewise.
5832         (get_DW_AT_signature_type): Likewise.
5833         (dwarf2_find_containing_comp_unit): Likewise.
5834         (set_die_type): Likewise.
5835
5836 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
5837
5838         * arch/aarch64.c: Include "common-defs.h".
5839         * arch/amd64.c: Likewise.
5840         * arch/i386.c: Likewise.
5841
5842 2018-02-21  Tom Tromey  <tom@tromey.com>
5843
5844         * value.h: (extract_field_op): Update.
5845         * eval.c (extract_field_op): Return a const char *.
5846         * expression.h (parse_expression_for_completion): Update.
5847         * completer.c (complete_expression): Update.
5848         (add_struct_fields): Make fieldname const.
5849         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
5850         (mark_completion_tag, parse_exp_in_context_1): Update.
5851         (parse_expression_for_completion): Change "name" to
5852         unique_xmalloc_ptr*.
5853
5854 2018-02-21  Tom Tromey  <tom@tromey.com>
5855
5856         * infcall.c (call_function_by_hand_dummy): Use std::vector.
5857
5858 2018-02-21  Yao Qi  <yao.qi@linaro.org>
5859
5860         * avr-tdep.c (avr_read_pc): Change parameter type to
5861         readable_regcache.
5862         * gdbarch.sh (read_pc): Likewise.
5863         * gdbarch.c: Re-generated.
5864         * gdbarch.h: Re-generated.
5865         * hppa-tdep.c (hppa_read_pc): Change parameter type to
5866         readable_regcache.
5867         * ia64-tdep.c (ia64_read_pc): Likewise.
5868         * mips-tdep.c (mips_read_pc): Likewise.
5869         * spu-tdep.c (spu_read_pc): Likewise.
5870
5871 2018-02-21  Yao Qi  <yao.qi@linaro.org>
5872
5873         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
5874         * regcache-dump.c: New file.
5875         * regcache.c: Move register_dump to regcache-dump.c.
5876         (maintenance_print_registers): Likewise.
5877         (maintenance_print_raw_registers): Likewise.
5878         (maintenance_print_cooked_registers): Likewise.
5879         (maintenance_print_register_groups): Likewise.
5880         (maintenance_print_remote_registers): Likewise.
5881         (_initialize_regcache): Likewise.
5882         * regcache.h (register_dump): Moved from regcache.c.
5883
5884 2018-02-21  Yao Qi  <yao.qi@linaro.org>
5885
5886         * regcache.c (regcache::regcache): Update.
5887         (regcache::invalidate): Move it to detached_regcache::invalidate.
5888         (get_thread_arch_aspace_regcache): Update.
5889         (regcache::raw_update): Update.
5890         (regcache::cooked_read): Remove some code.
5891         (regcache::cooked_read_value): Likewise.
5892         (regcache::raw_write): Remove assert on m_readonly_p.
5893         (regcache::raw_supply_integer): Move it to
5894         detached_regcache::raw_supply_integer.
5895         (regcache::raw_supply_zeroed): Likewise.
5896         * regcache.h (detached_regcache) <raw_supply_integer>: New
5897         declaration.
5898         <raw_supply_zeroed, invalidate>: Likewise.
5899         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
5900         <invalidate>: Likewise.
5901         <m_readonly_p>: Removed.
5902
5903 2018-02-21  Yao Qi  <yao.qi@linaro.org>
5904
5905         * infcmd.c (get_return_value): Let stop_regs point to
5906         get_current_regcache.
5907         * regcache.c (regcache::regcache): Remove.
5908         (register_dump_reg_buffer): New class.
5909         (regcache_print): Adjust.
5910         * regcache.h (regcache): Remove constructors.
5911
5912 2018-02-21  Yao Qi  <yao.qi@linaro.org>
5913
5914         * regcache.c (class register_dump): New class.
5915         (register_dump_regcache, register_dump_none): New class.
5916         (register_dump_remote, register_dump_groups): New class.
5917         (regcache_print): Update.
5918         * regcache.h (regcache_dump_what): Move it to regcache.c.
5919         (regcache) <dump>: Remove.
5920
5921 2018-02-21  Yao Qi  <yao.qi@linaro.org>
5922
5923         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
5924          reg_buffer_rw *.
5925         (jit_unwind_reg_set_impl): Call raw_supply.
5926         (jit_frame_sniffer): Use reg_buffer_rw.
5927         * record-full.c (record_full_core_regbuf): Change its type.
5928         (record_full_core_open_1): Use reg_buffer_rw.
5929         (record_full_close): Likewise.
5930         (record_full_core_fetch_registers): Use regcache->raw_supply.
5931         (record_full_core_store_registers): Likewise.
5932         * regcache.c (regcache::get_register_status): Move it to
5933         reg_buffer.
5934         (regcache_raw_set_cached_value): Remove.
5935         (regcache::raw_set_cached_value): Remove.
5936         (regcache::raw_write): Call raw_supply.
5937         (regcache::raw_supply): Move it to reg_buffer_rw.
5938         * regcache.h (regcache_raw_set_cached_value): Remove.
5939         (reg_buffer_rw): New class.
5940
5941 2018-02-21  Yao Qi  <yao.qi@linaro.org>
5942
5943         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
5944         readonly_detached_regcache.
5945         (dummy_frame_prev_register): Use regcache->cooked_read.
5946         * frame.c (frame_save_as_regcache): Change return type.
5947         (frame_pop): Update.
5948         * frame.h (frame_save_as_regcache): Update declaration.
5949         * inferior.h (get_infcall_suspend_state_regcache): Update
5950         declaration.
5951         * infrun.c (infcall_suspend_state) <registers>: use
5952         readonly_detached_regcache.
5953         (save_infcall_suspend_state): Don't use regcache_dup.
5954         (get_infcall_suspend_state_regcache): Change return type.
5955         * linux-fork.c (struct fork_info) <savedregs>: Change to
5956         readonly_detached_regcache.
5957         <pc>: New field.
5958         (fork_save_infrun_state): Don't use regcache_dup.
5959         (info_checkpoints_command): Adjust.
5960         * mi/mi-main.c (register_changed_p): Update declaration.
5961         (mi_cmd_data_list_changed_registers): Use
5962         readonly_detached_regcache.
5963         (register_changed_p): Change parameter type to
5964         readonly_detached_regcache.
5965         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
5966         readonly_detached_regcache.
5967         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
5968         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
5969         New.
5970         (regcache::save): Move it to reg_buffer.
5971         (regcache::restore): Change parameter type.
5972         (regcache_dup): Remove.
5973         * regcache.h (reg_buffer) <save>: New method.
5974         (readonly_detached_regcache): New class.
5975         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
5976         readonly_detached_regcache.
5977         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
5978
5979 2018-02-21  Yao Qi  <yao.qi@linaro.org>
5980
5981         * frame.c (frame_save_as_regcache): Use regcache method save.
5982         (frame_pop): Use regcache method restore.
5983         * infrun.c (restore_infcall_suspend_state): Likewise.
5984         * linux-fork.c (fork_load_infrun_state): Likewise.
5985         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
5986         save.
5987         * regcache.c (regcache_save): Remove.
5988         (regcache::restore): More asserts.
5989         (regcache_cpy): Remove.
5990         * regcache.h (regcache_save): Remove the declaration.
5991         (regcache::restore): Move from private to public.
5992         Remove the friend declaration of regcache_cpy.
5993         (regcache_cpy): Remove declaration.
5994
5995 2018-02-21  Yao Qi  <yao.qi@linaro.org>
5996
5997         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
5998         parameter type to 'readable_regcache *'.
5999         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
6000         * arm-tdep.c (arm_neon_quad_read): Likewise.
6001         (arm_pseudo_read): Likewise.
6002         * avr-tdep.c (avr_pseudo_register_read): Likewise.
6003         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
6004         * frv-tdep.c (frv_pseudo_register_read): Likewise.
6005         * gdbarch.c: Re-generated.
6006         * gdbarch.h: Re-generated.
6007         * gdbarch.sh (pseudo_register_read): Change parameter type to
6008         'readable_regcache *'.
6009         (pseudo_register_read_value): Likewise.
6010         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
6011         (h8300_pseudo_register_read): Likewise.
6012         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
6013         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
6014         (i386_pseudo_register_read_into_value): Likewise.
6015         (i386_pseudo_register_read_value): Likewise.
6016         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
6017         declaration.
6018         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
6019         * m32c-tdep.c (m32c_raw_read): Likewise.
6020         (m32c_read_flg): Likewise.
6021         (m32c_banked_register): Likewise.
6022         (m32c_banked_read): Likewise.
6023         (m32c_sb_read): Likewise.
6024         (m32c_part_read): Likewise.
6025         (m32c_cat_read): Likewise.
6026         (m32c_r3r2r1r0_read): Likewise.
6027         (m32c_pseudo_register_read): Likewise.
6028         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
6029         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
6030         (mep_pseudo_cr64_read): Likewise.
6031         (mep_pseudo_register_read): Likewise.
6032         * mips-tdep.c (mips_pseudo_register_read): Likewise.
6033         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
6034         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
6035         * regcache.c (regcache::raw_read): Move it to readable_regcache.
6036         (regcache::cooked_read): Likewise.
6037         (regcache::cooked_read_value): Likewise.
6038         (regcache_cooked_read_signed):
6039         (regcache::cooked_read): Likewise.
6040         * regcache.h (readable_regcache): New class.
6041         (regcache): Inherit readable_regcache.  Move some methods to
6042         readable_regcache.
6043         * rl78-tdep.c (rl78_pseudo_register_read): Change
6044         parameter type to 'readable_regcache *'.
6045         * rs6000-tdep.c (do_regcache_raw_read): Remove.
6046         (e500_pseudo_register_read): Change parameter type to
6047         'readable_regcache *'.
6048         (dfp_pseudo_register_read): Likewise.
6049         (vsx_pseudo_register_read): Likewise.
6050         (efpr_pseudo_register_read): Likewise.
6051         * s390-tdep.c (s390_pseudo_register_read): Likewise.
6052         * sh-tdep.c (sh_pseudo_register_read): Likewise.
6053         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
6054         (sh64_pseudo_register_read): Likewise.
6055         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
6056         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
6057         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
6058         (spu_pseudo_register_read): Likewise.
6059         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
6060         (xtensa_pseudo_register_read): Likewise.
6061
6062 2018-02-21  Yao Qi  <yao.qi@linaro.org>
6063
6064         * regcache.c (regcache::regcache): Call reg_buffer ctor.
6065         (regcache::arch): Move it to reg_buffer::arch.
6066         (regcache::register_buffer): Likewise.
6067         (regcache::assert_regnum): Likewise.
6068         (regcache::num_raw_registers): Likewise.
6069         * regcache.h (reg_buffer): New class.
6070         (regcache): Inherit reg_buffer.
6071
6072 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
6073
6074         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
6075         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
6076
6077 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
6078
6079         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
6080
6081 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
6082
6083         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
6084         (SFILES): Remove common/*.c files.
6085         (COMMON_OBS): Remove some *.o files built from common/*.c files.
6086         * common/common.host: Add common reference.
6087         * configure.ac: Likewise.
6088         * configure: Regenerate.
6089
6090 2018-02-16  Yao Qi  <yao.qi@linaro.org>
6091
6092         * block.c (block_namespace_info): Inherit allocate_on_obstack.
6093         (block_initialize_namespace): Use new.
6094         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
6095         (dwarf2_free_objfile): Use delete.
6096         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
6097         (copy_type_recursive): Use new.
6098         * gdb_obstack.h (allocate_on_obstack): New.
6099
6100 2018-02-15  Yao Qi  <yao.qi@linaro.org>
6101
6102         PR gdb/22849
6103         * inferior.c (exit_inferior_1): Reset inf->control.
6104
6105 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
6106
6107         * ada-lang.c (ada_to_fixed_value_create): Delete advance
6108         declaration.
6109
6110 2018-02-14  Pedro Alves  <palves@redhat.com>
6111
6112         * frame-unwind.c (frame_unwind_try_unwinder): Always call
6113         frame_cleanup_after_sniffer on exception.
6114
6115 2018-02-14  Tom Tromey  <tom@tromey.com>
6116
6117         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
6118         const.
6119         (solib_bfd_open): Make pathname const.
6120         * solib.c (solib_bfd_open): Make pathname const.
6121         * solib-spu.c (spu_bfd_fopen): Make name const.
6122         (spu_bfd_open): Make pathname const.
6123         * solib-darwin.c (darwin_bfd_open): Make pathname const.
6124         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
6125
6126 2018-02-14  Tom Tromey  <tom@tromey.com>
6127
6128         * symfile.c (symfile_bfd_open): Update.
6129         * source.h (openp, source_full_path_of, find_and_open_source):
6130         Change argument type to unique_xmalloc_ptr.
6131         * source.c (openp): Take a unique_xmalloc_ptr.
6132         (source_full_path_of, find_and_open_source): Likewise.
6133         (open_source_file, symtab_to_fullname): Update.
6134         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
6135         unique_xmalloc_ptr.
6136         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
6137         (exec_file_find): Update.
6138         * psymtab.c (psymtab_to_fullname): Update.
6139         * nto-tdep.h (nto_find_and_open_solib): Update.
6140         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
6141         unique_xmalloc_ptr.
6142         * exec.c (exec_file_attach): Update.
6143         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
6144         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
6145
6146 2018-02-14  Tom Tromey  <tom@tromey.com>
6147
6148         * solib.c: Include source.h.
6149         * nto-tdep.c: Include source.h.
6150         * mi/mi-cmd-env.c: Include source.h.
6151         * infcmd.c: Include source.h.
6152         * exec.c: Include source.h.
6153         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
6154         (add_path, directory_switch, source_path, init_source_path): Move
6155         declarations...
6156         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
6157         (add_path, directory_switch, source_path, init_source_path):
6158         ...here.
6159
6160 2018-02-14  Tom Tromey  <tom@tromey.com>
6161
6162         * solist.h (exec_file_find, solib_find): Return
6163         unique_xmalloc_ptr.
6164         (solib_bfd_fopen): Take a const char *.
6165         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
6166         (exec_file_find, solib_find): Likewise.
6167         (solib_bfd_fopen): Do not take ownership of "pathname".
6168         (solib_bfd_open): Use unique_xmalloc_ptr.
6169         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
6170         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
6171         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
6172         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
6173
6174 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
6175
6176         * ada-lang.c (name_match_type_from_name): Remove reference to
6177         ada_name_for_lookup in function's documentation.
6178         * ada-lang.h (ada_name_for_lookup): Delete declaration.
6179
6180 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
6181
6182         * defs.h (enum openp_flags): New enum.
6183         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
6184         Move to enum openp_flags.
6185         (openp_flags): New enum flags.
6186         (openp): Change parameter type to openp_flags.
6187         * source.c (openp): Change parameter type to openp_flags.
6188         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
6189         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
6190
6191 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
6192
6193         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
6194         per-command.
6195
6196 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6197
6198         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
6199         into...
6200         (class dwarf2_queue_guard): ...the destructor of this new class.
6201         (dw2_do_instantiate_symtab): Create instance of the new class
6202         dwarf2_queue_guard, remove cleanup.
6203
6204 2018-02-09  Tom Tromey  <tom@tromey.com>
6205
6206         * source.c (find_source_lines): Don't reference past the end of
6207         the vector.
6208
6209 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
6210
6211         * remote.c (remote_btrace_maybe_reopen): Change error message.
6212         * btrace.c (btrace_enable): Likewise.
6213         (parse_xml_btrace): Likewise.
6214         (parse_xml_btrace_conf): Likewise.
6215
6216 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
6217
6218         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
6219         (linux_enable_pt, linux_enable_bts): Call
6220         diagnose_perf_event_open_fail.
6221
6222 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
6223
6224         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
6225         Remove parameter and change return type.  Update callers.  Move it.
6226         (linux_enable_bts, linux_enable_pt): Improve error message.
6227         (linux_enable_pt): Remove zero buffer size check.
6228         (linux_enable_btrace): Improve error messages.  Remove NULL return
6229         check.
6230
6231 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
6232
6233         * btrace.c (btrace_enable): Remove target_supports_btrace call.
6234         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
6235         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
6236         (linux_supports_pt, linux_supports_btrace): Remove.
6237         (linux_enable_bts): Call cpu_supports_bts.
6238         * nat/linux-btrace.h (linux_supports_btrace): Remove.
6239         * remote.c (remote_supports_btrace): Remove.
6240         (init_remote_ops): Remove remote_supports_btrace.
6241         * target-delegates.c: Regenerated.
6242         * target.c (target_supports_btrace): Remove.
6243         * target.h (target_ops) <to_supports_btrace>: Remove
6244         (target_supports_btrace): Remove.
6245         * x86-linux-nat.c (x86_linux_create_target): Remove
6246         linux_supports_btrace.
6247
6248 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
6249
6250         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
6251         btrace failed.
6252         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
6253         exception and use message in own exception.
6254
6255 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
6256
6257         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
6258         (perf_event_pt_event_type): Use gdb_file_up.
6259         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
6260         scoped_fd, and scoped_mmap.
6261
6262 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
6263
6264         * common/scoped_mmap.h: New.
6265         * unittests/scoped_mmap-selftest.c: New.
6266         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6267         unittests/scoped_mmap-selftest.c.
6268
6269 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
6270
6271         * common/scoped_fd.h: New.
6272         * unittests/scoped_fd-selftest.c: New.
6273         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6274         unittests/scoped_fd-selftest.c.
6275
6276 2018-02-09  Tom Tromey  <tom@tromey.com>
6277
6278         * auto-load.c (auto_load_section_scripts): Use
6279         gdb::unique_xmalloc_ptr.
6280
6281 2018-02-09  Tom Tromey  <tom@tromey.com>
6282
6283         * auto-load.c (execute_script_contents): Use std::string.
6284
6285 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
6286
6287         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
6288         Python function, rather than a new command.
6289
6290 2018-02-08  Tom Tromey  <tom@tromey.com>
6291
6292         * solib.c (solib_find_1): Use std::string.
6293         (solib_bfd_fopen): Use unique_xmalloc_ptr.
6294
6295 2018-02-08  Tom Tromey  <tom@tromey.com>
6296
6297         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
6298
6299 2018-02-08  Tom Tromey  <tom@tromey.com>
6300
6301         * source.c (find_source_lines): Use gdb::def_vector.
6302
6303 2018-02-08  Tom Tromey  <tom@tromey.com>
6304
6305         * macrocmd.c (struct temporary_macro_definition): New.
6306         (macro_define_command): Use temporary_macro_definition.  Remove
6307         cleanups.
6308         (free_macro_definition_ptr): Remove.
6309
6310 2018-02-08  Tom Tromey  <tom@tromey.com>
6311
6312         * macroexp.c (maybe_expand): Use std::string.
6313
6314 2018-02-08  Tom Tromey  <tom@tromey.com>
6315
6316         * macroexp.c (struct macro_buffer): Add initializers for some
6317         members.
6318         (init_buffer, init_shared_buffer, free_buffer)
6319         (free_buffer_return_text): Remove.
6320         (macro_buffer): New constructors.
6321         (~macro_buffer): New destructor.
6322         (macro_buffer::set_shared): New method.
6323         (macro_buffer::resize_buffer, macro_buffer::appendc)
6324         (macro_buffer::appendmem): Now methods, not free functions.
6325         (set_token, append_tokens_without_splicing, stringify)
6326         (macro_stringify): Update.
6327         (gather_arguments): Change return type.  Remove argc_p argument,
6328         add args_ptr argument.  Use std::vector.
6329         (substitute_args): Remove argc argument.  Accept std::vector.
6330         (expand): Update.  Use std::vector.
6331         (scan, macro_expand, macro_expand_next): Update.
6332
6333 2018-02-08  Tom Tromey  <tom@tromey.com>
6334
6335         * symtab.c (default_collect_symbol_completion_matches_break_on):
6336         Use unique_xmalloc_ptr.
6337         * macroscope.h: (sal_macro_scope, user_macro_scope)
6338         (default_macro_scope): Return unique_xmalloc_ptr.
6339         * macroscope.c (sal_macro_scope, user_macro_scope)
6340         (default_macro_scope): Return unique_xmalloc_ptr.
6341         * macroexp.h (macro_expand, macro_expand_once): Return
6342         unique_xmalloc_ptr.
6343         * macroexp.c (macro_expand, macro_expand_once): Return
6344         unique_xmalloc_ptr.
6345         * macrocmd.c (macro_expand_command, macro_expand_once_command)
6346         (info_macro_command, info_macros_command): Use
6347         unique_xmalloc_ptr.
6348         * compile/compile-c-support.c (write_macro_definitions): Use
6349         unique_xmalloc_ptr.
6350         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
6351
6352 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
6353
6354         * value.c (value_static_field): Assign field type instead of
6355         containing type when returning an optimized out value.
6356
6357 2018-02-06  Yao Qi  <yao.qi@linaro.org>
6358
6359         * ft32-tdep.c (ft32_read_pc): Remove.
6360         (ft32_write_pc): Remove.
6361         (ft32_gdbarch_init): Update.
6362         * m32r-tdep.c (m32r_read_pc): Remove.
6363         (m32r_gdbarch_init): Update.
6364         * mep-tdep.c (mep_read_pc): Remove.
6365         (mep_gdbarch_init): Update.
6366         * microblaze-tdep.c (microblaze_write_pc): Remove.
6367         (microblaze_gdbarch_init): Update.
6368         * mn10300-tdep.c (mn10300_read_pc): Remove.
6369         (mn10300_write_pc): Remove.
6370         (mn10300_gdbarch_init): Update.
6371         * moxie-tdep.c (moxie_read_pc): Remove.
6372         (moxie_write_pc): Remove.
6373         (moxie_gdbarch_init): Update.
6374
6375 2018-02-06  Yao Qi  <yao.qi@linaro.org>
6376
6377         * expprint.c (print_subexp_standard): Handle
6378         OP_F77_UNDETERMINED_ARGLIST.
6379         (dump_subexp_body_standard): Likewise.
6380
6381 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
6382
6383         * target-descriptions.c (tdesc_element_visitor) Add empty
6384         implementations.
6385         (tdesc_type): Move make_gdb_type from here.
6386         (tdesc_type_builtin): Likewise.
6387         (tdesc_type_vector): Likewise.
6388         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
6389         (make_gdb_type_struct): Move from tdesc_type_with_fields.
6390         (make_gdb_type_union): Likewise.
6391         (make_gdb_type_flags): Likewise.
6392         (make_gdb_type_enum): Likewise.
6393         (make_gdb_type): New function.
6394         (tdesc_register_type): Use static make_gdb_type.
6395
6396 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
6397
6398         * infcmd.c (default_print_one_register_info): Align natural-format
6399         column values consistently one under another.
6400         (pad_to_column): New function.
6401
6402 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
6403
6404         * dwarf2read.c (dwarf2_physname): Move commment.
6405
6406 2018-02-01  Leszek Swirski  <leszeks@google.com>
6407
6408         * varobj.c (varobj_formatted_print_options): Allow recursive
6409         pretty printing if pretty printing is enabled.
6410
6411 2018-02-01  Leszek Swirski  <leszeks@google.com>
6412
6413         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
6414         names after a structop as a filename.
6415
6416 2018-02-01  Yao Qi  <yao.qi@linaro.org>
6417
6418         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
6419         (arm_record_coproc_data_proc): Likewise.
6420
6421 2018-02-01  Yao Qi  <yao.qi@linaro.org>
6422
6423         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
6424
6425 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
6426
6427         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
6428         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
6429
6430 2018-01-31  Pedro Alves  <palves@redhat.com>
6431
6432         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
6433         * inflow.c (child_terminal_save_inferior): Wrap reference to
6434         tcgetpgrp in HAVE_TERMIOS_H.
6435         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
6436         _WIN32.
6437         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
6438         always iterate over all inferiors.
6439         (gdbsim_cntrl_c): Adjust.
6440         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
6441
6442 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
6443
6444         * gdbtypes.c (lookup_array_range_type): Make sure the array's
6445         index type is objfile-owned if the element type is as well.
6446
6447 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
6448
6449         GDB 8.1 released.
6450
6451 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
6452
6453         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
6454         "features/s390x-linux64.c".
6455         (_initialize_s390_linux_tdep): Remove initialization of tdescs
6456         s390_linux32 and s390x_linux64.
6457         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
6458         default tdesc.
6459         * s390-tdep.c: Include "features/s390-linux32.c" and
6460         "features/s390x-linux64.c".
6461         (s390_tdesc_valid): Add check for tdesc_has_registers.
6462         (s390_gdbarch_init): Make sure there is always a valid tdesc.
6463         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
6464         tdesc_s390x_linux64.
6465         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
6466         tdesc_s390x_linux64 to...
6467         * s390-tdep.h: ...here.
6468
6469 2018-01-30  Pedro Alves  <palves@redhat.com>
6470
6471         PR gdb/13211
6472         * config.in, configure: Regenerate.
6473         * configure.ac: Check for getpgid.
6474         * go32-nat.c (go32_pass_ctrlc): New.
6475         (go32_target): Install it.
6476         * inf-child.c (inf_child_target): Install
6477         child_terminal_save_inferior, child_pass_ctrlc and
6478         child_interrupt.
6479         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
6480         (inf_ptrace_target): No longer install it.
6481         * infcmd.c (interrupt_target_1): Adjust.
6482         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
6483         (child_interrupt): Declare.
6484         (inferior::terminal_state): New.
6485         * inflow.c (struct terminal_info): Update comments.
6486         (inferior_process_group): Delete.
6487         (terminal_is_ours): Delete.
6488         (gdb_tty_state): New.
6489         (child_terminal_init): Adjust.
6490         (is_gdb_terminal, sharing_input_terminal_1)
6491         (sharing_input_terminal): New functions.
6492         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
6493         Set the process's actual process group in the foreground if
6494         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
6495         mark terminal as the inferior's if not sharing GDB's terminal.
6496         Don't check attach_flag.
6497         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
6498         pass down a target_terminal_state.
6499         (child_terminal_save_inferior): New, factored out from ...
6500         (child_terminal_ours_1): ... this.  Handle
6501         target_terminal_state::is_ours_for_output.
6502         (child_interrupt, child_pass_ctrlc): New.
6503         (inflow_inferior_exit): Clear the inferior's terminal_state.
6504         (copy_terminal_info): Copy the inferior's terminal state.
6505         (_initialize_inflow): Remove reference to terminal_is_ours.
6506         * inflow.h (inferior_process_group): Delete.
6507         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
6508         * procfs.c (procfs_target): Don't install procfs_interrupt.
6509         (procfs_interrupt): Delete.
6510         * remote.c (remote_serial_quit_handler): Adjust.
6511         (remote_interrupt): Remove ptid parameter.  Adjust.
6512         * target-delegates.c: Regenerate.
6513         * target.c: Include "terminal.h".
6514         (target_terminal::terminal_state): Rename to ...
6515         (target_terminal::m_terminal_state): ... this.
6516         (target_terminal::init): Adjust.
6517         (target_terminal::inferior): Adjust to per-inferior
6518         terminal_state.
6519         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
6520         (target_terminal::ours, target_terminal::ours_for_output): Use
6521         target_terminal_is_ours_kind.
6522         (target_interrupt): Remove ptid parameter.  Adjust.
6523         (default_target_pass_ctrlc): Adjust.
6524         * target.h (target_ops::to_terminal_save_inferior): New field.
6525         (target_ops::to_interrupt): Remove ptid_t parameter.
6526         (target_interrupt): Remove ptid_t parameter.  Update comment.
6527         (target_pass_ctrlc): Update comment.
6528         * target/target.h (target_terminal_state): New scoped enum,
6529         factored out of ...
6530         (target_terminal::terminal_state): ... here.
6531         (target_terminal::inferior): Update comments.
6532         (target_terminal::restore_inferior): New.
6533         (target_terminal::is_inferior, target_terminal::is_ours)
6534         (target_terminal::is_ours_for_output): Adjust.
6535         (target_terminal::scoped_restore_terminal_state): Adjust to
6536         rename, and call restore_inferior() instead of inferior().
6537         (target_terminal::scoped_restore_terminal_state::m_state): Change
6538         type.
6539         (target_terminal::terminal_state): Rename to ...
6540         (target_terminal::m_terminal_state): ... this and change type.
6541
6542 2018-01-30  Pedro Alves  <palves@redhat.com>
6543
6544         * linux-nat.c (wait_for_signal): New function.
6545         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
6546         directly.
6547         (async_terminal_is_ours)
6548         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
6549         (linux_nat_add_target): Don't override
6550         to_terminal_inferior/to_terminal_ours.
6551
6552 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
6553
6554         * remote.c (remote_follow_fork): Don't call "detach_inferior".
6555
6556 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
6557
6558         * dwarf2read.c (free_dwo_files): Add forward-declaration.
6559         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
6560         dwarf2_per_objfile_free here.
6561         (dwarf2_per_objfile_free): Remove.
6562         (_initialize_dwarf2_read): Don't register
6563         dwarf2_per_objfile_free as a registry cleanup.
6564
6565 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
6566
6567         Avoid compilation errors in MinGW native builds
6568
6569         The error is triggered by including python-internal.h, and the
6570         error message is:
6571
6572              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
6573                       from build-gnulib/import/math.h:27,
6574                       from d:/usr/Python26/include/pyport.h:235,
6575                       from d:/usr/Python26/include/Python.h:58,
6576                       from python/python-internal.h:94,
6577                       from python/py-arch.c:24:
6578              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
6579         using ::hypot;
6580                 ^~~~~
6581
6582         This happens because Python headers define 'hypot' to expand t
6583         '_hypot' in the Windows builds.
6584         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
6585         'hypoth'.  This avoids a compilation error.
6586
6587 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
6588
6589         * MAINTAINERS (Write After Approval): Fix ordering.
6590
6591 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
6592
6593         * MAINTAINERS (Write After Approval): Add Alan Hayward.
6594
6595 2018-01-26  Alan Modra  <amodra@gmail.com>
6596
6597         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
6598         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
6599         Remove nop.  Make const.  Comment.
6600         (powerpc32_plt_stub_so_2): New.
6601         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
6602         Correct count.  Update uses.
6603         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
6604         Move common code reading PLT entry word.  Correct
6605         powerpc32_plt_stub PLT address calculation.
6606         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
6607         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
6608         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
6609         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
6610         (ppc64_standard_linkage8): Likewise.
6611         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
6612         Correct insns description.
6613         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
6614
6615 2018-01-24  Pedro Alves  <palves@redhat.com>
6616
6617         GCC PR libstdc++/83906
6618         * gdbtypes.c (operator==(const dynamic_prop &,
6619         const dynamic_prop &)): New.
6620         (operator==(const range_bounds &, const range_bounds &)): New.
6621         (check_types_equal): Use them instead of memcmp.
6622         * gdbtypes.h (operator==(const dynamic_prop &,
6623         const dynamic_prop &)): Declare.
6624         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
6625         (operator==(const range_bounds &, const range_bounds &)): Declare.
6626         (operator!=(const range_bounds &, const range_bounds &)): Declare.
6627
6628 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
6629
6630         * s390-linux-tdep.c (s390_record_address_mask)
6631         (s390_record_calc_disp_common, s390_record_calc_disp)
6632         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
6633         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
6634         (s390_process_record): Move to s390-tdep.c.
6635         (s390_linux_init_abi_any): Adjust.
6636         * s390-tdep.c (s390_record_address_mask)
6637         (s390_record_calc_disp_common, s390_record_calc_disp)
6638         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
6639         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
6640         (s390_process_record): Moved from s390-linux-tdep.c
6641         (s390_gdbarch_init): Adjust.
6642
6643 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
6644
6645         * s390-linux-nat.c (s390-tdep.h): New include.
6646         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
6647         (HFILES_NO_SRCDIR): Add s390-tdep.h.
6648         (ALLDEPFILES): Add s390-tdep.c.
6649         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
6650         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
6651         * s390-tdep.h: ...this.  New file.
6652         * s390-linux-tdep.c (s390-tdep.h): New include.
6653         (_initialize_s390_tdep): Rename to...
6654         (_initialize_s390_linux_tdep): ...this and adjust.
6655         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
6656         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
6657         s390-tdep.h.
6658         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
6659         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
6660         (s390_is_partial_instruction, s390_software_single_step)
6661         (is_non_branch_ril, s390_displaced_step_copy_insn)
6662         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
6663         (s390_prologue_data, s390_addr, s390_store, s390_load)
6664         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
6665         (s390_register_call_saved, s390_guess_tracepoint_registers)
6666         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
6667         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
6668         (s390_pseudo_register_name, s390_pseudo_register_type)
6669         (s390_pseudo_register_read, s390_pseudo_register_write)
6670         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
6671         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
6672         (s390_addr_bits_remove, s390_address_class_type_flags)
6673         (s390_address_class_type_flags_to_name)
6674         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
6675         (s390_function_arg_float, s390_function_arg_vector)
6676         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
6677         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
6678         (s390_frame_align, s390_register_return_value, s390_return_value)
6679         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
6680         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
6681         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
6682         (s390_trad_frame_prev_register, s390_unwind_cache)
6683         (s390_prologue_frame_unwind_cache)
6684         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
6685         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
6686         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
6687         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
6688         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
6689         (s390_frame_base_address, s390_local_base_address)
6690         (s390_frame_base, s390_gcc_target_options)
6691         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
6692         (s390_validate_reg_range, s390_tdesc_valid)
6693         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
6694         * s390-tdep.c: ...this.  New file.
6695
6696 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
6697
6698         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
6699         (s390_process_record, s390_gdbarch_tdep_alloc)
6700         (s390_linux_init_abi_any): Use/set new hook.
6701
6702 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
6703
6704         * s390-linux-tdep.c (osabi.h): New include.
6705         (s390_linux_init_abi_31, s390_linux_init_abi_64)
6706         (s390_linux_init_abi_any): New functions.
6707         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
6708
6709 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
6710
6711         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
6712         tdesc_has_registers check
6713
6714 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
6715
6716         * s390-linux-tdep.c (s390_tdesc_valid): New function.
6717         (s390_validate_reg_range): New macro.
6718         (s390_gdbarch_init): Adjust.
6719
6720 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
6721
6722         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
6723         (s390_gdbarch_tdep_alloc): Adjust.
6724         (s390_gdbarch_init): Adjust.
6725
6726 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
6727
6728         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
6729         <have_tdb>: Change type to bool.
6730         (s390_gdbarch_tdep_alloc): Adjust.
6731         (s390_gdbarch_init): Adjust.
6732
6733 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
6734
6735         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
6736         (gdbarch_tdep) <have_upper, have_vx>: New fields.
6737         (s390_gdbarch_tdep_alloc): New function.
6738         (s390_gdbarch_init): Allocate tdep at start and use its fields
6739         instead of separate variables.
6740
6741 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
6742
6743         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
6744         when looking for cached gdbarch and add comment for remaining.
6745
6746 2018-01-22  Pedro Alves  <palves@redhat.com>
6747             Sergio Durigan Junior  <sergiodj@redhat.com>
6748
6749         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
6750         case.
6751
6752 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
6753
6754         * MAINTAINERS: Update my company e-mail address.
6755
6756 2018-01-22  Yao Qi  <yao.qi@linaro.org>
6757
6758         * regcache.c (cooked_write_test): New function.
6759         (_initialize_regcache): Register the test.
6760
6761 2018-01-22  Yao Qi  <yao.qi@linaro.org>
6762
6763         * ia64-tdep.c (ia64_pseudo_register_read): Call
6764         regcache->cooked_read instead of regcache_cooked_read_unsigned.
6765         * m32c-tdep.c (m32c_cat_read): Likewise.
6766         (m32c_r3r2r1r0_read): Likewise.
6767         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
6768         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
6769
6770 2018-01-22  Yao Qi  <yao.qi@linaro.org>
6771
6772         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
6773         method raw_read instead of regcache_raw_read.
6774         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
6775         * arm-tdep.c (arm_neon_quad_read): Likewise.
6776         * avr-tdep.c (avr_pseudo_register_read): Likewise.
6777         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
6778         * frv-tdep.c (frv_pseudo_register_read): Likewise.
6779         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
6780         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
6781         (i386_pseudo_register_read_into_value): Likewise.
6782         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
6783         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
6784         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
6785         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
6786         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
6787         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
6788         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
6789         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
6790         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
6791
6792 2018-01-22  Yao Qi  <yao.qi@linaro.org>
6793
6794         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
6795         * configure.tgt: Remove target mt.
6796         * mt-tdep.c: Remove.
6797         * regcache.c (cooked_read_test): Remove the check for mt.
6798
6799 2018-01-22  Yao Qi  <yao.qi@linaro.org>
6800
6801         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
6802         instead of gdbarch_pseudo_register_read_value.
6803
6804 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
6805
6806         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
6807         language is Ada.
6808
6809 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
6810
6811         * linespec.c (create_sals_line_offset): Remove code that preserved
6812         the symtab_and_line's line number.
6813
6814 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
6815
6816         * varobj.c (varobj_create): Don't set valid_block when creating a
6817         floating varobj.
6818
6819 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
6820
6821         * varobj.c (varobj_create): Remove out of date comment.
6822
6823 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
6824
6825         PR mi/20395
6826         * ada-exp.y (write_var_from_sym): Pass extra parameter when
6827         updating innermost block.
6828         * parse.c (innermost_block_tracker::update): Take extra type
6829         parameter, and check types match before updating innermost block.
6830         (write_dollar_variable): Update innermost block for registers.
6831         * parser-defs.h (enum innermost_block_tracker_type): New enum.
6832         (innermost_block_tracker::innermost_block_tracker): Initialise
6833         m_types member.
6834         (innermost_block_tracker::reset): Take type parameter.
6835         (innermost_block_tracker::update): Take type parameter, and pass
6836         type through as needed.
6837         (innermost_block_tracker::m_types): New member.
6838         * varobj.c (varobj_create): Pass type when reseting innermost
6839         block.
6840
6841 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
6842
6843         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
6844         * ada-lang.c (resolve_subexp): Likewise.
6845         * breakpoint.c (set_breakpoint_condition) Likewise.
6846         (watch_command_1) Likewise.
6847         * c-exp.y (variable): Likewise.
6848         * d-exp.y (PrimaryExpression): Likewise.
6849         * f-exp.y (variable): Likewise.
6850         * go-exp.y (variable): Likewise.
6851         * m2-exp.y (variable): Likewise.
6852         * objfiles.c (objfile::~objfile): Likewise.
6853         * p-exp.y (variable): Likewise.
6854         * parse.c (innermost_block): Change type.
6855         * parser-defs.h (class innermost_block_tracker): New.
6856         (innermost_block): Change to innermost_block_tracker.
6857         * printcmd.c (display_command): Switch to innermost_block API.
6858         (do_one_display): Likewise.
6859         * rust-exp.y (do_one_display): Likewise.
6860         * symfile.c (clear_symtab_users): Likewise.
6861         * varobj.c (varobj_create): Switch to innermost_block API, replace
6862         use of innermost_block with block stored on varobj object.
6863
6864 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
6865
6866         * expression.h (innermost_block): Remove declaration.
6867         * varobj.c: Add 'parser-defs.h' include.
6868
6869 2018-01-19  Tom Tromey  <tom@tromey.com>
6870
6871         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
6872         symbols in the static and global blocks.
6873
6874 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
6875
6876         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
6877         gdb_ptrace.h, and move including gdb_wait.h ...
6878         * nat/linux-ptrace.h: ... to here.
6879
6880 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
6881
6882         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
6883         inf_ptrace_detach_success.
6884         (inf_ptrace_detach_success): Add inferior parameter, use it
6885         instead of inferior_ptid, pass it to detach_inferior.
6886         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
6887         parameter.
6888         * inferior.c (detach_inferior): Add overload that takes an
6889         inferior object.
6890         * inferior.h (detach_inferior): Likewise.
6891         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
6892         use inferior_ptid, adjust call to inf_ptrace_detach_success.
6893         * linux-thread-db.c (thread_db_detach): Use inf parameter.
6894
6895 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
6896
6897         * target.h (struct target_ops) <to_detach>: Add inferior
6898         parameter.
6899         (target_detach): Likewise.
6900         * target.c (dispose_inferior): Pass inferior down.
6901         (target_detach): Pass inferior down.  Assert that it is equal to
6902         the current inferior.
6903         * aix-thread.c (aix_thread_detach): Pass inferior down.
6904         * corefile.c (core_file_command): Pass current_inferior() down.
6905         * corelow.c (core_detach): Add inferior parameter.
6906         * darwin-nat.c (darwin_detach): Likewise.
6907         * gnu-nat.c (gnu_detach): Likewise.
6908         * inf-ptrace.c (inf_ptrace_detach): Likewise.
6909         * infcmd.c (detach_command): Pass current_inferior() down to
6910         target_detach.
6911         * infrun.c (follow_fork_inferior): Pass parent_inf to
6912         target_detach.
6913         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
6914         target_detach.
6915         * linux-nat.c (linux_nat_detach): Add inferior parameter.
6916         * linux-thread-db.c (thread_db_detach): Likewise.
6917         * nto-procfs.c (procfs_detach): Likewise.
6918         * procfs.c (procfs_detach): Likewise.
6919         * record.c (record_detach): Likewise.
6920         * record.h (struct inferior): Forward-declare.
6921         (record_detach): Add inferior parameter.
6922         * remote-sim.c (gdbsim_detach): Likewise.
6923         * remote.c (remote_detach_1): Likewise.
6924         (remote_detach): Likewise.
6925         (extended_remote_detach): Likewise.
6926         * sol-thread.c (sol_thread_detach): Likewise.
6927         * target-debug.h (target_debug_print_inferior_p): New macro.
6928         * target-delegates.c: Re-generate.
6929         * top.c (kill_or_detach): Pass inferior down to target_detach.
6930         * windows-nat.c (windows_detach): Add inferior parameter.
6931
6932 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
6933
6934         * target.h (struct target_ops) <to_detach>: Remove args
6935         parameter.
6936         (target_detach): Likewise.
6937         * target.c (dispose_inferior): Adjust.
6938         (target_detach): Remove args parameter, adjust.
6939         * aix-thread.c (aix_thread_detach): Adjust.
6940         * corefile.c (core_file_command): Adjust.
6941         * corelow.c (core_detach): Adjust.
6942         * darwin-nat.c (darwin_detach): Adjust.
6943         * gnu-nat.c (gnu_detach): Adjust.
6944         * inf-ptrace.c (inf_ptrace_detach): Adjust.
6945         * infcmd.c (detach_command): Adjust
6946         * infrun.c (follow_fork_inferior): Adjust.
6947         (handle_vfork_child_exec_or_exit): Adjust.
6948         * linux-fork.c (linux_fork_detach): Remove args parameter.
6949         * linux-fork.h (linux_fork_detach): Likewise.
6950         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
6951         * linux-thread-db.c (thread_db_detach): Likewise.
6952         * nto-procfs.c (procfs_detach): Likewise.
6953         * procfs.c (procfs_detach): Likewise.
6954         (do_detach): Remove signo parameter.
6955         * record.c (record_detach): Remove args parameter.
6956         * record.h (record_detach): Likewise.
6957         * remote-sim.c (gdbsim_detach): Likewise.
6958         * remote.c (remote_detach_1): Likewise.
6959         (remote_detach): Likewise.
6960         (extended_remote_detach): Likewise.
6961         * sol-thread.c (sol_thread_detach): Likewise.
6962         * target-delegates.c: Re-generate.
6963         * top.c (struct qt_args) <args>: Remove field.
6964         (kill_or_detach): Don't pass args.
6965         (quit_force): Don't set args.
6966         * windows-nat.c (windows_detach): Remove args parameter.
6967
6968 2018-01-19  Yao Qi  <yao.qi@linaro.org>
6969
6970         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
6971         (arm_linux_init_abi): Install it.
6972
6973 2018-01-19  Yao Qi  <yao.qi@linaro.org>
6974
6975         * osabi.c (gdb_osabi_names): Extend the regexp for
6976         arm-linux-gnueabihf.
6977
6978 2018-01-18  Yao Qi  <yao.qi@linaro.org>
6979
6980         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
6981         m_abbrevs.
6982         (abbrev_table::add_abbrev): Update.
6983         (abbrev_table::lookup_abbrev): Update.
6984
6985 2018-01-18  Yao Qi  <yao.qi@linaro.org>
6986
6987         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
6988
6989 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
6990
6991         * compile/compile.c (compile_to_object): Convert "triplet_rx"
6992         to "std::string".
6993
6994 2018-01-17  Tom Tromey  <tom@tromey.com>
6995
6996         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
6997
6998 2018-01-17  Tom Tromey  <tom@tromey.com>
6999
7000         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
7001         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
7002         (create_array_type_with_stride): Update.
7003         * dwarf2read.c (set_die_type): Update.
7004
7005 2018-01-17  Tom Tromey  <tom@tromey.com>
7006
7007         * dwarf2read.c (delayed_method_info): Remove typedef.
7008         (dwarf2_cu::method_info): Now a std::vector.
7009         (add_to_method_list): Update.
7010         (free_delayed_list): Remove.
7011         (compute_delayed_physnames): Update.
7012         (process_full_comp_unit, process_full_type_unit): Clear the method
7013         list.  Remove cleanups.
7014         (psymtab_include_file_name): Add name_holder parameter.  Use
7015         unique_xmalloc_ptr.
7016         (dwarf_decode_lines): Update.
7017
7018 2018-01-17  Tom Tromey  <tom@tromey.com>
7019             Simon Marchi  <simon.marchi@ericsson.com>
7020
7021         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
7022         (dwarf2_per_objfile::free_cached_comp_units)
7023         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
7024         (init_cutu_and_read_dies_no_follow): Update.
7025         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
7026         (dwarf2_cu::~dwarf2_cu): New.
7027         (free_heap_comp_unit, free_stack_comp_unit): Remove.
7028         (age_cached_comp_units, free_one_cached_comp_unit): Update.
7029
7030 2018-01-17  Tom Tromey  <tom@tromey.com>
7031             Simon Marchi  <simon.marchi@ericsson.com>
7032
7033         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
7034         (struct die_reader_specs) <abbrev_table>: New member.
7035         (struct abbrev_table): Add constructor.
7036         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
7037         <abbrev_obstack>: Now an auto_obstack.
7038         (abbrev_table_up): New typedef.
7039         (init_cu_die_reader): Add abbrev_table parameter.
7040         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
7041         Add result_dwo_abbrev_table.
7042         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
7043         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
7044         Update.
7045         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
7046         parameter.
7047         (skip_children): Update.
7048         (abbrev_table::alloc_abbrev): Rename from
7049         abbrev_table_alloc_abbrev.
7050         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
7051         (abbrev_table::lookup_abbrev): Rename from
7052         abbrev_table_lookup_abbrev.
7053         (abbrev_table_read_table): Return abbrev_table_up.
7054         (abbrev_table_free, abbrev_table_free_cleanup)
7055         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
7056         (load_partial_dies): Update.
7057
7058 2018-01-17  Tom Tromey  <tom@tromey.com>
7059
7060         * dwarf2read.c (dwarf2_compute_name): Update comment.
7061         (read_func_scope, read_variable): Update.
7062         (new_symbol): Remove.
7063         (new_symbol_full): Rename to new_symbol.
7064
7065 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
7066
7067         PR gdb/16577
7068         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
7069         a warning instead of throwing an error, set section size to 0 and return
7070         NULL.
7071         * gdb_bfd.h (gdb_bfd_map_section): Update description.
7072
7073 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
7074
7075         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
7076         std::string.
7077         (linux_ptrace_attach_fail_reason_string): Likewise.
7078         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
7079         Likewise.
7080         (linux_ptrace_attach_fail_reason_string): Likewise.
7081         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
7082
7083 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
7084
7085         * linux-nat.c (linux_nat_attach): Remove xstrdup.
7086
7087 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
7088
7089         PR gdb/21559
7090         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
7091         checking for fs_base/gs_base fields in struct user_regs_struct.
7092         * configure: Regenerate.
7093
7094 2018-01-17  Yao Qi  <yao.qi@linaro.org>
7095
7096         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
7097         function.
7098         (aarch64_linux_init_abi): Install it to gdbarch hook
7099         gcc_target_options.
7100
7101 2018-01-15  Pedro Alves  <palves@redhat.com>
7102
7103         * common/signals-state-save-restore.c
7104         (save_original_signals_state): Fix typos.
7105
7106 2017-01-12  Tom Tromey  <tom@tromey.com>
7107             Sergio Durigan Junior  <sergiodj@redhat.com>
7108
7109         * Makefile.in (install-only): Install gdb-add-index.
7110
7111 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
7112
7113         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
7114
7115 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7116
7117         * infrun.c (keep_going_pass_signal): Clear step-over info when
7118         insert_breakpoints fails.
7119
7120 2018-01-11  Pedro Alves  <palves@redhat.com>
7121
7122         PR gdb/22583
7123         * infrun.c (resume): Rename to ...
7124         (resume_1): ... this.
7125         (resume): Reimplement as wrapper around resume_1.
7126
7127 2018-01-11  Pedro Alves  <palves@redhat.com>
7128
7129         PR remote/22597
7130         * remote.c (remote_parse_stop_reply): Default to the last-set
7131         general thread instead of to 'magic_null_ptid'.
7132
7133 2018-01-10  Pedro Alves  <palves@redhat.com>
7134
7135         * language.h (language_get_symbol_name_matcher): Rename ...
7136         (get_symbol_name_matcher): ... this.
7137         * language.c (language_get_symbol_name_matcher): Ditto.
7138         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
7139         callers adjusted.
7140
7141 2018-01-10  Pedro Alves  <palves@redhat.com>
7142
7143         PR gdb/22670
7144         * dwarf2read.c
7145         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
7146         Adjust to use language_get_symbol_name_matcher instead of
7147         language_defn::la_get_symbol_name_matcher.
7148         * language.c (language_get_symbol_name_matcher): If in Ada mode
7149         and the lookup name is a verbatim match, return Ada's matcher.
7150         * language.h (language_get_symbol_name_matcher): Adjust comment.
7151         (ada_lookup_name_info::verbatim_p):: New method.
7152
7153 2018-01-10  Pedro Alves  <palves@redhat.com>
7154
7155         PR gdb/22670
7156         * ada-lang.c (ada_collect_symbol_completion_matches): If the
7157         minsym's language is language_auto or language_cplus, pass down
7158         language_ada instead.
7159         * symtab.c (compare_symbol_name): Don't frob symbol language here.
7160
7161 2018-01-10  Pedro Alves  <palves@redhat.com>
7162
7163         PR gdb/22670
7164         * minsyms.c (linkage_name_str): New function.
7165         (iterate_over_minimal_symbols): Use it.
7166
7167 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
7168
7169         * NEWS: Document that 'info proc' now works on FreeBSD.
7170
7171 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
7172
7173         * configure.ac: Check for kinfo_getfile in libutil.
7174         * configure: Regenerate.
7175         * config.in: Regenerate.
7176         * fbsd-nat.c: Include "fbsd-tdep.h".
7177         (fbsd_fetch_cmdline): New.
7178         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
7179         rather than calling error.
7180         (fbsd_info_proc): New.
7181         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
7182         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
7183         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
7184
7185 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
7186
7187         * fbsd-nat.c (struct free_deleter): Remove.
7188         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
7189
7190 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
7191
7192         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
7193         NULL for an empty pathname.
7194
7195 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
7196
7197         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
7198         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
7199         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
7200         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
7201         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
7202         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
7203         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
7204         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
7205         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
7206         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
7207         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
7208         (fbsd_core_fetch_timeval, fbsd_print_sigset)
7209         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
7210         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
7211         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
7212
7213 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
7214
7215         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
7216         (gnu_xfer_auxv): New function.
7217         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
7218         TARGET_OBJECT_AUXV.
7219
7220 2018-01-08  Yao Qi  <yao.qi@linaro.org>
7221             Simon Marchi  <simon.marchi@ericsson.com>
7222
7223         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
7224         common/selftest.c.
7225         (COMMON_OBS): Remove selftest.o.
7226         * configure.ac: Append selftest-arch.c and common/selftest.c to
7227         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
7228         * configure: Re-generated.
7229         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
7230         GDB_SELF_TEST.
7231         (maintenance_info_selftests): Likewise.
7232
7233 2018-01-08  Xavier Roirand  <roirand@adacore.com>
7234
7235         * ada-valprint.c (val_print_packed_array_elements): Use
7236         proper number of elements when printing an array indexed
7237         by an enumeration type.
7238
7239 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
7240
7241         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
7242         (dw2_get_file_names_reader): Adjust.
7243         (lookup_dwo_signatured_type): Adjust.
7244         (lookup_dwp_signatured_type): Adjust.
7245         (lookup_signatured_type): Adjust.
7246         (create_type_unit_group): Adjust.
7247         (get_type_unit_group): Adjust.
7248         (process_psymtab_comp_unit_reader): Adjust.
7249         (build_type_psymtabs_reader): Adjust.
7250         (scan_partial_symbols): Adjust.
7251         (add_partial_symbol): Adjust.
7252         (add_partial_subprogram): Adjust.
7253         (peek_die_abbrev): Adjust.
7254         (fixup_go_packaging): Adjust.
7255         (process_imported_unit_die): Adjust.
7256         (dwarf2_compute_name): Adjust.
7257         (dwarf2_physname): Adjust.
7258         (read_import_statement): Adjust.
7259         (handle_DW_AT_stmt_list): Adjust.
7260         (read_file_scope): Adjust.
7261         (read_func_scope): Adjust.
7262         (read_lexical_block_scope): Adjust.
7263         (read_call_site_scope): Adjust.
7264         (read_variable): Adjust.
7265         (dwarf2_rnglists_process): Adjust.
7266         (dwarf2_ranges_process): Adjust.
7267         (dwarf2_ranges_read): Adjust.
7268         (dwarf2_get_pc_bounds): Adjust.
7269         (dwarf2_record_block_ranges): Adjust.
7270         (dwarf2_add_field): Adjust.
7271         (dwarf2_add_member_fn): Adjust.
7272         (read_structure_type): Adjust.
7273         (process_structure_scope): Adjust.
7274         (read_enumeration_type): Adjust.
7275         (read_array_type): Adjust.
7276         (mark_common_block_symbol_computed): Adjust.
7277         (read_common_block): Adjust.
7278         (read_namespace_type): Adjust.
7279         (read_namespace): Adjust.
7280         (read_module_type): Adjust.
7281         (read_tag_pointer_type): Adjust.
7282         (read_tag_ptr_to_member_type): Adjust.
7283         (read_tag_string_type): Adjust.
7284         (read_subroutine_type): Adjust.
7285         (read_typedef): Adjust.
7286         (read_base_type): Adjust.
7287         (attr_to_dynamic_prop): Adjust.
7288         (read_subrange_type): Adjust.
7289         (read_unspecified_type): Adjust.
7290         (dwarf2_read_abbrevs): Adjust.
7291         (load_partial_dies): Adjust.
7292         (read_partial_die): Adjust.
7293         (find_partial_die): Adjust.
7294         (guess_partial_die_structure_name): Adjust.
7295         (fixup_partial_die): Adjust.
7296         (read_attribute_value): Adjust.
7297         (read_addr_index): Adjust.
7298         (read_addr_index_from_leb128): Adjust.
7299         (read_str_index): Adjust.
7300         (dwarf2_string_attr): Adjust.
7301         (get_debug_line_section): Adjust.
7302         (dwarf_decode_line_header): Adjust.
7303         (lnp_state_machine::check_line_address): Adjust.
7304         (dwarf_decode_lines_1): Adjust.
7305         (dwarf_decode_lines): Adjust.
7306         (dwarf2_start_symtab): Adjust.
7307         (var_decode_location): Adjust.
7308         (new_symbol_full): Adjust.
7309         (dwarf2_const_value_data): Adjust.
7310         (dwarf2_const_value_attr): Adjust.
7311         (dwarf2_const_value): Adjust.
7312         (die_type): Adjust.
7313         (die_containing_type): Adjust.
7314         (build_error_marker_type): Adjust.
7315         (lookup_die_type): Adjust.
7316         (guess_full_die_structure_name): Adjust.
7317         (anonymous_struct_prefix): Adjust.
7318         (determine_prefix): Adjust.
7319         (dwarf2_name): Adjust.
7320         (follow_die_ref_or_sig): Adjust.
7321         (follow_die_offset): Adjust.
7322         (follow_die_ref): Adjust.
7323         (follow_die_sig_1): Adjust.
7324         (follow_die_sig): Adjust.
7325         (get_signatured_type): Adjust.
7326         (get_DW_AT_signature_type): Adjust.
7327         (decode_locdesc): Adjust.
7328         (dwarf_decode_macros): Adjust.
7329         (cu_debug_loc_section): Adjust.
7330         (fill_in_loclist_baton): Adjust.
7331         (dwarf2_symbol_mark_computed): Adjust.
7332         (init_one_comp_unit): Don't assign
7333         dwarf2_cu::dwarf2_per_objfile.
7334         (set_die_type): Adjust.
7335
7336 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
7337
7338         * dwarf2read.c (struct mapped_debug_names): Add constructor.
7339         <dwarf2_per_objfile>: New field.
7340         (dwarf2_per_objfile): Remove global.
7341         (get_dwarf2_per_objfile): New function.
7342         (set_dwarf2_per_objfile): New function.
7343         (dwarf2_build_psymtabs_hard): Change objfile parameter to
7344         dwarf2_per_objfile.
7345         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
7346         (read_abbrev_offset): Likewise.
7347         (read_indirect_string): Likewise.
7348         (read_indirect_line_string): Likewise.
7349         (read_indirect_string_at_offset): Likewise.
7350         (read_indirect_string_from_dwz): Likewise.
7351         (dwarf2_find_containing_comp_unit): Change objfile parameter to
7352         dwarf2_per_objfile.
7353         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
7354         (create_all_comp_units): Change objfile parameter to
7355         dwarf2_per_objfile.
7356         (create_all_type_units): Likewise.
7357         (process_queue): Add dwarf2_per_objfile parameter.
7358         (read_and_check_comp_unit_head): Likewise.
7359         (lookup_dwo_unit_in_dwp): Likewise.
7360         (get_dwp_file): Likewise.
7361         (process_cu_includes): Likewise.
7362         (struct free_dwo_file_cleanup_data): New struct.
7363         (dwarf2_has_info): Use get_dwarf2_per_objfile and
7364         set_dwarf2_per_objfile.
7365         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
7366         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
7367         context, adjust calls.
7368         (dw2_instantiate_symtab): Likewise.
7369         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
7370         (dw2_get_cu): Likewise.
7371         (create_cu_from_index_list): Change objfile parameter to
7372         dwarf2_per_objfile.
7373         (create_cus_from_index_list): Get dwarf2_per_objfile from
7374         context, adjust calls.
7375         (create_cus_from_index): Likewise.
7376         (create_signatured_type_table_from_index): Change objfile
7377         parameter to dwarf2_per_objfile.
7378         (create_signatured_type_table_from_debug_names): Change objfile
7379         parameter to dwarf2_per_objfile.
7380         (create_addrmap_from_index): Likewise.
7381         (create_addrmap_from_aranges): Likewise.
7382         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
7383         (dw2_setup): Remove.
7384         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
7385         context.
7386         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
7387         get_dwarf2_per_objfile.
7388         (dw2_forget_cached_source_info): Likewise.
7389         (dw2_map_symtabs_matching_filename): Likewise.
7390         (struct dw2_symtab_iterator) <index>: Remove.
7391         <dwarf2_per_objfile>: New field.
7392         (dw2_symtab_iter_init): Replace index parameter with
7393         dwarf2_per_objfile.
7394         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
7395         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
7396         (dw2_print_stats): Likewise.
7397         (dw2_dump): Likewise.
7398         (dw2_expand_symtabs_for_function): Likewise.
7399         (dw2_expand_all_symtabs): Likewise.
7400         (dw2_expand_symtabs_with_fullname): Likewise.
7401         (dw2_expand_marked_cus): Replace index and objfile parameters
7402         with dwarf2_per_objfile.
7403         (dw_expand_symtabs_matching_file_matcher): Add
7404         dwarf2_per_objfile parameter and adjust calls.
7405         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
7406         adjust calls.
7407         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
7408         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
7409         adjust calls.
7410         (create_cus_from_debug_names_list): Replace objfile parameter
7411         with dwarf2_per_objfile and adjust calls.
7412         (create_cus_from_debug_names): Likewise.
7413         (dwarf2_read_debug_names): Likewise.
7414         (mapped_debug_names::namei_to_name): Adjust call.
7415         (dw2_debug_names_iterator::next): Likewise.
7416         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
7417         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
7418         (dw2_debug_names_dump): Likewise.
7419         (dw2_debug_names_expand_symtabs_for_function): Likewise.
7420         (dw2_debug_names_expand_symtabs_matching): Likewise.
7421         (dwarf2_initialize_objfile): Likewise.
7422         (dwarf2_build_psymtabs): Likewise.
7423         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
7424         this_cu.
7425         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
7426         (read_and_check_comp_unit_head): Likewise.
7427         (read_abbrev_offset): Likewise.
7428         (create_debug_type_hash_table): Likewise.
7429         (create_debug_types_hash_table): Likewise.
7430         (create_all_type_units): Replace objfile parameter with
7431         dwarf2_per_objfile.
7432         (add_type_unit): Add dwarf2_per_objfile parameter.
7433         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
7434         with dwarf2_per_objfile.
7435         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
7436         (lookup_dwp_signatured_type): Likewise.
7437         (lookup_signatured_type): Likewise.
7438         (read_cutu_die_from_dwo): Likewise.
7439         (init_tu_and_read_dwo_dies): Likewise.
7440         (init_cutu_and_read_dies): Likewise.
7441         (init_cutu_and_read_dies_no_follow): Likewise.
7442         (allocate_type_unit_groups_table): Add objfile parameter.
7443         (create_type_unit_group): Use dwarf2_per_objfile from cu.
7444         (get_type_unit_group): Likewise.
7445         (process_psymtab_comp_unit): Update call.
7446         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
7447         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
7448         (print_tu_stats): Likewise.
7449         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
7450         in void* parameter.
7451         (build_type_psymtabs): Change objfile parameter to
7452         dwarf2_per_objfile.
7453         (process_skeletonless_type_unit): Use dwarf2_per_objfile
7454         passed in void* parameter.
7455         (process_skeletonless_type_units): Change objfile parameter to
7456         dwarf2_per_objfile.
7457         (set_partial_user): Likewise.
7458         (dwarf2_build_psymtabs_hard): Likewise.
7459         (read_comp_units_from_section): Likewise.
7460         (create_all_comp_units): Likewise.
7461         (scan_partial_symbols): Update calls.
7462         (add_partial_symbol): Likewise.
7463         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
7464         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
7465         (process_queue): Add dwarf2_per_objfile parameter.
7466         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
7467         (compute_compunit_symtab_includes): Likewise.
7468         (process_cu_includes): Add dwarf2_per_objfile parameter.
7469         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
7470         (process_full_type_unit): Likewise.
7471         (process_imported_unit_die): Update call.
7472         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
7473         (read_file_scope): Likewise.
7474         (allocate_dwo_file_hash_table): Add objfile parameter.
7475         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
7476         (create_cus_hash_table): Likewise.
7477         (create_dwp_hash_table): Likewise.
7478         (create_dwo_unit_in_dwp_v1): Likewise.
7479         (create_dwp_v2_section): Likewise.
7480         (create_dwo_unit_in_dwp_v2): Likewise.
7481         (lookup_dwo_unit_in_dwp): Likewise.
7482         (try_open_dwop_file): Likewise.
7483         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
7484         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
7485         cleanup to include a reference to dwarf2_per_objfile.
7486         (open_dwp_file): Add dwarf2_per_objfile parameter.
7487         (open_and_init_dwp_file): Likewise.
7488         (get_dwp_file): Likewise.
7489         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
7490         (queue_and_load_all_dwo_tus): Update call.
7491         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
7492         data.
7493         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
7494         (dwarf2_ranges_process): Likewise.
7495         (dwarf2_get_pc_bounds): Likewise.
7496         (mark_common_block_symbol_computed): Likewise.
7497         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
7498         (dwarf2_read_abbrevs): Update call.
7499         (read_partial_die): Use dwarf2_per_objfile from cu.
7500         (find_partial_die): Likewise.
7501         (fixup_partial_die): Likewise.
7502         (read_attribute_value): Likewise.
7503         (read_indirect_string_at_offset_from): Add objfile parameter.
7504         (read_indirect_string_at_offset): Add dwarf2_per_objfile
7505         parameter.
7506         (read_indirect_string_from_dwz): Add objfile parameter.
7507         (read_indirect_string): Add objfile parameter.
7508         (read_addr_index_1): Add dwarf2_per_objfile parameter.
7509         (read_addr_index): Use dwarf2_per_objfile from cu.
7510         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
7511         call dw2_setup.
7512         (read_str_index): Use dwarf2_per_objfile from cu.
7513         (get_debug_line_section): Likewise.
7514         (read_formatted_entries): Add dwarf2_per_objfile parameter.
7515         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
7516         (new_symbol_full): Use dwarf2_per_objfile from cu.
7517         (build_error_marker_type): Likewise.
7518         (lookup_die_type): Likewise.
7519         (determine_prefix): Likewise.
7520         (follow_die_offset): Likewise.
7521         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
7522         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
7523         (dwarf2_fetch_die_type_sect_off): Likewise.
7524         (dwarf2_get_die_type): Likewise.
7525         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
7526         (get_signatured_type): Likewise.
7527         (get_DW_AT_signature_type): Likewise.
7528         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
7529         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
7530         (cu_debug_loc_section): Likewise.
7531         (fill_in_loclist_baton): Likewise.
7532         (dwarf2_symbol_mark_computed): Likewise.
7533         (dwarf2_find_containing_comp_unit): Change objfile parameter to
7534         dwarf2_per_objfile.
7535         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
7536         parameter.
7537         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
7538         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
7539         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
7540         (set_die_type): Use dwarf2_free_objfile from cu.
7541         (get_die_type_at_offset): Likewise.
7542         (dwarf2_per_objfile_free): Don't assign global variable.
7543         (debug_names) <constructor>: Add dwarf2_per_objfile
7544         parameter, update m_debugstrlookup construction.
7545         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
7546         parameter.
7547         <m_dwarf2_per_objfile>: New field.
7548         <lookup>: Use m_dwarf2_per_objfile.
7549         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
7550         (psyms_seen_size): Likewise.
7551         (write_gdbindex): Replace objfile parameter with
7552         dwarf2_per_objfile.
7553         (write_debug_names): Likewise.
7554         (write_psymtabs_to_index): Likewise.
7555         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
7556         calls.
7557
7558 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
7559
7560         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
7561         <dwarf2_per_objfile>: New field.
7562         (struct dwarf2_per_cu_data) <objfile>: Remove.
7563         <dwarf2_per_objfile>: New field.
7564         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
7565         of objfile.
7566         (create_signatured_type_table_from_index): Likewise.
7567         (create_debug_type_hash_table): Likewise.
7568         (fill_in_sig_entry_from_dwo_entry): Likewise.
7569         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
7570         (create_type_unit_group): Assign dwarf2_per_objfile instead of
7571         objfile.
7572         (create_partial_symtab): Access objfile through
7573         dwarf2_per_objfile.
7574         (process_psymtab_comp_unit_reader): Likewise.
7575         (read_comp_units_from_section): Likewise.
7576         (scan_partial_symbols): Likewise.
7577         (add_partial_symbol): Likewise.
7578         (add_partial_subprogram): Likewise.
7579         (peek_die_abbrev): Likewise.
7580         (fixup_go_packaging): Likewise.
7581         (process_full_comp_unit): Likewise.
7582         (process_full_type_unit): Likewise.
7583         (process_imported_unit_die): Likewise.
7584         (dwarf2_compute_name): Likewise.
7585         (dwarf2_physname): Likewise.
7586         (read_import_statement): Likewise.
7587         (create_cus_hash_table): Assign dwarf2_physname instead of
7588         objfile.
7589         (read_func_scope): Access objfile through dwarf2_per_objfile.
7590         (read_lexical_block_scope): Likewise.
7591         (read_call_site_scope): Likewise.
7592         (read_variable): Likewise.
7593         (dwarf2_rnglists_process): Likewise.
7594         (dwarf2_ranges_process): Likewise.
7595         (dwarf2_ranges_read): Likewise.
7596         (dwarf2_record_block_ranges): Likewise.
7597         (dwarf2_add_field): Likewise.
7598         (dwarf2_add_member_fn): Likewise.
7599         (read_structure_type): Likewise.
7600         (process_structure_scope): Likewise.
7601         (read_enumeration_type): Likewise.
7602         (read_array_type): Likewise.
7603         (read_common_block): Likewise.
7604         (read_namespace_type): Likewise.
7605         (read_namespace): Likewise.
7606         (read_module_type): Likewise.
7607         (read_tag_pointer_type): Likewise.
7608         (read_tag_ptr_to_member_type): Likewise.
7609         (read_tag_string_type): Likewise.
7610         (read_subroutine_type): Likewise.
7611         (read_typedef): Likewise.
7612         (read_base_type): Likewise.
7613         (attr_to_dynamic_prop): Likewise.
7614         (read_subrange_type): Likewise.
7615         (read_unspecified_type): Likewise.
7616         (load_partial_dies): Likewise.
7617         (read_partial_die): Likewise.
7618         (find_partial_die): Likewise.
7619         (guess_partial_die_structure_name): Likewise.
7620         (fixup_partial_die): Likewise.
7621         (read_attribute_value): Likewise.
7622         (read_addr_index_from_leb128): Likewise.
7623         (dwarf2_read_addr_index): Likewise.
7624         (dwarf2_string_attr): Likewise.
7625         (lnp_state_machine::check_line_address): Likewise.
7626         (dwarf_decode_lines_1): Likewise.
7627         (dwarf_decode_lines): Likewise.
7628         (dwarf2_start_symtab): Likewise.
7629         (var_decode_location): Likewise.
7630         (new_symbol_full): Likewise.
7631         (dwarf2_const_value_data): Likewise.
7632         (dwarf2_const_value_attr): Likewise.
7633         (dwarf2_const_value): Likewise.
7634         (die_type): Likewise.
7635         (die_containing_type): Likewise.
7636         (lookup_die_type): Likewise.
7637         (guess_full_die_structure_name): Likewise.
7638         (anonymous_struct_prefix): Likewise.
7639         (dwarf2_name): Likewise.
7640         (follow_die_ref_or_sig): Likewise.
7641         (follow_die_offset): Likewise.
7642         (follow_die_ref): Likewise.
7643         (dwarf2_fetch_die_loc_sect_off): Likewise.
7644         (dwarf2_fetch_constant_bytes): Likewise.
7645         (dwarf2_fetch_die_type_sect_off): Likewise.
7646         (dwarf2_get_die_type): Likewise.
7647         (follow_die_sig): Likewise.
7648         (decode_locdesc): Likewise.
7649         (dwarf2_per_cu_objfile): Likewise.
7650         (dwarf2_per_cu_text_offset): Likewise.
7651         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
7652         objfile.
7653         (set_die_type): Access objfile through
7654         dwarf2_per_objfile.
7655
7656 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
7657
7658         * valprint.c (converted_character_d): Remove typedef.
7659         (DEF_VEC_O (converted_character_d)): Remove.
7660         (count_next_character): Use std::vector.
7661         (print_converted_chars_to_obstack): Likewise.
7662         (generic_printstr): Likewise.
7663
7664 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
7665
7666         * xml-support.h (struct gdb_xml_value): Add constructor.
7667         <value>: Change type to unique_xmalloc_ptr.
7668         (gdb_xml_value_s): Remove typedef.
7669         (DEF_VEC_O (gdb_xml_value_s)): Remove.
7670         (gdb_xml_element_start_handler): Change parameter type to
7671         std::vector.
7672         (xml_find_attribute): Likewise.
7673         * xml-support.c (xml_find_attribute): Change parameter type to
7674         std::vector and adjust.
7675         (gdb_xml_values_cleanup): Remove.
7676         (gdb_xml_parser::start_element): Adjust to std::vector.
7677         (xinclude_start_include): Change paraeter type to std::vector
7678         and adjust.
7679         * btrace.c (check_xml_btrace_version): Likewise.
7680         (parse_xml_btrace_block): Likewise.
7681         (parse_xml_btrace_pt_config_cpu): Likewise.
7682         (parse_xml_btrace_pt): Likewise.
7683         (parse_xml_btrace_conf_bts): Likewise.
7684         (parse_xml_btrace_conf_pt): Likewise.
7685         * memory-map.c (memory_map_start_memory): Likewise.
7686         (memory_map_start_property): Likewise.
7687         * osdata.c (osdata_start_osdata): Likewise.
7688         (osdata_start_item): Likewise.
7689         (osdata_start_column): Likewise.
7690         * remote.c (start_thread): Likewise.
7691         * solib-aix.c (library_list_start_library): Likewise.
7692         (library_list_start_list): Likewise.
7693         * solib-svr4.c (library_list_start_library): Likewise.
7694         (svr4_library_list_start_list): Likewise.
7695         * solib-target.c (library_list_start_segment): Likewise.
7696         (library_list_start_section): Likewise.
7697         (library_list_start_library): Likewise.
7698         (library_list_start_list): Likewise.
7699         * tracepoint.c (traceframe_info_start_memory): Likewise.
7700         (traceframe_info_start_tvar): Likewise.
7701         * xml-syscall.c (syscall_start_syscall): Likewise.
7702         * xml-tdesc.c (tdesc_start_target): Likewise.
7703         (tdesc_start_feature): Likewise.
7704         (tdesc_start_reg): Likewise.
7705         (tdesc_start_union): Likewise.
7706         (tdesc_start_struct): Likewise.
7707         (tdesc_start_flags): Likewise.
7708         (tdesc_start_enum): Likewise.
7709         (tdesc_start_field): Likewise.
7710         (tdesc_start_enum_value): Likewise.
7711         (tdesc_start_vector): Likewise.
7712
7713 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
7714
7715         * extension.h (struct xmethod_worker) <clone>: Remove.
7716         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
7717         Remove.
7718         (python_xmethod_worker::clone): Remove.
7719         * valops.c (find_overload_match): Use std::move instead of
7720         clone.
7721
7722 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
7723
7724         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
7725         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
7726         <free_xmethod_worker_data>: Remove.
7727         <get_matching_xmethod_workers>: Chance VEC to std::vector.
7728         <get_xmethod_arg_types>: Remove.
7729         <get_xmethod_result_type>: Remove.
7730         <invoke_xmethod>: Remove.
7731         * extension.c (new_xmethod_worker): Remove.
7732         (clone_xmethod_worker): Remove.
7733         (get_matching_xmethod_workers): Return void, pass std::vector by
7734         pointer.
7735         (get_xmethod_arg_types): Rename to...
7736         (xmethod_worker::get_arg_types): ... this, and adjust.
7737         (get_xmethod_result_type): Rename to...
7738         (xmethod_worker::get_result_type): ... this, and adjust.
7739         (invoke_xmethod): Remove.
7740         (free_xmethod_worker): Remove.
7741         (free_xmethod_worker_vec): Remove.
7742         * extension.h (enum ext_lang_rc): Move here from
7743         extension-priv.h.
7744         (struct xmethod_worker): Add constructor and destructor.
7745         <data>: Remove.
7746         <value>: Remove.
7747         <invoke, clone, do_get_result_type, do_get_arg_types>: New
7748         virtual pure methods.
7749         <get_arg_types, get_result_type>: New methods.
7750         (xmethod_worker_ptr): Remove typedef.
7751         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
7752         (xmethod_worker_vec): Remove typedef.
7753         (xmethod_worker_up): New typedef.
7754         (invoke_xmethod): Remove.
7755         (clone_xmethod_worker): Remove.
7756         (free_xmethod_worker): Remove.
7757         (free_xmethod_worker_vec): Remove.
7758         (get_xmethod_arg_types): Remove.
7759         (get_xmethod_result_type): Remove.
7760         * valops.c (find_method_list): Use std::vector, don't use
7761         intermediate vector.
7762         (value_find_oload_method_list): Use std::vector.
7763         (find_overload_match): Use std::vector.
7764         (find_oload_champ): Use std::vector.
7765         * value.c (value_free): Use operator delete.
7766         (value_of_xmethod): Rename to...
7767         (value_from_xmethod): ... this.  Don't assign
7768         xmethod_worker::value, take rvalue-reference.
7769         (result_type_of_xmethod): Adjust.
7770         (call_xmethod): Adjust.
7771         * value.h: Include extension.h.
7772         (struct xmethod_worker): Don't forward-declare.
7773         (value_of_xmethod): Rename to...
7774         (value_from_xmethod): ... this, take rvalue-reference.
7775         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
7776         (struct python_xmethod_worker): ... this, add constructor and
7777         destructor.
7778         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
7779         (gdbpy_free_xmethod_worker_data): Rename to...
7780         (python_xmethod_worker::~python_xmethod_worker): ... this and
7781         adjust.
7782         (gdbpy_clone_xmethod_worker_data): Rename to...
7783         (python_xmethod_worker::clone): ... this and adjust.
7784         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
7785         temporary vector.
7786         (gdbpy_get_xmethod_arg_types): Rename to...
7787         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
7788         (gdbpy_get_xmethod_result_type): Rename to...
7789         (python_xmethod_worker::do_get_result_type): ... this and
7790         adjust.
7791         (gdbpy_invoke_xmethod): Rename to...
7792         (python_xmethod_worker::invoke): ... this and adjust.
7793         (new_python_xmethod_worker): Rename to...
7794         (python_xmethod_worker::python_xmethod_worker): ... this and
7795         adjust.
7796         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
7797         Remove.
7798         (gdbpy_free_xmethod_worker_data): Remove.
7799         (gdbpy_get_matching_xmethod_workers): Use std::vector.
7800         (gdbpy_get_xmethod_arg_types): Remove.
7801         (gdbpy_get_xmethod_result_type): Remove.
7802         (gdbpy_invoke_xmethod): Remove.
7803         * python/python.c (python_extension_ops): Remove obsolete
7804         callbacks.
7805
7806 2018-01-05  Pedro Alves  <palves@redhat.com>
7807
7808         PR gdb/18653
7809         * common/signals-state-save-restore.c
7810         (save_original_signals_state): New parameter 'quiet'.  Warn if we
7811         find a custom handler preinstalled, instead of internal erroring.
7812         But only warn if !quiet.
7813         * common/signals-state-save-restore.h
7814         (save_original_signals_state): New parameter 'quiet'.
7815         * main.c (captured_main_1): Move save_original_signals_state call
7816         after option handling, and pass QUIET.
7817
7818 2018-01-05  Pedro Alves  <palves@redhat.com>
7819
7820         * spu-tdep.c (spu_catch_start): Pass
7821         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
7822
7823 2018-01-05  Pedro Alves  <palves@redhat.com>
7824
7825         PR gdb/22670
7826         * ada-lang.c (literal_symbol_name_matcher): New function.
7827         (ada_get_symbol_name_matcher): Use it for
7828         symbol_name_match_type::SEARCH_NAME.
7829         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
7830         it down instead of assuming symbol_name_match_type::FULL.
7831         * block.h (block_lookup_symbol): New parameter 'match_type'.
7832         * c-valprint.c (print_unpacked_pointer): Use
7833         lookup_symbol_search_name instead of lookup_symbol.
7834         * compile/compile-object-load.c (get_out_value_type): Pass down
7835         symbol_name_match_type::SEARCH_NAME.
7836         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
7837         symbol_name_match_type::FULL.
7838         * cp-support.c (cp_get_symbol_name_matcher): Handle
7839         symbol_name_match_type::SEARCH_NAME.
7840         * infrun.c (insert_exception_resume_breakpoint): Use
7841         lookup_symbol_search_name.
7842         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
7843         * psymtab.c (maintenance_check_psymtabs): Use
7844         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
7845         * stack.c (print_frame_args): Use lookup_symbol_search_name and
7846         SYMBOL_SEARCH_NAME.
7847         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
7848         if symbol_name_match_type::SEARCH_NAME.
7849         (lookup_symbol_in_language): Pass down
7850         symbol_name_match_type::FULL.
7851         (lookup_symbol_search_name): New.
7852         (lookup_language_this): Pass down
7853         symbol_name_match_type::SEARCH_NAME.
7854         (lookup_symbol_aux, lookup_local_symbol): New parameter
7855         'match_type'.  Pass it down.
7856         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
7857         (lookup_symbol_search_name): New declaration.
7858         (lookup_symbol_in_block): New 'match_type' parameter.
7859
7860 2018-01-05  Pedro Alves  <palves@redhat.com>
7861
7862         PR gdb/22670
7863         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
7864         ada_lookup_symbol.
7865         (ada_lookup_symbol): Reimplement in terms of
7866         ada_lookup_symbol_list, bits factored out from
7867         ada_lookup_encoded_symbol.
7868
7869 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
7870
7871         * ada-exp.y (write_object_renaming): When subscripting an array
7872         using a symbol as the index, pass the block in call to
7873         ada_lookup_encoded_symbol when looking that symbol up.
7874
7875 2018-01-05  Jerome Guitton  <guitton@adacore.com>
7876
7877         * ada-lang.c (ada_array_length): Use ada_index_type instead of
7878         TYPE_INDEX_TYPE.
7879
7880 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
7881
7882         * ada-lang.c (ada_to_fixed_value_create): Add handling of
7883         the case where VALUE_LVAL (val0) is not lval_memory.
7884
7885 2018-01-05  Xavier Roirand  <roirand@adacore.com>
7886
7887         * ada-valprint.c (print_optional_low_bound): Handle
7888         character-indexed array printing like boolean-indexed array
7889         printing.
7890
7891 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
7892
7893         * NEWS: Create a new section for the next release branch.
7894         Rename the section of the current branch, now that it has
7895         been cut.
7896
7897 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
7898
7899         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
7900         * version.in: Bump version to 8.1.50.DATE-git.
7901
7902 2018-01-03  Xavier Roirand  <roirand@adacore.com>
7903
7904         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
7905         Add field.
7906         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
7907         Add field.
7908         (default_exception_support_info) <catch_handlers_sym>: Add field.
7909         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
7910         (ada_exception_name_addr_1): Add "catch handlers" handling.
7911         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
7912         Update all callers.
7913         (create_excep_cond_exprs) <ex>: Add parameter.
7914         (re_set_exception): Update create_excep_cond_exprs call.
7915         (print_it_exception, print_one_exception, print_mention_exception)
7916         (print_recreate_exception): Add "catch handler" handling.
7917         (allocate_location_catch_handlers, re_set_catch_handlers)
7918         (check_status_catch_handlers, print_it_catch_handlers)
7919         (print_one_catch_handlers, print_mention_catch_handlers)
7920         (print_recreate_catch_handlers): New function.
7921         (catch_handlers_breakpoint_ops): New variable.
7922         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
7923         Add parameter.  Add "catch handler" handling.
7924         (ada_exception_sym_name, ada_exception_breakpoint_ops):
7925         Add "catch handler" handling.
7926         (ada_exception_catchpoint_cond_string): Add "catch handler"
7927         handling.
7928         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
7929         call.
7930         (catch_ada_handlers_command): New function.
7931         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
7932         operations structure.
7933         (_initialize_ada_language): Add "catch handlers" command entry.
7934         * NEWS: Document "catch handlers" feature.
7935
7936 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
7937
7938         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
7939         account when creating the array type of the slice.
7940         (ada_value_slice): Likewise.
7941
7942 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
7943
7944         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
7945         New enum value.
7946         (create_array_type_with_stride): Add byte_stride_prop parameter.
7947         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
7948         New parameter.  Update all callers in this file.
7949         (array_type_has_dynamic_stride): New function.
7950         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
7951         of arrays with dynamic byte strides.
7952         * dwarf2read.c (read_array_type): Add support for dynamic
7953         DW_AT_byte_stride attributes.
7954
7955 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
7956
7957         * dwarf2read.c (read_unspecified_type): Treat
7958         DW_TAG_enumeration_type DIEs from Ada units as stubs.
7959
7960 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
7961
7962         Update copyright year range in all GDB files.
7963
7964 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
7965
7966         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
7967         and gdb/testsuite/gdb.base/step-line.c.
7968
7969 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
7970
7971         * copyright.py (main): Dump the contents of
7972         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
7973         even if BY_HAND is empty.
7974
7975 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
7976
7977         * top.c (print_gdb_version): Update Copyright year in version
7978         message.
7979
7980 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
7981
7982         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
7983
7984 For older changes see ChangeLog-2017.
7985 \f
7986 Local Variables:
7987 mode: change-log
7988 left-margin: 8
7989 fill-column: 74
7990 version-control: never
7991 coding: utf-8
7992 End: