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