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