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