Remove some unused variables
[external/binutils.git] / gdb / ChangeLog
1 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
2
3         * aarch64-linux-nat.c
4         (aarch64_linux_nat_target::stopped_data_address): Remove unused
5         variable.
6         * arm-linux-nat.c (fetch_regs): Likewise.
7         (store_regs): Likewise.
8         (fetch_vfp_regs): Likewise.
9         (store_vfp_regs): Likewise.
10         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
11         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
12         (arm_linux_nat_target::insert_watchpoint): Likewise.
13         (arm_linux_nat_target::remove_watchpoint): Likewise.
14         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
15         Likewise.
16         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
17         Likewise.
18         * ppc-linux-nat.c (fetch_register): Likewise.
19         (fetch_all_gp_regs): Likewise.
20         (fetch_ppc_registers): Likewise.
21         (store_all_gp_regs): Likewise.
22         (store_ppc_registers): Likewise.
23         (hwdebug_insert_point): Likewise.
24         (can_use_watchpoint_cond_accel): Likewise.
25         * remote-sim.c (gdb_os_write_stdout): Likewise.
26
27 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
28             Tom Tromey  <tom@tromey.com>
29
30         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
31         test for it.
32         * configure: Rebuild.
33
34 2018-07-22  Tom Tromey  <tom@tromey.com>
35
36         * regformats/regdat.sh: Define xmltarget_${name} inside
37         #ifndef IN_PROCESS_AGENT.
38
39 2018-07-22  Tom Tromey  <tom@tromey.com>
40
41         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
42
43 2018-07-22  Tom Tromey  <tom@tromey.com>
44
45         * symfile.c (reread_symbols): Notify iter, not objfile.
46
47 2018-07-22  Tom Tromey  <tom@tromey.com>
48
49         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
50         Use arch_ops.
51         (ravenscar_thread_target::prepare_to_store): Likewise.
52
53 2018-07-22  Tom Tromey  <tom@tromey.com>
54
55         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
56         unused variable.  Call value_fetch_lazy when needed.
57         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
58         Remove unused variable.  Call value_fetch_lazy when needed.
59
60 2018-07-22  Tom Tromey  <tom@tromey.com>
61
62         * m32c-tdep.c (mark_dma): Return void.
63         (make_regs): Remove unused declarations.
64
65 2018-07-22  Tom Tromey  <tom@tromey.com>
66
67         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
68         cmdscm_get_valid_command_smob_arg_unsafe for effect.
69         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
70         bkscm_get_valid_block_smob_arg_unsafe for effect.
71
72 2018-07-22  Tom Tromey  <tom@tromey.com>
73
74         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
75         value_type.
76
77 2018-07-22  Tom Tromey  <tom@tromey.com>
78
79         * windows-nat.c (saved_context): Conditionally define.
80         * remote.c (remote_target::remote_btrace_maybe_reopen):
81         Conditionally declare "warned".
82         * inflow.c (sigquit_ours): Conditionally define.
83         (new_tty): Move "tty" declaration inside #if.
84         * guile/guile.c (guile_datadir): Conditionally define.
85         * charset.c (set_be_le_names): Move some declarations inside #if.
86         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
87         #if.
88         (parse_xml_btrace_conf): Likewise.
89
90 2018-07-22  Tom Tromey  <tom@tromey.com>
91
92         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
93
94 2018-07-22  Tom Tromey  <tom@tromey.com>
95
96         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
97         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
98         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
99         * buildsym-legacy.c (get_macro_table): Remove unused variable.
100         * stack.c (frame_apply_level_command): Remove unused variable.
101         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
102         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
103         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
104         unused variable.
105         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
106         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
107         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
108         variable.
109         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
110         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
111         variable.
112         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
113         Remove unused variable.
114         * cli/cli-script.c (recurse_read_control_structure): Remove unused
115         variable.
116         * common/tdesc.c (print_xml_feature::visit): Remove unused
117         variable.
118         * compile/compile-object-load.c (store_regs): Remove unused
119         variables.
120         * complaints.c (clear_complaints): Remove unused variable.
121         * corelow.c (core_target_open): Remove unused variable.
122         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
123         variable.
124         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
125         variable.
126         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
127         variable.
128         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
129         variable.
130         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
131         variable.
132         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
133         variable.
134         * ia64-tdep.c (examine_prologue): Remove unused variable.
135         * infcall.c (run_inferior_call): Remove unused variable.
136         * inferior.c (exit_inferior): Remove unused variable.
137         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
138         * linespec.c (decode_line_2): Remove unused variable.
139         * linux-nat.c (super_close): Remove.
140         * linux-tdep.c (linux_info_proc): Remove unused variable.
141         * mi/mi-main.c (mi_execute_command): Remove unused variable.
142         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
143         Remove unused variable.
144         * parse.c (find_minsym_type_and_address): Remove unused variable.
145         * printcmd.c (info_symbol_command, printf_floating): Remove unused
146         variable.
147         * python/py-breakpoint.c (bppy_set_commands): Remove unused
148         variable.
149         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
150         variables.
151         * record-btrace.c (record_btrace_target::store_registers): Remove
152         unused variable.
153         (cmd_show_record_btrace_cpu): Remove unused variable.
154         * riscv-tdep.c (riscv_register_reggroup_p)
155         (riscv_push_dummy_call, riscv_return_value): Remove unused
156         variable.
157         * rust-exp.y (literal): Remove unused variable.
158         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
159         unused variable.
160         <STRUCTOP_ANONYMOUS>: Likewise.
161         * s390-linux-tdep.c (s390_linux_init_abi_31)
162         (s390_linux_init_abi_64): Remove unused variable.
163         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
164         (file_select_thread, net_windows_open, _initialize_ser_windows):
165         Remove unused variables.
166         * symtab.c (find_pc_sect_line): Remove unused variable.
167         * target-memory.c (compute_garbled_blocks): Remove unused
168         variable.
169         (target_write_memory_blocks): Remove unused variable.
170         * target.c (target_stack::unpush): Remove unused variables.
171         * tracepoint.c (start_tracing, all_tracepoint_actions)
172         (merge_uploaded_trace_state_variables)
173         (print_one_static_tracepoint_marker): Remove unused variable.
174         * unittests/basic_string_view/element_access/char/1.cc (test01):
175         Remove unused variable.
176         * windows-nat.c (windows_continue, windows_add_all_dlls)
177         (do_initial_windows_stuff, windows_nat_target::create_inferior):
178         Remove unused variables.
179
180 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
181
182         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
183         attr_profile in HAVE_ELF.
184         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
185         HAVE_ELF.
186
187 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
188
189         * frame.c (frame_register_unwind): Change parameter name.
190         (frame_unwind_register): Likewise.
191         (frame_unwind_register_value): Likewise.
192         (frame_unwind_register_signed): Likewise.
193         (frame_unwind_register_unsigned): Likewise.
194         * frame.h (frame_register_unwind): Likewise.
195         (frame_unwind_register): Likewise.
196         (frame_unwind_register_value): Likewise.
197         (frame_unwind_register_signed): Likewise.
198         (frame_unwind_register_unsigned): Likewise.
199         (frame_unwind_arch): Likewise.
200
201 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
202
203         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
204         ISA maintenance.
205
206 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
207
208         * mips-linux-nat.c (mips_linux_nat_target::read_description):
209         Call `get_ptrace_pid' rather than extracting the ptrace PID by
210         hand.
211
212 2018-07-20  Keith Seitz  <keiths@redhat.com>
213
214         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
215         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
216         m_compunit_symtab, m_language>: Add "m_" prefix.
217         Update all uses.
218         * buildsym.c: Update all uses.
219
220 2018-07-20  Tom Tromey  <tom@tromey.com>
221
222         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
223         * buildsym.h (record_line_ftype): Remove typedef.
224
225 2018-07-20  Tom Tromey  <tom@tromey.com>
226
227         * buildsym-legacy.h (augment_type_symtab): Don't declare.
228         (end_expandable_symtab): Likewise.
229         (end_symtab_get_static_block): Likewise.
230         (end_symtab_from_static_block): Likewise.
231         * buildsym-legacy.c (augment_type_symtab): Remove.
232         (end_expandable_symtab): Remove.
233         (end_symtab_get_static_block): Remove.
234         (end_symtab_from_static_block): Remove.
235
236 2018-07-20  Tom Tromey  <tom@tromey.com>
237
238         * dwarf2read.c: Include buildsym.h.
239         (struct dwarf2_cu) <builder>: New method.
240         (fixup_go_packaging): Update.
241         (process_full_comp_unit, process_full_type_unit): Update.  Don't
242         use scoped_free_pendings.
243         (using_directives): Add "cu" parameter, remove "language".
244         (read_import_statement, setup_type_unit_groups, )
245         (read_func_scope, read_lexical_block_scope)
246         (dwarf2_record_block_ranges, read_namespace): Update.
247         (lnp_state_machine::lnp_state_machine): Add cu parameter.
248         (lnp_state_machine::handle_end_sequence): Update.
249         (class lnp_state_machine) <m_cu>: New member.
250         <m_record_line_callback>: Remove.
251         <m_currently_recording_lines>: New member.
252         (lnp_state_machine::handle_set_file): Update.
253         (noop_record_line): Remove.
254         (dwarf_record_line_p): Add cu parameter.
255         (dwarf_record_line_1, dwarf_finish_line): Likewise.
256         (lnp_state_machine::record_line)
257         (lnp_state_machine::lnp_state_machine)
258         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
259         (dwarf_decode_lines): Update.
260         (dwarf2_start_subfile): Add cu parameter.
261         (dwarf2_start_symtab, new_symbol): Update.
262         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
263         Remove dwarf2_per_objfile parameter.
264         (dwarf_decode_macros): Update.
265
266 2018-07-20  Tom Tromey  <tom@tromey.com>
267
268         * stabsread.c (define_symbol): Update.
269         * buildsym-legacy.h (get_buildsym_compunit): Declare.
270         * dwarf2read.c (new_symbol): Update.
271         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
272         * cp-namespace.c: Include buildsym.h.
273         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
274         * buildsym-legacy.c (get_buildsym_compunit): New function.
275
276 2018-07-20  Tom Tromey  <tom@tromey.com>
277
278         * xcoffread.c: Include buildsym-legacy.h.
279         * windows-nat.c: Include buildsym-legacy.h.
280         * stabsread.c: Include buildsym-legacy.h.
281         * mdebugread.c: Include buildsym-legacy.h.
282         * buildsym-legacy.h: New file.
283         * buildsym-legacy.c: New file, from buildsym.c.
284         * go32-nat.c: Include buildsym-legacy.h.
285         * dwarf2read.c: Include buildsym-legacy.h.
286         * dbxread.c: Include buildsym-legacy.h.
287         * cp-namespace.c: Include buildsym-legacy.h.
288         * coffread.c: Include buildsym-legacy.h.
289         * buildsym.h: Move some contents to buildsym-legacy.h.
290         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
291         buildsym-legacy.c.
292         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
293
294 2018-07-20  Tom Tromey  <tom@tromey.com>
295
296         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
297         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
298         (buildsym_compunit::buildsym_compunit)
299         (buildsym_compunit::~buildsym_compunit)
300         (buildsym_compunit::get_macro_table): Define.
301
302 2018-07-20  Tom Tromey  <tom@tromey.com>
303
304         * buildsym.c (reset_symtab_globals): Remove.
305         (buildsym_compunit::end_symtab_from_static_block): Update.
306         (buildsym_compunit::augment_type_symtab): Update.
307         (end_symtab_from_static_block): Call free_buildsym_compunit.
308         (augment_type_symtab, end_symtab, end_expandable_symtab):
309         Likewise.
310
311 2018-07-20  Tom Tromey  <tom@tromey.com>
312
313         * arch-utils.c: Do not include buildsym.h.
314         * mipsread.c: Do not include buildsym.h.
315         * machoread.c: Do not include buildsym.h.
316         * elfread.c: Do not include buildsym.h.
317
318 2018-07-20  Tom Tromey  <tom@tromey.com>
319
320         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
321         initialization.
322         (buildsym_compunit): Add new constructor.
323         (struct buildsym_compunit) <get_last_source_file, finish_block,
324         record_block_range, start_subfile, patch_subfile_names,
325         push_subfile, pop_subfile, record_line, get_compunit_symtab,
326         set_last_source_start_addr, get_last_source_start_addr,
327         get_local_using_directives, set_local_using_directives,
328         get_global_using_directives, outermost_context_p,
329         get_current_context_stack, get_context_stack_depth,
330         get_current_subfile, get_local_symbols, get_file_symbols,
331         get_global_symbols, record_debugformat, record_producer,
332         push_context, pop_context, end_symtab_get_static_block,
333         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
334         New public methods.
335         <record_pending_block, finish_block_internal, make_blockvector,
336         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
337         private methods.
338         Update all users.
339
340 2018-05-22  Tom Tromey  <tom@tromey.com>
341
342         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
343         parameter.
344         (finish_block_internal): Update.
345
346 2018-07-20  Tom Tromey  <tom@tromey.com>
347
348         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
349         parameter.
350         (finish_block_internal): Update.
351
352 2018-07-20  Tom Tromey  <tom@tromey.com>
353
354         * buildsym.h (EXTERN): Don't define or undef.
355         * buildsym.c (EXTERN): Don't define.
356
357 2018-07-20  Tom Tromey  <tom@tromey.com>
358
359         * buildsym.c: Remove TODO comment.
360
361 2018-07-20  Tom Tromey  <tom@tromey.com>
362
363         * coffread.c (coff_symtab_read): Update.
364         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
365         (xcoff_new_init): Update.
366         * mipsread.c (mipscoff_new_init): Update.
367         * mdebugread.c (mdebug_build_psymtabs): Update.
368         * elfread.c (elf_new_init): Update.
369         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
370         Update.
371         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
372         (coffstab_build_psymtabs, elfstab_build_psymtabs)
373         (stabsect_build_psymtabs): Update.
374         * buildsym.h (buildsym_init): Don't declare.
375         * buildsym.c: Update comment.
376         (prepare_for_building): Remove.
377         (start_symtab, restart_symtab): Update.
378         (reset_symtab_globals): Update comment.
379         (buildsym_init): Remove.
380
381 2018-07-20  Tom Tromey  <tom@tromey.com>
382
383         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
384         * stabsread.c (patch_block_stabs, define_symbol, read_type)
385         (read_enum_type, common_block_start, common_block_end)
386         (cleanup_undefined_types_1, finish_global_stabs): Update.
387         * mdebugread.c (psymtab_to_symtab_1): Update.
388         * dwarf2read.c (fixup_go_packaging, read_func_scope)
389         (read_lexical_block_scope, new_symbol): Update.
390         * dbxread.c (process_one_symbol): Update.
391         * coffread.c (coff_symtab_read, process_coff_symbol)
392         (coff_read_enum_type): Update.
393         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
394         declare.
395         (get_local_symbols, get_file_symbols, get_global_symbols): New
396         functions.
397         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
398         m_global_symbols.
399         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
400         (~scoped_free_pendings): Update.
401         (finish_block, prepare_for_building, reset_symtab_globals)
402         (end_symtab_get_static_block, end_symtab_with_blockvector)
403         (augment_type_symtab, push_context): Update.
404         (get_local_symbols, get_file_symbols, get_global_symbols): New
405         functions.
406         (buildsym_init): Update.
407
408 2018-07-20  Tom Tromey  <tom@tromey.com>
409
410         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
411         (process_full_type_unit): Likewise.
412         (dwarf2_start_symtab): Set list_in_scope.
413
414 2018-07-20  Tom Tromey  <tom@tromey.com>
415
416         * dwarf2read.c (process_psymtab_comp_unit_reader)
417         (build_type_psymtabs_reader): Do not set list_in_scope.
418
419 2018-07-20  Tom Tromey  <tom@tromey.com>
420
421         * buildsym.c (free_pendings): Remove.
422         (add_symbol_to_list, scoped_free_pendings)
423         (finish_block_internal, buildsym_init): Update.
424
425 2018-07-20  Tom Tromey  <tom@tromey.com>
426
427         * xcoffread.c (read_xcoff_symtab): Update.
428         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
429         Update.
430         * dbxread.c (process_one_symbol): Update.
431         * coffread.c (coff_symtab_read): Update.
432         * buildsym.h (finish_block): Update.
433         * buildsym.c (finish_block): Remove "listhead" argument.
434         (end_symtab_get_static_block): Update.
435
436 2018-07-20  Tom Tromey  <tom@tromey.com>
437
438         * buildsym.h (class scoped_free_pendings): Remove constructor.
439         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
440         method.
441         <m_pending_block_obstack, m_pending_blocks>: New members.
442         (pending_block_obstack, pending_blocks): Remove.
443         (scoped_free_pendings::scoped_free_pendings): Default.
444         (~scoped_free_pendings): Update.
445         (free_pending_blocks): Remove.
446         (finish_block_internal, record_pending_block, make_blockvector)
447         (end_symtab_get_static_block, augment_type_symtab, push_context)
448         (buildsym_init): Update.
449
450 2018-07-20  Tom Tromey  <tom@tromey.com>
451
452         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
453         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
454         members.
455         (pending_addrmap, pending_addrmap_obstack)
456         (pending_addrmap_interesting): Remove.
457         (scoped_free_pendings, record_block_range, make_blockvector)
458         (prepare_for_building, reset_symtab_globals, buildsym_init):
459         Update.
460
461 2018-07-20  Tom Tromey  <tom@tromey.com>
462
463         * xcoffread.c (process_linenos): Update.
464         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
465         * mdebugread.c (psymtab_to_symtab_1): Update.
466         * dwarf2read.c (setup_type_unit_groups)
467         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
468         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
469         * dbxread.c (process_one_symbol): Update.
470         * coffread.c (coff_symtab_read, enter_linenos)
471         (process_coff_symbol): Update.
472         * buildsym.h (current_subfile): Don't declare.
473         (get_current_subfile): Declare.
474         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
475         member.
476         (start_subfile, free_buildsym_compunit, push_subfile)
477         (prepare_for_building, start_symtab): Update.
478         (get_current_subfile): New function.
479
480 2018-07-20  Tom Tromey  <tom@tromey.com>
481
482         * coffread.c (coff_symtab_read): Update.
483         * xcoffread.c (read_xcoff_symtab): Update.
484         * dwarf2read.c (new_symbol): Update.
485         (read_func_scope, read_lexical_block_scope): Update.
486         * dbxread.c (process_one_symbol): Update.
487         * buildsym.h (context_stack, context_stack_depth): Don't declare.
488         (outermost_context_p): Remove macro.
489         (outermost_context_p, get_current_context_stack)
490         (get_context_stack_depth): Declare.
491         (pop_context): Return struct context_stack.
492         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
493         member.
494         (context_stack_size): Remove.
495         (INITIAL_CONTEXT_STACK_SIZE): Remove.
496         (prepare_for_building, end_symtab_get_static_block)
497         (augment_type_symtab, push_context): Update.
498         (pop_context): Return struct context_stack.
499         (outermost_context_p, get_current_context_stack)
500         (get_context_stack_depth): New functions.
501         (buildsym_init): Update.
502
503 2018-07-20  Tom Tromey  <tom@tromey.com>
504
505         * rust-exp.y: Now a pure parser.  Update all rules.
506         (%union): Move earlier.
507         (current_parser, work_obstack): Remove globals.
508         (rust_parser, ~rust_parser): Update.
509         (class rust_parser) <copy_name, concat3, crate_name, super_name,
510         lex_character, lex_number, lex_string, lex_identifier,
511         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
512         convert_name, convert_params_to_expression,
513         convert_ast_to_expression, ast_basic_type, ast_operation,
514         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
515         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
516         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
517         ast_array_type, ast_slice_type, ast_reference_type,
518         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
519         (rust_parse): Update.
520         (rustyyerror, rustyylex): Add parser parameter.
521         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
522         (rust_lex_stringish_test, rust_lex_test_sequence)
523         (rust_lex_test_trailing_dot, rust_lex_test_completion)
524         (rust_lex_test_push_back, rust_lex_tests): Update.
525
526 2018-07-19  Pedro Alves  <palves@redhat.com>
527
528         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
529         gdb::unique_xmalloc_ptr.
530         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
531         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
532         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
533         copy-initialization.
534         * guile/scm-pretty-print.c (ppscm_print_children): Use
535         gdb::unique_xmalloc_ptr instead of cleanups.
536         (gdbscm_apply_val_pretty_printer): Remove cleanups.
537         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
538         gdb::unique_xmalloc_ptr.
539         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
540         Adjust to use gdb::unique_xmalloc_ptr.
541         * guile/scm-utils.c (extract_arg): Adjust.
542         * guile/scm-value.c (gdbscm_value_field): Adjust to use
543         gdb::unique_xmalloc_ptr instead of a cleanup.
544
545 2018-07-19  Tom Tromey  <tom@tromey.com>
546
547         * utils.c (do_value_free_to_mark)
548         (make_cleanup_value_free_to_mark): Remove.
549         * utils.h (make_cleanup_value_free_to_mark): Remove.
550
551 2018-07-19  Pedro Alves  <palves@redhat.com>
552
553         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
554         forwarding reference.
555
556 2018-07-18  Pedro Alves  <palves@redhat.com>
557
558         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
559         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
560         cleanup.
561
562 2018-07-18  Pedro Alves  <palves@redhat.com>
563
564         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
565         exceptions.
566         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
567         (gdbscm_wrap): New.
568         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
569         directly instead of a cleanup.
570         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
571         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
572         (vlscm_binop_gdbthrow): New, factored out from ...
573         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
574         (vlscm_rich_compare): Use gdbscm_wrap.
575         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
576         instead of a cleanup.
577         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
578         cleanup.
579         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
580         Use xfree directly instead of a cleanup.
581         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
582         Adjust to use gdbscm_wrap and scoped_value_mark.
583         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
584         (gdbscm_value_address, gdbscm_value_dereference)
585         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
586         scoped_value_mark.
587         (gdbscm_value_dynamic_type): Use scoped_value_mark.
588         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
589         scoped_value_mark.
590         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
591         gdbscm_wrap and scoped_value_mark.
592         (gdbscm_value_to_string): Use xfree directly instead of a
593         cleanup.  Move 'buffer' unique_ptr to TRY scope.
594         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
595         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
596         scoped_value_mark.
597         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
598         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
599         scoped_value_mark.
600         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
601         gdbscm_wrap.
602
603 2018-07-18  Tom de Vries  <tdevries@suse.de>
604
605         * findvar.c (default_read_var_value): Also resolve dynamic type for
606         LOC_OPTIMIZED_OUT vars.
607
608 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
609
610         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
611         decoding.
612
613 2018-07-17  Tom Tromey  <tom@tromey.com>
614
615         * guile/scm-param.c (pascm_set_func, pascm_show_func)
616         (compute_enum_list, pascm_set_param_value_x)
617         (gdbscm_parameter_value): Update.
618         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
619         (gdbscm_scm_to_host_string): Update.
620         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
621         Update.
622         * guile/scm-cmd.c (cmdscm_add_completion): Update.
623         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
624         * guile/scm-string.c (gdbscm_scm_to_string): Return
625         unique_xmalloc_ptr.
626         (gdbscm_scm_to_host_string): Likewise.
627
628 2018-07-17  Tom Tromey  <tom@tromey.com>
629
630         * guile/guile.c (gdbscm_eval_from_control_command): Update.
631         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
632         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
633         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
634         unique_xmalloc_ptr.
635
636 2018-07-17  Tom Tromey  <tom@tromey.com>
637
638         * guile/scm-param.c (pascm_signal_setshow_error): Update.
639         * guile/guile-internal.h (gdbscm_exception_message_to_string):
640         Update.
641         * guile/scm-cmd.c (cmdscm_function): Update.
642         * guile/scm-pretty-print.c
643         (ppscm_print_exception_unless_memory_error): Update.
644         * guile/scm-exception.c (gdbscm_exception_message_to_string):
645         Return unique_xmalloc_ptr.
646
647 2018-07-17  Tom Tromey  <tom@tromey.com>
648
649         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
650         Use string_printf.
651
652 2018-07-17  Jim Wilson  <jimw@sifive.com>
653
654         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
655         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
656         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
657         unecessary braces after EF_RISCV_RVC test.  Delete call to
658         set_gdbarch_decr_pc_after_break.
659
660         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
661         RISCV_LAST_FP_REGNUM + 1.
662         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
663
664 2018-07-17  Tom Tromey  <tom@tromey.com>
665
666         * configure.ac: Remove --disable-gdbcli.
667         * configure: Rebuild.
668         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
669         (SUBDIR_CLI_CFLAGS): Remove.
670         (SFILES): Use SUBDIR_CLI_SRCS.
671         (COMMON_OBS): Use SUBDIR_CLI_OBS.
672
673 2018-07-17  Tom Tromey  <tom@tromey.com>
674
675         PR gdb/18624:
676         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
677
678 2018-07-16  Jim Wilson  <jimw@sifive.com>
679
680         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
681
682 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
683
684         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
685         variable.
686         (libunwind_frame_sniffer): Likewise.
687         (libunwind_frame_prev_register): Likewise.
688         (libunwind_sigtramp_frame_sniffer): Likewise.
689         * ia64-tdep.c (ia64_access_reg): Likewise.
690         (ia64_access_rse_reg): Likewise.
691         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
692         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
693
694 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
695
696         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
697
698 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
699
700         * remote-sim.c (gdbsim_target::close,
701         gdbsim_target::mourn_inferior): Remove unused variables.
702
703 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
704
705         * ia64-tdep.c (ktab_buf): New global.
706         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
707         (get_kernel_table): Adjust.
708
709 2018-07-16  Tom Tromey  <tom@tromey.com>
710
711         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
712         * dwarf2read.c (using_directives, new_symbol): Use
713         outermost_context_p.
714         * dbxread.c (process_one_symbol): Use outermost_context_p.
715         * coffread.c (coff_symtab_read): Use outermost_context_p.
716
717 2018-07-16  Tom Tromey  <tom@tromey.com>
718
719         * dwarf2read.c (using_directives, read_func_scope)
720         (read_lexical_block_scope): Update.
721         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
722         * buildsym.h (local_using_directives, global_using_directives):
723         Don't declare.
724         (get_local_using_directives, set_local_using_directives)
725         (get_global_using_directives): Declare.
726         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
727         m_global_using_directives>: New members.
728         (finish_block_internal, prepare_for_building)
729         (reset_symtab_globals, end_symtab_get_static_block)
730         (push_context): Update.
731         (get_local_using_directives, set_local_using_directives)
732         (get_global_using_directives): New functions.
733         (buildsym_init): Update.
734
735 2018-07-16  Tom Tromey  <tom@tromey.com>
736
737         * xcoffread.c (xcoff_initial_scan): Don't call
738         free_pending_blocks.
739         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
740         * buildsym.h (class scoped_free_pendings): Add constructor.
741         (free_pending_blocks): Don't declare.
742         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
743         (free_pending_blocks): Now static.
744
745 2018-07-16  Tom Tromey  <tom@tromey.com>
746
747         * buildsym.h (push_subfile, pop_subfile): Update declarations.
748         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
749         member.
750         (struct subfile_stack): Remove.
751         (subfile_stack): Remove.
752         (push_subfile, pop_subfile, buildsym_init): Update.
753
754 2018-07-16  Tom Tromey  <tom@tromey.com>
755
756         * buildsym.c (push_subfile): Use gdb_assert.
757         (pop_subfile): Use gdb_assert.
758
759 2018-07-16  Tom Tromey  <tom@tromey.com>
760
761         * buildsym.h (merge_symbol_lists): Remove.
762         * buildsym.c (merge_symbol_lists): Remove.
763
764 2018-07-16  Tom Tromey  <tom@tromey.com>
765
766         * stabsread.c (scan_file_globals): Update comment.
767         * stabsread.h (scan_file_globals): Move from buildsym.h.
768         * buildsym.h (scan_file_globals): Move to stabsread.h.
769
770 2018-07-16  Tom Tromey  <tom@tromey.com>
771
772         * xcoffread.c (xcoff_new_init): Update.
773         * mipsread.c (mipscoff_new_init): Update.
774         * mdebugread.c (mdebug_build_psymtabs): Update.
775         * elfread.c (elf_new_init): Update.
776         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
777         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
778         * buildsym.h (buildsym_new_init): Don't declare.
779         * buildsym.c (buildsym_new_init): Remove.
780
781 2018-07-16  Tom Tromey  <tom@tromey.com>
782
783         * stabsread.h (within_function): Move from buildsym.h.
784         * stabsread.c (start_stabs): Clear within_function.
785         * coffread.c (coff_start_symtab): Clear within_function.
786         * buildsym.h (within_function): Move to stabsread.h.
787         * buildsym.c (prepare_for_building): Update.
788
789 2018-07-16  Tom Tromey  <tom@tromey.com>
790
791         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
792         * dwarf2read.c (dwarf2_start_symtab): Don't set
793         processing_gcc_compilation.
794         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
795
796 2018-07-16  Tom Tromey  <tom@tromey.com>
797
798         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
799         (next_symbol_text_func): Move from buildsym.h.
800         * stabsread.c (hashname): Move from buildsym.c.
801         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
802         (next_symbol_text_func, hashname): Move to stabsread.h.
803         * buildsym.c: Don't include bcache.h
804         (hashname): Move to stasbread.c.
805
806 2018-07-16  Tom Tromey  <tom@tromey.com>
807
808         * buildsym.h (context_stack_size): Don't declare.
809         * buildsym.c (context_stack_size): New global.
810
811 2018-07-16  Tom Tromey  <tom@tromey.com>
812
813         * dbxread.c (processing_acc_compilation): New global.
814         * buildsym.h (processing_acc_compilation): Don't declare.
815
816 2018-07-16  Tom Tromey  <tom@tromey.com>
817
818         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
819         * dbxread.c (read_ofile_symtab): Update.
820         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
821         * buildsym.h (last_source_start_addr): Remove.
822         (set_last_source_start_addr, get_last_source_start_addr):
823         Declare.
824         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
825         parameter.
826         (struct buildsym_compunit) <m_last_source_start_addr>: New
827         member.
828         (prepare_for_building): Remove start_addr parameter.
829         (start_symtab, restart_symtab, end_symtab_get_static_block)
830         (end_symtab_with_blockvector): Update.
831         (set_last_source_start_addr, get_last_source_start_addr): New
832         functions.
833
834 2018-07-16  Tom Tromey  <tom@tromey.com>
835
836         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
837         member.
838         (have_line_numbers): Remove.
839         (record_line, prepare_for_building, end_symtab_get_static_block)
840         (augment_type_symtab): Update.
841
842 2018-07-16  Tom Tromey  <tom@tromey.com>
843
844         * buildsym.c (~buildsym_compunit): Free the macro table.
845         (struct buildsym_compunit) <get_macro_table, release_macros>: New
846         methods.
847         <m_pending_macros>: New member.
848         (pending_macros): Remove.
849         (~scoped_free_pendings, get_macro_table, prepare_for_building)
850         (reset_symtab_globals, end_symtab_get_static_block)
851         (end_symtab_with_blockvector, augment_type_symtab)
852         (buildsym_init): Update.
853
854 2018-07-16  Tom Tromey  <tom@tromey.com>
855
856         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
857         parameter.
858         (buildsym_compunit::set_last_source_file): New method.
859         <m_last_source_file>: New member.
860         (prepare_for_building): Remove "name" parameter.
861         (start_symtab, restart_symtab, reset_symtab_globals): Update.
862         (last_source_file): Remove.
863         (set_last_source_file, get_last_source_file): Update.
864
865 2018-07-16  Tom Tromey  <tom@tromey.com>
866
867         * buildsym.c (prepare_for_building): Add assert.
868
869 2018-07-16  Tom Tromey  <tom@tromey.com>
870
871         * buildsym.c (~buildsym_compunit): Update.
872         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
873         (start_subfile, patch_subfile_names)
874         (end_symtab_with_blockvector): Update.
875
876 2018-07-16  Tom Tromey  <tom@tromey.com>
877
878         * buildsym.c (struct buildsym_compunit): Add constructor,
879         destructor, initializers.
880         (start_buildsym_compunit): Remove.
881         (free_buildsym_compunit): Use "delete".
882         (start_symtab, restart_symtab): Use "new".
883
884 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
885
886         * symfile.c (set_objfile_default_section_offset): Remove struct
887         keyword.
888
889 2018-07-14  Stafford Horne  <shorne@gmail.com>
890
891         * (Responsible Maintainers): Add myself as or1k maintainer.
892
893 2018-07-13  Tom Tromey  <tom@tromey.com>
894
895         * symfile.c (set_objfile_default_section_offset): Use extra braces
896         around initializer.
897
898 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
899
900         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
901         non-branching basr.
902
903 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
904
905         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
906         unittests/cli-utils-selftests.c
907         * unittests/cli-utils-selftests.c: New file.
908
909 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
910
911         * NEWS: Mention new commands. Mention change to 'thread apply'.
912
913 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
914
915         * thread.c (thr_try_catch_cmd): New function.
916         (thread_apply_all_command): Handle qcs flags.
917         (thread_apply_command): Handle qcs flags.
918         (taas_command): New function.
919         (tfaas_command): New function.
920         (_initialize_thread): Update to setup the new commands 'taas
921         and 'tfaas'. Change doc string for 'thread apply'.
922
923 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
924
925         * stack.c: (trailing_outermost_frame): New function, mostly
926         extracted from backtrace_command_1.
927         (leading_innermost_frame): New function.
928         (backtrace_command_1): Update to call trailing_outermost_frame.
929         (frame_apply_command_count): New function.
930         (frame_apply_level_command): New function.
931         (frame_apply_all_command): New function.
932         (frame_apply_command): New function.
933         (faas_command): New function.
934         (frame_cmd_list): New variable.
935         (_initialize_stack): Update to setup the new commands 'frame apply'
936         and 'faas'.
937
938 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
939
940         * cli-utils.c (number_or_range_parser::get_number): Only handle
941         numbers or convenience var as numbers.
942         (parse_flags): New function.
943         (parse_flags_qcs): New function.
944         (number_or_range_parser::finished): Ensure parsing end is detected
945         before end of string.
946         * cli-utils.h (parse_flags): New function.
947         (parse_flags_qcs): New function.
948         (number_or_range_parser): Remove m_finished bool.
949         (number_or_range_parser::skip_range): Set m_in_range to false.
950
951 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
952
953         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
954         on Windows.
955
956 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
957             Jan Kratochvil  <jan.kratochvil@redhat.com>
958             Paul Fertser  <fercerpav@gmail.com>
959             Tsutomu Seki  <sekiriki@gmail.com>
960             Pedro Alves  <palves@redhat.com>
961
962         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
963         'unittests/parse-connection-spec-selftests.c'.
964         (COMMON_SFILES): Add 'common/netstuff.c'.
965         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
966         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
967         * common/netstuff.c: New file.
968         * common/netstuff.h: New file.
969         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
970         (wait_for_connect): Update comment.  New parameter
971         'gdb::optional<int> sock' instead of 'struct serial *scb'.
972         Use 'sock' directly instead of 'scb->fd'.
973         (try_connect): New function, with code from 'net_open'.
974         (net_open): Rewrite main loop to deal with multiple
975         sockets/addresses.  Handle IPv6-style hostnames; implement
976         support for IPv6 connections.
977         * unittests/parse-connection-spec-selftests.c: New file.
978
979 2018-07-11  Pedro Alves  <palves@redhat.com>
980
981         PR gdb/23377
982         * remote.c (remote_target::remote_detach_pid): Call
983         set_current_process.
984
985 2018-07-11  Pedro Alves  <palves@redhat.com>
986
987         * h8300-tdep.c (h8300_gdbarch_init): Remove
988         set_gdbarch_ecoff_reg_to_regnum calls.
989
990 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
991
992         PR c++/23373
993         * c-typeprint.c (c_type_print_base_struct_union): Don't print
994         offsets/sizes for static members of a class/struct.
995
996 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
997
998         * target-descriptions.c (tdesc_register_bitsize): Rename.
999         * target-descriptions.h (tdesc_register_bitsize): Likewise.
1000         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1001         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1002
1003 2018-07-10  Tom Tromey  <tom@tromey.com>
1004
1005         * breakpoint.c (moribund_locations): Now static and a
1006         std::vector.
1007         (breakpoint_init_inferior, moribund_breakpoint_here_p)
1008         (build_bpstat_chain, update_global_location_list)
1009         (breakpoint_retire_moribund): Update.
1010         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
1011         VEC.
1012
1013 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1014
1015         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1016         (riscv_register_reggroup_p): Use new function, remove unneeded
1017         parenthesis.
1018         (riscv_push_dummy_call): Extend assert to compare against xlen or
1019         flen based on register type.
1020
1021 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1022
1023         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1024
1025 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1026
1027         * remote.c (show_hardware_watchpoint_limit): New function.
1028         (show_hardware_watchpoint_length_limit): New function.
1029         (show_hardware_breakpoint_limit): New function.
1030         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1031         where appropriate, update help text.
1032
1033 2018-07-09  Tom Tromey  <tom@tromey.com>
1034
1035         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1036         (CLIBS): Don't mention NAT_CLIBS.
1037
1038 2018-07-09  Tom Tromey  <tom@tromey.com>
1039
1040         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1041         (LIBGDB_OBS, clean mostlyclean): Update.
1042         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1043
1044 2018-07-09  Tom Tromey  <tom@tromey.com>
1045
1046         * Makefile.in (%.c: %.y): Use ECHO_YACC.
1047         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
1048         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1049
1050 2018-07-09  Tom Tromey  <tom@tromey.com>
1051
1052         * Makefile.in (ALLDEPFILES): Remove exec.c.
1053         (COMMON_OBS): Remove exec.o.
1054         (COMMON_SFILES): Add exec.c.
1055
1056 2018-07-09  Tom Tromey  <tom@tromey.com>
1057
1058         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
1059
1060 2018-07-09  Tom Tromey  <tom@tromey.com>
1061
1062         * Makefile.in (clean mostlyclean): Remove stamp-version.
1063         (version.c): Depend on stamp-version.
1064         (stamp-version): New rule, from version.c rule.
1065
1066 2018-07-09  Tom Tromey  <tom@tromey.com>
1067
1068         * Makefile.in (init.c): Depend on stamp-init.
1069         (stamp-init): New rule, from init.c rule.
1070         (clean mostlyclean): Remove stamp-init.
1071
1072 2018-07-09  Tom Tromey  <tom@tromey.com>
1073
1074         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
1075         SUBDIR_GCC_COMPILE_SRCS.
1076
1077 2018-07-09  Tom Tromey  <tom@tromey.com>
1078
1079         * Makefile.in (init.c): Remove some unused sed rules.
1080
1081 2018-07-09  Tom Tromey  <tom@tromey.com>
1082
1083         * Makefile.in (TSOBS): Remove.
1084         (INIT_FILES): Update.
1085         (LIBGDB_OBS): Update.
1086         (COMMON_SFILES): Add inflow.c.
1087         (SFILES): Remove inflow.c.
1088
1089 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
1090
1091         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1092
1093 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
1094
1095         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
1096         get_saveloc_name, is_signal_frame_name, step_name,
1097         init_remote_name, create_addr_space_name,
1098         destroy_addr_space_name, search_unwind_table_name,
1099         find_dyn_list_name): Constify.
1100
1101 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
1102
1103         * darwin-nat.c (darwin_pthread_kill): New function.
1104         (darwin_resume_thread): Use darwin_pthread_kill.
1105
1106 2018-07-05  Tom de Vries  <tdevries@suse.de>
1107
1108         * macroexp.c (macro_buffer) <operator=>: New member function.
1109
1110 2018-07-04  Tom Tromey  <tom@tromey.com>
1111
1112         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
1113
1114 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
1115
1116         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
1117         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
1118         * maint.c: Likewise.
1119         * top.c: Likewise.
1120
1121 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
1122
1123         * NEWS: Create a new section for the next release branch.
1124         Rename the section of the current branch, now that it has
1125         been cut.
1126
1127 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
1128
1129         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
1130         * version.in: Bump version to 8.2.50.DATE-git.
1131
1132 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
1133             Pedro Alves  <palves@redhat.com>
1134
1135         * linux-nat.c (linux_init_ptrace): Rename to ...
1136         (linux_init_ptrace_procfs): ... this.  Call
1137         linux_proc_init_warnings.
1138         (linux_nat_target::post_attach)
1139         (linux_nat_target::post_startup_inferior): Adjust.
1140         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
1141         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
1142
1143 2018-07-04  Tom de Vries  <tdevries@suse.de>
1144
1145         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
1146         check ...
1147         (read_comp_unit_head): ... here.
1148
1149 2018-07-03  Tom Tromey  <tom@tromey.com>
1150
1151         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
1152         (stop_tracing, tstatus_command)
1153         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
1154         (print_one_static_tracepoint_marker): Update.
1155         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
1156         std::vector.
1157         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
1158         VEC.
1159         (all_tracepoints, static_tracepoints_here): Return std::vector.
1160
1161 2018-07-03  Tom Tromey  <tom@tromey.com>
1162
1163         * common/ptid.c (ptid_equal): Remove.
1164         * common/ptid.h (ptid_equal): Don't declare.
1165         * ada-tasks.c: Update.
1166         * breakpoint.c: Update.
1167         * common/agent.c: Update.
1168         * corelow.c: Update.
1169         * darwin-nat-info.c: Update.
1170         * darwin-nat.c: Update.
1171         * dcache.c: Update.
1172         * dtrace-probe.c: Update.
1173         * dummy-frame.c: Update.
1174         * fbsd-nat.c: Update.
1175         * frame.c: Update.
1176         * gdbthread.h: Update.
1177         * gnu-nat.c: Update.
1178         * go32-nat.c: Update.
1179         * inf-loop.c: Update.
1180         * inf-ptrace.c: Update.
1181         * infcall.c: Update.
1182         * infcmd.c: Update.
1183         * inflow.c: Update.
1184         * infrun.c: Update.
1185         * linux-fork.c: Update.
1186         * linux-nat.c: Update.
1187         * linux-thread-db.c: Update.
1188         * mi/mi-cmd-var.c: Update.
1189         * mi/mi-interp.c: Update.
1190         * mi/mi-main.c: Update.
1191         * nto-procfs.c: Update.
1192         * ppc-linux-tdep.c: Update.
1193         * procfs.c: Update.
1194         * python/py-inferior.c: Update.
1195         * python/py-record-btrace.c: Update.
1196         * python/py-record.c: Update.
1197         * ravenscar-thread.c: Update.
1198         * regcache.c: Update.
1199         * remote-sim.c: Update.
1200         * remote.c: Update.
1201         * sol-thread.c: Update.
1202         * solib.c: Update.
1203         * target.c: Update.
1204         * tui/tui-stack.c: Update.
1205         * varobj.c: Update.
1206         * windows-nat.c: Update.
1207         * windows-tdep.c: Update.
1208
1209 2018-07-03  Tom Tromey  <tom@tromey.com>
1210
1211         * common/ptid.c (ptid_match): Remove.
1212         * common/ptid.h (ptid_match): Don't declare.
1213         * fbsd-nat.c: Update.
1214         * infcmd.c: Update.
1215         * infrun.c: Update.
1216         * linux-nat.c: Update.
1217         * record-btrace.c: Update.
1218         * regcache.c: Update.
1219         * remote.c: Update.
1220
1221 2018-07-03  Tom Tromey  <tom@tromey.com>
1222
1223         * common/ptid.c (ptid_tid_p): Remove.
1224         * common/ptid.h (ptid_tid_p): Don't declare.
1225         * sol-thread.c: Update.
1226
1227 2018-07-03  Tom Tromey  <tom@tromey.com>
1228
1229         * common/ptid.c (ptid_lwp_p): Remove.
1230         * common/ptid.h (ptid_lwp_p): Don't declare.
1231         * fbsd-nat.c: Update.
1232         * linux-nat.c: Update.
1233         * nat/linux-procfs.c: Update.
1234         * nat/x86-linux-dregs.c: Update.
1235         * sol-thread.c: Update.
1236
1237 2018-07-03  Tom Tromey  <tom@tromey.com>
1238
1239         * common/ptid.c (ptid_is_pid): Remove.
1240         * common/ptid.h (ptid_is_pid): Don't declare.
1241         * infrun.c: Update.
1242         * linux-nat.c: Update.
1243         * mi/mi-interp.c: Update.
1244         * remote.c: Update.
1245         * thread.c: Update.
1246
1247 2018-07-03  Tom Tromey  <tom@tromey.com>
1248
1249         * common/ptid.c (ptid_get_tid): Remove.
1250         * common/ptid.h (ptid_get_tid): Don't declare.
1251         * ada-tasks.c: Update.
1252         * aix-thread.c: Update.
1253         * bsd-uthread.c: Update.
1254         * darwin-nat.c: Update.
1255         * fbsd-nat.c: Update.
1256         * i386-darwin-nat.c: Update.
1257         * infrun.c: Update.
1258         * linux-tdep.c: Update.
1259         * nto-procfs.c: Update.
1260         * ppc-ravenscar-thread.c: Update.
1261         * python/py-infthread.c: Update.
1262         * ravenscar-thread.c: Update.
1263         * sol-thread.c: Update.
1264         * sparc-ravenscar-thread.c: Update.
1265         * windows-nat.c: Update.
1266
1267 2018-07-03  Tom Tromey  <tom@tromey.com>
1268
1269         * common/ptid.c (ptid_get_lwp): Remove.
1270         * common/ptid.h (ptid_get_lwp): Don't declare.
1271         * aarch64-linux-nat.c: Update.
1272         * ada-tasks.c: Update.
1273         * aix-thread.c: Update.
1274         * amd64-linux-nat.c: Update.
1275         * arm-linux-nat.c: Update.
1276         * corelow.c: Update.
1277         * fbsd-nat.c: Update.
1278         * fbsd-tdep.c: Update.
1279         * gnu-nat.c: Update.
1280         * i386-cygwin-tdep.c: Update.
1281         * i386-gnu-nat.c: Update.
1282         * i386-linux-nat.c: Update.
1283         * ia64-linux-nat.c: Update.
1284         * inf-ptrace.c: Update.
1285         * infrun.c: Update.
1286         * linux-fork.c: Update.
1287         * linux-nat.c: Update.
1288         * linux-tdep.c: Update.
1289         * linux-thread-db.c: Update.
1290         * mips-linux-nat.c: Update.
1291         * nat/aarch64-linux-hw-point.c: Update.
1292         * nat/aarch64-linux.c: Update.
1293         * nat/linux-btrace.c: Update.
1294         * nat/linux-osdata.c: Update.
1295         * nat/linux-procfs.c: Update.
1296         * nat/x86-linux-dregs.c: Update.
1297         * obsd-nat.c: Update.
1298         * ppc-fbsd-nat.c: Update.
1299         * ppc-linux-nat.c: Update.
1300         * procfs.c: Update.
1301         * python/py-infthread.c: Update.
1302         * ravenscar-thread.c: Update.
1303         * remote.c: Update.
1304         * s390-linux-nat.c: Update.
1305         * sol-thread.c: Update.
1306         * sol2-tdep.c: Update.
1307         * spu-linux-nat.c: Update.
1308         * x86-linux-nat.c: Update.
1309         * xtensa-linux-nat.c: Update.
1310
1311 2018-07-03  Tom Tromey  <tom@tromey.com>
1312
1313         * common/ptid.c (ptid_get_pid): Remove.
1314         * common/ptid.h (ptid_get_pid): Don't declare.
1315         * aarch64-linux-nat.c: Update.
1316         * ada-lang.c: Update.
1317         * aix-thread.c: Update.
1318         * alpha-bsd-nat.c: Update.
1319         * amd64-fbsd-nat.c: Update.
1320         * amd64-linux-nat.c: Update.
1321         * arm-linux-nat.c: Update.
1322         * arm-nbsd-nat.c: Update.
1323         * auxv.c: Update.
1324         * break-catch-syscall.c: Update.
1325         * breakpoint.c: Update.
1326         * bsd-uthread.c: Update.
1327         * corelow.c: Update.
1328         * ctf.c: Update.
1329         * darwin-nat.c: Update.
1330         * fbsd-nat.c: Update.
1331         * fbsd-tdep.c: Update.
1332         * gcore.c: Update.
1333         * gnu-nat.c: Update.
1334         * hppa-nbsd-nat.c: Update.
1335         * hppa-obsd-nat.c: Update.
1336         * i386-fbsd-nat.c: Update.
1337         * ia64-linux-nat.c: Update.
1338         * inf-ptrace.c: Update.
1339         * infcmd.c: Update.
1340         * inferior.c: Update.
1341         * inferior.h: Update.
1342         * inflow.c: Update.
1343         * infrun.c: Update.
1344         * linux-fork.c: Update.
1345         * linux-nat.c: Update.
1346         * linux-tdep.c: Update.
1347         * linux-thread-db.c: Update.
1348         * m68k-bsd-nat.c: Update.
1349         * mi/mi-interp.c: Update.
1350         * mi/mi-main.c: Update.
1351         * mips-linux-nat.c: Update.
1352         * mips-nbsd-nat.c: Update.
1353         * mips64-obsd-nat.c: Update.
1354         * nat/aarch64-linux-hw-point.c: Update.
1355         * nat/aarch64-linux.c: Update.
1356         * nat/linux-btrace.c: Update.
1357         * nat/linux-osdata.c: Update.
1358         * nat/linux-procfs.c: Update.
1359         * nat/x86-linux-dregs.c: Update.
1360         * nto-procfs.c: Update.
1361         * obsd-nat.c: Update.
1362         * ppc-linux-nat.c: Update.
1363         * ppc-nbsd-nat.c: Update.
1364         * ppc-obsd-nat.c: Update.
1365         * proc-service.c: Update.
1366         * procfs.c: Update.
1367         * python/py-inferior.c: Update.
1368         * python/py-infthread.c: Update.
1369         * ravenscar-thread.c: Update.
1370         * record.c: Update.
1371         * remote-sim.c: Update.
1372         * remote.c: Update.
1373         * rs6000-nat.c: Update.
1374         * s390-linux-nat.c: Update.
1375         * sh-nbsd-nat.c: Update.
1376         * sol-thread.c: Update.
1377         * sparc-nat.c: Update.
1378         * sparc64-tdep.c: Update.
1379         * spu-linux-nat.c: Update.
1380         * spu-tdep.c: Update.
1381         * target-debug.h: Update.
1382         * target.c: Update.
1383         * thread.c: Update.
1384         * tid-parse.c: Update.
1385         * tracefile-tfile.c: Update.
1386         * vax-bsd-nat.c: Update.
1387         * windows-nat.c: Update.
1388         * x86-linux-nat.c: Update.
1389         * x86-nat.c: Update.
1390
1391 2018-07-03  Tom Tromey  <tom@tromey.com>
1392
1393         * common/ptid.c (pid_to_ptid): Remove.
1394         * common/ptid.h (pid_to_ptid): Don't declare.
1395         * aix-thread.c: Update.
1396         * arm-linux-nat.c: Update.
1397         * common/ptid.c: Update.
1398         * common/ptid.h: Update.
1399         * corelow.c: Update.
1400         * ctf.c: Update.
1401         * darwin-nat.c: Update.
1402         * fbsd-nat.c: Update.
1403         * fork-child.c: Update.
1404         * gnu-nat.c: Update.
1405         * go32-nat.c: Update.
1406         * inf-ptrace.c: Update.
1407         * infcmd.c: Update.
1408         * inferior.c: Update.
1409         * infrun.c: Update.
1410         * linux-fork.c: Update.
1411         * linux-nat.c: Update.
1412         * nat/aarch64-linux-hw-point.c: Update.
1413         * nat/fork-inferior.c: Update.
1414         * nat/x86-linux-dregs.c: Update.
1415         * nto-procfs.c: Update.
1416         * obsd-nat.c: Update.
1417         * procfs.c: Update.
1418         * progspace.c: Update.
1419         * remote.c: Update.
1420         * rs6000-nat.c: Update.
1421         * s390-linux-nat.c: Update.
1422         * sol-thread.c: Update.
1423         * spu-linux-nat.c: Update.
1424         * target.c: Update.
1425         * top.c: Update.
1426         * tracefile-tfile.c: Update.
1427         * windows-nat.c: Update.
1428
1429 2018-07-03  Tom Tromey  <tom@tromey.com>
1430
1431         * common/ptid.h (ptid_build): Don't declare.
1432         * common/ptid.c (ptid_build): Remove.
1433         * aix-thread.c: Update.
1434         * bsd-kvm.c: Update.
1435         * bsd-uthread.c: Update.
1436         * common/agent.c: Update.
1437         * common/ptid.c: Update.
1438         * common/ptid.h: Update.
1439         * corelow.c: Update.
1440         * darwin-nat.c: Update.
1441         * fbsd-nat.c: Update.
1442         * gnu-nat.c: Update.
1443         * linux-fork.c: Update.
1444         * linux-nat.c: Update.
1445         * linux-thread-db.c: Update.
1446         * nat/linux-osdata.c: Update.
1447         * nat/linux-procfs.c: Update.
1448         * nto-procfs.c: Update.
1449         * obsd-nat.c: Update.
1450         * proc-service.c: Update.
1451         * procfs.c: Update.
1452         * ravenscar-thread.c: Update.
1453         * remote-sim.c: Update.
1454         * remote.c: Update.
1455         * sol-thread.c: Update.
1456         * target.c: Update.
1457         * windows-nat.c: Update.
1458
1459 2018-07-03  Tom Tromey  <tom@tromey.com>
1460
1461         * infrun.c (follow_exec): Use exit_inferior_silent.
1462         * inferior.c (exit_inferior_num_silent): Remove.
1463         * inferior.h (exit_inferior_num_silent): Don't declare.
1464
1465 2018-07-03  Tom Tromey  <tom@tromey.com>
1466
1467         PR cli/23340:
1468         * darwin-nat.c (darwin_attach_pid): Reset inferior and
1469         inferior_ptid on error.
1470
1471 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
1472             Simon Marchi  <simon.marchi@polymtl.ca>
1473
1474         PR tdep/8282
1475         * disasm.h (gdb_disassembler): Add
1476         `m_disassembler_options_holder'. member
1477         * disasm.c (get_all_disassembler_options): New function.
1478         (gdb_disassembler::gdb_disassembler): Use it.
1479         (gdb_buffered_insn_length_init_dis): Likewise.
1480         (gdb_buffered_insn_length): Adjust accordingly.
1481         (set_disassembler_options): Handle options with arguments.
1482         (show_disassembler_options_sfunc): Likewise.  Add a leading new
1483         line if showing options with descriptions.
1484         (disassembler_options_completer): Adapt to using the
1485         `disasm_options_and_args_t' structure.
1486         * mips-tdep.c (mips_disassembler_options): New variable.
1487         (mips_disassembler_options_o32): Likewise.
1488         (mips_disassembler_options_n32): Likewise.
1489         (mips_disassembler_options_n64): Likewise.
1490         (gdb_print_insn_mips): Don't set `disassembler_options'.
1491         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
1492         functions.
1493         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
1494         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
1495         `gdbarch_disassembler_options_implicit' and
1496         `gdbarch_valid_disassembler_options'.
1497         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
1498         `disasm_options_and_args_t' structure.
1499         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
1500         method.
1501         (valid_disassembler_options): Switch from `disasm_options_t' to
1502         the `disasm_options_and_args_t' structure.
1503         * NEWS: Document `set disassembler-options' support for the MIPS
1504         target.
1505         * gdbarch.h: Regenerate.
1506         * gdbarch.c: Regenerate.
1507
1508 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
1509
1510         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
1511
1512 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
1513
1514         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
1515         parameter in call to amd64_target_description.
1516         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
1517         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
1518         (amd64fbsd_init_abi): Likewise.
1519         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
1520         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
1521         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
1522         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
1523
1524 2018-06-29  Pedro Alves  <palves@redhat.com>
1525
1526         * gdb/amd64-tdep.h (amd64_create_target_description): Add
1527         "segments" parameter.
1528         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
1529         (_initialize_amd64_tdep): Update call to
1530         amd64_create_target_description.
1531         (amd64_target_description): Add "segments" parameter.  Adjust
1532         the implementation to use it.
1533         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
1534         call to amd64_create_target_description.
1535         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
1536         * gdb/arch/amd64.h (amd64_create_target_description): Add
1537         "segments" register.
1538         * gdb/arch/amd64.c (amd64_create_target_description): Add
1539         "segments" parameter.  Call create_feature_i386_64bit_segments
1540         only if SEGMENTS is true.
1541         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
1542         call to amd64_create_target_description.
1543
1544 2018-06-29  Pedro Alves  <palves@redhat.com>
1545
1546         * thread.c (thread_target_id_str): New, factored out from ...
1547         (print_thread_info_1): ... here.  Use it to compute the max
1548         "Target Id" column width.
1549
1550 2018-06-29  Pedro Alves  <palves@redhat.com>
1551
1552         * remote.c (remote_target::extra_thread_info): Delete
1553         'display_buf' and 'n' locals.  from the cache, regardless of
1554         packet mechanims is in use.  Use cache for qThreadExtra and qP
1555         methods too.
1556
1557 2018-06-29  Pedro Alves  <palves@redhat.com>
1558
1559         * blockframe.c (find_pc_sect_containing_function): New function.
1560         * breakpoint.c (print_breakpoint_location): Don't call
1561         find_pc_sect_function.
1562         * linespec.c (create_sals_line_offset): Record the location's
1563         symbol in the sal.
1564         * linespec.c (convert_address_location_to_sals): Fill in sal's
1565         symbol with find_pc_sect_containing_function.
1566         * symtab.c (find_function_start_sal): Rename to ...
1567         (find_function_start_sal_1): ... this.
1568         (find_function_start_sal): Reimplement as wrapper around
1569         find_function_start_sal_1, and use
1570         find_pc_sect_containing_function to fill in the sal's symbol.
1571         (find_function_start_sal(symbol*, bool)): Adjust.
1572         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
1573         comments.
1574         (find_pc_sect_containing_function): Declare.
1575
1576 2018-06-29  Pedro Alves  <palves@redhat.com>
1577
1578         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
1579         true if the the location has no symbol.
1580
1581 2018-06-28  Tom Tromey  <tom@tromey.com>
1582
1583         * NEWS: Mention --enable-codesign.
1584         * silent-rules.mk (ECHO_SIGN): New variable.
1585         * configure.ac: Add --enable-codesign.
1586         * configure: Rebuild.
1587         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
1588         (gdb$(EXEEXT)): Optionally invoke codesign.
1589
1590 2018-06-28  Pedro Alves  <palves@redhat.com>
1591
1592         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
1593         comments.
1594         (switch_to_thread_no_regs): Adjust comment.
1595         * infcmd.c (stop_pc): Delete.
1596         (post_create_inferior, info_program_command): Replace references
1597         to stop_pc with references to thread_info->suspend.stop_pc.
1598         * inferior.h (stop_pc): Delete declaration.
1599         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
1600         (handle_inferior_event_1, handle_signal_stop)
1601         (process_event_stop_test, keep_going_stepped_thread)
1602         (handle_step_into_function, handle_step_into_function_backward)
1603         (print_stop_location): Replace references to stop_pc with
1604         references to thread_info->suspend.stop_pc.
1605         (struct infcall_suspend_state) <stop_pc>: Delete field.
1606         (save_infcall_suspend_state, restore_infcall_suspend_state):
1607         Remove references to inf_stat->stop_pc.
1608         * linux-fork.c (fork_load_infrun_state): Likewise.
1609         * record-btrace.c (record_btrace_set_replay): Likewise.
1610         * record-full.c (record_full_goto_entry): Likewise.
1611         * remote.c (print_one_stopped_thread): Likewise.
1612         * target.c (target_resume): Extend comment.
1613         * thread.c (set_executing_thread): New.
1614         (set_executing): Use it.
1615         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
1616         Remove references to stop_pc.
1617
1618 2018-06-28  Pedro Alves  <palves@redhat.com>
1619
1620         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
1621         Moving fetching stop_pc until after ecs->event_thread is refreshed.
1622
1623 2018-06-28  Tom Tromey  <tom@tromey.com>
1624
1625         * coffread.c (coff_symfile_finish): Update.
1626         * xcoffread.c (xcoff_symfile_finish): Update.
1627         * elfread.c (elf_symfile_finish): Update.
1628         * symfile.h (dwarf2_free_objfile): Don't declare.
1629         * dwarf2read.c (_initialize_dwarf2_read): Use
1630         register_objfile_data_with_cleanup.
1631         (dwarf2_free_objfile): Now static.  Change signature.
1632
1633 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
1634
1635         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
1636         option "-o" to add-symbol-file-load to add an offset to each
1637         section's load address.
1638         * symfile.c (set_objfile_default_section_offset): New function.
1639
1640 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
1641
1642         * symfile.c (add_symbol_file_command): Make sure that sections
1643         with the same name are sorted in the same order.
1644
1645 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
1646
1647         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
1648         require the second argument.  If omitted, load sections at the
1649         addresses specified in the file.
1650
1651 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
1652
1653         * symfile.c (symbol_file_command, symbol_file_add_main_1)
1654         (_initialize_symfile): Add option "-o" to symbol-file to add an
1655         offset to each section of the symbol file.
1656
1657 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
1658
1659         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
1660
1661 2018-06-27  Tom Tromey  <tom@tromey.com>
1662
1663         * stack.c (_initialize_stack): Update "func" help text.
1664
1665 2018-06-27  Tom Tromey  <tom@tromey.com>
1666
1667         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
1668         std::vector.
1669         (unwind_infopy_str, pyuw_create_unwind_info)
1670         (unwind_infopy_add_saved_register, pyuw_sniffer)
1671         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
1672         Update.
1673         (struct saved_reg): Add constructor.
1674         <value>: Now a gdbpy_ref<>.
1675
1676 2018-06-27  Tom Tromey  <tom@tromey.com>
1677
1678         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
1679
1680 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
1681
1682         * gdb-gdb.py.in: Format using autopep8.
1683
1684 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
1685
1686         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
1687         (type_lookup_function): Recognize CORE_ADDR values.
1688
1689 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
1690
1691         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
1692         print tag_name.
1693
1694 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
1695
1696         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
1697         <__lt__>: Add.
1698
1699 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
1700
1701         * gdb-gdb.py: Move to...
1702         * gdb-gdb.py.in: ... here.
1703         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
1704         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
1705         dependencies.
1706         (distclean): Remove gdb-gdb.py when cleaning.
1707         (gdb-gdb.py, gdb-gdb.gdb): New rules.
1708         * configure: Re-generate.
1709
1710 2018-06-27  Pedro Alves  <palves@redhat.com>
1711
1712         * proc-service.c (get_ps_regcache): New.
1713         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1714         (ps_lsetfpregs): Use it.
1715
1716 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
1717
1718         PR gdb/21695
1719         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
1720         (dwarf_decode_lines_1): Adjust.
1721
1722 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
1723
1724         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
1725         override.
1726         <info_proc>: Likewise.
1727
1728 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
1729
1730         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
1731         to windows_fetch_one_register, and only handle the case of
1732         fetching one register.  Move the code that reloads the context
1733         and iterates over all registers if R is negative to...
1734         (windows_nat_target::fetch_registers): ... here.
1735         (do_windows_store_inferior_registers): Rename to
1736         windows_store_one_register, and only handle the case of storing
1737         one register.  Move the code that handles the case where r is
1738         negative to...
1739         (windows_nat_target::store_registers) ... here.
1740
1741 2018-06-26  Tom Tromey  <tom@tromey.com>
1742
1743         PR rust/22574:
1744         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
1745         * rust-lang.c (rust_print_struct_def): Add podata parameter.
1746         Update.
1747         (rust_internal_print_type): Add podata parameter.
1748         (rust_print_type): Update.
1749
1750 2018-06-26  Tom Tromey  <tom@tromey.com>
1751
1752         * typeprint.h (struct print_offset_data) <update, finish,
1753         maybe_print_hole>: New methods.
1754         <indentation>: New constant.
1755         * typeprint.c (print_offset_data::indentation): Define.
1756         (print_offset_data::maybe_print_hole, print_offset_data::update)
1757         (print_offset_data::finish): Move from c-typeprint.c and rename.
1758         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
1759         (print_spaces_filtered_with_print_options): Update.
1760         (c_print_type_union_field_offset, maybe_print_hole)
1761         (c_print_type_struct_field_offset): Move to typeprint.c and
1762         rename.
1763         (c_type_print_base_struct_union): Update.
1764
1765 2018-06-25  Pedro Alves  <palves@redhat.com>
1766
1767         * gdbthread.h (thread_info_ref, delete_thread)
1768         (delete_thread_silent, first_thread_of_inferior)
1769         (any_thread_of_inferior, switch_to_thread)
1770         (enable_thread_stack_temporaries)
1771         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1772         (get_last_thread_stack_temporary)
1773         (value_in_thread_stack_temporaries, can_access_registers_thread):
1774         Spell out "struct thread_info" instead of just "thread_info".
1775         * inferior.h (notice_new_inferior): Likewise.
1776
1777 2018-06-25  Pedro Alves  <palves@redhat.com>
1778
1779         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1780         pass thread_info pointer to delete_thread.
1781         (windows_nat_target::detach): Pass inferior pointer to
1782         detach_inferior.
1783         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
1784         delete_thread.
1785         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
1786         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
1787         and pass a thread_info pointer to delete_thread.
1788         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
1789         pass thread_info pointer to delete_thread.
1790         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
1791         delete_thread_silent call.
1792         * procfs.c (procfs_target::detach): Pass inferior pointer to
1793         detach_inferior.
1794         (procfs_target::wait): Pass thread_info pointer to delete_thread.
1795         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
1796         delete_thread_silent call.
1797         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1798         pass thread_info pointer to delete_thread.
1799         (windows_nat_target::detach): Pass inferior pointer to
1800         delete_inferior.
1801
1802 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
1803
1804         * regcache.c (readable_regcache::read_part): Fix asserts.
1805         (reg_buffer::raw_collect_part): New function.
1806         (regcache::write_part): Fix asserts.
1807         (reg_buffer::raw_supply_part): New function.
1808         (regcache::transfer_regset_register): New helper function.
1809         (regcache::transfer_regset): Call new functions.
1810         (regcache_supply_regset): Use gdb_byte*.
1811         (regcache::supply_regset): Likewise.
1812         (regcache_collect_regset): Likewise.
1813         (regcache::collect_regset): Likewise.
1814         * regcache.h (reg_buffer::raw_collect_part): New declaration.
1815         (reg_buffer::raw_supply_part): Likewise.
1816         (regcache::transfer_regset_register): Likewise.
1817         (regcache::transfer_regset): Use gdb_byte*.
1818
1819 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
1820
1821         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
1822
1823 2018-06-21  Pedro Alves  <palves@redhat.com>
1824
1825         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
1826         instead of a ptid_t.  All callers adjusted.
1827         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
1828         adjusted.
1829         (print_ada_task_info, display_current_task_id, task_command_1):
1830         Adjust.
1831         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
1832         inferior_thread.
1833         (breakpoint_kind): Adjust.
1834         (remove_breakpoints_pid): Rename to ...
1835         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
1836         pointer.  All callers adjusted.
1837         (bpstat_clear_actions): Use inferior_thread.
1838         (get_bpstat_thread): New.
1839         (bpstat_do_actions): Use it.
1840         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
1841         to take a thread_info pointer.  All callers adjusted.
1842         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
1843         (breakpoint_re_set_thread): Use inferior_thread.
1844         * breakpoint.h (struct inferior): Forward declare.
1845         (bpstat_stop_status): Update.
1846         (remove_breakpoints_pid): Delete.
1847         (remove_breakpoints_inf): New.
1848         * bsd-uthread.c (bsd_uthread_target::wait)
1849         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
1850         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
1851         (maint_btrace_packet_history_cmd)
1852         (maint_btrace_clear_packet_history_cmd): Adjust.
1853         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
1854         inferior_thread.
1855         * cli/cli-interp.c: Include "inferior.h".
1856         * common/refcounted-object.h (struct
1857         refcounted_object_ref_policy): New.
1858         * compile/compile-object-load.c: Include gdbthread.h.
1859         (store_regs): Use inferior_thread.
1860         * corelow.c (core_target::close): Use current_inferior.
1861         (core_target_open): Adjust to use first_thread_of_inferior and use
1862         the current inferior.
1863         * ctf.c (ctf_target::close): Adjust to use current_inferior.
1864         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
1865         <thread>: ... this new field.  All references adjusted.
1866         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
1867         Take a thread_info pointer instead of a ptid_t.
1868         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
1869         (dummy_frame_discard, register_dummy_frame_dtor): Take a
1870         thread_info pointer instead of a ptid_t.
1871         * elfread.c: Include "inferior.h".
1872         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
1873         Use inferior_thread.
1874         * eval.c (evaluate_subexp): Likewise.
1875         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
1876         inferior_thread.
1877         * gdb_proc_service.h (struct thread_info): Forward declare.
1878         (struct ps_prochandle) <ptid>: Delete, replaced by ...
1879         <thread>: ... this new field.  All references adjusted.
1880         * gdbarch.h, gdbarch.c: Regenerate.
1881         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
1882         'thread' parameter.  All implementations and callers adjusted.
1883         * gdbthread.h (thread_info) <set_running>: New method.
1884         (delete_thread, delete_thread_silent): Take a thread_info pointer
1885         instead of a ptid.
1886         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
1887         (first_thread_of_process): Delete, replaced by ...
1888         (first_thread_of_inferior): ... this new function.  All callers
1889         adjusted.
1890         (any_live_thread_of_process): Delete, replaced by ...
1891         (any_live_thread_of_inferior): ... this new function.  All callers
1892         adjusted.
1893         (switch_to_thread, switch_to_no_thread): Declare.
1894         (is_executing): Delete.
1895         (enable_thread_stack_temporaries): Update comment.
1896         <enable_thread_stack_temporaries>: Take a thread_info pointer
1897         instead of a ptid_t.  Incref the thread.
1898         <~enable_thread_stack_temporaries>: Decref the thread.
1899         <m_ptid>: Delete
1900         <m_thr>: New.
1901         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1902         (get_last_thread_stack_temporary)
1903         (value_in_thread_stack_temporaries, can_access_registers_thread):
1904         Take a thread_info pointer instead of a ptid_t.  All callers
1905         adjusted.
1906         * infcall.c (get_call_return_value): Use inferior_thread.
1907         (run_inferior_call): Work with thread pointers instead of ptid_t.
1908         (call_function_by_hand_dummy): Work with thread pointers instead
1909         of ptid_t.  Use thread_info_ref.
1910         * infcmd.c (proceed_thread_callback): Access thread's state
1911         directly.
1912         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
1913         access thread's state directly.
1914         (continue_command): Use inferior_thread.
1915         (info_program_command): Use find_thread_ptid and access thread
1916         state directly.
1917         (proceed_after_attach_callback): Use thread state directly.
1918         (notice_new_inferior): Take a thread_info pointer instead of a
1919         ptid_t.  All callers adjusted.
1920         (exit_inferior): Take an inferior pointer instead of a pid.  All
1921         callers adjusted.
1922         (exit_inferior_silent): New.
1923         (detach_inferior): Delete.
1924         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
1925         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
1926         (detach_inferior_command, kill_inferior_command): Use
1927         find_inferior_id instead of valid_gdb_inferior_id and
1928         gdb_inferior_id_to_pid.
1929         (inferior_command): Use inferior and thread pointers.
1930         * inferior.h (struct thread_info): Forward declare.
1931         (notice_new_inferior): Take a thread_info pointer instead of a
1932         ptid_t.  All callers adjusted.
1933         (detach_inferior): Delete declaration.
1934         (exit_inferior, exit_inferior_silent): Take an inferior pointer
1935         instead of a pid.  All callers adjusted.
1936         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
1937         (valid_gdb_inferior_id): Delete.
1938         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
1939         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
1940         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
1941         ...
1942         <inf>: ... this new field.
1943         <step_ptid>: Delete, replaced by ...
1944         <step_thread>: ... this new field.
1945         (get_displaced_stepping_state): Take an inferior pointer instead
1946         of a pid.  All callers adjusted.
1947         (displaced_step_in_progress_any_inferior): Adjust.
1948         (displaced_step_in_progress_thread): Take a thread pointer instead
1949         of a ptid_t.  All callers adjusted.
1950         (displaced_step_in_progress, add_displaced_stepping_state): Take
1951         an inferior pointer instead of a pid.  All callers adjusted.
1952         (get_displaced_step_closure_by_addr): Adjust.
1953         (remove_displaced_stepping_state): Take an inferior pointer
1954         instead of a pid.  All callers adjusted.
1955         (displaced_step_prepare_throw, displaced_step_prepare)
1956         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
1957         All callers adjusted.
1958         (start_step_over): Adjust.
1959         (infrun_thread_ptid_changed): Remove bit updating ptids in the
1960         displaced step queue.
1961         (do_target_resume): Adjust.
1962         (fetch_inferior_event): Use inferior_thread.
1963         (context_switch, get_inferior_stop_soon): Take an
1964         execution_control_state pointer instead of a ptid_t.  All callers
1965         adjusted.
1966         (switch_to_thread_cleanup): Delete.
1967         (stop_all_threads): Use scoped_restore_current_thread.
1968         * inline-frame.c: Include "gdbthread.h".
1969         (inline_state) <inline_state>: Take a thread pointer instead of a
1970         ptid_t.  All callers adjusted.
1971         <ptid>: Delete, replaced by ...
1972         <thread>: ... this new field.
1973         (find_inline_frame_state): Take a thread pointer instead of a
1974         ptid_t.  All callers adjusted.
1975         (skip_inline_frames, step_into_inline_frame)
1976         (inline_skipped_frames, inline_skipped_symbol): Take a thread
1977         pointer instead of a ptid_t.  All callers adjusted.
1978         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
1979         (inline_skipped_frames, inline_skipped_symbol): Likewise.
1980         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
1981         pointers directly.
1982         * linux-nat.c (get_detach_signal): Likewise.
1983         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
1984         (thread_db_notice_clone): Adjust.
1985         (thread_db_find_new_threads_silently)
1986         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
1987         a thread pointer instead of a ptid_t.  All callers adjusted.
1988         * mi/mi-cmd-var.c: Include "inferior.h".
1989         (mi_cmd_var_update_iter): Update to use thread pointers.
1990         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
1991         inferior directly.
1992         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
1993         out to ...
1994         (mi_output_running): ... this new function.
1995         (mi_on_resume_1): Adjust to use it.
1996         (mi_user_selected_context_changed): Adjust to use inferior_thread.
1997         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
1998         directly.
1999         (interrupt_thread_callback): : Adjust to use thread and inferior
2000         pointers.
2001         * proc-service.c: Include "gdbthread.h".
2002         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2003         * progspace-and-thread.c: Include "inferior.h".
2004         * progspace.c: Include "inferior.h".
2005         * python/py-exitedevent.c (create_exited_event_object): Adjust to
2006         hold a reference to an inferior_object.
2007         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2008         inferior_thread.
2009         * python/py-inferior.c (struct inferior_object): Give the type a
2010         tag name instead of a typedef.
2011         (python_on_normal_stop): No need to check if the current thread is
2012         listed.
2013         (inferior_to_inferior_object): Change return type to
2014         inferior_object.  All callers adjusted.
2015         (find_thread_object): Delete, bits factored out to ...
2016         (thread_to_thread_object): ... this new function.
2017         * python/py-infthread.c (create_thread_object): Use
2018         inferior_to_inferior_object.
2019         (thpy_is_stopped): Use thread pointer directly.
2020         (gdbpy_selected_thread): Use inferior_thread.
2021         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2022         field, replaced with ...
2023         <thread>: ... this new field.  All users adjusted.
2024         (btpy_insn_or_gap_new): Drop const.
2025         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
2026         callers adjusted.
2027         * python/py-record.c: Include "gdbthread.h".
2028         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2029         a ptid_t.  All callers adjusted.
2030         (gdbpy_current_recording): Use inferior_thread.
2031         * python/py-record.h (recpy_record_object) <ptid>: Delete
2032         field, replaced with ...
2033         <thread>: ... this new field.  All users adjusted.
2034         (recpy_element_object) <ptid>: Delete
2035         field, replaced with ...
2036         <thread>: ... this new field.  All users adjusted.
2037         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2038         a ptid_t.  All callers adjusted.
2039         * python/py-threadevent.c: Include "gdbthread.h".
2040         (get_event_thread): Use thread_to_thread_object.
2041         * python/python-internal.h (struct inferior_object): Forward
2042         declare.
2043         (find_thread_object, find_inferior_object): Delete declarations.
2044         (thread_to_thread_object, inferior_to_inferior_object): New
2045         declarations.
2046         * record-btrace.c: Include "inferior.h".
2047         (require_btrace_thread): Use inferior_thread.
2048         (record_btrace_frame_sniffer)
2049         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
2050         (get_thread_current_frame): Use scoped_restore_current_thread and
2051         switch_to_thread.
2052         (get_thread_current_frame): Use thread pointer directly.
2053         (record_btrace_replay_at_breakpoint): Use thread's inferior
2054         pointer directly.
2055         * record-full.c: Include "inferior.h".
2056         * regcache.c: Include "gdbthread.h".
2057         (get_thread_arch_regcache): Use the inferior's address space
2058         directly.
2059         (get_thread_regcache, registers_changed_thread): New.
2060         * regcache.h (get_thread_regcache(thread_info *thread)): New
2061         overload.
2062         (registers_changed_thread): New.
2063         (remote_target) <remote_detach_1>: Swap order of parameters.
2064         (remote_add_thread): <remote_add_thread>: Return the new thread.
2065         (get_remote_thread_info(ptid_t)): New overload.
2066         (remote_target::remote_notice_new_inferior): Use thread pointers
2067         directly.
2068         (remote_target::process_initial_stop_replies): Use
2069         thread_info::set_running.
2070         (remote_target::remote_detach_1, remote_target::detach)
2071         (extended_remote_target::detach): Adjust.
2072         * stack.c (frame_show_address): Use inferior_thread.
2073         * target-debug.h (target_debug_print_thread_info_pp): New.
2074         * target-delegates.c: Regenerate.
2075         * target.c (default_thread_address_space): Delete.
2076         (memory_xfer_partial_1): Use current_inferior.
2077         (target_detach): Use current_inferior.
2078         (target_thread_address_space): Delete.
2079         (generic_mourn_inferior): Use current_inferior.
2080         * target.h (struct target_ops) <thread_address_space>: Delete.
2081         (target_thread_address_space): Delete.
2082         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
2083         pointers directly.
2084         (delete_thread_1, delete_thread, delete_thread_silent): Take a
2085         thread pointer instead of a ptid_t.  Adjust all callers.
2086         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
2087         (first_thread_of_process): Delete, replaced by ...
2088         (first_thread_of_inferior): ... this new function.  All callers
2089         adjusted.
2090         (any_thread_of_process): Rename to ...
2091         (any_thread_of_inferior): ... this, and take an inferior pointer.
2092         (any_live_thread_of_process): Rename to ...
2093         (any_live_thread_of_inferior): ... this, and take an inferior
2094         pointer.
2095         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2096         (value_in_thread_stack_temporaries)
2097         (get_last_thread_stack_temporary): Take a thread pointer instead
2098         of a ptid_t.  Adjust all callers.
2099         (thread_info::set_running): New.
2100         (validate_registers_access): Use inferior_thread.
2101         (can_access_registers_ptid): Rename to ...
2102         (can_access_registers_thread): ... this, and take a thread
2103         pointer.
2104         (print_thread_info_1): Adjust to compare thread pointers instead
2105         of ptids.
2106         (switch_to_no_thread, switch_to_thread): Make extern.
2107         (scoped_restore_current_thread::~scoped_restore_current_thread):
2108         Use m_thread pointer directly.
2109         (scoped_restore_current_thread::scoped_restore_current_thread):
2110         Use inferior_thread.
2111         (thread_command): Use thread pointer directly.
2112         (thread_num_make_value_helper): Use inferior_thread.
2113         * top.c (execute_command): Use inferior_thread.
2114         * tui/tui-interp.c: Include "inferior.h".
2115         * varobj.c (varobj_create): Use inferior_thread.
2116         (value_of_root_1): Use find_thread_global_id instead of
2117         global_thread_id_to_ptid.
2118
2119 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
2120
2121         * regcache.c (readable_regcache::read_part): Avoid memcpy when
2122         possible.
2123         (regcache::write_part): Likewise.
2124         (readable_regcache::cooked_read_part): Update comment.
2125         (readable_regcache::cooked_write_part): Likewise.
2126         * regcache.h: (readable_regcache::read_part): Likewise.
2127         (regcache::write_part): Likewise.
2128
2129 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
2130             Dirk Schubert  <dirk.schubert@arm.com>
2131
2132         * aarch64-linux-nat.c (post_attach): New.
2133         (aarch64_linux_nat_target::post_attach): Override post_attach to
2134         record the number of hardware debug registers.
2135
2136 2018-06-20  Tom Tromey  <tom@tromey.com>
2137
2138         * python/py-param.c (add_setshow_generic): Make parameters const.
2139         (parmpy_init): Update.
2140
2141 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
2142
2143         * regcache.h (regcache_cooked_read_ftype): Rename to...
2144         (register_read_ftype): ...this, change type to function_view.
2145         (class reg_buffer) <save>: Remove src parameter.
2146         (readonly_detached_regcache) <readonly_detached_regcache>: Make
2147         parameter non-const in first overload.  Remove src parameter in
2148         second overload.
2149         * regcache.c (do_cooked_read): Remove.
2150         (readonly_detached_regcache::readonly_detached_regcache): Make
2151         parameter non-const, adjust call to other constructor.
2152         (reg_buffer::save): Remove src parameter.
2153         * frame.c (do_frame_register_read): Remove.
2154         (frame_save_as_regcache): Use lambda function.
2155         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
2156         parameter to ppu2spu_data *.
2157         (ppu2spu_sniffer): Use lambda function.
2158
2159 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
2160
2161         * record-full.c (record_full_target::insert_breakpoint): Remove
2162         "struct" keyword, add const.
2163
2164 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
2165
2166         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
2167         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
2168         * configure.ac: Remove AC_PREREQ, add missing quoting.
2169         * gnulib/configure.ac: Modernize usage of
2170         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
2171         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
2172         (AUTOMAKE_VERSION): Bump to 1.15.1.
2173         * configure: Re-generate.
2174         * config.in: Re-generate.
2175         * aclocal.m4: Re-generate.
2176         * gnulib/aclocal.m4: Re-generate.
2177         * gnulib/config.in: Re-generate.
2178         * gnulib/configure: Re-generate.
2179         * gnulib/import/Makefile.in: Re-generate.
2180
2181 2018-06-19  Pedro Alves  <palves@redhat.com>
2182
2183         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
2184         (lookup_minimal_symbol_by_pc_section): ... here with
2185         gdb_assert_not_reached added.
2186
2187 2018-06-19  Pedro Alves  <palves@redhat.com>
2188
2189         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
2190         parameter with a block parameter.  Compare location's block symbol
2191         with the frame's block instead of addresses.
2192         (skip_inline_frames): Pass the current block instead of the
2193         frame's address.  Break out as soon as we determine the frame
2194         should not be skipped.
2195
2196 2018-06-18  Tom Tromey  <tom@tromey.com>
2197
2198         * solib-aix.c (solib_aix_get_section_offsets): Return
2199         unique_xmalloc_ptr.
2200         (solib_aix_solib_create_inferior_hook): Update.
2201
2202 2018-06-18  Tom Tromey  <tom@tromey.com>
2203
2204         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
2205
2206 2018-06-18  Tom Tromey  <tom@tromey.com>
2207
2208         * solib-frv.c (frv_relocate_main_executable): Use
2209         unique_xmalloc_ptr.
2210         * solib-dsbt.c (dsbt_relocate_main_executable): Use
2211         unique_xmalloc_ptr.
2212
2213 2018-06-18  Tom Tromey  <tom@tromey.com>
2214
2215         * objfiles.h (inhibit_section_map_updates): Update.
2216         (resume_section_map_updates, resume_section_map_updates_cleanup):
2217         Remove.
2218         * solib-svr4.c (svr4_handle_solib_event): Update.
2219         * objfiles.c (inhibit_section_map_updates): Return
2220         scoped_restore_tmpl<int>.
2221         (resume_section_map_updates, resume_section_map_updates_cleanup):
2222         Remove.
2223
2224 2018-06-18  Tom Tromey  <tom@tromey.com>
2225
2226         * valprint.h (read_string): Update.
2227         * valprint.c (read_string): Change type of "buffer".
2228         (val_print_string): Update.
2229         * python/py-value.c (valpy_string): Update.
2230         * language.h (struct language_defn) <la_get_string>: Change
2231         type of "buffer".
2232         (default_get_string, c_get_string): Update.
2233         * language.c (default_get_string): Change type of "buffer".
2234         * guile/scm-value.c (gdbscm_value_to_string): Update.
2235         * c-lang.c (c_get_string): Change type of "buffer".
2236
2237 2018-06-18  Tom Tromey  <tom@tromey.com>
2238
2239         * ser-mingw.c (struct pipe_state_destroyer): New.
2240         (pipe_state_up): New typedef.
2241         (cleanup_pipe_state): Remove.
2242         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
2243
2244 2018-06-18  Tom Tromey  <tom@tromey.com>
2245
2246         * rust-lang.h (rust_yyerror): Don't declare.
2247         * rust-lang.c (rust_language_defn): Update.
2248         * rust-exp.y (yyerror): Now static.
2249         * parse.c (parse_exp_in_context_1): Update.
2250         * p-lang.h (p_yyerror): Don't declare.
2251         * p-lang.c (p_language_defn): Update.
2252         * p-exp.y (yyerror): Now static.
2253         * opencl-lang.c (opencl_language_defn): Update.
2254         * objc-lang.c (objc_language_defn): Update.
2255         * m2-lang.h (m2_yyerror): Don't declare.
2256         * m2-lang.c (m2_language_defn): Update.
2257         * m2-exp.y (yyerror): Now static.
2258         * language.h (struct language_defn) <la_error>: Remove.
2259         * language.c (unk_lang_error): Remove.
2260         (unknown_language_defn, auto_language_defn): Remove.
2261         * go-lang.h (go_yyerror): Don't declare.
2262         * go-lang.c (go_language_defn): Update.
2263         * go-exp.y (yyerror): Now static.
2264         * f-lang.h (f_yyerror): Don't declare.
2265         * f-lang.c (f_language_defn): Update.
2266         * f-exp.y (yyerror): Now static.
2267         * d-lang.h (d_yyerror): Don't declare.
2268         * d-lang.c (d_language_defn): Update.
2269         * d-exp.y (yyerror): Now static.
2270         * c-lang.h (c_yyerror): Don't declare.
2271         * c-lang.c (c_language_defn, cplus_language_defn)
2272         (asm_language_defn, minimal_language_defn): Update.
2273         * c-exp.y (yyerror): Now static.
2274         * ada-lang.h (ada_yyerror): Don't declare.
2275         * ada-lang.c (ada_language_defn): Update.
2276         * ada-exp.y (yyerror): Now static.
2277
2278 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
2279
2280         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
2281         (store_sveregs_to_thread): Likewise.
2282         (aarch64_linux_fetch_inferior_registers): Check for SVE.
2283         (aarch64_linux_store_inferior_registers): Likewise.
2284         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
2285         function.
2286         (aarch64_sve_regs_copy_to_regcache): Likewise.
2287         (aarch64_sve_regs_copy_from_regcache): Likewise.
2288         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
2289         declaration.
2290         (aarch64_sve_regs_copy_to_regcache): Likewise.
2291         (aarch64_sve_regs_copy_from_regcache): Likewise.
2292         (sve_context): Structure from Linux headers.
2293         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
2294         (SVE_SIG_ZREG_SIZE): Likewise.
2295         (SVE_SIG_PREG_SIZE): Likewise.
2296         (SVE_SIG_FFR_SIZE): Likewise.
2297         (SVE_SIG_REGS_OFFSET): Likewise.
2298         (SVE_SIG_ZREGS_OFFSET): Likewise.
2299         (SVE_SIG_ZREG_OFFSET): Likewise.
2300         (SVE_SIG_ZREGS_SIZE): Likewise.
2301         (SVE_SIG_PREGS_OFFSET): Likewise.
2302         (SVE_SIG_PREG_OFFSET): Likewise.
2303         (SVE_SIG_PREGS_SIZE): Likewise.
2304         (SVE_SIG_FFR_OFFSET): Likewise.
2305         (SVE_SIG_REGS_SIZE): Likewise.
2306         (SVE_SIG_CONTEXT_SIZE): Likewise.
2307         (SVE_PT_REGS_MASK): Likewise.
2308         (SVE_PT_REGS_FPSIMD): Likewise.
2309         (SVE_PT_REGS_SVE): Likewise.
2310         (SVE_PT_VL_INHERIT): Likewise.
2311         (SVE_PT_VL_ONEXEC): Likewise.
2312         (SVE_PT_REGS_OFFSET): Likewise.
2313         (SVE_PT_FPSIMD_OFFSET): Likewise.
2314         (SVE_PT_FPSIMD_SIZE): Likewise.
2315         (SVE_PT_SVE_ZREG_SIZE): Likewise.
2316         (SVE_PT_SVE_PREG_SIZE): Likewise.
2317         (SVE_PT_SVE_FFR_SIZE): Likewise.
2318         (SVE_PT_SVE_FPSR_SIZE): Likewise.
2319         (SVE_PT_SVE_FPCR_SIZE): Likewise.
2320         (__SVE_SIG_TO_PT): Likewise.
2321         (SVE_PT_SVE_OFFSET): Likewise.
2322         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
2323         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
2324         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
2325         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
2326         (SVE_PT_SVE_PREG_OFFSET): Likewise.
2327         (SVE_PT_SVE_PREGS_SIZE): Likewise.
2328         (SVE_PT_SVE_FFR_OFFSET): Likewise.
2329         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
2330         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
2331         (SVE_PT_SVE_SIZE): Likewise.
2332         (SVE_PT_SIZE): Likewise.
2333         (HAS_SVE_STATE): New define.
2334
2335 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
2336
2337         * nat/aarch64-sve-linux-sigcontext.h: New file.
2338         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
2339         new files.
2340         (SVE_VQ_MIN): Likewise.
2341         (SVE_VQ_MAX): Likewise.
2342         (SVE_VL_MIN): Likewise.
2343         (SVE_VL_MAX): Likewise.
2344         (SVE_NUM_ZREGS): Likewise.
2345         (SVE_NUM_PREGS): Likewise.
2346         (sve_vl_valid): Likewise.
2347         (struct user_sve_header): Likewise.
2348
2349 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
2350             Richard Bunt <Richard.Bunt@arm.com>
2351
2352         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
2353         was requested by GDB.
2354
2355 2018-06-15  Tom de Vries  <tdevries@suse.de>
2356
2357         * MAINTAINERS (Write After Approval): Add Tom de Vries.
2358
2359 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
2360
2361         * gnulib/update-gnulib.sh: Print expected versions of
2362         autoconf/aclocal.
2363
2364 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
2365
2366         * arch-utils.c (default_type_align): Use type_length_units.
2367         * gdbtypes.c (type_align): Use type_length_units.
2368
2369 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2370
2371         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
2372         of 'define' command.
2373
2374 2018-06-14  Tom de Vries  <tdevries@suse.de>
2375
2376         PR cli/22573
2377         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
2378         get_no_prettyformat_print_options.
2379
2380 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
2381
2382         * sparc-nat.h: Include target.h.
2383         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
2384         <fetch_registers>: Remove this argument in function call.
2385         <store_registers>: Remove this argument in function call, remove
2386         extra semicolon.
2387         <low_forget_process>: Call sparc64_forget_process instead of
2388         sparc_forget_process.
2389
2390 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2391
2392         * procfs.c (_initialize_procfs): Use add_inf_child_target.
2393         (procfs_target::make_corefile_notes): Adjust to new
2394         target_read_alloc return type.
2395
2396 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
2397             Stephen Roberts  <stephen.roberts@arm.com>
2398
2399         PR gdb/22882
2400         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
2401         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
2402         Move should_notify_stop local into more inner scope.
2403
2404 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
2405             Stephen Roberts  <stephen.roberts@arm.com>
2406
2407         PR gdb/22882
2408         * infrun.c (resume_1): Add call to mark_async_event_handler.
2409
2410 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
2411
2412         * infrun.c (do_target_wait): Change old version of $pc printed.
2413
2414 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
2415
2416         * dwarf2read.c (read_index_from_section): Rename to...
2417         (read_gdb_index_from_section): ... this, update all callers.
2418         (dwarf2_read_index): Rename to...
2419         (dwarf2_read_gdb_index): ... this, update all callers.
2420
2421 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
2422
2423         * gdb/hppa-linux-nat.c
2424         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
2425         hppa_linux_nat_target::fetch_registers.
2426
2427 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
2428
2429         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
2430         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
2431         (AARCH64_DWARF_SVE_FFR): Likewise.
2432         (AARCH64_DWARF_SVE_P0): Likewise.
2433         (AARCH64_DWARF_SVE_Z0): Likewise.
2434
2435 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
2436
2437         * common/common-regcache.h (raw_compare): New function.
2438         * regcache.c (regcache::raw_compare): Likewise.
2439         * regcache.h (regcache::raw_compare): New declaration.
2440
2441 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
2442
2443         * common/common-regcache.h (reg_buffer_common): New structure.
2444         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
2445         (reg_buffer::raw_supply): Likewise.
2446         (reg_buffer::raw_supply_integer): Likewise.
2447         (reg_buffer::raw_supply_zeroed): Likewise.
2448         (reg_buffer::raw_collect): Likewise.
2449         (reg_buffer::raw_collect_integer): Likewise.
2450         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
2451         (reg_buffer::raw_supply): Likewise.
2452         (reg_buffer::raw_supply_integer): Likewise.
2453         (reg_buffer::raw_supply_zeroed): Likewise.
2454         (reg_buffer::raw_collect): Likewise.
2455         (reg_buffer::raw_collect_integer): Likewise.
2456
2457 2018-06-10  Tom Tromey  <tom@tromey.com>
2458
2459         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
2460         (class remote_state) <stop_reply_queue>: Now std::vector.
2461         (remote_state::~remote_state)
2462         (remote_target::stop_reply_queue_length): Update.
2463         (struct queue_iter_param, remove_child_of_pending_fork)
2464         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
2465         (check_pending_event_prevents_wildcard_vcont_callback)
2466         (remove_stop_reply_for_inferior)
2467         (remove_stop_reply_of_remote_state)
2468         (remote_notif_remove_once_on_match)
2469         (stop_reply_match_ptid_and_ws)
2470         (remote_kill_child_of_pending_fork): Remove.
2471         (remote_target::remove_new_fork_children)
2472         (remote_target::check_pending_events_prevent_wildcard_vcont)
2473         (remote_target::discard_pending_stop_replies)
2474         (remote_target::discard_pending_stop_replies_in_queue)
2475         (remote_target::remote_notif_remove_queued_reply)
2476         (remote_target::queued_stop_reply)
2477         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
2478         (remote_target::wait, remote_target::kill_new_fork_children)
2479         (remote_target::async): Update.
2480
2481 2018-06-10  Tom Tromey  <tom@tromey.com>
2482
2483         * record-full.c (record_full_arch_list_cleanups): Remove.
2484         (record_full_message): Use try/catch.
2485         (record_full_wait_cleanups): Remove.
2486         (record_full_wait_1): Use try/catch.
2487         (record_full_restore): Likewise.
2488
2489 2018-06-10  Tom Tromey  <tom@tromey.com>
2490
2491         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
2492         declare VEC.  Add constructor.
2493         <in_target_beneath>: Now bool.
2494         (record_full_breakpoints): Now a std::vector, static.
2495         (record_full_sync_record_breakpoints)
2496         (record_full_init_record_breakpoints)
2497         (record_full_target::insert_breakpoint)
2498         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
2499
2500 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
2501
2502         * dwarf2read.c (process_cu_includes): Remove struct keyword.
2503         * serial.c (serial_interface_lookup): Remove struct keyword.
2504
2505 2018-06-10  Tom Tromey  <tom@tromey.com>
2506
2507         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
2508         method.
2509         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
2510         a method.
2511         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
2512         method.
2513         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
2514         "beneath" as a method.
2515         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
2516         Use "beneath" as a method.
2517
2518 2018-06-10  Tom Tromey  <tom@tromey.com>
2519
2520         * tracefile.c (struct trace_file_writer_deleter): New.
2521         <operator()>: Rename from trace_file_writer_xfree.
2522         (trace_file_writer_up): New typedef.
2523         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
2524
2525 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
2526
2527         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
2528         <m_registers, m_register_status>: Change type to
2529         std::unique_ptr.
2530         * regcache.c (reg_buffer::reg_buffer): Use new instead of
2531         XCNEWVEC.
2532
2533 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
2534
2535         * common/common-regcache.h (enum register_status): Add
2536         underlying type "signed char".
2537         * regcache.h (reg_buffer) <m_register_status>: Change type to
2538         register_status *.
2539         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
2540         register_status instead of signed char.
2541         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
2542         (reg_buffer::get_register_status): Remove cast.
2543         (readable_regcache::raw_read): Remove cast.
2544         (readable_regcache::cooked_read): Remove cast.
2545
2546 2018-06-09  Tom Tromey  <tom@tromey.com>
2547
2548         * source.c (reverse_search_command, forward_search_command): Use
2549         scoped_fd.
2550
2551 2018-06-09  Tom Tromey  <tom@tromey.com>
2552
2553         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
2554         (serial_ops_list): Now static, std::vector.
2555         (serial_interface_lookup, serial_add_interface): Update.
2556
2557 2018-06-09  Tom Tromey  <tom@tromey.com>
2558
2559         * dwarf2read.c (process_cu_includes): Update.
2560         (process_full_comp_unit): Update.
2561         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
2562         std::vector.
2563
2564 2018-06-08  Paul Koning  <paul_koning@dell.com>
2565
2566         PR gdb/23252
2567
2568         * python/python.c (do_start_initialization):
2569         Avoid call to internal Python API.
2570         (init__gdb_module): New function.
2571
2572 2018-06-08  Gary Benson <gbenson@redhat.com>
2573
2574         * linux-thread-db.c (valprint.h): New include.
2575         (struct check_thread_db_info): New structure.
2576         (check_thread_db_on_load, tdb_testinfo): New static globals.
2577         (check_thread_db, check_thread_db_callback): New functions.
2578         (try_thread_db_load_1): Run integrity checks if requested.
2579         (maintenance_check_libthread_db): New function.
2580         (_initialize_thread_db): Register "maint check libthread-db"
2581         and "maint set/show check-libthread-db".
2582         * NEWS: Mention the above new commands.
2583
2584 2018-06-08  Tom Tromey  <tom@tromey.com>
2585
2586         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
2587         now a method.
2588
2589 2018-06-08  Tom Tromey  <tom@tromey.com>
2590
2591         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
2592
2593 2018-06-08  Tom Tromey  <tom@tromey.com>
2594
2595         * common/btrace-common.h (struct btrace_data): Add constructor,
2596         destructor, move assignment operator.
2597         <empty, clear, fini>: New methods.
2598         <format>: Initialize.
2599         (btrace_data_init, btrace_data_fini, btrace_data_clear)
2600         (btrace_data_empty): Don't declare.
2601         * common/btrace-common.c (btrace_data_init): Remove.
2602         (btrace_data::fini): Rename from btrace_data_fini.
2603         (btrace_data::empty): Rename from btrace_data_empty.
2604         (btrace_data::clear): Rename from btrace_data_clear.  Return
2605         bool.
2606         * btrace.h (make_cleanup_btrace_data): Don't declare.
2607         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
2608         (parse_xml_btrace): Update.
2609         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
2610         (maint_btrace_clear_packet_history_cmd): Update.
2611
2612 2018-06-07  Pedro Alves  <palves@redhat.com>
2613
2614         * target.h (target_ops) <beneath>: Now a method.  All references
2615         updated.
2616         (class target_stack): New.
2617         * target.c (g_target_stack): New.
2618         (g_current_top_target): Delete.
2619         (current_top_target): Get the top target out of g_target_stack.
2620         (target_stack::push, target_stack::unpush): New.
2621         (push_target, unpush_target): Reimplement.
2622         (target_is_pushed): Reimplement in terms of g_target_stack.
2623         (target_ops::beneath, target_stack::find_beneath): New.
2624
2625 2018-06-07  Pedro Alves  <palves@redhat.com>
2626
2627         * target.h (find_target_beneath): Delete declaration.
2628         * target.c (find_target_beneath): Delete definition.
2629         * aix-thread.c: All callers of find_target_beneath adjusted to
2630         call target_ops::beneath instead.
2631         * bsd-uthread.c: Likewise.
2632         * linux-thread-db.c: Likewise.
2633         * ravenscar-thread.c: Likewise.
2634         * sol-thread.c: Likewise.
2635         * spu-multiarch.c: Likewise.
2636
2637 2018-06-07  Pedro Alves  <palves@redhat.com>
2638
2639         * target.h (target_ops) <beneath>: Now a method.  All references
2640         updated.
2641         (target_ops) <m_beneath>: New.
2642         * target.c (target_ops::beneath): New.
2643         * corelow.c: Adjust all references to target_ops::beneath.
2644         * linux-thread-db.c: Likewise.
2645         * make-target-delegates: Likewise.
2646         * record-btrace.c: Likewise.
2647         * record-full.c: Likewise.
2648         * remote.c: Likewise.
2649         * target.c: Likewise.
2650         * target-delegates.c: Regenerate.
2651
2652 2018-06-07  Pedro Alves  <palves@redhat.com>
2653
2654         * target.h (target_stack): Delete.
2655         (current_top_target): Declare function.
2656         * target.c (target_stack): Delete.
2657         (g_current_top_target): New.
2658         (current_top_target): New function.
2659         * auxv.c: Use current_top_target instead of target_stack
2660         throughout.
2661         * avr-tdep.c: Likewise.
2662         * breakpoint.c: Likewise.
2663         * corefile.c: Likewise.
2664         * elfread.c: Likewise.
2665         * eval.c: Likewise.
2666         * exceptions.c: Likewise.
2667         * frame.c: Likewise.
2668         * gdbarch-selftests.c: Likewise.
2669         * gnu-v3-abi.c: Likewise.
2670         * ia64-tdep.c: Likewise.
2671         * ia64-vms-tdep.c: Likewise.
2672         * infcall.c: Likewise.
2673         * infcmd.c: Likewise.
2674         * infrun.c: Likewise.
2675         * linespec.c: Likewise.
2676         * linux-tdep.c: Likewise.
2677         * minsyms.c: Likewise.
2678         * ppc-linux-nat.c: Likewise.
2679         * ppc-linux-tdep.c: Likewise.
2680         * procfs.c: Likewise.
2681         * regcache.c: Likewise.
2682         * remote.c: Likewise.
2683         * rs6000-tdep.c: Likewise.
2684         * s390-linux-nat.c: Likewise.
2685         * s390-tdep.c: Likewise.
2686         * solib-aix.c: Likewise.
2687         * solib-darwin.c: Likewise.
2688         * solib-dsbt.c: Likewise.
2689         * solib-spu.c: Likewise.
2690         * solib-svr4.c: Likewise.
2691         * solib-target.c: Likewise.
2692         * sparc-tdep.c: Likewise.
2693         * sparc64-tdep.c: Likewise.
2694         * spu-tdep.c: Likewise.
2695         * symfile.c: Likewise.
2696         * symtab.c: Likewise.
2697         * target-descriptions.c: Likewise.
2698         * target-memory.c: Likewise.
2699         * target.c: Likewise.
2700         * target.h: Likewise.
2701         * tracefile-tfile.c: Likewise.
2702         * tracepoint.c: Likewise.
2703         * valops.c: Likewise.
2704         * valprint.c: Likewise.
2705         * value.c: Likewise.
2706         * windows-tdep.c: Likewise.
2707         * mi/mi-main.c: Likewise.
2708
2709 2018-06-07  Tom Tromey  <tom@tromey.com>
2710
2711         * valprint.h (build_address_symbolic): Declare.
2712         * printcmd.c (print_address_symbolic): Update.
2713         (build_address_symbolic): Change "name" and "filename" to
2714         std::string.
2715         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
2716         Update.
2717         * defs.h (build_address_symbolic): Remove declaration.
2718
2719 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
2720
2721         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
2722         (aarch64_vnv_type): Add function.
2723         (aarch64_pseudo_register_name): Add V regs for SVE.
2724         (aarch64_pseudo_register_type): Likewise.
2725         (aarch64_pseudo_register_reggroup_p): Likewise.
2726         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
2727         (aarch64_pseudo_read_value): Add V regs for SVE.
2728         (aarch64_pseudo_write_2): Use V0 offset for SVE
2729         (aarch64_pseudo_write): Add V regs for SVE.
2730         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
2731
2732 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
2733
2734         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
2735         (sve_vl_from_vq): Likewise.
2736
2737 2018-06-05  Tom Tromey  <tom@tromey.com>
2738
2739         * cli/cli-cmds.c (show_version): Update.
2740         * top.c (print_gdb_version): Add "interactive" parameter.
2741         Update.
2742         * main.c (captured_main_1): Update.
2743         * top.h (print_gdb_version): Add "interactive" parameter and a
2744         comment.
2745
2746 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
2747
2748         * common/enum-flags.h: Add trailing semicolon to example in
2749         comment.
2750
2751 2018-06-05  Tom Tromey  <tom@tromey.com>
2752
2753         PR cli/12326:
2754         * NEWS: Add entry about pager.
2755         * utils.c (pagination_disabled_for_command): New global.
2756         (prompt_for_continue): Allow "c" response to prompt.
2757         (reinitialize_more_filter): Clear
2758         pagination_disabled_for_command.
2759         (fputs_maybe_filtered): Check pagination_disabled_for_command.
2760
2761 2018-06-04  Tom Tromey  <tom@tromey.com>
2762
2763         * ada-lang.h (ada_lookup_symbol_list): Update.
2764         * ada-lang.c (resolve_subexp): Update.
2765         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
2766         parameter.
2767         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
2768         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
2769         results parameter to std::vector.
2770         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
2771         Update.
2772         * ada-exp.y (block_lookup): Update.
2773         (select_possible_type_sym): Change type of syms.  Remove nsyms
2774         parameter.
2775         (write_var_or_type, write_name_assoc): Update.
2776
2777 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
2778
2779         * windows-nat.c (windows_nat_target::xfer_partial): Return
2780         TARGET_XFER_E_IO if we need to delegate to the target beneath
2781         but BENEATH is NULL.
2782
2783 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
2784
2785         * Makefile.in (config.status): Add configure.nat as a
2786         dependency.
2787
2788 2018-06-04  Tom Tromey  <tom@tromey.com>
2789
2790         * cp-name-parser.y (cpname_state): Add method declarations.
2791         (HANDLE_QUAL): Update.
2792         (cpname_state::d_grab, cpname_state::fill_comp)
2793         (cpname_state::make_operator, cpname_state::make_dtor)
2794         (cpname_state::make_builtin_type, cpname_state::make_name)
2795         (cpname_state::d_qualify, cpname_state::d_int_type)
2796         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
2797         (%union): Move earlier.
2798
2799 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
2800
2801         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
2802
2803 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
2804
2805         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
2806         (aarch64_pseudo_write_1): Likewise.
2807         (aarch64_pseudo_read_value): Use helper.
2808         (aarch64_pseudo_write): Likewise.
2809
2810 2018-06-04  Pedro Alves  <palves@redhat.com>
2811
2812         * darwin-nat.c (darwin_ops): Delete.
2813         (darwin_attach_pid): Use get_native_target.
2814
2815 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
2816
2817         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
2818         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
2819
2820 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
2821
2822         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
2823         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
2824         (aarch64_gdbarch_init): Check for SVE.
2825         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
2826
2827 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
2828
2829         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
2830         * aarch64-tdep.h (aarch64_read_description): Likewise.
2831         * arch/aarch64.c (aarch64_create_target_description): Likewise.
2832         * arch/aarch64.h (aarch64_create_target_description): Likewise.
2833         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
2834         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
2835         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
2836
2837 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
2838
2839         * value.c (value_fetch_lazy_bitfield): New.
2840         (value_fetch_lazy_memory): New.
2841         (value_fetch_lazy_register): New.
2842         (value_fetch_lazy): Factor out to smaller functions.
2843
2844 2018-06-01  Tom Tromey  <tom@tromey.com>
2845
2846         * cp-name-parser.y (backslashable, represented): Now const.
2847
2848 2018-06-01  Tom Tromey  <tom@tromey.com>
2849
2850         * cp-name-parser.y: Include parser-defs.h.
2851         (parser_fprintf): Remove declaration.
2852
2853 2018-06-01  Tom Tromey  <tom@tromey.com>
2854
2855         * cp-name-parser.y: Use %pure-parser, %lex-param, and
2856         %parse-param.
2857         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
2858         (global_result): Remove globals.
2859         (struct cpname_state): New.
2860         (yyparse): Don't declare.
2861         (yylex, yyerror): Move declarations after %union.
2862         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
2863         (make_name): Add state parameter.
2864         Update all callers.
2865         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
2866         parameter.
2867         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
2868         Update.
2869         (yylex): Add lvalp, state parameters.
2870         (yyerror): Add state parameter.
2871         (cp_demangled_name_to_comp): Update.
2872
2873 2018-06-01  Tom Tromey  <tom@tromey.com>
2874
2875         * cp-name-parser.y (parser_fprintf): Declare.
2876         (GDB_YY_REMAP_PREFIX): Define.
2877         Include yy-remap.h.  Don't redefine yy* identifiers.
2878
2879 2018-06-01  Tom Tromey  <tom@tromey.com>
2880
2881         * python/py-type.c (typy_legacy_template_argument): Update.
2882         * cp-support.h (cp_demangled_name_to_comp): Update.
2883         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
2884         parameter to be a "std::string *".
2885         (main): Update.
2886
2887 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
2888
2889         * ada-lex.l: Include "diagnostics.h" instead of
2890         "common/diagnostics.h".
2891         * unittests/environ-selftests.c: Likewise.
2892         * common/diagnostics.h: Moved to ../include.
2893
2894 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
2895
2896         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
2897         to language_mode_manual while calling breakpoint_re_set_one.
2898
2899 2018-06-01  Tom Tromey  <tom@tromey.com>
2900
2901         * valops.c (value_cast_structs, destructor_name_p): Update.
2902         * symtab.c (gdb_mangle_name): Update.
2903         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
2904         Update.
2905         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
2906         (pascal_object_print_value_fields, pascal_object_print_value):
2907         Update.
2908         * p-typeprint.c (pascal_type_print_derivation_info): Update.
2909         * linespec.c (find_methods): Update.
2910         * gdbtypes.h (type_name_no_tag): Remove.
2911         (type_name_or_error): Rename from type_name_no_tag_or_error.
2912         * gdbtypes.c (type_name_no_tag): Remove.
2913         (type_name_or_error): Rename from type_name_no_tag_or_error.
2914         (lookup_struct_elt_type, check_typedef): Update.
2915         * expprint.c (print_subexp_standard): Update.
2916         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
2917         * d-namespace.c (d_lookup_nested_symbol): Update.
2918         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
2919         (cp_print_class_member): Update.
2920         * cp-namespace.c (cp_lookup_nested_symbol): Update.
2921         * completer.c (add_struct_fields): Update.
2922         * c-typeprint.c (cp_type_print_derivation_info)
2923         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
2924         Update.
2925         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
2926         (ada_prefer_type, ada_is_exception_sym): Update.
2927
2928 2018-06-01  Tom Tromey  <tom@tromey.com>
2929
2930         * valops.c (enum_constant_from_type, value_namespace_elt)
2931         (value_maybe_namespace_elt): Update.
2932         * valarith.c (find_size_for_pointer_math): Update.
2933         * target-descriptions.c (make_gdb_type): Update.
2934         * symmisc.c (print_symbol): Update.
2935         * stabsread.c (define_symbol, read_type)
2936         (complain_about_struct_wipeout, add_undefined_type)
2937         (cleanup_undefined_types_1): Update.
2938         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
2939         (rust_range_type_p, val_print_struct, rust_print_struct_def)
2940         (rust_internal_print_type, rust_composite_type)
2941         (rust_evaluate_funcall, rust_evaluate_subexp)
2942         (rust_inclusive_range_type_p): Update.
2943         * python/py-type.c (typy_get_tag): Update.
2944         * p-typeprint.c (pascal_type_print_base): Update.
2945         * mdebugread.c (parse_symbol, parse_type): Update.
2946         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
2947         Update.
2948         * guile/scm-type.c (gdbscm_type_tag): Update.
2949         * go-lang.c (sixg_string_p): Update.
2950         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
2951         Update.
2952         * gdbtypes.h (struct main_type) <tag_name>: Remove.
2953         (TYPE_TAG_NAME): Remove.
2954         * gdbtypes.c (type_name_no_tag): Simplify.
2955         (check_typedef, check_types_equal, recursive_dump_type)
2956         (copy_type_recursive, arch_composite_type): Update.
2957         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
2958         in summary mode when needed.
2959         * eval.c (evaluate_funcall): Update.
2960         * dwarf2read.c (fixup_go_packaging, read_structure_type)
2961         (process_structure_scope, read_enumeration_type)
2962         (read_namespace_type, read_module_type, determine_prefix): Update.
2963         * cp-support.c (inspect_type): Update.
2964         * coffread.c (process_coff_symbol, decode_base_type): Update.
2965         * c-varobj.c (c_is_path_expr_parent): Update.
2966         * c-typeprint.c (c_type_print_base_struct_union): Update.
2967         (c_type_print_base_1): Update.  Print struct/class/union/enum in
2968         summary when using C language.
2969         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
2970         (gen_maybe_namespace_elt): Update.
2971         * ada-lang.c (ada_type_name): Simplify.
2972         (empty_record, ada_template_to_fixed_record_type_1)
2973         (template_to_static_fixed_type)
2974         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
2975
2976 2018-06-01  Tom Tromey  <tom@tromey.com>
2977
2978         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
2979         c_print_type.
2980         * c-typeprint.c (c_print_type_1): Add "language" parameter.
2981         (c_print_type): Update.
2982         (c_print_type): New overload.
2983         (c_type_print_varspec_prefix, c_type_print_args)
2984         (c_type_print_varspec_suffix, c_print_type_no_offsets)
2985         (c_type_print_base_struct_union, c_type_print_base_1)
2986         (cp_type_print_method_args): Add "language" parameter.
2987         (c_type_print_base): Update.
2988         * c-lang.h (c_print_type): Add new overload.
2989
2990 2018-06-01  Tom Tromey  <tom@tromey.com>
2991
2992         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
2993         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
2994
2995 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
2996
2997         * aarch64-tdep.c (aarch64_sve_register_names): New const
2998         var.
2999         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3000         (AARCH64_SVE_Z_REGS_NUM): New define.
3001         (AARCH64_SVE_P_REGS_NUM): Likewise.
3002         (AARCH64_SVE_NUM_REGS): Likewise.
3003
3004 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
3005
3006         * nat/linux-ptrace.h [__alpha__]
3007         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3008         definitions.
3009
3010 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
3011
3012         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3013         the endianness selected.
3014         * NEWS: Document `set endian auto' mode operation update.
3015
3016 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
3017
3018         * Makefile.in: Add new header.
3019         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3020         (sve_vl_from_vg): Likewise.
3021         (sve_vq_from_vl): Likewise.
3022         (sve_vl_from_vq): Likewise.
3023         (sve_vq_from_vg): Likewise.
3024         (sve_vg_from_vq): Likewise.
3025         * configure.nat: Add new c file.
3026         * nat/aarch64-sve-linux-ptrace.c: New file.
3027         * nat/aarch64-sve-linux-ptrace.h: New file.
3028
3029 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
3030
3031         * aarch64-linux-nat.c (aarch64_linux_read_description):
3032         Add parmeter zero.
3033         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3034         Likewise.
3035         * aarch64-tdep.c (tdesc_aarch64_list): Add.
3036         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3037         (aarch64_gdbarch_init): Add parmeter zero.
3038         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3039         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3040         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3041         parmeter.
3042         * doc/gdb.texinfo: Describe SVE feature
3043         * features/aarch64-sve.c: New file.
3044
3045 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
3046
3047         PR gdb/23210
3048         * gdbarch.sh (significant_addr_bit): Default to zero when
3049         not set by target architecture.
3050         * gdbarch.c: Re-generated.
3051         * utils.c (address_significant): Update.
3052
3053 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
3054
3055         * stack.c (func_command): Remove trailing newline in call to error.
3056
3057 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3058
3059         * regcache.h (regcache_raw_collect): Remove, update callers to
3060         use regcache::raw_collect.
3061         * regcache.c (regcache_raw_collect): Remove.
3062
3063 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3064
3065         * regcache.h (regcache_raw_supply): Remove, update callers to
3066         use detached_regcache::raw_supply.
3067         * regcache.c (regcache_raw_supply): Remove.
3068
3069 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3070
3071         * regcache.h (regcache_cooked_write_part): Remove, update
3072         callers to use regcache::cooked_write_part.
3073         * regcache.c (regcache_cooked_write_part): Remove.
3074
3075 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3076
3077         * regcache.h (regcache_cooked_read_part): Remove, update callers
3078         to use readable_regcache::cooked_read_part.
3079         * regcache.c (regcache_cooked_read_part): Remove.
3080
3081 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3082
3083         * regcache.h (regcache_cooked_read_value): Remove, update
3084         callers to use readable_regcache::cooked_read_value.
3085         * regcache.c (regcache_cooked_read_value): Remove.
3086
3087 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3088
3089         * regcache.h (regcache_cooked_write): Remove, update callers to
3090         use regcache::cooked_write.
3091         * regcache.c (regcache_cooked_write): Remove.
3092
3093 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3094
3095         * regcache.h (regcache_invalidate): Remove, update callers to
3096         use detached_regcache::invalidate instead.
3097         * regcache.c (regcache_invalidate): Remove.
3098
3099 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3100
3101         * regcache.h (regcache_raw_write_part): Remove, update callers
3102         to use regcache::raw_write_part instead.
3103         * regcache.c (regcache_raw_write_part): Remove.
3104
3105 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3106
3107         * regcache.h (regcache_raw_read_part): Remove, update callers to
3108         use readable_regcache::raw_read_part instead.
3109         * regcache.c (regcache_raw_read_part): Remove.
3110
3111 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3112
3113         * regcache.h (regcache_cooked_read): Remove, update callers to
3114         use readable_regcache::cooked_read instead.
3115         * regcache.c (regcache_cooked_read): Remove.
3116
3117 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3118
3119         * regcache.h (regcache_raw_write): Remove, update callers to use
3120         regcache::raw_write instead.
3121         * regcache.c (regcache_raw_write): Remove.
3122
3123 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3124
3125         * regcache.h (regcache_raw_read): Remove, update callers to use
3126         readable_regcache::raw_read instead.
3127         * regcache.c (regcache_raw_read): Remove.
3128
3129 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3130
3131         * regcache.h (regcache_raw_update): Remove, update callers to
3132         use readable_regcache::raw_update instead.
3133         * regcache.c (regcache_raw_update): Remove.
3134
3135 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3136
3137         * regcache.h (regcache_register_status): Remove, update callers
3138         to use reg_buffer::get_register_status directly instead.
3139         * regcache.c (regcache_register_status): Remove.
3140
3141 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3142
3143         * regcache.h (regcache_get_ptid): Remove, update all callers to
3144         call regcache::ptid instead.
3145         * regcache.c (regcache_get_ptid): Remove.
3146
3147 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3148
3149         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
3150
3151 2018-05-30  Pedro Alves  <palves@redhat.com>
3152
3153         * common/common-exceptions.h (exception_rethrow): Use
3154         ATTRIBUTE_NORETURN.
3155
3156 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
3157
3158         * breakpoint.c (print_solib_event, check_status_catch_solib):
3159         Remove struct keyword in range-based for loops.
3160         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
3161         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
3162         Likewise.
3163         * linespec.c (find_superclass_methods, search_minsyms_for_name):
3164         Likewise.
3165         * symfile.c (addr_info_make_relative): Likewise.
3166         * thread.c (value_in_thread_stack_temporaries): Likewise.
3167
3168 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
3169
3170         PR gdb/16841
3171         * valops.c (value_struct_elt_for_reference): Call check_typedef on
3172         aggregate type to get its real type before accessing it.
3173
3174 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
3175
3176         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
3177         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
3178         * coff-pe-read.c (add_pe_forwarded_sym): Replace
3179         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
3180         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
3181         * jit.c (jit_breakpoint_re_set_internal): Likewise.
3182         * printcmd.c (info_address_command): Likewise.
3183
3184 2018-05-29  Tom Tromey  <tom@tromey.com>
3185
3186         * windows-nat.c (handle_exception): Update fall-through comment.
3187
3188 2018-05-29  Tom Tromey  <tom@tromey.com>
3189
3190         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
3191         (struct program_space) <added_solibs>: Now a std::vector.
3192         * breakpoint.c (print_solib_event): Update.
3193         (check_status_catch_solib): Update.
3194         * progspace.c (clear_program_space_solib_cache): Update.
3195         * solib.c (update_solib_list): Update.
3196
3197 2018-05-29  Tom Tromey  <tom@tromey.com>
3198
3199         * python/py-type.c (typy_richcompare): Update.
3200         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
3201         * gdbtypes.h (types_deeply_equal): Return bool.
3202         (types_equal): Likewise.
3203         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
3204         declare VEC.
3205         (check_types_equal): Change worklist to std::vector.  Return
3206         bool.
3207         (struct type_equality_entry): Add constructor.
3208         (compare_maybe_null_strings): Return bool.
3209         (check_types_worklist): Return bool.  Change worklist to
3210         std::vector.
3211         (types_deeply_equal): Use std::vector.
3212         (types_equal): Return bool.
3213         (compare_maybe_null_strings): Simplify.
3214
3215 2018-05-29  Tom Tromey  <tom@tromey.com>
3216
3217         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
3218
3219 2018-05-29  Tom Tromey  <tom@tromey.com>
3220
3221         * objc-lang.h: Don't include cp-support.h.
3222         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
3223         declare VEC.
3224
3225 2018-05-27  Tom Tromey  <tom@tromey.com>
3226
3227         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
3228
3229 2018-05-25  Tom Tromey  <tom@tromey.com>
3230
3231         * value.c (value::location): Initialize.
3232
3233 2018-05-25  Tom Tromey  <tom@tromey.com>
3234
3235         * dbxread.c (init_bincl_list): Remove.
3236         (bincl_list): Now a std::vector.
3237         (bincls_allocated, next_bincl): Remove.
3238         (free_bincl_list, do_free_bincl_list_cleanup)
3239         (make_cleanup_free_bincl_list): Remove.
3240         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
3241         unique_xmalloc_ptr.
3242         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
3243         (struct header_file_location): Add constructor.
3244         (add_bincl_to_list): Remove.
3245
3246 2018-05-25  Tom Tromey  <tom@tromey.com>
3247
3248         * tui/tui.c (tui_enable): Update.
3249         * mi/mi-interp.c (mi_interp::init): Update.
3250         * interps.h (class interp) <name>: New method.
3251         <m_name>: Rename from name.
3252         (~scoped_restore_interp): Update.
3253         * interps.c (interp::interp): Update.
3254         (interp_add, interp_set, interp_lookup_existing)
3255         (current_interp_named_p): Update.
3256
3257 2018-05-25  Tom Tromey  <tom@tromey.com>
3258
3259         * interps.c (interp_name): Remove.
3260         * mi/mi-interp.c (mi_interp::init): Update.
3261         * interps.h (interp_name): Remove.
3262         (~scoped_restore_interp): Update.
3263         * tui/tui.c (tui_enable): Update.
3264
3265 2018-05-25  Tom Tromey  <tom@tromey.com>
3266
3267         * utils.c (fputs_maybe_filtered): Update.
3268         * linespec.c (decode_line_full): Update.
3269         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
3270         (mi_print_breakpoint_for_event, mi_solib_loaded)
3271         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3272         (mi_user_selected_context_changed): Update.
3273         * mi/mi-main.c (mi_execute_command): Update.
3274         * cli/cli-script.c (execute_control_command): Update.
3275         * python/python.c (execute_gdb_command): Update.
3276         * solib.c (info_sharedlibrary_command): Update.
3277         * interps.c (interp_ui_out): Remove.
3278         * interps.h (interp_ui_out): Remove.
3279
3280 2018-05-25  Tom Tromey  <tom@tromey.com>
3281
3282         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
3283         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
3284         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
3285
3286 2018-05-25  Tom Tromey  <tom@tromey.com>
3287
3288         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
3289         * interps.c (interp_exec): Use scoped_restore.
3290
3291 2018-05-25  Tom Tromey  <tom@tromey.com>
3292
3293         * remote.c (remote_target::remote_file_get): Use
3294         gdb::byte_vector.
3295         (remote_target::remote_file_put): Likewise.
3296
3297 2018-05-25  Tom Tromey  <tom@tromey.com>
3298
3299         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
3300         a std::string.
3301         (get_pe_section_index, add_pe_exported_sym): Update.
3302         (read_pe_exported_syms): Use gdb::def_vector.
3303
3304 2018-05-25  Tom Tromey  <tom@tromey.com>
3305
3306         * frame.c (remove_prev_frame): Remove.
3307         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
3308
3309 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
3310
3311         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
3312         Remove prototypes.
3313         * mips-linux-nat.c (supply_fpregset): Always call
3314         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
3315         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
3316         `mips_fill_fpregset'.
3317         * mips-linux-tdep.c (mips_supply_fpregset)
3318         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
3319         (mips_fill_fpregset_wrapper): Remove functions.
3320         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
3321         (mips_linux_fpregset): Remove variable.
3322         (mips_linux_iterate_over_regset_sections): Use
3323         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
3324         (mips_linux_o32_sigframe_init): Remove comment.
3325
3326 2018-05-25  Pedro Alves  <palves@redhat.com>
3327
3328         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
3329         (struct readahead_cache, struct packet_reg, struct
3330         remote_arch_state, class remote_state): Move higher up in the
3331         file.
3332         (remote_target::m_remote_state): Now an object instead of a pointer.
3333         (remote_target::get_remote_state): Adjust.
3334
3335 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
3336
3337         * stack.c (select_and_print_frame): Delete.
3338         (struct function_bounds): Move struct within function.
3339         (func_command): Most content moved into new function
3340         find_frame_for_function, use new function, print result, add
3341         function comment.
3342         (find_frame_for_function): New function, now returns a result.
3343
3344 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3345
3346         * stack.c (iterate_over_block_arg_vars): Fix comment.
3347         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
3348
3349 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
3350
3351         PR gdb/23203
3352         * frame.c
3353         (scoped_restore_selected_frame::scoped_restore_selected_frame):
3354         Define.
3355         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
3356         Define.
3357         * frame.h (class scoped_restore_selected_frame): New class.
3358         * stack.c (print_frame_local_vars): Remove catching and rethrowing
3359         of any exception, use scoped_restore_selected_frame to restore the
3360         frame instead.
3361
3362 2018-05-24  Pedro Alves  <palves@redhat.com>
3363
3364         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
3365         override.
3366
3367 2018-05-23  Tom Tromey  <tom@tromey.com>
3368
3369         * complaints.c (struct complaints): Remove.
3370         (symfile_complaint_book): Remove.
3371         (series): New global.
3372         (complaint_internal): Update.
3373         (clear_complaints): Update.
3374
3375 2018-05-23  Tom Tromey  <tom@tromey.com>
3376
3377         * complaints.c (counters): New global.
3378         (struct complain): Remove.
3379         (struct complaints) <root>: Remove.
3380         (complaint_sentinel): Remove.
3381         (symfile_complaint_book): Update.
3382         (find_complaint) Remove.
3383         (complaint_internal, clear_complaints): Update.
3384
3385 2018-05-23  Tom Tromey  <tom@tromey.com>
3386
3387         * complaints.c (struct complain) <file, line>: Remove.
3388         (find_complaint): Remove file, line parameters.
3389         (complaint_internal): Update.
3390
3391 2018-05-23  Tom Tromey  <tom@tromey.com>
3392
3393         * complaints.c (vcomplaint): Remove.
3394         (complaint_internal) Merge in contents of vcomplaint.
3395
3396 2018-05-23  Tom Tromey  <tom@tromey.com>
3397
3398         * complaints.c (struct complaints) <explanation>: Remove.
3399         (symfile_explanations): Remove.
3400         (symfile_complaint_book): Update.
3401         (vcomplaint): Update.
3402         (struct explanation): Remove.
3403
3404 2018-05-23  Tom Tromey  <tom@tromey.com>
3405
3406         * complaints.c (symfile_complaints): Remove.
3407         (complaint_internal): Remove "complaints" parameter.
3408         (clear_complaints, vcomplaint): Remove "c" parameter.
3409         (get_complaints): Remove.
3410         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
3411         (dwarf2_debug_line_missing_file_complaint)
3412         (dwarf2_debug_line_missing_end_sequence_complaint)
3413         (dwarf2_complex_location_expr_complaint)
3414         (dwarf2_const_value_length_mismatch_complaint)
3415         (dwarf2_section_buffer_overflow_complaint)
3416         (dwarf2_macro_malformed_definition_complaint)
3417         (dwarf2_invalid_attrib_class_complaint)
3418         (create_addrmap_from_index, dw2_symtab_iter_next)
3419         (dw2_expand_marked_cus)
3420         (dw2_debug_names_iterator::find_vec_in_debug_names)
3421         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
3422         (create_debug_type_hash_table, init_cutu_and_read_dies)
3423         (partial_die_parent_scope, add_partial_enumeration)
3424         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
3425         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
3426         (read_import_statement, read_file_scope, create_dwo_cu_reader)
3427         (create_cus_hash_table, create_dwp_hash_table)
3428         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
3429         (dwarf2_rnglists_process, dwarf2_ranges_process)
3430         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
3431         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
3432         (handle_struct_member_die, process_structure_scope)
3433         (read_array_type, read_common_block, read_module_type)
3434         (read_tag_pointer_type, read_typedef, read_base_type)
3435         (read_subrange_type, load_partial_dies, partial_die_info::read)
3436         (partial_die_info::read, partial_die_info::read)
3437         (partial_die_info::read, read_checked_initial_length_and_offset)
3438         (dwarf2_string_attr, read_formatted_entries)
3439         (dwarf_decode_line_header)
3440         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3441         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
3442         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
3443         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3444         (get_signatured_type, get_DW_AT_signature_type)
3445         (decode_locdesc, file_file_name, consume_improper_spaces)
3446         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
3447         (dwarf_decode_macro_bytes, dwarf_decode_macros)
3448         (dwarf2_symbol_mark_computed, set_die_type)
3449         (read_attribute_value): Update.
3450         * stap-probe.c (handle_stap_probe, get_stap_base_address):
3451         Update.
3452         * dbxread.c (unknown_symtype_complaint)
3453         (lbrac_mismatch_complaint, repeated_header_complaint)
3454         (set_namestring, function_outside_compilation_unit_complaint)
3455         (read_dbx_symtab, process_one_symbol): Update.
3456         * gdbtypes.c (stub_noname_complaint): Update.
3457         * windows-nat.c (handle_unload_dll): Update.
3458         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
3459         (decode_base_type): Update.
3460         * xcoffread.c (bf_notfound_complaint, ef_complaint)
3461         (eb_complaint, record_include_begin, record_include_end)
3462         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
3463         (process_xcoff_symbol, read_symbol)
3464         (function_outside_compilation_unit_complaint)
3465         (scan_xcoff_symtab): Update.
3466         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
3467         * buildsym.c (finish_block_internal, make_blockvector)
3468         (end_symtab_get_static_block, augment_type_symtab): Update.
3469         * dtrace-probe.c (dtrace_process_dof)
3470         (dtrace_static_probe_ops::get_probes): Update.
3471         * complaints.h (struct complaint): Don't declare.
3472         (symfile_complaints): Remove.
3473         (complaint_internal): Remove "complaints" parameter.
3474         (complaint): Likewise.
3475         (clear_complaints): Likewise.
3476         * symfile.c (syms_from_objfile_1, finish_new_objfile)
3477         (reread_symbols): Update.
3478         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
3479         (dwarf2_frame_cache, decode_frame_entry): Update.
3480         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
3481         * objc-lang.c (lookup_objc_class, lookup_child_selector)
3482         (info_selectors_command): Update.
3483         * macrotab.c (macro_include, check_for_redefinition)
3484         (macro_undef): Update.
3485         * objfiles.c (filter_overlapping_sections): Update.
3486         * stabsread.c (invalid_cpp_abbrev_complaint)
3487         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
3488         (define_symbol, error_type, read_type, rs6000_builtin_type)
3489         (stabs_method_name_from_physname, read_member_functions)
3490         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
3491         (attach_fields_to_type, complain_about_struct_wipeout)
3492         (read_range_type, read_args, common_block_start)
3493         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
3494         Update.
3495         * mdebugread.c (index_complaint, unknown_ext_complaint)
3496         (basic_type_complaint, bad_tag_guess_complaint)
3497         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
3498         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
3499         (parse_procedure, parse_lines)
3500         (function_outside_compilation_unit_complaint)
3501         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
3502         (bad_tag_guess_complaint, reg_value_complaint): Update.
3503         * cp-support.c (demangled_name_complaint): Update.
3504         * macroscope.c (sal_macro_scope): Update.
3505         * dwarf-index-write.c (class debug_names): Update.
3506
3507 2018-05-23  Tom Tromey  <tom@tromey.com>
3508
3509         * complaints.c (clear_complaints): Remove "noisy" parameter.
3510         * complaints.h (clear_complaints): Update.
3511         * symfile.c (syms_from_objfile_1, finish_new_objfile)
3512         (reread_symbols): Update.
3513
3514 2018-05-23  Tom Tromey  <tom@tromey.com>
3515
3516         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
3517         SUBSEQUENT_MESSAGE.
3518         (vcomplaint, clear_complaints): Update.
3519         (symfile_explanations): Remove some messages.
3520
3521 2018-05-23  Tom Tromey  <tom@tromey.com>
3522
3523         * complaints.c (internal_complaint): Remove.
3524         * complaints.h (internal_complaint): Remove.
3525
3526 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
3527
3528         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
3529
3530 2018-05-22  Pedro Alves  <palves@redhat.com>
3531
3532         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
3533         (remote_fileio_badfd, remote_fileio_return_errno)
3534         (remote_fileio_return_success, remote_fileio_func_open)
3535         (remote_fileio_func_open, remote_fileio_func_close)
3536         (remote_fileio_func_read, remote_fileio_func_write)
3537         (remote_fileio_func_lseek, remote_fileio_func_rename)
3538         (remote_fileio_func_unlink, remote_fileio_func_stat)
3539         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
3540         (remote_fileio_func_isatty, remote_fileio_func_system): Add
3541         remote_target parameter.
3542         (remote_fio_func_map) <func>: Add remote_target parameter.
3543         (do_remote_fileio_request, remote_fileio_request):
3544         * remote-fileio.h (remote_fileio_request):
3545         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
3546         remote_target parameter.
3547         (remote_notif_process, handle_notification): Adjust to pass down
3548         the remote.
3549         (remote_notif_state_allocate): Add remote_target parameter.  Save
3550         it.
3551         * remote-notif.h (struct remote_target): Forward declare.
3552         (struct notif_client) <parse, ack, can_get_pending_events>: Add
3553         remote_target parameter.
3554         (struct remote_notif_state) <remote>: New field.
3555         (remote_notif_ack, remote_notif_parse): Add remote_target
3556         parameter.
3557         (remote_notif_state_allocate, remote_notif_state_allocate): Add
3558         remote_target parameter.
3559         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
3560         (threads_listing_context, rmt_thread_action, protocol_feature)
3561         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
3562         (packet_result, struct threads_listing_context, remote_state):
3563         Move definitions and declarations higher up.
3564         (remote_target) <~remote_target>: Declare.
3565         (remote_download_command_source, remote_file_put, remote_file_get)
3566         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
3567         (remote_hostio_pread_vFile, remote_hostio_send_command)
3568         (remote_hostio_set_filesystem, remote_hostio_open)
3569         (remote_hostio_close, remote_hostio_unlink, remote_state)
3570         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
3571         (get_memory_write_packet_size, get_memory_read_packet_size)
3572         (append_pending_thread_resumptions, remote_detach_1)
3573         (append_resumption, remote_resume_with_vcont)
3574         (add_current_inferior_and_thread, wait_ns, wait_as)
3575         (process_stop_reply, remote_notice_new_inferior)
3576         (process_initial_stop_replies, remote_add_thread)
3577         (btrace_sync_conf, remote_btrace_maybe_reopen)
3578         (remove_new_fork_children, kill_new_fork_children)
3579         (discard_pending_stop_replies, stop_reply_queue_length)
3580         (check_pending_events_prevent_wildcard_vcont)
3581         (discard_pending_stop_replies_in_queue, stop_reply)
3582         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
3583         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
3584         (remote_interrupt_as, remote_interrupt_ns)
3585         (remote_get_noisy_reply, remote_query_attached)
3586         (remote_add_inferior, remote_current_thread, get_current_thread)
3587         (set_thread, set_general_thread, set_continue_thread)
3588         (set_general_process, write_ptid)
3589         (remote_unpack_thread_info_response, remote_get_threadinfo)
3590         (parse_threadlist_response, remote_get_threadlist)
3591         (remote_threadlist_iterator, remote_get_threads_with_ql)
3592         (remote_get_threads_with_qxfer)
3593         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
3594         (get_offsets, remote_check_symbols, remote_supported_packet)
3595         (remote_query_supported, remote_packet_size)
3596         (remote_serial_quit_handler, remote_detach_pid)
3597         (remote_vcont_probe, remote_resume_with_hc)
3598         (send_interrupt_sequence, interrupt_query)
3599         (remote_notif_get_pending_events, fetch_register_using_p)
3600         (send_g_packet, process_g_packet, fetch_registers_using_g)
3601         (store_register_using_P, store_registers_using_G)
3602         (set_remote_traceframe, check_binary_download)
3603         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
3604         (remote_xfer_live_readonly_partial, remote_read_bytes)
3605         (remote_send_printf, remote_flash_write, readchar)
3606         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
3607         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
3608         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
3609         (extended_remote_disable_randomization, extended_remote_run)
3610         (send_environment_packet, extended_remote_environment_support)
3611         (extended_remote_set_inferior_cwd, remote_write_qxfer)
3612         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
3613         (packet_command): Now methods of ...
3614         (remote_target): ... this class.
3615         (m_remote_state) <remote_target>: New field.
3616         (struct remote_state) <stop_reply_queue,
3617         remote_async_inferior_event_token, wait_forever_enabled_p>: New
3618         fields.
3619         (remote_state::remote_state): Allocate stop_reply_queue.
3620         (remote_state): Delete global.
3621         (get_remote_state_raw): Delete.
3622         (remote_target::get_remote_state): Allocate m_remote_state on
3623         demand.
3624         (get_current_remote_target): New.
3625         (remote_ops, extended_remote_ops): Delete.
3626         (wait_forever_enabled_p, remote_async_inferior_event_token):
3627         Delete, moved to struct remote_state.
3628         (remote_target::close): Delete self.  Destruction bits split to
3629         ...
3630         (remote_target::~remote_target): ... this.
3631         (show_memory_packet_size): Adjust to use
3632         get_current_remote_target.
3633         (struct protocol_feature) <func>: Add remote_target parameter.
3634         All callers adjusted.
3635         (curr_quit_handler_target): New.
3636         (remote_serial_quit_handler): Reimplement.
3637         (remote_target::open_1): Adjust to use get_current_remote_target.
3638         Heap-allocate remote_target/extended_remote_target instances.
3639         (vcont_builder::vcont_builder): Add remote_target parameter, and
3640         save it in m_remote.  All callers adjusted.
3641         (vcont_builder::m_remote): New field.
3642         (vcont_builder::restart, vcont_builder::flush)
3643         (vcont_builder::push_action): Use it.
3644         (remote_target::commit_resume): Use it.
3645         (struct queue_iter_param) <remote>: New field.
3646         (remote_target::remove_new_fork_children): Fill in 'remote' field.
3647         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
3648         (check_pending_event_prevents_wildcard_vcont_callback)
3649         (remote_target::check_pending_events_prevent_wildcard_vcont)
3650         (remote_target::discard_pending_stop_replies)
3651         (remote_target::discard_pending_stop_replies_in_queue)
3652         (remote_target::remote_notif_remove_queued_reply): Fill in
3653         'remote' field.
3654         (remote_notif_get_pending_events): New.
3655         (remote_target::readchar, remote_target::remote_serial_write):
3656         Save/restore curr_quit_handler_target.
3657         (putpkt): New.
3658         (kill_new_fork_children): Fill in 'remote' field.
3659         (packet_command): Use get_current_remote_target, defer to
3660         remote_target method of same name.
3661         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
3662         parameter, and save it in m_remote.  All callers adjusted.
3663         (scoped_remote_fd::release): Use m_remote.
3664         (scoped_remote_fd::m_remote): New field.
3665         (remote_file_put, remote_file_get, remote_file_delete): Use
3666         get_current_remote_target, defer to remote_target method of same
3667         name.
3668         (remote_btrace_reset): Add remote_state paremeter.  Update all
3669         callers.
3670         (remote_async_inferior_event_handler). Pass down 'data'.
3671         (remote_new_objfile): Use get_current_remote_target.
3672         (remote_target::vcont_r_supported): New.
3673         (set_range_stepping): Use get_current_remote_target and
3674         remote_target::vcont_r_supported.
3675         (_initialize_remote): Don't allocate 'remote_state' and
3676         'stop_reply_queue' globals.
3677         * remote.h (struct remote_target): Forward declare.
3678         (getpkt, putpkt, remote_notif_get_pending_events): Add
3679         'remote_target' parameter.
3680
3681 2018-05-22  Pedro Alves  <palves@redhat.com>
3682
3683         * remote.c (vcont_builder): Now a class.  Make all data members
3684         private.
3685         (vcont_builder) <vcont_builder, restart, flush, push_action>:
3686         Declare methods.
3687         (vcont_builder_restart): Rename to ...
3688         (vcont_builder::restart): ... this.
3689         (vcont_builder_flush): Rename to ...
3690         (vcont_builder::flush): ... this.
3691         (vcont_builder_push_action): Rename to ...
3692         (vcont_builder::push_action): ... this.
3693         (remote_target::commit_resume): Adjust.
3694
3695 2018-05-22  Pedro Alves  <palves@redhat.com>
3696
3697         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
3698         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
3699         (get_fixed_memory_packet_size): New.
3700         (get_memory_packet_size): Use it.
3701         (set_memory_packet_size): Don't override the config size with
3702         DEFAULT_MAX_MEMORY_PACKET_SIZE.
3703         (show_memory_packet_size): Use get_fixed_memory_packet_size.
3704         Don't refer to get_memory_packet_size if not connected to a remote
3705         target.  Show "(default)" if configured size is 0.
3706
3707 2018-05-22  Pedro Alves  <palves@redhat.com>
3708
3709         * remote.c (remote_target::mourn_inferior): Move
3710         discard_pending_stop_replies call here from ...
3711         (_initialize_remote): ... here.
3712
3713 2018-05-22  Pedro Alves  <palves@redhat.com>
3714
3715         * remote.c (compare_section_command): Remove set_general_process
3716         call.
3717
3718 2018-05-22  Pedro Alves  <palves@redhat.com>
3719
3720         * remote.c (struct packet_reg, struct remote_arch_state):
3721         Move higher up in the file.
3722         (remote_state) <m_arch_states>: Store remote_arch_state values
3723         instead of remote_arch_state pointers.
3724         (remote_state::get_remote_arch_state): Adjust.
3725
3726 2018-05-22  Pedro Alves  <palves@redhat.com>
3727
3728         * remote.c: Include <unordered_map>.
3729         (remote_state): Now a class.
3730         (remote_state) <get_remote_arch_state>: Declare method.
3731         <get_remote_arch_state>: New field.
3732         (remote_arch_state) <remote_arch_state>: Declare ctor.
3733         <regs>: Now a unique_ptr.
3734         (remote_gdbarch_data_handle): Delete.
3735         (get_remote_arch_state): Delete.
3736         (remote_state::get_remote_arch_state): New.
3737         (get_remote_state): Adjust to call remote_state's
3738         get_remote_arch_state method.
3739         (init_remote_state): Delete, bits factored out to ...
3740         (remote_arch_state::remote_arch_state): ... this new method.
3741         (get_remote_packet_size, get_memory_packet_size)
3742         (process_g_packet, remote_target::fetch_registers)
3743         (remote_target::prepare_to_store, store_registers_using_G)
3744         (remote_target::store_registers, remote_target::get_trace_status):
3745         Adjust to call remote_state's method.
3746         (_initialize_remote): Remove reference to
3747         remote_gdbarch_data_handle.
3748
3749 2018-05-22  Pedro Alves  <palves@redhat.com>
3750
3751         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
3752         pread>: New method declarations.
3753         (remote_target::open_1): Adjust.
3754         (readahead_cache_invalidate): Rename to ...
3755         (readahead_cache::invalidate): ... this, and adjust to be a class
3756         method.
3757         (readahead_cache_invalidate_fd): Rename to ...
3758         (readahead_cache::invalidate_fd): ... this, and adjust to be a
3759         class method.
3760         (remote_hostio_pwrite): Adjust.
3761         (remote_hostio_pread_from_cache): Rename to ...
3762         (readahead_cache::pread): ... this, and adjust to be a class
3763         method.
3764         (remote_hostio_close): Adjust.
3765
3766 2018-05-22  Pedro Alves  <palves@redhat.com>
3767
3768         * remote.c (remote_hostio_close_cleanup): Delete.
3769         (class scoped_remote_fd): New.
3770         (remote_file_put, remote_file_get): Use it.
3771
3772 2018-05-22  Pedro Alves  <palves@redhat.com>
3773
3774         (struct vCont_action_support): Use bool and initialize all fields.
3775         (struct readahead_cache): Initialize all fields.
3776         (remote_state): Use bool and initialize all fields.
3777         (remote_state::remote_state, remote_state::~remote_state): New.
3778         (new_remote_state): Delete.
3779         (_initialize_remote): Use new to allocate remote_state.
3780
3781 2018-05-22  Pedro Alves  <palves@redhat.com>
3782             張俊芝  <zjz@zjz.name>
3783
3784         PR gdb/22973
3785         * c-exp.y: Include "c-support.h".
3786         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
3787         of tolower.  Use c_ident_is_alpha to scan names.
3788         * c-lang.c: Include "c-support.h".
3789         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
3790         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
3791         * c-support.h: New file, with bits factored out from ...
3792         * cp-name-parser.y: ... this file.
3793         Include "c-support.h".
3794         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
3795         c-support.h and renamed.
3796         (symbol_end, yylex): Adjust.
3797
3798 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
3799
3800         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
3801         parameter type to CORE_ADDR.
3802         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
3803         parameter type in declaration to CORE_ADDR.
3804         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
3805         target_auxv_search to get AT_HWCAP and use the result to get the
3806         target description.
3807         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
3808         to CORE_ADDR. Remove the cast of the return value to unsigned
3809         long. Fix error predicate of target_auxv_search.
3810         (ppc_linux_nat_target::read_description): Change the type of the
3811         hwcap variable to CORE_ADDR.
3812
3813 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
3814
3815         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
3816         if the size of fpscr is larger than 32 bits.
3817
3818 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
3819
3820         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
3821         (ppc32_linux_vsxregmap): New global.
3822         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
3823         regcache_supply_regset, and regcache_collect_regset.
3824         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
3825         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
3826         (fetch_vsx_register, store_vsx_register): Remove.
3827         (fetch_vsx_registers): Add regno parameter. Get regset using
3828         ppc_linux_vsxregset. Use regset to supply registers.
3829         (store_vsx_registers): Add regno parameter. Get regset using
3830         ppc_linux_vsxregset. Use regset to collect registers.
3831         (fetch_register): Call fetch_vsx_registers instead of
3832         fetch_vsx_register.
3833         (store_register): Call store_vsx_registers instead of
3834         store_vsx_register.
3835         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
3836         new regno parameter.
3837         (store_ppc_registers): Call store_vsx_registers with -1 for the
3838         new regno parameter.
3839         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
3840         (ppc_collect_vsxregset): Remove.
3841
3842 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
3843
3844         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
3845         offset fields.
3846         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
3847         for vector register offset fields.
3848         (ppc64_fbsd_reg_offsets): Likewise.
3849         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3850         to vector register offset fields.
3851         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3852         to vector register offset fields.
3853         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
3854         vector register offset fields.
3855         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
3856         initializers for vector register offset fields.
3857         (rs6000_aix64_reg_offsets): Likewise.
3858         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
3859         (ppc_supply_vrregset): Remove.
3860         (ppc_collect_vrregset): Remove.
3861         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
3862         (ppc_linux_vrregset) : New function.
3863         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
3864         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
3865         (ppc32_linux_vrregset): Remove.
3866         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
3867         and use result instead of ppc32_linux_vrregset.
3868         (ppc32_linux_reg_offsets): Remove initializers for vector register
3869         offset fields.
3870         (ppc64_linux_reg_offsets): Likewise.
3871         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
3872         * ppc-linux-nat.c: Include regset.h.
3873         (gdb_vrregset_t): Adjust comment to account for little-endian
3874         mode.
3875         (supply_vrregset, fill_vrregset): Remove.
3876         (fetch_altivec_register, store_altivec_register): Remove.
3877         (fetch_altivec_registers): Add regno parameter. Get regset using
3878         ppc_linux_vrregset. Use regset to supply registers.
3879         (store_altivec_registers): Add regno parameter. Get regset using
3880         ppc_linux_vrregset. Use regset to collect registers.
3881         (fetch_register): Call fetch_altivec_registers instead of
3882         fetch_altivec_register.
3883         (store_register): Call store_altivec_registers instead of
3884         store_altivec_register.
3885         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
3886         the new regno parameter.
3887         (store_ppc_registers): Call store_altivec_registers with -1 for
3888         the new regno parameter.
3889
3890 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
3891
3892         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
3893         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
3894         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
3895         (gdb_vrregset_t): Change array type size to
3896         PPC_LINUX_SIZEOF_VRREGSET.
3897         (gdb_vsxregset_t): Change array type size to
3898         PPC_LINUX_SIZEOF_VSXREGSET.
3899         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
3900         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
3901         PPC_LINUX_SIZEOF_VSXREGSET.
3902
3903 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
3904
3905         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
3906         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
3907         nat/ppc-linux.c.
3908         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
3909         ppc_linux_target_wordsize with tid.
3910         (ppc_linux_nat_target::read_description): Call ppc_linux_target
3911         wordsize with tid.
3912         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
3913         (ppc64_64bit_inferior_p): Add static and inline specifiers.
3914         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
3915         tid parameter. Remove static specifier.
3916         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
3917         (ppc_linux_target_wordsize): New declaration.
3918
3919 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
3920
3921         * arch/ppc-linux-common.c: New file.
3922         * arch/ppc-linux-common.h: New file.
3923         * arch/ppc-linux-tdesc.h: New file.
3924         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
3925         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
3926         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
3927         arch/ppc-linux-tdesc.h.
3928         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
3929         arch/ppc-linux-tdesc.h.
3930         (ppc_linux_nat_target::read_description): Remove target
3931         description matching code. Fill a ppc_linux_features struct and
3932         call ppc_linux_match_description with it. Move comment about ISA
3933         2.05 to ppc-linux-common.c.
3934         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
3935         arch/ppc-linux-tdesc.h.
3936         (ppc_linux_core_read_description): Remove target description
3937         matching code. Fill a ppc_linux_features struct and call
3938         ppc_linux_match_description with it.
3939         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
3940         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
3941         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
3942         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
3943         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
3944         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
3945         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
3946         (tdesc_powerpc_e500l): Remove.
3947
3948 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
3949
3950         * ada-lang.c (catch_assert_command): Pass empty string instead
3951         of NULL for excep_string argument.
3952
3953 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
3954
3955         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
3956         the width of the requested register exceeds the width of the
3957         `ptrace' data type.
3958
3959 2018-05-21  Tom Tromey  <tom@tromey.com>
3960
3961         * printcmd.c (output_command): Remove.
3962         (output_command_const): Rename to output_command.
3963         * valprint.h (output_command): Rename from output_command_const.
3964         * tracepoint.c (trace_dump_actions): Call output_command.
3965
3966 2018-05-21  Tom Tromey  <tom@tromey.com>
3967
3968         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3969         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
3970         * ada-lang.h (create_ada_exception_catchpoint): Update.
3971         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
3972         std::string.
3973         (create_excep_cond_exprs, ~ada_catchpoint)
3974         (should_stop_exception, print_one_exception)
3975         (print_mention_exception, print_recreate_exception): Update.
3976         (ada_get_next_arg): Remove.
3977         (catch_ada_exception_command_split): Use std::string.  Change type
3978         of "excep_string", "cond_string".
3979         (catch_ada_exception_command): Update.
3980         (create_ada_exception_catchpoint): Change type of excep_string.
3981         (ada_exception_sal): Remove excep_string parameter.
3982         (~ada_catchpoint): Remove.
3983
3984 2018-05-21  Tom Tromey  <tom@tromey.com>
3985
3986         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
3987         cleanup.
3988
3989 2018-05-21  Tom Tromey  <tom@tromey.com>
3990
3991         * ada-lang.c (ada_exception_message_1, ada_exception_message):
3992         Return unique_xmalloc_ptr.
3993         (print_it_exception): Update.
3994
3995 2018-05-21  Tom Tromey  <tom@tromey.com>
3996
3997         * tracepoint.c (trace_dump_actions): Use std::string.
3998
3999 2018-05-21  Tom Tromey  <tom@tromey.com>
4000
4001         * symfile.c (reread_symbols): Use std::string for original_name.
4002
4003 2018-05-21  Tom Tromey  <tom@tromey.com>
4004
4005         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4006         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
4007         constructor.
4008
4009 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
4010
4011         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4012         instance to...
4013         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4014         * objfiles.c (get_objfile_bfd_data): Allocate
4015         objfile_per_bfd_storage with obstack_new when allocating on
4016         obstack.
4017
4018 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
4019
4020         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4021         OBSTACK_ZALLOC.
4022         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4023         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4024         * mdebugread.c (mdebug_build_psymtabs): Likewise.
4025         (add_pending): Likewise.
4026         (parse_symbol): Likewise.
4027         (parse_partial_symbols): Likewise.
4028         (psymtab_to_symtab_1): Likewise.
4029         (new_psymtab): Likewise.
4030         (elfmdebug_build_psymtabs): Likewise.
4031         * minsyms.c (terminate_minimal_symbol_table): Likewise.
4032         * objfiles.c (get_objfile_bfd_data): Likewise.
4033         (objfile_register_static_link): Likewise.
4034         * psymtab.c (allocate_psymtab): Likewise.
4035         * stabsread.c (read_member_functions): Likewise.
4036         * xcoffread.c (xcoff_end_psymtab): Likewise.
4037
4038 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
4039
4040         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4041         compiler supports std::is_trivially_constructible.
4042         * common/poison.h: Include obstack.h.
4043         (IsMallocable): Define to is_trivially_constructible if the
4044         compiler supports it, define to true_type otherwise.
4045         (xobnew): New.
4046         (XOBNEW): Redefine.
4047         (xobnewvec): New.
4048         (XOBNEWVEC): Redefine.
4049         * gdb_obstack.h (obstack_zalloc): New.
4050         (OBSTACK_ZALLOC): Redefine.
4051         (obstack_calloc): New.
4052         (OBSTACK_CALLOC): Redefine.
4053         (obstack_new): New.
4054         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
4055         (gdbarch_obstack): New declaration in gdbarch.h, definition in
4056         gdbarch.c.
4057         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
4058         obstack_calloc/obstack_zalloc.
4059         (gdbarch_obstack_zalloc): Remove.
4060         * target-descriptions.c (tdesc_data_init): Use obstack_new.
4061
4062 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4063
4064         * stack.c (backtrace_command_1): Remove useless variable int i.
4065
4066 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4067
4068         * stack.c (print_frame_info): Fix comment.
4069
4070 2018-05-18  Tom Tromey  <tom@tromey.com>
4071
4072         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
4073         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
4074         (~dwarf2_per_objfile): Update
4075         (dwarf2_get_dwz_file): Use new.
4076         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
4077         unique_ptr.
4078
4079 2018-05-18  Tom Tromey  <tom@tromey.com>
4080
4081         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
4082         unique_ptr.
4083         * dwarf2read.c (struct dwp_file): Add constructor and
4084         initializers.
4085         (open_and_init_dwp_file): Return a unique_ptr.
4086         (dwarf2_per_objfile, create_dwp_hash_table)
4087         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
4088         (lookup_dwo_unit_in_dwp): Update.
4089         (open_and_init_dwp_file, get_dwp_file): Update.
4090
4091 2018-05-18  Tom Tromey  <tom@tromey.com>
4092
4093         * dwarf2read.c (dwarf2_per_objfile): Update.
4094         (struct mapped_index): Add initializers.
4095         (dwarf2_read_index): Use new.
4096         (dw2_symtab_iter_init): Update.
4097         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
4098         unique_ptr.
4099
4100 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
4101
4102         * dwarf2read.c (mapped_index) <total_size>: Remove.
4103
4104 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
4105
4106         * unittests/format_pieces-selftests.c (test_format_specifier):
4107         Add ARI comments.
4108
4109 2018-05-18  Tom Tromey  <tom@tromey.com>
4110
4111         * c-typeprint.c (maybe_print_hole): New function.
4112         (c_print_type_struct_field_offset): Update.
4113         (c_type_print_base_struct_union): Call maybe_print_hole.
4114
4115 2018-05-17  Keith Seitz  <keiths@redhat.com>
4116
4117         * breakpoint.c (build_bpstat_chain): New function, moved from
4118         bpstat_stop_status.
4119         (bpstat_stop_status): Add optional parameter, `stop_chain'.
4120         If no stop chain is passed, call build_bpstat_chain to build it.
4121         * breakpoint.h (build_bpstat_chain): Declare.
4122         (bpstat_stop_status): Move documentation here from breakpoint.c.
4123         * infrun.c (handle_signal_stop): Before eliding inlined frames,
4124         build the stop chain and pass it to skip_inline_frames.
4125         Pass this stop chain to bpstat_stop_status.
4126         * inline-frame.c: Include breakpoint.h.
4127         (stopped_by_user_bp_inline_frame): New function.
4128         (skip_inline_frames): Add parameter `stop_chain'.
4129         Move documention to inline-frame.h.
4130         If non-NULL, use stopped_by_user_bp_inline_frame to determine
4131         whether the frame should be elided.
4132         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
4133         Add moved documentation and update for new parameter.
4134
4135 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
4136
4137         PR cli/14975
4138         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4139         unittests/format_pieces-selftests.c.
4140         * common/format.h (format_piece) <operator==>: New.
4141         (format_pieces) <operator[]>: Remove.
4142         * common/format.c (format_pieces::format_pieces): Handle \e.
4143         * unittests/format_pieces-selftests.c: New.
4144
4145 2018-05-17  Tom Tromey  <tom@tromey.com>
4146
4147         PR symtab/23010:
4148         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
4149         (dw2_instantiate_symtab): Add skip_partial parameter.
4150         (dw2_find_last_source_symtab, dw2_map_expand_apply)
4151         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
4152         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
4153         (dw2_expand_symtabs_matching_one)
4154         (dw2_find_pc_sect_compunit_symtab)
4155         (dw2_debug_names_lookup_symbol)
4156         (dw2_debug_names_expand_symtabs_for_function): Update.
4157         (init_cutu_and_read_dies): Add skip_partial parameter.
4158         (process_psymtab_comp_unit, build_type_psymtabs_1)
4159         (process_skeletonless_type_unit, load_partial_comp_unit)
4160         (psymtab_to_symtab_1): Update.
4161         (load_full_comp_unit): Add skip_partial parameter.
4162         (process_imported_unit_die, dwarf2_read_addr_index)
4163         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
4164         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
4165         (read_signatured_type): Update.
4166
4167 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
4168
4169         * value.c (release_value): Remove unused variable.
4170         (record_latest_value): Likewise.
4171         (access_value_history): Likewise.
4172         (preserve_values): Likewise.
4173
4174 2018-05-17  Tom Tromey  <tom@tromey.com>
4175
4176         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
4177         Initialize.
4178
4179 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
4180
4181         PR gdb/22286
4182         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
4183         Also handle registers whose width is not a multiple of
4184         PTRACE_TYPE_RET.
4185         (linux_nat_trad_target::store_register): Likewise.
4186
4187 2018-05-16  Tom Tromey  <tom@tromey.com>
4188
4189         * gdbcore.h (core_bfd): Redefine.
4190         * corelow.c (core_target::close): Update.
4191         (core_target_open): Update.
4192         * progspace.h (struct program_space) <cbfd>: Now a
4193         gdb_bfd_ref_ptr.
4194
4195 2018-05-16  Tom Tromey  <tom@tromey.com>
4196
4197         PR cli/19551:
4198         * symfile-add-flags.h (enum symfile_add_flags)
4199         <SYMFILE_NOT_FILENAME>: New constant.
4200         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
4201         objfile name from BFD.
4202         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
4203         * minidebug.c (find_separate_debug_file_in_section): Put
4204         ".gnu_debugdata" into BFD's file name.
4205
4206 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
4207
4208         * regcache.c (regcache_read_ftype, regcache_write_ftype):
4209         Remove.
4210
4211 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
4212
4213         PR binutils/21446
4214         * aarch64-tdep.c (aarch64_analyze_prologue,
4215         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
4216         Indicate not interested in errors.
4217
4218 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
4219
4220         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
4221         Supply the MIPS_ZERO_REGNUM register.
4222
4223 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
4224
4225         * mips-tdep.c (mask_address_var): Make variable static.
4226
4227 2018-05-14  Tom Tromey  <tom@tromey.com>
4228
4229         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
4230
4231 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
4232
4233         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
4234         FXSAVE_ADDR for the mxcsr register.
4235
4236 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
4237
4238         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
4239
4240 2018-05-11  Pedro Alves  <palves@redhat.com>
4241
4242         * corelow.c (core_target) <core_target>: No longer inline.
4243         Initialize m_core_gdbarch, m_core_vec and build the section table
4244         here.
4245         <~core_target>: New.
4246         <core_gdbarch, get_core_register_section>: New methods.
4247         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
4248         factored out from ...
4249         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
4250         (core_ops): Delete.
4251         (sniff_core_bfd): Add gdbarch parameter.
4252         (core_close): Delete, merged into ...
4253         (core_target::close): ... here.  Delete self.
4254         (core_close_cleanup): Delete.
4255         (core_target_open): Allocate a core_target on the heap.  Use a
4256         unique_ptr instead of a cleanup.  Bits moved into the core_target
4257         ctor.  Adjust to use core_target methods instead of globals.
4258         (get_core_register_section): Rename to ...
4259         (core_target::get_core_register_section): ... this and adjust.
4260         (struct get_core_registers_cb_data): New.
4261         (get_core_registers_cb): Use it.  Use bool.
4262         (core_target::fetch_registers, core_target::files_info)
4263         (core_target::xfer_partial, core_target::read_description)
4264         (core_target::pid_to, core_target::thread_name): Adjust to
4265         reference class fields instead of globals.
4266         * target.h (struct target_ops_deleter, target_ops_up): New.
4267
4268 2018-05-11  Pedro Alves  <palves@redhat.com>
4269
4270         * corefile.c (core_file_command): Move to corelow.c.
4271         * corelow.c (the_core_target): Delete.
4272         (core_file_command): Moved from corefile.c.  Check exec_bfd
4273         instead of the_core_target.  Use target_detach instead of calling
4274         into the_core_target directly.
4275         (maybe_say_no_core_file_now): New.
4276         (core_target::detach): Use it.
4277         (_initialize_corelow): Remove references to the_core_target.
4278         * gdbcore.h (the_core_target): Delete.
4279
4280 2018-05-11  Tom Tromey  <tromey@redhat.com>
4281             Pedro Alves  <palves@redhat.com>
4282
4283         * corefile.c (core_bfd): Remove.
4284         * gdbcore.h (core_bfd): Now a macro.
4285         * progspace.h (struct program_space) <cbfd>: New field.
4286
4287 2018-05-11  Tom Tromey  <tom@tromey.com>
4288
4289         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
4290         gdb::def_vector.
4291
4292 2018-05-10  Tom Tromey  <tom@tromey.com>
4293
4294         * configure: Rebuild.
4295         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
4296
4297 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
4298
4299         PR server/23158:
4300         * regformats/regdat.sh: Adjust script, following the addition
4301         of the new expedite_regs parameter to init_target_desc.
4302
4303 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
4304     
4305         PR gdb/23127
4306         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
4307         set_gdbarch_significant_addr_bit.
4308         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
4309         set_gdbarch_significant_addr_bit.
4310         * utils.c (address_significant): Update to sign extend addr.
4311
4312 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
4313
4314         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
4315         (xtensa_linux_init_abi): Limit tdep->num_regs by
4316         tdep->num_nopriv_regs.
4317         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
4318         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
4319         not initialized.
4320
4321 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
4322
4323         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
4324
4325 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
4326
4327         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
4328         (I387_MXCSR_INIT_VAL): New constant.
4329         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
4330         buffer if it was supplied by the inferior.
4331         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
4332         (i387_xsave_get_clear_bv): New function.
4333         (i387_supply_xsave): Only read x87 control registers from the
4334         xsave buffer if the feature is enabled, and the state will have
4335         been written, otherwise, provide a suitable default.
4336         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
4337         including x87 control registers.  Update control registers if they
4338         have changed from the default value, and mark features as enabled
4339         as required.
4340         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
4341
4342 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
4343
4344         * spu-tdep.c (info_spu_event_command): Fix output formatting.
4345
4346 2018-05-07  Tom Tromey  <tom@tromey.com>
4347
4348         * configure: Rebuild.
4349         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
4350
4351 2018-05-07  Tom Tromey  <tom@tromey.com>
4352
4353         PR tdep/20362:
4354         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
4355         bit.  Use correct value for VDIV.
4356
4357 2018-05-04  Tom Tromey  <tom@tromey.com>
4358
4359         * configure: Rebuild.
4360         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
4361
4362 2018-05-04  Tom Tromey  <tom@tromey.com>
4363
4364         * linux-record.c (record_linux_system_call) <case
4365         RECORD_SYS_RECVFROM>: Add "break".
4366
4367 2018-05-04  Tom Tromey  <tom@tromey.com>
4368
4369         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
4370         Add missing "break".
4371         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
4372         Add missing "break".
4373
4374 2018-05-04  Tom Tromey  <tom@tromey.com>
4375
4376         * rs6000-tdep.c (ppc_process_record_op4)
4377         (ppc_process_record_op63): Add fall-through comment.
4378
4379 2018-05-04  Tom Tromey  <tom@tromey.com>
4380
4381         * i386-tdep.c (i386_process_record): Add fall-through comment.
4382
4383 2018-05-04  Tom Tromey  <tom@tromey.com>
4384
4385         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
4386         comment.
4387
4388 2018-05-04  Tom Tromey  <tom@tromey.com>
4389
4390         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
4391         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
4392         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
4393         comment.
4394         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
4395         comment.
4396         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
4397         comment.
4398
4399 2018-05-04  Tom Tromey  <tom@tromey.com>
4400
4401         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
4402
4403 2018-05-04  Tom Tromey  <tom@tromey.com>
4404
4405         * s390-tdep.c (s390_process_record): Fix fall-through comments.
4406         * xcoffread.c (scan_xcoff_symtab): Move comment later.
4407         * symfile.c (section_is_mapped): Fix fall-through comment.
4408         * stabsread.c (define_symbol, read_member_functions): Fix
4409         fall-through comment.
4410         * s390-linux-tdep.c (s390_process_record): Fix fall-through
4411         comment.
4412         * remote.c (remote_wait_as): Fix fall-through comment.
4413         * p-exp.y (yylex): Fix fall-through comment.
4414         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
4415         comment.
4416         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
4417         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
4418         * jv-exp.y (yylex): Fix fall-through comment.
4419         * go-exp.y (lex_one_token): Fix fall-through comment.
4420         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
4421         fall-through comment.
4422         * f-exp.y (yylex): Fix fall-through comment.
4423         * dwarf2read.c (process_die): Fix fall-through comments.
4424         * dbxread.c (process_one_symbol): Fix fall-through comment.
4425         * d-exp.y (lex_one_token): Fix fall-through comment.
4426         * cp-name-parser.y (yylex): Fix fall-through comment.
4427         * coffread.c (coff_symtab_read): Fix fall-through comment.
4428         * c-exp.y (lex_one_token): Fix fall-through comment.
4429         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
4430         comment.
4431         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
4432         comment.
4433
4434 2018-05-04  Tom Tromey  <tom@tromey.com>
4435
4436         PR python/22730:
4437         * NEWS: Mention gdb.execute change.
4438         * gdbcmd.h (execute_control_command): Don't declare.
4439         * python/python.c (execute_gdb_command): Use read_command_lines_1,
4440         execute_control_commands, execute_control_commands_to_string.
4441         * cli/cli-script.h (execute_control_commands)
4442         (execute_control_commands_to_string): Declare.
4443         (execute_control_command): Add from_tty parameter.
4444         * cli/cli-script.c (execute_control_commands)
4445         (execute_control_commands_to_string): New functions.
4446         (execute_user_command): Use execute_control_commands.
4447         (execute_control_command_1): Add "from_tty" parameter.  Update.
4448         (execute_control_command): Likewise.
4449
4450 2018-05-04  Tom Tromey  <tom@tromey.com>
4451
4452         PR python/22731:
4453         * NEWS: Mention that breakpoint commands are writable.
4454         * python/py-breakpoint.c (bppy_set_commands): New function.
4455         (breakpoint_object_getset) <"commands">: Use it.
4456
4457 2018-05-04  Tom Tromey  <tom@tromey.com>
4458
4459         * tracepoint.c (actions_command): Update.
4460         * mi/mi-cmd-break.c (mi_command_line_array)
4461         (mi_command_line_array_cnt, mi_command_line_array_ptr)
4462         (mi_read_next_line): Remove.
4463         (mi_cmd_break_commands): Update.
4464         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
4465         function_view.
4466         * cli/cli-script.c (get_command_line): Update.
4467         (process_next_line): Use function_view.  Constify.
4468         (recurse_read_control_structure, read_command_lines)
4469         (read_command_lines_1): Change argument types to function_view.
4470         (do_define_command, document_command): Update.
4471         * breakpoint.h (check_tracepoint_command): Don't declare.
4472         * breakpoint.c (check_tracepoint_command): Remove.
4473         (commands_command_1, create_tracepoint_from_upload): Update.
4474
4475 2018-05-04  Tom Tromey  <tom@tromey.com>
4476
4477         PR gdb/11750:
4478         * cli/cli-script.h (enum command_control_type) <define_control>:
4479         New constant.
4480         * cli/cli-script.c (multi_line_command_p): Handle define_control.
4481         (build_command_line, execute_control_command_1)
4482         (process_next_line): Likewise.
4483         (do_define_command): New function, extracted from define_command.
4484         (define_command): Use it.
4485
4486 2018-05-04  Tom Tromey  <tom@tromey.com>
4487
4488         * tracepoint.c (actions_command): Update.
4489         * cli/cli-script.h (read_command_lines): Update.
4490         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
4491         (MAX_TMPBUF): Remove define.
4492         (define_command): Use string_printf.
4493         (document_command): Likewise.
4494         * breakpoint.c (commands_command_1): Update.
4495
4496 2018-05-04  Tom Tromey  <tom@tromey.com>
4497
4498         * top.c (execute_command): Update.
4499         * cli/cli-script.h (print_command_lines): Now varargs.
4500         * cli/cli-script.c (print_command_lines): Now varargs.
4501         (execute_control_command_1) <case while_control, case if_control>:
4502         Update.
4503
4504 2018-05-04  Tom Tromey  <tom@tromey.com>
4505
4506         * tracepoint.c (all_tracepoint_actions): Rename from
4507         all_tracepoint_actions_and_cleanup.  Change return type.
4508         (actions_command, encode_actions_1, encode_actions)
4509         (trace_dump_actions, tdump_command): Update.
4510         * remote.c (remote_download_command_source): Update.
4511         * python/python.c (gdbpy_eval_from_control_command)
4512         (python_command, python_interactive_command): Update.
4513         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
4514         * guile/guile.c (guile_command)
4515         (gdbscm_eval_from_control_command, guile_command): Update.
4516         * compile/compile.c (compile_code_command)
4517         (compile_print_command, compile_to_object): Update.
4518         * cli/cli-script.h (struct command_lines_deleter): New.
4519         (counted_command_line): New typedef.
4520         (struct command_line): Add constructor, destructor.
4521         <body_list>: Remove.
4522         <body_list_0, body_list_1>: New members.
4523         (command_line_up): Remove typedef.
4524         (read_command_lines, read_command_lines_1, get_command_line):
4525         Update.
4526         (copy_command_lines): Don't declare.
4527         * cli/cli-script.c (build_command_line): Use "new".
4528         (get_command_line): Return counted_command_line.
4529         (print_command_lines, execute_user_command)
4530         (execute_control_command_1, while_command, if_command): Update.
4531         (realloc_body_list): Remove.
4532         (process_next_line, recurse_read_control_structure): Update.
4533         (read_command_lines, read_command_lines_1): Return counted_command_line.
4534         (free_command_lines): Use "delete".
4535         (copy_command_lines): Remove.
4536         (define_command, document_command, show_user_1): Update.
4537         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
4538         a counted_command_line.
4539         * breakpoint.h (counted_command_line): Remove typedef.
4540         (breakpoint_set_commands): Update.
4541         * breakpoint.c (check_no_tracepoint_commands)
4542         (validate_commands_for_breakpoint): Update.
4543         (breakpoint_set_commands): Change commands to be a
4544         counted_command_line.
4545         (commands_command_1, update_dprintf_command_list)
4546         (create_tracepoint_from_upload): Update.
4547
4548 2018-05-04  Tom Tromey  <tom@tromey.com>
4549
4550         * cli/cli-decode.h (cmd_list_element): New constructor.
4551         (~cmd_list_element): New destructor.
4552         (struct cmd_list_element): Add initializers.
4553         * cli/cli-decode.c (do_add_cmd): Use "new".
4554         (delete_cmd): Use "delete".
4555
4556 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
4557             Pedro Alves <palves@redhat.com>
4558
4559         PR breakpoints/19806 and support for PR external/20207.
4560         * NEWS: Mention Aarch64 watchpoint improvements.
4561         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
4562         watchpoints and PR external/20207 watchpoints.
4563         * nat/aarch64-linux-hw-point.c
4564         (kernel_supports_any_contiguous_range): New.
4565         (aarch64_watchpoint_offset): New.
4566         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
4567         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
4568         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
4569         (aarch64_align_watchpoint): New parameters aligned_offset_p and
4570         next_addr_orig_p.  Support PR external/20207 watchpoints.
4571         (aarch64_downgrade_regs): New.
4572         (aarch64_dr_state_insert_one_point): New parameters offset and
4573         addr_orig.
4574         (aarch64_dr_state_remove_one_point): Likewise.
4575         (aarch64_handle_breakpoint): Update caller.
4576         (aarch64_handle_aligned_watchpoint): Likewise.
4577         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
4578         aligned_offset.
4579         (aarch64_linux_set_debug_regs): Remove const from state.  Call
4580         aarch64_downgrade_regs.
4581         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
4582         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
4583         (DR_CONTROL_MASK): ... this.
4584         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
4585         (unsigned int aarch64_watchpoint_offset): New prototype.
4586         (aarch64_linux_set_debug_regs): Remove const from state.
4587         * utils.c (align_up, align_down): Move to ...
4588         * common/common-utils.c (align_up, align_down): ... here.
4589         * utils.h (align_up, align_down): Move to ...
4590         * common/common-utils.h (align_up, align_down): ... here.
4591
4592 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
4593
4594         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
4595         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
4596         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
4597         Re-implement to match the ABI as summarized in GCC's
4598         gcc/config/sparc/sparc.c.  All callers updated.
4599         (sparc32_store_arguments): Remove assertion.
4600
4601 2018-05-04  Tom Tromey  <tom@tromey.com>
4602
4603         * printcmd.c: Don't include tui.h.
4604         (decode_format): Use skip_spaces.
4605
4606 2018-05-04  Tom Tromey  <tom@tromey.com>
4607
4608         PR gdb/22619:
4609         * printcmd.c (last_count): New global.
4610         (x_command): Use saved count when repeating.
4611
4612 2018-05-04  Tom Tromey  <tom@tromey.com>
4613
4614         * nto-procfs.c (do_closedir_cleanup): Remove.
4615         (procfs_pidlist): Use gdb_dir_up.
4616         * procfs.c (do_closedir_cleanup): Remove.
4617         (proc_update_threads): Use gdb_dir_up.
4618         * common/filestuff.h (struct gdb_dir_deleter): New.
4619         (gdb_dir_up): New typedef.
4620
4621 2018-05-04  Tom Tromey  <tom@tromey.com>
4622
4623         * ada-lang.c (print_mention_exception): Use std::string.
4624
4625 2018-05-04  Tom Tromey  <tom@tromey.com>
4626
4627         * ada-lang.c (create_excep_cond_exprs): Update.
4628         (ada_exception_catchpoint_cond_string): Use std::string.
4629
4630 2018-05-04  Tom Tromey  <tom@tromey.com>
4631
4632         * ada-lang.c (xget_renaming_scope): Return std::string.
4633         (old_renaming_is_invisible): Update.
4634
4635 2018-05-04  Tom Tromey  <tom@tromey.com>
4636
4637         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
4638         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
4639
4640 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
4641
4642         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
4643
4644 2018-05-04  Tom Tromey  <tom@tromey.com>
4645
4646         * remote.c (remote_query_supported_append): Change type.
4647         (remote_check_symbols): Update.
4648
4649 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
4650
4651         PR gdb/11420
4652         * configure.ac: Prepend libpython.
4653         * python/python-config.py: Likewise.
4654         * configure: Regenerate.
4655
4656 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
4657
4658         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
4659
4660 2018-05-03  Pedro Alves  <palves@redhat.com>
4661
4662         * s390-linux-nat.c
4663         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
4664         override.  Write 'true' instead of '1'.
4665         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
4666         declaration.
4667
4668 2018-05-02  Pedro Alves  <palves@redhat.com>
4669
4670         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
4671         add_inf_child_target.
4672         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
4673         add_inf_child_target.
4674         * aix-thread.c (aix_thread_target_info): New.
4675         (aix_thread_target) <shortname, longname, doc>: Delete.
4676         <info>: New.
4677         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
4678         add_inf_child_target.
4679         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
4680         add_inf_child_target.
4681         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
4682         add_inf_child_target.
4683         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
4684         add_inf_child_target.
4685         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
4686         add_inf_child_target.
4687         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
4688         add_inf_child_target.
4689         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
4690         add_inf_child_target.
4691         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
4692         add_inf_child_target.
4693         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
4694         add_inf_child_target.
4695         * bfd-target.c (target_bfd_target_info): New.
4696         (target_bfd) <shortname, longname, doc>: Delete.
4697         <info>: New.
4698         * bsd-kvm.c (bsd_kvm_target_info): New.
4699         (bsd_kvm_target) <shortname, longname, doc>: Delete.
4700         <info>: New.
4701         (bsd_kvm_target::open): Rename to ...
4702         (bsd_kvm_target_open): ... this.  Adjust.
4703         * bsd-uthread.c (bsd_uthread_target_info): New.
4704         (bsd_uthread_target) <shortname, longname, doc>: Delete.
4705         <info>: New.
4706         * corefile.c (core_file_command): Adjust.
4707         * corelow.c (core_target_info): New.
4708         (core_target) <shortname, longname, doc>: Delete.
4709         <info>: New.
4710         (core_target::open): Rename to ...
4711         (core_target_open): ... this.  Adjust.
4712         * ctf.c (ctf_target_info): New.
4713         (ctf_target) <shortname, longname, doc>: Delete.
4714         <info>: New.
4715         (ctf_target::open): Rename to ...
4716         (ctf_target_open): ... this.
4717         (_initialize_ctf): Adjust.
4718         * exec.c (exec_target_info): New.
4719         (exec_target) <shortname, longname, doc>: Delete.
4720         <info>: New.
4721         (exec_target::open): Rename to ...
4722         (exec_target_open): ... this.
4723         * gdbcore.h (core_target_open): Declare.
4724         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
4725         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
4726         add_inf_child_target.
4727         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
4728         add_inf_child_target.
4729         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
4730         add_inf_child_target.
4731         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
4732         add_inf_child_target.
4733         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
4734         add_inf_child_target.
4735         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
4736         add_inf_child_target.
4737         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
4738         add_inf_child_target.
4739         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
4740         add_inf_child_target.
4741         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
4742         add_inf_child_target.
4743         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
4744         add_inf_child_target.
4745         * inf-child.c (inf_child_target_info): New.
4746         (inf_child_target::info): New.
4747         (inf_child_open_target): Remove 'target' parameter.  Use
4748         get_native_target instead.
4749         (inf_child_target::open): Delete.
4750         (add_inf_child_target): New.
4751         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
4752         Delete.
4753         <info>: New.
4754         (add_inf_child_target): Declare.
4755         (inf_child_open_target): Declare.
4756         * linux-thread-db.c (thread_db_target_info): New.
4757         (thread_db_target) <shortname, longname, doc>: Delete.
4758         <info>: New.
4759         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
4760         add_inf_child_target.
4761         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
4762         add_inf_child_target.
4763         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
4764         add_inf_child_target.
4765         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
4766         add_inf_child_target.
4767         * make-target-delegates (print_class): Adjust.
4768         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
4769         add_inf_child_target.
4770         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
4771         add_inf_child_target.
4772         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
4773         add_inf_child_target.
4774         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
4775         add_inf_child_target.
4776         * nto-procfs.c (nto_native_target_info): New.
4777         (nto_procfs_target_native) <shortname, longname, doc>:
4778         Delete.
4779         <info>: New.
4780         (nto_procfs_target_info): New.
4781         (nto_procfs_target_procfs) <shortname, longname, doc>:
4782         Delete.
4783         <info>: New.
4784         (init_procfs_targets): Adjust.
4785         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
4786         add_inf_child_target.
4787         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
4788         add_inf_child_target.
4789         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
4790         add_inf_child_target.
4791         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
4792         add_inf_child_target.
4793         * ravenscar-thread.c (ravenscar_target_info): New.
4794         (ravenscar_thread_target) <shortname, longname, doc>:
4795         Delete.
4796         <info>: New.
4797         * record-btrace.c (record_btrace_target_info):
4798         (record_btrace_target) <shortname, longname, doc>: Delete.
4799         <info>: New.
4800         (record_btrace_target::open): Rename to ...
4801         (record_btrace_target_open): ... this.  Adjust.
4802         * record-full.c (record_longname, record_doc): New.
4803         (record_full_base_target) <shortname, longname, doc>: Delete.
4804         <info>: New.
4805         (record_full_target_info): New.
4806         (record_full_target): <shortname>: Delete.
4807         <info>: New.
4808         (record_full_core_open_1, record_full_open_1): Update comments.
4809         (record_full_base_target::open): Rename to ...
4810         (record_full_open): ... this.
4811         (cmd_record_full_restore): Update.
4812         (_initialize_record_full): Update.
4813         * remote-sim.c (remote_sim_target_info): New.
4814         (gdbsim_target) <shortname, longname, doc>: Delete.
4815         <info>: New.
4816         (gdbsim_target::open): Rename to ...
4817         (gdbsim_target_open): ... this.
4818         (_initialize_remote_sim): Adjust.
4819         * remote.c (remote_doc): New.
4820         (remote_target_info): New.
4821         (remote_target) <shortname, longname, doc>: Delete.
4822         <info>: New.
4823         (extended_remote_target_info): New.
4824         (extended_remote_target) <shortname, longname, doc>: Delete.
4825         <info>: New.
4826         (remote_target::open_1): Make static.  Adjust.
4827         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
4828         * s390-linux-nat.c (_initialize_s390_nat): Use
4829         add_inf_child_target.
4830         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
4831         add_inf_child_target.
4832         * sol-thread.c (thread_db_target_info): New.
4833         (sol_thread_target) <shortname, longname, doc>: Delete.
4834         <info>: New.
4835         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
4836         add_inf_child_target.
4837         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
4838         add_inf_child_target.
4839         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
4840         add_inf_child_target.
4841         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
4842         add_inf_child_target.
4843         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
4844         add_inf_child_target.
4845         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
4846         add_inf_child_target.
4847         * spu-linux-nat.c (_initialize_spu_nat): Use
4848         add_inf_child_target.
4849         * spu-multiarch.c (spu_multiarch_target_info): New.
4850         (spu_multiarch_target) <shortname, longname, doc>: Delete.
4851         <info>: New.
4852         * target-delegates.c: Regenerate.
4853         * target.c: Include <unordered_map>.
4854         (target_ops_p): Delete.
4855         (DEF_VEC_P(target_ops_p)): Delete.
4856         (target_factories): New.
4857         (test_target_info): New.
4858         (test_target_ops::info): New.
4859         (open_target): Adjust to use target_factories.
4860         (add_target_with_completer): Rename to ...
4861         (add_target): ... this.  Change prototype.  Register target_info
4862         and open callback in target_factories.  Register target_info in
4863         command context instead of target_ops.
4864         (add_target): Delete old implementation.
4865         (add_deprecated_target_alias): Change prototype.  Adjust.
4866         (the_native_target): New.
4867         (set_native_target, get_native_target): New.
4868         (find_default_run_target): Use the_native_target.
4869         (find_attach_target, find_run_target): Simplify.
4870         (target_ops::open): Delete.
4871         (dummy_target_info): New.
4872         (dummy_target::shortname, dummy_target::longname)
4873         (dummy_target::doc): Delete.
4874         (dummy_target::info): New.
4875         (debug_target::shortname, debug_target::longname)
4876         (debug_target::doc): Delete.
4877         (debug_target::info): New.
4878         * target.h (struct target_info): New.
4879         (target_ops::~target_ops): Add comment.
4880         (target_ops::info): New.
4881         (target_ops::shortname, target_ops::longname, target_ops::doc): No
4882         longer virtual.  Implement in terms of target_info.
4883         (set_native_target, get_native_target): Declare.
4884         (target_open_ftype): New.
4885         (add_target, add_target_with_completer)
4886         (add_deprecated_target_alias): Change prototype.
4887         (test_target) <shortname, longname, doc>: Delete.
4888         <info>: New.
4889         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
4890         add_inf_child_target.
4891         * tracefile-tfile.c (tfile_target_info): New.
4892         (tfile_target) <shortname, longname, doc>: Delete.
4893         <info>: New.
4894         (tfile_target::open): Rename to ...
4895         (tfile_target_open): ... this.
4896         (_initialize_tracefile_tfile): Adjust.
4897         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
4898         add_inf_child_target.
4899         * windows-nat.c (_initialize_windows_nat): Use
4900         add_inf_child_target.
4901         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
4902         add_inf_child_target.
4903
4904 2018-05-02  Pedro Alves  <palves@redhat.com>
4905
4906         * linux-nat.h (linux_nat_target) <low_new_thread,
4907         low_delete_thread, low_new_fork, low_forget_process,
4908         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
4909         New virtual methods.
4910         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4911         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
4912         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
4913         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4914         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
4915         Delete.
4916         * linux-fork.c (delete_fork): Adjust to call low method.
4917         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
4918         (linux_nat_new_fork, linux_nat_forget_process_hook)
4919         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
4920         (linux_nat_status_is_event):
4921         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
4922         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
4923         to call low method.
4924         (sigtrap_is_event): Rename to ...
4925         (linux_nat_target::low_status_is_event): ... this.
4926         (linux_nat_set_status_is_event): Delete.
4927         (save_stop_reason, linux_nat_wait_1)
4928         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
4929         low methods.
4930         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4931         (linux_nat_set_new_fork, linux_nat_set_forget_process)
4932         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4933         (linux_nat_set_prepare_to_resume): Delete.
4934         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
4935         low virtual methods.
4936         * amd64-linux-nat.c: Likewise.
4937         * arm-linux-nat.c: Likewise.
4938         * i386-linux-nat.c: Likewise.
4939         * ia64-linux-nat.c: Likewise.
4940         * mips-linux-nat.c: Likewise.
4941         * ppc-linux-nat.c: Likewise.
4942         * s390-linux-nat.c: Likewise.
4943         * sparc64-linux-nat.c: Likewise.
4944         * x86-linux-nat.c: Likewise.
4945         * x86-linux-nat.h: Include "nat/x86-linux.h".
4946         (x86_linux_nat_target) <low_new_fork, low_forget_process,
4947         low_prepare_to_resume, low_new_thread, low_delete_thread>:
4948         Override methods.
4949
4950 2018-05-02  Pedro Alves  <palves@redhat.com>
4951
4952         * target.h (target_ops)
4953         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4954         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
4955         stopped_by_watchpoint, have_continuable_watchpoint,
4956         stopped_data_address, watchpoint_addr_within_range,
4957         can_accel_watchpoint_condition, can_run, thread_alive,
4958         has_all_memory, has_memory, has_stack, has_registers,
4959         has_execution, can_async_p, is_async_p, supports_non_stop,
4960         always_non_stop_p, can_execute_reverse, supports_multi_process,
4961         supports_enable_disable_tracepoint,
4962         supports_disable_randomization, supports_string_tracing,
4963         supports_evaluation_of_breakpoint_conditions,
4964         can_run_breakpoint_commands, filesystem_is_local,
4965         can_download_tracepoint, get_trace_state_variable_value,
4966         set_trace_notes, get_tib_address, use_agent, can_use_agent,
4967         record_is_replaying, record_will_replay,
4968         augmented_libraries_svr4_read>: Adjust to return bool.
4969         * aarch64-linux-nat.c: All implementations adjusted.
4970         * aix-thread.c: All implementations adjusted.
4971         * arm-linux-nat.c: All implementations adjusted.
4972         * breakpoint.c: All implementations adjusted.
4973         * bsd-kvm.c: All implementations adjusted.
4974         * bsd-uthread.c: All implementations adjusted.
4975         * corelow.c: All implementations adjusted.
4976         * ctf.c: All implementations adjusted.
4977         * darwin-nat.c: All implementations adjusted.
4978         * darwin-nat.h: All implementations adjusted.
4979         * exec.c: All implementations adjusted.
4980         * fbsd-nat.c: All implementations adjusted.
4981         * fbsd-nat.h: All implementations adjusted.
4982         * gnu-nat.c: All implementations adjusted.
4983         * gnu-nat.h: All implementations adjusted.
4984         * go32-nat.c: All implementations adjusted.
4985         * ia64-linux-nat.c: All implementations adjusted.
4986         * inf-child.c: All implementations adjusted.
4987         * inf-child.h: All implementations adjusted.
4988         * inf-ptrace.c: All implementations adjusted.
4989         * inf-ptrace.h: All implementations adjusted.
4990         * linux-nat.c: All implementations adjusted.
4991         * linux-nat.h: All implementations adjusted.
4992         * mips-linux-nat.c: All implementations adjusted.
4993         * nto-procfs.c: All implementations adjusted.
4994         * ppc-linux-nat.c: All implementations adjusted.
4995         * procfs.c: All implementations adjusted.
4996         * ravenscar-thread.c: All implementations adjusted.
4997         * record-btrace.c: All implementations adjusted.
4998         * record-full.c: All implementations adjusted.
4999         * remote-sim.c: All implementations adjusted.
5000         * remote.c: All implementations adjusted.
5001         * s390-linux-nat.c: All implementations adjusted.
5002         * sol-thread.c: All implementations adjusted.
5003         * spu-multiarch.c: All implementations adjusted.
5004         * target-delegates.c: All implementations adjusted.
5005         * target.c: All implementations adjusted.
5006         * target.h: All implementations adjusted.
5007         * tracefile-tfile.c: All implementations adjusted.
5008         * tracefile.c: All implementations adjusted.
5009         * tracefile.h: All implementations adjusted.
5010         * windows-nat.c: All implementations adjusted.
5011         * x86-linux-nat.h: All implementations adjusted.
5012         * x86-nat.h: All implementations adjusted.
5013
5014 2018-05-02  Pedro Alves  <palves@redhat.com>
5015
5016         * make-target-delegates (scan_target_h): Don't trim lines here.
5017         Replace sequences of tabs and/or whitespace with a single
5018         whitespace.
5019         (top level, parsing methods): Trim each line before processing it
5020         here.
5021
5022 2018-05-02  Pedro Alves  <palves@redhat.com>
5023             John Baldwin  <jhb@freebsd.org>
5024
5025         * target.h (enum strata) <debug_stratum>: New.
5026         (struct target_ops) <all delegation methods>: Replace by C++
5027         virtual methods, and drop "to_" prefix.  All references updated
5028         throughout.
5029         <to_shortname, to_longname, to_doc, to_data,
5030         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5031         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5032         virtual methods.  All references updated throughout.
5033         <can_attach, supports_terminal_ours, can_create_inferior,
5034         get_thread_control_capabilities, attach_no_wait>: New
5035         virtual methods.
5036         <insert_breakpoint, remove_breakpoint>: Now
5037         TARGET_DEFAULT_NORETURN methods.
5038         <info_proc>: Now returns bool.
5039         <to_magic>: Delete.
5040         (OPS_MAGIC): Delete.
5041         (current_target): Delete.  All references replaced by references
5042         to ...
5043         (target_stack): ... this.  New.
5044         (target_shortname, target_longname): Adjust.
5045         (target_can_run): Now a function declaration.
5046         (default_child_has_all_memory, default_child_has_memory)
5047         (default_child_has_stack, default_child_has_registers)
5048         (default_child_has_execution): Remove target_ops parameter.
5049         (complete_target_initialization): Delete.
5050         (memory_breakpoint_target): New template class.
5051         (test_target_ops): Refactor as a C++ class with virtual methods.
5052         * make-target-delegates (NAME_PART): Tighten.
5053         (POINTER_PART, CP_SYMBOL): New.
5054         (SIMPLE_RETURN_PART): Reimplement.
5055         (VEC_RETURN_PART): Expect less.
5056         (RETURN_PART, VIRTUAL_PART): New.
5057         (METHOD): Adjust to C++ virtual methods.
5058         (scan_target_h): Remove reference to C99.
5059         (dname): Output "target_ops::" prefix.
5060         (write_function_header): Adjust to output a C++ class method.
5061         (write_declaration): New.
5062         (write_delegator): Adjust to output a C++ class method.
5063         (tdname): Output "dummy_target::" prefix.
5064         (write_tdefault, write_debugmethod): Adjust to output a C++ class
5065         method.
5066         (tdefault_names, debug_names): Delete.
5067         (return_types, tdefaults, styles, argtypes_array): New.
5068         (top level): All methods are delegators.
5069         (print_class): New.
5070         (top level): Print dummy_target and debug_target classes.
5071         * target-delegates.c: Regenerate.
5072         * target-debug.h (target_debug_print_enum_info_proc_what)
5073         (target_debug_print_thread_control_capabilities)
5074         (target_debug_print_thread_info_p): New.
5075         * target.c (dummy_target): Delete.
5076         (the_dummy_target, the_debug_target): New.
5077         (target_stack): Now extern.
5078         (set_targetdebug): Push/unpush debug target.
5079         (default_child_has_all_memory, default_child_has_memory)
5080         (default_child_has_stack, default_child_has_registers)
5081         (default_child_has_execution): Remove target_ops parameter.
5082         (complete_target_initialization): Delete.
5083         (add_target_with_completer): No longer call
5084         complete_target_initialization.
5085         (target_supports_terminal_ours): Use regular delegation.
5086         (update_current_target): Delete.
5087         (push_target): No longer check magic number.  Don't call
5088         update_current_target.
5089         (unpush_target): Don't call update_current_target.
5090         (target_is_pushed): No longer check magic number.
5091         (target_require_runnable): Skip for all stratums over
5092         process_stratum.
5093         (target_ops::info_proc): New.
5094         (target_info_proc): Use find_target_at and
5095         find_default_run_target.
5096         (target_supports_disable_randomization): Use regular delegation.
5097         (target_get_osdata): Use find_target_at.
5098         (target_ops::open, target_ops::close, target_ops::can_attach)
5099         (target_ops::attach, target_ops::can_create_inferior)
5100         (target_ops::create_inferior, target_ops::can_run)
5101         (target_can_run): New.
5102         (default_fileio_target): Use regular delegation.
5103         (target_ops::fileio_open, target_ops::fileio_pwrite)
5104         (target_ops::fileio_pread, target_ops::fileio_fstat)
5105         (target_ops::fileio_close, target_ops::fileio_unlink)
5106         (target_ops::fileio_readlink): New.
5107         (target_fileio_open_1, target_fileio_unlink)
5108         (target_fileio_readlink): Always call the target method.  Handle
5109         FILEIO_ENOSYS.
5110         (return_zero, return_zero_has_execution): Delete.
5111         (init_dummy_target): Delete.
5112         (dummy_target::dummy_target, dummy_target::shortname)
5113         (dummy_target::longname, dummy_target::doc)
5114         (debug_target::debug_target, debug_target::shortname)
5115         (debug_target::longname, debug_target::doc): New.
5116         (target_supports_delete_record): Use regular delegation.
5117         (setup_target_debug): Delete.
5118         (maintenance_print_target_stack): Skip debug_stratum.
5119         (initialize_targets): Instantiate the_dummy_target and
5120         the_debug_target.
5121         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
5122         use target_stack.
5123         (target_auxv_search, fprint_target_auxv): Adjust.
5124         (info_auxv_command): Adjust to use target_stack.
5125         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
5126         * exceptions.c (print_flush): Handle a NULL target_stack.
5127         * regcache.c (target_ops_no_register): Refactor as class with
5128         virtual methods.
5129
5130         * exec.c (exec_target): New class.
5131         (exec_ops): Now an exec_target.
5132         (exec_open, exec_close_1, exec_get_section_table)
5133         (exec_xfer_partial, exec_files_info, exec_has_memory)
5134         (exec_make_note_section): Refactor as exec_target methods.
5135         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
5136         Delete.
5137         (exec_target::find_memory_regions): New.
5138         (_initialize_exec): Don't call init_exec_ops.
5139         * gdbcore.h (exec_file_clear): Delete.
5140
5141         * corefile.c (core_target): Delete.
5142         (core_file_command): Adjust.
5143         * corelow.c (core_target): New class.
5144         (the_core_target): New.
5145         (core_close): Remove target_ops parameter.
5146         (core_close_cleanup): Adjust.
5147         (core_target::close): New.
5148         (core_open, core_detach, get_core_registers, core_files_info)
5149         (core_xfer_partial, core_thread_alive, core_read_description)
5150         (core_pid_to_str, core_thread_name, core_has_memory)
5151         (core_has_stack, core_has_registers, core_info_proc): Rework as
5152         core_target methods.
5153         (ignore, core_remove_breakpoint, init_core_ops): Delete.
5154         (_initialize_corelow): Initialize the_core_target.
5155         * gdbcore.h (core_target): Delete.
5156         (the_core_target): New.
5157
5158         * ctf.c: (ctf_target): New class.
5159         (ctf_ops): Now a ctf_target.
5160         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
5161         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
5162         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
5163         methods.
5164         (init_ctf_ops): Delete.
5165         (_initialize_ctf): Don't call it.
5166         * tracefile-tfile.c (tfile_target): New class.
5167         (tfile_ops): Now a tfile_target.
5168         (tfile_open, tfile_close, tfile_files_info)
5169         (tfile_get_tracepoint_status, tfile_trace_find)
5170         (tfile_fetch_registers, tfile_xfer_partial)
5171         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
5172         Refactor as tfile_target methods.
5173         (tfile_xfer_partial_features): Remove target_ops parameter.
5174         (init_tfile_ops): Delete.
5175         (_initialize_tracefile_tfile): Don't call it.
5176         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
5177         (tracefile_has_stack, tracefile_has_registers)
5178         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
5179         tracefile_target methods.
5180         (init_tracefile_ops): Delete.
5181         (tracefile_target::tracefile_target): New.
5182         * tracefile.h: Include "target.h".
5183         (tracefile_target): New class.
5184         (init_tracefile_ops): Delete.
5185
5186         * spu-multiarch.c (spu_multiarch_target): New class.
5187         (spu_ops): Now a spu_multiarch_target.
5188         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
5189         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
5190         (spu_search_memory, spu_mourn_inferior): Refactor as
5191         spu_multiarch_target methods.
5192         (init_spu_ops): Delete.
5193         (_initialize_spu_multiarch): Remove references to init_spu_ops,
5194         complete_target_initialization.
5195
5196         * ravenscar-thread.c (ravenscar_thread_target): New class.
5197         (ravenscar_ops): Now a ravenscar_thread_target.
5198         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
5199         (ravenscar_thread_alive, ravenscar_pid_to_str)
5200         (ravenscar_fetch_registers, ravenscar_store_registers)
5201         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
5202         (ravenscar_stopped_by_hw_breakpoint)
5203         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
5204         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
5205         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
5206         methods.
5207         (init_ravenscar_thread_ops): Delete.
5208         (_initialize_ravenscar): Remove references to
5209         init_ravenscar_thread_ops and complete_target_initialization.
5210
5211         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
5212         (bsd_uthread_target): New class.
5213         (bsd_uthread_ops): Now a bsd_uthread_target.
5214         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
5215         (bsd_uthread_close, bsd_uthread_mourn_inferior)
5216         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
5217         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
5218         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
5219         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
5220         (bsd_uthread_target): Delete function.
5221         (_initialize_bsd_uthread): Remove reference to
5222         complete_target_initialization.
5223
5224         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
5225         (target_bfd): ... this new class.
5226         (target_bfd_xfer_partial, target_bfd_get_section_table)
5227         (target_bfd_close): Refactor as target_bfd methods.
5228         (target_bfd::~target_bfd): New.
5229         (target_bfd_reopen): Adjust.
5230         (target_bfd::close): New.
5231
5232         * record-btrace.c (record_btrace_target): New class.
5233         (record_btrace_ops): Now a record_btrace_target.
5234         (record_btrace_open, record_btrace_stop_recording)
5235         (record_btrace_disconnect, record_btrace_close)
5236         (record_btrace_async, record_btrace_info)
5237         (record_btrace_insn_history, record_btrace_insn_history_range)
5238         (record_btrace_insn_history_from, record_btrace_call_history)
5239         (record_btrace_call_history_range)
5240         (record_btrace_call_history_from, record_btrace_record_method)
5241         (record_btrace_is_replaying, record_btrace_will_replay)
5242         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
5243         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
5244         (record_btrace_store_registers, record_btrace_prepare_to_store)
5245         (record_btrace_to_get_unwinder)
5246         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
5247         (record_btrace_commit_resume, record_btrace_wait)
5248         (record_btrace_stop, record_btrace_can_execute_reverse)
5249         (record_btrace_stopped_by_sw_breakpoint)
5250         (record_btrace_supports_stopped_by_sw_breakpoint)
5251         (record_btrace_stopped_by_hw_breakpoint)
5252         (record_btrace_supports_stopped_by_hw_breakpoint)
5253         (record_btrace_update_thread_list, record_btrace_thread_alive)
5254         (record_btrace_goto_begin, record_btrace_goto_end)
5255         (record_btrace_goto, record_btrace_stop_replaying_all)
5256         (record_btrace_execution_direction)
5257         (record_btrace_prepare_to_generate_core)
5258         (record_btrace_done_generating_core): Refactor as
5259         record_btrace_target methods.
5260         (init_record_btrace_ops): Delete.
5261         (_initialize_record_btrace): Remove reference to
5262         init_record_btrace_ops.
5263         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
5264         the execution_direction global.
5265         (record_full_base_target, record_full_target)
5266         (record_full_core_target): New classes.
5267         (record_full_ops): Now a record_full_target.
5268         (record_full_core_ops): Now a record_full_core_target.
5269         (record_full_target::detach, record_full_target::disconnect)
5270         (record_full_core_target::disconnect)
5271         (record_full_target::mourn_inferior, record_full_target::kill):
5272         New.
5273         (record_full_open, record_full_close, record_full_async): Refactor
5274         as methods of the record_full_base_target class.
5275         (record_full_resume, record_full_commit_resume): Refactor
5276         as methods of the record_full_target class.
5277         (record_full_wait, record_full_stopped_by_watchpoint)
5278         (record_full_stopped_data_address)
5279         (record_full_stopped_by_sw_breakpoint)
5280         (record_full_supports_stopped_by_sw_breakpoint)
5281         (record_full_stopped_by_hw_breakpoint)
5282         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
5283         methods of the record_full_base_target class.
5284         (record_full_store_registers, record_full_xfer_partial)
5285         (record_full_insert_breakpoint, record_full_remove_breakpoint):
5286         Refactor as methods of the record_full_target class.
5287         (record_full_can_execute_reverse, record_full_get_bookmark)
5288         (record_full_goto_bookmark, record_full_execution_direction)
5289         (record_full_record_method, record_full_info, record_full_delete)
5290         (record_full_is_replaying, record_full_will_replay)
5291         (record_full_goto_begin, record_full_goto_end, record_full_goto)
5292         (record_full_stop_replaying): Refactor as methods of the
5293         record_full_base_target class.
5294         (record_full_core_resume, record_full_core_kill)
5295         (record_full_core_fetch_registers)
5296         (record_full_core_prepare_to_store)
5297         (record_full_core_store_registers, record_full_core_xfer_partial)
5298         (record_full_core_insert_breakpoint)
5299         (record_full_core_remove_breakpoint)
5300         (record_full_core_has_execution): Refactor
5301         as methods of the record_full_core_target class.
5302         (record_full_base_target::supports_delete_record): New.
5303         (init_record_full_ops): Delete.
5304         (init_record_full_core_ops): Delete.
5305         (record_full_save): Refactor as method of the
5306         record_full_base_target class.
5307         (_initialize_record_full): Remove references to
5308         init_record_full_ops and init_record_full_core_ops.
5309
5310         * remote.c (remote_target, extended_remote_target): New classes.
5311         (remote_ops): Now a remote_target.
5312         (extended_remote_ops): Now an extended_remote_target.
5313         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
5314         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
5315         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
5316         (remote_pass_signals, remote_set_syscall_catchpoint)
5317         (remote_program_signals, )
5318         (remote_thread_always_alive): Remove target_ops parameter.
5319         (remote_thread_alive, remote_thread_name)
5320         (remote_update_thread_list, remote_threads_extra_info)
5321         (remote_static_tracepoint_marker_at)
5322         (remote_static_tracepoint_markers_by_strid)
5323         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
5324         (remote_open): Refactor as methods of remote_target.
5325         (extended_remote_open, extended_remote_detach)
5326         (extended_remote_attach, extended_remote_post_attach):
5327         (extended_remote_supports_disable_randomization)
5328         (extended_remote_create_inferior): : Refactor as method of
5329         extended_remote_target.
5330         (remote_set_permissions, remote_open_1, remote_detach)
5331         (remote_follow_fork, remote_follow_exec, remote_disconnect)
5332         (remote_resume, remote_commit_resume, remote_stop)
5333         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
5334         (remote_terminal_ours, remote_wait, remote_fetch_registers)
5335         (remote_prepare_to_store, remote_store_registers)
5336         (remote_flash_erase, remote_flash_done, remote_files_info)
5337         (remote_kill, remote_mourn, remote_insert_breakpoint)
5338         (remote_remove_breakpoint, remote_insert_watchpoint)
5339         (remote_watchpoint_addr_within_range)
5340         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
5341         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
5342         (remote_supports_stopped_by_sw_breakpoint)
5343         (remote_stopped_by_hw_breakpoint)
5344         (remote_supports_stopped_by_hw_breakpoint)
5345         (remote_stopped_by_watchpoint, remote_stopped_data_address)
5346         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
5347         (remote_verify_memory): Refactor as methods of remote_target.
5348         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
5349         parameter.
5350         (remote_xfer_partial, remote_get_memory_xfer_limit)
5351         (remote_search_memory, remote_rcmd, remote_memory_map)
5352         (remote_pid_to_str, remote_get_thread_local_address)
5353         (remote_get_tib_address, remote_read_description): Refactor as
5354         methods of remote_target.
5355         (remote_target::fileio_open, remote_target::fileio_pwrite)
5356         (remote_target::fileio_pread, remote_target::fileio_close): New.
5357         (remote_hostio_readlink, remote_hostio_fstat)
5358         (remote_filesystem_is_local, remote_can_execute_reverse)
5359         (remote_supports_non_stop, remote_supports_disable_randomization)
5360         (remote_supports_multi_process, remote_supports_cond_breakpoints)
5361         (remote_supports_enable_disable_tracepoint)
5362         (remote_supports_string_tracing)
5363         (remote_can_run_breakpoint_commands, remote_trace_init)
5364         (remote_download_tracepoint, remote_can_download_tracepoint)
5365         (remote_download_trace_state_variable, remote_enable_tracepoint)
5366         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
5367         (remote_trace_start, remote_get_trace_status)
5368         (remote_get_tracepoint_status, remote_trace_stop)
5369         (remote_trace_find, remote_get_trace_state_variable_value)
5370         (remote_save_trace_data, remote_get_raw_trace_data)
5371         (remote_set_disconnected_tracing, remote_core_of_thread)
5372         (remote_set_circular_trace_buffer, remote_traceframe_info)
5373         (remote_get_min_fast_tracepoint_insn_len)
5374         (remote_set_trace_buffer_size, remote_set_trace_notes)
5375         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
5376         (remote_disable_btrace, remote_teardown_btrace)
5377         (remote_read_btrace, remote_btrace_conf)
5378         (remote_augmented_libraries_svr4_read, remote_load)
5379         (remote_pid_to_exec_file, remote_can_do_single_step)
5380         (remote_execution_direction, remote_thread_handle_to_thread_info):
5381         Refactor as methods of remote_target.
5382         (init_remote_ops, init_extended_remote_ops): Delete.
5383         (remote_can_async_p, remote_is_async_p, remote_async)
5384         (remote_thread_events, remote_upload_tracepoints)
5385         (remote_upload_trace_state_variables): Refactor as methods of
5386         remote_target.
5387         (_initialize_remote): Remove references to init_remote_ops and
5388         init_extended_remote_ops.
5389
5390         * remote-sim.c (gdbsim_target): New class.
5391         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
5392         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
5393         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
5394         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
5395         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
5396         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
5397         Refactor as methods of gdbsim_target.
5398         (gdbsim_ops): Now a gdbsim_target.
5399         (init_gdbsim_ops): Delete.
5400         (gdbsim_cntrl_c): Adjust.
5401         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
5402
5403         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
5404         (the_amd64_linux_nat_target): New.
5405         (amd64_linux_fetch_inferior_registers)
5406         (amd64_linux_store_inferior_registers): Refactor as methods of
5407         amd64_linux_nat_target.
5408         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
5409         * i386-linux-nat.c: Don't include "linux-nat.h".
5410         (i386_linux_nat_target): New class.
5411         (the_i386_linux_nat_target): New.
5412         (i386_linux_fetch_inferior_registers)
5413         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
5414         as methods of i386_linux_nat_target.
5415         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
5416         * inf-child.c (inf_child_ops): Delete.
5417         (inf_child_fetch_inferior_registers)
5418         (inf_child_store_inferior_registers): Delete.
5419         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
5420         methods of inf_child_target.
5421         (inf_child_target::supports_terminal_ours)
5422         (inf_child_target::terminal_init)
5423         (inf_child_target::terminal_inferior)
5424         (inf_child_target::terminal_ours_for_output)
5425         (inf_child_target::terminal_ours, inf_child_target::interrupt)
5426         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
5427         New.
5428         (inf_child_open, inf_child_disconnect, inf_child_close)
5429         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
5430         (inf_child_post_startup_inferior, inf_child_can_run)
5431         (inf_child_pid_to_exec_file): Refactor as methods of
5432         inf_child_target.
5433         (inf_child_follow_fork): Delete.
5434         (inf_child_target::can_create_inferior)
5435         (inf_child_target::can_attach): New.
5436         (inf_child_target::has_all_memory, inf_child_target::has_memory)
5437         (inf_child_target::has_stack, inf_child_target::has_registers)
5438         (inf_child_target::has_execution): New.
5439         (inf_child_fileio_open, inf_child_fileio_pwrite)
5440         (inf_child_fileio_pread, inf_child_fileio_fstat)
5441         (inf_child_fileio_close, inf_child_fileio_unlink)
5442         (inf_child_fileio_readlink, inf_child_use_agent)
5443         (inf_child_can_use_agent): Refactor as methods of
5444         inf_child_target.
5445         (return_zero, inf_child_target): Delete.
5446         (inf_child_target::inf_child_target): New.
5447         * inf-child.h: Include "target.h".
5448         (inf_child_target): Delete function prototype.
5449         (inf_child_target): New class.
5450         (inf_child_open_target, inf_child_mourn_inferior)
5451         (inf_child_maybe_unpush_target): Delete.
5452         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
5453         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
5454         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
5455         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
5456         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
5457         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
5458         (inf_ptrace_wait, inf_ptrace_xfer_partial)
5459         (inf_ptrace_thread_alive, inf_ptrace_files_info)
5460         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
5461         methods of inf_ptrace_target.
5462         (inf_ptrace_target): Delete function.
5463         * inf-ptrace.h: Include "inf-child.h".
5464         (inf_ptrace_target): Delete function declaration.
5465         (inf_ptrace_target): New class.
5466         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
5467         * linux-nat.c (linux_target): New.
5468         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
5469         (linux_nat_target::~linux_nat_target): New.
5470         (linux_child_post_attach, linux_child_post_startup_inferior)
5471         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
5472         (linux_child_remove_fork_catchpoint)
5473         (linux_child_insert_vfork_catchpoint)
5474         (linux_child_remove_vfork_catchpoint)
5475         (linux_child_insert_exec_catchpoint)
5476         (linux_child_remove_exec_catchpoint)
5477         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
5478         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
5479         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
5480         (linux_nat_stopped_data_address)
5481         (linux_nat_stopped_by_sw_breakpoint)
5482         (linux_nat_supports_stopped_by_sw_breakpoint)
5483         (linux_nat_stopped_by_hw_breakpoint)
5484         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
5485         (linux_nat_kill, linux_nat_mourn_inferior)
5486         (linux_nat_xfer_partial, linux_nat_thread_alive)
5487         (linux_nat_update_thread_list, linux_nat_pid_to_str)
5488         (linux_nat_thread_name, linux_child_pid_to_exec_file)
5489         (linux_child_static_tracepoint_markers_by_strid)
5490         (linux_nat_is_async_p, linux_nat_can_async_p)
5491         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
5492         (linux_nat_supports_multi_process)
5493         (linux_nat_supports_disable_randomization, linux_nat_async)
5494         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
5495         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
5496         (linux_nat_fileio_open, linux_nat_fileio_readlink)
5497         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
5498         methods of linux_nat_target.
5499         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
5500         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
5501         parameter.
5502         (check_stopped_by_watchpoint): Adjust.
5503         (linux_xfer_partial): Delete.
5504         (linux_target_install_ops, linux_target, linux_nat_add_target):
5505         Delete.
5506         (linux_nat_target::linux_nat_target): New.
5507         * linux-nat.h: Include "inf-ptrace.h".
5508         (linux_nat_target): New.
5509         (linux_target, linux_target_install_ops, linux_nat_add_target):
5510         Delete function declarations.
5511         (linux_target): Declare global.
5512         * linux-thread-db.c (thread_db_target): New.
5513         (thread_db_target::thread_db_target): New.
5514         (thread_db_ops): Delete.
5515         (the_thread_db_target): New.
5516         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
5517         (thread_db_update_thread_list, thread_db_pid_to_str)
5518         (thread_db_extra_thread_info)
5519         (thread_db_thread_handle_to_thread_info)
5520         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
5521         (thread_db_resume): Refactor as methods of thread_db_target.
5522         (init_thread_db_ops): Delete.
5523         (_initialize_thread_db): Remove reference to init_thread_db_ops.
5524         * x86-linux-nat.c: Don't include "linux-nat.h".
5525         (super_post_startup_inferior): Delete.
5526         (x86_linux_nat_target::~x86_linux_nat_target): New.
5527         (x86_linux_child_post_startup_inferior)
5528         (x86_linux_read_description, x86_linux_enable_btrace)
5529         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
5530         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
5531         methods of x86_linux_nat_target.
5532         (x86_linux_create_target): Delete.  Bits folded ...
5533         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
5534         pointer.
5535         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
5536         (x86_linux_nat_target): New class.
5537         (x86_linux_create_target): Delete.
5538         (x86_linux_add_target): Now takes a linux_nat_target pointer.
5539         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
5540         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
5541         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
5542         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
5543         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
5544         make extern.
5545         (x86_use_watchpoints): Delete.
5546         * x86-nat.h: Include "breakpoint.h" and "target.h".
5547         (x86_use_watchpoints): Delete.
5548         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
5549         (x86_stopped_by_watchpoint, x86_stopped_data_address)
5550         (x86_insert_watchpoint, x86_remove_watchpoint)
5551         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
5552         (x86_stopped_by_hw_breakpoint): New declarations.
5553         (x86_nat_target): New template class.
5554
5555         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
5556         (the_ppc_linux_nat_target): New.
5557         (ppc_linux_fetch_inferior_registers)
5558         (ppc_linux_can_use_hw_breakpoint)
5559         (ppc_linux_region_ok_for_hw_watchpoint)
5560         (ppc_linux_ranged_break_num_registers)
5561         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
5562         (ppc_linux_insert_mask_watchpoint)
5563         (ppc_linux_remove_mask_watchpoint)
5564         (ppc_linux_can_accel_watchpoint_condition)
5565         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
5566         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
5567         (ppc_linux_watchpoint_addr_within_range)
5568         (ppc_linux_masked_watch_num_registers)
5569         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
5570         (ppc_linux_read_description): Refactor as methods of
5571         ppc_linux_nat_target.
5572         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
5573
5574         * procfs.c (procfs_xfer_partial): Delete forward declaration.
5575         (procfs_target): New class.
5576         (the_procfs_target): New.
5577         (procfs_target): Delete function.
5578         (procfs_auxv_parse, procfs_attach, procfs_detach)
5579         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
5580         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
5581         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
5582         (procfs_create_inferior, procfs_update_thread_list)
5583         (procfs_thread_alive, procfs_pid_to_str)
5584         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
5585         (procfs_stopped_data_address, procfs_insert_watchpoint)
5586         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
5587         (proc_find_memory_regions, procfs_info_proc)
5588         (procfs_make_note_section): Refactor as methods of procfs_target.
5589         (_initialize_procfs): Adjust.
5590         * sol-thread.c (sol_thread_target): New class.
5591         (sol_thread_ops): Now a sol_thread_target.
5592         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
5593         (sol_thread_fetch_registers, sol_thread_store_registers)
5594         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
5595         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
5596         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
5597         (init_sol_thread_ops): Delete.
5598         (_initialize_sol_thread): Adjust.  Remove references to
5599         init_sol_thread_ops and complete_target_initialization.
5600
5601         * windows-nat.c (windows_nat_target): New class.
5602         (windows_fetch_inferior_registers)
5603         (windows_store_inferior_registers, windows_resume, windows_wait)
5604         (windows_attach, windows_detach, windows_pid_to_exec_file)
5605         (windows_files_info, windows_create_inferior)
5606         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
5607         (windows_close, windows_pid_to_str, windows_xfer_partial)
5608         (windows_get_tib_address, windows_get_ada_task_ptid)
5609         (windows_thread_name, windows_thread_alive): Refactor as
5610         windows_nat_target methods.
5611         (do_initial_windows_stuff): Adjust.
5612         (windows_target): Delete function.
5613         (_initialize_windows_nat): Adjust.
5614
5615         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
5616         (darwin_mourn_inferior, darwin_kill_inferior)
5617         (darwin_create_inferior, darwin_attach, darwin_detach)
5618         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
5619         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
5620         (darwin_supports_multi_process): Refactor as darwin_nat_target
5621         methods.
5622         (darwin_resume_to, darwin_files_info): Delete.
5623         (_initialize_darwin_inferior): Rename to ...
5624         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
5625         * darwin-nat.h: Include "inf-child.h".
5626         (darwin_nat_target): New class.
5627         (darwin_complete_target): Delete.
5628         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
5629         (darwin_target): New.
5630         (i386_darwin_fetch_inferior_registers)
5631         (i386_darwin_store_inferior_registers): Refactor as methods of
5632         darwin_nat_target.
5633         (darwin_complete_target): Delete, with ...
5634         (_initialize_i386_darwin_nat): ... bits factored out here.
5635
5636         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
5637         (the_alpha_linux_nat_target): New.
5638         (alpha_linux_register_u_offset): Refactor as
5639         alpha_linux_nat_target method.
5640         (_initialize_alpha_linux_nat): Adjust.
5641         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
5642         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5643         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
5644         methods of linux_nat_trad_target.
5645         (linux_trad_target): Delete.
5646         * linux-nat-trad.h (linux_trad_target): Delete function.
5647         (linux_nat_trad_target): New class.
5648         * mips-linux-nat.c (mips_linux_nat_target): New class.
5649         (super_fetch_registers, super_store_registers, super_close):
5650         Delete.
5651         (the_mips_linux_nat_target): New.
5652         (mips64_linux_regsets_fetch_registers)
5653         (mips64_linux_regsets_store_registers)
5654         (mips64_linux_fetch_registers, mips64_linux_store_registers)
5655         (mips_linux_register_u_offset, mips_linux_read_description)
5656         (mips_linux_can_use_hw_breakpoint)
5657         (mips_linux_stopped_by_watchpoint)
5658         (mips_linux_stopped_data_address)
5659         (mips_linux_region_ok_for_hw_watchpoint)
5660         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
5661         (mips_linux_close): Refactor as methods of mips_linux_nat.
5662         (_initialize_mips_linux_nat): Adjust to C++ification.
5663
5664         * aix-thread.c (aix_thread_target): New class.
5665         (aix_thread_ops): Now an aix_thread_target.
5666         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
5667         (aix_thread_fetch_registers, aix_thread_store_registers)
5668         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
5669         (aix_thread_thread_alive, aix_thread_pid_to_str)
5670         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
5671         Refactor as methods of aix_thread_target.
5672         (init_aix_thread_ops): Delete.
5673         (_initialize_aix_thread): Remove references to init_aix_thread_ops
5674         and complete_target_initialization.
5675         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
5676         (rs6000_nat_target): New class.
5677         (the_rs6000_nat_target): New.
5678         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
5679         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
5680         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
5681         (super_create_inferior): Delete.
5682         (_initialize_rs6000_nat): Adjust to C++ification.
5683
5684         * arm-linux-nat.c (arm_linux_nat_target): New class.
5685         (the_arm_linux_nat_target): New.
5686         (arm_linux_fetch_inferior_registers)
5687         (arm_linux_store_inferior_registers, arm_linux_read_description)
5688         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
5689         (arm_linux_remove_hw_breakpoint)
5690         (arm_linux_region_ok_for_hw_watchpoint)
5691         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
5692         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
5693         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
5694         arm_linux_nat_target.
5695         (_initialize_arm_linux_nat): Adjust to C++ification.
5696
5697         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
5698         (the_aarch64_linux_nat_target): New.
5699         (aarch64_linux_fetch_inferior_registers)
5700         (aarch64_linux_store_inferior_registers)
5701         (aarch64_linux_child_post_startup_inferior)
5702         (aarch64_linux_read_description)
5703         (aarch64_linux_can_use_hw_breakpoint)
5704         (aarch64_linux_insert_hw_breakpoint)
5705         (aarch64_linux_remove_hw_breakpoint)
5706         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
5707         (aarch64_linux_region_ok_for_hw_watchpoint)
5708         (aarch64_linux_stopped_data_address)
5709         (aarch64_linux_stopped_by_watchpoint)
5710         (aarch64_linux_watchpoint_addr_within_range)
5711         (aarch64_linux_can_do_single_step): Refactor as methods of
5712         aarch64_linux_nat_target.
5713         (super_post_startup_inferior): Delete.
5714         (_initialize_aarch64_linux_nat): Adjust to C++ification.
5715
5716         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
5717         (the_hppa_linux_nat_target): New.
5718         (hppa_linux_fetch_inferior_registers)
5719         (hppa_linux_store_inferior_registers): Refactor as methods of
5720         hppa_linux_nat_target.
5721         (_initialize_hppa_linux_nat): Adjust to C++ification.
5722
5723         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
5724         (the_ia64_linux_nat_target): New.
5725         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
5726         (ia64_linux_stopped_data_address)
5727         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
5728         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
5729         ia64_linux_nat_target methods.
5730         (super_xfer_partial): Delete.
5731         (_initialize_ia64_linux_nat): Adjust to C++ification.
5732
5733         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
5734         (the_m32r_linux_nat_target): New.
5735         (m32r_linux_fetch_inferior_registers)
5736         (m32r_linux_store_inferior_registers): Refactor as
5737         m32r_linux_nat_target methods.
5738         (_initialize_m32r_linux_nat): Adjust to C++ification.
5739
5740         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
5741         (the_m68k_linux_nat_target): New.
5742         (m68k_linux_fetch_inferior_registers)
5743         (m68k_linux_store_inferior_registers): Refactor as
5744         m68k_linux_nat_target methods.
5745         (_initialize_m68k_linux_nat): Adjust to C++ification.
5746
5747         * s390-linux-nat.c (s390_linux_nat_target): New class.
5748         (the_s390_linux_nat_target): New.
5749         (s390_linux_fetch_inferior_registers)
5750         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
5751         (s390_insert_watchpoint, s390_remove_watchpoint)
5752         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
5753         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
5754         (s390_auxv_parse, s390_read_description): Refactor as methods of
5755         s390_linux_nat_target.
5756         (_initialize_s390_nat): Adjust to C++ification.
5757
5758         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
5759         (the_sparc_linux_nat_target): New.
5760         (_initialize_sparc_linux_nat): Adjust to C++ification.
5761         * sparc-nat.c (sparc_fetch_inferior_registers)
5762         (sparc_store_inferior_registers): Remove target_ops parameter.
5763         * sparc-nat.h (sparc_fetch_inferior_registers)
5764         (sparc_store_inferior_registers): Remove target_ops parameter.
5765         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
5766         (the_sparc64_linux_nat_target): New.
5767         (_initialize_sparc64_linux_nat): Adjust to C++ification.
5768
5769         * spu-linux-nat.c (spu_linux_nat_target): New class.
5770         (the_spu_linux_nat_target): New.
5771         (spu_child_post_startup_inferior, spu_child_post_attach)
5772         (spu_child_wait, spu_fetch_inferior_registers)
5773         (spu_store_inferior_registers, spu_xfer_partial)
5774         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
5775         methods.
5776         (_initialize_spu_nat): Adjust to C++ification.
5777
5778         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
5779         (the_tilegx_linux_nat_target): New.
5780         (fetch_inferior_registers, store_inferior_registers):
5781         Refactor as methods.
5782         (_initialize_tile_linux_nat): Adjust to C++ification.
5783
5784         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
5785         (the_xtensa_linux_nat_target): New.
5786         (xtensa_linux_fetch_inferior_registers)
5787         (xtensa_linux_store_inferior_registers): Refactor as
5788         xtensa_linux_nat_target methods.
5789         (_initialize_xtensa_linux_nat): Adjust to C++ification.
5790
5791         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
5792         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
5793         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
5794         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
5795         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
5796         (fbsd_stopped_by_sw_breakpoint)
5797         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
5798         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
5799         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
5800         (fbsd_post_startup_inferior, fbsd_post_attach)
5801         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
5802         (fbsd_set_syscall_catchpoint)
5803         (super_xfer_partial, super_resume, super_wait)
5804         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
5805         (fbsd_handle_debug_trap): Remove target_ops parameter.
5806         (fbsd_nat_add_target): Delete.
5807         * fbsd-nat.h: Include "inf-ptrace.h".
5808         (fbsd_nat_add_target): Delete.
5809         (USE_SIGTRAP_SIGINFO): Define.
5810         (fbsd_nat_target): New class.
5811
5812         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
5813         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
5814         (amd64bsd_target): Delete.
5815         * amd64-bsd-nat.h: New file.
5816         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
5817         "x86-bsd-nat.h".
5818         (amd64_fbsd_nat_target): New class.
5819         (the_amd64_fbsd_nat_target): New.
5820         (amd64fbsd_read_description): Refactor as method of
5821         amd64_fbsd_nat_target.
5822         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5823         (_initialize_amd64fbsd_nat): Adjust to C++ification.
5824         * amd64-nat.h (amd64bsd_target): Delete function declaration.
5825         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
5826         (i386bsd_store_inferior_registers): Remove target_ops parameter.
5827         (i386bsd_target): Delete.
5828         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
5829         (i386bsd_fetch_inferior_registers)
5830         (i386bsd_store_inferior_registers): Declare.
5831         (i386_bsd_nat_target): New class.
5832         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
5833         (the_i386_fbsd_nat_target): New.
5834         (i386fbsd_resume, i386fbsd_read_description): Refactor as
5835         i386_fbsd_nat_target methods.
5836         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5837         (_initialize_i386fbsd_nat): Adjust to C++ification.
5838         * x86-bsd-nat.c (super_mourn_inferior): Delete.
5839         (x86bsd_mourn_inferior, x86bsd_target): Delete.
5840         (_initialize_x86_bsd_nat): Adjust to C++ification.
5841         * x86-bsd-nat.h: Include "x86-nat.h".
5842         (x86bsd_target): Delete declaration.
5843         (x86bsd_nat_target): New class.
5844
5845         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
5846         (the_aarch64_fbsd_nat_target): New.
5847         (aarch64_fbsd_fetch_inferior_registers)
5848         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
5849         aarch64_fbsd_nat_target.
5850         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
5851         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
5852         (the_alpha_bsd_nat_target): New.
5853         (alphabsd_fetch_inferior_registers)
5854         (alphabsd_store_inferior_registers): Refactor as
5855         alpha_bsd_nat_target methods.
5856         (_initialize_alphabsd_nat): Refactor as methods of
5857         alpha_bsd_nat_target.
5858         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
5859         (the_amd64_nbsd_nat_target): New.
5860         (_initialize_amd64nbsd_nat): Adjust to C++ification.
5861         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
5862         (the_amd64_obsd_nat_target): New.
5863         (_initialize_amd64obsd_nat): Adjust to C++ification.
5864         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
5865         (the_arm_fbsd_nat_target): New.
5866         (arm_fbsd_fetch_inferior_registers)
5867         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
5868         (_initialize_arm_fbsd_nat): Refactor as methods of
5869         arm_fbsd_nat_target.
5870         (_initialize_arm_fbsd_nat): Adjust to C++ification.
5871         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
5872         (the_arm_netbsd_nat_target): New.
5873         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
5874         arm_netbsd_nat_target.
5875         (_initialize_arm_netbsd_nat): Adjust to C++ification.
5876         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
5877         (the_hppa_nbsd_nat_target): New.
5878         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
5879         hppa_nbsd_nat_target methods.
5880         (_initialize_hppanbsd_nat): Adjust to C++ification.
5881         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
5882         (the_hppa_obsd_nat_target): New.
5883         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
5884         methods of hppa_obsd_nat_target.
5885         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
5886         add_target.
5887         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
5888         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
5889         add_target.
5890         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
5891         (_initialize_i386obsd_nat): Use add_target.
5892         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
5893         (the_m68k_bsd_nat_target): New.
5894         (m68kbsd_fetch_inferior_registers)
5895         (m68kbsd_store_inferior_registers): Refactor as methods of
5896         m68k_bsd_nat_target.
5897         (_initialize_m68kbsd_nat): Adjust to C++ification.
5898         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
5899         (the_mips_fbsd_nat_target): New.
5900         (mips_fbsd_fetch_inferior_registers)
5901         (mips_fbsd_store_inferior_registers): Refactor as methods of
5902         mips_fbsd_nat_target.
5903         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
5904         add_target.
5905         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
5906         (the_mips_nbsd_nat_target): New.
5907         (mipsnbsd_fetch_inferior_registers)
5908         (mipsnbsd_store_inferior_registers): Refactor as methods of
5909         mips_nbsd_nat_target.
5910         (_initialize_mipsnbsd_nat): Adjust to C++ification.
5911         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
5912         (the_mips64_obsd_nat_target): New.
5913         (mips64obsd_fetch_inferior_registers)
5914         (mips64obsd_store_inferior_registers): Refactor as methods of
5915         mips64_obsd_nat_target.
5916         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
5917         add_target.
5918         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
5919         nbsd_nat_target.
5920         * nbsd-nat.h: Include "inf-ptrace.h".
5921         (nbsd_nat_target): New class.
5922         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
5923         (obsd_wait): Refactor as methods of obsd_nat_target.
5924         (obsd_add_target): Delete.
5925         * obsd-nat.h: Include "inf-ptrace.h".
5926         (obsd_nat_target): New class.
5927         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
5928         (the_ppc_fbsd_nat_target): New.
5929         (ppcfbsd_fetch_inferior_registers)
5930         (ppcfbsd_store_inferior_registers): Refactor as methods of
5931         ppc_fbsd_nat_target.
5932         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
5933         add_target.
5934         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
5935         (the_ppc_nbsd_nat_target): New.
5936         (ppcnbsd_fetch_inferior_registers)
5937         (ppcnbsd_store_inferior_registers): Refactor as methods of
5938         ppc_nbsd_nat_target.
5939         (_initialize_ppcnbsd_nat): Adjust to C++ification.
5940         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
5941         (the_ppc_obsd_nat_target): New.
5942         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
5943         methods of ppc_obsd_nat_target.
5944         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
5945         add_target.
5946         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
5947         (the_sh_nbsd_nat_target): New.
5948         (shnbsd_fetch_inferior_registers)
5949         (shnbsd_store_inferior_registers): Refactor as methods of
5950         sh_nbsd_nat_target.
5951         (_initialize_shnbsd_nat): Adjust to C++ification.
5952         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
5953         (inf_ptrace_xfer_partial): Delete.
5954         (sparc_xfer_partial, sparc_target): Delete.
5955         * sparc-nat.h (sparc_fetch_inferior_registers)
5956         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
5957         (sparc_target): Delete function declaration.
5958         (sparc_target): New template class.
5959         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
5960         (_initialize_sparcnbsd_nat): Adjust to C++ification.
5961         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
5962         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
5963         add_target.
5964         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
5965         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
5966         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
5967         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
5968         add_target.
5969         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
5970         (the_vax_bsd_nat_target): New.
5971         (vaxbsd_fetch_inferior_registers)
5972         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
5973         methods.
5974         (_initialize_vaxbsd_nat): Adjust to C++ification.
5975
5976         * bsd-kvm.c (bsd_kvm_target): New class.
5977         (bsd_kvm_ops): Now a bsd_kvm_target.
5978         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
5979         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
5980         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
5981         bsd_kvm_target.
5982         (bsd_kvm_return_one): Delete.
5983         (bsd_kvm_add_target): Adjust to C++ification.
5984
5985         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
5986         (nto_procfs_target_procfs): New classes.
5987         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
5988         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
5989         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
5990         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
5991         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
5992         (procfs_remove_hw_breakpoint, procfs_resume)
5993         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
5994         (procfs_kill_inferior, procfs_store_registers)
5995         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
5996         as methods of nto_procfs_target.
5997         (nto_procfs_ops): Now an nto_procfs_target_procfs.
5998         (nto_native_ops): Delete.
5999         (procfs_open, procfs_native_open): Delete.
6000         (nto_native_ops): Now an nto_procfs_target_native.
6001         (init_procfs_targets): Adjust to C++ification.
6002         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6003         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6004         Refactor as methods of nto_procfs_target.
6005
6006         * go32-nat.c (go32_nat_target): New class.
6007         (the_go32_nat_target): New.
6008         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6009         (go32_store_registers, go32_xfer_partial, go32_files_info)
6010         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6011         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6012         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6013         (go32_pid_to_str): Refactor as methods of go32_nat_target.
6014         (go32_target): Delete.
6015         (_initialize_go32_nat): Adjust to C++ification.
6016
6017         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6018         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6019         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6020         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6021         gnu_nat_target.
6022         (gnu_target): Delete.
6023         * gnu-nat.h (gnu_target): Delete.
6024         (gnu_nat_target): New class.
6025         * i386-gnu-nat.c (gnu_base_target): New.
6026         (i386_gnu_nat_target): New class.
6027         (the_i386_gnu_nat_target): New.
6028         (_initialize_i386gnu_nat): Adjust to C++ification.
6029
6030 2018-05-02  Pedro Alves  <palves@redhat.com>
6031
6032         * bfd-target.c (target_bfd_xclose): Rename to ...
6033         (target_bfd_close): ... this.
6034         (target_bfd_reopen): Adjust.
6035         * target.c (target_close): Remove references to to_xclose.
6036         * target.h (target_ops::to_xclose): Delete.
6037         (target_ops::to_close): Update comments.
6038
6039 2018-05-02  Pedro Alves  <palves@redhat.com>
6040
6041         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6042         "linux-nat.h".
6043         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6044         * inf-ptrace.c (inf_ptrace_register_u_offset)
6045         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6046         (inf_ptrace_store_register, inf_ptrace_store_registers)
6047         (inf_ptrace_trad_target): Move to ...
6048         * linux-nat-trad.c: ... this new file.
6049         * linux-nat-trad.h: New file.
6050         * linux-nat.c (linux_target_install_ops): Make extern.
6051         (linux_trad_target): Delete.
6052         * linux-nat.h (linux_trad_target): Delete declaration.
6053         (linux_target_install_ops): Declare.
6054         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
6055         "linux-nat.h".
6056
6057 2018-05-02  Pedro Alves  <palves@redhat.com>
6058
6059         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6060         procfs_target/add_target here.
6061         * procfs.c (procfs_target): Make static.
6062         (_initialize_procfs): Call add_target here.
6063         * procfs.h (struct target_ops): Remove forward declaration.
6064         (procfs_target): Remove declaration.
6065         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
6066
6067 2018-05-02  Pedro Alves  <palves@redhat.com>
6068
6069         * procfs.c (procfs_stopped_by_watchpoint)
6070         (procfs_insert_watchpoint, procfs_remove_watchpoint)
6071         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
6072         Forward declare.
6073         (procfs_use_watchpoints): Delete, move contents...
6074         (procfs_target): ... here.
6075         * procfs.h (procfs_use_watchpoints): Delete declaration.
6076         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6077         procfs_use_watchpoints.
6078         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
6079         procfs_use_watchpoints.
6080
6081 2018-05-02  Tom Tromey  <tom@tromey.com>
6082
6083         PR python/20084:
6084         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
6085         and var_zuinteger_unlimited.
6086         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
6087         and PARAM_ZUINTEGER_UNLIMITED.
6088         (set_parameter_value): Handle var_zuinteger and
6089         var_zuinteger_unlimited.
6090         (add_setshow_generic): Likewise.
6091         (parmpy_init): Likewise.
6092
6093 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
6094
6095         PR rust/23124
6096         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
6097         pointer is not null before dereferencing it.
6098
6099 2018-04-30  Tom Tromey  <tom@tromey.com>
6100
6101         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
6102         is_mi_like_p.
6103
6104 2018-04-30  Tom Tromey  <tom@tromey.com>
6105
6106         * breakpoint.c (mention): Remove use of is_mi_like_p.
6107         (print_mention_ranged_breakpoint): Likewise.
6108         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
6109         of is_mi_like_p.
6110
6111 2018-04-30  Tom Tromey  <tom@tromey.com>
6112
6113         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
6114
6115 2018-04-30  Tom Tromey  <tom@tromey.com>
6116
6117         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
6118         (info_spu_event_command): Remove some uses of is_mi_like_p.
6119
6120 2018-04-30  Tom Tromey  <tom@tromey.com>
6121
6122         * python/py-framefilter.c (py_print_single_arg)
6123         (enumerate_locals, py_print_args, py_print_frame): Remove some
6124         uses of is_mi_like_p.
6125
6126 2018-04-30  Tom Tromey  <tom@tromey.com>
6127
6128         * ui-out.c: Update.
6129         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
6130         * ui-out.h (ui_out::is_mi_like_p): Now const.
6131         (ui_out::do_is_mi_like_p): Now const.
6132         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
6133
6134 2018-04-30  Tom Tromey  <tom@tromey.com>
6135
6136         * varobj.c (varobj_set_visualizer): Use new_reference.
6137         * python/python.c (gdbpy_decode_line): Use new_reference.
6138         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
6139         new_reference.
6140
6141 2018-04-30  Tom Tromey  <tom@tromey.com>
6142
6143         * varobj.c (install_new_value): Use new_reference.
6144         * value.h (value_incref): Return void.  Swap intro comment with
6145         value_decref.
6146         * value.c (set_value_parent): Use new_reference.
6147         (value_incref): Return void.  Update intro comment.
6148         (release_value): Use new_reference.
6149         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
6150
6151 2018-04-30  Tom Tromey  <tom@tromey.com>
6152
6153         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
6154         * gdb_bfd.h (new_bfd_ref): Remove.
6155         (gdb_bfd_open): Update comment.
6156         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6157         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
6158         (gdb_bfd_fdopenr): Use new_reference.
6159         * exec.c (exec_file_attach): Use new_reference.
6160
6161 2018-04-30  Tom Tromey  <tom@tromey.com>
6162
6163         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
6164         method.
6165
6166 2018-04-30  Tom Tromey  <tom@tromey.com>
6167
6168         * jit.c (jit_read_code_entry): Use type_align.
6169         * i386-tdep.c (i386_gdbarch_init): Don't call
6170         set_gdbarch_long_long_align_bit.
6171         * gdbarch.sh: Remove long_long_align_bit.
6172         * gdbarch.c, gdbarch.h: Rebuild.
6173         * arc-tdep.c (arc_type_align): New function.
6174         (arc_gdbarch_init): Use arc_type_align.  Don't call
6175         set_gdbarch_long_long_align_bit.
6176
6177 2018-04-30  Tom Tromey  <tom@tromey.com>
6178
6179         * rust-lang.c (rust_type_alignment): Remove.
6180         (rust_composite_type): Use type_align.
6181
6182 2018-04-30  Tom Tromey  <tom@tromey.com>
6183
6184         * NEWS: Mention Type.align.
6185         * python/py-type.c (typy_get_alignof): New function.
6186         (type_object_getset): Add "alignof".
6187
6188 2018-04-30  Tom Tromey  <tom@tromey.com>
6189
6190         PR exp/17095:
6191         * NEWS: Update.
6192         * std-operator.def (UNOP_ALIGNOF): New operator.
6193         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
6194         New.
6195         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
6196         * c-lang.c (c_op_print_tab): Add alignof.
6197         * c-exp.y (ALIGNOF): New token.
6198         (exp): Add "ALIGNOF" production.
6199         (ident_tokens): Add _Alignof and alignof.
6200
6201 2018-04-30  Tom Tromey  <tom@tromey.com>
6202
6203         * i386-tdep.c (i386_type_align): New function.
6204         (i386_gdbarch_init): Update.
6205         * gdbarch.sh (type_align): New method.
6206         * gdbarch.c, gdbarch.h: Rebuild.
6207         * arch-utils.h (default_type_align): Declare.
6208         * arch-utils.c (default_type_align): New function.
6209         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
6210         (struct type) <align_log2>: New field.
6211         <instance_flags>: Now a bitfield.
6212         (TYPE_RAW_ALIGN): New macro.
6213         (type_align, type_raw_align, set_type_align): Declare.
6214         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
6215         functions.
6216         * dwarf2read.c (quirk_rust_enum): Set type alignment.
6217         (get_alignment, maybe_set_alignment): New functions.
6218         (read_structure_type, read_enumeration_type, read_array_type)
6219         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
6220         (read_subrange_type, read_base_type): Set type alignment.
6221
6222 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
6223
6224         * dwarf2read.c (read_index_from_section): Use bool.
6225
6226 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
6227
6228         PR gdb/22950
6229         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
6230         with #ifdef.
6231
6232 2018-04-29  John Reiser  <jreiser@BitWagon.com>
6233
6234         PR build/22873
6235         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
6236         last step, and do it atomically.
6237
6238 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
6239
6240         * compile/compile-c-types.c (convert_int, convert_float):
6241         Update for C FE v1.
6242
6243 2018-04-27  Tom Tromey  <tom@tromey.com>
6244
6245         PR rust/22545:
6246         * rust-lang.c (rust_inclusive_range_type_p): New function.
6247         (rust_range): Handle inclusive ranges.
6248         (rust_compute_range): Likewise.
6249         * rust-exp.y (struct rust_op) <inclusive>: New field.
6250         (DOTDOTEQ): New constant.
6251         (range_expr): Add "..=" productions.
6252         (operator_tokens): Add "..=" token.
6253         (ast_range): Add "inclusive" parameter.
6254         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
6255         ranges.
6256         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
6257         bounds values.
6258         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
6259         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
6260         Update comments.
6261         * expprint.c (print_subexp_standard): Handle new bounds values.
6262         (dump_subexp_body_standard): Likewise.
6263
6264 2018-04-27  Tom Tromey  <tom@tromey.com>
6265
6266         * configure: Rebuild.
6267         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
6268         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
6269         "OVERRIDE".
6270         (class symbol_needs_eval_context): Likewise.
6271         * dwarf2read.c (mock_mapped_index::symbol_name_count)
6272         (mock_mapped_index::symbol_name_at): Use "override".  Remove
6273         "virtual".
6274         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
6275         "override".
6276         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
6277         * aarch64-tdep.c (instruction_reader::read): Use "override".
6278         (instruction_reader_test::read): Likewise.
6279         * arm-tdep.c (instruction_reader::read): Use "override".
6280         (instruction_reader_thumb::read): Likewise.
6281
6282 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
6283
6284         PR remote/9665
6285         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
6286         instead of remote_send.
6287         (remote_send): Remove.
6288
6289 2018-04-26  Pedro Alves  <palves@redhat.com>
6290
6291         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
6292         find_function_start_sal instead of find_pc_line.
6293
6294 2018-04-26  Pedro Alves  <palves@redhat.com>
6295
6296         * breakpoint.c (set_breakpoint_location_function): Handle
6297         mst_data_gnu_ifunc.
6298         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
6299         * elfread.c (elf_symtab_read): Give data symbols with
6300         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
6301         (elf_rel_plt_read): Update comment.
6302         * linespec.c (convert_linespec_to_sals): Handle
6303         mst_data_gnu_ifunc.
6304         (minsym_found): Handle mst_data_gnu_ifunc.
6305         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
6306         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
6307         * parse.c (find_minsym_type_and_address): Handle
6308         mst_data_gnu_ifunc.
6309         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
6310         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
6311         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
6312         comment.
6313         <mst_data_gnu_ifunc>: New enumerator.
6314
6315 2018-04-26  Pedro Alves  <palves@redhat.com>
6316
6317         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
6318         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
6319         'want_trampoline' parameter by a lookup_msym_prefer parameter.
6320         Handle it.
6321         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
6322         (lookup_minimal_symbol_by_pc): Adjust.
6323         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
6324         (lookup_solib_trampoline_symbol_by_pc): Adjust.
6325         * minsyms.h (lookup_msym_prefer): New enum.
6326         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6327         parameter by a lookup_msym_prefer parameter.
6328
6329 2018-04-26  Pedro Alves  <palves@redhat.com>
6330
6331         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
6332         ends in "@plt" instead of looking at the symbol's section.
6333
6334 2018-04-26  Pedro Alves  <palves@redhat.com>
6335
6336         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
6337         all references.
6338         (find_pc_partial_function_gnu_ifunc): Rename to ...
6339         (find_pc_partial_function): ... this, and remove references to
6340         'is_gnu_ifunc_p'.
6341         (find_pc_partial_function): Delete old implementation.
6342         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
6343
6344 2018-04-26  Pedro Alves  <palves@redhat.com>
6345
6346         * linespec.c (struct bound_minimal_symbol_search_key): New.
6347         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
6348         skip first line if we found a GNU ifunc minimal symbol by name.
6349         (compare_msymbols): Change parameters to work with a destructured
6350         lhs minsym.
6351         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
6352         functions.
6353
6354 2018-04-26  Pedro Alves  <palves@redhat.com>
6355
6356         * breakpoint.c (set_breakpoint_location_function): Don't resolve
6357         ifunc targets here.  Instead, if we have an ifunc minsym, use its
6358         address/name.
6359         (add_location_to_breakpoint): Store the minsym and the objfile in
6360         the breakpoint location.
6361         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
6362         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
6363         Record the minsym in the sal.
6364         * symtab.h (symtab_and_line) <msymbol>: New field.
6365
6366 2018-04-26  Pedro Alves  <palves@redhat.com>
6367
6368         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
6369         unless we actually resolved the ifunc.
6370
6371 2018-04-26  Pedro Alves  <palves@redhat.com>
6372
6373         * c-exp.y (variable production): Prefer ifunc minsyms over
6374         regular function symbols.
6375         * symtab.c (find_gnu_ifunc): New function.
6376         * minsyms.h (lookup_msym_prefer): New enum.
6377         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6378         parameter by a lookup_msym_prefer parameter.
6379         * symtab.h (find_gnu_ifunc): New declaration.
6380
6381 2018-04-26  Pedro Alves  <palves@redhat.com>
6382
6383         * blockframe.c (find_gnu_ifunc_target_type): New function.
6384         (find_function_type): New.
6385         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
6386         return a value with a memory address.
6387         (eval_call): For calls to GNU ifunc functions, try to find the
6388         type of the target function from the type that the resolver
6389         returns.
6390         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
6391         symbols.
6392         * infcall.c (find_function_return_type): Delete.
6393         (find_function_addr): Add 'function_type' parameter.  For calls to
6394         GNU ifunc functions, try to find the type of the target function
6395         from the type that the resolver returns, and return it via
6396         FUNCTION_TYPE.
6397         (call_function_by_hand_dummy): Adjust to use the function type
6398         returned by find_function_addr.
6399         (find_function_addr): Add 'function_type' parameter and move
6400         description here.
6401         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
6402         declarations.
6403
6404 2018-04-26  Pedro Alves  <palves@redhat.com>
6405
6406         * c-exp.y (variable production): Skip finding an alias for ifunc
6407         symbols.
6408
6409 2018-04-26  Pedro Alves  <palves@redhat.com>
6410
6411         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
6412
6413 2018-04-25  Pedro Alves  <palves@redhat.com>
6414
6415         * infcmd.c (kill_command): Print the pid as string, not the whole
6416         thread's ptid.  Add comment.  s/has been killed/killed/ in output
6417         message.
6418         * remote.c (remote_detach_1): Print the pid as string, not the
6419         whole thread's ptid.
6420
6421 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6422             Sergio Durigan Junior  <sergiodj@redhat.com>
6423             Pedro Alves  <palves@redhat.com>
6424
6425         * infcmd.c (kill_command): Print message when inferior has
6426         been killed.
6427         * inferior.c (print_inferior_events): Remove 'static'.  Set as
6428         '1'.
6429         (add_inferior): Improve message printed when
6430         'print_inferior_events' is on.
6431         (exit_inferior): Remove message printed when
6432         'print_inferior_events' is on.
6433         (detach_inferior): Improve message printed when
6434         'print_inferior_events' is on.
6435         (initialize_inferiors): Use 'add_inferior_silent' to set
6436         'current_inferior_'.
6437         * inferior.h (print_inferior_events): Declare here as
6438         'extern'.
6439         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
6440         '[Detaching...]' messages when 'print_inferior_events' is on.
6441         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
6442         as prefix/suffix for messages.  Remove periods.  Fix erroneous
6443         'Detaching after fork from child...', replace it by '... from
6444         parent...'.
6445         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
6446         prefix/suffix when printing 'Detaching...' messages.  Print
6447         them when 'print_inferior_events' is on.
6448         * remote.c (remote_detach_1): Print message when detaching
6449         from inferior and '!is_fork_parent'.
6450
6451 2018-04-24  Tom Tromey  <tom@tromey.com>
6452
6453         * cli-out.h: Reindent.
6454
6455 2018-04-24  Tom Tromey  <tom@tromey.com>
6456
6457         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
6458         (cli_ui_out::do_field_string): Use fputs_filtered.
6459         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
6460
6461 2018-04-23  Tom Tromey  <tom@tromey.com>
6462
6463         * guile/scm-frame.c (gdbscm_frame_read_var): Use
6464         gdb::unique_xmalloc_ptr.
6465
6466 2018-04-23  Tom Tromey  <tom@tromey.com>
6467
6468         * configure: Rebuild.
6469
6470 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
6471
6472         PR gdb/23095
6473         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
6474         prepare_for_testing.  Set normal_bp to r_debug_state if target
6475         is bsd.
6476
6477 2018-04-21  Pedro Alves  <palves@redhat.com>
6478             Rajendra SY  <rajendra.sy@gmail.com>
6479
6480         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
6481         * remote.c (extended_remote_attach): In all-stop mode, mark the
6482         thread as executing.
6483
6484 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6485
6486         * thread.c (thread_apply_all_command): Fix comment.
6487         (thread_command): Fix comment.
6488
6489 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
6490
6491         * common/tdesc.h (tdesc_create_feature): Remove xml filename
6492         parameter.
6493         * features/aarch64-core.c (create_feature_aarch64_core):
6494         Regenerate.
6495         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
6496         Likewise.
6497         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
6498         Likewise.
6499         * features/i386/32bit-avx512.c
6500         (create_feature_i386_32bit_avx512): Likewise.
6501         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
6502         Likewise.
6503         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
6504         Likewise.
6505         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
6506         Likewise.
6507         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
6508         Likewise.
6509         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
6510         Likewise.
6511         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
6512         Likewise.
6513         * features/i386/64bit-avx512.c
6514         (create_feature_i386_64bit_avx512): Likewise.
6515         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
6516         Likewise.
6517         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
6518         Likewise.
6519         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
6520         Likewise.
6521         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
6522         Likewise.
6523         * features/i386/64bit-segments.c
6524         (create_feature_i386_64bit_segments): Likewise.
6525         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
6526         Likewise.
6527         * features/i386/x32-core.c
6528         (create_feature_i386_x32_core): Likewise.
6529         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
6530         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
6531         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
6532         * target-descriptions.c: In generated code, don't pass xml
6533         filename.
6534
6535 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
6536
6537         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
6538         (print_xml_feature::visit_post): Likewise.
6539         (print_xml_feature::visit): Likewise.
6540         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
6541         (print_xml_feature): Add new class.
6542         * regformats/regdat.sh: Null xmltarget on feature targets.
6543         * target-descriptions.c (struct target_desc): Add xmltarget.
6544         (maintenance_check_tdesc_xml_convert): Add unittest function.
6545         (tdesc_get_features_xml): Add function to get xml.
6546         (maintenance_check_xml_descriptions): Test xml generation.
6547         * xml-tdesc.c (string_read_description_xml): Add function.
6548         * xml-tdesc.h (string_read_description_xml): Add declaration.
6549
6550 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
6551
6552         * features/Makefile: Add feature marker to targets with new style
6553         target descriptions.
6554         * regformats/aarch64.dat: Regenerate.
6555         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
6556         * regformats/i386/amd64-avx-linux.dat: Likewise.
6557         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
6558         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
6559         * regformats/i386/amd64-linux.dat: Likewise.
6560         * regformats/i386/amd64-mpx-linux.dat: Likewise.
6561         * regformats/i386/amd64.dat: Likewise.
6562         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
6563         * regformats/i386/i386-avx-linux.dat: Likewise.
6564         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
6565         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
6566         * regformats/i386/i386-linux.dat: Likewise.
6567         * regformats/i386/i386-mmx-linux.dat: Likewise.
6568         * regformats/i386/i386-mpx-linux.dat: Likewise.
6569         * regformats/i386/i386.dat: Likewise.
6570         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
6571         * regformats/i386/x32-avx-linux.dat: Likewise.
6572         * regformats/i386/x32-linux.dat: Likewise.
6573         * regformats/tic6x-c62x-linux.dat: Likewise.
6574         * regformats/tic6x-c64x-linux.dat: Likewise.
6575         * regformats/tic6x-c64xp-linux.dat: Likewise.
6576         * regformats/regdat.sh: Parse feature marker.
6577
6578 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
6579
6580         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
6581         (tdesc_osabi_name): Likewise.
6582         * target-descriptions.c (tdesc_architecture_name): Add new
6583         function.
6584         (tdesc_osabi_name): Likewise.
6585
6586 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
6587
6588         * common/tdesc.c (tdesc_predefined_type): Move to here.
6589         (tdesc_named_type): Likewise.
6590         (tdesc_create_vector): Likewise.
6591         (tdesc_create_struct): Likewise.
6592         (tdesc_set_struct_size): Likewise.
6593         (tdesc_create_union): Likewise.
6594         (tdesc_create_flags): Likewise.
6595         (tdesc_create_enum): Likewise.
6596         (tdesc_add_field): Likewise.
6597         (tdesc_add_typed_bitfield): Likewise.
6598         (tdesc_add_bitfield): Likewise.
6599         (tdesc_add_flag): Likewise.
6600         (tdesc_add_enum_value): Likewise.
6601         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
6602         (struct tdesc_type_vector): Likewise.
6603         (struct tdesc_type_field): Likewise.
6604         (struct tdesc_type_with_fields): Likewise.
6605         (tdesc_create_enum): Add declaration.
6606         (tdesc_add_typed_bitfield): Likewise.
6607         (tdesc_add_enum_value): Likewise.
6608         * target-descriptions.c (tdesc_type_field): Move from here.
6609         (tdesc_type_builtin): Likewise.
6610         (tdesc_type_vector): Likewise.
6611         (tdesc_type_with_fields): Likewise.
6612         (tdesc_predefined_types): Likewise.
6613         (tdesc_named_type): Likewise.
6614         (tdesc_create_vector): Likewise.
6615         (tdesc_create_struct): Likewise.
6616         (tdesc_set_struct_size): Likewise.
6617         (tdesc_create_union): Likewise.
6618         (tdesc_create_flags): Likewise.
6619         (tdesc_create_enum): Likewise.
6620         (tdesc_add_field): Likewise.
6621         (tdesc_add_typed_bitfield): Likewise.
6622         (tdesc_add_bitfield): Likewise.
6623         (tdesc_add_flag): Likewise.
6624         (tdesc_add_enum_value): Likewise.
6625         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
6626         (tdesc_add_typed_bitfield): Likewise.
6627         (tdesc_add_enum_value): Likewise.
6628
6629 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
6630
6631         * common/tdesc.c (tdesc_feature::accept): Move to here.
6632         (tdesc_feature::operator==): Likewise.
6633         (tdesc_create_reg): Likewise.
6634         * common/tdesc.h (tdesc_type_kind): Likewise.
6635         (struct tdesc_type): Likewise.
6636         (struct tdesc_feature): Likewise.
6637         * regformats/regdat.sh: Create a feature.
6638         * target-descriptions.c (tdesc_type_kind): Move from here.
6639         (tdesc_type): Likewise.
6640         (tdesc_type_up): Likewise.
6641         (tdesc_feature): Likewise.
6642         (tdesc_create_reg): Likewise.
6643
6644 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
6645
6646         * Makefile.in: Add arch/tdesc.c
6647         * common/tdesc.c: New file.
6648         * common/tdesc.h (tdesc_element_visitor): Move to here.
6649         (tdesc_element): Likewise.
6650         (tdesc_reg): Likewise.
6651         (tdesc_reg_up): Likewise.
6652         * regformats/regdef.h (reg): Add offset to constructors.
6653         * target-descriptions.c (tdesc_element_visitor): Move from here.
6654         (tdesc_element): Likewise.
6655         (tdesc_reg): Likewise.
6656         (tdesc_reg_up): Likewise.
6657
6658 2018-04-17  Tom Tromey  <tom@tromey.com>
6659
6660         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
6661         discriminant field.
6662
6663 2018-04-17  Tom Tromey  <tom@tromey.com>
6664
6665         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
6666
6667 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6668
6669         * symtab.c (print_symbol_info): Skip printing filename and line
6670         number when `last' is NULL.
6671         (symtab_symbol_info): Use empty string instead of NULL for first
6672         invocation of print_symbol_info.
6673         (rbreak_command): Pass NULL to `last' parameter of
6674         print_symbol_info.
6675
6676 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
6677
6678         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
6679         instead of nullptr.
6680
6681 2018-04-16  Pedro Alves  <palves@redhat.com>
6682
6683         * MAINTAINERS (sh): Remove.
6684         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
6685         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
6686         (ALLDEPFILES): Remove sh64-tdep.c.
6687         * NEWS: Mentions that support for SH-5/SH64 is removed.
6688         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
6689         (sh*-*-openbsd*): Ditto.
6690         (sh64-*-elf*): Remove.
6691         (sh*): Remove.
6692         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
6693         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
6694         * sh-tdep.c: No longer include "sh64-tdep.h".
6695         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
6696         * sh64-tdep.c, sh64-tdep.h: Remove files.
6697
6698 2018-04-16  Pedro Alves  <palves@redhat.com>
6699
6700         * MAINTAINERS: Remove m88k.
6701         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
6702         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
6703         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
6704         * NEWS: Mention that support for m88k was removed.
6705         * configure.host (m88*-*-*): Remove support.
6706         * configure.nat (m88k-*-*): Remove support.
6707         * configure.tgt (m88*-*-openbsd*): Remove.
6708         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
6709
6710 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
6711
6712         * configure.tgt (x86_tobjs): New variable.
6713         (amd64_tobjs, i386_tobjs): Use it.
6714
6715 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6716
6717         * symtab.c (print_symbol_info): Precede the symbol definition by
6718         the line number when available.
6719         * NEWS: Advertise this enhancement.
6720
6721 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
6722
6723         * NEWS (New options): announce set/show record btrace cpu.
6724         * btrace.c: Include record-btrace.h.
6725         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
6726         the vendor is unknown.
6727         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
6728         Maybe overwrite the btrace configuration's cpu.
6729         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
6730         (btrace_fetch): Add cpu parameter.  Update callers.
6731         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
6732         Maybe overwrite the btrace configuration's cpu.  Skip enabling
6733         errata workarounds if the vendor is unknown.
6734         * python/py-record-btrace.c: Include record-btrace.h.
6735         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
6736         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
6737         * record-btrace.c (record_btrace_cpu_state_kind): New.
6738         (record_btrace_cpu): New.
6739         (set_record_btrace_cpu_cmdlist): New.
6740         (record_btrace_get_cpu): New.
6741         (require_btrace_thread, record_btrace_info)
6742         (record_btrace_resume_thread): Call record_btrace_get_cpu.
6743         (cmd_set_record_btrace_cpu_none): New.
6744         (cmd_set_record_btrace_cpu_auto): New.
6745         (cmd_set_record_btrace_cpu): New.
6746         (cmd_show_record_btrace_cpu): New.
6747         (_initialize_record_btrace): Initialize set/show record btrace cpu
6748         commands.
6749         * record-btrace.h (record_btrace_get_cpu): New.
6750
6751 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
6752
6753         * record.c (set_record_command): Fix typo in message.
6754
6755 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
6756
6757         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
6758
6759 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
6760
6761         * infrun.c (process_event_stop_test): Call
6762         gdbarch_in_indirect_branch_thunk.
6763         * gdbarch.sh (in_indirect_branch_thunk): New.
6764         * gdbarch.c: Regenerated.
6765         * gdbarch.h: Regenerated.
6766         * x86-tdep.h: New.
6767         * x86-tdep.c: New.
6768         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
6769         (HFILES_NO_SRCDIR): Add x86-tdep.h.
6770         (ALLDEPFILES): Add x86-tdep.c.
6771         * arch-utils.h (default_in_indirect_branch_thunk): New.
6772         * arch-utils.c (default_in_indirect_branch_thunk): New.
6773         * i386-tdep: Include x86-tdep.h.
6774         (i386_in_indirect_branch_thunk): New.
6775         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
6776         function.
6777         * amd64-tdep: Include x86-tdep.h.
6778         (amd64_in_indirect_branch_thunk): New.
6779         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
6780
6781 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
6782
6783         PR gdb/23053
6784         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
6785         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
6786         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
6787         regression.
6788
6789 2018-04-12  Tom Tromey  <tom@tromey.com>
6790
6791         * rust-lang.c (rust_print_struct_def): Remove univariant code.
6792         (rust_evaluate_subexp): Likewise.
6793
6794 2018-04-12  Pedro Alves  <palves@redhat.com>
6795
6796         * procfs.c (procfs_detach): Make forward declaration's prototype
6797         match definition's protototype.
6798         (proc_get_LDT_entry): Remove stale do_cleanups call.
6799
6800 2018-04-12  Pedro Alves  <palves@redhat.com>
6801
6802         * target.h (target_ops::to_has_exited): Delete.
6803         (target_has_exited): Delete.
6804         * target-delegates.c: Regenerate.
6805
6806 2018-04-11  Pedro Alves  <palves@redhat.com>
6807
6808         * target.c (fileio_fh_t::t): Add comment.
6809         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6810         (target_fileio_close): Handle a NULL target.
6811         (invalidate_fileio_fh): New.
6812         (target_close): Call it.
6813         * remote.c (remote_hostio_send_command): No longer check whether
6814         remote_desc is open.
6815
6816 2018-04-11  Pedro Alves  <palves@redhat.com>
6817
6818         * target.c (fileio_fh_t): Make it a named struct instead of a
6819         typedef.
6820         (fileio_fh_t::is_closed): New method.
6821         (DEF_VEC_O (fileio_fh_t)): Remove.
6822         (fileio_fhandles): Now a std::vector.
6823         (is_closed_fileio_fh): Delete.
6824         (acquire_fileio_fd): Adjust.  Rename parameters.
6825         (release_fileio_fd): Adjust.
6826         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
6827         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6828         (target_fileio_close): Adjust.
6829
6830 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
6831
6832         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
6833         index.
6834
6835 2018-04-10  Pedro Alves  <palves@redhat.com>
6836
6837         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
6838         (scoped_finish_thread_state): New class.
6839         * infcmd.c (run_command_1): Use it instead of finish_thread_state
6840         cleanup.
6841         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
6842         (fetch_inferior_event, normal_stop): Likewise.
6843         * thread.c (finish_thread_state_cleanup): Delete.
6844
6845 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
6846             Pedro Alves  <palves@redhat.com>
6847
6848         * value.c: Include "selftest.h" and "common/array-view.h".
6849         (struct range) <operator ==>: New.
6850         (test_ranges_contain): New.
6851         (check_ranges_vector): New.
6852         (test_insert_into_bit_range_vector): New.
6853         (_initialize_values): Register selftests.
6854         * common/array-view.h (operator==, operator!=): New.
6855
6856 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
6857
6858         * common/gdb_vecs.h (unordered_remove): Add overload that takes
6859         an iterator.
6860         * inline-frame.c: Include <algorithm>.
6861         (struct inline_state): Add constructor.
6862         (inline_state_s): Remove.
6863         (DEF_VEC_O(inline_state_s)): Remove.
6864         (inline_states): Change type to std::vector.
6865         (find_inline_frame_state): Adjust to std::vector.
6866         (allocate_inline_frame_state): Remove.
6867         (clear_inline_frame_state): Adjust to std::vector.
6868         (skip_inline_frames): Adjust to std::vector.
6869
6870 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
6871
6872         * tracepoint.h (struct trace_state_variable): Add constructor.
6873         <name>: Change type to std::string.
6874         * tracepoint.c (tsv_s): Remove.
6875         (DEF_VEC_O(tsv_s)): Remove.
6876         (tvariables): Change to std::vector.
6877         (create_trace_state_variable): Adjust to std::vector.
6878         (find_trace_state_variable): Likewise.
6879         (find_trace_state_variable_by_number): Likewise.
6880         (delete_trace_state_variable): Likewise.
6881         (trace_variable_command): Adjust to std::string.
6882         (delete_trace_variable_command): Likewise.
6883         (tvariables_info_1): Adjust to std::vector.
6884         (save_trace_state_variables): Likewise.
6885         (start_tracing): Likewise.
6886         (merge_uploaded_trace_state_variables): Adjust to std::vector
6887         and std::string.
6888         * target.h (struct target_ops)
6889         <to_download_trace_state_variable>: Pass reference to
6890         trace_state_variable.
6891         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
6892         * target-delegates.c: Re-generate.
6893         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
6894         (mi_tsv_deleted): Likewise.
6895         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
6896         * remote.c (remote_download_trace_state_variable): Change
6897         pointer to reference and adjust.
6898         * make-target-delegates (parse_argtypes): Handle references.
6899         (write_function_header): Likewise.
6900         (munge_type): Likewise.
6901
6902 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
6903
6904         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6905         string_view-selftests.c.
6906         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
6907         testsuite.
6908         * unittests/basic_string_view/cons/char/1.cc: Likewise.
6909         * unittests/basic_string_view/cons/char/2.cc: Likewise.
6910         * unittests/basic_string_view/cons/char/3.cc: Likewise.
6911         * unittests/basic_string_view/element_access/char/1.cc:
6912         Likewise.
6913         * unittests/basic_string_view/element_access/char/empty.cc:
6914         Likewise.
6915         * unittests/basic_string_view/element_access/char/front_back.cc:
6916         Likewise.
6917         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
6918         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
6919         Likewise.
6920         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
6921         Likewise.
6922         * unittests/basic_string_view/modifiers/swap/char/1.cc:
6923         Likewise.
6924         * unittests/basic_string_view/operations/compare/char/1.cc:
6925         Likewise.
6926         * unittests/basic_string_view/operations/compare/char/13650.cc:
6927         Likewise.
6928         * unittests/basic_string_view/operations/copy/char/1.cc:
6929         Likewise.
6930         * unittests/basic_string_view/operations/data/char/1.cc:
6931         Likewise.
6932         * unittests/basic_string_view/operations/find/char/1.cc:
6933         Likewise.
6934         * unittests/basic_string_view/operations/find/char/2.cc:
6935         Likewise.
6936         * unittests/basic_string_view/operations/find/char/3.cc:
6937         Likewise.
6938         * unittests/basic_string_view/operations/find/char/4.cc:
6939         Likewise.
6940         * unittests/basic_string_view/operations/rfind/char/1.cc:
6941         Likewise.
6942         * unittests/basic_string_view/operations/rfind/char/2.cc:
6943         Likewise.
6944         * unittests/basic_string_view/operations/rfind/char/3.cc:
6945         Likewise.
6946         * unittests/basic_string_view/operations/substr/char/1.cc:
6947         Likewise.
6948         * unittests/basic_string_view/operators/char/2.cc: Likewise.
6949         * unittests/string_view-selftests.c: New file.
6950
6951 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
6952
6953         * unittests/basic_string_view/capacity/1.cc: New file.
6954         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
6955         * unittests/basic_string_view/cons/char/1.cc: New file.
6956         * unittests/basic_string_view/cons/char/2.cc: New file.
6957         * unittests/basic_string_view/cons/char/3.cc: New file.
6958         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
6959         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
6960         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
6961         * unittests/basic_string_view/element_access/char/1.cc: New file.
6962         * unittests/basic_string_view/element_access/char/2.cc: New file.
6963         * unittests/basic_string_view/element_access/char/empty.cc: New file.
6964         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
6965         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
6966         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
6967         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
6968         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
6969         * unittests/basic_string_view/include.cc: New file.
6970         * unittests/basic_string_view/inserters/char/1.cc: New file.
6971         * unittests/basic_string_view/inserters/char/2.cc: New file.
6972         * unittests/basic_string_view/inserters/char/3.cc: New file.
6973         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
6974         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
6975         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
6976         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
6977         * unittests/basic_string_view/literals/types.cc: New file.
6978         * unittests/basic_string_view/literals/values.cc: New file.
6979         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
6980         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
6981         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
6982         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
6983         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
6984         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
6985         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
6986         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
6987         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
6988         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
6989         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
6990         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
6991         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
6992         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
6993         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
6994         * unittests/basic_string_view/operations/data/char/1.cc: New file.
6995         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
6996         * unittests/basic_string_view/operations/find/char/1.cc: New file.
6997         * unittests/basic_string_view/operations/find/char/2.cc: New file.
6998         * unittests/basic_string_view/operations/find/char/3.cc: New file.
6999         * unittests/basic_string_view/operations/find/char/4.cc: New file.
7000         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7001         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7002         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7003         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7004         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7005         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7006         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7007         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7008         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7009         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7010         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7011         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7012         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7013         * unittests/basic_string_view/operators/char/2.cc: New file.
7014         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7015         * unittests/basic_string_view/range_access/char/1.cc: New file.
7016         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7017         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7018         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7019         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7020         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7021         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7022         * unittests/basic_string_view/requirements/typedefs.cc: New file.
7023         * unittests/basic_string_view/typedefs.cc: New file.
7024         * unittests/basic_string_view/types/1.cc: New file.
7025
7026 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7027
7028         * common/gdb_string_view.h: Remove libstdc++ implementation
7029         details, adjust to gdb reality.
7030         * common/gdb_string_view.tcc: Likewise.
7031         * cli/cli-script.c (struct string_view): Remove.
7032         (user_args) <m_args>: Change element type to gdb::string_view.
7033         (user_args::insert_args): Adjust.
7034
7035 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7036
7037         * common/gdb_string_view.h: New file.
7038         * common/gdb_string_view.tcc: New file.
7039
7040 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7041
7042         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7043         * configure: Re-generate.
7044
7045 2018-04-09  Pedro Alves  <palves@redhat.com>
7046
7047         * gdbarch.sh: Include "observable.h" instead of "observer.h".
7048         (set_target_gdbarch): Call
7049         gdb::observers::architecture_changed.notify instead of
7050         observer_notify_architecture_changed.
7051
7052 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7053
7054         * tracepoint.c (struct current_traceframe_cleanup): Remove.
7055         (do_restore_current_traceframe_cleanup): Remove.
7056         (restore_current_traceframe_cleanup_dtor): Remove.
7057         (make_cleanup_restore_current_traceframe): Remove.
7058         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
7059         New.
7060         * tracepoint.h (struct scoped_restore_current_traceframe): New.
7061         * infrun.c (fetch_inferior_event): Use
7062         scoped_restore_current_traceframe.
7063
7064 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7065
7066         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
7067         Remove.
7068         <n_allocated_type_units>: Remove.
7069         <all_type_units>: Change to std::vector.
7070         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7071         to std::vector change.
7072         (dwarf2_per_objfile::get_cutu): Likewise.
7073         (dwarf2_per_objfile::get_tu): Likewise.
7074         (create_signatured_type_table_from_index): Likewise.
7075         (create_signatured_type_table_from_debug_names): Likewise.
7076         (dw2_symtab_iter_next): Likewise.
7077         (dw2_print_stats): Likewise.
7078         (dw2_expand_all_symtabs): Likewise.
7079         (dw2_expand_marked_cus): Likewise.
7080         (dw2_debug_names_iterator::next): Likewise.
7081         (dwarf2_initialize_objfile): Likewise.
7082         (add_signatured_type_cu_to_table): Likewise.
7083         (create_all_type_units): Likewise.
7084         (add_type_unit): Likewise.
7085         (struct tu_abbrev_offset): Add constructor.
7086         (build_type_psymtabs_1): Adjust to std::vector change.
7087         (print_tu_stats): Likewise.
7088         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7089         (write_debug_names): Likewise.
7090
7091 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7092
7093         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
7094         Make an std::vector.
7095         <n_comp_units>: Remove.
7096         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7097         to std::vector change.
7098         (dwarf2_per_objfile::get_cutu): Likewise.
7099         (dwarf2_per_objfile::get_cu): Likewise.
7100         (create_cus_from_index): Likewise.
7101         (create_addrmap_from_index): Likewise.
7102         (create_addrmap_from_aranges): Likewise.
7103         (dwarf2_read_index): Likewise.
7104         (dw2_find_last_source_symtab): Likewise.
7105         (dw2_map_symtabs_matching_filename): Likewise.
7106         (dw2_symtab_iter_next): Likewise.
7107         (dw2_print_stats): Likewise.
7108         (dw2_expand_all_symtabs): Likewise.
7109         (dw2_expand_symtabs_with_fullname): Likewise.
7110         (dw2_expand_marked_cus): Likewise.
7111         (dw2_map_symbol_filenames): Likewise.
7112         (create_cus_from_debug_names): Likewise.
7113         (dwarf2_read_debug_names): Likewise.
7114         (dw2_debug_names_iterator::next): Likewise.
7115         (dwarf2_initialize_objfile): Likewise.
7116         (set_partial_user): Likewise.
7117         (dwarf2_build_psymtabs_hard): Likewise.
7118         (read_comp_units_from_section): Remove arguments, adjust to
7119         std::vector change.
7120         (create_all_comp_units): Adjust to std::vector and
7121         read_comp_units_from_section changes.
7122         (dwarf2_find_containing_comp_unit): Adjust to std::vector
7123         change.
7124         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7125         (psyms_seen_size): Likewise.
7126         (write_gdbindex): Likewise.
7127         (write_debug_names): Likewise.
7128
7129 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7130
7131         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
7132         with dwarf2_per_objfile.
7133         (create_cus_from_index): Likewise.
7134         (create_signatured_type_table_from_index): Likewise.
7135         (dwarf2_read_index): Likewise.
7136         (dwarf2_initialize_objfile): Likewise.
7137         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
7138         per_cu rather than get_dwarf2_per_objfile.
7139
7140 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7141
7142         * dwarf2read.h (struct signatured_type): Forward declare.
7143         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
7144         New methods.
7145         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
7146         (dw2_get_cutu): ...this.
7147         (dwarf2_per_objfile::get_cu): Rename from...
7148         (dw2_get_cu): ...this.
7149         (dwarf2_per_objfile::get_tu): New.
7150         (create_addrmap_from_index): Adjust.
7151         (create_addrmap_from_aranges): Adjust.
7152         (dw2_find_last_source_symtab): Adjust.
7153         (dw2_map_symtabs_matching_filename): Adjust.
7154         (dw2_symtab_iter_next): Adjust.
7155         (dw2_print_stats): Adjust.
7156         (dw2_expand_all_symtabs): Adjust.
7157         (dw2_expand_symtabs_with_fullname): Adjust.
7158         (dw2_expand_marked_cus): Adjust.
7159         (dw_expand_symtabs_matching_file_matcher): Adjust.
7160         (dw2_map_symbol_filenames): Adjust.
7161         (dw2_debug_names_iterator::next): Adjust.
7162         (dwarf2_initialize_objfile): Adjust.
7163         (set_partial_user): Adjust.
7164         (dwarf2_build_psymtabs_hard): Adjust.
7165
7166 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7167
7168         * dwarf2read.c (create_signatured_type_table_from_debug_names):
7169         Remove unused variables.
7170         (dw2_map_symtabs_matching_filename): Likewise.
7171         (dwarf2_record_block_ranges): Likewise.
7172         (dwarf2_read_addr_index): Likewise.
7173         (follow_die_offset): Likewise.
7174
7175 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7176
7177         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
7178         to symbol_file_add_main.
7179
7180 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7181
7182         PR mi/22299
7183         * mi/mi-console.c (do_fputc_async_safe): New.
7184         (mi_console_file::write_async_safe): New.
7185         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
7186         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
7187         New.
7188         * ui-file.c (ui_file::putstrn): Adjust call to
7189         fputstrn_unfiltered.
7190         * utils.c (printchar): Replace do_fputs and do_fprintf
7191         parameters by do_fputc.
7192         (fputstr_filtered): Adjust call to printchar.
7193         (fputstr_unfiltered): Likewise.
7194         (fputstrn_filtered): Likewise.
7195         (fputstrn_unfiltered): Add do_fputc parameter, pass to
7196         printchar.
7197         * utils.h (do_fputc_ftype): New typedef.
7198         (fputstrn_unfiltered): Add do_fputc parameter.
7199
7200 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7201
7202         * regformats/i386/i386-avx.dat: Remove.
7203
7204 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
7205
7206         PR gdb/22979
7207         * amd64-tdep.c (amd64_none_init_abi): New function.
7208         (amd64_x32_none_init_abi): New function.
7209         (_initialize_amd64_tdep): Register handlers for x86-64 and
7210         x64_32 with GDB_OSABI_NONE.
7211         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
7212         GDB_OSABI_NONE osabi.
7213
7214 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
7215
7216         PR gdb/22980
7217         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
7218         GDB_OSABI_NONE.
7219         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
7220         * osabi.c (gdb_osabi_names): Add "unknown" entry.
7221
7222 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
7223
7224         * common/byte-vector.h (char_vector): New type.
7225         * target.h (target_read_alloc): Return
7226         gdb::optional<byte_vector>.
7227         (target_read_stralloc): Return gdb::optional<char_vector>.
7228         (target_get_osdata): Return gdb::optional<char_vector>.
7229         * target.c (target_read_alloc_1): Templatize.  Replacement
7230         manual memory management with vector.
7231         (target_read_alloc): Change return type, adjust.
7232         (target_read_stralloc): Change return type, adjust.
7233         (target_get_osdata): Change return type, adjust.
7234         * auxv.c (struct auxv_info) <length>: Remove.
7235         <data>: Change type to gdb::optional<byte_vector>.
7236         (auxv_inferior_data_cleanup): Free auxv_info with delete.
7237         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
7238         (target_auxv_search): Adjust.
7239         (fprint_target_auxv): Adjust.
7240         * avr-tdep.c (avr_io_reg_read_command): Adjust.
7241         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
7242         (linux_make_corefile_notes): Adjust.
7243         * osdata.c (get_osdata): Adjust.
7244         * remote.c (remote_get_threads_with_qxfer): Adjust.
7245         (remote_memory_map): Adjust.
7246         (remote_traceframe_info): Adjust.
7247         (btrace_read_config): Adjust.
7248         (remote_read_btrace): Adjust.
7249         (remote_pid_to_exec_file): Adjust.
7250         * solib-aix.c (solib_aix_get_library_list): Adjust.
7251         * solib-dsbt.c (decode_loadmap): Don't free buf.
7252         (dsbt_get_initial_loadmaps): Adjust.
7253         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
7254         * solib-target.c (solib_target_current_sos): Adjust.
7255         * tracepoint.c (sdata_make_value): Adjust.
7256         * xml-support.c (xinclude_start_include): Adjust.
7257         (xml_fetch_content_from_file): Adjust.
7258         * xml-support.h (xml_fetch_another): Change return type.
7259         (xml_fetch_content_from_file): Change return type.
7260         * xml-syscall.c (xml_init_syscalls_info): Adjust.
7261         * xml-tdesc.c (file_read_description_xml): Adjust.
7262         (fetch_available_features_from_target): Change return type.
7263         (target_fetch_description_xml): Adjust.
7264         (target_read_description_xml): Adjust.
7265
7266 2018-04-06  Tom Tromey  <tom@tromey.com>
7267
7268         * value.c (~value): Update.
7269         (struct value) <contents>: Now unique_xmalloc_ptr.
7270         (value_contents_bits_eq, allocate_value_contents)
7271         (value_contents_raw, value_contents_all_raw)
7272         (value_contents_for_printing, value_contents_for_printing_const)
7273         (set_value_enclosing_type): Update.
7274
7275 2018-04-06  Tom Tromey  <tom@tromey.com>
7276
7277         * value.c (range_s): Remove typedef, VEC.
7278         (struct range): Add operator<.
7279         (range_lessthan): Remove.
7280         (ranges_contain): Change type.
7281         (~value): Update.
7282         (struct value) <unavailable, optimized_out>: Now std::vector.
7283         (value_entirely_available)
7284         (value_entirely_covered_by_range_vector)
7285         (value_entirely_unavailable, value_entirely_optimized_out):
7286         Update.
7287         (insert_into_bit_range_vector): Change argument type.
7288         (find_first_range_overlap): Likewise.
7289         (struct ranges_and_idx, value_contents_bits_eq)
7290         (require_not_optimized_out, require_available): Update.
7291         (ranges_copy_adjusted): Change argument types.
7292         (value_optimized_out, value_copy, value_fetch_lazy): Update.
7293
7294 2018-04-06  Tom Tromey  <tom@tromey.com>
7295
7296         * value.c (~value): Update.
7297         (struct value) <parent>: Now a value_ref_ptr.
7298         (value_parent, set_value_parent, value_address, value_copy):
7299         Update.
7300
7301 2018-04-06  Tom Tromey  <tom@tromey.com>
7302
7303         * value.c (struct value): Add constructor, destructor, and member
7304         initializers.
7305         (allocate_value_lazy, value_decref): Update.
7306
7307 2018-04-06  Tom Tromey  <tom@tromey.com>
7308
7309         * value.c (struct value) <released, next>: Remove.
7310         (all_values): Now a std::vector.
7311         (allocate_value_lazy): Update.
7312         (value_next): Remove.
7313         (value_mark, value_free_to_mark, release_value)
7314         (value_release_to_mark): Update.
7315
7316 2018-04-06  Tom Tromey  <tom@tromey.com>
7317
7318         * value.h (fetch_subexp_value, value_release_to_mark): Update.
7319         (free_value_chain): Remove.
7320         * value.c (free_value_chain): Remove.
7321         (value_release_to_mark): Return a std::vector.
7322         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
7323         std::vector.
7324         (check_condition): Update.
7325         * eval.c (fetch_subexp_value): Change "val_chain" to a
7326         std::vector.
7327         * breakpoint.c (update_watchpoint): Update.
7328         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
7329
7330 2018-04-06  Tom Tromey  <tom@tromey.com>
7331
7332         * value.h (free_all_values): Remove.
7333         * value.c (free_all_values): Remove.
7334
7335 2018-04-06  Tom Tromey  <tom@tromey.com>
7336
7337         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
7338         (value_history_chain, value_history_count): Remove.
7339         (value_history): New global.
7340         (record_latest_value, access_value_history, show_values)
7341         (preserve_values): Update.
7342
7343 2018-04-06  Tom Tromey  <tom@tromey.com>
7344
7345         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
7346         * varobj.c (varobj_set_display_format, varobj_set_value)
7347         (install_default_visualizer, construct_visualizer)
7348         (install_new_value, ~varobj, varobj_get_value_type)
7349         (my_value_of_variable, varobj_editable_p): Update.
7350         * c-varobj.c (c_describe_child, c_value_of_variable)
7351         (cplus_number_of_children, cplus_describe_child): Update.
7352         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
7353         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
7354         (ada_value_of_variable, ada_value_is_changeable_p): Update.
7355
7356 2018-04-06  Tom Tromey  <tom@tromey.com>
7357
7358         * printcmd.c (last_examine_address): Change type to
7359         value_ref_ptr.
7360         (do_examine, x_command): Update.
7361
7362 2018-04-06  Tom Tromey  <tom@tromey.com>
7363
7364         * value.c (release_value): Update.
7365         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
7366         (struct bpstats) <val>: Now a value_ref_ptr.
7367         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7368         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7369         (~watchpoint, print_it_watchpoint, watch_command_1)
7370         (invalidate_bp_value_on_memory_change): Update.
7371
7372 2018-04-06  Tom Tromey  <tom@tromey.com>
7373
7374         * varobj.c (varobj_clear_saved_item)
7375         (update_dynamic_varobj_children, install_new_value, ~varobj):
7376         Update.
7377         * value.h (value_incref): Move declaration earlier.
7378         (value_decref): Rename from value_free.
7379         (struct value_ref_policy): New.
7380         (value_ref_ptr): New typedef.
7381         (struct value_deleter): Remove.
7382         (gdb_value_up): Remove typedef.
7383         (release_value): Change return type.
7384         (release_value_or_incref): Remove.
7385         * value.c (set_value_parent): Update.
7386         (value_incref): Change return type.
7387         (value_decref): Rename from value_free.
7388         (value_free_to_mark, free_all_values, free_value_chain): Update.
7389         (release_value): Return value_ref_ptr.
7390         (release_value_or_incref): Remove.
7391         (record_latest_value, set_internalvar, clear_internalvar):
7392         Update.
7393         * stack.c (info_frame_command): Don't call value_free.
7394         * python/py-value.c (valpy_dealloc, valpy_new)
7395         (value_to_value_object): Update.
7396         * printcmd.c (do_examine): Update.
7397         * opencl-lang.c (lval_func_free_closure): Update.
7398         * mi/mi-main.c (register_changed_p): Don't call value_free.
7399         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
7400         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
7401         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
7402         value_free.
7403         * guile/scm-value.c (vlscm_free_value_smob)
7404         (vlscm_scm_from_value): Update.
7405         * frame.c (frame_register_unwind, frame_unwind_register_signed)
7406         (frame_unwind_register_unsigned, get_frame_register_bytes)
7407         (put_frame_register_bytes): Don't call value_free.
7408         * findvar.c (address_from_register): Don't call value_free.
7409         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
7410         * dwarf2loc.c (entry_data_value_free_closure)
7411         (value_of_dwarf_reg_entry, free_pieced_value_closure)
7412         (dwarf2_evaluate_loc_desc_full): Update.
7413         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7414         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7415         (~watchpoint, watch_command_1)
7416         (invalidate_bp_value_on_memory_change): Update.
7417         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
7418
7419 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
7420
7421         PR gdb/23022
7422         * warning.m4: Add -Wno-error=deprecated-register.
7423         * configure: Re-generate.
7424
7425 2018-04-05  Tom Tromey  <tom@tromey.com>
7426
7427         * linespec.h: Remove include of "vec.h".
7428
7429 2018-04-05  Tom Tromey  <tom@tromey.com>
7430
7431         * linespec.c (typep): Remove typedef.
7432         (find_methods, find_superclass_methods): Take a std::vector.
7433         (find_method): Use std::vector.
7434
7435 2018-04-05  Tom Tromey  <tom@tromey.com>
7436
7437         * utils.c (compare_strings): Remove.
7438         * utils.h (compare_strings): Remove.
7439         * objc-lang.h (find_imps): Update.
7440         * objc-lang.c (find_methods): Take a std::vector.
7441         (uniquify_strings, find_imps): Likewise.
7442         * linespec.c (find_methods): Take a std::vector.
7443         (decode_objc): Use std::vector.
7444         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
7445         a std::vector.
7446         (find_method, find_function_symbols): Use std::vector.
7447
7448 2018-04-05  Tom Tromey  <tom@tromey.com>
7449
7450         * completer.c (completion_tracker::completion_tracker): Remove
7451         cast.
7452         (completion_tracker::discard_completions): Likewise.
7453         * breakpoint.c (ambiguous_names_p): Remove cast.
7454         * ada-lang.c (_initialize_ada_language): Remove cast.
7455         * utils.h (streq): Update.
7456         (streq_hash): Add new declaration.
7457         * utils.c (streq): Return bool.
7458         (streq_hash): New function.
7459
7460 2018-04-05  Tom Tromey  <tom@tromey.com>
7461
7462         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
7463         Remove a string copy.
7464
7465 2018-04-05  Tom Tromey  <tom@tromey.com>
7466
7467         * linespec.c (filter_results): Use std::vector.
7468         (decode_line_2, decode_line_full): Update.
7469
7470 2018-04-05  Tom Tromey  <tom@tromey.com>
7471
7472         * linespec.c (canonical_to_fullform): Return std::string.
7473         (filter_results): Update.
7474         (struct decode_line_2_item): Add constructor.
7475         <fullform, displayform>: Now std::string.
7476         (decode_line_2_compare_items): Now a std::sort comparator.
7477         (decode_line_2): Update.
7478
7479 2018-04-05  Tom Tromey  <tom@tromey.com>
7480
7481         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
7482         (unexpected_linespec_error): Update.
7483         (linespec_parse_basic, parse_linespec): Update.
7484
7485 2018-04-05  Tom Tromey  <tom@tromey.com>
7486
7487         * linespec.c (linespec_parse_basic): Reindent.
7488
7489 2018-04-05  Tom Tromey  <tom@tromey.com>
7490
7491         * minsyms.h (iterate_over_minimal_symbols): Update.
7492         * minsyms.c (iterate_over_minimal_symbols): Take a
7493         gdb::function_view.
7494         * linespec.c (struct collect_minsyms): Remove.
7495         (compare_msyms): Now a std::sort comparator.
7496         (add_minsym): Add parameters.
7497         (search_minsyms_for_name): Update.  Use std::vector.
7498
7499 2018-04-03  Tom Tromey  <tom@tromey.com>
7500
7501         * mipsread.c (read_alphacoff_dynamic_symtab): Use
7502         gdb::byte_vector.
7503
7504 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
7505
7506         * MAINTAINERS (Write After Approval): Add Weimin Pan.
7507
7508 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
7509
7510         PR gdb/16959
7511         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
7512         printing static type.
7513
7514 2018-04-01  Tom Tromey  <tom@tromey.com>
7515
7516         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
7517         (rs6000_xfer_shared_libraries): Update.
7518
7519 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
7520
7521         * common/gdb_vecs.h (char_ptr): Remove.
7522         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
7523
7524 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
7525
7526         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
7527         with std::vector.
7528         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
7529
7530 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
7531
7532         * tracepoint.h (struct uploaded_tp): Initialize fields.
7533         <actions, step_actions, cmd_strings>: Change type to
7534         std::vector<char *>.
7535         * tracepoint.c (get_uploaded_tp): Allocate with new.
7536         (free_uploaded_tps): Free with delete.
7537         (parse_tracepoint_definition): Adjust to std::vector change.
7538         * breakpoint.c (read_uploaded_action): Likewise.
7539         (create_tracepoint_from_upload): Likewise.
7540         * ctf.c (ctf_write_uploaded_tp): Likewise.
7541         (SET_ARRAY_FIELD): Likewise.
7542         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
7543
7544 2018-03-30  Tom Tromey  <tom@tromey.com>
7545
7546         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
7547         std::unique_ptr.
7548         (svr4_keep_data_in_core): Update.
7549         (svr4_read_so_list): Update.
7550
7551 2018-03-30  Tom Tromey  <tom@tromey.com>
7552
7553         * windows-nat.c (handle_output_debug_string, handle_exception):
7554         Update.
7555         * target.h (target_read_string): Update.
7556         * target.c (target_read_string): Change "string" to
7557         unique_xmalloc_ptr.
7558         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
7559         Update.
7560         * solib-frv.c (frv_current_sos): Update.
7561         * solib-dsbt.c (dsbt_current_sos): Update.
7562         * solib-darwin.c (darwin_current_sos): Update.
7563         * linux-thread-db.c (inferior_has_bug): Update.
7564         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
7565         Update.  Remove alloca.
7566         * ada-lang.c (ada_main_name): Update.
7567
7568 2018-03-30  Tom Tromey  <tom@tromey.com>
7569
7570         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
7571         (struct dwo_file_deleter): New.
7572         (dwo_file_up): New typedef.
7573         (open_and_init_dwo_file): Use dwo_file_up.
7574         (free_dwo_file_cleanup): Remove.
7575
7576 2018-03-30  Tom Tromey  <tom@tromey.com>
7577
7578         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
7579         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
7580
7581 2018-03-30  Tom Tromey  <tom@tromey.com>
7582
7583         * dwarf2read.c (class free_cached_comp_units): New class.
7584         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
7585         (free_cached_comp_units): Remove function.
7586
7587 2018-03-30  Tom Tromey  <tom@tromey.com>
7588
7589         * utils.h (make_cleanup_unpush_target): Remove.
7590         * inf-ptrace.c (struct target_unpusher): New.
7591         (target_unpush_up) New typedef.
7592         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
7593         target_unpush_up.
7594         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
7595
7596 2018-03-27  Tom Tromey  <tom@tromey.com>
7597
7598         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
7599
7600 2018-03-27  Pedro Alves  <palves@redhat.com>
7601             Tom Tromey  <tom@tromey.com>
7602
7603         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
7604         destructor.  Now a class.
7605         (gdb_readline_wrapper_cleanup): Remove function.
7606         (gdb_readline_wrapper): Remove cleanups.
7607
7608 2018-03-27  Tom Tromey  <tom@tromey.com>
7609
7610         * typeprint.h (struct type_print_options) <local_typedefs,
7611         global_typedefs>: Remove "struct" keyword.
7612         (class typedef_hash_table): New class.
7613         (recursively_update_typedef_hash, add_template_parameters)
7614         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
7615         (find_typedef_in_hash): Don't declare.
7616         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
7617         (typedef_hash_table::recursively_update): Rename from
7618         recursively_update_typedef_hash.  Now a member.
7619         (typedef_hash_table::add_template_parameters): Rename from
7620         add_template_parameters.  Now a member.
7621         (typedef_hash_table::typedef_hash_table): Now a constructor;
7622         rename from create_typedef_hash.
7623         (typedef_hash_table::~typedef_hash_table): Now a destructor;
7624         rename from free_typedef_hash.
7625         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
7626         (do_free_global_table): Remove.
7627         (typedef_hash_table::typedef_hash_table): New constructor; renamed
7628         from copy_type_recursive.
7629         (create_global_typedef_table): Remove.
7630         (typedef_hash_table::find_global_typedef): Now a member of
7631         typedef_hash_table.
7632         (typedef_hash_table::find_typedef): Rename from
7633         find_typedef_in_hash; now a member.
7634         (whatis_exp): Update.
7635         * extension.h (struct ext_lang_type_printers): Add constructor and
7636         destructor.
7637         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
7638         declare.
7639         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
7640         Now a constructor; rename from start_ext_lang_type_printers.
7641         (ext_lang_type_printers): Now a destructor; rename from
7642         free_ext_lang_type_printers.
7643         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
7644         Update.
7645         (c_type_print_base_struct_union): Update.  Remove cleanups.
7646
7647 2018-03-27  Tom Tromey  <tom@tromey.com>
7648
7649         * dwarf-index-write.c: Include <cmath>.
7650
7651 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
7652
7653         * NEWS: Add entry describing new "set|show varsize-limit" command.
7654         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
7655         command.
7656         * printcmd.c (_initialize_printcmd): Add "set var" alias of
7657         "set variable".
7658
7659 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
7660
7661         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
7662         dwarf-index-write.c
7663         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
7664         * dwarf-index-common.c: New file.
7665         * dwarf-index-common.h: New file.
7666         * dwarf-index-write.c: New file.
7667         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
7668         (struct dwarf2_section_info): Move from here.
7669         (dwarf2_section_info_def): Likewise.
7670         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
7671         (offset_type): Likewise.
7672         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
7673         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
7674         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
7675         (byte_swap): Likewise.
7676         (MAYBE_SWAP): Likewise.
7677         (dwarf2_per_cu_ptr): Likewise.
7678         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
7679         (struct tu_stats): Likewise.
7680         (struct dwarf2_per_objfile): Likewise.
7681         (struct dwarf2_per_cu_data): Likewise.
7682         (struct signatured_type): Likewise.
7683         (sig_type_ptr): Likewise.
7684         (DEF_VEC_P (sig_type_ptr)): Likewise.
7685         (INDEX4_SUFFIX): Likewise.
7686         (INDEX5_SUFFIX): Likewise.
7687         (DEBUG_STR_SUFFIX): Likewise.
7688         (dwarf2_read_section): Make non-static.
7689         (mapped_index_string_hash): Move from here.
7690         (dwarf5_djb_hash): Likewise.
7691         (file_write): Likewise.
7692         (class data_buf): Likewise.
7693         (struct symtab_index_entry): Likewise.
7694         (struct mapped_symtab): Likewise.
7695         (find_slot): Likewise.
7696         (hash_expand): Likewise.
7697         (add_index_entry): Likewise.
7698         (uniquify_cu_indices): Likewise.
7699         (class c_str_view): Likewise.
7700         (class c_str_view_hasher): Likewise.
7701         (class vector_hasher): Likewise.
7702         (write_hash_table): Likewise.
7703         (psym_index_map): Likewise.
7704         (struct addrmap_index_data): Likewise.
7705         (add_address_entry): Likewise.
7706         (add_address_entry_worker): Likewise.
7707         (write_address_map): Likewise.
7708         (symbol_kind): Likewise.
7709         (write_psymbols): Likewise.
7710         (struct signatured_type_index_data): Likewise.
7711         (write_one_signatured_type): Likewise.
7712         (recursively_count_psymbols): Likewise.
7713         (recursively_write_psymbols): Likewise.
7714         (class debug_names): Likewise.
7715         (check_dwarf64_offsets): Likewise.
7716         (psyms_seen_size): Likewise.
7717         (write_gdbindex): Likewise.
7718         (write_debug_names): Likewise.
7719         (assert_file_size): Likewise.
7720         (write_psymtabs_to_index): Likewise.
7721         (save_gdb_index_command): Likewise.
7722         (_initialize_dwarf2_read): Don't register the "save gdb-index"
7723         command.
7724         * dwarf2read.h: New file.
7725
7726 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
7727
7728         PR gdb/22670
7729         * dwarf2read.c (dwarf2_physname): Do not return the demangled
7730         symbol name if the CU's language stores symbol names in linkage
7731         format.
7732         * language.h (struct language_defn)
7733         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
7734         all instances of this struct.
7735
7736 2018-03-26  Tom Tromey  <tom@tromey.com>
7737
7738         * stack.c (backtrace_command_1): Remove verbose code.
7739
7740 2018-03-26  Tom Tromey  <tom@tromey.com>
7741
7742         * python/py-framefilter.c (py_print_type): Don't catch
7743         exceptions.  Return void.
7744         (py_print_value): Likewise.
7745         (py_print_single_arg): Likewise.
7746         (enumerate_args): Don't catch exceptions.
7747         (py_print_args): Likewise.
7748         (py_print_frame): Likewise.
7749         (gdbpy_apply_frame_filter): Catch exceptions here.
7750
7751 2018-03-26  Tom Tromey  <tom@tromey.com>
7752
7753         * stack.c (_initialize_stack): Remove trailing newlines from help
7754         text.  Add "Usage" line to "backtrace" help.
7755
7756 2018-03-26  Tom Tromey  <tom@tromey.com>
7757
7758         PR python/16486:
7759         * python/py-framefilter.c (py_print_args): Call wrap_hint.
7760
7761 2018-03-26  Tom Tromey  <tom@tromey.com>
7762
7763         * python/py-framefilter.c (py_print_single_arg): Return
7764         EXT_LANG_BT_ERROR from catch.
7765
7766 2018-03-26  Tom Tromey  <tom@tromey.com>
7767
7768         PR backtrace/15584:
7769         * stack.c (backtrace_command_1): Move some code into no-filters
7770         "if".
7771
7772 2018-03-26  Tom Tromey  <tom@tromey.com>
7773
7774         * python/py-framefilter.c (throw_quit_or_print_exception): New
7775         function.
7776         (gdbpy_apply_frame_filter): Use it.
7777
7778 2018-03-26  Tom Tromey  <tom@tromey.com>
7779
7780         PR cli/17716:
7781         * python/py-framefilter.c (py_print_type, py_print_value)
7782         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
7783         RETURN_MASK_ERROR.
7784
7785 2018-03-26  Tom Tromey  <tom@tromey.com>
7786
7787         * python/py-framefilter.c (enumerate_args): Use
7788         gdb::unique_xmalloc_ptr.
7789
7790 2018-03-26  Tom Tromey  <tom@tromey.com>
7791
7792         * python/py-framefilter.c (py_print_frame): Return
7793         EXT_LANG_BT_OK.
7794         (gdbpy_apply_frame_filter): Update comment.
7795         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
7796         Remove.
7797         <EXT_LANG_BT_NO_FILTERS>: Change value.
7798
7799 2018-03-26  Tom Tromey  <tom@tromey.com>
7800
7801         PR backtrace/15582:
7802         * stack.c (backtrace_command): Parse "hide" argument.
7803         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
7804         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
7805         constant.
7806
7807 2018-03-26  Tom Tromey  <tom@tromey.com>
7808
7809         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
7810         add "flags".
7811         (backtrace_command): Remove "fulltrace", add "flags".
7812
7813 2018-03-26  Tom Tromey  <tom@tromey.com>
7814
7815         * stack.c (backtrace_command): Rewrite command line parsing.
7816
7817 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
7818
7819         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
7820
7821 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
7822
7823         * filename-seen-cache.h: Add include guard.
7824
7825 2018-03-26  Keith Seitz  <keiths@redhat.com>
7826
7827         * symfile.c (place_section): Remove "struct" from section_addr_info
7828         in comment.
7829         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
7830         "struct" keyword from section_addr_info.
7831
7832 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
7833
7834         * regformats/regdef.h (reg): Add constructors.
7835
7836 2018-03-25  Pedro Alves  <palves@redhat.com>
7837
7838         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
7839         if then/else bodies in var_func_name extraction.
7840
7841 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
7842
7843         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
7844         lookup_minimal_symbol() to find symbol entry.
7845         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
7846
7847 2018-03-23  Keith Seitz  <keiths@redhat.com>
7848
7849         PR c++/22968
7850         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
7851         nested type definitions for C++, too.
7852
7853 2018-03-23  Tom Tromey  <tom@tromey.com>
7854
7855         * machoread.c (struct oso_el): Add a constructor.  Don't define as
7856         a typedef.
7857         (macho_register_oso): Remove.
7858         (macho_symtab_read): Take a std::vector.
7859         (oso_el_compare_name): Now a std::sort comparator.
7860         (macho_symfile_read_all_oso): Take a std::vector.
7861         (macho_symfile_read): Use std::vector.  Remove cleanups.
7862
7863 2018-03-22  Tom Tromey  <tom@tromey.com>
7864
7865         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
7866         (record_full_goto_bookmark): Use std::string.
7867
7868 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7869
7870         PR tdep/18295
7871         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
7872         a single mask.
7873
7874 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7875
7876         * rs6000-tdep.c (store_insn_p): New function.
7877         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
7878         and cr_reg to their unshifted values. Use store_insn_p to
7879         match LR saves using either R1 or fdata->alloca_reg. Use
7880         store_insn_p to match CR saves. Set alloca_reg_offset
7881         when alloca_reg and framep are set. Remove lr_reg shift
7882         when assigning to fdata->lr_register.
7883
7884 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7885
7886         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
7887         command line args instead of emitting a warning.
7888
7889 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
7890
7891         * tracepoint.h (struct static_tracepoint_marker): Initialize
7892         fields, define default constructor, move constructor and move
7893         assignment, disable the rest.
7894         <str_id, extra>: Make std::string.
7895         (release_static_tracepoint_marker): Remove.
7896         (free_current_marker): Remove.
7897         * tracepoint.c (free_current_marker): Remove.
7898         (parse_static_tracepoint_marker_definition): Adjust to
7899         std::string, use new hex2str overload.
7900         (release_static_tracepoint_marker): Remove.
7901         (print_one_static_tracepoint_marker): Get marker by reference
7902         and adjust to std::string.
7903         (info_static_tracepoint_markers_command): Adjust to std::vector
7904         changes
7905         * target.h (static_tracepoint_marker_p): Remove typedef.
7906         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
7907         (struct target_ops) <to_static_tracepoint_marker_at>: Return
7908         bool.
7909         <to_static_tracepoint_markers_by_strid>: Return std::vector.
7910         * target-debug.h
7911         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
7912         (target_debug_print_std_vector_static_tracepoint_marker): New.
7913         (target_debug_print_struct_static_tracepoint_marker_p): Rename
7914         to...
7915         (target_debug_print_static_tracepoint_marker_p): ... this.
7916         * target-delegates.c: Re-generate.
7917         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
7918         Make std::string.
7919         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
7920         (decode_static_tracepoint_spec): Adjust to std::vector.
7921         (tracepoint_print_one_detail): Adjust to std::string.
7922         (strace_marker_decode_location): Adjust to std::string.
7923         (update_static_tracepoint): Adjust to std::string, remove call
7924         to release_static_tracepoint_marker.
7925         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
7926         Adjust to std::vector.
7927         * remote.c (remote_static_tracepoint_marker_at): Return bool.
7928         (remote_static_tracepoint_markers_by_strid): Adjust to
7929         std::vector.
7930         * common/rsp-low.h (hex2str): New overload with explicit count
7931         of bytes.
7932         * common/rsp-low.c (hex2str): New overload with explicit count
7933         of bytes.
7934         * unittests/rsp-low-selftests.c (test_hex2str): New function.
7935         (_initialize_rsp_low_selftests): Add test_hex2str test.
7936         * unittests/tracepoint-selftests.c
7937         (test_parse_static_tracepoint_marker_definition): Adjust to
7938         std::string.
7939
7940 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
7941
7942         * tracepoint.c (parse_static_tracepoint_marker_definition):
7943         Consider case where the definition is followed by more
7944         definitions.
7945         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7946         tracepoint-selftests.c.
7947         * unittests/tracepoint-selftests.c: New.
7948
7949 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7950
7951         * MAINTAINERS (Write After Approval): Add Pedro Franco de
7952         Carvalho.
7953
7954 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
7955
7956         * symtab.c (find_pc_sect_line): fixed indentation.
7957
7958 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
7959
7960         * symtab.c (find_pc_sect_line): now uses binary search.
7961
7962 2018-03-19  Tom Tromey  <tom@tromey.com>
7963
7964         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
7965         "IDENT" production.
7966
7967 2018-03-19  Pedro Alves  <palves@redhat.com>
7968             Tom Tromey  <tom@tromey.com>
7969
7970         * unittests/observable-selftests.c: New file.
7971         * common/observable.h: New file.
7972         * observable.h: New file.
7973         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
7974         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
7975         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
7976         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
7977         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
7978         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
7979         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
7980         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
7981         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
7982         python/py-breakpoint.c, python/py-finishbreakpoint.c,
7983         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
7984         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
7985         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
7986         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
7987         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
7988         tui/tui-interp.c, valops.c: Update all users.
7989         * tui/tui-hooks.c (tui_bp_created_observer)
7990         (tui_bp_deleted_observer, tui_bp_modified_observer)
7991         (tui_inferior_exit_observer, tui_before_prompt_observer)
7992         (tui_normal_stop_observer, tui_register_changed_observer):
7993         Remove.
7994         (tui_observers_token): New global.
7995         (attach_or_detach, tui_attach_detach_observers): New functions.
7996         (tui_install_hooks, tui_remove_hooks): Use
7997         tui_attach_detach_observers.
7998         * record-btrace.c (record_btrace_thread_observer): Remove.
7999         (record_btrace_thread_observer_token): New global.
8000         * observer.sh: Remove.
8001         * observer.c: Rename to observable.c.
8002         * observable.c (namespace gdb_observers): Define new objects.
8003         (observer_debug): Move into gdb_observers namespace.
8004         (struct observer, struct observer_list, xalloc_observer_list_node)
8005         (xfree_observer_list_node, generic_observer_attach)
8006         (generic_observer_detach, generic_observer_notify): Remove.
8007         (_initialize_observer): Update.
8008         Don't include observer.inc.
8009         * Makefile.in (generated_files): Remove observer.h, observer.inc.
8010         (clean mostlyclean): Likewise.
8011         (observer.h, observer.inc): Remove targets.
8012         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8013         (COMMON_SFILES): Use observable.c, not observer.c.
8014         * .gitignore: Remove observer.h.
8015
8016 2018-03-18  Tom Tromey  <tom@tromey.com>
8017
8018         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8019         gdb::def_vector.
8020         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8021
8022 2018-03-17  Tom Tromey  <tom@tromey.com>
8023
8024         * auto-load.c (auto_load_objfile_script_1): Use std::string.
8025
8026 2018-03-17  Tom Tromey  <tom@tromey.com>
8027
8028         * target.c (class scoped_target_fd): New.
8029         (target_fileio_close_cleanup): Remove.
8030         (target_fileio_read_alloc_1): Use scoped_target_fd.
8031
8032 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
8033
8034         * silent-rules.mk: New.
8035         * Makefile.in: Include silent-rules.mk
8036         (srcdir, VPATH, top_srcdir): Move up.
8037         (COMPILE): Add ECHO_CXX.
8038         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8039         (init.c): Add ECHO_INIT_C.
8040         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8041         (version.c): Add ECHO_GEN.
8042         (printcmd.o): Add ECHO_CXX.
8043         (target-float.o): Add ECHO_CXX.
8044         (ada-exp.o): Add ECHO_CXX.
8045         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8046         (insight$(EXEEXT)): Add ECHO_CXXLD.
8047         * gnulib/configure.ac: Add AM_SILENT_RULES.
8048         * gnulib/aclocal.m4: Re-generate.
8049         * gnulib/configure: Re-generate.
8050         * gnulib/import/Makefile.in: Re-generate.
8051
8052 2018-03-16  Tom Tromey  <tom@tromey.com>
8053
8054         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
8055         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
8056         * utils.c (do_free_section_addr_info)
8057         (make_cleanup_free_section_addr_info): Remove.
8058         * symfile.h (struct other_sections): Add constructor.
8059         (struct section_addr_info): Remove.
8060         (section_addr_info): New typedef.
8061         (struct sym_fns) <sym_offsets>: Change type of parameter.
8062         (build_section_addr_info_from_objfile)
8063         (relative_addr_info_to_section_offsets, addr_info_make_relative)
8064         (default_symfile_offsets, symbol_file_add)
8065         (symbol_file_add_from_bfd)
8066         (build_section_addr_info_from_section_table): Update.
8067         (alloc_section_addr_info, free_section_addr_info): Don't declare.
8068         * symfile.c (alloc_section_addr_info): Remove.
8069         (build_section_addr_info_from_section_table): Change return type.
8070         Update.
8071         (build_section_addr_info_from_bfd)
8072         (build_section_addr_info_from_objfile): Likewise.
8073         (free_section_addr_info): Remove.
8074         (relative_addr_info_to_section_offsets): Change type of "addrs".
8075         (addrs_section_compar): Now a std::sort comparator.
8076         (addrs_section_sort): Change return type.
8077         (addr_info_make_relative): Change type of "addrs".  Update.
8078         (default_symfile_offsets, syms_from_objfile_1)
8079         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
8080         (symbol_file_add_separate): Update.
8081         (symbol_file_add): Change type of "addrs".  Update.
8082         (add_symbol_file_command): Update.  Remove cleanups.
8083         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
8084         cleanups.
8085         * symfile-debug.c (debug_sym_offsets): Change type of "info".
8086         * solib.c (solib_read_symbols): Update.
8087         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
8088         * machoread.c (macho_symfile_offsets): Update.
8089         * jit.c (jit_bfd_try_read_symtab): Update.
8090
8091 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
8092
8093         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8094         unittests/utils-selftests.c.
8095         * unittests/utils-selftests.c: New file.
8096
8097 2018-03-14  Tom Tromey  <tom@tromey.com>
8098
8099         PR cli/14977:
8100         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
8101         for NULL.
8102
8103 2018-03-14  Tom Tromey  <tom@tromey.com>
8104
8105         PR cli/19918:
8106         * printcmd.c (printf_pointer): Allow "-" in format.
8107
8108 2018-03-14  Tom Tromey  <tom@tromey.com>
8109
8110         * printcmd.c (_initialize_printcmd): Add usage to printf.
8111
8112 2018-03-14  Yao Qi  <qiyao@sourceware.org>
8113
8114         * MAINTAINERS: Update my email address.
8115
8116 2018-03-13  Tom Tromey  <tom@tromey.com>
8117
8118         * machoread.c (macho_check_dsym): Change filenamep to a
8119         std::string*.
8120         (macho_symfile_read): Update.
8121         * symfile.c (load_command): Use std::string.
8122
8123 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8124
8125         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
8126         to error message string.
8127         (riscv_register_name): Use xsnprintf instead of sprintf.
8128         (riscv_insn::fetch_instruction): Use gdb_assert instead of
8129         internal_error.
8130         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
8131         error.
8132         (riscv_push_dummy_call): Likewise.
8133
8134 2018-03-12  Tom Tromey  <tom@tromey.com>
8135
8136         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
8137         Use gdb::byte_vector.
8138         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
8139
8140 2018-03-12  Yao Qi  <yao.qi@linaro.org>
8141
8142         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
8143         parameter type to readable_regcache.
8144         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
8145         the declaration.
8146
8147 2018-03-11  Tom Tromey  <tom@tromey.com>
8148
8149         * dwarf2read.c (struct nextfield): Add initializers.
8150         (struct nextfnfield): Remove.
8151         (struct fnfieldlist): Add initializers.  Remove "length" and
8152         "head", use std::vector.
8153         (struct decl_field_list): Remove.
8154         (struct field_info): Add initializers.
8155         <fields, baseclasses>: Now std::vector.
8156         <nbaseclasses, nfnfields, typedef_field_list_count,
8157         nested_types_list_count>: Remove.
8158         (dwarf2_add_field, dwarf2_add_type_defn)
8159         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
8160         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
8161         (process_structure_scope): Update.
8162
8163 2018-03-11  Tom Tromey  <tom@tromey.com>
8164
8165         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
8166         for use by std::sort.
8167         (build_type_psymtabs_1): Use std::vector.
8168
8169 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
8170
8171         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
8172         and LIBMPFR in the printed configuration.
8173
8174 2018-03-08  Tom Tromey  <tom@tromey.com>
8175
8176         * source.c (get_filename_and_charpos): Use scoped_fd.
8177         * nto-procfs.c (procfs_open_1): Use scoped_fd.
8178         (procfs_pidlist): Likewise.
8179         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
8180         (iterate_over_mappings): Likewise.
8181
8182 2018-03-08  Tom Tromey  <tom@tromey.com>
8183
8184         * infcall.c (struct call_return_meta_info)
8185         <stack_temporaries_enabled>: Remove.
8186         (get_call_return_value, call_function_by_hand_dummy): Update.
8187         * thread.c (disable_thread_stack_temporaries): Remove.
8188         (enable_thread_stack_temporaries): Remove.
8189         (thread_stack_temporaries_enabled_p): Return bool.
8190         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
8191         (get_last_thread_stack_temporary): Update.
8192         * eval.c (evaluate_subexp): Update.
8193         * gdbthread.h (class enable_thread_stack_temporaries): Now a
8194         class, not a function.
8195         (value_ptr, value_vec): Remove typedefs.
8196         (class thread_info) <stack_temporaries_enabled>: Now bool.
8197         <stack_temporaries>: Now a std::vector.
8198         (thread_stack_temporaries_enabled_p)
8199         (value_in_thread_stack_temporaries): Return bool.
8200
8201 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
8202
8203         * remote.c (putpkt_binary): Fix omitted bytes reporting.
8204         (getpkt_or_notif_sane_1): Likewise.
8205
8206 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
8207
8208         * build-id.c (build_id_to_debug_bfd): Use std::string.
8209
8210 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
8211
8212         * build-id.c (find_separate_debug_file_by_buildid): Return
8213         std::string.
8214         * build-id.h (find_separate_debug_file_by_buildid): Return
8215         std::string.
8216         * coffread.c (coff_symfile_read): Adjust to std::string.
8217         * elfread.c (elf_symfile_read): Adjust to std::string.
8218         * symfile.c (separate_debug_file_exists): Change parameter to
8219         std::string.
8220         (find_separate_debug_file): Return std::string.
8221         (find_separate_debug_file_by_debuglink): Return std::string.
8222         * symfile.h (find_separate_debug_file_by_debuglink): Return
8223         std::string.
8224
8225 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
8226
8227         * common/xml-utils.c (xml_escape_text): Move code to...
8228         (xml_escape_text_append): ... this new function.
8229         * common/xml-utils.h (xml_escape_text_append): New declaration.
8230         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
8231         New function.
8232         (_initialize_xml_utils): register test_xml_escape_text_append as
8233         a selftest.
8234
8235 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
8236
8237         * defs.h: Remove MAX_REGISTER_SIZE.
8238         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
8239         asserts.
8240         * python/py-unwind.c (pyuw_sniffer): Likewise.
8241
8242 2018-03-07  Tom Tromey  <tom@tromey.com>
8243
8244         * linux-tdep.c (linux_info_proc): Update.
8245         * target.h (struct target_ops) <to_fileio_readlink>: Return
8246         optional<string>.
8247         (target_fileio_readlink): Return optional<string>.
8248         * remote.c (remote_hostio_readlink): Return optional<string>.
8249         * inf-child.c (inf_child_fileio_readlink): Return
8250         optional<string>.
8251         * target.c (target_fileio_readlink): Return optional<string>.
8252
8253 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
8254
8255         * regcache.c (cooked_read_test): Add riscv to the list of
8256         architectures that have a save_reggroup.
8257
8258 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8259
8260         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
8261         value is not a dynamic class object.
8262
8263 2018-03-06  Tom Tromey  <tom@tromey.com>
8264
8265         * rust-exp.y: Formatting fixes.
8266
8267 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8268
8269         * riscv-tdep.c (riscv_register_name): Remove target description
8270         support.
8271         (riscv_gdbarch_init): Remove target description check.
8272
8273 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8274
8275         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
8276         comment.
8277         * riscv-tdep.h: Likewise.
8278
8279 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8280
8281         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
8282         (riscv_pseudo_register_write): Delete.
8283         (riscv_gdbarch_init): Remove all use of pseudo registers.
8284
8285 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
8286
8287         * record-btrace.c (btrace_print_lines): Replace cleanup
8288         parameter with RAII equivalents.
8289         (btrace_insn_history): Replace cleanup with RAII equivalents.
8290         * ui-out.h (make_cleanup_ui_out_list_begin_end,
8291         make_cleanup_ui_out_tuple_begin_end): Remove.
8292         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
8293         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
8294         make_cleanup_ui_out_list_begin_end): Remove.
8295
8296 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
8297
8298         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
8299         parameter types to std::vector.  Use bool.
8300         (record_btrace_wait): Replace VEC(tp_t) with
8301         std::vector<thread_info *>.
8302         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
8303
8304 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
8305
8306         * record-btrace.c (record_btrace_disable_callback): Remove.
8307         (struct scoped_btrace_disable): New.
8308         (record_btrace_open): Use scoped_btrace_disable.
8309
8310 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8311
8312         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
8313         reading values from registers.
8314
8315 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8316
8317         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
8318         where appropriate.
8319
8320 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8321
8322         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
8323         change parameter type.  Use GDB's print functions, and use
8324         core_addr_to_string where appropriate.
8325         (riscv_push_dummy_call): Use core_addr_to_string where
8326         appropriate, update call to riscv_print_arg_location, and reindent
8327         a few lines.
8328         (riscv_return_value): Update call to riscv_print_arg_location.
8329
8330 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8331             Tim Newsome <tim@sifive.com>
8332             Albert Ou <a0u@eecs.berkeley.edu>
8333             Darius Rad <darius@bluespec.com>
8334
8335         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
8336         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
8337         (ALLDEPFILES): Add riscv-tdep.c
8338         * configure.tgt: Add riscv support.
8339         * riscv-tdep.c: New file.
8340         * riscv-tdep.h: New file.
8341         * NEWS: Mention new target.
8342         * MAINTAINERS: Add entry for riscv.
8343
8344 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8345
8346         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
8347         fields within aggregates.
8348
8349 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
8350
8351         * record-btrace.c (btrace_print_lines): Change type of flags to
8352         gdb_disassembly_flags.
8353
8354 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
8355
8356         * fbsd-nat.c: Include "inf-ptrace.h".
8357         (USE_SIGTRAP_SIGINFO): Conditionally define.
8358         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
8359         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
8360         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
8361         function.
8362         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
8363         Likewise.
8364         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
8365         Likewise.
8366         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
8367         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
8368         "supports_stopped_by_hw_breakpoint" target methods.
8369
8370 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
8371
8372         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
8373         * fbsd-nat.c (debug_fbsd_nat): New variable.
8374         (show_fbsd_nat_debug): New function.
8375         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
8376         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
8377
8378 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
8379
8380         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
8381         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
8382         prototype.
8383         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
8384         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
8385         method.
8386
8387 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8388
8389         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
8390         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
8391
8392 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8393
8394         * charset.c (struct charset_vector): New.
8395         (charsets): Change type to charset_vector.
8396         (find_charset_names): Adjust.
8397         (add_one): Adjust.
8398         (_initialize_charset): Adjust.
8399
8400 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8401
8402         * progspace.h (struct program_space) <deleted_solibs>: Change
8403         type to std::vector<std::string>.
8404         * progspace.c (clear_program_space_solib_cache): Adjust.
8405         * breakpoint.c (print_solib_event): Adjust.
8406         (check_status_catch_solib): Adjust.
8407         * solib.c (update_solib_list): Adjust.
8408         * ui-out.h (class ui_out) <field_string>: New overload.
8409         * ui-out.c (ui_out::field_string): New overload.
8410
8411 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8412
8413         * progspace.h (struct program_space): Add constructor and
8414         destructor, initialize fields.
8415         (add_program_space): Remove.
8416         * progspace.c (add_program_space): Rename to...
8417         (program_space::program_space): ... this.
8418         (release_program_space): Rename to...
8419         (program_space::~program_space): ... this.
8420         (delete_program_space): Use delete to delete program_space.
8421         (initialize_progspace): Use new to allocate program_space.
8422         * inferior.c (add_inferior_with_spaces): Likewise.
8423         (clone_inferior_command): Likewise.
8424         * infrun.c (follow_fork_inferior): Likewise.
8425         (handle_vfork_child_exec_or_exit): Likewise.
8426
8427 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8428
8429         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
8430         (delim_string_to_char_ptr_vec): Return std::vector of
8431         gdb::unique_xmalloc_ptr.
8432         (dirnames_to_char_ptr_vec_append): Take std::vector of
8433         gdb::unique_xmalloc_ptr.
8434         (dirnames_to_char_ptr_vec): Return std::vector of
8435         gdb::unique_xmalloc_ptr.
8436         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
8437         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
8438         (delim_string_to_char_ptr_vec): Return an std::vector of
8439         gdb::unique_xmalloc_ptr, adjust the code.
8440         (dirnames_to_char_ptr_vec_append): Take an std::vector of
8441         gdb::unique_xmalloc_ptr, adjust the code.
8442         (dirnames_to_char_ptr_vec): Return an std::vector of
8443         gdb::unique_xmalloc_ptr, adjust the code.
8444         * auto-load.c (auto_load_safe_path_vec): Change type to
8445         std::vector of gdb::unique_xmalloc_ptr.
8446         (auto_load_expand_dir_vars): Return an std::vector of
8447         gdb::unique_xmalloc_ptr, adjust the code.
8448         (auto_load_safe_path_vec_update): Adjust.
8449         (filename_is_in_auto_load_safe_path_vec): Adjust.
8450         (auto_load_objfile_script_1): Adjust.
8451         * build-id.c (build_id_to_debug_bfd): Adjust.
8452         * linux-thread-db.c (thread_db_load_search): Adjust.
8453         * source.c (add_path): Adjust.
8454         (openp): Adjust.
8455         * symfile.c (find_separate_debug_file): Adjust.
8456         * utils.c (do_free_char_ptr_vec): Remove.
8457         (make_cleanup_free_char_ptr_vec): Remove.
8458
8459 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
8460
8461         PR gdb/22907
8462         * common/pathstuff.c: Conditionally include "<windows.h>".
8463
8464 2018-03-01  Georg Sauthoff  <mail@georg.so>
8465
8466         PR gdb/22888
8467         * gcore.in: Quote variables and switch interpreter to bash.
8468
8469 2018-03-01  Tom Tromey  <tom@tromey.com>
8470
8471         * dwarf2read.c (alloc_discriminant_info): Fix default_index
8472         assertion.  Add assertion for discriminant_index.
8473         (quirk_rust_enum): Use correct base type name in univariant case.
8474
8475 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
8476
8477         * record.c (get_call_history_modifiers): Return a
8478         record_print_flags.
8479         (cmd_record_call_history): Adjust.
8480         * record-btrace.c (record_btrace_call_history): Adjust.
8481         (record_btrace_call_history_range): Adjust.
8482         (record_btrace_call_history_from): Adjust.
8483         * target-debug.h (target_debug_print_record_print_flags): New.
8484         * target-delegates.c: Re-generate.
8485         * target.c (target_call_history): Change flags type.
8486         (target_call_history_from): Likewise.
8487         (target_call_history_range): Likewise.
8488         * target.h (struct target_ops) <target_call_history>: Likewise.
8489         (target_call_history_from): Likewise.
8490         (target_call_history_range): Likewise.
8491
8492 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
8493             Simon Marchi  <simon.marchi@polymtl.ca>
8494
8495         * common/common-utils.c: Include "sys/stat.h".
8496         (is_regular_file): Move here from "source.c"; change return
8497         type to "bool".
8498         * common/common-utils.h (is_regular_file): New prototype.
8499         * common/pathstuff.c (contains_dir_separator): New function.
8500         * common/pathstuff.h (contains_dir_separator): New prototype.
8501         * source.c: Don't include "sys/stat.h".
8502         (is_regular_file): Move to "common/common-utils.c".
8503
8504 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
8505
8506         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
8507         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
8508         * auto-load.c: Include "common/pathstuff.h".
8509         * common/common-def.h (current_directory): Move here.
8510         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
8511         function.
8512         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
8513         prototype.
8514         * common/pathstuff.c: New file.
8515         * common/pathstuff.h: New file.
8516         * compile/compile.c: Include "common/pathstuff.h".
8517         * defs.h (current_directory): Move to "common/common-defs.h".
8518         * dwarf2read.c: Include "common/pathstuff.h".
8519         * exec.c: Likewise.
8520         * guile/scm-safe-call.c: Likewise.
8521         * linux-thread-db.c: Likewise.
8522         * main.c: Likewise.
8523         * nto-tdep.c: Likewise.
8524         * objfiles.c: Likewise.
8525         * source.c: Likewise.
8526         * symtab.c: Likewise.
8527         * utils.c: Include "common/pathstuff.h".
8528         (gdb_realpath): Move to "common/pathstuff.c".
8529         (gdb_realpath_keepfile): Likewise.
8530         (gdb_abspath): Likewise.
8531         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
8532         (gdb_realpath_keepfile): Likewise.
8533         (gdb_abspath): Likewise.
8534
8535 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
8536
8537         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
8538         wildcard process pid for super_resume for kernels with a
8539         specific bug.
8540
8541 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
8542
8543         * compile/compile.c (get_args): Add additional comments
8544         explaining function.
8545
8546 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
8547             Tom Tromey  <tom@tromey.com>
8548
8549         * target.h (memory_write_request_s): Remove typedef.  Don't define
8550         VEC.
8551         (target_write_memory_blocks): Change argument to std::vector.
8552         (struct memory_write_request): Add constructor.
8553         * target-memory.c (compare_block_starting_address): Return bool.
8554         Change argument types.
8555         (claim_memory): Change arguments to use std::vector.
8556         (split_regular_and_flash_blocks, blocks_to_erase)
8557         (compute_garbled_blocks): Likewise.
8558         (cleanup_request_data, cleanup_write_requests_vector): Remove.
8559         (target_write_memory_blocks): Change argument to std::vector.
8560         * symfile.c (struct load_section_data): Add constructor and
8561         destructor.  Use std::vector for "requests".
8562         (struct load_progress_data): Add initializers.
8563         (load_section_callback): Update.  Use "new".
8564         (clear_memory_write_data): Remove.
8565         (generic_load): Update.
8566
8567 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
8568
8569         * arch/aarch64.h: Use common/tdesc.h.
8570
8571 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
8572
8573         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
8574         architecture with a 64-bit ABI.
8575
8576 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
8577
8578         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
8579         ahead of target description loading.
8580
8581 2018-02-26  Tom Tromey  <tom@tromey.com>
8582
8583         * stack.c (backtrace_command_1): Update.
8584         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
8585         of "flags".
8586         * python/py-framefilter.c (py_print_frame)
8587         (gdbpy_apply_frame_filter): Change type of "flags".
8588         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
8589         of "flags".
8590         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
8591         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
8592         * extension.h (enum frame_filter_flag): Rename from
8593         frame_filter_flags.
8594         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
8595         (apply_ext_lang_frame_filter): Change type of "flags".
8596         * extension.c (apply_ext_lang_frame_filter): Change type of
8597         "flags".
8598         * extension-priv.h (struct extension_language_ops)
8599         <apply_frame_filter>: Change type of "flags".
8600
8601 2018-02-26  Tom Tromey  <tom@tromey.com>
8602
8603         PR python/16497:
8604         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
8605         off-by-one in py_end computation.
8606         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
8607         PRINT_MORE_FRAMES.
8608         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
8609         constant.
8610
8611 2018-02-26  Tom Tromey  <tom@tromey.com>
8612
8613         * dwarf2read.c (struct variant_field): New.
8614         (struct nextfield) <variant>: New field.
8615         (dwarf2_add_field): Handle DW_TAG_variant_part.
8616         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
8617         discriminated union.
8618         (read_structure_type): Handle DW_TAG_variant_part.
8619         (handle_struct_member_die): New function, extracted from
8620         process_structure_scope.  Handle DW_TAG_variant.
8621         (process_structure_scope): Handle discriminated unions.  Call
8622         handle_struct_member_die.
8623
8624 2018-02-26  Tom Tromey  <tom@tromey.com>
8625
8626         * rust-lang.h (rust_last_path_segment): Declare.
8627         * rust-lang.c (rust_last_path_segment): Now public.  Change
8628         contract.
8629         (struct disr_info): Remove.
8630         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
8631         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
8632         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
8633         (rust_enum_p, rust_enum_variant): New function.
8634         (rust_underscore_fields): Remove "offset" parameter.
8635         (rust_print_enum): New function.
8636         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
8637         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
8638         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
8639         enums.
8640         (rust_internal_print_type): New function, from rust_print_type.
8641         Remove enum code.
8642         (rust_print_type): Call rust_internal_print_type.
8643         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
8644         Update enum handling.
8645         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
8646         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
8647         (rust_union_quirks): New functions.
8648         (process_full_comp_unit, process_full_type_unit): Call
8649         rust_union_quirks.
8650         (process_structure_scope): Update rust_unions if necessary.
8651
8652 2018-02-26  Tom Tromey  <tom@tromey.com>
8653
8654         * value.h (value_union_variant): Declare.
8655         * valops.c (value_union_variant): New function.
8656         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
8657         (struct discriminant_info): New.
8658         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
8659         enumerator.
8660         (struct main_type) <flag_discriminated_union>: New field.
8661
8662 2018-02-26  Tom Tromey  <tom@tromey.com>
8663
8664         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8665         unittests/unpack-selftests.c.
8666         * unittests/unpack-selftests.c: New file.
8667         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
8668
8669 2018-02-26  Yao Qi  <yao.qi@linaro.org>
8670
8671         * dwarf2read.c (struct partial_die_info) <read>: New method.
8672         (read_partial_die): Remove the declaration.
8673         (load_partial_dies): Update.
8674         (partial_die_info::partial_die_info):
8675         (read_partial_die): Change it to partial_die_info::read.
8676
8677 2018-02-26  Yao Qi  <yao.qi@linaro.org>
8678
8679         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
8680         (fixup_partial_die): Remove declaration.
8681         (scan_partial_symbols): Update.
8682         (partial_die_parent_scope): Likewise.
8683         (partial_die_full_name): Likewise.
8684         (fixup_partial_die): Change it to partial_die_info::fixup.
8685
8686 2018-02-26  Yao Qi  <yao.qi@linaro.org>
8687
8688         * dwarf2read.c (read_partial_die): Update the declaration.
8689         (load_partial_dies): Caller update.
8690         (read_partial_die): Remove one argument abbrev_len.
8691
8692 2018-02-26  Yao Qi  <yao.qi@linaro.org>
8693
8694         * dwarf2read.c (struct partial_die_info): Add ctor, delete
8695         assignment operator.
8696         (load_partial_dies): Use ctor and copy ctor.
8697         (read_partial_die): Update.
8698         (dwarf2_cu::find_partial_die): Use ctor.
8699
8700 2018-02-26  Yao Qi  <yao.qi@linaro.org>
8701
8702         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
8703         (find_partial_die_in_comp_unit): Change it to
8704         dwarf2_cu::find_partial_die.
8705         (find_partial_die): Update.
8706
8707 2018-02-26  Yao Qi  <yao.qi@linaro.org>
8708
8709         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
8710         is NULL.
8711
8712 2018-02-26  Yao Qi  <yao.qi@linaro.org>
8713
8714         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
8715
8716 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
8717
8718         * arch/amd64.h: Use common/tdesc.h.
8719         * arch/i386.c: Likewise.
8720         * arch/i386.h: Likewise.
8721         * arch/tic6x.c: Likewise.
8722         * arch/tdesc.h: Move file from here...
8723         * common/tdesc.h: ...to here.
8724         * features/aarch64-core.c: Regenerate.
8725         * features/aarch64-fpu.c: Regenerate.
8726         * features/i386/32bit-avx.c: Regenerate.
8727         * features/i386/32bit-avx512.c: Regenerate.
8728         * features/i386/32bit-core.c: Regenerate.
8729         * features/i386/32bit-linux.c: Regenerate.
8730         * features/i386/32bit-mpx.c: Regenerate.
8731         * features/i386/32bit-pkeys.c: Regenerate.
8732         * features/i386/32bit-sse.c: Regenerate.
8733         * features/i386/64bit-avx.c: Regenerate.
8734         * features/i386/64bit-avx512.c: Regenerate.
8735         * features/i386/64bit-core.c: Regenerate.
8736         * features/i386/64bit-linux.c: Regenerate.
8737         * features/i386/64bit-mpx.c: Regenerate.
8738         * features/i386/64bit-pkeys.c: Regenerate.
8739         * features/i386/64bit-segments.c: Regenerate.
8740         * features/i386/64bit-sse.c: Regenerate.
8741         * features/i386/x32-core.c: Regenerate.
8742         * features/tic6x-c6xp.c: Regenerate.
8743         * features/tic6x-core.c: Regenerate.
8744         * features/tic6x-gp.c: Regenerate.
8745         * target-descriptions.c: Use common/tdesc.h.
8746         * target-descriptions.h: Likewise.
8747
8748 2018-02-24  Tom Tromey  <tom@tromey.com>
8749
8750         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
8751         (try_thread_db_load_from_dir, thread_db_load_search): Use
8752         std::string.
8753         (info_auto_load_libthread_db_compare): Return bool.  Change
8754         argument types.
8755         (info_auto_load_libthread_db): Use std::vector, std::string.
8756         Remove cleanups.
8757
8758 2018-02-24  Tom Tromey  <tom@tromey.com>
8759
8760         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
8761         std::string.
8762         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
8763         std::string*.
8764         * gdbarch.c: Rebuild.
8765         * gdbarch.h: Rebuild.
8766         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
8767         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
8768         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
8769         std::string*.
8770
8771 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
8772
8773         * gdbtypes.h (sect_offset): Change type to uint64_t.
8774         (sect_offset_str): New function.
8775         * dwarf2read.c (create_addrmap_from_aranges): Use
8776         sect_offset_str.
8777         (error_check_comp_unit_head): Likewise.
8778         (create_debug_type_hash_table): Likewise.
8779         (read_cutu_die_from_dwo): Likewise.
8780         (init_cutu_and_read_dies): Likewise.
8781         (init_cutu_and_read_dies_no_follow): Likewise.
8782         (process_psymtab_comp_unit_reader): Likewise.
8783         (partial_die_parent_scope): Likewise.
8784         (peek_die_abbrev): Likewise.
8785         (process_queue): Likewise.
8786         (dwarf2_physname): Likewise.
8787         (read_namespace_alias): Likewise.
8788         (read_import_statement): Likewise.
8789         (create_dwo_cu_reader): Likewise.
8790         (create_cus_hash_table): Likewise.
8791         (lookup_dwo_cutu): Likewise.
8792         (inherit_abstract_dies): Likewise.
8793         (read_func_scope): Likewise.
8794         (read_call_site_scope): Likewise.
8795         (dwarf2_add_member_fn): Likewise.
8796         (read_common_block): Likewise.
8797         (read_module_type): Likewise.
8798         (read_typedef): Likewise.
8799         (read_subrange_type): Likewise.
8800         (load_partial_dies): Likewise.
8801         (read_partial_die): Likewise.
8802         (find_partial_die): Likewise.
8803         (read_str_index): Likewise.
8804         (dwarf2_string_attr): Likewise.
8805         (build_error_marker_type): Likewise.
8806         (lookup_die_type): Likewise.
8807         (dump_die_shallow): Likewise.
8808         (follow_die_ref): Likewise.
8809         (dwarf2_fetch_die_loc_sect_off): Likewise.
8810         (dwarf2_fetch_constant_bytes): Likewise.
8811         (follow_die_sig): Likewise.
8812         (get_signatured_type): Likewise.
8813         (get_DW_AT_signature_type): Likewise.
8814         (dwarf2_find_containing_comp_unit): Likewise.
8815         (set_die_type): Likewise.
8816
8817 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
8818
8819         * arch/aarch64.c: Include "common-defs.h".
8820         * arch/amd64.c: Likewise.
8821         * arch/i386.c: Likewise.
8822
8823 2018-02-21  Tom Tromey  <tom@tromey.com>
8824
8825         * value.h: (extract_field_op): Update.
8826         * eval.c (extract_field_op): Return a const char *.
8827         * expression.h (parse_expression_for_completion): Update.
8828         * completer.c (complete_expression): Update.
8829         (add_struct_fields): Make fieldname const.
8830         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
8831         (mark_completion_tag, parse_exp_in_context_1): Update.
8832         (parse_expression_for_completion): Change "name" to
8833         unique_xmalloc_ptr*.
8834
8835 2018-02-21  Tom Tromey  <tom@tromey.com>
8836
8837         * infcall.c (call_function_by_hand_dummy): Use std::vector.
8838
8839 2018-02-21  Yao Qi  <yao.qi@linaro.org>
8840
8841         * avr-tdep.c (avr_read_pc): Change parameter type to
8842         readable_regcache.
8843         * gdbarch.sh (read_pc): Likewise.
8844         * gdbarch.c: Re-generated.
8845         * gdbarch.h: Re-generated.
8846         * hppa-tdep.c (hppa_read_pc): Change parameter type to
8847         readable_regcache.
8848         * ia64-tdep.c (ia64_read_pc): Likewise.
8849         * mips-tdep.c (mips_read_pc): Likewise.
8850         * spu-tdep.c (spu_read_pc): Likewise.
8851
8852 2018-02-21  Yao Qi  <yao.qi@linaro.org>
8853
8854         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
8855         * regcache-dump.c: New file.
8856         * regcache.c: Move register_dump to regcache-dump.c.
8857         (maintenance_print_registers): Likewise.
8858         (maintenance_print_raw_registers): Likewise.
8859         (maintenance_print_cooked_registers): Likewise.
8860         (maintenance_print_register_groups): Likewise.
8861         (maintenance_print_remote_registers): Likewise.
8862         (_initialize_regcache): Likewise.
8863         * regcache.h (register_dump): Moved from regcache.c.
8864
8865 2018-02-21  Yao Qi  <yao.qi@linaro.org>
8866
8867         * regcache.c (regcache::regcache): Update.
8868         (regcache::invalidate): Move it to detached_regcache::invalidate.
8869         (get_thread_arch_aspace_regcache): Update.
8870         (regcache::raw_update): Update.
8871         (regcache::cooked_read): Remove some code.
8872         (regcache::cooked_read_value): Likewise.
8873         (regcache::raw_write): Remove assert on m_readonly_p.
8874         (regcache::raw_supply_integer): Move it to
8875         detached_regcache::raw_supply_integer.
8876         (regcache::raw_supply_zeroed): Likewise.
8877         * regcache.h (detached_regcache) <raw_supply_integer>: New
8878         declaration.
8879         <raw_supply_zeroed, invalidate>: Likewise.
8880         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
8881         <invalidate>: Likewise.
8882         <m_readonly_p>: Removed.
8883
8884 2018-02-21  Yao Qi  <yao.qi@linaro.org>
8885
8886         * infcmd.c (get_return_value): Let stop_regs point to
8887         get_current_regcache.
8888         * regcache.c (regcache::regcache): Remove.
8889         (register_dump_reg_buffer): New class.
8890         (regcache_print): Adjust.
8891         * regcache.h (regcache): Remove constructors.
8892
8893 2018-02-21  Yao Qi  <yao.qi@linaro.org>
8894
8895         * regcache.c (class register_dump): New class.
8896         (register_dump_regcache, register_dump_none): New class.
8897         (register_dump_remote, register_dump_groups): New class.
8898         (regcache_print): Update.
8899         * regcache.h (regcache_dump_what): Move it to regcache.c.
8900         (regcache) <dump>: Remove.
8901
8902 2018-02-21  Yao Qi  <yao.qi@linaro.org>
8903
8904         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
8905          reg_buffer_rw *.
8906         (jit_unwind_reg_set_impl): Call raw_supply.
8907         (jit_frame_sniffer): Use reg_buffer_rw.
8908         * record-full.c (record_full_core_regbuf): Change its type.
8909         (record_full_core_open_1): Use reg_buffer_rw.
8910         (record_full_close): Likewise.
8911         (record_full_core_fetch_registers): Use regcache->raw_supply.
8912         (record_full_core_store_registers): Likewise.
8913         * regcache.c (regcache::get_register_status): Move it to
8914         reg_buffer.
8915         (regcache_raw_set_cached_value): Remove.
8916         (regcache::raw_set_cached_value): Remove.
8917         (regcache::raw_write): Call raw_supply.
8918         (regcache::raw_supply): Move it to reg_buffer_rw.
8919         * regcache.h (regcache_raw_set_cached_value): Remove.
8920         (reg_buffer_rw): New class.
8921
8922 2018-02-21  Yao Qi  <yao.qi@linaro.org>
8923
8924         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
8925         readonly_detached_regcache.
8926         (dummy_frame_prev_register): Use regcache->cooked_read.
8927         * frame.c (frame_save_as_regcache): Change return type.
8928         (frame_pop): Update.
8929         * frame.h (frame_save_as_regcache): Update declaration.
8930         * inferior.h (get_infcall_suspend_state_regcache): Update
8931         declaration.
8932         * infrun.c (infcall_suspend_state) <registers>: use
8933         readonly_detached_regcache.
8934         (save_infcall_suspend_state): Don't use regcache_dup.
8935         (get_infcall_suspend_state_regcache): Change return type.
8936         * linux-fork.c (struct fork_info) <savedregs>: Change to
8937         readonly_detached_regcache.
8938         <pc>: New field.
8939         (fork_save_infrun_state): Don't use regcache_dup.
8940         (info_checkpoints_command): Adjust.
8941         * mi/mi-main.c (register_changed_p): Update declaration.
8942         (mi_cmd_data_list_changed_registers): Use
8943         readonly_detached_regcache.
8944         (register_changed_p): Change parameter type to
8945         readonly_detached_regcache.
8946         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
8947         readonly_detached_regcache.
8948         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
8949         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
8950         New.
8951         (regcache::save): Move it to reg_buffer.
8952         (regcache::restore): Change parameter type.
8953         (regcache_dup): Remove.
8954         * regcache.h (reg_buffer) <save>: New method.
8955         (readonly_detached_regcache): New class.
8956         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
8957         readonly_detached_regcache.
8958         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
8959
8960 2018-02-21  Yao Qi  <yao.qi@linaro.org>
8961
8962         * frame.c (frame_save_as_regcache): Use regcache method save.
8963         (frame_pop): Use regcache method restore.
8964         * infrun.c (restore_infcall_suspend_state): Likewise.
8965         * linux-fork.c (fork_load_infrun_state): Likewise.
8966         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
8967         save.
8968         * regcache.c (regcache_save): Remove.
8969         (regcache::restore): More asserts.
8970         (regcache_cpy): Remove.
8971         * regcache.h (regcache_save): Remove the declaration.
8972         (regcache::restore): Move from private to public.
8973         Remove the friend declaration of regcache_cpy.
8974         (regcache_cpy): Remove declaration.
8975
8976 2018-02-21  Yao Qi  <yao.qi@linaro.org>
8977
8978         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
8979         parameter type to 'readable_regcache *'.
8980         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
8981         * arm-tdep.c (arm_neon_quad_read): Likewise.
8982         (arm_pseudo_read): Likewise.
8983         * avr-tdep.c (avr_pseudo_register_read): Likewise.
8984         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
8985         * frv-tdep.c (frv_pseudo_register_read): Likewise.
8986         * gdbarch.c: Re-generated.
8987         * gdbarch.h: Re-generated.
8988         * gdbarch.sh (pseudo_register_read): Change parameter type to
8989         'readable_regcache *'.
8990         (pseudo_register_read_value): Likewise.
8991         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
8992         (h8300_pseudo_register_read): Likewise.
8993         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
8994         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8995         (i386_pseudo_register_read_into_value): Likewise.
8996         (i386_pseudo_register_read_value): Likewise.
8997         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
8998         declaration.
8999         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9000         * m32c-tdep.c (m32c_raw_read): Likewise.
9001         (m32c_read_flg): Likewise.
9002         (m32c_banked_register): Likewise.
9003         (m32c_banked_read): Likewise.
9004         (m32c_sb_read): Likewise.
9005         (m32c_part_read): Likewise.
9006         (m32c_cat_read): Likewise.
9007         (m32c_r3r2r1r0_read): Likewise.
9008         (m32c_pseudo_register_read): Likewise.
9009         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9010         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9011         (mep_pseudo_cr64_read): Likewise.
9012         (mep_pseudo_register_read): Likewise.
9013         * mips-tdep.c (mips_pseudo_register_read): Likewise.
9014         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9015         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9016         * regcache.c (regcache::raw_read): Move it to readable_regcache.
9017         (regcache::cooked_read): Likewise.
9018         (regcache::cooked_read_value): Likewise.
9019         (regcache_cooked_read_signed):
9020         (regcache::cooked_read): Likewise.
9021         * regcache.h (readable_regcache): New class.
9022         (regcache): Inherit readable_regcache.  Move some methods to
9023         readable_regcache.
9024         * rl78-tdep.c (rl78_pseudo_register_read): Change
9025         parameter type to 'readable_regcache *'.
9026         * rs6000-tdep.c (do_regcache_raw_read): Remove.
9027         (e500_pseudo_register_read): Change parameter type to
9028         'readable_regcache *'.
9029         (dfp_pseudo_register_read): Likewise.
9030         (vsx_pseudo_register_read): Likewise.
9031         (efpr_pseudo_register_read): Likewise.
9032         * s390-tdep.c (s390_pseudo_register_read): Likewise.
9033         * sh-tdep.c (sh_pseudo_register_read): Likewise.
9034         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9035         (sh64_pseudo_register_read): Likewise.
9036         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9037         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9038         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9039         (spu_pseudo_register_read): Likewise.
9040         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9041         (xtensa_pseudo_register_read): Likewise.
9042
9043 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9044
9045         * regcache.c (regcache::regcache): Call reg_buffer ctor.
9046         (regcache::arch): Move it to reg_buffer::arch.
9047         (regcache::register_buffer): Likewise.
9048         (regcache::assert_regnum): Likewise.
9049         (regcache::num_raw_registers): Likewise.
9050         * regcache.h (reg_buffer): New class.
9051         (regcache): Inherit reg_buffer.
9052
9053 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
9054
9055         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
9056         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
9057
9058 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
9059
9060         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
9061
9062 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
9063
9064         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
9065         (SFILES): Remove common/*.c files.
9066         (COMMON_OBS): Remove some *.o files built from common/*.c files.
9067         * common/common.host: Add common reference.
9068         * configure.ac: Likewise.
9069         * configure: Regenerate.
9070
9071 2018-02-16  Yao Qi  <yao.qi@linaro.org>
9072
9073         * block.c (block_namespace_info): Inherit allocate_on_obstack.
9074         (block_initialize_namespace): Use new.
9075         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
9076         (dwarf2_free_objfile): Use delete.
9077         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
9078         (copy_type_recursive): Use new.
9079         * gdb_obstack.h (allocate_on_obstack): New.
9080
9081 2018-02-15  Yao Qi  <yao.qi@linaro.org>
9082
9083         PR gdb/22849
9084         * inferior.c (exit_inferior_1): Reset inf->control.
9085
9086 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
9087
9088         * ada-lang.c (ada_to_fixed_value_create): Delete advance
9089         declaration.
9090
9091 2018-02-14  Pedro Alves  <palves@redhat.com>
9092
9093         * frame-unwind.c (frame_unwind_try_unwinder): Always call
9094         frame_cleanup_after_sniffer on exception.
9095
9096 2018-02-14  Tom Tromey  <tom@tromey.com>
9097
9098         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
9099         const.
9100         (solib_bfd_open): Make pathname const.
9101         * solib.c (solib_bfd_open): Make pathname const.
9102         * solib-spu.c (spu_bfd_fopen): Make name const.
9103         (spu_bfd_open): Make pathname const.
9104         * solib-darwin.c (darwin_bfd_open): Make pathname const.
9105         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
9106
9107 2018-02-14  Tom Tromey  <tom@tromey.com>
9108
9109         * symfile.c (symfile_bfd_open): Update.
9110         * source.h (openp, source_full_path_of, find_and_open_source):
9111         Change argument type to unique_xmalloc_ptr.
9112         * source.c (openp): Take a unique_xmalloc_ptr.
9113         (source_full_path_of, find_and_open_source): Likewise.
9114         (open_source_file, symtab_to_fullname): Update.
9115         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
9116         unique_xmalloc_ptr.
9117         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
9118         (exec_file_find): Update.
9119         * psymtab.c (psymtab_to_fullname): Update.
9120         * nto-tdep.h (nto_find_and_open_solib): Update.
9121         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
9122         unique_xmalloc_ptr.
9123         * exec.c (exec_file_attach): Update.
9124         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
9125         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
9126
9127 2018-02-14  Tom Tromey  <tom@tromey.com>
9128
9129         * solib.c: Include source.h.
9130         * nto-tdep.c: Include source.h.
9131         * mi/mi-cmd-env.c: Include source.h.
9132         * infcmd.c: Include source.h.
9133         * exec.c: Include source.h.
9134         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
9135         (add_path, directory_switch, source_path, init_source_path): Move
9136         declarations...
9137         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
9138         (add_path, directory_switch, source_path, init_source_path):
9139         ...here.
9140
9141 2018-02-14  Tom Tromey  <tom@tromey.com>
9142
9143         * solist.h (exec_file_find, solib_find): Return
9144         unique_xmalloc_ptr.
9145         (solib_bfd_fopen): Take a const char *.
9146         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
9147         (exec_file_find, solib_find): Likewise.
9148         (solib_bfd_fopen): Do not take ownership of "pathname".
9149         (solib_bfd_open): Use unique_xmalloc_ptr.
9150         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
9151         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
9152         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
9153         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
9154
9155 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
9156
9157         * ada-lang.c (name_match_type_from_name): Remove reference to
9158         ada_name_for_lookup in function's documentation.
9159         * ada-lang.h (ada_name_for_lookup): Delete declaration.
9160
9161 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
9162
9163         * defs.h (enum openp_flags): New enum.
9164         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
9165         Move to enum openp_flags.
9166         (openp_flags): New enum flags.
9167         (openp): Change parameter type to openp_flags.
9168         * source.c (openp): Change parameter type to openp_flags.
9169         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
9170         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
9171
9172 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
9173
9174         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
9175         per-command.
9176
9177 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
9178
9179         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
9180         into...
9181         (class dwarf2_queue_guard): ...the destructor of this new class.
9182         (dw2_do_instantiate_symtab): Create instance of the new class
9183         dwarf2_queue_guard, remove cleanup.
9184
9185 2018-02-09  Tom Tromey  <tom@tromey.com>
9186
9187         * source.c (find_source_lines): Don't reference past the end of
9188         the vector.
9189
9190 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9191
9192         * remote.c (remote_btrace_maybe_reopen): Change error message.
9193         * btrace.c (btrace_enable): Likewise.
9194         (parse_xml_btrace): Likewise.
9195         (parse_xml_btrace_conf): Likewise.
9196
9197 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9198
9199         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
9200         (linux_enable_pt, linux_enable_bts): Call
9201         diagnose_perf_event_open_fail.
9202
9203 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9204
9205         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
9206         Remove parameter and change return type.  Update callers.  Move it.
9207         (linux_enable_bts, linux_enable_pt): Improve error message.
9208         (linux_enable_pt): Remove zero buffer size check.
9209         (linux_enable_btrace): Improve error messages.  Remove NULL return
9210         check.
9211
9212 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9213
9214         * btrace.c (btrace_enable): Remove target_supports_btrace call.
9215         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
9216         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
9217         (linux_supports_pt, linux_supports_btrace): Remove.
9218         (linux_enable_bts): Call cpu_supports_bts.
9219         * nat/linux-btrace.h (linux_supports_btrace): Remove.
9220         * remote.c (remote_supports_btrace): Remove.
9221         (init_remote_ops): Remove remote_supports_btrace.
9222         * target-delegates.c: Regenerated.
9223         * target.c (target_supports_btrace): Remove.
9224         * target.h (target_ops) <to_supports_btrace>: Remove
9225         (target_supports_btrace): Remove.
9226         * x86-linux-nat.c (x86_linux_create_target): Remove
9227         linux_supports_btrace.
9228
9229 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9230
9231         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
9232         btrace failed.
9233         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
9234         exception and use message in own exception.
9235
9236 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9237
9238         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
9239         (perf_event_pt_event_type): Use gdb_file_up.
9240         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
9241         scoped_fd, and scoped_mmap.
9242
9243 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9244
9245         * common/scoped_mmap.h: New.
9246         * unittests/scoped_mmap-selftest.c: New.
9247         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9248         unittests/scoped_mmap-selftest.c.
9249
9250 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9251
9252         * common/scoped_fd.h: New.
9253         * unittests/scoped_fd-selftest.c: New.
9254         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9255         unittests/scoped_fd-selftest.c.
9256
9257 2018-02-09  Tom Tromey  <tom@tromey.com>
9258
9259         * auto-load.c (auto_load_section_scripts): Use
9260         gdb::unique_xmalloc_ptr.
9261
9262 2018-02-09  Tom Tromey  <tom@tromey.com>
9263
9264         * auto-load.c (execute_script_contents): Use std::string.
9265
9266 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
9267
9268         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
9269         Python function, rather than a new command.
9270
9271 2018-02-08  Tom Tromey  <tom@tromey.com>
9272
9273         * solib.c (solib_find_1): Use std::string.
9274         (solib_bfd_fopen): Use unique_xmalloc_ptr.
9275
9276 2018-02-08  Tom Tromey  <tom@tromey.com>
9277
9278         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
9279
9280 2018-02-08  Tom Tromey  <tom@tromey.com>
9281
9282         * source.c (find_source_lines): Use gdb::def_vector.
9283
9284 2018-02-08  Tom Tromey  <tom@tromey.com>
9285
9286         * macrocmd.c (struct temporary_macro_definition): New.
9287         (macro_define_command): Use temporary_macro_definition.  Remove
9288         cleanups.
9289         (free_macro_definition_ptr): Remove.
9290
9291 2018-02-08  Tom Tromey  <tom@tromey.com>
9292
9293         * macroexp.c (maybe_expand): Use std::string.
9294
9295 2018-02-08  Tom Tromey  <tom@tromey.com>
9296
9297         * macroexp.c (struct macro_buffer): Add initializers for some
9298         members.
9299         (init_buffer, init_shared_buffer, free_buffer)
9300         (free_buffer_return_text): Remove.
9301         (macro_buffer): New constructors.
9302         (~macro_buffer): New destructor.
9303         (macro_buffer::set_shared): New method.
9304         (macro_buffer::resize_buffer, macro_buffer::appendc)
9305         (macro_buffer::appendmem): Now methods, not free functions.
9306         (set_token, append_tokens_without_splicing, stringify)
9307         (macro_stringify): Update.
9308         (gather_arguments): Change return type.  Remove argc_p argument,
9309         add args_ptr argument.  Use std::vector.
9310         (substitute_args): Remove argc argument.  Accept std::vector.
9311         (expand): Update.  Use std::vector.
9312         (scan, macro_expand, macro_expand_next): Update.
9313
9314 2018-02-08  Tom Tromey  <tom@tromey.com>
9315
9316         * symtab.c (default_collect_symbol_completion_matches_break_on):
9317         Use unique_xmalloc_ptr.
9318         * macroscope.h: (sal_macro_scope, user_macro_scope)
9319         (default_macro_scope): Return unique_xmalloc_ptr.
9320         * macroscope.c (sal_macro_scope, user_macro_scope)
9321         (default_macro_scope): Return unique_xmalloc_ptr.
9322         * macroexp.h (macro_expand, macro_expand_once): Return
9323         unique_xmalloc_ptr.
9324         * macroexp.c (macro_expand, macro_expand_once): Return
9325         unique_xmalloc_ptr.
9326         * macrocmd.c (macro_expand_command, macro_expand_once_command)
9327         (info_macro_command, info_macros_command): Use
9328         unique_xmalloc_ptr.
9329         * compile/compile-c-support.c (write_macro_definitions): Use
9330         unique_xmalloc_ptr.
9331         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
9332
9333 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
9334
9335         * value.c (value_static_field): Assign field type instead of
9336         containing type when returning an optimized out value.
9337
9338 2018-02-06  Yao Qi  <yao.qi@linaro.org>
9339
9340         * ft32-tdep.c (ft32_read_pc): Remove.
9341         (ft32_write_pc): Remove.
9342         (ft32_gdbarch_init): Update.
9343         * m32r-tdep.c (m32r_read_pc): Remove.
9344         (m32r_gdbarch_init): Update.
9345         * mep-tdep.c (mep_read_pc): Remove.
9346         (mep_gdbarch_init): Update.
9347         * microblaze-tdep.c (microblaze_write_pc): Remove.
9348         (microblaze_gdbarch_init): Update.
9349         * mn10300-tdep.c (mn10300_read_pc): Remove.
9350         (mn10300_write_pc): Remove.
9351         (mn10300_gdbarch_init): Update.
9352         * moxie-tdep.c (moxie_read_pc): Remove.
9353         (moxie_write_pc): Remove.
9354         (moxie_gdbarch_init): Update.
9355
9356 2018-02-06  Yao Qi  <yao.qi@linaro.org>
9357
9358         * expprint.c (print_subexp_standard): Handle
9359         OP_F77_UNDETERMINED_ARGLIST.
9360         (dump_subexp_body_standard): Likewise.
9361
9362 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
9363
9364         * target-descriptions.c (tdesc_element_visitor) Add empty
9365         implementations.
9366         (tdesc_type): Move make_gdb_type from here.
9367         (tdesc_type_builtin): Likewise.
9368         (tdesc_type_vector): Likewise.
9369         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
9370         (make_gdb_type_struct): Move from tdesc_type_with_fields.
9371         (make_gdb_type_union): Likewise.
9372         (make_gdb_type_flags): Likewise.
9373         (make_gdb_type_enum): Likewise.
9374         (make_gdb_type): New function.
9375         (tdesc_register_type): Use static make_gdb_type.
9376
9377 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
9378
9379         * infcmd.c (default_print_one_register_info): Align natural-format
9380         column values consistently one under another.
9381         (pad_to_column): New function.
9382
9383 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
9384
9385         * dwarf2read.c (dwarf2_physname): Move commment.
9386
9387 2018-02-01  Leszek Swirski  <leszeks@google.com>
9388
9389         * varobj.c (varobj_formatted_print_options): Allow recursive
9390         pretty printing if pretty printing is enabled.
9391
9392 2018-02-01  Leszek Swirski  <leszeks@google.com>
9393
9394         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
9395         names after a structop as a filename.
9396
9397 2018-02-01  Yao Qi  <yao.qi@linaro.org>
9398
9399         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
9400         (arm_record_coproc_data_proc): Likewise.
9401
9402 2018-02-01  Yao Qi  <yao.qi@linaro.org>
9403
9404         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
9405
9406 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
9407
9408         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
9409         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
9410
9411 2018-01-31  Pedro Alves  <palves@redhat.com>
9412
9413         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
9414         * inflow.c (child_terminal_save_inferior): Wrap reference to
9415         tcgetpgrp in HAVE_TERMIOS_H.
9416         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
9417         _WIN32.
9418         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
9419         always iterate over all inferiors.
9420         (gdbsim_cntrl_c): Adjust.
9421         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
9422
9423 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
9424
9425         * gdbtypes.c (lookup_array_range_type): Make sure the array's
9426         index type is objfile-owned if the element type is as well.
9427
9428 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
9429
9430         GDB 8.1 released.
9431
9432 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9433
9434         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
9435         "features/s390x-linux64.c".
9436         (_initialize_s390_linux_tdep): Remove initialization of tdescs
9437         s390_linux32 and s390x_linux64.
9438         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
9439         default tdesc.
9440         * s390-tdep.c: Include "features/s390-linux32.c" and
9441         "features/s390x-linux64.c".
9442         (s390_tdesc_valid): Add check for tdesc_has_registers.
9443         (s390_gdbarch_init): Make sure there is always a valid tdesc.
9444         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
9445         tdesc_s390x_linux64.
9446         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
9447         tdesc_s390x_linux64 to...
9448         * s390-tdep.h: ...here.
9449
9450 2018-01-30  Pedro Alves  <palves@redhat.com>
9451
9452         PR gdb/13211
9453         * config.in, configure: Regenerate.
9454         * configure.ac: Check for getpgid.
9455         * go32-nat.c (go32_pass_ctrlc): New.
9456         (go32_target): Install it.
9457         * inf-child.c (inf_child_target): Install
9458         child_terminal_save_inferior, child_pass_ctrlc and
9459         child_interrupt.
9460         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
9461         (inf_ptrace_target): No longer install it.
9462         * infcmd.c (interrupt_target_1): Adjust.
9463         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
9464         (child_interrupt): Declare.
9465         (inferior::terminal_state): New.
9466         * inflow.c (struct terminal_info): Update comments.
9467         (inferior_process_group): Delete.
9468         (terminal_is_ours): Delete.
9469         (gdb_tty_state): New.
9470         (child_terminal_init): Adjust.
9471         (is_gdb_terminal, sharing_input_terminal_1)
9472         (sharing_input_terminal): New functions.
9473         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
9474         Set the process's actual process group in the foreground if
9475         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
9476         mark terminal as the inferior's if not sharing GDB's terminal.
9477         Don't check attach_flag.
9478         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
9479         pass down a target_terminal_state.
9480         (child_terminal_save_inferior): New, factored out from ...
9481         (child_terminal_ours_1): ... this.  Handle
9482         target_terminal_state::is_ours_for_output.
9483         (child_interrupt, child_pass_ctrlc): New.
9484         (inflow_inferior_exit): Clear the inferior's terminal_state.
9485         (copy_terminal_info): Copy the inferior's terminal state.
9486         (_initialize_inflow): Remove reference to terminal_is_ours.
9487         * inflow.h (inferior_process_group): Delete.
9488         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
9489         * procfs.c (procfs_target): Don't install procfs_interrupt.
9490         (procfs_interrupt): Delete.
9491         * remote.c (remote_serial_quit_handler): Adjust.
9492         (remote_interrupt): Remove ptid parameter.  Adjust.
9493         * target-delegates.c: Regenerate.
9494         * target.c: Include "terminal.h".
9495         (target_terminal::terminal_state): Rename to ...
9496         (target_terminal::m_terminal_state): ... this.
9497         (target_terminal::init): Adjust.
9498         (target_terminal::inferior): Adjust to per-inferior
9499         terminal_state.
9500         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
9501         (target_terminal::ours, target_terminal::ours_for_output): Use
9502         target_terminal_is_ours_kind.
9503         (target_interrupt): Remove ptid parameter.  Adjust.
9504         (default_target_pass_ctrlc): Adjust.
9505         * target.h (target_ops::to_terminal_save_inferior): New field.
9506         (target_ops::to_interrupt): Remove ptid_t parameter.
9507         (target_interrupt): Remove ptid_t parameter.  Update comment.
9508         (target_pass_ctrlc): Update comment.
9509         * target/target.h (target_terminal_state): New scoped enum,
9510         factored out of ...
9511         (target_terminal::terminal_state): ... here.
9512         (target_terminal::inferior): Update comments.
9513         (target_terminal::restore_inferior): New.
9514         (target_terminal::is_inferior, target_terminal::is_ours)
9515         (target_terminal::is_ours_for_output): Adjust.
9516         (target_terminal::scoped_restore_terminal_state): Adjust to
9517         rename, and call restore_inferior() instead of inferior().
9518         (target_terminal::scoped_restore_terminal_state::m_state): Change
9519         type.
9520         (target_terminal::terminal_state): Rename to ...
9521         (target_terminal::m_terminal_state): ... this and change type.
9522
9523 2018-01-30  Pedro Alves  <palves@redhat.com>
9524
9525         * linux-nat.c (wait_for_signal): New function.
9526         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
9527         directly.
9528         (async_terminal_is_ours)
9529         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
9530         (linux_nat_add_target): Don't override
9531         to_terminal_inferior/to_terminal_ours.
9532
9533 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
9534
9535         * remote.c (remote_follow_fork): Don't call "detach_inferior".
9536
9537 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
9538
9539         * dwarf2read.c (free_dwo_files): Add forward-declaration.
9540         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
9541         dwarf2_per_objfile_free here.
9542         (dwarf2_per_objfile_free): Remove.
9543         (_initialize_dwarf2_read): Don't register
9544         dwarf2_per_objfile_free as a registry cleanup.
9545
9546 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
9547
9548         Avoid compilation errors in MinGW native builds
9549
9550         The error is triggered by including python-internal.h, and the
9551         error message is:
9552
9553              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
9554                       from build-gnulib/import/math.h:27,
9555                       from d:/usr/Python26/include/pyport.h:235,
9556                       from d:/usr/Python26/include/Python.h:58,
9557                       from python/python-internal.h:94,
9558                       from python/py-arch.c:24:
9559              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
9560         using ::hypot;
9561                 ^~~~~
9562
9563         This happens because Python headers define 'hypot' to expand t
9564         '_hypot' in the Windows builds.
9565         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
9566         'hypoth'.  This avoids a compilation error.
9567
9568 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
9569
9570         * MAINTAINERS (Write After Approval): Fix ordering.
9571
9572 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
9573
9574         * MAINTAINERS (Write After Approval): Add Alan Hayward.
9575
9576 2018-01-26  Alan Modra  <amodra@gmail.com>
9577
9578         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
9579         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
9580         Remove nop.  Make const.  Comment.
9581         (powerpc32_plt_stub_so_2): New.
9582         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
9583         Correct count.  Update uses.
9584         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
9585         Move common code reading PLT entry word.  Correct
9586         powerpc32_plt_stub PLT address calculation.
9587         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
9588         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
9589         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
9590         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
9591         (ppc64_standard_linkage8): Likewise.
9592         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
9593         Correct insns description.
9594         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
9595
9596 2018-01-24  Pedro Alves  <palves@redhat.com>
9597
9598         GCC PR libstdc++/83906
9599         * gdbtypes.c (operator==(const dynamic_prop &,
9600         const dynamic_prop &)): New.
9601         (operator==(const range_bounds &, const range_bounds &)): New.
9602         (check_types_equal): Use them instead of memcmp.
9603         * gdbtypes.h (operator==(const dynamic_prop &,
9604         const dynamic_prop &)): Declare.
9605         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
9606         (operator==(const range_bounds &, const range_bounds &)): Declare.
9607         (operator!=(const range_bounds &, const range_bounds &)): Declare.
9608
9609 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9610
9611         * s390-linux-tdep.c (s390_record_address_mask)
9612         (s390_record_calc_disp_common, s390_record_calc_disp)
9613         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9614         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9615         (s390_process_record): Move to s390-tdep.c.
9616         (s390_linux_init_abi_any): Adjust.
9617         * s390-tdep.c (s390_record_address_mask)
9618         (s390_record_calc_disp_common, s390_record_calc_disp)
9619         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9620         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9621         (s390_process_record): Moved from s390-linux-tdep.c
9622         (s390_gdbarch_init): Adjust.
9623
9624 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9625
9626         * s390-linux-nat.c (s390-tdep.h): New include.
9627         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
9628         (HFILES_NO_SRCDIR): Add s390-tdep.h.
9629         (ALLDEPFILES): Add s390-tdep.c.
9630         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
9631         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
9632         * s390-tdep.h: ...this.  New file.
9633         * s390-linux-tdep.c (s390-tdep.h): New include.
9634         (_initialize_s390_tdep): Rename to...
9635         (_initialize_s390_linux_tdep): ...this and adjust.
9636         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
9637         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
9638         s390-tdep.h.
9639         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
9640         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
9641         (s390_is_partial_instruction, s390_software_single_step)
9642         (is_non_branch_ril, s390_displaced_step_copy_insn)
9643         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
9644         (s390_prologue_data, s390_addr, s390_store, s390_load)
9645         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
9646         (s390_register_call_saved, s390_guess_tracepoint_registers)
9647         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
9648         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
9649         (s390_pseudo_register_name, s390_pseudo_register_type)
9650         (s390_pseudo_register_read, s390_pseudo_register_write)
9651         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
9652         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
9653         (s390_addr_bits_remove, s390_address_class_type_flags)
9654         (s390_address_class_type_flags_to_name)
9655         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
9656         (s390_function_arg_float, s390_function_arg_vector)
9657         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
9658         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
9659         (s390_frame_align, s390_register_return_value, s390_return_value)
9660         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
9661         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
9662         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
9663         (s390_trad_frame_prev_register, s390_unwind_cache)
9664         (s390_prologue_frame_unwind_cache)
9665         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
9666         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
9667         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
9668         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
9669         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
9670         (s390_frame_base_address, s390_local_base_address)
9671         (s390_frame_base, s390_gcc_target_options)
9672         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
9673         (s390_validate_reg_range, s390_tdesc_valid)
9674         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
9675         * s390-tdep.c: ...this.  New file.
9676
9677 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9678
9679         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
9680         (s390_process_record, s390_gdbarch_tdep_alloc)
9681         (s390_linux_init_abi_any): Use/set new hook.
9682
9683 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9684
9685         * s390-linux-tdep.c (osabi.h): New include.
9686         (s390_linux_init_abi_31, s390_linux_init_abi_64)
9687         (s390_linux_init_abi_any): New functions.
9688         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
9689
9690 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9691
9692         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
9693         tdesc_has_registers check
9694
9695 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9696
9697         * s390-linux-tdep.c (s390_tdesc_valid): New function.
9698         (s390_validate_reg_range): New macro.
9699         (s390_gdbarch_init): Adjust.
9700
9701 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9702
9703         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
9704         (s390_gdbarch_tdep_alloc): Adjust.
9705         (s390_gdbarch_init): Adjust.
9706
9707 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9708
9709         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
9710         <have_tdb>: Change type to bool.
9711         (s390_gdbarch_tdep_alloc): Adjust.
9712         (s390_gdbarch_init): Adjust.
9713
9714 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9715
9716         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
9717         (gdbarch_tdep) <have_upper, have_vx>: New fields.
9718         (s390_gdbarch_tdep_alloc): New function.
9719         (s390_gdbarch_init): Allocate tdep at start and use its fields
9720         instead of separate variables.
9721
9722 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9723
9724         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
9725         when looking for cached gdbarch and add comment for remaining.
9726
9727 2018-01-22  Pedro Alves  <palves@redhat.com>
9728             Sergio Durigan Junior  <sergiodj@redhat.com>
9729
9730         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
9731         case.
9732
9733 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
9734
9735         * MAINTAINERS: Update my company e-mail address.
9736
9737 2018-01-22  Yao Qi  <yao.qi@linaro.org>
9738
9739         * regcache.c (cooked_write_test): New function.
9740         (_initialize_regcache): Register the test.
9741
9742 2018-01-22  Yao Qi  <yao.qi@linaro.org>
9743
9744         * ia64-tdep.c (ia64_pseudo_register_read): Call
9745         regcache->cooked_read instead of regcache_cooked_read_unsigned.
9746         * m32c-tdep.c (m32c_cat_read): Likewise.
9747         (m32c_r3r2r1r0_read): Likewise.
9748         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9749         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9750
9751 2018-01-22  Yao Qi  <yao.qi@linaro.org>
9752
9753         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
9754         method raw_read instead of regcache_raw_read.
9755         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9756         * arm-tdep.c (arm_neon_quad_read): Likewise.
9757         * avr-tdep.c (avr_pseudo_register_read): Likewise.
9758         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9759         * frv-tdep.c (frv_pseudo_register_read): Likewise.
9760         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
9761         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9762         (i386_pseudo_register_read_into_value): Likewise.
9763         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9764         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9765         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9766         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
9767         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
9768         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
9769         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9770         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
9771         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
9772
9773 2018-01-22  Yao Qi  <yao.qi@linaro.org>
9774
9775         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
9776         * configure.tgt: Remove target mt.
9777         * mt-tdep.c: Remove.
9778         * regcache.c (cooked_read_test): Remove the check for mt.
9779
9780 2018-01-22  Yao Qi  <yao.qi@linaro.org>
9781
9782         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
9783         instead of gdbarch_pseudo_register_read_value.
9784
9785 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
9786
9787         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
9788         language is Ada.
9789
9790 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
9791
9792         * linespec.c (create_sals_line_offset): Remove code that preserved
9793         the symtab_and_line's line number.
9794
9795 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
9796
9797         * varobj.c (varobj_create): Don't set valid_block when creating a
9798         floating varobj.
9799
9800 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
9801
9802         * varobj.c (varobj_create): Remove out of date comment.
9803
9804 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
9805
9806         PR mi/20395
9807         * ada-exp.y (write_var_from_sym): Pass extra parameter when
9808         updating innermost block.
9809         * parse.c (innermost_block_tracker::update): Take extra type
9810         parameter, and check types match before updating innermost block.
9811         (write_dollar_variable): Update innermost block for registers.
9812         * parser-defs.h (enum innermost_block_tracker_type): New enum.
9813         (innermost_block_tracker::innermost_block_tracker): Initialise
9814         m_types member.
9815         (innermost_block_tracker::reset): Take type parameter.
9816         (innermost_block_tracker::update): Take type parameter, and pass
9817         type through as needed.
9818         (innermost_block_tracker::m_types): New member.
9819         * varobj.c (varobj_create): Pass type when reseting innermost
9820         block.
9821
9822 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
9823
9824         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
9825         * ada-lang.c (resolve_subexp): Likewise.
9826         * breakpoint.c (set_breakpoint_condition) Likewise.
9827         (watch_command_1) Likewise.
9828         * c-exp.y (variable): Likewise.
9829         * d-exp.y (PrimaryExpression): Likewise.
9830         * f-exp.y (variable): Likewise.
9831         * go-exp.y (variable): Likewise.
9832         * m2-exp.y (variable): Likewise.
9833         * objfiles.c (objfile::~objfile): Likewise.
9834         * p-exp.y (variable): Likewise.
9835         * parse.c (innermost_block): Change type.
9836         * parser-defs.h (class innermost_block_tracker): New.
9837         (innermost_block): Change to innermost_block_tracker.
9838         * printcmd.c (display_command): Switch to innermost_block API.
9839         (do_one_display): Likewise.
9840         * rust-exp.y (do_one_display): Likewise.
9841         * symfile.c (clear_symtab_users): Likewise.
9842         * varobj.c (varobj_create): Switch to innermost_block API, replace
9843         use of innermost_block with block stored on varobj object.
9844
9845 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
9846
9847         * expression.h (innermost_block): Remove declaration.
9848         * varobj.c: Add 'parser-defs.h' include.
9849
9850 2018-01-19  Tom Tromey  <tom@tromey.com>
9851
9852         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
9853         symbols in the static and global blocks.
9854
9855 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
9856
9857         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
9858         gdb_ptrace.h, and move including gdb_wait.h ...
9859         * nat/linux-ptrace.h: ... to here.
9860
9861 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
9862
9863         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
9864         inf_ptrace_detach_success.
9865         (inf_ptrace_detach_success): Add inferior parameter, use it
9866         instead of inferior_ptid, pass it to detach_inferior.
9867         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
9868         parameter.
9869         * inferior.c (detach_inferior): Add overload that takes an
9870         inferior object.
9871         * inferior.h (detach_inferior): Likewise.
9872         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
9873         use inferior_ptid, adjust call to inf_ptrace_detach_success.
9874         * linux-thread-db.c (thread_db_detach): Use inf parameter.
9875
9876 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
9877
9878         * target.h (struct target_ops) <to_detach>: Add inferior
9879         parameter.
9880         (target_detach): Likewise.
9881         * target.c (dispose_inferior): Pass inferior down.
9882         (target_detach): Pass inferior down.  Assert that it is equal to
9883         the current inferior.
9884         * aix-thread.c (aix_thread_detach): Pass inferior down.
9885         * corefile.c (core_file_command): Pass current_inferior() down.
9886         * corelow.c (core_detach): Add inferior parameter.
9887         * darwin-nat.c (darwin_detach): Likewise.
9888         * gnu-nat.c (gnu_detach): Likewise.
9889         * inf-ptrace.c (inf_ptrace_detach): Likewise.
9890         * infcmd.c (detach_command): Pass current_inferior() down to
9891         target_detach.
9892         * infrun.c (follow_fork_inferior): Pass parent_inf to
9893         target_detach.
9894         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
9895         target_detach.
9896         * linux-nat.c (linux_nat_detach): Add inferior parameter.
9897         * linux-thread-db.c (thread_db_detach): Likewise.
9898         * nto-procfs.c (procfs_detach): Likewise.
9899         * procfs.c (procfs_detach): Likewise.
9900         * record.c (record_detach): Likewise.
9901         * record.h (struct inferior): Forward-declare.
9902         (record_detach): Add inferior parameter.
9903         * remote-sim.c (gdbsim_detach): Likewise.
9904         * remote.c (remote_detach_1): Likewise.
9905         (remote_detach): Likewise.
9906         (extended_remote_detach): Likewise.
9907         * sol-thread.c (sol_thread_detach): Likewise.
9908         * target-debug.h (target_debug_print_inferior_p): New macro.
9909         * target-delegates.c: Re-generate.
9910         * top.c (kill_or_detach): Pass inferior down to target_detach.
9911         * windows-nat.c (windows_detach): Add inferior parameter.
9912
9913 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
9914
9915         * target.h (struct target_ops) <to_detach>: Remove args
9916         parameter.
9917         (target_detach): Likewise.
9918         * target.c (dispose_inferior): Adjust.
9919         (target_detach): Remove args parameter, adjust.
9920         * aix-thread.c (aix_thread_detach): Adjust.
9921         * corefile.c (core_file_command): Adjust.
9922         * corelow.c (core_detach): Adjust.
9923         * darwin-nat.c (darwin_detach): Adjust.
9924         * gnu-nat.c (gnu_detach): Adjust.
9925         * inf-ptrace.c (inf_ptrace_detach): Adjust.
9926         * infcmd.c (detach_command): Adjust
9927         * infrun.c (follow_fork_inferior): Adjust.
9928         (handle_vfork_child_exec_or_exit): Adjust.
9929         * linux-fork.c (linux_fork_detach): Remove args parameter.
9930         * linux-fork.h (linux_fork_detach): Likewise.
9931         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
9932         * linux-thread-db.c (thread_db_detach): Likewise.
9933         * nto-procfs.c (procfs_detach): Likewise.
9934         * procfs.c (procfs_detach): Likewise.
9935         (do_detach): Remove signo parameter.
9936         * record.c (record_detach): Remove args parameter.
9937         * record.h (record_detach): Likewise.
9938         * remote-sim.c (gdbsim_detach): Likewise.
9939         * remote.c (remote_detach_1): Likewise.
9940         (remote_detach): Likewise.
9941         (extended_remote_detach): Likewise.
9942         * sol-thread.c (sol_thread_detach): Likewise.
9943         * target-delegates.c: Re-generate.
9944         * top.c (struct qt_args) <args>: Remove field.
9945         (kill_or_detach): Don't pass args.
9946         (quit_force): Don't set args.
9947         * windows-nat.c (windows_detach): Remove args parameter.
9948
9949 2018-01-19  Yao Qi  <yao.qi@linaro.org>
9950
9951         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
9952         (arm_linux_init_abi): Install it.
9953
9954 2018-01-19  Yao Qi  <yao.qi@linaro.org>
9955
9956         * osabi.c (gdb_osabi_names): Extend the regexp for
9957         arm-linux-gnueabihf.
9958
9959 2018-01-18  Yao Qi  <yao.qi@linaro.org>
9960
9961         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
9962         m_abbrevs.
9963         (abbrev_table::add_abbrev): Update.
9964         (abbrev_table::lookup_abbrev): Update.
9965
9966 2018-01-18  Yao Qi  <yao.qi@linaro.org>
9967
9968         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
9969
9970 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
9971
9972         * compile/compile.c (compile_to_object): Convert "triplet_rx"
9973         to "std::string".
9974
9975 2018-01-17  Tom Tromey  <tom@tromey.com>
9976
9977         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
9978
9979 2018-01-17  Tom Tromey  <tom@tromey.com>
9980
9981         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
9982         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
9983         (create_array_type_with_stride): Update.
9984         * dwarf2read.c (set_die_type): Update.
9985
9986 2018-01-17  Tom Tromey  <tom@tromey.com>
9987
9988         * dwarf2read.c (delayed_method_info): Remove typedef.
9989         (dwarf2_cu::method_info): Now a std::vector.
9990         (add_to_method_list): Update.
9991         (free_delayed_list): Remove.
9992         (compute_delayed_physnames): Update.
9993         (process_full_comp_unit, process_full_type_unit): Clear the method
9994         list.  Remove cleanups.
9995         (psymtab_include_file_name): Add name_holder parameter.  Use
9996         unique_xmalloc_ptr.
9997         (dwarf_decode_lines): Update.
9998
9999 2018-01-17  Tom Tromey  <tom@tromey.com>
10000             Simon Marchi  <simon.marchi@ericsson.com>
10001
10002         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10003         (dwarf2_per_objfile::free_cached_comp_units)
10004         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10005         (init_cutu_and_read_dies_no_follow): Update.
10006         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10007         (dwarf2_cu::~dwarf2_cu): New.
10008         (free_heap_comp_unit, free_stack_comp_unit): Remove.
10009         (age_cached_comp_units, free_one_cached_comp_unit): Update.
10010
10011 2018-01-17  Tom Tromey  <tom@tromey.com>
10012             Simon Marchi  <simon.marchi@ericsson.com>
10013
10014         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10015         (struct die_reader_specs) <abbrev_table>: New member.
10016         (struct abbrev_table): Add constructor.
10017         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10018         <abbrev_obstack>: Now an auto_obstack.
10019         (abbrev_table_up): New typedef.
10020         (init_cu_die_reader): Add abbrev_table parameter.
10021         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10022         Add result_dwo_abbrev_table.
10023         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10024         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10025         Update.
10026         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10027         parameter.
10028         (skip_children): Update.
10029         (abbrev_table::alloc_abbrev): Rename from
10030         abbrev_table_alloc_abbrev.
10031         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10032         (abbrev_table::lookup_abbrev): Rename from
10033         abbrev_table_lookup_abbrev.
10034         (abbrev_table_read_table): Return abbrev_table_up.
10035         (abbrev_table_free, abbrev_table_free_cleanup)
10036         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10037         (load_partial_dies): Update.
10038
10039 2018-01-17  Tom Tromey  <tom@tromey.com>
10040
10041         * dwarf2read.c (dwarf2_compute_name): Update comment.
10042         (read_func_scope, read_variable): Update.
10043         (new_symbol): Remove.
10044         (new_symbol_full): Rename to new_symbol.
10045
10046 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
10047
10048         PR gdb/16577
10049         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
10050         a warning instead of throwing an error, set section size to 0 and return
10051         NULL.
10052         * gdb_bfd.h (gdb_bfd_map_section): Update description.
10053
10054 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
10055
10056         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
10057         std::string.
10058         (linux_ptrace_attach_fail_reason_string): Likewise.
10059         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
10060         Likewise.
10061         (linux_ptrace_attach_fail_reason_string): Likewise.
10062         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
10063
10064 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
10065
10066         * linux-nat.c (linux_nat_attach): Remove xstrdup.
10067
10068 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
10069
10070         PR gdb/21559
10071         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
10072         checking for fs_base/gs_base fields in struct user_regs_struct.
10073         * configure: Regenerate.
10074
10075 2018-01-17  Yao Qi  <yao.qi@linaro.org>
10076
10077         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
10078         function.
10079         (aarch64_linux_init_abi): Install it to gdbarch hook
10080         gcc_target_options.
10081
10082 2018-01-15  Pedro Alves  <palves@redhat.com>
10083
10084         * common/signals-state-save-restore.c
10085         (save_original_signals_state): Fix typos.
10086
10087 2017-01-12  Tom Tromey  <tom@tromey.com>
10088             Sergio Durigan Junior  <sergiodj@redhat.com>
10089
10090         * Makefile.in (install-only): Install gdb-add-index.
10091
10092 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
10093
10094         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
10095
10096 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10097
10098         * infrun.c (keep_going_pass_signal): Clear step-over info when
10099         insert_breakpoints fails.
10100
10101 2018-01-11  Pedro Alves  <palves@redhat.com>
10102
10103         PR gdb/22583
10104         * infrun.c (resume): Rename to ...
10105         (resume_1): ... this.
10106         (resume): Reimplement as wrapper around resume_1.
10107
10108 2018-01-11  Pedro Alves  <palves@redhat.com>
10109
10110         PR remote/22597
10111         * remote.c (remote_parse_stop_reply): Default to the last-set
10112         general thread instead of to 'magic_null_ptid'.
10113
10114 2018-01-10  Pedro Alves  <palves@redhat.com>
10115
10116         * language.h (language_get_symbol_name_matcher): Rename ...
10117         (get_symbol_name_matcher): ... this.
10118         * language.c (language_get_symbol_name_matcher): Ditto.
10119         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
10120         callers adjusted.
10121
10122 2018-01-10  Pedro Alves  <palves@redhat.com>
10123
10124         PR gdb/22670
10125         * dwarf2read.c
10126         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
10127         Adjust to use language_get_symbol_name_matcher instead of
10128         language_defn::la_get_symbol_name_matcher.
10129         * language.c (language_get_symbol_name_matcher): If in Ada mode
10130         and the lookup name is a verbatim match, return Ada's matcher.
10131         * language.h (language_get_symbol_name_matcher): Adjust comment.
10132         (ada_lookup_name_info::verbatim_p):: New method.
10133
10134 2018-01-10  Pedro Alves  <palves@redhat.com>
10135
10136         PR gdb/22670
10137         * ada-lang.c (ada_collect_symbol_completion_matches): If the
10138         minsym's language is language_auto or language_cplus, pass down
10139         language_ada instead.
10140         * symtab.c (compare_symbol_name): Don't frob symbol language here.
10141
10142 2018-01-10  Pedro Alves  <palves@redhat.com>
10143
10144         PR gdb/22670
10145         * minsyms.c (linkage_name_str): New function.
10146         (iterate_over_minimal_symbols): Use it.
10147
10148 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10149
10150         * NEWS: Document that 'info proc' now works on FreeBSD.
10151
10152 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10153
10154         * configure.ac: Check for kinfo_getfile in libutil.
10155         * configure: Regenerate.
10156         * config.in: Regenerate.
10157         * fbsd-nat.c: Include "fbsd-tdep.h".
10158         (fbsd_fetch_cmdline): New.
10159         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
10160         rather than calling error.
10161         (fbsd_info_proc): New.
10162         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
10163         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
10164         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
10165
10166 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10167
10168         * fbsd-nat.c (struct free_deleter): Remove.
10169         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
10170
10171 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10172
10173         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
10174         NULL for an empty pathname.
10175
10176 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10177
10178         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
10179         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
10180         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
10181         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
10182         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
10183         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
10184         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
10185         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
10186         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
10187         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
10188         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
10189         (fbsd_core_fetch_timeval, fbsd_print_sigset)
10190         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
10191         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
10192         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
10193
10194 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
10195
10196         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
10197         (gnu_xfer_auxv): New function.
10198         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
10199         TARGET_OBJECT_AUXV.
10200
10201 2018-01-08  Yao Qi  <yao.qi@linaro.org>
10202             Simon Marchi  <simon.marchi@ericsson.com>
10203
10204         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
10205         common/selftest.c.
10206         (COMMON_OBS): Remove selftest.o.
10207         * configure.ac: Append selftest-arch.c and common/selftest.c to
10208         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
10209         * configure: Re-generated.
10210         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
10211         GDB_SELF_TEST.
10212         (maintenance_info_selftests): Likewise.
10213
10214 2018-01-08  Xavier Roirand  <roirand@adacore.com>
10215
10216         * ada-valprint.c (val_print_packed_array_elements): Use
10217         proper number of elements when printing an array indexed
10218         by an enumeration type.
10219
10220 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
10221
10222         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
10223         (dw2_get_file_names_reader): Adjust.
10224         (lookup_dwo_signatured_type): Adjust.
10225         (lookup_dwp_signatured_type): Adjust.
10226         (lookup_signatured_type): Adjust.
10227         (create_type_unit_group): Adjust.
10228         (get_type_unit_group): Adjust.
10229         (process_psymtab_comp_unit_reader): Adjust.
10230         (build_type_psymtabs_reader): Adjust.
10231         (scan_partial_symbols): Adjust.
10232         (add_partial_symbol): Adjust.
10233         (add_partial_subprogram): Adjust.
10234         (peek_die_abbrev): Adjust.
10235         (fixup_go_packaging): Adjust.
10236         (process_imported_unit_die): Adjust.
10237         (dwarf2_compute_name): Adjust.
10238         (dwarf2_physname): Adjust.
10239         (read_import_statement): Adjust.
10240         (handle_DW_AT_stmt_list): Adjust.
10241         (read_file_scope): Adjust.
10242         (read_func_scope): Adjust.
10243         (read_lexical_block_scope): Adjust.
10244         (read_call_site_scope): Adjust.
10245         (read_variable): Adjust.
10246         (dwarf2_rnglists_process): Adjust.
10247         (dwarf2_ranges_process): Adjust.
10248         (dwarf2_ranges_read): Adjust.
10249         (dwarf2_get_pc_bounds): Adjust.
10250         (dwarf2_record_block_ranges): Adjust.
10251         (dwarf2_add_field): Adjust.
10252         (dwarf2_add_member_fn): Adjust.
10253         (read_structure_type): Adjust.
10254         (process_structure_scope): Adjust.
10255         (read_enumeration_type): Adjust.
10256         (read_array_type): Adjust.
10257         (mark_common_block_symbol_computed): Adjust.
10258         (read_common_block): Adjust.
10259         (read_namespace_type): Adjust.
10260         (read_namespace): Adjust.
10261         (read_module_type): Adjust.
10262         (read_tag_pointer_type): Adjust.
10263         (read_tag_ptr_to_member_type): Adjust.
10264         (read_tag_string_type): Adjust.
10265         (read_subroutine_type): Adjust.
10266         (read_typedef): Adjust.
10267         (read_base_type): Adjust.
10268         (attr_to_dynamic_prop): Adjust.
10269         (read_subrange_type): Adjust.
10270         (read_unspecified_type): Adjust.
10271         (dwarf2_read_abbrevs): Adjust.
10272         (load_partial_dies): Adjust.
10273         (read_partial_die): Adjust.
10274         (find_partial_die): Adjust.
10275         (guess_partial_die_structure_name): Adjust.
10276         (fixup_partial_die): Adjust.
10277         (read_attribute_value): Adjust.
10278         (read_addr_index): Adjust.
10279         (read_addr_index_from_leb128): Adjust.
10280         (read_str_index): Adjust.
10281         (dwarf2_string_attr): Adjust.
10282         (get_debug_line_section): Adjust.
10283         (dwarf_decode_line_header): Adjust.
10284         (lnp_state_machine::check_line_address): Adjust.
10285         (dwarf_decode_lines_1): Adjust.
10286         (dwarf_decode_lines): Adjust.
10287         (dwarf2_start_symtab): Adjust.
10288         (var_decode_location): Adjust.
10289         (new_symbol_full): Adjust.
10290         (dwarf2_const_value_data): Adjust.
10291         (dwarf2_const_value_attr): Adjust.
10292         (dwarf2_const_value): Adjust.
10293         (die_type): Adjust.
10294         (die_containing_type): Adjust.
10295         (build_error_marker_type): Adjust.
10296         (lookup_die_type): Adjust.
10297         (guess_full_die_structure_name): Adjust.
10298         (anonymous_struct_prefix): Adjust.
10299         (determine_prefix): Adjust.
10300         (dwarf2_name): Adjust.
10301         (follow_die_ref_or_sig): Adjust.
10302         (follow_die_offset): Adjust.
10303         (follow_die_ref): Adjust.
10304         (follow_die_sig_1): Adjust.
10305         (follow_die_sig): Adjust.
10306         (get_signatured_type): Adjust.
10307         (get_DW_AT_signature_type): Adjust.
10308         (decode_locdesc): Adjust.
10309         (dwarf_decode_macros): Adjust.
10310         (cu_debug_loc_section): Adjust.
10311         (fill_in_loclist_baton): Adjust.
10312         (dwarf2_symbol_mark_computed): Adjust.
10313         (init_one_comp_unit): Don't assign
10314         dwarf2_cu::dwarf2_per_objfile.
10315         (set_die_type): Adjust.
10316
10317 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
10318
10319         * dwarf2read.c (struct mapped_debug_names): Add constructor.
10320         <dwarf2_per_objfile>: New field.
10321         (dwarf2_per_objfile): Remove global.
10322         (get_dwarf2_per_objfile): New function.
10323         (set_dwarf2_per_objfile): New function.
10324         (dwarf2_build_psymtabs_hard): Change objfile parameter to
10325         dwarf2_per_objfile.
10326         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10327         (read_abbrev_offset): Likewise.
10328         (read_indirect_string): Likewise.
10329         (read_indirect_line_string): Likewise.
10330         (read_indirect_string_at_offset): Likewise.
10331         (read_indirect_string_from_dwz): Likewise.
10332         (dwarf2_find_containing_comp_unit): Change objfile parameter to
10333         dwarf2_per_objfile.
10334         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10335         (create_all_comp_units): Change objfile parameter to
10336         dwarf2_per_objfile.
10337         (create_all_type_units): Likewise.
10338         (process_queue): Add dwarf2_per_objfile parameter.
10339         (read_and_check_comp_unit_head): Likewise.
10340         (lookup_dwo_unit_in_dwp): Likewise.
10341         (get_dwp_file): Likewise.
10342         (process_cu_includes): Likewise.
10343         (struct free_dwo_file_cleanup_data): New struct.
10344         (dwarf2_has_info): Use get_dwarf2_per_objfile and
10345         set_dwarf2_per_objfile.
10346         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
10347         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
10348         context, adjust calls.
10349         (dw2_instantiate_symtab): Likewise.
10350         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
10351         (dw2_get_cu): Likewise.
10352         (create_cu_from_index_list): Change objfile parameter to
10353         dwarf2_per_objfile.
10354         (create_cus_from_index_list): Get dwarf2_per_objfile from
10355         context, adjust calls.
10356         (create_cus_from_index): Likewise.
10357         (create_signatured_type_table_from_index): Change objfile
10358         parameter to dwarf2_per_objfile.
10359         (create_signatured_type_table_from_debug_names): Change objfile
10360         parameter to dwarf2_per_objfile.
10361         (create_addrmap_from_index): Likewise.
10362         (create_addrmap_from_aranges): Likewise.
10363         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
10364         (dw2_setup): Remove.
10365         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
10366         context.
10367         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
10368         get_dwarf2_per_objfile.
10369         (dw2_forget_cached_source_info): Likewise.
10370         (dw2_map_symtabs_matching_filename): Likewise.
10371         (struct dw2_symtab_iterator) <index>: Remove.
10372         <dwarf2_per_objfile>: New field.
10373         (dw2_symtab_iter_init): Replace index parameter with
10374         dwarf2_per_objfile.
10375         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
10376         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
10377         (dw2_print_stats): Likewise.
10378         (dw2_dump): Likewise.
10379         (dw2_expand_symtabs_for_function): Likewise.
10380         (dw2_expand_all_symtabs): Likewise.
10381         (dw2_expand_symtabs_with_fullname): Likewise.
10382         (dw2_expand_marked_cus): Replace index and objfile parameters
10383         with dwarf2_per_objfile.
10384         (dw_expand_symtabs_matching_file_matcher): Add
10385         dwarf2_per_objfile parameter and adjust calls.
10386         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
10387         adjust calls.
10388         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
10389         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
10390         adjust calls.
10391         (create_cus_from_debug_names_list): Replace objfile parameter
10392         with dwarf2_per_objfile and adjust calls.
10393         (create_cus_from_debug_names): Likewise.
10394         (dwarf2_read_debug_names): Likewise.
10395         (mapped_debug_names::namei_to_name): Adjust call.
10396         (dw2_debug_names_iterator::next): Likewise.
10397         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
10398         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
10399         (dw2_debug_names_dump): Likewise.
10400         (dw2_debug_names_expand_symtabs_for_function): Likewise.
10401         (dw2_debug_names_expand_symtabs_matching): Likewise.
10402         (dwarf2_initialize_objfile): Likewise.
10403         (dwarf2_build_psymtabs): Likewise.
10404         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
10405         this_cu.
10406         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
10407         (read_and_check_comp_unit_head): Likewise.
10408         (read_abbrev_offset): Likewise.
10409         (create_debug_type_hash_table): Likewise.
10410         (create_debug_types_hash_table): Likewise.
10411         (create_all_type_units): Replace objfile parameter with
10412         dwarf2_per_objfile.
10413         (add_type_unit): Add dwarf2_per_objfile parameter.
10414         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
10415         with dwarf2_per_objfile.
10416         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
10417         (lookup_dwp_signatured_type): Likewise.
10418         (lookup_signatured_type): Likewise.
10419         (read_cutu_die_from_dwo): Likewise.
10420         (init_tu_and_read_dwo_dies): Likewise.
10421         (init_cutu_and_read_dies): Likewise.
10422         (init_cutu_and_read_dies_no_follow): Likewise.
10423         (allocate_type_unit_groups_table): Add objfile parameter.
10424         (create_type_unit_group): Use dwarf2_per_objfile from cu.
10425         (get_type_unit_group): Likewise.
10426         (process_psymtab_comp_unit): Update call.
10427         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
10428         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
10429         (print_tu_stats): Likewise.
10430         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
10431         in void* parameter.
10432         (build_type_psymtabs): Change objfile parameter to
10433         dwarf2_per_objfile.
10434         (process_skeletonless_type_unit): Use dwarf2_per_objfile
10435         passed in void* parameter.
10436         (process_skeletonless_type_units): Change objfile parameter to
10437         dwarf2_per_objfile.
10438         (set_partial_user): Likewise.
10439         (dwarf2_build_psymtabs_hard): Likewise.
10440         (read_comp_units_from_section): Likewise.
10441         (create_all_comp_units): Likewise.
10442         (scan_partial_symbols): Update calls.
10443         (add_partial_symbol): Likewise.
10444         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
10445         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
10446         (process_queue): Add dwarf2_per_objfile parameter.
10447         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
10448         (compute_compunit_symtab_includes): Likewise.
10449         (process_cu_includes): Add dwarf2_per_objfile parameter.
10450         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
10451         (process_full_type_unit): Likewise.
10452         (process_imported_unit_die): Update call.
10453         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
10454         (read_file_scope): Likewise.
10455         (allocate_dwo_file_hash_table): Add objfile parameter.
10456         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
10457         (create_cus_hash_table): Likewise.
10458         (create_dwp_hash_table): Likewise.
10459         (create_dwo_unit_in_dwp_v1): Likewise.
10460         (create_dwp_v2_section): Likewise.
10461         (create_dwo_unit_in_dwp_v2): Likewise.
10462         (lookup_dwo_unit_in_dwp): Likewise.
10463         (try_open_dwop_file): Likewise.
10464         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
10465         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
10466         cleanup to include a reference to dwarf2_per_objfile.
10467         (open_dwp_file): Add dwarf2_per_objfile parameter.
10468         (open_and_init_dwp_file): Likewise.
10469         (get_dwp_file): Likewise.
10470         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
10471         (queue_and_load_all_dwo_tus): Update call.
10472         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
10473         data.
10474         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
10475         (dwarf2_ranges_process): Likewise.
10476         (dwarf2_get_pc_bounds): Likewise.
10477         (mark_common_block_symbol_computed): Likewise.
10478         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10479         (dwarf2_read_abbrevs): Update call.
10480         (read_partial_die): Use dwarf2_per_objfile from cu.
10481         (find_partial_die): Likewise.
10482         (fixup_partial_die): Likewise.
10483         (read_attribute_value): Likewise.
10484         (read_indirect_string_at_offset_from): Add objfile parameter.
10485         (read_indirect_string_at_offset): Add dwarf2_per_objfile
10486         parameter.
10487         (read_indirect_string_from_dwz): Add objfile parameter.
10488         (read_indirect_string): Add objfile parameter.
10489         (read_addr_index_1): Add dwarf2_per_objfile parameter.
10490         (read_addr_index): Use dwarf2_per_objfile from cu.
10491         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
10492         call dw2_setup.
10493         (read_str_index): Use dwarf2_per_objfile from cu.
10494         (get_debug_line_section): Likewise.
10495         (read_formatted_entries): Add dwarf2_per_objfile parameter.
10496         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
10497         (new_symbol_full): Use dwarf2_per_objfile from cu.
10498         (build_error_marker_type): Likewise.
10499         (lookup_die_type): Likewise.
10500         (determine_prefix): Likewise.
10501         (follow_die_offset): Likewise.
10502         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
10503         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
10504         (dwarf2_fetch_die_type_sect_off): Likewise.
10505         (dwarf2_get_die_type): Likewise.
10506         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
10507         (get_signatured_type): Likewise.
10508         (get_DW_AT_signature_type): Likewise.
10509         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
10510         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
10511         (cu_debug_loc_section): Likewise.
10512         (fill_in_loclist_baton): Likewise.
10513         (dwarf2_symbol_mark_computed): Likewise.
10514         (dwarf2_find_containing_comp_unit): Change objfile parameter to
10515         dwarf2_per_objfile.
10516         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
10517         parameter.
10518         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10519         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
10520         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
10521         (set_die_type): Use dwarf2_free_objfile from cu.
10522         (get_die_type_at_offset): Likewise.
10523         (dwarf2_per_objfile_free): Don't assign global variable.
10524         (debug_names) <constructor>: Add dwarf2_per_objfile
10525         parameter, update m_debugstrlookup construction.
10526         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
10527         parameter.
10528         <m_dwarf2_per_objfile>: New field.
10529         <lookup>: Use m_dwarf2_per_objfile.
10530         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
10531         (psyms_seen_size): Likewise.
10532         (write_gdbindex): Replace objfile parameter with
10533         dwarf2_per_objfile.
10534         (write_debug_names): Likewise.
10535         (write_psymtabs_to_index): Likewise.
10536         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
10537         calls.
10538
10539 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
10540
10541         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
10542         <dwarf2_per_objfile>: New field.
10543         (struct dwarf2_per_cu_data) <objfile>: Remove.
10544         <dwarf2_per_objfile>: New field.
10545         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
10546         of objfile.
10547         (create_signatured_type_table_from_index): Likewise.
10548         (create_debug_type_hash_table): Likewise.
10549         (fill_in_sig_entry_from_dwo_entry): Likewise.
10550         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
10551         (create_type_unit_group): Assign dwarf2_per_objfile instead of
10552         objfile.
10553         (create_partial_symtab): Access objfile through
10554         dwarf2_per_objfile.
10555         (process_psymtab_comp_unit_reader): Likewise.
10556         (read_comp_units_from_section): Likewise.
10557         (scan_partial_symbols): Likewise.
10558         (add_partial_symbol): Likewise.
10559         (add_partial_subprogram): Likewise.
10560         (peek_die_abbrev): Likewise.
10561         (fixup_go_packaging): Likewise.
10562         (process_full_comp_unit): Likewise.
10563         (process_full_type_unit): Likewise.
10564         (process_imported_unit_die): Likewise.
10565         (dwarf2_compute_name): Likewise.
10566         (dwarf2_physname): Likewise.
10567         (read_import_statement): Likewise.
10568         (create_cus_hash_table): Assign dwarf2_physname instead of
10569         objfile.
10570         (read_func_scope): Access objfile through dwarf2_per_objfile.
10571         (read_lexical_block_scope): Likewise.
10572         (read_call_site_scope): Likewise.
10573         (read_variable): Likewise.
10574         (dwarf2_rnglists_process): Likewise.
10575         (dwarf2_ranges_process): Likewise.
10576         (dwarf2_ranges_read): Likewise.
10577         (dwarf2_record_block_ranges): Likewise.
10578         (dwarf2_add_field): Likewise.
10579         (dwarf2_add_member_fn): Likewise.
10580         (read_structure_type): Likewise.
10581         (process_structure_scope): Likewise.
10582         (read_enumeration_type): Likewise.
10583         (read_array_type): Likewise.
10584         (read_common_block): Likewise.
10585         (read_namespace_type): Likewise.
10586         (read_namespace): Likewise.
10587         (read_module_type): Likewise.
10588         (read_tag_pointer_type): Likewise.
10589         (read_tag_ptr_to_member_type): Likewise.
10590         (read_tag_string_type): Likewise.
10591         (read_subroutine_type): Likewise.
10592         (read_typedef): Likewise.
10593         (read_base_type): Likewise.
10594         (attr_to_dynamic_prop): Likewise.
10595         (read_subrange_type): Likewise.
10596         (read_unspecified_type): Likewise.
10597         (load_partial_dies): Likewise.
10598         (read_partial_die): Likewise.
10599         (find_partial_die): Likewise.
10600         (guess_partial_die_structure_name): Likewise.
10601         (fixup_partial_die): Likewise.
10602         (read_attribute_value): Likewise.
10603         (read_addr_index_from_leb128): Likewise.
10604         (dwarf2_read_addr_index): Likewise.
10605         (dwarf2_string_attr): Likewise.
10606         (lnp_state_machine::check_line_address): Likewise.
10607         (dwarf_decode_lines_1): Likewise.
10608         (dwarf_decode_lines): Likewise.
10609         (dwarf2_start_symtab): Likewise.
10610         (var_decode_location): Likewise.
10611         (new_symbol_full): Likewise.
10612         (dwarf2_const_value_data): Likewise.
10613         (dwarf2_const_value_attr): Likewise.
10614         (dwarf2_const_value): Likewise.
10615         (die_type): Likewise.
10616         (die_containing_type): Likewise.
10617         (lookup_die_type): Likewise.
10618         (guess_full_die_structure_name): Likewise.
10619         (anonymous_struct_prefix): Likewise.
10620         (dwarf2_name): Likewise.
10621         (follow_die_ref_or_sig): Likewise.
10622         (follow_die_offset): Likewise.
10623         (follow_die_ref): Likewise.
10624         (dwarf2_fetch_die_loc_sect_off): Likewise.
10625         (dwarf2_fetch_constant_bytes): Likewise.
10626         (dwarf2_fetch_die_type_sect_off): Likewise.
10627         (dwarf2_get_die_type): Likewise.
10628         (follow_die_sig): Likewise.
10629         (decode_locdesc): Likewise.
10630         (dwarf2_per_cu_objfile): Likewise.
10631         (dwarf2_per_cu_text_offset): Likewise.
10632         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
10633         objfile.
10634         (set_die_type): Access objfile through
10635         dwarf2_per_objfile.
10636
10637 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
10638
10639         * valprint.c (converted_character_d): Remove typedef.
10640         (DEF_VEC_O (converted_character_d)): Remove.
10641         (count_next_character): Use std::vector.
10642         (print_converted_chars_to_obstack): Likewise.
10643         (generic_printstr): Likewise.
10644
10645 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
10646
10647         * xml-support.h (struct gdb_xml_value): Add constructor.
10648         <value>: Change type to unique_xmalloc_ptr.
10649         (gdb_xml_value_s): Remove typedef.
10650         (DEF_VEC_O (gdb_xml_value_s)): Remove.
10651         (gdb_xml_element_start_handler): Change parameter type to
10652         std::vector.
10653         (xml_find_attribute): Likewise.
10654         * xml-support.c (xml_find_attribute): Change parameter type to
10655         std::vector and adjust.
10656         (gdb_xml_values_cleanup): Remove.
10657         (gdb_xml_parser::start_element): Adjust to std::vector.
10658         (xinclude_start_include): Change paraeter type to std::vector
10659         and adjust.
10660         * btrace.c (check_xml_btrace_version): Likewise.
10661         (parse_xml_btrace_block): Likewise.
10662         (parse_xml_btrace_pt_config_cpu): Likewise.
10663         (parse_xml_btrace_pt): Likewise.
10664         (parse_xml_btrace_conf_bts): Likewise.
10665         (parse_xml_btrace_conf_pt): Likewise.
10666         * memory-map.c (memory_map_start_memory): Likewise.
10667         (memory_map_start_property): Likewise.
10668         * osdata.c (osdata_start_osdata): Likewise.
10669         (osdata_start_item): Likewise.
10670         (osdata_start_column): Likewise.
10671         * remote.c (start_thread): Likewise.
10672         * solib-aix.c (library_list_start_library): Likewise.
10673         (library_list_start_list): Likewise.
10674         * solib-svr4.c (library_list_start_library): Likewise.
10675         (svr4_library_list_start_list): Likewise.
10676         * solib-target.c (library_list_start_segment): Likewise.
10677         (library_list_start_section): Likewise.
10678         (library_list_start_library): Likewise.
10679         (library_list_start_list): Likewise.
10680         * tracepoint.c (traceframe_info_start_memory): Likewise.
10681         (traceframe_info_start_tvar): Likewise.
10682         * xml-syscall.c (syscall_start_syscall): Likewise.
10683         * xml-tdesc.c (tdesc_start_target): Likewise.
10684         (tdesc_start_feature): Likewise.
10685         (tdesc_start_reg): Likewise.
10686         (tdesc_start_union): Likewise.
10687         (tdesc_start_struct): Likewise.
10688         (tdesc_start_flags): Likewise.
10689         (tdesc_start_enum): Likewise.
10690         (tdesc_start_field): Likewise.
10691         (tdesc_start_enum_value): Likewise.
10692         (tdesc_start_vector): Likewise.
10693
10694 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
10695
10696         * extension.h (struct xmethod_worker) <clone>: Remove.
10697         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
10698         Remove.
10699         (python_xmethod_worker::clone): Remove.
10700         * valops.c (find_overload_match): Use std::move instead of
10701         clone.
10702
10703 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
10704
10705         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
10706         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
10707         <free_xmethod_worker_data>: Remove.
10708         <get_matching_xmethod_workers>: Chance VEC to std::vector.
10709         <get_xmethod_arg_types>: Remove.
10710         <get_xmethod_result_type>: Remove.
10711         <invoke_xmethod>: Remove.
10712         * extension.c (new_xmethod_worker): Remove.
10713         (clone_xmethod_worker): Remove.
10714         (get_matching_xmethod_workers): Return void, pass std::vector by
10715         pointer.
10716         (get_xmethod_arg_types): Rename to...
10717         (xmethod_worker::get_arg_types): ... this, and adjust.
10718         (get_xmethod_result_type): Rename to...
10719         (xmethod_worker::get_result_type): ... this, and adjust.
10720         (invoke_xmethod): Remove.
10721         (free_xmethod_worker): Remove.
10722         (free_xmethod_worker_vec): Remove.
10723         * extension.h (enum ext_lang_rc): Move here from
10724         extension-priv.h.
10725         (struct xmethod_worker): Add constructor and destructor.
10726         <data>: Remove.
10727         <value>: Remove.
10728         <invoke, clone, do_get_result_type, do_get_arg_types>: New
10729         virtual pure methods.
10730         <get_arg_types, get_result_type>: New methods.
10731         (xmethod_worker_ptr): Remove typedef.
10732         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
10733         (xmethod_worker_vec): Remove typedef.
10734         (xmethod_worker_up): New typedef.
10735         (invoke_xmethod): Remove.
10736         (clone_xmethod_worker): Remove.
10737         (free_xmethod_worker): Remove.
10738         (free_xmethod_worker_vec): Remove.
10739         (get_xmethod_arg_types): Remove.
10740         (get_xmethod_result_type): Remove.
10741         * valops.c (find_method_list): Use std::vector, don't use
10742         intermediate vector.
10743         (value_find_oload_method_list): Use std::vector.
10744         (find_overload_match): Use std::vector.
10745         (find_oload_champ): Use std::vector.
10746         * value.c (value_free): Use operator delete.
10747         (value_of_xmethod): Rename to...
10748         (value_from_xmethod): ... this.  Don't assign
10749         xmethod_worker::value, take rvalue-reference.
10750         (result_type_of_xmethod): Adjust.
10751         (call_xmethod): Adjust.
10752         * value.h: Include extension.h.
10753         (struct xmethod_worker): Don't forward-declare.
10754         (value_of_xmethod): Rename to...
10755         (value_from_xmethod): ... this, take rvalue-reference.
10756         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
10757         (struct python_xmethod_worker): ... this, add constructor and
10758         destructor.
10759         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
10760         (gdbpy_free_xmethod_worker_data): Rename to...
10761         (python_xmethod_worker::~python_xmethod_worker): ... this and
10762         adjust.
10763         (gdbpy_clone_xmethod_worker_data): Rename to...
10764         (python_xmethod_worker::clone): ... this and adjust.
10765         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
10766         temporary vector.
10767         (gdbpy_get_xmethod_arg_types): Rename to...
10768         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
10769         (gdbpy_get_xmethod_result_type): Rename to...
10770         (python_xmethod_worker::do_get_result_type): ... this and
10771         adjust.
10772         (gdbpy_invoke_xmethod): Rename to...
10773         (python_xmethod_worker::invoke): ... this and adjust.
10774         (new_python_xmethod_worker): Rename to...
10775         (python_xmethod_worker::python_xmethod_worker): ... this and
10776         adjust.
10777         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
10778         Remove.
10779         (gdbpy_free_xmethod_worker_data): Remove.
10780         (gdbpy_get_matching_xmethod_workers): Use std::vector.
10781         (gdbpy_get_xmethod_arg_types): Remove.
10782         (gdbpy_get_xmethod_result_type): Remove.
10783         (gdbpy_invoke_xmethod): Remove.
10784         * python/python.c (python_extension_ops): Remove obsolete
10785         callbacks.
10786
10787 2018-01-05  Pedro Alves  <palves@redhat.com>
10788
10789         PR gdb/18653
10790         * common/signals-state-save-restore.c
10791         (save_original_signals_state): New parameter 'quiet'.  Warn if we
10792         find a custom handler preinstalled, instead of internal erroring.
10793         But only warn if !quiet.
10794         * common/signals-state-save-restore.h
10795         (save_original_signals_state): New parameter 'quiet'.
10796         * main.c (captured_main_1): Move save_original_signals_state call
10797         after option handling, and pass QUIET.
10798
10799 2018-01-05  Pedro Alves  <palves@redhat.com>
10800
10801         * spu-tdep.c (spu_catch_start): Pass
10802         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
10803
10804 2018-01-05  Pedro Alves  <palves@redhat.com>
10805
10806         PR gdb/22670
10807         * ada-lang.c (literal_symbol_name_matcher): New function.
10808         (ada_get_symbol_name_matcher): Use it for
10809         symbol_name_match_type::SEARCH_NAME.
10810         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
10811         it down instead of assuming symbol_name_match_type::FULL.
10812         * block.h (block_lookup_symbol): New parameter 'match_type'.
10813         * c-valprint.c (print_unpacked_pointer): Use
10814         lookup_symbol_search_name instead of lookup_symbol.
10815         * compile/compile-object-load.c (get_out_value_type): Pass down
10816         symbol_name_match_type::SEARCH_NAME.
10817         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
10818         symbol_name_match_type::FULL.
10819         * cp-support.c (cp_get_symbol_name_matcher): Handle
10820         symbol_name_match_type::SEARCH_NAME.
10821         * infrun.c (insert_exception_resume_breakpoint): Use
10822         lookup_symbol_search_name.
10823         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
10824         * psymtab.c (maintenance_check_psymtabs): Use
10825         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
10826         * stack.c (print_frame_args): Use lookup_symbol_search_name and
10827         SYMBOL_SEARCH_NAME.
10828         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
10829         if symbol_name_match_type::SEARCH_NAME.
10830         (lookup_symbol_in_language): Pass down
10831         symbol_name_match_type::FULL.
10832         (lookup_symbol_search_name): New.
10833         (lookup_language_this): Pass down
10834         symbol_name_match_type::SEARCH_NAME.
10835         (lookup_symbol_aux, lookup_local_symbol): New parameter
10836         'match_type'.  Pass it down.
10837         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
10838         (lookup_symbol_search_name): New declaration.
10839         (lookup_symbol_in_block): New 'match_type' parameter.
10840
10841 2018-01-05  Pedro Alves  <palves@redhat.com>
10842
10843         PR gdb/22670
10844         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
10845         ada_lookup_symbol.
10846         (ada_lookup_symbol): Reimplement in terms of
10847         ada_lookup_symbol_list, bits factored out from
10848         ada_lookup_encoded_symbol.
10849
10850 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
10851
10852         * ada-exp.y (write_object_renaming): When subscripting an array
10853         using a symbol as the index, pass the block in call to
10854         ada_lookup_encoded_symbol when looking that symbol up.
10855
10856 2018-01-05  Jerome Guitton  <guitton@adacore.com>
10857
10858         * ada-lang.c (ada_array_length): Use ada_index_type instead of
10859         TYPE_INDEX_TYPE.
10860
10861 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
10862
10863         * ada-lang.c (ada_to_fixed_value_create): Add handling of
10864         the case where VALUE_LVAL (val0) is not lval_memory.
10865
10866 2018-01-05  Xavier Roirand  <roirand@adacore.com>
10867
10868         * ada-valprint.c (print_optional_low_bound): Handle
10869         character-indexed array printing like boolean-indexed array
10870         printing.
10871
10872 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
10873
10874         * NEWS: Create a new section for the next release branch.
10875         Rename the section of the current branch, now that it has
10876         been cut.
10877
10878 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
10879
10880         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
10881         * version.in: Bump version to 8.1.50.DATE-git.
10882
10883 2018-01-03  Xavier Roirand  <roirand@adacore.com>
10884
10885         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
10886         Add field.
10887         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
10888         Add field.
10889         (default_exception_support_info) <catch_handlers_sym>: Add field.
10890         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
10891         (ada_exception_name_addr_1): Add "catch handlers" handling.
10892         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
10893         Update all callers.
10894         (create_excep_cond_exprs) <ex>: Add parameter.
10895         (re_set_exception): Update create_excep_cond_exprs call.
10896         (print_it_exception, print_one_exception, print_mention_exception)
10897         (print_recreate_exception): Add "catch handler" handling.
10898         (allocate_location_catch_handlers, re_set_catch_handlers)
10899         (check_status_catch_handlers, print_it_catch_handlers)
10900         (print_one_catch_handlers, print_mention_catch_handlers)
10901         (print_recreate_catch_handlers): New function.
10902         (catch_handlers_breakpoint_ops): New variable.
10903         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
10904         Add parameter.  Add "catch handler" handling.
10905         (ada_exception_sym_name, ada_exception_breakpoint_ops):
10906         Add "catch handler" handling.
10907         (ada_exception_catchpoint_cond_string): Add "catch handler"
10908         handling.
10909         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
10910         call.
10911         (catch_ada_handlers_command): New function.
10912         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
10913         operations structure.
10914         (_initialize_ada_language): Add "catch handlers" command entry.
10915         * NEWS: Document "catch handlers" feature.
10916
10917 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
10918
10919         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
10920         account when creating the array type of the slice.
10921         (ada_value_slice): Likewise.
10922
10923 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
10924
10925         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
10926         New enum value.
10927         (create_array_type_with_stride): Add byte_stride_prop parameter.
10928         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
10929         New parameter.  Update all callers in this file.
10930         (array_type_has_dynamic_stride): New function.
10931         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
10932         of arrays with dynamic byte strides.
10933         * dwarf2read.c (read_array_type): Add support for dynamic
10934         DW_AT_byte_stride attributes.
10935
10936 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
10937
10938         * dwarf2read.c (read_unspecified_type): Treat
10939         DW_TAG_enumeration_type DIEs from Ada units as stubs.
10940
10941 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
10942
10943         Update copyright year range in all GDB files.
10944
10945 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
10946
10947         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
10948         and gdb/testsuite/gdb.base/step-line.c.
10949
10950 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
10951
10952         * copyright.py (main): Dump the contents of
10953         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
10954         even if BY_HAND is empty.
10955
10956 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
10957
10958         * top.c (print_gdb_version): Update Copyright year in version
10959         message.
10960
10961 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
10962
10963         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
10964
10965 For older changes see ChangeLog-2017.
10966 \f
10967 Local Variables:
10968 mode: change-log
10969 left-margin: 8
10970 fill-column: 74
10971 version-control: never
10972 coding: utf-8
10973 End: