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