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