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