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