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