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