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