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