Merge/shared string_printf and string_vprintf unit tests
[external/binutils.git] / gdb / ChangeLog
1 2017-10-30  Pedro Alves  <palves@redhat.com>
2
3         * unittests/common-utils-selftests.c (format_func): New typedef.
4         (string_printf_tests, string_vprintf_tests): Tests factored out
5         and merged to ...
6         (test_format_func): ... this new function.
7         (string_printf_tests, string_vprintf_tests): Reimplement on top of
8         test_format_func.
9
10 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
11
12         * darwin-nat.c: Remove include of gdb.h.
13
14 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
15
16         * xtensa-xtregs.c: Fix formatting issues.
17
18 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
19
20         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
21
22 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
23
24         PR python/21213
25         * python/py-infthread.c (thpy_get_inferior): Increment reference
26         of inferior before returning it.
27
28 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
29
30         * unittests/common-utils-selftests.c (format): Add
31         ATTRIBUTE_PRINTF.
32
33 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
34
35         * xml-syscall.c (struct syscall_desc): Add constructor.
36         <name>: Change type to std::string.
37         (syscall_desc_up): New typedef.
38         (syscall_desc_p): Remove typeder.
39         (DEF_VEC_P(syscall_desc_p)): Remove.
40         (struct syscall_group_desc): Add constructor.
41         <name>: Change type to std::string.
42         <syscalls>: Change type to std::vector.
43         (syscall_group_desc_up): New typedef.
44         (syscall_group_desc_p): Remove typedef.
45         (DEF_VEC_P(syscall_group_desc_p)): Remove.
46         (struct syscalls_info) <syscalls>: Change type to std::vector of
47         unique_ptr.
48         <groups>: Likewise.
49         <my_gdb_datadir>: Change type to std::string.
50         (syscalls_info_up): New typedef.
51         (allocate_syscalls_info): Remove.
52         (syscalls_info_free_syscalls_desc): Remove.
53         (syscalls_info_free_syscall_group_desc): Remove.
54         (free_syscalls_info): Remove.
55         (make_cleanup_free_syscalls_info): Remove.
56         (syscall_group_create_syscall_group_desc): Adjust.
57         (syscall_group_add_syscall): Adjust.
58         (syscall_create_syscall_desc): Adjust.
59         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
60         (init_syscalls_info): Adjust.
61         (syscall_group_get_group_by_name): Adjust.
62         (xml_get_syscall_number): Adjust.
63         (xml_get_syscall_name): Adjust.
64         (xml_list_of_syscalls): Adjust.
65         (xml_list_syscalls_by_group): Adjust.
66         (xml_list_of_groups): Adjust.
67
68 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
69
70         * probe.h: Don't include gdb_vecs.h.
71         (DEF_VEC_P (probe_p)): Remove.
72         (find_probes_in_objfile): Return an std::vector.
73         * probe.c (find_probes_in_objfile): Likewise.
74         * breakpoint.c (breakpoint_objfile_data)
75         <longjmp_probes>: Change type to std::vector.
76         <exception_probes>: Likewise.
77         (free_breakpoint_probes): Don't manually free vectors.
78         (create_longjmp_master_breakpoint): Adjust.
79         (create_exception_master_breakpoint): Adjust.
80         * solib-svr4.c (svr4_create_probe_breakpoints): Change
81         parameter type, adjust.
82         (svr4_create_solib_event_breakpoints): Adjust.
83
84 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
85
86         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
87         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
88         with new.
89         (free_breakpoint_probes): Rename to ...
90         (free_breakpoint_objfile_data): ... this, and call delete on
91         bp_objfile_data..
92
93 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
94
95         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
96         (loaded_script_ptr): Remove typedef.
97         (DEF_VEC_P (loaded_script_ptr)): Remove.
98         (struct collect_matching_scripts_data): Add constructor.
99         <scripts_p>: Change type to (pointer to) std::vector.
100         (collect_matching_scripts_data): Adjust.
101         (sort_scripts_by_name): Make suitable for std::sort.
102         (print_scripts): Don't sort vector, adjust to std::vector.
103         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
104
105 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
106
107         * symfile.c (filename_language): Make struct, not typedef.  Add
108         constructor.
109         <ext>: Change type to std::string.
110         (DEF_VEC_O (filename_language)): Remove.
111         (filename_language_table): Change type to std::vector.
112         (add_filename_language): Adjust.
113         (set_ext_lang_command): Adjust.
114         (info_ext_lang_command): Adjust.
115         (deduce_language_from_filename): Adjust.
116         (class scoped_restore_filename_language_table): Remove.
117         (test_filename_language): Use scoped_restore.
118         (test_set_ext_lang_command): Use scoped_restore, adjust to
119         std::vector change.
120
121 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
122
123         * symfile.c: Include selftest.h.
124         (class scoped_restore_filename_language_table): New.
125         (test_filename_language): New test.
126         (test_set_ext_lang_command): New test.
127         (_initialize_symfile): Register tests.
128
129 2017-10-27  Keith Seitz  <keiths@redhat.com>
130
131         * breakpoint.c (print_breakpoint_location): Use the symbol saved
132         in the bp_location, falling back to find_pc_sect_function when
133         needed.
134         (add_location_to_breakpoint): Save sal->symbol.
135         * breakpoint.h (struct bp_location) <symbol>: New field.
136         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
137         * symtab.h (struct symtab_and_line) <symbol>: New field.
138
139 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
140
141         PR gdb/13669
142         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
143         to rewind obstack.
144
145 2017-10-26  Pedro Alves  <palves@redhat.com>
146
147         * remote.c (remote_async_terminal_ours_p): Delete.
148         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
149         Remove references to 'remote_async_terminal_ours_p'.
150
151 2017-10-26  Yao Qi  <yao.qi@linaro.org>
152
153         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
154
155 2017-10-26  Yao Qi  <yao.qi@linaro.org>
156
157         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
158         aspace const.
159         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
160         Likewise.
161         * breakpoint.c (bpstat_check_location): Remove cast.
162         (breakpoint_hit_catch_fork): Make aspce const.
163         (breakpoint_hit_catch_solib): Likewise.
164         (breakpoint_hit_catch_exec): Likewise.
165         (breakpoint_hit_ranged_breakpoint): Likewise.
166         (breakpoint_hit_watchpoint): Likewise.
167         (base_breakpoint_breakpoint_hit): Likewise.
168         (bkpt_breakpoint_hit): Likewise.
169         (dprintf_breakpoint_hit): Likewise.
170         (tracepoint_breakpoint_hit): Likewise.
171         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
172
173 2017-10-26  Yao Qi  <yao.qi@linaro.org>
174
175         * breakpoint.c (breakpoint_location_address_match): Change
176         "struct address_space *" to "const address_space".
177         (breakpoint_location_address_range_overlap): Likewise.
178         (breakpoint_here_p): Likewise.
179         (breakpoint_in_range_p): Likewise.
180         (moribund_breakpoint_here_p): Likewise.
181         (bp_location_inserted_here_p): Likewise.
182         (software_breakpoint_inserted_here_p): Likewise.
183         (hardware_breakpoint_inserted_here_p): Likewise.
184         (hardware_watchpoint_inserted_in_range): Likewise.
185         (bpstat_check_location): Likewise.
186         (bpstat_stop_status): Likewise.
187         (breakpoint_address_match): Likewise.
188         (breakpoint_address_match_range): Likewise.
189         (breakpoint_location_address_match): Likewise.
190         (breakpoint_location_address_range_overlap): Likewise.
191         (insert_single_step_breakpoint): Likewise.
192         (breakpoint_has_location_inserted_here): Likewise.
193         (single_step_breakpoint_inserted_here_p): Likewise.
194         (pc_at_non_inline_function): Likewise.
195         * breakpoint.h (bpstat_stop_status): Update declaration.
196         (breakpoint_here_p): Likewise.
197         (breakpoint_in_range_p): Likewise.
198         (moribund_breakpoint_here_p): Likewise.
199         (breakpoint_inserted_here_p): Likewise.
200         (software_breakpoint_inserted_here_p): Likewise.
201         (hardware_breakpoint_inserted_here_p): Likewise.
202         (breakpoint_has_location_inserted_here): Likewise.
203         (single_step_breakpoint_inserted_here_p): Likewise.
204         (hardware_watchpoint_inserted_in_range): Likewise.
205         (breakpoint_address_match): Likewise.
206         (insert_single_step_breakpoint): Likewise.
207         (pc_at_non_inline_function): Likewise.
208         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
209         * record.c (record_check_stopped_by_breakpoint): Likewise.
210         * record.h (record_check_stopped_by_breakpoint): Likewise.
211         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
212
213 2017-10-25  Yao Qi  <yao.qi@linaro.org>
214
215         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
216         regcache->arch () instead get_regcache_arch.
217         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
218         Likewise.
219         (aarch64_fbsd_store_inferior_registers): Likewise.
220         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
221         (store_gregs_to_thread): Likewise.
222         (fetch_fpregs_from_thread): Likewise.
223         (store_fpregs_to_thread): Likewise.
224         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
225         (aarch64_store_return_value): Likewise.
226         (aarch64_software_single_step): Likewise.
227         * aix-thread.c (aix_thread_wait): Likewise.
228         (supply_reg32): Likewise.
229         (supply_sprs64): Likewise.
230         (supply_sprs32): Likewise.
231         (fill_gprs64): Likewise.
232         (fill_gprs32): Likewise.
233         (fill_sprs64): Likewise.
234         (fill_sprs32): Likewise.
235         (store_regs_user_thread): Likewise.
236         (store_regs_kernel_thread): Likewise.
237         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
238         (alphabsd_store_inferior_registers): Likewise.
239         * alpha-tdep.c (alpha_extract_return_value): Likewise.
240         (alpha_store_return_value): Likewise.
241         (alpha_deal_with_atomic_sequence): Likewise.
242         (alpha_next_pc): Likewise.
243         (alpha_software_single_step): Likewise.
244         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
245         (amd64bsd_store_inferior_registers): Likewise.
246         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
247         Likewise.
248         (amd64_linux_store_inferior_registers): Likewise.
249         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
250         (amd64_collect_native_gregset): Likewise.
251         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
252         (amd64obsd_collect_uthread): Likewise.
253         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
254         (amd64_collect_fpregset): Likewise.
255         (amd64_supply_fxsave): Likewise.
256         (amd64_supply_xsave): Likewise.
257         (amd64_collect_fxsave): Likewise.
258         (amd64_collect_xsave): Likewise.
259         * arc-tdep.c (arc_write_pc): Likewise.
260         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
261         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
262         (arm_fbsd_store_inferior_registers): Likewise.
263         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
264         (store_vfp_regs): Likewise.
265         (arm_linux_fetch_inferior_registers): Likewise.
266         (arm_linux_store_inferior_registers): Likewise.
267         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
268         (arm_linux_sigreturn_next_pc): Likewise.
269         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
270         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
271         (fetch_register): Likewise.
272         (store_register): Likewise.
273         * arm-tdep.c (arm_is_thumb): Likewise.
274         (displaced_in_arm_mode): Likewise.
275         (bx_write_pc): Likewise.
276         (arm_get_next_pcs_addr_bits_remove): Likewise.
277         (arm_software_single_step): Likewise.
278         (arm_extract_return_value): Likewise.
279         (arm_store_return_value): Likewise.
280         (arm_write_pc): Likewise.
281         * bfin-tdep.c (bfin_extract_return_value): Likewise.
282         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
283         (bsd_uthread_store_registers): Likewise.
284         * core-regset.c (fetch_core_registers): Likewise.
285         * corelow.c (get_core_registers): Likewise.
286         * cris-tdep.c (cris_store_return_value): Likewise.
287         (cris_extract_return_value): Likewise.
288         (find_step_target): Likewise.
289         (find_step_target): Likewise.
290         (cris_software_single_step): Likewise.
291         * ctf.c (ctf_fetch_registers): Likewise.
292         * darwin-nat.c (cancel_breakpoint): Likewise.
293         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
294         * frv-tdep.c (frv_extract_return_value): Likewise.
295         * ft32-tdep.c (ft32_store_return_value): Likewise.
296         (ft32_extract_return_value): Likewise.
297         * go32-nat.c (fetch_register): Likewise.
298         (go32_fetch_registers): Likewise.
299         (go32_store_registers): Likewise.
300         (store_register): Likewise.
301         * h8300-tdep.c (h8300_extract_return_value): Likewise.
302         (h8300_store_return_value): Likewise.
303         * hppa-linux-nat.c (fetch_register): Likewise.
304         (store_register): Likewise.
305         (hppa_linux_fetch_inferior_registers): Likewise.
306         (hppa_linux_store_inferior_registers): Likewise.
307         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
308         (i386_darwin_store_inferior_registers): Likewise.
309         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
310         (gnu_store_registers): Likewise.
311         * i386-linux-nat.c (fetch_register): Likewise.
312         (store_register): Likewise.
313         (supply_gregset): Likewise.
314         (fill_gregset): Likewise.
315         (i386_linux_fetch_inferior_registers): Likewise.
316         (i386_linux_store_inferior_registers): Likewise.
317         (i386_linux_resume): Likewise.
318         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
319         Likewise.
320         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
321         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
322         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
323         (i386obsd_collect_uthread): Likewise.
324         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
325         (i386_supply_gregset): Likewise.
326         (i386_collect_gregset): Likewise.
327         (i386_supply_fpregset): Likewise.
328         (i386_collect_fpregset): Likewise.
329         (i386_mpx_bd_base): Likewise.
330         * i386-v4-nat.c (supply_fpregset): Likewise.
331         (fill_fpregset): Likewise.
332         * i387-tdep.c (i387_supply_fsave): Likewise.
333         (i387_collect_fsave): Likewise.
334         (i387_supply_fxsave): Likewise.
335         (i387_collect_fxsave): Likewise.
336         (i387_supply_xsave): Likewise.
337         (i387_collect_xsave): Likewise.
338         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
339         (ia64_linux_store_registers): Likewise.
340         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
341         (ia64_extract_return_value): Likewise.
342         (ia64_store_return_value): Likewise.
343         (find_func_descr): Likewise.
344         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
345         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
346         (inf_ptrace_store_registers): Likewise.
347         * infrun.c (use_displaced_stepping): Likewise.
348         (displaced_step_prepare_throw): Likewise.
349         (resume): Likewise.
350         (proceed): Likewise.
351         (do_target_wait): Likewise.
352         (adjust_pc_after_break): Likewise.
353         (handle_inferior_event_1): Likewise.
354         (handle_signal_stop): Likewise.
355         (save_infcall_suspend_state): Likewise.
356         (restore_infcall_suspend_state): Likewise.
357         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
358         * jit.c (jit_frame_prev_register): Likewise.
359         * linux-nat.c (save_stop_reason): Likewise.
360         (linux_nat_wait_1): Likewise.
361         (resume_stopped_resumed_lwps): Likewise.
362         * linux-record.c (record_linux_sockaddr): Likewise.
363         (record_linux_msghdr): Likewise.
364         (record_linux_system_call): Likewise.
365         * linux-tdep.c (linux_collect_thread_registers): Likewise.
366         * lm32-tdep.c (lm32_extract_return_value): Likewise.
367         (lm32_store_return_value): Likewise.
368         * m32c-tdep.c (m32c_read_flg): Likewise.
369         (m32c_pseudo_register_read): Likewise.
370         (m32c_pseudo_register_write): Likewise.
371         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
372         (m32r_linux_collect_gregset): Likewise.
373         * m32r-tdep.c (m32r_store_return_value): Likewise.
374         (m32r_extract_return_value): Likewise.
375         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
376         (m68kbsd_collect_fpregset): Likewise.
377         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
378         * m68k-linux-nat.c (fetch_register): Likewise.
379         (old_fetch_inferior_registers): Likewise.
380         (old_store_inferior_registers): Likewise.
381         (store_regs): Likewise.
382         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
383         (m68k_svr4_store_return_value): Likewise.
384         * m88k-tdep.c (m88k_store_arguments): Likewise.
385         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
386         (mi_cmd_data_write_register_values): Likewise.
387         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
388         (mips_fbsd_store_inferior_registers): Likewise.
389         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
390         (mips_fbsd_supply_gregs): Likewise.
391         (mips_fbsd_collect_fpregs): Likewise.
392         (mips_fbsd_collect_gregs): Likewise.
393         (mips_fbsd_supply_fpregset): Likewise.
394         (mips_fbsd_collect_fpregset): Likewise.
395         (mips_fbsd_supply_gregset): Likewise.
396         (mips_fbsd_collect_gregset): Likewise.
397         * mips-linux-nat.c (supply_gregset): Likewise.
398         (fill_gregset): Likewise.
399         (supply_fpregset): Likewise.
400         (fill_fpregset): Likewise.
401         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
402         (mips_fill_gregset): Likewise.
403         (mips_supply_fpregset): Likewise.
404         (mips_fill_fpregset): Likewise.
405         (mips64_supply_gregset): Likewise.
406         (micromips_linux_sigframe_validate): Likewise.
407         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
408         (mipsnbsd_fetch_inferior_registers): Likewise.
409         (mipsnbsd_store_inferior_registers): Likewise.
410         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
411         (mipsnbsd_supply_gregset): Likewise.
412         (mipsnbsd_iterate_over_regset_sections): Likewise.
413         (mipsnbsd_supply_reg): Likewise.
414         (mipsnbsd_supply_fpreg): Likewise.
415         * mips-tdep.c (mips_in_frame_stub): Likewise.
416         (mips_dummy_id): Likewise.
417         (is_octeon_bbit_op): Likewise.
418         (micromips_bc1_pc): Likewise.
419         (extended_mips16_next_pc): Likewise.
420         (mips16_next_pc): Likewise.
421         (deal_with_atomic_sequence): Likewise.
422         * moxie-tdep.c (moxie_process_readu): Likewise.
423         * nios2-tdep.c (nios2_get_next_pc): Likewise.
424         * nto-procfs.c (procfs_store_registers): Likewise.
425         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
426         (ppcfbsd_store_inferior_registers): Likewise.
427         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
428         (fetch_altivec_register): Likewise.
429         (get_spe_registers): Likewise.
430         (fetch_spe_register): Likewise.
431         (fetch_altivec_registers): Likewise.
432         (fetch_all_gp_regs): Likewise.
433         (fetch_all_fp_regs): Likewise.
434         (store_vsx_register): Likewise.
435         (store_altivec_register): Likewise.
436         (set_spe_registers): Likewise.
437         (store_spe_register): Likewise.
438         (store_altivec_registers): Likewise.
439         (store_all_gp_regs): Likewise.
440         (store_all_fp_regs): Likewise.
441         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
442         (ppc_linux_collect_gregset): Likewise.
443         (ppc_canonicalize_syscall): Likewise.
444         (ppc_linux_record_signal): Likewise.
445         (ppu2spu_prev_register): Likewise.
446         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
447         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
448         (ppcobsd_store_registers): Likewise.
449         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
450         Likewise.
451         (ppc_ravenscar_generic_store_registers): Likewise.
452         * procfs.c (procfs_fetch_registers): Likewise.
453         (procfs_store_registers): Likewise.
454         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
455         (ravenscar_store_registers): Likewise.
456         (ravenscar_prepare_to_store): Likewise.
457         * record-btrace.c (record_btrace_fetch_registers): Likewise.
458         * record-full.c (record_full_wait_1): Likewise.
459         (record_full_registers_change): Likewise.
460         (record_full_store_registers): Likewise.
461         (record_full_core_fetch_registers): Likewise.
462         (record_full_save): Likewise.
463         (record_full_goto_insn): Likewise.
464         * regcache.c (regcache_register_size): Likewise.
465         (get_regcache_arch): Remove.
466         (regcache_read_pc): Likewise.
467         * regcache.h (get_regcache_arch): Remove.
468         * remote-sim.c (gdbsim_fetch_register): Likewise.
469         (gdbsim_store_register): Likewise.
470         * remote.c (fetch_register_using_p): Likewise.
471         (send_g_packet): Likewise.
472         (remote_prepare_to_store): Likewise.
473         (store_registers_using_G): Likewise.
474         * reverse.c (save_bookmark_command): Likewise.
475         (goto_bookmark_command): Likewise.
476         * rs6000-aix-tdep.c (branch_dest): Likewise.
477         * rs6000-nat.c (rs6000_ptrace64): Likewise.
478         (fetch_register): Likewise.
479         * rs6000-tdep.c (ppc_supply_reg): Likewise.
480         (ppc_collect_reg): Likewise.
481         (ppc_collect_gregset): Likewise.
482         (ppc_collect_fpregset): Likewise.
483         (ppc_collect_vsxregset): Likewise.
484         (ppc_collect_vrregset): Likewise.
485         (ppc_displaced_step_hw_singlestep): Likewise.
486         (rs6000_pseudo_register_read): Likewise.
487         (rs6000_pseudo_register_write): Likewise.
488         * s390-linux-nat.c (supply_gregset): Likewise.
489         (fill_gregset): Likewise.
490         (s390_linux_fetch_inferior_registers): Likewise.
491         * s390-linux-tdep.c (s390_write_pc): Likewise.
492         (s390_software_single_step): Likewise.
493         (s390_all_but_pc_registers_record): Likewise.
494         (s390_linux_syscall_record): Likewise.
495         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
496         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
497         (shnbsd_store_inferior_registers): Likewise.
498         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
499         (sh_extract_return_value_fpu): Likewise.
500         (sh_store_return_value_nofpu): Likewise.
501         (sh_corefile_supply_regset): Likewise.
502         (sh_corefile_collect_regset): Likewise.
503         * sh64-tdep.c (sh64_extract_return_value): Likewise.
504         (sh64_store_return_value): Likewise.
505         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
506         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
507         (sparc_store_inferior_registers): Likewise.
508         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
509         (sparc_ravenscar_prepare_to_store): Likewise.
510         * sparc-tdep.c (sparc32_store_arguments): Likewise.
511         (sparc_analyze_control_transfer): Likewise.
512         (sparc_step_trap): Likewise.
513         (sparc_software_single_step): Likewise.
514         (sparc32_gdbarch_init): Likewise.
515         (sparc_supply_rwindow): Likewise.
516         (sparc_collect_rwindow): Likewise.
517         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
518         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
519         (sparc64nbsd_collect_gregset): Likewise.
520         (sparc64nbsd_supply_fpregset): Likewise.
521         (sparc64nbsd_collect_fpregset): Likewise.
522         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
523         (sparc64_supply_gregset): Likewise.
524         (sparc64_collect_gregset): Likewise.
525         (sparc64_supply_fpregset): Likewise.
526         (sparc64_collect_fpregset): Likewise.
527         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
528         * spu-tdep.c (spu_unwind_sp): Likewise.
529         (spu2ppu_prev_register): Likewise.
530         (spu_memory_remove_breakpoint): Likewise.
531         * stack.c (return_command): Likewise.
532         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
533         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
534         * tracefile.c (trace_save_ctf): Likewise.
535         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
536         (do_windows_store_inferior_registers): Likewise.
537         (windows_resume): Likewise.
538         * xtensa-linux-nat.c (fill_gregset): Likewise.
539         (supply_gregset_reg): Likewise.
540         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
541         (xtensa_register_read_masked): Likewise.
542         (xtensa_supply_gregset): Likewise.
543         (xtensa_extract_return_value): Likewise.
544         (xtensa_store_return_value): Likewise.
545
546 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
547
548         * doublest.c (floatformat_from_string): New function.
549         * doublest.h (floatformat_from_string): Add prototype.
550
551         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
552         (OP_FLOAT): ... this.
553         * expression.h: Do not include "doublest.h".
554         (union exp_element): Replace doubleconst and decfloatconst by
555         new element floatconst.
556         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
557         (ada_evaluate_subexp): Likewise.
558         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
559         OP_DOUBLE and OP_DECFLOAT.
560         * expprint.c (print_subexp_standard): Likewise.
561         (dump_subexp_body_standard): Likewise.
562         * breakpoint.c (watchpoint_exp_is_const): Likewise.
563
564         * parse.c: Include "dfp.h".
565         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
566         (write_exp_elt_floatcst): New function.
567         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
568         and OP_DECFLOAT.
569         (operator_check_standard): Likewise.
570         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
571         Return target format buffer instead of host DOUBLEST.
572         Use floatformat_from_string and decimal_from_string to parse
573         either binary or decimal floating-point types.
574         (parse_c_float): Remove.
575         * parser-defs.h: Do not include "doublest.h".
576         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
577         (write_exp_elt_floatcst): Add prototype.
578         (parse_float): Update prototype.
579         (parse_c_float): Remove.
580
581         * c-exp.y: Do not include "dfp.h".
582         (typed_val_float): Use byte buffer instead of DOUBLEST.
583         (typed_val_decfloat): Remove.
584         (DECFLOAT): Remove.
585         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
586         (parse_number): Update to new parse_float interface.
587         Parse suffixes and determine type before calling parse_float.
588         Handle decimal and binary FP types the same way.
589
590         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
591         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
592         (parse_number): Update to new parse_float interface.
593         Parse suffixes and determine type before calling parse_float.
594
595         * f-exp.y: Replace dval by typed_val_float.
596         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
597         (parse_number): Use parse_float instead of atof.
598
599         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
600         (parse_go_float): Remove.
601         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
602         (parse_number): Call parse_float instead of parse_go_float.
603         Parse suffixes and determine type before calling parse_float.
604
605         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
606         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
607         (parse_number): Update to new parse_float interface.
608         Parse suffixes and determine type before calling parse_float.
609
610         * m2-exp.y: Replace dval by byte buffer val.
611         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
612         (parse_number): Call parse_float instead of atof.
613
614         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
615         (lex_number): Call parse_float instead of strtod.
616         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
617         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
618         Use write_exp_elt_floatcst.
619         (unit_testing): Remove static variable.
620         (rust_type): Do not check unit_testing.
621         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
622
623         * ada-exp.y (type_float, type_double): Remove.
624         (typed_val_float): Use byte buffer instead of DOUBLEST.
625         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
626         * ada-lex.l (processReal): Use parse_float instead of sscanf.
627
628 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
629
630         * aarch64-tdep.h (enum aarch64_regnum): Remove.
631         * arch/aarch64.h: New file.
632
633 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
634
635         * dfp.h (decimal_from_string): Use const reference for argument.
636         * dfp.c (decimal_from_string): Likewise.
637
638 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
639
640         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
641         * sh64-tdep.c (sh64_do_fp_register): Likewise.
642         * mips-tdep.c (mips_print_fp_register): Likewise.
643
644 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
645
646         * common/format.h (enum argclass): Replace decfloat_arg by
647         dec32float_arg, dec64float_arg, and dec128float_arg.
648         * common/format.c (parse_format_string): Update to return
649         new decimal float argument classes.
650
651         * printcmd.c (printf_decfloat): Rename to ...
652         (printf_floating): ... this.  Add argclass argument, and use it
653         instead of parsing the format string again.  Add support for
654         binary floating-point values, using floatformat_to_string.
655         Convert value to the target format if it doesn't already match.
656         (ui_printf): Call printf_floating instead of printf_decfloat,
657         also for double_arg / long_double_arg.  Pass argclass.
658
659         * dfp.c (decimal_to_string): Add format string argument.
660         * dfp.h (decimal_to_string): Likewise.
661
662         * doublest.c (floatformat_to_string): Add format string argument.
663         * doublest.h (floatformat_to_string): Likewise.
664
665 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
666
667         * doublest.c (floatformat_precision): New routine.
668         (floatformat_to_string): Likewise.
669         * doublest.c (floatformat_to_string): Add prototype.
670
671         * printcmd.c (print_scalar_formatted): Only call print_floating
672         on floating-point types.
673         * valprint.c: Do not include "floatformat.h".
674         (generic_val_print_decfloat): Remove.
675         (generic_val_print): Call generic_val_print_float for both
676         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
677         (print_floating): Use floatformat_to_string.  Handle decimal float.
678         (print_decimal_floating): Remove, merge into floatformat_to_string.
679         * value.h (print_decimal_floating): Remove.
680
681         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
682
683 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
684
685         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
686
687 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
688
689         * memattr.h: Don't include vec.h.
690         (struct mem_attrib): Initialize fields.
691         <unknown>: New static method.
692         (struct mem_region): Add constructors, operator<, initialize
693         fields.
694         * memattr.c: Include algorithm.
695         (default_mem_attrib, unknown_mem_attrib): Remove.
696         (user_mem_region_list): New global.
697         (target_mem_region_list, mem_region_list): Change type to
698         std::vector<mem_region>.
699         (mem_use_target): Now a function.
700         (target_mem_regions_valid): Change type to bool.
701         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
702         (require_user_regions): Adjust.
703         (require_target_regions): Adjust.
704         (create_mem_region): Adjust.
705         (lookup_mem_region): Adjust.
706         (invalidate_target_mem_regions): Adjust.
707         (mem_clear): Rename to...
708         (user_mem_clear): ... this, and adjust.
709         (mem_command): Adjust.
710         (info_mem_command): Adjust.
711         (mem_enable, enable_mem_command, mem_disable,
712         disable_mem_command): Adjust.
713         (mem_delete): Adjust.
714         (delete_mem_command): Adjust.
715         * memory-map.h (parse_memory_map): Return an std::vector.
716         * memory-map.c (parse_memory_map): Likewise.
717         (struct memory_map_parsing_data): Add constructor.
718         <memory_map>: Point to std::vector.
719         (memory_map_start_memory): Adjust.
720         (memory_map_end_memory): Adjust.
721         (memory_map_end_property): Adjust.
722         (clear_result): Remove.
723         * remote.c (remote_memory_map): Return an std::vector.
724         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
725         Remove.
726         (target_debug_print_mem_region_vector): New.
727         * target-delegates.c: Regenerate.
728         * target.h (mem_region_vector): New typedef.
729         (to_memory_map): Return mem_region_vector.
730         (target_memory_map): Return an std::vector.
731         * target.c (target_memory_map): Return an std::vector.
732         (flash_erase_command): Adjust.
733
734 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
735
736         * memory-map.c (struct memory_map_parsing_data) <property_name>:
737         Change type to std::string.
738         (memory_map_start_property): Adjust.
739         (memory_map_end_property): Adjust.
740
741 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
742
743         * infrun.h: Include common/byte-vector.h.
744         (struct displaced_step_closure): New struct.
745         (struct buf_displaced_step_closure): New struct.
746         * infrun.c (displaced_step_closure::~displaced_step_closure):
747         Provide default implementation.
748         (displaced_step_clear): Deallocate step closure with delete.
749         * aarch64-tdep.c (displaced_step_closure): Rename to ...
750         (aarch64_displaced_step_closure): ... this, extend
751         displaced_step_closure.
752         (aarch64_displaced_step_data) <dsc>: Change type to
753         aarch64_displaced_step_closure.
754         (aarch64_displaced_step_copy_insn): Adjust to type change, use
755         unique_ptr.
756         (aarch64_displaced_step_fixup): Add cast for displaced step
757         closure.
758         * amd64-tdep.c (displaced_step_closure): Rename to ...
759         (amd64_displaced_step_closure): ... this, extend
760         displaced_step_closure.
761         <insn_buf>: Change type to std::vector<gdb_byte>.
762         <max_len>: Remove.
763         (fixup_riprel): Change type of DSC parameter, adjust to type
764         change of insn_buf.
765         (fixup_displaced_copy): Change type of DSC parameter.
766         (amd64_displaced_step_copy_insn): Instantiate
767         amd64_displaced_step_closure.
768         (amd64_displaced_step_fixup): Add cast for closure type, adjust
769         to type change of insn_buf.
770         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
771         parameter DSC.
772         (arm_linux_copy_svc): Likewise.
773         (cleanup_kernel_helper_return): Likewise.
774         (arm_catch_kernel_helper_return): Likewise.
775         (arm_linux_displaced_step_copy_insn): Instantiate
776         arm_displaced_step_closure.
777         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
778         (displaced_read_reg): Change type of parameter DSC.
779         (branch_write_pc): Likewise.
780         (load_write_pc): Likewise.
781         (alu_write_pc): Likewise.
782         (displaced_write_reg): Likewise.
783         (arm_copy_unmodified): Likewise.
784         (thumb_copy_unmodified_32bit): Likewise.
785         (thumb_copy_unmodified_16bit): Likewise.
786         (cleanup_preload): Likewise.
787         (install_preload): Likewise.
788         (arm_copy_preload): Likewise.
789         (thumb2_copy_preload): Likewise.
790         (install_preload_reg): Likewise.
791         (arm_copy_preload_reg): Likewise.
792         (cleanup_copro_load_store): Likewise.
793         (install_copro_load_store): Likewise.
794         (arm_copy_copro_load_store) Likewise.
795         (thumb2_copy_copro_load_store): Likewise.
796         (cleanup_branch): Likewise.
797         (install_b_bl_blx): Likewise.
798         (arm_copy_b_bl_blx): Likewise.
799         (thumb2_copy_b_bl_blx): Likewise.
800         (thumb_copy_b): Likewise.
801         (install_bx_blx_reg): Likewise.
802         (arm_copy_bx_blx_reg): Likewise.
803         (thumb_copy_bx_blx_reg): Likewise.
804         (cleanup_alu_imm): Likewise.
805         (arm_copy_alu_imm): Likewise.
806         (thumb2_copy_alu_imm): Likewise.
807         (cleanup_alu_reg): Likewise.
808         (install_alu_reg): Likewise.
809         (arm_copy_alu_reg): Likewise.
810         (thumb_copy_alu_reg): Likewise.
811         (cleanup_alu_shifted_reg): Likewise.
812         (install_alu_shifted_reg): Likewise.
813         (arm_copy_alu_shifted_reg): Likewise.
814         (cleanup_load): Likewise.
815         (cleanup_store): Likewise.
816         (arm_copy_extra_ld_st): Likewise.
817         (install_load_store): Likewise.
818         (thumb2_copy_load_literal): Likewise.
819         (thumb2_copy_load_reg_imm): Likewise.
820         (arm_copy_ldr_str_ldrb_strb): Likewise.
821         (cleanup_block_load_all): Likewise.
822         (cleanup_block_store_pc): Likewise.
823         (cleanup_block_load_pc): Likewise.
824         (arm_copy_block_xfer): Likewise.
825         (thumb2_copy_block_xfer): Likewise.
826         (cleanup_svc): Likewise.
827         (install_svc): Likewise.
828         (arm_copy_svc): Likewise.
829         (thumb_copy_svc): Likewise.
830         (arm_copy_undef): Likewise.
831         (thumb_32bit_copy_undef): Likewise.
832         (arm_copy_unpred): Likewise.
833         (arm_decode_misc_memhint_neon): Likewise.
834         (arm_decode_unconditional): Likewise.
835         (arm_decode_miscellaneous): Likewise.
836         (arm_decode_dp_misc): Likewise.
837         (arm_decode_ld_st_word_ubyte): Likewise.
838         (arm_decode_media): Likewise.
839         (arm_decode_b_bl_ldmstm): Likewise.
840         (arm_decode_ext_reg_ld_st): Likewise.
841         (thumb2_decode_dp_shift_reg): Likewise.
842         (thumb2_decode_ext_reg_ld_st): Likewise.
843         (arm_decode_svc_copro): Likewise.
844         (thumb2_decode_svc_copro): Likewise.
845         (install_pc_relative): Likewise.
846         (thumb_copy_pc_relative_16bit): Likewise.
847         (thumb_decode_pc_relative_16bit): Likewise.
848         (thumb_copy_pc_relative_32bit): Likewise.
849         (thumb_copy_16bit_ldr_literal): Likewise.
850         (thumb_copy_cbnz_cbz): Likewise.
851         (thumb2_copy_table_branch): Likewise.
852         (cleanup_pop_pc_16bit_all): Likewise.
853         (thumb_copy_pop_pc_16bit): Likewise.
854         (thumb_process_displaced_16bit_insn): Likewise.
855         (decode_thumb_32bit_ld_mem_hints): Likewise.
856         (thumb_process_displaced_32bit_insn): Likewise.
857         (thumb_process_displaced_insn): Likewise.
858         (arm_process_displaced_insn): Likewise.
859         (arm_displaced_init_closure): Likewise.
860         (arm_displaced_step_fixup): Add cast for closure.
861         * arm-tdep.h: Include infrun.h.
862         (displaced_step_closure): Rename to ...
863         (arm_displaced_step_closure): ... this, extend
864         displaced_step_closure.
865         <u::svc::copy_svc_os>: Change type of parameter DSC.
866         <cleanup>: Likewise.
867         (arm_process_displaced_insn): Likewise.
868         (arm_displaced_init_closure): Likewise.
869         (displaced_read_reg): Likewise.
870         (displaced_write_reg): Likewise.
871         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
872         Adjust.
873         * i386-tdep.h: Include infrun.h.
874         (i386_displaced_step_closure): New typedef.
875         * i386-tdep.c (i386_displaced_step_copy_insn): Use
876         i386_displaced_step_closure.
877         (i386_displaced_step_fixup): Adjust.
878         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
879         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
880         and unique_ptr.
881         (ppc_displaced_step_fixup): Adjust.
882         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
883         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
884         and unique_ptr.
885         (s390_displaced_step_fixup): Adjust.
886
887 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
888
889         * interps.h (interp_resume, interp_suspend, interp_set_temp):
890         Remove declarations.
891
892 2017-10-20  Tom Tromey  <tom@tromey.com>
893
894         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
895         std::vector.
896         (gdb_bfd_record_inclusion): Update.
897         (bfdp): Remove typedef.
898
899 2017-10-20  Tom Tromey  <tom@tromey.com>
900
901         * gdb_bfd.c (gdb_bfd_ref): Use new.
902         (struct gdb_bfd_data): Add constructor, destructor, and member
903         initializers.
904         (gdb_bfd_unref): Use delete.
905
906 2017-10-20  Tom Tromey  <tom@tromey.com>
907
908         * exec.c (exec_file_attach): Use new_bfd_ref.
909         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
910         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
911         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
912         new_bfd_ref.
913         * gdb_bfd.h (new_bfd_ref): New function.
914
915 2017-10-20  Pedro Alves  <palves@redhat.com>
916
917         * main.c (captured_command_loop): Add attribute noinline.
918
919 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
920
921         * interps.c (struct interp_factory): Add constructor.
922         (interp_factory_p): Remove typedef.
923         (DEF_VEC_P(interp_factory_p)): Remove.
924         (interpreter_factories): Change type to std::vector.
925         (interp_factory_register): Adjust.
926         (interp_lookup): Adjust.
927         (interpreter_completer): Adjust.
928
929 2017-10-19  Tom Tromey  <tom@tromey.com>
930
931         * break-catch-syscall.c (catch_syscall_completer): Use
932         std::string, gdb::unique_xmalloc_ptr.
933
934 2017-10-19  Tom Tromey  <tom@tromey.com>
935
936         * infcall.c (call_function_by_hand_dummy): Use std::string.
937
938 2017-10-19  Tom Tromey  <tom@tromey.com>
939
940         * mi/mi-main.c (mi_cmd_execute): Update.
941         * top.h (prepare_execute_command): Return scoped_value_mark.
942         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
943         Add move constructor.
944         * top.c (prepare_execute_command): Return scoped_value_mark.
945         (execute_command): Update.
946
947 2017-10-19  Pedro Alves  <palves@redhat.com>
948
949         * xml-support.c (xml_fetch_content_from_file): Check fread's
950         return.
951
952 2017-10-19  Pedro Alves  <palves@redhat.com>
953
954         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
955         async.
956         (handle_error_fd): New function.
957         (ser_base_async): Add/delete an event loop file handler for
958         error_fd.
959
960 2017-10-19  Pedro Alves  <palves@redhat.com>
961
962         * xml-support.c (xml_fetch_content_from_file): Don't read in
963         chunks.  Instead use fseek to determine the file's size, and read
964         it in one go.
965
966 2017-11-18  Keith Seitz  <keiths@redhat.com>
967
968         * c-exp.y (oper): Canonicalize conversion operators of user-defined
969         types.
970         Add whitespace to front of type name.
971
972 2017-10-18  Keith Seitz  <keiths@redhat.com>
973
974         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
975         DW_AT_accessibility.
976
977 2017-10-18  Yao Qi  <yao.qi@linaro.org>
978
979         * features/tic6x-c62x-linux.c: Remove.
980
981 2017-10-17  Tom Tromey  <tom@tromey.com>
982
983         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
984         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
985         (do_mixed_source_and_assembly): Likewise.
986
987 2017-10-17  Tom Tromey  <tom@tromey.com>
988
989         * regcache.c (regcache::xfer_part): Remove assertion.
990
991 2017-10-17  Pedro Alves  <palves@redhat.com>
992
993         * xml-support.c (xml_fetch_content_from_file): Call
994         unique_ptr::release() instead unique_ptr::get() when passing
995         through xrealloc.
996
997 2017-10-17  Yao Qi  <yao.qi@linaro.org>
998
999         * regcache.c (regcache::xfer_part): Remove parameters read and
1000         write, add parameter is_raw.  All callers are updated.
1001
1002 2017-10-16  Keith Seitz  <keiths@redhat.com>
1003
1004         * c-typeprint.c (enum access_specifier): Moved here from
1005         c_type_print_base.
1006         (output_access_specifier): New function.
1007         (c_type_print_base): Consider typedefs when assessing
1008         whether access labels are needed.
1009         Use output_access_specifier as needed.
1010         Output access specifier for typedefs, if needed.
1011         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
1012         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
1013         fields.
1014         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
1015         accessor macros.
1016
1017 2017-10-16  Tom Tromey  <tom@tromey.com>
1018
1019         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
1020         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
1021         * target.c (target_fileio_read_stralloc): Update.
1022         * sparc64-tdep.c (adi_is_addr_mapped): Update.
1023         * target.h (target_fileio_read_stralloc): Return
1024         unique_xmalloc_ptr.
1025
1026 2017-10-16  Tom Tromey  <tom@tromey.com>
1027
1028         * xml-syscall.c (xml_init_syscalls_info): Update.
1029         * xml-support.c (xinclude_start_include): Update.
1030         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
1031         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
1032         (xml_fetch_content_from_file): Likewise.
1033         * osdata.c (get_osdata): Update.
1034         * target.h (target_read_stralloc, target_get_osdata): Return
1035         unique_xmalloc_ptr.
1036         * solib-aix.c (solib_aix_get_library_list): Update.
1037         * solib-target.c (solib_target_current_sos): Update.
1038         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
1039         * xml-tdesc.c (fetch_available_features_from_target): Update.
1040         (target_fetch_description_xml): Update.
1041         (file_read_description_xml): Update.
1042         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
1043         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
1044         (remote_pid_to_exec_file): Update.
1045         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
1046         (target_get_osdata): Likewise.
1047
1048 2017-10-16  Tom Tromey  <tom@tromey.com>
1049
1050         * remote.c (remote_register_number_and_offset): Use std::vector.
1051         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
1052         (putpkt_binary): Use gdb::def_vector.
1053         (compare_sections_command): Use gdb::byte_vector.
1054
1055 2017-10-16  Tom Tromey  <tom@tromey.com>
1056
1057         * ppc-linux-nat.c (hwdebug_insert_point): Use
1058         gdb::unique_xmalloc_ptr, XDUP.
1059
1060 2017-10-16  Tom Tromey  <tom@tromey.com>
1061
1062         * probe.c (parse_probes): Use std::string.
1063         (info_probes_for_ops, enable_probes_command)
1064         (disable_probes_command): Remove cleanups.
1065
1066 2017-10-16  Tom Tromey  <tom@tromey.com>
1067
1068         * buildsym.c (block_compar): Remove.
1069         (end_symtab_get_static_block): Use std::vector.
1070
1071 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
1072
1073         * memrange.h (struct mem_range): Define operator< and operator==.
1074         (mem_range_s): Remove.
1075         (DEF_VEC_O (mem_range_s)): Remove.
1076         (normalize_mem_ranges): Change parameter type to std::vector.
1077         * memrange.c (compare_mem_ranges): Remove.
1078         (normalize_mem_ranges): Change parameter type to std::vector,
1079         adjust to vector change.
1080         * exec.c (section_table_available_memory): Return vector, remove
1081         parameter.
1082         (section_table_read_available_memory): Adjust to std::vector
1083         change.
1084         * remote.c (remote_read_bytes): Adjust to std::vector
1085         change.
1086         * tracepoint.h (traceframe_available_memory): Change parameter
1087         type to std::vector.
1088         * tracepoint.c (traceframe_available_memory): Change parameter
1089         type to std::vector, adjust.
1090         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
1091         std::vector change.
1092         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1093         unittests/memrange-selftests.c.
1094         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
1095         * gdb/unittests/memrange-selftests.c: New file.
1096
1097 2017-10-16  Pedro Alves  <palves@redhat.com>
1098
1099         * elfread.c (probe_key_free): Rename range-for variable.
1100         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
1101         (find_probe_by_pc, collect_probes): Rename range-for variable.
1102
1103 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1104
1105         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
1106         * features/tic6x-c62x.c: Remove.
1107         * features/tic6x-c64x-linux.c: Remove.
1108         * features/tic6x-c64x.c: Remove.
1109         * features/tic6x-c64xp-linux.c: Remove.
1110         * features/tic6x-c64xp.c: Remove.
1111         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
1112         initialize_tdesc_tic6x_*_linux functions.
1113         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
1114         initialize_tdesc_tic6x_* functions.
1115
1116 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1117
1118         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
1119         tic6x-c62x.
1120         * regformats/tic6x-c62x.dat: Remove.
1121         * regformats/tic6x-c64x.dat: Remove.
1122         * regformats/tic6x-c64xp.dat: Remove.
1123
1124 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
1125
1126         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
1127         (the !HAVE_LIBEXPAT version).
1128
1129 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1130
1131         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
1132         const.
1133
1134 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1135
1136         * target.h: Include tracepoint.h.
1137         (enum trace_find_type): Move to tracepoint.h.
1138         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
1139         * tracepoint.h: Don't include target.h
1140         (enum trace_find_type): Move from target.h.
1141         (parse_traceframe_info): Return a unique ptr.
1142         * tracepoint.c (current_traceframe_info): Change type to unique
1143         ptr.
1144         (free_traceframe_info): Remove.
1145         (clear_traceframe_info): Don't manually free
1146         current_traceframe_info.
1147         (free_result): Remove.
1148         (parse_traceframe_info): Return a unique ptr.
1149         (get_traceframe_info): Adjust to unique ptr.
1150         * ctf.c (ctf_traceframe_info): Return a unique ptr.
1151         * remote.c (remote_traceframe_info): Return a unique ptr.
1152         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
1153         ptr.
1154         * target-debug.h (target_debug_print_traceframe_info_up): New
1155         macro.
1156         * target-delegates.c: Regenerate.
1157
1158 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1159
1160         * memrange.h (struct mem_range): Add constructors.
1161         * tracepoint.h (struct traceframe_info) <memory>: Change type to
1162         std::vector<mem_range>.
1163         * tracepoint.c (free_traceframe_info): Don't manually free
1164         vector.
1165         (traceframe_info_start_memory): Adjust to vector change.
1166         (traceframe_available_memory): Likewise.
1167         * tracefile-tfile.c (build_traceframe_info): Likewise.
1168         * ctf.c (ctf_traceframe_info): Likewise.
1169
1170 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1171
1172         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
1173         std::vector<int>.
1174         * tracepoint.c (free_traceframe_info): Deallocate with delete.
1175         (traceframe_info_start_tvar): Adjust to vector change.
1176         (parse_traceframe_info): Allocate with new.
1177         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
1178         vector change.
1179         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
1180         change.
1181         tfile_traceframe_info): Allocate with new.
1182         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
1183         change.
1184
1185 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1186
1187         * tracepoint.c (traceframe_info): Rename to...
1188         (current_traceframe_info): ...this.
1189         (clear_traceframe_info): Adjust.
1190         (get_traceframe_info): Adjust.
1191
1192 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1193
1194         * nat/linux-osdata.c: Include algorithm.
1195         (compare_processes): Remove.
1196         (struct pid_pgid_entry): New struct.
1197         (linux_xfer_osdata_processgroups): Use std::vector instead of
1198         XNEWVEC.
1199
1200 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1201
1202         * objfiles.h: Don't include symfile.h.
1203         (struct partial_symbol): Remove forward-declaration.
1204         (struct objfile) <global_psymbols, static_psymbols>: Change type
1205         to std::vector<partial_symbol *>.
1206         * objfiles.c (objfile::objfile): Don't memset those fields.
1207         (objfile::~objfile): Don't free those fields.
1208         * psympriv.h (struct psymbol_allocation_list): Remove
1209         forward-declaration.
1210         (add_psymbol_to_list): Change psymbol_allocation_list parameter
1211         to std::vector.
1212         (start_psymtab_common): Change parameters to std::vector.
1213         * psymtab.c: Include algorithm.
1214         (require_partial_symbols): Call shrink_to_fit.
1215         (find_pc_sect_psymbol): Adjust to vector change.
1216         (match_partial_symbol): Likewise.
1217         (lookup_partial_symbol): Likewise.
1218         (psym_relocate): Likewise.
1219         (dump_psymtab): Likewise.
1220         (recursively_search_psymtabs): Likewise.
1221         (compare_psymbols): Remove.
1222         (sort_pst_symbols): Adjust to vector change.
1223         (start_psymtab_common): Likewise.
1224         (end_psymtab_common): Likewise.
1225         (psymbol_bcache_full): De-constify return value.
1226         (add_psymbol_to_bcache): Likewise.
1227         (extend_psymbol_list): Remove.
1228         (append_psymbol_to_list): Adjust to vector change.
1229         (add_psymbol_to_list): Likewise.
1230         (init_psymbol_list): Likewise.
1231         (maintenance_info_psymtabs): Likewise.
1232         (maintenance_check_psymtabs): Likewise.
1233         * symfile.h (struct psymbol_allocation_list): Remove.
1234         * symfile.c (reread_symbols): Adjust to vector change.
1235         * dbxread.c (start_psymtab): Change type of parameters.
1236         (dbx_symfile_read): Adjust to vector change.
1237         (read_dbx_symtab): Likewise.
1238         (start_psymtab): Change type of parameters.
1239         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
1240         (create_partial_symtab): Likewise.
1241         (add_partial_symbol): Likewise.
1242         (write_one_signatured_type): Likewise.
1243         (recursively_write_psymbols): Likewise.
1244         * mdebugread.c (parse_partial_symbols): Likewise.
1245         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
1246         (scan_xcoff_symtab): Adjust to vector change.
1247         (xcoff_initial_scan): Likewise.
1248
1249 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
1250
1251         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
1252
1253 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1254
1255         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
1256         Remove s390x-*-expedite, add s390x-expedite.
1257
1258 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1259
1260         * features/s390-gs-linux64.c: Regenerated.
1261         * features/s390x-gs-linux64.c: Regenerated.
1262
1263 2017-10-13  Tom Tromey  <tom@tromey.com>
1264
1265         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1266         * solib.c (update_solib_list, reload_shared_libraries_1): Use
1267         delete.
1268         * symfile.c (symbol_file_add_with_addrs): Use new.
1269         (symbol_file_add_separate): Update comment.
1270         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
1271         * jit.c (jit_object_close_impl): Use new.
1272         (jit_unregister_code): Use delete.
1273         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
1274         (~objfile): Rename from free_objfile.
1275         (free_objfile_separate_debug, do_free_objfile_cleanup)
1276         (free_all_objfiles, objfile_purge_solibs): Use delete.
1277         * objfiles.h (struct objfile): Add constructor and destructor.
1278         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
1279         (allocate_objfile, free_objfile): Don't declare.
1280         (struct objstats): Add initializers.
1281
1282 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1283
1284         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
1285         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
1286         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
1287         * gdbarch.h: Regenerate.
1288         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1289         Adjust comment.
1290         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
1291         (i386_displaced_step_fixup): Adjust comment.
1292         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
1293
1294 2017-10-12  Tom Tromey  <tom@tromey.com>
1295
1296         * prologue-value.h (pv_area::store_would_trash): Return bool.
1297         (pv_area::find_reg): Likewise.
1298         * prologue-value.c (pv_area::store_would_trash): Return bool.
1299         (pv_area::find_reg): Likewise.
1300
1301 2017-10-12  Tom Tromey  <tom@tromey.com>
1302
1303         * s390-linux-tdep.c (s390_store, s390_load)
1304         (s390_check_for_saved, s390_analyze_prologue): Update.
1305         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
1306         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
1307         * prologue-value.h (class pv_area): Move from prologue-value.c.
1308         Change names of members.  Add constructor, destructor, member
1309         functions.
1310         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
1311         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
1312         (pv_area_fetch, pv_area_scan): Don't declare.
1313         * prologue-value.c (struct pv_area::area_entry): Now member of
1314         pv_area.
1315         (struct pv_area): Move to prologue-value.h.
1316         (pv_area::pv_area): Rename from make_pv_area.
1317         (pv_area::~pv_area): Rename from free_pv_area.
1318         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
1319         (clear_entries, find_entry, overlaps, store_would_trash, store)
1320         (fetch, find_reg, scan): Now member of pv_area.
1321         Remove "area" argument.  Update.
1322         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
1323         Update.
1324         * mn10300-tdep.c (push_reg, check_for_saved)
1325         (mn10300_analyze_prologue): Update.
1326         * mep-tdep.c (is_arg_spill, check_for_saved)
1327         (mep_analyze_prologue): Update.
1328         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
1329         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
1330         (m32c_is_struct_return, m32c_analyze_prologue): Update.
1331         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
1332         Update.
1333         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
1334         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
1335
1336 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1337
1338         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
1339         * linux-nat.c (linux_nat_delete_thread): New variable.
1340         (lwp_free): Invoke linux_nat_delete_thread if set.
1341         (linux_nat_set_delete_thread): New function.
1342         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
1343         thread delete callback.
1344         * arm-linux-nat.c (arm_linux_delete_thread): New function.
1345         (_initialize_arm_linux_nat): Assign thread delete callback.
1346         * s390-linux-nat.c (s390_delete_thread): New function.
1347         (_initialize_s390_nat): Assign thread delete callback.
1348         * x86-linux-nat.c (x86_linux_add_target): Likewise.
1349         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
1350         function.
1351         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
1352         declaration.
1353         * nat/x86-linux.c (x86_linux_delete_thread): New function.
1354         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
1355
1356 2017-10-09  Tom Tromey  <tom@tromey.com>
1357
1358         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
1359         std::string.
1360         * tui/tui-layout.c (enum tui_status): Use std::string.
1361
1362 2017-10-11  Tom Tromey  <tom@tromey.com>
1363
1364         * gdbthread.h (thread_command): Constify.
1365         * inferior.h (detach_command): Constify.
1366         * top.h (set_history, show_history): Constify.
1367         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
1368         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
1369         * bsd-kvm.c (bsd_kvm_cmd): Constify.
1370         * printcmd.c (set_command): Constify.
1371         (non_const_set_command): New function.
1372         * dcache.c (set_dcache_command, show_dcache_command): Constify.
1373         * breakpoint.c (enable_command, disable_command, delete_command)
1374         (catch_command, tcatch_command, set_breakpoint_cmd)
1375         (show_breakpoint_cmd): Constify.
1376         * macrocmd.c (macro_command): Constify.
1377         * infcmd.c (unset_command, kill_command, detach_command)
1378         (info_proc_cmd): Constify.
1379         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
1380         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
1381         (info_auto_load_cmd): Constify.
1382         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
1383         (unset_tdesc_cmd): Constify.
1384         * ada-lang.c (set_ada_command, show_ada_command)
1385         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
1386         * guile/guile.c (set_guile_command, show_guile_command)
1387         (info_guile_command): Constify.
1388         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
1389         Constify.
1390         * skip.c (skip_command): Constify.
1391         * compile/compile.c (_initialize_compile): Constify.
1392         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
1393         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
1394         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
1395         (maint_btrace_pt_show_cmd): Constify.
1396         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
1397         Constify.
1398         * python/python.c (user_show_python, user_set_python): Constify.
1399         * mips-tdep.c (set_mips_command, show_mips_command)
1400         (set_mipsfpu_command): Constify.
1401         * record-btrace.c (cmd_record_btrace_start)
1402         (cmd_set_record_btrace, cmd_show_record_btrace)
1403         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
1404         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
1405         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
1406         Constify.
1407         * symfile.c (overlay_command): Constify.
1408         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
1409         * cli/cli-logging.c (set_logging_command, show_logging_command):
1410         Constify.
1411         * cli/cli-dump.c (dump_command, append_command)
1412         (srec_dump_command, ihex_dump_command, verilog_dump_command)
1413         (tekhex_dump_command, binary_dump_command)
1414         (binary_append_command): Constify.
1415         * cli/cli-decode.c (struct cmd_list_element): Change type of
1416         "fun".
1417         * cli/cli-cmds.c (info_command, show_command, set_debug)
1418         (show_debug): Constify.
1419         (show_command): Add non-const overload.
1420         * top.c (set_history, show_history): Constify.
1421         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
1422         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
1423         * target.c (target_command): Constify.
1424         * sparc64-tdep.c (info_adi_command): Constify.
1425         * record-full.c (cmd_record_full_start): Constify.
1426         (set_record_full_command): Constify.  Fix typo.
1427         (show_record_full_command): Constify.
1428         * thread.c (thread_command, thread_apply_command): Constify.
1429         * memattr.c (dummy_cmd): Constify.
1430         * value.c (function_command): Constify.
1431         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
1432         * probe.c (info_probes_command): Constify.
1433         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
1434         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
1435         (show_thread_cmd, set_thread_default_cmd)
1436         (show_thread_default_cmd): Constify.
1437         (check_empty): Constify.
1438         * tracepoint.c (tfind_command): Constify.
1439         * cp-support.c (maint_cplus_command): Constify.
1440         * windows-tdep.c (info_w32_command): Constify.
1441         * record.c (cmd_record_start, set_record_command)
1442         (show_record_command, info_record_command, cmd_record_goto):
1443         Constify.
1444         * ravenscar-thread.c (set_ravenscar_command)
1445         (show_ravenscar_command): Constify.
1446         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
1447         Constify.
1448         (add_internal_problem_command): Remove casts.
1449         * arc-tdep.c (maintenance_print_arc_command): Constify.
1450         * valprint.c (set_print, show_print, set_print_raw)
1451         (show_print_raw): Constify.
1452         * maint.c (maintenance_command, maintenance_info_command)
1453         (maintenance_print_command, maintenance_set_cmd)
1454         (maintenance_show_cmd, set_per_command_cmd)
1455         (show_per_command_cmd, maintenance_check_command): Constify.
1456         * language.c (set_check, show_check): Constify.
1457         * typeprint.c (show_print_type, set_print_type): Constify.
1458         * go32-nat.c (go32_info_dos_command): Constify.
1459
1460 2017-10-11  Tom Tromey  <tom@tromey.com>
1461
1462         * breakpoint.c (prepare_re_set_context): Remove.
1463         (breakpoint_re_set_one): Update.  Don't use cleanups.
1464         (breakpoint_re_set): Use scoped_restore, std::string, and
1465         scoped_restore_current_language.
1466
1467 2017-10-11  Tom Tromey  <tom@tromey.com>
1468
1469         * breakpoint.c (commands_command_1): Use std::string.
1470         (cleanup_executing_breakpoints): Remove.
1471         (bpstat_do_actions_1): Use scoped_restore.
1472         (bpstat_check_watchpoint): Use std::string.
1473         (decode_static_tracepoint_spec): Likewise.
1474         (break_range_command): Likewise.
1475         (watch_command_1): Likewise.
1476         (compare_breakpoints): Change argument types.
1477         (clear_command): Use std::vector.
1478         (cleanup_executing_breakpoints): Remove.
1479         (update_global_location_list): Use unique_xmalloc_ptr.
1480         (strace_command): Remove unused declaration.
1481
1482 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
1483
1484         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
1485         * NEWS: Mention new FreeBSD/arm native configuration.
1486         * configure.host: Add arm*-*-freebsd*.
1487         * configure.nat: Likewise.
1488         * arm-fbsd-nat.c: New file.
1489
1490 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
1491
1492         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
1493         (ALLDEPFILES): Add arm-fbsd-tdep.c.
1494         * NEWS: Mention new FreeBSD/arm target.
1495         * configure.tgt: Add arm*-*-freebsd*.
1496         * arm-fbsd-tdep.c: New file.
1497         * arm-fbsd-tdep.h: New file.
1498
1499 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
1500
1501         * linux-tdep.c (linux_make_corefile_notes): Remove call to
1502         `gdbarch_elfcore_write_linux_prpsinfo'.
1503         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
1504         method.
1505         (elf_internal_linux_prpsinfo): Remove declaration.
1506         * gdbarch.h: Regenerate.
1507         * gdbarch.c: Regenerate.
1508
1509 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
1510
1511         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
1512         `set_gdbarch_elfcore_write_linux_prpsinfo'.
1513
1514 2017-10-11  Pedro Alves  <palves@redhat.com>
1515
1516         * breakpoint.c (reattach_breakpoints): Delete.
1517         * breakpoint.h (reattach_breakpoints): Delete.
1518
1519 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
1520
1521         * symfile.c (registered_sym_fns): Make struct, not typedef.
1522         (DEF_VEC_O (registered_sym_fns)): Remove.
1523         (symtab_fns): Change type to std::vector.
1524         (add_symtab_fns): Adjust.
1525         (find_sym_fns): Adjust.
1526
1527 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
1528
1529         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
1530         * arc-tdep.h (arc_arch_is_em): New function.
1531         (arc_arch_is_hs): Likewise.
1532
1533 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
1534
1535         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
1536         parentheses in the declaration.
1537         (macro_lookup_inclusion): Likewise.
1538         (macro_lookup_definition): Likewise.
1539         * p-lang.h (pascal_builtin_types): Likewise.
1540         * tui/tui-data.c (tui_win_list): Likewise.
1541         * tui/tui-data.h (tui_win_list): Likewise.
1542         * utils.h (make_cleanup_free_section_addr_info): Likewise.
1543
1544 2017-10-11  Mark Rages  <markrages@gmail.com>
1545
1546         * target-memory.c (block_boundaries): Fix for block address not
1547         aligned on block size.
1548
1549 2017-10-10  Pedro Alves <palves@redhat.com>
1550             Tom Tromey  <tom@tromey.com>
1551
1552         * breakpoint.c (struct captured_breakpoint_query_args)
1553         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
1554         (print_breakpoint): New.
1555         * breakpoint.h (print_breakpoint): Declare.
1556         * common/common-exceptions.h (enum return_reason): Remove
1557         references to catch_exceptions.
1558         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
1559         Delete.
1560         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
1561         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
1562         * gdb.h: Delete.
1563         * gdbthread.h (thread_select): Declare.
1564         * mi/mi-cmd-break.c: Don't include gdb.h.
1565         (breakpoint_notify): Use print_breakpoint.
1566         * mi/mi-cmd-catch.c: Don't include gdb.h.
1567         * mi/mi-interp.c: Don't include gdb.h.
1568         (mi_print_breakpoint_for_event): New.
1569         (mi_breakpoint_created, mi_breakpoint_modified): Use
1570         mi_print_breakpoint_for_event.
1571         * mi/mi-main.c: Don't include gdb.h.
1572         (mi_cmd_thread_select): Parse the global thread ID here.  Use
1573         thread_select instead of gdb_thread_select.
1574         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
1575         of using gdb_list_thread_ids.
1576         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
1577         FILEIO_ENOSYS here.
1578         (remote_fileio_request): Use TRY/CATCH instead of
1579         catch_exceptions.
1580         * symfile-mem.c (struct symbol_file_add_from_memory_args)
1581         (symbol_file_add_from_memory_wrapper): Delete.
1582         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
1583         * thread.c: Don't include gdb.h.
1584         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
1585         (thread_alive): Use thread_select.
1586         (do_captured_thread_select): Delete, parts salvaged as ...
1587         (thread_select): ... this new function.
1588         (gdb_thread_select): Delete.
1589
1590 2017-10-10  Pedro Alves  <palves@redhat.com>
1591             Tom Tromey  <tom@tromey.com>
1592
1593         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
1594         and reverse logic.
1595         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
1596         No longer macros.  Instead ...
1597         (enum wp_check_result): They're now values of this new
1598         enumeration.
1599         (watchpoint_check): Change return type to wp_check_result and
1600         parameter type to bpstat.
1601         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
1602         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
1603         catch_errors.  Reverse logic of watchpoint_check call.
1604         (breakpoint_re_set_one): Now returns void and takes a breakpoint
1605         pointer as parameter.
1606         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
1607         * common/common-exceptions.c (throw_exception_sjlj): Update
1608         comments to avoid mentioning catch_errors.
1609         * exceptions.c (catch_errors): Delete.
1610         * exceptions.h: Update comments to avoid mentioning catch_errors.
1611         (catch_errors_ftype, catch_errors): Delete.
1612         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
1613         (hook_stop_stub): Delete.
1614         (restore_selected_frame): Change return type to void, and
1615         parameter type to const frame_id &.
1616         (restore_infcall_control_state): Use TRY/CATCH instead of
1617         catch_errors.
1618         * main.c (captured_command_loop): Return void and remove
1619         parameter.  Remove references to catch_errors.
1620         (captured_main): Use TRY/CATCH instead of catch_errors.
1621         * objc-lang.c (objc_submethod_helper_data)
1622         (find_objc_msgcall_submethod_helper): Delete.
1623         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
1624         catch_errors.
1625         * record-full.c (record_full_message): Return void.
1626         (record_full_message_args, record_full_message_wrapper): Delete.
1627         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
1628         instead of catch_errors.
1629         * solib-aix.c (solib_aix_open_symbol_file_object): Change
1630         parameter type to int.
1631         * solib-darwin.c (open_symbol_file_object): Ditto.
1632         * solib-dsbt.c (open_symbol_file_object): Ditto.
1633         * solib-frv.c (open_symbol_file_object): Ditto.
1634         * solib-svr4.c (open_symbol_file_object): Ditto.
1635         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
1636         * solib.c (update_solib_list): Use TRY/CATCH instead of
1637         catch_errors.
1638         * solist.h (struct target_so_ops) <open_symbol_file_object>:
1639         Change type.
1640         * symmisc.c (struct print_symbol_args): Remove.
1641         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
1642         (print_symbol): Change type.
1643         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
1644         and remove parameters.
1645         (catch_errors): New.
1646         (get_windows_debug_event): Adjust.
1647
1648 2017-10-09  Tom Tromey  <tom@tromey.com>
1649
1650         * mi/mi-main.c (free_splay_tree): Remove.
1651         (list_available_thread_groups): Use splay_tree_up.
1652         * common/gdb_splay_tree.h: New file.
1653
1654 2017-10-09  Tom Tromey  <tom@tromey.com>
1655
1656         * mi/mi-main.c (do_nothing): Remove.
1657         (list_available_thread_groups): Update.
1658
1659 2017-10-09  Pedro Alves  <palves@redhat.com>
1660
1661         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
1662         reading registers when switching context.
1663
1664 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
1665
1666         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
1667         (fbsd_convert_siginfo): Likewise.
1668         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
1669
1670 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
1671
1672         * configure.ac (try_guile_versions): Remove guile-2.2.
1673         * configure: Regenerate.
1674
1675 2017-10-09  Tom Tromey  <tom@tromey.com>
1676
1677         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
1678         (COMPILE.pre): Use $(CXX).
1679
1680 2017-10-09  Pedro Alves  <palves@redhat.com>
1681
1682         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
1683         Use bool.
1684         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1685         * cp-support.h (cp_remove_params): Now returns a
1686         gdb::unique_xmalloc_ptr.
1687         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
1688         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
1689         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
1690         returning a gdb::unique_xmalloc_ptr.
1691         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1692         * stack.c (find_frame_funname): Adjust to cp_remove_params
1693         returning a gdb::unique_xmalloc_ptr.
1694
1695 2017-10-08  Tom Tromey  <tom@tromey.com>
1696
1697         * dwarf2read.c (dwarf2_get_dwz_file): Use
1698         gdb::unique_xmalloc_ptr.
1699         (find_slot_in_mapped_hash): Likewise.
1700         (dwarf2_physname): Likewise.
1701         (create_dwo_unit_in_dwp_v1): Use std::string.
1702         (create_dwo_unit_in_dwp_v2): Likewise.
1703         (lookup_dwo_cutu): Likewise.
1704         (inherit_abstract_dies): Use std::vector.
1705         (read_array_type): Likewise.
1706         (dwarf_decode_macros): Remove unused declaration.
1707         (unsigned_int_compar): Remove.
1708         (dwarf2_build_psymtabs_hard): Use scoped_restore.
1709         (psymtabs_addrmap_cleanup): Remove.
1710
1711 2017-10-08  Tom Tromey  <tom@tromey.com>
1712
1713         * frame-unwind.c (frame_unwind_try_unwinder): Update.
1714         * frame.h (frame_cleanup_after_sniffer): Declare.
1715         (frame_prepare_for_sniffer): Return void.
1716         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
1717         type of argument.
1718         (frame_prepare_for_sniffer): Return void.
1719
1720 2017-10-08  Tom Tromey  <tom@tromey.com>
1721
1722         * utils.h (make_cleanup_value_free): Remove.
1723         * utils.c (do_value_free, struct cleanup): Remove.
1724         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
1725         Use gdb_value_up.
1726         * value.h (struct value_deleter): New.
1727         (gdb_value_up): New typedef.
1728
1729 2017-10-08  Tom Tromey  <tom@tromey.com>
1730
1731         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
1732         (make_cleanup_free_search_symbols): Remove.
1733         (search_symbols): Return std::vector.
1734         (symbol_search::compare_search_syms): Now member of
1735         symbol_search.  Change arguments.
1736         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
1737         (symtab_symbol_info, rbreak_command): Update.
1738         * symtab.h (struct symbol_search) <next>: Remove.
1739         Add constructors.
1740         (symbol_search::operator<): New function.
1741         (symbol_search::operator==): New function.
1742         (search_symbols): Remove std::vector.
1743         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
1744         (symbol_search::compare_search_syms): Declare.
1745
1746 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1747
1748         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
1749         arch/aarch64-insn.o.
1750         Remove one rule.
1751         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
1752
1753 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1754
1755         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
1756         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
1757         arch/arm-linux.o respectively.
1758         * configure.tgt: Likewise.
1759
1760 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1761
1762         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
1763         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
1764
1765 2017-10-06  Pedro Alves  <palves@redhat.com>
1766
1767         * windows-nat.c: Include <algorithm>.
1768
1769 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1770
1771         * configure.tgt (i386_tobjs): New variable.
1772         (amd64_tobjs): New variable.
1773         Set $cpu_obs and $os_obs.
1774
1775 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1776
1777         * Makefile.in (CONFIG_SRC_SUBDIR): New.
1778         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
1779         (clean): Remove object files and dependency files.
1780         (distclean): Remove the directory.
1781         * configure.ac: Invoke AC_CONFIG_COMMANDS.
1782         * configure: Re-generated.
1783         * configure.tgt: Replace amd64.o with arch/amd64.o.
1784
1785 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
1786
1787         PR build/22188
1788         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
1789         and SETEND.
1790
1791 2017-10-05  Pedro Alves  <palves@redhat.com>
1792
1793         * linux-nat.c (linux_child_follow_fork): When following the parent
1794         and detaching the child, consult the parent thread's architecture
1795         instead of the child's.
1796
1797 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
1798
1799         * ax.h: Do not include "doublest.h".
1800         (union agent_val): Remove.
1801
1802 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
1803
1804         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
1805         (decimal_to_string): Return std::string object.
1806         (decimal_from_string): Accept std::string object.  Return bool.
1807         (decimal_from_integral, decimal_from_doublest): Remove.
1808         (decimal_from_longest): Add prototype.
1809         (decimal_from_ulongest): Likewise.
1810         (decimal_to_longest): Likewise.
1811         (decimal_from_doublest): Likewise.
1812         * dfp.c: Do not include "gdbtypes.h" or "value.h".
1813         (MAX_DECIMAL_STRING): Move here.
1814         (decimal_to_string): Return std::string object.
1815         (decimal_from_string): Accept std::string object.  Return bool.
1816         (decimal_from_integral): Remove, replace by ...
1817         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
1818         (decimal_to_longest): New function.
1819         (decimal_from_floating): Remove, replace by ...
1820         (decimal_from_doublest): ... this new function.
1821         (decimal_to_doublest): Update to new decimal_to_string interface.
1822
1823         * value.c (unpack_long): Use decimal_to_longest.
1824         * valops.c (value_cast): Use decimal_from_doublest instead of
1825         decimal_from_floating.  Use decimal_from_[u]longest isntead of
1826         decimal_from_integral.
1827         * valarith.c (value_args_as_decimal): Likewise.
1828         * valprint.c (print_decimal_floating): Update to new
1829         decimal_to_string interface.
1830         * printcmd.c (printf_decfloat): Likewise.
1831         * c-exp.y (parse_number): Update to new decimal_from_string interface.
1832
1833 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
1834
1835         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
1836         * gdbtypes.c: Include "floatformat.h".
1837         * value.c: Likewise.
1838         * m68k-tdep.c: Likewise.
1839
1840         * findvar.c: Do not include "floatformat.h".
1841         * amd64-darwin-tdep.c: Likewise.
1842         * arm-linux-tdep.c: Likewise.
1843         * i386-darwin-tdep.c: Likewise.
1844         * i387-tdep.c: Likewise.
1845         * m68k-linux-tdep.c: Likewise.
1846         * mep-tdep.c: Likewise.
1847         * mips-tdep.c: Likewise.
1848         * nios2-tdep.c: Likewise.
1849         * s390-linux-tdep.c: Likewise.
1850         * sparc-obsd-tdep.c: Likewise.
1851         * sparc-tdep.c: Likewise.
1852         * sparc64-tdep.c: Likewise.
1853         * spu-tdep.c: Likewise.
1854         * tic6x-tdep.c: Likewise.
1855         * tilegx-tdep.c: Likewise.
1856         * vax-tdep.c: Likewise.
1857         * xstormy16-tdep.c: Likewise.
1858         * xtensa-tdep.c: Likewise.
1859
1860         * top.c: Do not include "doublest.h".
1861         * aarch64-tdep.c: Likewise.
1862         * alpha-tdep.c: Likewise.
1863         * arm-linux-tdep.c: Likewise.
1864         * m68k-linux-tdep.c: Likewise.
1865         * tilegx-tdep.c: Likewise.
1866         * xstormy16-tdep.c: Likewise.
1867
1868 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
1869
1870         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
1871         (mipsn32_fbsd_sigframe): Define.
1872         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
1873         for FreeBSD/mipsn32.
1874
1875 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
1876
1877         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
1878         AT_HWCAP.
1879
1880 2017-10-05  Tristan Gingold  <tgingold@free.fr>
1881
1882         * MAINTAINERS (Misc): Update my email address.
1883
1884 2017-10-04  Pedro Alves  <palves@redhat.com>
1885
1886         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
1887         it instead of target_gdbarch.
1888         (get_remote_state, get_remote_packet_size): Adjust
1889         get_remote_arch_state calls, passing down target_gdbarch
1890         explicitly.
1891         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
1892         'gdbarch' and use it instead of target_gdbarch.
1893         (get_memory_packet_size): Adjust get_remote_arch_state calls,
1894         passing down target_gdbarch explicitly.
1895         (struct stop_reply) <arch>: New field.
1896         (remote_parse_stop_reply): Use the stopped thread's architecture,
1897         not the current inferior's.  Save the architecture in the
1898         stop_reply.
1899         (process_stop_reply): Use the stop reply's architecture.
1900         (process_g_packet, remote_fetch_registers)
1901         (remote_prepare_to_store, store_registers_using_G)
1902         (remote_store_registers): Adjust get_remote_arch_state calls,
1903         using the regcache's architecture.
1904         (remote_get_trace_status): Adjust get_remote_arch_state calls,
1905         passing down target_gdbarch explicitly.
1906         * spu-multiarch.c (spu_thread_architecture): Defer to the target
1907         beneath instead of calling target_gdbarch.
1908         * target.c (default_thread_architecture): Use the specified
1909         inferior's architecture, instead of the current inferior's
1910         architecture (via target_gdbarch).
1911
1912 2017-10-04  Pedro Alves  <palves@redhat.com>
1913
1914         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
1915         case.
1916         (regcache_print): Handle !target_has_registers here instead.
1917
1918 2017-10-04  Pedro Alves  <palves@redhat.com>
1919
1920         * frame.c (create_test_frame): Delete.
1921         * frame.h (create_test_frame): Delete.
1922         * gdbarch-selftests.c: Include gdbthread.h and target.h.
1923         (class regcache_test): Delete.
1924         (test_target_has_registers, test_target_has_stack)
1925         (test_target_has_memory, test_target_prepare_to_store)
1926         (test_target_store_registers): New functions.
1927         (test_target_ops): New class.
1928         (register_to_value_test): Error out if there's already a
1929         process_stratum (or higher) target pushed.  Create a fuller mock
1930         environment, with mock target_ops, inferior, address space, thread
1931         and inferior_ptid.
1932         * progspace.c (struct address_space): Move to ...
1933         * progspace.h (struct address_space): ... here.
1934         * regcache.h (regcache::~regcache, regcache::raw_write)
1935         [GDB_SELF_TEST]: No longer virtual.
1936
1937 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
1938
1939         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
1940
1941 2017-10-04  Pedro Alves  <palves@redhat.com>
1942
1943         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
1944         out of 'between TRY and CATCH'.
1945
1946 2017-10-04  Pedro Alves  <palves@redhat.com>
1947
1948         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
1949         * common/common-exceptions.h (TRY): Open an outermost scope.
1950         Expand intro comment.
1951         (CATCH): Reindent.
1952         (END_CATCH): Close the outermost scope.
1953         * completer.c (complete_line_internal): Add missing END_CATCH.
1954
1955 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1956
1957         * NEWS (Changes since GDB 8.0): Add entry about new
1958         'set-cwd-on-gdbserver' feature.
1959         (New remote packets): Add entry for QSetWorkingDir.
1960         * common/common-inferior.h (set_inferior_cwd): New prototype.
1961         * infcmd.c (set_inferior_cwd): Remove "static".
1962         (show_cwd_command): Expand text to include remote debugging.
1963         * remote.c: Add PACKET_QSetWorkingDir.
1964         (remote_protocol_features) <QSetWorkingDir>: New entry for
1965         PACKET_QSetWorkingDir.
1966         (extended_remote_set_inferior_cwd): New function.
1967         (extended_remote_create_inferior): Call
1968         "extended_remote_set_inferior_cwd".
1969         (_initialize_remote): Call "add_packet_config_cmd" for
1970         QSetWorkingDir.
1971
1972 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1973
1974         * NEWS (New commands): Mention "set/show cwd".
1975         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
1976         "cd" command's help text.
1977         * common/common-inferior.h (get_inferior_cwd): New prototype.
1978         * infcmd.c (inferior_cwd_scratch): New global variable.
1979         (set_inferior_cwd): New function.
1980         (get_inferior_cwd): Likewise.
1981         (set_cwd_command): Likewise.
1982         (show_cwd_command): Likewise.
1983         (_initialize_infcmd): Add "set/show cwd" commands.
1984         * inferior.h (class inferior) <cwd>: New field.
1985         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
1986         (fork_inferior): Change inferior's cwd before its execution.
1987         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
1988         to CreateProcess.
1989
1990 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1991
1992         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
1993         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
1994         (COMMON_OBS): Add gdb_tilde_expand.o.
1995         * common/gdb_tilde_expand.c: New file.
1996         * common/gdb_tilde_expand.h: Likewise.
1997
1998 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
1999
2000         * gdbarch.sh (objfile): Remove duplicate declaration.
2001         * gdbarch.h: Regenerate.
2002
2003 2017-10-03  Tom Tromey  <tom@tromey.com>
2004
2005         * utils.c (internal_vproblem): Use string_vprintf.
2006
2007 2017-10-03  Tom Tromey  <tom@tromey.com>
2008
2009         * printcmd.c (info_symbol_command): Use std::string.
2010
2011 2017-10-03  Tom Tromey  <tom@tromey.com>
2012
2013         * top.c (gdb_safe_append_history): Use std::string.
2014
2015 2017-10-03  Tom Tromey  <tom@tromey.com>
2016
2017         * event-top.c (stdin_event_handler): Update.
2018         * main.c (captured_main_1): Update.
2019         * top.h (make_delete_ui_cleanup): Remove.
2020         (struct ui): Add constructor and destructor.
2021         (new_ui, delete_ui): Remove.
2022         * top.c (make_delete_ui_cleanup): Remove.
2023         (new_ui_command): Use std::unique_ptr.
2024         (delete_ui_cleanup): Remove.
2025         (ui::ui): Rename from new_ui.  Update.
2026         (free_ui): Remove.
2027         (ui::~ui): Rename from delete_ui.  Update.
2028
2029 2017-10-03  Tom Tromey  <tom@tromey.com>
2030
2031         * symfile.c (load_progress): Use gdb::byte_vector.
2032
2033 2017-10-03  Tom Tromey  <tom@tromey.com>
2034
2035         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
2036         declaration.
2037         * printcmd.c (x_command): Remove unused declaration.
2038         * symfile.c (symbol_file_command): Remove unused declaration.
2039
2040 2017-10-03  Tom Tromey  <tom@tromey.com>
2041
2042         * utils.c (internal_vproblem): Use std::string.
2043         (defaulted_query): Likewise.
2044
2045 2017-10-03  Tom Tromey  <tom@tromey.com>
2046
2047         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
2048         * top.c (execute_command_to_string): Update.
2049         * utils.c (make_cleanup_restore_page_info): Remove.
2050         (do_restore_page_info_cleanup): Remove.
2051         (set_batch_flag_and_restore_page_info):
2052         New.
2053         (make_cleanup_restore_page_info): Remove.
2054         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2055         (~set_batch_flag_and_restore_page_info): New
2056         (make_cleanup_restore_uinteger): Remove.
2057         (make_cleanup_restore_integer): Remove.
2058         (struct restore_integer_closure): Remove.
2059         (restore_integer): Remove.
2060         * utils.h (struct set_batch_flag_and_restore_page_info): New
2061         class.
2062         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2063         (make_cleanup_restore_page_info): Remove.
2064         (make_cleanup_restore_uinteger) Remove.
2065         (make_cleanup_restore_integer) Remove.
2066
2067 2017-10-03  Tom Tromey  <tom@tromey.com>
2068
2069         * record-full.h (record_full_gdb_operation_disable_set): Return
2070         scoped_restore_tmpl<int>.
2071         * infrun.c (adjust_pc_after_break): Update.
2072         (handle_signal_stop): Update.
2073         * record-full.c (record_full_gdb_operation_disable_set): Return
2074         scoped_restore_tmpl<int>.
2075         (record_full_wait_1, record_full_insert_breakpoint)
2076         (record_full_remove_breakpoint, record_full_save)
2077         (record_full_goto_insn): Update.
2078
2079 2017-10-02  Tom Tromey  <tom@tromey.com>
2080
2081         PR rust/22236:
2082         * rust-lang.c (rust_val_print_str): New function.
2083         (val_print_struct): Call it.
2084         (rust_subscript): Preserve name of slice type.
2085
2086 2017-10-02  Tom Tromey  <tom@tromey.com>
2087
2088         * rust-lang.c (rust_subscript): Handle slices in
2089         EVAL_AVOID_SIDE_EFFECTS case.
2090
2091 2017-10-02  Tom Tromey  <tom@tromey.com>
2092
2093         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
2094
2095 2017-10-02  Tom Tromey  <tom@tromey.com>
2096
2097         * rust-lang.h (rust_slice_type): Add "extern".
2098
2099 2017-10-02  Tom Tromey  <tom@tromey.com>
2100             Pedro Alves  <palves@redhat.com>
2101
2102         * ada-lang.h (ada_exc_info::operator<): Make const.
2103         (ada_exc_info::operator==): Make const.
2104         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
2105         Make const.
2106
2107 2017-09-29  Tom Tromey  <tom@tromey.com>
2108
2109         * target.c (read_whatever_is_readable): Change type of "result".
2110         Update.
2111         (free_memory_read_result_vector): Remove.
2112         (read_memory_robust): Change return type.  Update.
2113         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
2114         bin2hex, std::string.
2115         * target.h (memory_read_result_s): Remove typedef.
2116         (free_memory_read_result_vector): Remove.
2117         (read_memory_robust): Return std::vector.
2118
2119 2017-09-29  Tom Tromey  <tom@tromey.com>
2120
2121         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
2122
2123 2017-09-29  Tom Tromey  <tom@tromey.com>
2124
2125         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
2126         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
2127         operator< and operator==.
2128         (ada_exceptions_list): Return a std::vector.
2129         * ada-lang.c (ada_exc_info::operator<): Rename from
2130         compare_ada_exception_info.
2131         (ada_exc_info::operator==): New.
2132         (sort_remove_dups_ada_exceptions_list): Change type of
2133         "exceptions".
2134         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
2135         (ada_add_global_exceptions): Likewise.
2136         (ada_exceptions_list_1): Return a std::vector.
2137         (ada_exceptions_list): Likewise.
2138
2139 2017-09-29  Tom Tromey  <tom@tromey.com>
2140
2141         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
2142         'std::set *'.
2143         (print_one_inferior): Update.
2144         (free_vector_of_ints): Remove.
2145         (list_available_thread_groups): Change "ids" to std::set.
2146         (mi_cmd_list_thread_groups): Update.
2147         (struct collect_cores_data) <core>: Now a std::set.
2148         (collect_cores): Update.
2149         (unique): Remove.
2150         (print_one_inferior): Update.
2151
2152 2017-09-29  Tom Tromey  <tom@tromey.com>
2153
2154         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
2155         (mi_execute_async_cli_command): Likewise.
2156         (mi_cmd_trace_frame_collected): Use field_fmt.
2157
2158 2017-09-29  Tom Tromey  <tom@tromey.com>
2159
2160         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
2161         gdb::byte_vector.
2162
2163 2017-09-29  Tom Tromey  <tom@tromey.com>
2164
2165         * mi/mi-parse.c (mi_parse): Remove unused declaration.
2166
2167 2017-09-29  Tom Tromey  <tom@tromey.com>
2168
2169         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
2170
2171 2017-09-29  Tom Tromey  <tom@tromey.com>
2172
2173         * varobj.h (varobj_gen_name): Return std::string.
2174         * varobj.c (varobj_gen_name): Return std::string.
2175         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
2176         (mi_cmd_var_delete): Don't copy "name".
2177
2178 2017-09-29  Tom Tromey  <tom@tromey.com>
2179
2180         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
2181         (mi_cmd_break_insert_1): Update.
2182
2183 2017-09-29  Tom Tromey  <tom@tromey.com>
2184
2185         * target.h (make_scoped_defer_target_commit_resume): Update.
2186         * target.c (make_scoped_defer_target_commit_resume): Rename from
2187         make_cleanup_defer_target_commit_resume.  Return a
2188         scoped_restore.
2189         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
2190
2191 2017-09-29  Tom Tromey  <tom@tromey.com>
2192
2193         * main.c (captured_main_1): Remove unused declaration.
2194         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
2195
2196 2017-09-29  Tom Tromey  <tom@tromey.com>
2197
2198         * symtab.c (search_symbols): Remove unused outer cleanup.
2199         (make_source_files_completion_list): Remove unused declaration.
2200
2201 2017-09-29  Tom Tromey  <tom@tromey.com>
2202
2203         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
2204
2205 2017-09-29  Tom Tromey  <tom@tromey.com>
2206
2207         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
2208         gdb::byte_vector.
2209
2210 2017-09-29  Tom Tromey  <tom@tromey.com>
2211
2212         * complaints.c (vcomplaint): Use std::string.
2213
2214 2017-09-29  Tom Tromey  <tom@tromey.com>
2215
2216         * tracepoint.c (trace_variable_command): Use std::string.
2217         (encode_actions_1): Remove unused declarations.
2218         (create_tsv_from_upload): Use std::string.
2219
2220 2017-09-29  Tom Tromey  <tom@tromey.com>
2221
2222         * cp-support.c (gdb_demangle): Use std::string.
2223
2224 2017-09-29  Tom Tromey  <tom@tromey.com>
2225
2226         * stack.c (parse_frame_specification): Use std::string
2227         (info_frame_command): Use gdb::unique_xmalloc_ptr.
2228
2229 2017-09-29  Tom Tromey  <tom@tromey.com>
2230
2231         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
2232
2233 2017-09-29  Tom Tromey  <tom@tromey.com>
2234
2235         * utils.c (vfprintf_maybe_filtered): Use std::string.
2236         (vfprintf_unfiltered): Likewise.
2237
2238 2017-09-29  Tom Tromey  <tom@tromey.com>
2239
2240         * event-top.c (top_level_prompt): Return std::string.
2241         (display_gdb_prompt): Update.
2242
2243 2017-09-29  Tom Tromey  <tom@tromey.com>
2244
2245         * unittests/common-utils-selftests.c (format): New function.
2246         (string_vprintf_tests): New function.
2247         (_initialize_common_utils_selftests): Register new tests.
2248         * common/common-utils.c (string_vprintf): New function.
2249         * common/common-utils.h (string_vprintf): Declare.
2250
2251 2017-09-29  Pedro Alves  <palves@redhat.com>
2252
2253         * common/rsp-low.c (unpack_varlen_hex): Constify.
2254         * common/rsp-low.h (unpack_varlen_hex): Constify.
2255         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
2256         Constify.
2257         * remote.c (remote_set_permissions, read_ptid)
2258         (remote_current_thread, remote_get_threads_with_qthreadinfo)
2259         (remote_static_tracepoint_marker_at)
2260         (remote_static_tracepoint_markers_by_strid)
2261         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
2262         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
2263         (parse_tracepoint_definition, parse_tsv_definition)
2264         (parse_static_tracepoint_marker_definition): Constify.
2265         * tracepoint.h (parse_static_tracepoint_marker_definition)
2266         (parse_trace_status, parse_tracepoint_status)
2267         (parse_tracepoint_definition, parse_tsv_definition): Constify.
2268
2269 2017-09-29  Pedro Alves  <palves@redhat.com>
2270
2271         * remote.c (target_buf, target_buf_size): Delete.
2272         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
2273         Use the connection's packet buffer instead.
2274         All callers adjusted.
2275         (_initialize_remote): Remove references to target_buf and
2276         target_buf_size.
2277
2278 2017-09-28  Pedro Alves  <palves@redhat.com>
2279
2280         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2281         unittests/common-utils-selftests.c.
2282         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
2283         (COMMON_OBS): Remove utils-selftests.o.
2284         * utils-selftests.c: Move to ...
2285         * unittests/common-utils-selftests.c: ... here and rename self
2286         test to "string_printf".
2287
2288 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
2289
2290         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
2291         having NULL cus or tus.
2292
2293 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2294
2295         * arm-tdep.c: (convert_from_extended): Remove.
2296         (convert_to_extended): Likewise.
2297         (arm_extract_return_value): Use convert_typed_floating.
2298         (arm_store_return_value): Likewise.
2299
2300         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2301         * sh-tdep.c: Do not include "floatformat.h".
2302         (sh_littlebyte_bigword_type): New function.
2303         (sh_register_convert_to_virtual): Use convert_typed_floating.
2304         (sh_register_convert_to_raw): Likewise.
2305         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2306         (sh64_littlebyte_bigword_type): New function.
2307         (sh64_extract_return_value): Use convert_typed_floating.
2308         (sh64_register_convert_to_virtual): Likewise.
2309         (sh64_register_convert_to_raw): Likewise.
2310
2311 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2312
2313         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
2314         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
2315
2316         * gdbtypes.h (union type_specific): Make field floatformat hold
2317         just a single struct floatformat, not an array.
2318         (floatformat_from_type): Move here.
2319         * gdbtypes.c (floatformat_from_type): Move here.  Update to
2320         changed TYPE_FLOATFORMAT definition.
2321         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
2322         (recursive_dump_type): Likewise.
2323         (init_float_type): Install correct floatformat for byte order.
2324         (arch_float_type): Likewise.
2325
2326 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2327
2328         * gdbtypes.c (init_type): Change incoming argument from
2329         length-in-bytes to length-in-bits.  Assert length is a
2330         multiple of TARGET_CHAR_BITS.
2331         (arch_type, arch_flags_type): Likewise.
2332         (init_integer_type): Update call to init_type.
2333         (init_character_type): Likewise.
2334         (init_boolean_type): Likewise.
2335         (init_float_type): Likewise.
2336         (init_decfloat_type): Likewise.
2337         (init_complex_type): Likewise.
2338         (init_pointer_type): Likewise.
2339         (objfile_type): Likewise.
2340         (arch_integer_type): Update call to arch_type.
2341         (arch_character_type): Likewise.
2342         (arch_boolean_type): Likewise.
2343         (arch_float_type): Likewise.
2344         (arch_decfloat_type): Likewise.
2345         (arch_complex_type): Likewise.
2346         (arch_pointer_type): Likewise.
2347         (gdbtypes_post_init): Likewise.
2348
2349         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
2350         (read_base_type): Likewise.
2351         * mdebugread.c (basic_type): Likewise.
2352         * stabsread.c (dbx_init_float_type): Likewise.
2353         (rs6000_builtin_type): Likewise.
2354         (read_range_type): Likewise.  Also, fix call to init_integer_type
2355         with erroneous length argument.
2356
2357         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
2358         * d-lang.c (build_d_types): Likewise.
2359         * f-lang.c (build_fortran_types): Likewise.
2360         * go-lang.c (build_go_types): Likewise.
2361         * opencl-lang.c (build_opencl_types): Likewise.
2362         * jit.c (finalize_symtab): Likewise.
2363         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2364         (build_std_type_info_type): Likewise.
2365         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
2366         update call to arch_flags_type.
2367
2368         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
2369         arch_type.
2370         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
2371         * windows-tdep.c (windows_get_tlb_type): Likewise.
2372
2373         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
2374         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
2375         * m32c-tdep.c (make_types): Likewise.
2376         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
2377         (rl78_psw_type): Update call to arch_flags_type.
2378         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
2379         * rx-tdep.c (rx_psw_type): Likewise.
2380         (rx_fpsw_type): Likewise.
2381         * sparc-tdep.c (sparc_psr_type): Likewise.
2382         (sparc_fsr_type): Likewise.
2383         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
2384         (sparc64_ccr_type): Likewise.
2385         (sparc64_fsr_type): Likewise.
2386         (sparc64_fprs_type): Likewise.
2387
2388 2017-09-27  Tom Tromey  <tom@tromey.com>
2389
2390         * findcmd.c (find_command): Constify.
2391
2392 2017-09-27  Tom Tromey  <tom@tromey.com>
2393
2394         * ada-tasks.c (task_command_1, task_command): Constify.
2395
2396 2017-09-27  Tom Tromey  <tom@tromey.com>
2397
2398         * symtab.c (maintenance_print_symbol_cache)
2399         (maintenance_flush_symbol_cache)
2400         (maintenance_print_symbol_cache_statistics): Constify.
2401
2402 2017-09-27  Tom Tromey  <tom@tromey.com>
2403
2404         * inferior.c (detach_inferior_command, kill_inferior_command)
2405         (inferior_command): Constify.
2406
2407 2017-09-27  Tom Tromey  <tom@tromey.com>
2408
2409         * regcache.c (regcache_print, maintenance_print_registers)
2410         (maintenance_print_raw_registers)
2411         (maintenance_print_cooked_registers)
2412         (maintenance_print_register_groups)
2413         (maintenance_print_remote_registers): Constify.
2414
2415 2017-09-27  Tom Tromey  <tom@tromey.com>
2416
2417         * printcmd.c (map_display_numbers, undisplay_command)
2418         (enable_disable_display_command, enable_display_command)
2419         (disable_display_command): Constify.
2420
2421 2017-09-27  Tom Tromey  <tom@tromey.com>
2422
2423         * breakpoint.h (delete_command): Don't declare.
2424         * breakpoint.c (delete_command, enable_once_command)
2425         (enable_count_command, enable_delete_command, breakpoint_1)
2426         (maintenance_info_breakpoints, stopin_command, stopat_command)
2427         (delete_command, delete_trace_command, save_breakpoints)
2428         (save_breakpoints_command, save_tracepoints_command): Constify.
2429
2430 2017-09-27  Tom Tromey  <tom@tromey.com>
2431
2432         * macrocmd.c (macro_expand_command, macro_expand_once_command)
2433         (skip_ws, extract_identifier, macro_define_command)
2434         (macro_undef_command, macro_list_command): Constify.
2435
2436 2017-09-27  Tom Tromey  <tom@tromey.com>
2437
2438         * infcmd.c (environment_info, set_environment_command)
2439         (unset_environment_command, path_info, info_proc_cmd_1)
2440         (info_proc_cmd_mappings, info_proc_cmd_stat)
2441         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
2442         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
2443
2444 2017-09-27  Tom Tromey  <tom@tromey.com>
2445
2446         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
2447         Constify.
2448
2449 2017-09-27  Tom Tromey  <tom@tromey.com>
2450
2451         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
2452
2453 2017-09-27  Tom Tromey  <tom@tromey.com>
2454
2455         * demangle.c (demangle_command): Constify.
2456
2457 2017-09-27  Tom Tromey  <tom@tromey.com>
2458
2459         * progspace.c (maintenance_info_program_spaces_command):
2460         Constify.
2461
2462 2017-09-27  Tom Tromey  <tom@tromey.com>
2463
2464         * compile/compile.c (check_raw_argument, compile_file_command)
2465         (compile_code_command, compile_print_command): Constify.
2466
2467 2017-09-27  Tom Tromey  <tom@tromey.com>
2468
2469         * reggroups.c (maintenance_print_reggroups): Constify.
2470
2471 2017-09-27  Tom Tromey  <tom@tromey.com>
2472
2473         * dwarf2read.c (save_gdb_index_command): Constify.
2474
2475 2017-09-27  Tom Tromey  <tom@tromey.com>
2476
2477         * stap-probe.c (info_probes_stap_command): Constify.
2478
2479 2017-09-27  Tom Tromey  <tom@tromey.com>
2480
2481         * fork-child.c (unset_exec_wrapper_command): Constify.
2482
2483 2017-09-27  Tom Tromey  <tom@tromey.com>
2484
2485         * btrace.c (get_uint, get_context_size, no_chunk)
2486         (maint_btrace_packet_history_cmd)
2487         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
2488         (maint_info_btrace_cmd): Constify.
2489
2490 2017-09-27  Tom Tromey  <tom@tromey.com>
2491
2492         * reverse.c (delete_bookmark_command): Constify.
2493
2494 2017-09-27  Tom Tromey  <tom@tromey.com>
2495
2496         * remote.c (set_memory_packet_size)
2497         (set_memory_write_packet_size, show_memory_write_packet_size)
2498         (set_memory_read_packet_size, show_memory_read_packet_size)
2499         (compare_sections_command, packet_command, remote_put_command)
2500         (remote_get_command, remote_delete_command): Constify.
2501
2502 2017-09-27  Tom Tromey  <tom@tromey.com>
2503
2504         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
2505         (set_mipsfpu_double_command, set_mipsfpu_none_command)
2506         (set_mipsfpu_auto_command): Constify.
2507
2508 2017-09-27  Tom Tromey  <tom@tromey.com>
2509
2510         * cli/cli-cmds.h (cd_command): Constify.
2511         * cli/cli-cmds.c (cd_command): Constify.
2512
2513 2017-09-27  Tom Tromey  <tom@tromey.com>
2514
2515         * thread.c (thread_name_command, thread_find_command): Constify.
2516
2517 2017-09-27  Tom Tromey  <tom@tromey.com>
2518
2519         * probe.c (enable_probes_command, disable_probes_command):
2520         Constify.
2521
2522 2017-09-27  Tom Tromey  <tom@tromey.com>
2523
2524         * symfile.c (symbol_file_command): Constify.
2525         * gdbcore.h (deprecated_file_changed_hook): Constify.
2526         * exec.c (deprecated_file_changed_hook, exec_file_command)
2527         (file_command): Constify.
2528         * defs.h (symbol_file_command): Constify.
2529
2530 2017-09-27  Tom Tromey  <tom@tromey.com>
2531
2532         * remote-fileio.c (set_system_call_allowed)
2533         (show_system_call_allowed): Constify.
2534
2535 2017-09-27  Tom Tromey  <tom@tromey.com>
2536
2537         * tracepoint.c (delete_trace_variable_command)
2538         (tfind_end_command, tfind_start_command, tfind_pc_command)
2539         (tfind_tracepoint_command, tfind_line_command)
2540         (tfind_range_command, tfind_outside_command): Constify.
2541
2542 2017-09-27  Tom Tromey  <tom@tromey.com>
2543
2544         * ax-gdb.c (maint_agent_printf_command, agent_command)
2545         (agent_eval_command): Constify.
2546
2547 2017-09-27  Tom Tromey  <tom@tromey.com>
2548
2549         * tracepoint.c (info_scope_command): Constify.
2550         * python/python.c (gdbpy_decode_line): Constify.
2551         * python/py-breakpoint.c (bppy_init): Constify.
2552         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
2553         * location.h: (new_linespec_location)
2554         (string_to_event_location_basic, string_to_event_location):
2555         Constify.
2556         * location.c (new_linespec_location)
2557         (string_to_event_location_basic, string_to_event_location):
2558         Constify.
2559         * linespec.h (decode_line_with_current_source)
2560         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
2561         * linespec.c (linespec_lex_to_end)
2562         (decode_line_with_current_source)
2563         (decode_line_with_last_displayed): Constify.
2564         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
2565         Constify.
2566         * cli/cli-cmds.c (edit_command, list_command): Constify.
2567         * breakpoint.h (until_break_command, watch_command_wrapper)
2568         (awatch_command_wrapper, rwatch_command_wrapper)
2569         (init_ada_exception_breakpoint): Constify.
2570         * breakpoint.c (break_command_1, dprintf_command)
2571         (break_range_command, watch_command_wrapper)
2572         (rwatch_command_wrapper, awatch_command_wrapper)
2573         (until_break_command, init_ada_exception_breakpoint)
2574         (strace_marker_create_sals_from_location, trace_command)
2575         (ftrace_command, strace_command, struct tracepoint): Constify.
2576         * ax-gdb.c (agent_command_1): Constify.
2577         * ada-lang.c (ada_exception_sal): Constify.
2578
2579 2017-09-27  Tom Tromey  <tom@tromey.com>
2580
2581         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
2582         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
2583         (get_context_size, no_chunk, get_insn_history_modifiers)
2584         (cmd_record_insn_history, get_call_history_modifiers)
2585         (cmd_record_call_history): Constify.
2586
2587 2017-09-27  Tom Tromey  <tom@tromey.com>
2588
2589         * source.c (show_substitute_path_command)
2590         (unset_substitute_path_command, set_substitute_path_command):
2591         Constify.
2592
2593 2017-09-27  Tom Tromey  <tom@tromey.com>
2594
2595         * typeprint.c (maintenance_print_type): Constify.
2596         * maint.c (maintenance_dump_me, maintenance_demangle)
2597         (maintenance_time_display, maintenance_info_sections)
2598         (maintenance_print_statistics, maintenance_deprecate)
2599         (maintenance_undeprecate): Constify.
2600         (maintenance_do_deprecate): Constify.  Use std::string.
2601         (maintenance_selftest): Constify.
2602         * gdbtypes.h (maintenance_print_type): Constify.
2603
2604 2017-09-27  Tom Tromey  <tom@tromey.com>
2605
2606         * hppa-tdep.c (unwind_command): Constify.
2607
2608 2017-09-27  Tom Tromey  <tom@tromey.com>
2609
2610         * target-descriptions.c (unset_tdesc_filename_cmd)
2611         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
2612         Constify.
2613
2614 2017-09-27  Tom Tromey  <tom@tromey.com>
2615
2616         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
2617
2618 2017-09-27  Tom Tromey  <tom@tromey.com>
2619
2620         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
2621
2622 2017-09-27  Tom Tromey  <tom@tromey.com>
2623
2624         * tui/tui-regs.c (tui_reg_command): Constify.
2625
2626 2017-09-27  Tom Tromey  <tom@tromey.com>
2627
2628         * skip.c (skip_file_command, skip_function_command)
2629         (skip_enable_command, skip_disable_command, skip_delete_command):
2630         Constify.
2631
2632 2017-09-27  Tom Tromey  <tom@tromey.com>
2633
2634         * record-btrace.c (cmd_record_btrace_bts_start)
2635         (cmd_record_btrace_pt_start): Constify.
2636
2637 2017-09-27  Tom Tromey  <tom@tromey.com>
2638
2639         * symmisc.c (maintenance_print_symbols)
2640         (maintenance_print_msymbols, maintenance_print_objfiles)
2641         (maintenance_info_symtabs, maintenance_check_symtabs)
2642         (maintenance_expand_symtabs, maintenance_info_line_tables):
2643         Constify.
2644
2645 2017-09-27  Tom Tromey  <tom@tromey.com>
2646
2647         * top.c (new_ui_command): Constify.
2648
2649 2017-09-27  Tom Tromey  <tom@tromey.com>
2650
2651         * symfile.c (add_symbol_file_command)
2652         (remove_symbol_file_command, list_overlays_command)
2653         (map_overlay_command, unmap_overlay_command)
2654         (overlay_auto_command, overlay_manual_command)
2655         (overlay_off_command, overlay_load_command): Constify.
2656
2657 2017-09-27  Tom Tromey  <tom@tromey.com>
2658
2659         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
2660         (info_spu_mailbox_command, info_spu_dma_command)
2661         (info_spu_proxydma_command): Constify.
2662
2663 2017-09-27  Tom Tromey  <tom@tromey.com>
2664
2665         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
2666
2667 2017-09-27  Tom Tromey  <tom@tromey.com>
2668
2669         * cli/cli-script.c (user_defined_command): Constify.
2670
2671 2017-09-27  Tom Tromey  <tom@tromey.com>
2672
2673         * cli/cli-dump.c (dump_memory_command, dump_value_command)
2674         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
2675         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
2676         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
2677         (dump_binary_value, append_binary_memory, append_binary_value):
2678         Constify.
2679         (struct dump_context) <func>: Constify.
2680         (add_dump_command): Update.
2681
2682 2017-09-27  Tom Tromey  <tom@tromey.com>
2683
2684         * cli/cli-cmds.c (show_version, show_configuration)
2685         (source_command, show_user): Constify.
2686
2687 2017-09-27  Tom Tromey  <tom@tromey.com>
2688
2689         * target.c (maintenance_print_target_stack): Constify.
2690
2691 2017-09-27  Tom Tromey  <tom@tromey.com>
2692
2693         * interps.c (interpreter_exec_cmd): Constify.
2694
2695 2017-09-27  Tom Tromey  <tom@tromey.com>
2696
2697         * record-full.c (cmd_record_full_restore): Constify.
2698
2699 2017-09-27  Tom Tromey  <tom@tromey.com>
2700
2701         * memattr.c (enable_mem_command, disable_mem_command)
2702         (delete_mem_command): Constify.
2703
2704 2017-09-27  Tom Tromey  <tom@tromey.com>
2705
2706         * value.c (show_convenience): Constify.
2707
2708 2017-09-27  Tom Tromey  <tom@tromey.com>
2709
2710         * gdbcore.h (core_file_command): Update.
2711         * corefile.c (core_file_command): Constify.
2712
2713 2017-09-27  Tom Tromey  <tom@tromey.com>
2714
2715         * user-regs.c (maintenance_print_user_registers): Constify.
2716
2717 2017-09-27  Tom Tromey  <tom@tromey.com>
2718
2719         * cp-namespace.c (maintenance_cplus_namespace): Constify.
2720
2721 2017-09-27  Tom Tromey  <tom@tromey.com>
2722
2723         * cp-support.c (first_component_command): Constify.
2724
2725 2017-09-27  Tom Tromey  <tom@tromey.com>
2726
2727         * psymtab.c (maintenance_print_psymbols)
2728         (maintenance_info_psymtabs, maintenance_check_psymtabs):
2729         Constify.
2730
2731 2017-09-27  Tom Tromey  <tom@tromey.com>
2732
2733         * windows-tdep.c (display_tib): Constify.
2734
2735 2017-09-27  Tom Tromey  <tom@tromey.com>
2736
2737         * linux-fork.c (delete_checkpoint_command)
2738         (detach_checkpoint_command): Constify.
2739
2740 2017-09-27  Tom Tromey  <tom@tromey.com>
2741
2742         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
2743
2744 2017-09-27  Tom Tromey  <tom@tromey.com>
2745
2746         * arc-tdep.c (dump_arc_instruction_command): Constify.
2747
2748 2017-09-27  Tom Tromey  <tom@tromey.com>
2749
2750         * valprint.c (set_radix, show_radix): Constify.
2751
2752 2017-09-27  Tom Tromey  <tom@tromey.com>
2753
2754         * dtrace-probe.c (info_probes_dtrace_command): Constify.
2755
2756 2017-09-27  Tom Tromey  <tom@tromey.com>
2757
2758         * command.h (not_just_help_class_command): Update.
2759         * cli/cli-decode.h (not_just_help_class_command): Update.
2760         * cli/cli-decode.c (not_just_help_class_command): Constify.
2761
2762 2017-09-27  Tom Tromey  <tom@tromey.com>
2763
2764         * gdb_bfd.c (maintenance_info_bfds): Constify.
2765
2766 2017-09-27  Tom Tromey  <tom@tromey.com>
2767
2768         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
2769         overloads.
2770         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
2771         (do_const_cfunc): New function.
2772         (cmd_cfunc_eq): New overload.
2773         (cli_user_command_p): Check do_const_cfunc.
2774         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
2775         const_cfunc.
2776         * command.h (add_cmd): Add const overload and no-function
2777         overload.
2778         (set_cmd_cfunc): Add const overload.
2779         (cmd_const_cfunc_ftype): Declare.
2780         (cmd_cfunc_eq): Add const overload.
2781         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
2782         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
2783         overload.
2784
2785 2017-09-27  Tom Tromey  <tom@tromey.com>
2786
2787         * macroexp.c (get_next_token_for_substitution): New function.
2788         (substitute_args): Call it.  Check for __VA_OPT__.
2789
2790 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2791             Pedro Alves <palves@redhat.com>
2792
2793         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
2794         producer_is_icc_lt_14.
2795         (producer_is_icc_lt_14): New function.
2796         (check_producer): Add code for checking version of ICC.
2797         (producer_is_icc): Move to producer.c.
2798         (read_structure_type): Restrict ICC workaround to ICC<14.
2799         * producer.c: Include selftest.h.
2800         (producer_is_icc, producer_parsing_tests, _initialize_producer):
2801         New functions.
2802         * producer.h (producer_is_icc): New declaration.
2803
2804 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2805
2806         * Makefile.in (SFILES): Add producer.c.
2807         (COMMON_OBS): Add producer.o
2808         * amd64-tdep.c (producer.h): Add new include.
2809         * dwarf2read.c (producer.h): Add new include.
2810         * producer.c: New file.
2811         * producer.h: New file.
2812         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
2813         producer.c.
2814         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
2815         producer.h.
2816
2817 2017-09-26  Matthias Klose  <doko@ubuntu.com>
2818
2819         * configure.ac: Search ncursesw before ncurses.
2820         Check ncursesw/ncurses.h before ncurses/ncurses.h.
2821         * gdb_curses.h: Include <ncursesw/ncurses.h>
2822         * config.in, configure: Regenerate.
2823
2824 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2825
2826         PR gdb/22185
2827         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
2828         obsolete.
2829         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
2830         Remove i386sol2 support.
2831         * configure.nat <i386sol2>: Remove.
2832         <sol2-64>: Fold into ...
2833         <sol2>: ... this.
2834         Move common settings to default section.
2835         Add sol-thread.o.
2836         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
2837         x86_64-*-solaris2.1[0-9]*>: Rename to ...
2838         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
2839         <i[34567]86-*-solaris*>: Remove.
2840         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
2841
2842         * configure.ac: Remove wctype in libw check.
2843         (_MSE_INT_H): Don't define on Solaris 7-9.
2844         <solaris*>: Remove libthread_db.so.1 check.
2845         * configure: Regenerate.
2846         * config.in: Regenerate.
2847
2848         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
2849         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
2850         (gdb_ps_size_t): Remove.
2851         Use base types in users.
2852         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
2853
2854         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
2855
2856 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2857
2858         PR build/22206
2859         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
2860         (adi_is_addr_mapped): Likewise.
2861         (PSR_ICC): Don't redefine.
2862         (PSR_IMPL): Likewise.
2863
2864 2017-09-25  Tom Tromey  <tom@tromey.com>
2865
2866         * regcache.c (regcache::dump): Use string_printf.
2867
2868 2017-09-25  Tom Tromey  <tom@tromey.com>
2869
2870         * regcache.c (class regcache_invalidator): New.
2871         (struct register_to_invalidate): Remove.
2872         (make_cleanup_regcache_invalidate): Remove.
2873         (regcache::raw_write): Use regcache_invalidator.
2874
2875 2017-09-25  Tom Tromey  <tom@tromey.com>
2876
2877         * spu-tdep.c (spu2ppu_sniffer): Update.
2878         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
2879         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
2880         Remove.
2881         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
2882         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
2883         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
2884         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
2885         (frame_pop): Update.
2886
2887 2017-09-25  Tom Tromey  <tom@tromey.com>
2888
2889         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
2890         * regcache.h (regcache_xfree): Don't declare.
2891         * regcache.c (regcache_xfree): Remove.
2892         (do_regcache_xfree): Use delete.
2893         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
2894         * linux-fork.c (free_fork): Use delete.
2895         (fork_save_infrun_state): Likewise.
2896         * jit.c (jit_dealloc_cache): Use delete.
2897         * infrun.c (discard_infcall_suspend_state): Use delete.
2898
2899 2017-09-25  Tom Tromey  <tom@tromey.com>
2900
2901         * regcache.h (regcache_xmalloc): Don't declare.
2902         (regcache_raw_set_cached_value): Update comment.
2903         * regcache.c (regcache_xmalloc): Remove.
2904         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
2905         * jit.c (jit_frame_sniffer): Use new.
2906         * frame.c (frame_save_as_regcache): Use new.
2907
2908 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2909
2910         * NEWS: Advertise support for guarded-storage registers on IBM z.
2911
2912 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2913
2914         * s390-linux-nat.c (have_regset_gs): New static variable.
2915         (s390_linux_fetch_inferior_registers): Handle guarded-storage
2916         control block and guarded-storage broadcast control regsets.
2917         (s390_read_description): Detect whether the target has
2918         guarded-storage support, return appropriate tdesc.
2919         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
2920         (features/s390x-gs-linux64.c): Likewise.
2921         (struct gdbarch_tdep) <have_gs>: New field.
2922         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
2923         (s390_gsbc_regset): New variables.
2924         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
2925         and s390_gsbc_regset, if applicable.
2926         (s390_core_read_description): Check whether core file was from a
2927         target with guarded-storage support; include appropriate regsets.
2928         (s390_gdbarch_init): Add registers for guarded-storage support.
2929         (_initialize_s390_tdep): Initialize new target descriptions that
2930         include registers for guarded-storage support.
2931         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
2932         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
2933         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
2934         (S390_NUM_REGS): Adjust macro definition.
2935         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
2936         (tdesc_s390x_gs_linux64): New declarations.
2937
2938 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2939
2940         * features/s390-gs-linux64.xml: New file.
2941         * features/s390-gs.xml: New file.
2942         * features/s390-gsbc.xml: New file.
2943         * features/s390x-gs-linux64.xml: New file.
2944         * features/Makefile (WHICH): Add s390-gs-linux64 and
2945         s390x-gs-linux64.
2946         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
2947         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
2948         * features/s390-gs-linux64.c: New generated file.
2949         * features/s390x-gs-linux64.c: New file.
2950         * regformats/s390-gs-linux64.dat: New file.
2951         * regformats/s390x-gs-linux64.dat: New file.
2952
2953 2017-09-23  Tom Tromey  <tom@tromey.com>
2954
2955         * defs.h (make_cleanup_override_quit_handler): Don't declare.
2956
2957 2017-09-22  Tom Tromey  <tom@tromey.com>
2958
2959         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
2960         type to scoped_restore_tmpl.
2961         <scoped_input_handler>: Initialize m_quit_handler directly.
2962
2963 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
2964
2965         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
2966         (cd_command): Likewise.  Free "current_directory" before
2967         assigning to it.
2968         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
2969         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
2970         * top.c (gdb_dirbuf): Remove global declaration.
2971         * top.h (gdb_dirbuf): Likewise.
2972
2973 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
2974
2975         * gnulib/aclocal.m4: Regenerate.
2976         * gnulib/config.in: Regenerate.
2977         * gnulib/configure: Regenerate.
2978         * gnulib/import/Makefile.am: Regenerate.
2979         * gnulib/import/Makefile.in: Regenerate.
2980         * gnulib/import/assure.h: New file.
2981         * gnulib/import/at-func.c: Likewise
2982         * gnulib/import/chdir-long.c: New file.
2983         * gnulib/import/chdir-long.h: New file.
2984         * gnulib/import/cloexec.c: New file.
2985         * gnulib/import/cloexec.h: New file.
2986         * gnulib/import/close.c: New file.
2987         * gnulib/import/closedir.c: New file.
2988         * gnulib/import/dirent-private.h: New file.
2989         * gnulib/import/dup-safer.c: New file.
2990         * gnulib/import/dup.c: New file.
2991         * gnulib/import/dup2.c: New file.
2992         * gnulib/import/error.c: New file.
2993         * gnulib/import/error.h: New file.
2994         * gnulib/import/exitfail.c: New file.
2995         * gnulib/import/exitfail.h: New file.
2996         * gnulib/import/fchdir.c: New file.
2997         * gnulib/import/fcntl.c: New file.
2998         * gnulib/import/fcntl.in.h: New file.
2999         * gnulib/import/fd-hook.c: New file.
3000         * gnulib/import/fd-hook.h: New file.
3001         * gnulib/import/fd-safer.c: New file.
3002         * gnulib/import/fdopendir.c: New file.
3003         * gnulib/import/filename.h: New file.
3004         * gnulib/import/filenamecat-lgpl.c: New file.
3005         * gnulib/import/filenamecat.h: New file.
3006         * gnulib/import/fstat.c: New file.
3007         * gnulib/import/fstatat.c: New file.
3008         * gnulib/import/getcwd-lgpl.c: New file.
3009         * gnulib/import/getcwd.c: New file.
3010         * gnulib/import/getdtablesize.c: New file.
3011         * gnulib/import/getlogin_r.c: New file.
3012         * gnulib/import/getprogname.c: New file.
3013         * gnulib/import/getprogname.h: New file.
3014         * gnulib/import/gettext.h: New file.
3015         * gnulib/import/glob-libc.h: New file.
3016         * gnulib/import/glob.c: New file.
3017         * gnulib/import/glob.in.h: New file.
3018         * gnulib/import/intprops.h: New file.
3019         * gnulib/import/m4/chdir-long.m4: New file.
3020         * gnulib/import/m4/close.m4: New file.
3021         * gnulib/import/m4/closedir.m4: New file.
3022         * gnulib/import/m4/d-ino.m4: New file.
3023         * gnulib/import/m4/d-type.m4: New file.
3024         * gnulib/import/m4/dup.m4: New file.
3025         * gnulib/import/m4/dup2.m4: New file.
3026         * gnulib/import/m4/error.m4: New file.
3027         * gnulib/import/m4/fchdir.m4: New file.
3028         * gnulib/import/m4/fcntl.m4: New file.
3029         * gnulib/import/m4/fcntl_h.m4: New file.
3030         * gnulib/import/m4/fdopendir.m4: New file.
3031         * gnulib/import/m4/filenamecat.m4: New file.
3032         * gnulib/import/m4/fstat.m4: New file.
3033         * gnulib/import/m4/fstatat.m4: New file.
3034         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
3035         * gnulib/import/m4/getcwd-path-max.m4: New file.
3036         * gnulib/import/m4/getcwd.m4: New file.
3037         * gnulib/import/m4/getdtablesize.m4: New file.
3038         * gnulib/import/m4/getlogin_r.m4: New file.
3039         * gnulib/import/m4/getprogname.m4: New file.
3040         * gnulib/import/m4/glob.m4: New file.
3041         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
3042         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
3043         * gnulib/import/m4/mempcpy.m4: New file.
3044         * gnulib/import/m4/memrchr.m4: New file.
3045         * gnulib/import/m4/mode_t.m4: New file.
3046         * gnulib/import/m4/msvc-inval.m4: New file.
3047         * gnulib/import/m4/msvc-nothrow.m4: New file.
3048         * gnulib/import/m4/open.m4: New file.
3049         * gnulib/import/m4/openat.m4: New file.
3050         * gnulib/import/m4/opendir.m4: New file.
3051         * gnulib/import/m4/readdir.m4: New file.
3052         * gnulib/import/m4/realloc.m4: New file.
3053         * gnulib/import/m4/rewinddir.m4: New file.
3054         * gnulib/import/m4/save-cwd.m4: New file.
3055         * gnulib/import/m4/strdup.m4: New file.
3056         * gnulib/import/m4/strerror.m4: New file.
3057         * gnulib/import/m4/unistd-safer.m4: New file.
3058         * gnulib/import/mempcpy.c: New file.
3059         * gnulib/import/memrchr.c: New file.
3060         * gnulib/import/msvc-inval.c: New file.
3061         * gnulib/import/msvc-inval.h: New file.
3062         * gnulib/import/msvc-nothrow.c: New file.
3063         * gnulib/import/msvc-nothrow.h: New file.
3064         * gnulib/import/open.c: New file.
3065         * gnulib/import/openat-die.c: New file.
3066         * gnulib/import/openat-priv.h: New file.
3067         * gnulib/import/openat-proc.c: New file.
3068         * gnulib/import/openat.c: New file.
3069         * gnulib/import/openat.h: New file.
3070         * gnulib/import/opendir.c: New file.
3071         * gnulib/import/pipe-safer.c: New file.
3072         * gnulib/import/readdir.c: New file.
3073         * gnulib/import/realloc.c: New file.
3074         * gnulib/import/rewinddir.c: New file.
3075         * gnulib/import/save-cwd.c: New file.
3076         * gnulib/import/save-cwd.h: New file.
3077         * gnulib/import/strdup.c: New file.
3078         * gnulib/import/strerror-override.c: New file.
3079         * gnulib/import/strerror-override.h: New file.
3080         * gnulib/import/strerror.c: New file.
3081         * gnulib/import/unistd--.h: New file.
3082         * gnulib/import/unistd-safer.h: New file.
3083         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
3084         "getcwd" and "glob".
3085         * ser-tcp.c: Undefine "close" before redefining it.
3086
3087 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3088
3089         * guile/scm-value.c (gdbscm_value_address): Initialize address,
3090         get rid of res_val.
3091
3092 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3093
3094         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
3095         <sol2,sparc>: Likewise.
3096         <sol2-64,i386>: Likewise.
3097
3098         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
3099         -Wdeprecated-declarations on *-*-solaris*.
3100         * configure: Regenerate.
3101
3102         * procfs.c: Include "nat/inferior.h".
3103         (procfs_info_proc): Fix typo.
3104
3105 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3106
3107         * remote.c (vector): Include.
3108         (struct private_thread_info): Add field, thread_handle.
3109         (free_private_thread_info): Deallocate storage associated with
3110         thread handle.
3111         (get_private_info_thread): Initialize `thread_handle' field.
3112         (struct thread_item): Add field, thread_handle.
3113         (clear_threads_listing_context): Deallocate storage associated
3114         with thread handle.
3115         (start_thread): Add support for "handle" attribute.
3116         (thread_attributes): Add "handle".
3117         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
3118         field.
3119         (remote_update_thread_list): Update thread_handle.
3120         (remote_thread_handle_to_thread_info): New function.
3121         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
3122
3123 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3124
3125         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
3126         function.
3127         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
3128         * python/python-internal.h (thread_object_type): Declare.
3129
3130 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3131
3132         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
3133         (target_thread_handle_to_thread_info): Declare.
3134         * target.c (target_thread_handle_to_thread_info): New function.
3135         * target-delegates.c: Regenerate.
3136         * gdbthread.h (find_thread_by_handle): Declare.
3137         * thread.c (find_thread_by_handle): New function.
3138         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
3139         function.
3140         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
3141
3142 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3143
3144         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
3145
3146 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3147
3148         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
3149
3150 2017-09-21  Yao Qi  <yao.qi@linaro.org>
3151
3152         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
3153         to gdb_target_obs.
3154
3155 2017-09-20  Tom Tromey  <tom@tromey.com>
3156
3157         * breakpoint.c (struct counted_command_line): Remove.
3158         (breakpoint_commands): Update.
3159         (alloc_counted_command_line, incref_counted_command_line)
3160         (decref_counted_command_line, do_cleanup_counted_command_line)
3161         (make_cleanup_decref_counted_command_line): Remove.
3162         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
3163         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
3164         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
3165         (save_breakpoints): Update.
3166         * breakpoint.h (counted_command_line): Now a typedef to
3167         shared_ptr.
3168         (struct breakpoint) <commands>: Now a counted_command_line.
3169         (struct bpstats) <command>: Likewise.
3170
3171 2017-09-20  Tom Tromey  <tom@tromey.com>
3172
3173         * breakpoint.c (struct commands_info, do_map_commands_command):
3174         Remove.
3175         (commands_command_1): Update.
3176         (iterate_over_related_breakpoints): Take a function_view.
3177         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
3178         (delete_command): Update.
3179         (map_breakpoint_numbers): Take a function_view.
3180         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
3181         (disable_command): Update.
3182         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
3183         (enable_command): Update.
3184         (struct disp_data, do_enable_breakpoint_disp)
3185         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
3186         (do_map_enable_delete_breakpoint): Remove.
3187         (enable_once_command, enable_count_command, enable_delete_command)
3188         (delete_trace_variable_command): Update.
3189
3190 2017-09-20  Tom Tromey  <tom@tromey.com>
3191
3192         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
3193         (bpstat_clear): Use delete.
3194         (bpstats): New constructors.
3195         (bpstat_copy, bpstat_stop_status): Use new.
3196         (dprintf_after_condition_true): Update.
3197         * breakpoint.h (bpstats::bpstats): Add constructors.
3198         (bpstats::~bpstats): Add destructor.
3199
3200 2017-09-20  Pedro Alves  <palves@redhat.com>
3201
3202         * eval.c (make_params): Delete, refactored as ...
3203         (class fake_method): ... this new type's ctor.
3204         (fake_method::~fake_method): New.
3205         (evaluate_subexp_standard): Use 'fake_method'.
3206
3207 2017-09-20  Tom Tromey  <tom@tromey.com>
3208
3209         * windows-nat.c (get_windows_debug_event, windows_wait)
3210         (do_initial_windows_stuff, windows_attach): Update.
3211         * utils.c (vwarning, internal_vproblem): Update.
3212         (ui_unregister_input_event_handler_cleanup)
3213         (prepare_to_handle_input): Remove.
3214         (class scoped_input_handler): New.
3215         (defaulted_query, prompt_for_continue): Update.
3216         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
3217         Update.
3218         * top.c (undo_terminal_modifications_before_exit): Update.
3219         * target/target.h (target_terminal_init, target_terminal_inferior)
3220         (target_terminal_ours): Don't declare.
3221         (class target_terminal): New.
3222         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
3223         (target_terminal_ours_for_output)
3224         (make_cleanup_restore_target_terminal): Don't declare.
3225         (target_terminal_info): Remove.
3226         * target.c (enum terminal_state, terminal_state): Remove.
3227         (target_terminal::terminal_state): Define.
3228         (target_terminal::init): Rename from target_terminal_init.
3229         (target_terminal::inferior): Rename from
3230         target_terminal_inferior.
3231         (target_terminal::ours): Rename from target_terminal_ours.
3232         (target_terminal::ours_for_output): Rename from
3233         target_terminal_ours_for_output.
3234         (target_terminal::info): New method.
3235         (cleanup_restore_target_terminal)
3236         (make_cleanup_restore_target_terminal): Remove.
3237         * solib.c (handle_solib_event): Update.
3238         * remote.c (remote_serial_quit_handler): Update.
3239         (remote_terminal_inferior, remote_wait_as): Update.
3240         * record-full.c (record_full_wait_1): Update.
3241         * nto-procfs.c (procfs_create_inferior): Update.
3242         * nat/fork-inferior.c (startup_inferior): Update.
3243         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
3244         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
3245         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
3246         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
3247         (mi_breakpoint_created, mi_breakpoint_deleted)
3248         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
3249         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3250         (mi_user_selected_context_changed, report_initial_inferior):
3251         Update.
3252         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
3253         (linux_nat_terminal_inferior): Update.
3254         * infrun.c (follow_fork_inferior)
3255         (handle_vfork_child_exec_or_exit, do_target_resume)
3256         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
3257         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
3258         Update.
3259         * inflow.c (child_terminal_init, info_terminal_command): Update.
3260         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
3261         (attach_command): Update.
3262         * infcall.c (call_thread_fsm_should_stop): Update.
3263         * gnu-nat.c (gnu_attach): Update.
3264         * extension.c (struct active_ext_lang_state)
3265         (restore_active_ext_lang): Update.
3266         * exceptions.c (print_flush): Update.
3267         * event-top.c (async_enable_stdin, default_quit_handler): Update.
3268         (struct quit_handler_cleanup_data, restore_quit_handler)
3269         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
3270         Remove.
3271         * cp-support.c (gdb_demangle): Update.
3272         * breakpoint.c (update_inserted_breakpoint_locations)
3273         (insert_breakpoint_locations, handle_jit_event)
3274         (disable_breakpoints_in_unloaded_shlib): Update.
3275         * annotate.c (annotate_breakpoints_invalid)
3276         (annotate_frames_invalid): Update.
3277
3278 2017-09-20  Tom Tromey  <tom@tromey.com>
3279
3280         * main.c (catch_command_errors): Rename from
3281         catch_command_errors_const.
3282         (captured_main_1): Update.
3283
3284 2017-09-20  Pedro Alves  <palves@redhat.com>
3285
3286         * cli/cli-cmds.c (list_command): Use print_sal_location.
3287         (print_sal_location): New function.
3288         (ambiguous_line_spec): Use print_sal_location.
3289         * linespec.c (symbol_to_sal): Record the symbol in the sal.
3290         * symtab.c (find_function_start_sal): Likewise.
3291         * symtab.h (symtab_and_line::symbol): New field.
3292
3293 2017-09-20  Pedro Alves  <palves@redhat.com>
3294
3295         * linespec.c (minsym_found): Handle non-text minsyms.
3296         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
3297
3298 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3299
3300         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
3301         backslash.
3302
3303 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3304
3305         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
3306         vmovups instead vmovaps.
3307         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
3308
3309 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
3310
3311         * NEWS (Changes since GDB 8.0): Add starti.
3312         * infcmd.c (enum run_break): New.
3313         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
3314         case.
3315         (run_command): Use enum run_how.
3316         (start_command): Likewise.
3317         (starti_command): New function.
3318         (RUN_ARGS_HELP): New macro.
3319         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
3320         commands.  Add starti command.
3321
3322 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3323
3324         * Makefile.in (monitor.o): Remove the rule.
3325
3326 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3327
3328         * annotate.h (struct annotate_arg_emitter): Use
3329         DISABLE_COPY_AND_ASSIGN.
3330         * common/refcounted-object.h (refcounted_object): Likewise.
3331         * completer.h (struct completion_result): Likewise.
3332         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
3333         * filename-seen-cache.h (filename_seen_cache): Likewise.
3334         * gdbcore.h (thread_section_name): Likewise.
3335         * gdb_regex.h (compiled_regex): Likewise.
3336         * gdbthread.h (scoped_restore_current_thread): Likewise.
3337         * inferior.h (scoped_restore_current_inferior): Likewise.
3338         * jit.c (jit_reader): Likewise.
3339         * linespec.h (struct linespec_result): Likewise.
3340         * mi/mi-parse.h (struct mi_parse): Likewise.
3341         * nat/fork-inferior.c (execv_argv): Likewise.
3342         * progspace.h (scoped_restore_current_program_space): Likewise.
3343         * python/python-internal.h (class gdbpy_enter): Likewise.
3344         * regcache.h (regcache): Likewise.
3345         * target-descriptions.c (struct tdesc_reg): Likewise.
3346         (struct tdesc_type): Likewise.
3347         (struct tdesc_feature): Likewise.
3348         * ui-out.h (ui_out_emit_type): Likewise.
3349
3350 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
3351
3352         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
3353         label abort_expression.
3354
3355 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3356
3357         * common/buffer.c (buffer_xml_printf): Adjust.
3358         * common/xml-utils.c (xml_escape_text): Change return type to
3359         std::string, update code accordingly.
3360         * common/xml-utils.h (xml_escape_text): Change return type to
3361         std::string.
3362         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
3363         * windows-tdep.c (windows_xfer_shared_library): Adjust.
3364         * unittests/xml-utils-selftests.c (test_xml_escape_text):
3365         Adjust.
3366
3367 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3368
3369         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
3370         (SUBDIR_UNITTESTS_OBS): Add new object file.
3371         * unittests/xml-utils-selftests.c: New file.
3372
3373 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3374
3375         * common/selftest.h (selftest): New struct/interface.
3376         (register_test): Add name parameter, add new overload.
3377         (run_tests): Add filter parameter.
3378         (for_each_selftest_ftype): New typedef.
3379         (for_each_selftest): New declaration.
3380         * common/selftest.c (tests): Change type to
3381         map<string, unique_ptr<selftest>>.
3382         (simple_selftest): New struct.
3383         (register_test): New function.
3384         (register_test): Add name parameter and use it.
3385         (run_tests): Add filter parameter and use it.  Add prints.
3386         Adjust to vector -> map change.
3387         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
3388         registering selftests.
3389         * arm-tdep.c (_initialize_arm_tdep): Likewise.
3390         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
3391         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
3392         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
3393         * findvar.c (_initialize_findvar): Likewise.
3394         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
3395         * maint.c (maintenance_selftest): Update call to run_tests.
3396         (maintenance_info_selftests): New function.
3397         (_initialize_maint_cmds): Register "maintenance info selftests"
3398         command.  Update "maintenance selftest" doc.
3399         * regcache.c (_initialize_regcache): Add names when registering
3400         selftests.
3401         * rust-exp.y (_initialize_rust_exp): Likewise.
3402         * selftest-arch.c (gdbarch_selftest): New struct.
3403         (gdbarch_tests): Remove.
3404         (register_test_foreach_arch): Add name parameter.  Call
3405         register_test.
3406         (tests_with_arch): Remove, move most content to
3407         gdbarch_selftest::operator().
3408         (_initialize_selftests_foreach_arch): Remove.
3409         * selftest-arch.h (register_test_foreach_arch): Add name
3410         parameter.
3411         (run_tests_with_arch): New declaration.
3412         * utils-selftests.c (_initialize_utils_selftests): Add names
3413         when registering selftests.
3414         * utils.c (_initialize_utils): Likewise.
3415         * unittests/array-view-selftests.c
3416         (_initialize_array_view_selftests): Likewise.
3417         * unittests/environ-selftests.c (_initialize_environ_selftests):
3418         Likewise.
3419         * unittests/function-view-selftests.c
3420         (_initialize_function_view_selftests): Likewise.
3421         * unittests/offset-type-selftests.c
3422         (_initialize_offset_type_selftests): Likewise.
3423         * unittests/optional-selftests.c
3424         (_initialize_optional_selftests): Likewise.
3425         * unittests/scoped_restore-selftests.c
3426         (_initialize_scoped_restore_selftests): Likewise.
3427         * NEWS: Document "maintenance selftest" and "maint info
3428         selftests".
3429
3430 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3431
3432         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
3433         scoped_restore.
3434
3435 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3436
3437         * mi/mi-main.c (mi_load_progress): Make uiout variable
3438         a unique_ptr.
3439
3440 2017-09-15  Pedro Alves  <palves@redhat.com>
3441
3442         * compile/compile-c-types.c (convert_enum, convert_int)
3443         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
3444
3445 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
3446
3447         * dwarf2read.c (copy_string): Remove.
3448         (parse_macro_definition): Replace copy_string with savestring.
3449
3450 2017-09-15  Yao Qi  <yao.qi@linaro.org>
3451
3452         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
3453         gdb_target_obs.
3454         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
3455         Likewise.
3456         (i[34567]86-*-linux*): Likewise.
3457
3458 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3459
3460         * dwarf2expr.h (dwarf_stack_value): Add constructor.
3461         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
3462         <stack>: Change type to std::vector.
3463         <stack_len, stack_allocated>: Remove.
3464         <grow_stack>: Remove.
3465         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3466         (dwarf_expr_context::~dwarf_expr_context): Remove.
3467         (dwarf_expr_context::grow_stack): Remove.
3468         (dwarf_expr_context::push): Adjust.
3469         (dwarf_expr_context::pop): Adjust.
3470         (dwarf_expr_context::fetch): Adjust.
3471         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
3472         (dwarf_expr_context::stack_empty_p): Adjust.
3473         (dwarf_expr_context::execute_stack_op): Adjust.
3474
3475 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3476
3477         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
3478         return type to bool.
3479         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
3480
3481 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3482
3483         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
3484         Change type to bool.
3485         (dwarf_stack_value) <in_stack_memory>: Likewise.
3486         (dwarf_expr_context) <push_address>: Change parameter type to
3487         bool.
3488         <fetch_in_stack_memory>: Change return type to bool.
3489         <push>: Change parameter type to bool.
3490         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
3491         to bool.
3492         (dwarf_expr_context::push_address): Likewise.
3493         (dwarf_expr_context::fetch_in_stack_memory): Change return type
3494         to bool.
3495         (dwarf_expr_context::execute_stack_op): Adjust.
3496         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
3497
3498 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3499
3500         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
3501         (struct dwarf_expr_context) <n_pieces>: Remove.
3502         <pieces>: Change type to std::vector.
3503         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3504         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
3505         pieces.
3506         (dwarf_expr_context::add_piece): Adjust.
3507         * dwarf2loc.c (struct piece_closure): Initialize fields.
3508         <n_pieces>: Remove.
3509         <pieces>: Change type to std::vector.
3510         (allocate_piece_closure): Adjust, change parameter to
3511         std::vector rvalue and std::move it to piece_closure.
3512         (rw_pieced_value): Adjust.
3513         (check_pieced_synthetic_pointer): Adjust.
3514         (indirect_synthetic_pointer): Adjust.
3515         (coerce_pieced_ref): Adjust.
3516         (free_pieced_value_closure):  Adjust.  Use delete to free
3517         piece_closure.
3518         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
3519         to allocate_piece_closure.
3520         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
3521
3522 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3523
3524         * probe.h (probe_ops_cp): Remove typedef.
3525         (DEF_VEC_P (probe_ops_cp)): Remove.
3526         (all_probe_ops): Change type to std::vector.
3527         * probe.c (info_probes_for_ops): Adjust to vector change.
3528         (probe_linespec_to_ops): Likewise.
3529         (all_probe_ops): Change type to std::vector.
3530         (_initialize_probe): Adjust to vector change.
3531         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
3532         * elfread.c (elf_get_probes): Likewise.
3533         * stap-probe.c (_initialize_stap_probe): Likewise.
3534
3535 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3536
3537         * probe.h (struct bound_probe): Define constructors.
3538         * probe.c (bound_probe_s): Remove typedef.
3539         (DEF_VEC_O (bound_probe_s)): Remove VEC.
3540         (collect_probes): Change return type to std::vector, remove
3541         cleanup.
3542         (compare_probes): Return bool, change parameter type.  Change
3543         semantic to "less than".
3544         (gen_ui_out_table_header_info): Change parameter to std::vector
3545         and update.
3546         (exists_probe_with_pops): Likewise.
3547         (info_probes_for_ops): Update to std::vector change.
3548         (enable_probes_command): Likewise.
3549         (disable_probes_command): Likewise.
3550
3551 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3552
3553         * probe.h (struct probe_ops) <get_probes>: Change parameter from
3554         vec to std::vector.
3555         * probe.c (parse_probes_in_pspace): Update.
3556         (find_probes_in_objfile): Update.
3557         (find_probe_by_pc): Update.
3558         (collect_probes): Update.
3559         (probe_any_get_probes): Update.
3560         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
3561         return type to reference to std::vector.
3562         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
3563         std::vector and update.
3564         (dtrace_process_dof): Likewise.
3565         (dtrace_get_probes): Likewise.
3566         * elfread.c (elf_get_probes): Change return type to std::vector,
3567         store an std::vector in bfd_data.
3568         (probe_key_free): Update to std::vector.
3569         * stap-probe.c (handle_stap_probe): Change parameter to
3570         std::vector and update.
3571         (stap_get_probes): Likewise.
3572         * symfile-debug.c (debug_sym_get_probes): Change return type to
3573         std::vector and update.
3574
3575 2017-09-11  Tom Tromey  <tom@tromey.com>
3576
3577         * breakpoint.c (program_breakpoint_here_p): Update.
3578         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
3579         from make_show_memory_breakpoints_cleanup.  Return a
3580         scoped_restore_tmpl<int>.
3581         (restore_show_memory_breakpoints): Remove.
3582         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
3583         * mem-break.c (memory_validate_breakpoint): Update.
3584         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
3585         (ia64_memory_remove_breakpoint): Update.
3586         (ia64_breakpoint_from_pc): Update.
3587         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
3588         from make_show_memory_breakpoints_cleanup.
3589
3590 2017-09-11  Tom Tromey  <tom@tromey.com>
3591
3592         * d-namespace.c (d_lookup_symbol): Use std::string.
3593         (find_symbol_in_baseclass): Likewise.
3594
3595 2017-09-11  Tom Tromey  <tom@tromey.com>
3596
3597         * ctf.c (ctf_start): Use std::string.
3598
3599 2017-09-11  Tom Tromey  <tom@tromey.com>
3600
3601         * ada-lang.c (is_known_support_routine): Update.
3602         (ada_unhandled_exception_name_addr_from_raise): Update.
3603         * guile/scm-frame.c (gdbscm_frame_name): Update.
3604         * python/py-frame.c (frapy_name): Update.
3605         (frapy_function): Update.
3606         * stack.h (find_frame_funname): Update.
3607         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
3608         (print_frame): Update.
3609
3610 2017-09-11  Tom Tromey  <tom@tromey.com>
3611
3612         * findcmd.c (put_bits): Take a gdb::byte_vector.
3613         (parse_find_args): Return gdb::byte_vector.  "args" now const.
3614         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
3615         cleanups.
3616         (find_command): Update.
3617
3618 2017-09-11  Tom Tromey  <tom@tromey.com>
3619
3620         * cli/cli-script.c (class scoped_restore_hook_in): New.
3621         (clear_hook_in_cleanup): Remove.
3622         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
3623         scoped_restore_hook_in.
3624
3625 2017-09-11  Tom Tromey  <tom@tromey.com>
3626
3627         * cli/cli-script.c (restore_interp): Remove.
3628         (read_command_lines): Use scoped_restore_interp.
3629         * interps.c (scoped_restore_interp::set_temp): Rename from
3630         interp_set_temp.
3631         * interps.h (class scoped_restore_interp): New.
3632         (interp_set_temp): Remove.
3633
3634 2017-09-11  Tom Tromey  <tom@tromey.com>
3635
3636         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3637         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
3638         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
3639         scoped_restore.
3640         (mi_cmd_break_insert_1): Update.
3641         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
3642         scoped_restore.
3643
3644 2017-09-11  Tom Tromey  <tom@tromey.com>
3645
3646         * demangle.c (demangle_command): Update.
3647         * breakpoint.c (disable_command): Update.
3648         (enable_command): Update.
3649         (find_location_by_number): Make "number" const.  Use
3650         get_number_trailer.
3651         * cli/cli-utils.c (extract_arg): Return std::string.
3652         * probe.c (parse_probe_linespec): Update.  Change types.
3653         (collect_probes): Take string arguments.
3654         (parse_probe_linespec): Likewise.
3655         (info_probes_for_ops): Update.
3656         (enable_probes_command): Update.
3657         (disable_probes_command): Update.
3658         * break-catch-sig.c (catch_signal_split_args): Update.
3659         * mi/mi-parse.c (mi_parse): Update.
3660
3661 2017-09-11  Tom Tromey  <tom@tromey.com>
3662
3663         * language.h (language_enum): Make argument const.
3664         * language.c (language_enum): Make argument const.
3665
3666 2017-09-11  Tom Tromey  <tom@tromey.com>
3667
3668         * common/common-utils.h (skip_to_space): Remove macro, redeclare
3669         as function.
3670         (skip_to_space): Rename from skip_to_space_const.
3671         * common/common-utils.c (skip_to_space): New function.
3672         (skip_to_space): Rename from skip_to_space_const.
3673         * cli/cli-utils.h (get_number): Rename from get_number_const.
3674         (extract_arg): Rename from extract_arg_const.
3675         * cli/cli-utils.c (get_number): Rename from get_number_const.
3676         (extract_arg): Rename from extract_arg_const.
3677         (number_or_range_parser::get_number): Use ::get_number.
3678         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
3679         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
3680         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
3681         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
3682         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
3683         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
3684         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
3685         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
3686
3687 2017-09-11  Tom Tromey  <tom@tromey.com>
3688
3689         * python/python.c (do_start_initialization): Use
3690         py-event-types.def to initialize types.
3691         Define all object type structures.
3692         * python/python-internal.h: Don't declare event initialization
3693         functions.
3694         * python/py-threadevent.c (thread_event_object_type): Don't
3695         define.
3696         * python/py-stopevent.c (stop_event_object_type): Don't define.
3697         * python/py-signalevent.c (signal_event_object_type): Don't
3698         declare or define.
3699         * python/py-newobjfileevent.c (new_objfile_event_object_type)
3700         (clear_objfiles_event_object_type): Don't declare or define.
3701         * python/py-infevents.c (inferior_call_pre_event_object_type)
3702         (inferior_call_post_event_object_type)
3703         (register_changed_event_object_type)
3704         (memory_changed_event_object_type): Don't declare or define.
3705         * python/py-inferior.c (new_thread_event_object_type)
3706         (new_inferior_event_object_type)
3707         (inferior_deleted_event_object_type): Don't declare or define.
3708         * python/py-exitedevent.c (exited_event_object_type): Don't
3709         declare or define.
3710         * python/py-evts.c (gdbpy_initialize_py_events): Use
3711         py-all-events.def.
3712         * python/py-events.h (thread_event_object_type): Don't declare.
3713         (events_object): Use py-all-events.def.
3714         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
3715         py-event-types.def.
3716         * python/py-event-types.def: New file.
3717         * python/py-continueevent.c (create_continue_event_object): Don't
3718         declare or define.
3719         * python/py-bpevent.c (breakpoint_event_object_type): Don't
3720         declare or define.
3721         * python/py-all-events.def: New file.
3722
3723 2017-09-11  Tom Tromey  <tom@tromey.com>
3724
3725         * python/py-threadevent.c (create_thread_event_object): Return
3726         gdbpy_ref.
3727         * python/py-stopevent.h (create_stop_event_object)
3728         (create_breakpoint_event_object, create_signal_event_object):
3729         Update.
3730         * python/py-stopevent.c (create_stop_event_object): Return
3731         gdbpy_ref.
3732         (emit_stop_event): Update.
3733         * python/py-signalevent.c (create_signal_event_object): Return
3734         gdbpy_ref.
3735         * python/py-infevents.c (create_inferior_call_event_object):
3736         Update.
3737         * python/py-event.h (create_event_object)
3738         (create_thread_event_object): Update.
3739         * python/py-event.c (create_event_object): Return gdbpy_ref.
3740         * python/py-continueevent.c: Return gdbpy_ref.
3741         * python/py-bpevent.c (create_breakpoint_event_object): Return
3742         gdbpy_ref.
3743
3744 2017-09-11  Tom Tromey  <tom@tromey.com>
3745
3746         PR python/15622:
3747         * NEWS: Add entry.
3748         * python/python.c (do_start_initialization): Initialize new event
3749         types.
3750         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
3751         (gdbpy_initialize_inferior_deleted_event)
3752         (gdbpy_initialize_new_thread_event): Declare.
3753         * python/py-threadevent.c (create_thread_event_object): Add option
3754         "thread" parameter.
3755         * python/py-inferior.c (new_thread_event_object_type)
3756         (new_inferior_event_object_type)
3757         (inferior_deleted_event_object_type): Declare.
3758         (python_new_inferior, python_inferior_deleted): New functions.
3759         (add_thread_object): Emit new_thread event.
3760         (gdbpy_initialize_inferior): Attach new functions to corresponding
3761         observers.
3762         (new_thread, new_inferior, inferior_deleted): Define new event
3763         types.
3764         * python/py-evts.c (gdbpy_initialize_py_events): Add new
3765         registries.
3766         * python/py-events.h (events_object) <new_inferior,
3767         inferior_deleted, new_thread>: New fields.
3768         * python/py-event.h (create_thread_event_breakpoint): Add optional
3769         "thread" parameter.
3770
3771 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3772
3773         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
3774         check current_ui instead.
3775         (internal_vproblem): Likewise.
3776
3777 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
3778
3779         * thread.c (print_thread_info_1): Remove unnecessary calls to
3780         uiout->is_mi_like_p.
3781
3782 2017-09-09  Tom Tromey  <tom@tromey.com>
3783
3784         * namespace.h (add_using_directive): Update.
3785         * namespace.c (add_using_directive): Change type of excludes to
3786         std::vector.
3787         * dwarf2read.c (read_import_statement): Use std::vector.
3788         (read_namespace): Update.
3789         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3790
3791 2017-09-09  Tom Tromey  <tom@tromey.com>
3792
3793         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
3794
3795 2017-09-09  Tom Tromey  <tom@tromey.com>
3796
3797         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
3798
3799 2017-09-09  Tom Tromey  <tom@tromey.com>
3800
3801         * stack.c (func_command): Use gdb::def_vector.
3802
3803 2017-09-09  Tom Tromey  <tom@tromey.com>
3804
3805         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
3806         ui_out_emit_list, ui_out_emit_tuple.
3807         (mi_cmd_var_update): Likewise.
3808
3809 2017-09-09  Tom Tromey  <tom@tromey.com>
3810
3811         * mi/mi-interp.c (mi_user_selected_context_changed): Use
3812         ui_out_redirect_pop.
3813         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
3814         ui_out_redirect_pop.
3815         * utils.c (do_ui_out_redirect_pop)
3816         (make_cleanup_ui_out_redirect_pop): Remove.
3817         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
3818         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
3819         * ui-out.h (ui_out_redirect_pop): New class.
3820
3821 2017-09-09  Tom Tromey  <tom@tromey.com>
3822
3823         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
3824         (list_available_thread_groups, mi_cmd_list_thread_groups)
3825         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
3826         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
3827         Likewise.
3828
3829 2017-09-09  Tom Tromey  <tom@tromey.com>
3830
3831         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
3832         ui_out_emit_tuple.
3833
3834 2017-09-09  Tom Tromey  <tom@tromey.com>
3835
3836         * target.c (flash_erase_command): Use ui_out_emit_tuple.
3837         * stack.c (print_frame): Use ui_out_emit_tuple.
3838         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
3839         (info_spu_mailbox_command, info_spu_dma_command)
3840         (info_spu_proxydma_command): Likewise.
3841         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
3842         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
3843         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
3844         ui_out_emit_tuple.
3845         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
3846
3847 2017-09-09  Tom Tromey  <tom@tromey.com>
3848
3849         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
3850         (class ui_out_emit_table): Update comment.
3851         * ui-out.c (do_cleanup_table_end)
3852         (make_cleanup_ui_out_table_begin_end): Remove.
3853         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
3854         (info_spu_dma_cmdlist): Likewise.
3855         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
3856         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
3857         ui_out_emit_table.
3858
3859 2017-09-09  Tom Tromey  <tom@tromey.com>
3860
3861         * thread.c (print_thread_info_1): Use ui_out_emit_table,
3862         ui_out_emit_list, gdb::optional.
3863
3864 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
3865
3866         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
3867         prototype.
3868         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
3869         prototype.
3870         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
3871         prototype.
3872         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
3873         * ada-exp.y: Remove _initialize_ada_exp prototype.
3874         * ada-lang.c: Remove _initialize_ada_language prototype.
3875         * ada-tasks.c: Remove _initialize_tasks prototype.
3876         * addrmap.c: Remove _initialize_addrmap prototype.
3877         * agent.c: Remove _initialize_agent prototype.
3878         * aix-thread.c: Remove _initialize_aix_thread prototype.
3879         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
3880         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
3881         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
3882         prototype.
3883         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
3884         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
3885         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
3886         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
3887         prototype.
3888         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
3889         prototype.
3890         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
3891         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
3892         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
3893         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
3894         prototype.
3895         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
3896         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
3897         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
3898         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
3899         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
3900         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
3901         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
3902         prototype.
3903         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
3904         prototype.
3905         * annotate.c: Remove _initialize_annotate prototype.
3906         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
3907         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
3908         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
3909         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
3910         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
3911         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
3912         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
3913         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
3914         prototype.
3915         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
3916         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
3917         * auto-load.c: Remove _initialize_auto_load prototype.
3918         * auxv.c: Remove _initialize_auxv prototype.
3919         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
3920         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
3921         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
3922         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
3923         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
3924         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
3925         prototype.
3926         * break-catch-throw.c: Remove _initialize_break_catch_throw
3927         prototype.
3928         * breakpoint.c: Remove _initialize_breakpoint prototype.
3929         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
3930         * btrace.c: Remove _initialize_btrace prototype.
3931         * charset.c: Remove _initialize_charset prototype.
3932         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
3933         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
3934         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
3935         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
3936         * cli/cli-script.c: Remove _initialize_cli_script prototype.
3937         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
3938         * coffread.c: Remove _initialize_coffread prototype.
3939         * compile/compile.c: Remove _initialize_compile prototype.
3940         * complaints.c: Remove _initialize_complaints prototype.
3941         * completer.c: Remove _initialize_completer prototype.
3942         * copying.awk: Remove _initialize_copying prototype.
3943         * copying.c: Regenerate.
3944         * core-regset.c: Remove _initialize_core_regset prototype.
3945         * corefile.c: Remove _initialize_core prototype.
3946         * corelow.c: Remove _initialize_corelow prototype.
3947         * cp-abi.c: Remove _initialize_cp_abi prototype.
3948         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
3949         * cp-support.c: Remove _initialize_cp_support prototype.
3950         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
3951         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
3952         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
3953         * ctf.c: Remove _initialize_ctf prototype.
3954         * d-lang.c: Remove _initialize_d_language prototype.
3955         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
3956         prototype.
3957         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
3958         * dbxread.c: Remove _initialize_dbxread prototype.
3959         * dcache.c: Remove _initialize_dcache prototype.
3960         * demangle.c: Remove _initialize_demangler prototype.
3961         * disasm-selftests.c: Remove _initialize_disasm_selftests
3962         prototype.
3963         * disasm.c: Remove _initialize_disasm prototype.
3964         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
3965         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
3966         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
3967         prototype.
3968         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
3969         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
3970         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
3971         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
3972         * elfread.c: Remove _initialize_elfread prototype.
3973         * exec.c: Remove _initialize_exec prototype.
3974         * extension.c: Remove _initialize_extension prototype.
3975         * f-lang.c: Remove _initialize_f_language prototype.
3976         * f-valprint.c: Remove _initialize_f_valprint prototype.
3977         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
3978         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
3979         * filesystem.c: Remove _initialize_filesystem prototype.
3980         * findcmd.c: Remove _initialize_mem_search prototype.
3981         * fork-child.c: Remove _initialize_fork_child prototype.
3982         * frame-base.c: Remove _initialize_frame_base prototype.
3983         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
3984         * frame.c: Remove _initialize_frame prototype.
3985         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
3986         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
3987         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
3988         * gcore.c: Remove _initialize_gcore prototype.
3989         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
3990         * gdbarch.c: Regenerate.
3991         * gdbarch.sh: Remove _initialize_gdbarch prototype.
3992         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
3993         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
3994         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
3995         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
3996         * go-lang.c: Remove _initialize_go_language prototype.
3997         * go32-nat.c: Remove _initialize_go32_nat prototype.
3998         * guile/guile.c: Remove _initialize_guile prototype.
3999         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
4000         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
4001         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
4002         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
4003         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
4004         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
4005         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
4006         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
4007         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
4008         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
4009         prototype.
4010         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
4011         prototype.
4012         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
4013         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
4014         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
4015         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
4016         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
4017         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
4018         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
4019         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
4020         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
4021         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
4022         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
4023         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
4024         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
4025         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4026         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
4027         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
4028         prototype.
4029         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
4030         prototype.
4031         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
4032         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
4033         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
4034         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
4035         * infcall.c: Remove _initialize_infcall prototype.
4036         * infcmd.c: Remove _initialize_infcmd prototype.
4037         * inferior.c: Remove _initialize_inferiors prototype.
4038         * inflow.c: Remove _initialize_inflow prototype.
4039         * infrun.c: Remove _initialize_infrun prototype.
4040         * interps.c: Remove _initialize_interpreter prototype.
4041         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
4042         * jit.c: Remove _initialize_jit prototype.
4043         * language.c: Remove _initialize_language prototype.
4044         * linux-fork.c: Remove _initialize_linux_fork prototype.
4045         * linux-nat.c: Remove _initialize_linux_nat prototype.
4046         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
4047         * linux-thread-db.c: Remove _initialize_thread_db prototype.
4048         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
4049         * m2-lang.c: Remove _initialize_m2_language prototype.
4050         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
4051         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
4052         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
4053         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
4054         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
4055         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4056         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4057         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
4058         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
4059         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
4060         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4061         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4062         * machoread.c: Remove _initialize_machoread prototype.
4063         * macrocmd.c: Remove _initialize_macrocmd prototype.
4064         * macroscope.c: Remove _initialize_macroscope prototype.
4065         * maint.c: Remove _initialize_maint_cmds prototype.
4066         * mdebugread.c: Remove _initialize_mdebugread prototype.
4067         * memattr.c: Remove _initialize_mem prototype.
4068         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
4069         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
4070         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
4071         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
4072         * mi/mi-main.c: Remove _initialize_mi_main prototype.
4073         * microblaze-linux-tdep.c: Remove
4074         _initialize_microblaze_linux_tdep prototype.
4075         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
4076         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
4077         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
4078         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
4079         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
4080         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
4081         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
4082         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
4083         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
4084         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
4085         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
4086         prototype.
4087         * mipsread.c: Remove _initialize_mipsread prototype.
4088         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
4089         prototype.
4090         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
4091         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
4092         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
4093         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
4094         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
4095         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
4096         prototype.
4097         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
4098         * nto-procfs.c: Remove _initialize_procfs prototype.
4099         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
4100         * objc-lang.c: Remove _initialize_objc_language prototype.
4101         * objfiles.c: Remove _initialize_objfiles prototype.
4102         * observer.c: Remove observer_test_first_notification_function,
4103         observer_test_second_notification_function,
4104         observer_test_third_notification_function, and
4105         _initialize_observer prototypes.
4106         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
4107         * osabi.c: Remove _initialize_gdb_osabi prototype.
4108         * osdata.c: Remove _initialize_osdata prototype.
4109         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
4110         * parse.c: Remove _initialize_parse prototype.
4111         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
4112         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
4113         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
4114         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
4115         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
4116         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
4117         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
4118         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
4119         * printcmd.c: Remove _initialize_printcmd prototype.
4120         * probe.c: Remove _initialize_probe prototype.
4121         * proc-api.c: Remove _initialize_proc_api prototype.
4122         * proc-events.c: Remove _initialize_proc_events prototype.
4123         * proc-service.c: Remove _initialize_proc_service prototype.
4124         * procfs.c: Remove _initialize_procfs prototype.
4125         * psymtab.c: Remove _initialize_psymtab prototype.
4126         * python/python.c: Remove _initialize_python prototype.
4127         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
4128         * record-btrace.c: Remove _initialize_record_btrace prototype.
4129         * record-full.c: Remove _initialize_record_full prototype.
4130         * record.c: Remove _initialize_record prototype.
4131         * regcache.c: Remove _initialize_regcache prototype.
4132         * reggroups.c: Remove _initialize_reggroup prototype.
4133         * remote-notif.c: Remove _initialize_notif prototype.
4134         * remote-sim.c: Remove _initialize_remote_sim prototype.
4135         * remote.c: Remove _initialize_remote prototype.
4136         * reverse.c: Remove _initialize_reverse prototype.
4137         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
4138         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
4139         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
4140         prototype.
4141         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
4142         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
4143         * rust-exp.y: Remove _initialize_rust_exp prototype.
4144         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
4145         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
4146         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
4147         * score-tdep.c: Remove _initialize_score_tdep prototype.
4148         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
4149         prototype.
4150         * ser-go32.c: Remove _initialize_ser_dos prototype.
4151         * ser-mingw.c: Remove _initialize_ser_windows prototype.
4152         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
4153         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
4154         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
4155         * serial.c: Remove _initialize_serial prototype.
4156         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
4157         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
4158         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
4159         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
4160         * skip.c: Remove _initialize_step_skip prototype.
4161         * sol-thread.c: Remove _initialize_sol_thread prototype.
4162         * solib-aix.c: Remove _initialize_solib_aix prototype.
4163         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
4164         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
4165         * solib-frv.c: Remove _initialize_frv_solib prototype.
4166         * solib-spu.c: Remove _initialize_spu_solib prototype.
4167         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
4168         * solib-target.c: Remove _initialize_solib_target prototype.
4169         * solib.c: Remove _initialize_solib prototype.
4170         * source.c: Remove _initialize_source prototype.
4171         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
4172         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
4173         prototype.
4174         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
4175         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
4176         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
4177         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
4178         prototype.
4179         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
4180         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
4181         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
4182         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
4183         prototype.
4184         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
4185         prototype.
4186         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
4187         prototype.
4188         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
4189         prototype.
4190         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
4191         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
4192         prototype.
4193         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
4194         prototype.
4195         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
4196         prototype.
4197         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
4198         prototype.
4199         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
4200         prototype.
4201         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
4202         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
4203         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
4204         * stabsread.c: Remove _initialize_stabsread prototype.
4205         * stack.c: Remove _initialize_stack prototype.
4206         * stap-probe.c: Remove _initialize_stap_probe prototype.
4207         * std-regs.c: Remove _initialize_frame_reg prototype.
4208         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
4209         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
4210         * symfile.c: Remove _initialize_symfile prototype.
4211         * symmisc.c: Remove _initialize_symmisc prototype.
4212         * symtab.c: Remove _initialize_symtab prototype.
4213         * target-dcache.c: Remove _initialize_target_dcache prototype.
4214         * target-descriptions.c: Remove _initialize_target_descriptions
4215         prototype.
4216         * thread.c: Remove _initialize_thread prototype.
4217         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
4218         prototype.
4219         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
4220         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
4221         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
4222         prototype.
4223         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
4224         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
4225         * tracefile.c: Remove _initialize_tracefile prototype.
4226         * tracepoint.c: Remove _initialize_tracepoint prototype.
4227         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
4228         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
4229         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
4230         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
4231         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
4232         * tui/tui-win.c: Remove _initialize_tui_win prototype.
4233         * tui/tui.c: Remove _initialize_tui prototype.
4234         * typeprint.c: Remove _initialize_typeprint prototype.
4235         * user-regs.c: Remove _initialize_user_regs prototype.
4236         * utils.c: Remove _initialize_utils prototype.
4237         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
4238         * valarith.c: Remove _initialize_valarith prototype.
4239         * valops.c: Remove _initialize_valops prototype.
4240         * valprint.c: Remove _initialize_valprint prototype.
4241         * value.c: Remove _initialize_values prototype.
4242         * varobj.c: Remove _initialize_varobj prototype.
4243         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
4244         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
4245         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
4246         * windows-nat.c: Remove _initialize_windows_nat,
4247         _initialize_check_for_gdb_ini, and _initialize_loadable
4248         prototypes.
4249         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
4250         * xcoffread.c: Remove _initialize_xcoffread prototype.
4251         * xml-support.c: Remove _initialize_xml_support prototype.
4252         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
4253         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
4254         prototype.
4255         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
4256         prototype.
4257         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
4258
4259 2017-09-08  Keith Seitz  <keiths@redhat.com>
4260
4261         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
4262         field.
4263
4264 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
4265
4266         * f-valprint.c (f_val_print): Remove check for one byte
4267         sized integers. Remove printing of character type.
4268
4269 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
4270             Christoph Weinmann  <christoph.t.weinmann@intel.com>
4271             Bernhard Heckel  <bernhard.heckel@intel.com>
4272
4273         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
4274         to maintain proper indentation when printing pointers/refs.
4275
4276 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4277
4278         GDB 8.0.1 released.
4279
4280 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4281
4282         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
4283
4284 2017-09-05  Tom Tromey  <tom@tromey.com>
4285
4286         * parse.c (funcall_chain): Now a std::vector.
4287         (start_arglist, end_arglist): Simplify.
4288         (free_funcalls): Remove.
4289         (parse_exp_in_context_1): Remove cleanup.
4290
4291 2017-09-05  Tom Tromey  <tom@tromey.com>
4292
4293         * go-exp.y (go_parse): Don't create a cleanup.
4294
4295 2017-09-05  Tom Tromey  <tom@tromey.com>
4296
4297         * d-exp.y (PrimaryExpression): Use std::string.
4298         (d_parse): Don't create a cleanup.
4299
4300 2017-09-05  Tom Tromey  <tom@tromey.com>
4301
4302         * utils.c (do_clear_parser_state): Remove.
4303         (make_cleanup_clear_parser_state): Remove.
4304         * p-exp.y (pascal_parse): Use scoped_restore.
4305         * m2-exp.y (m2_parse): Use scoped_restore.
4306         * f-exp.y (f_parse): Use scoped_restore.
4307         * d-exp.y (d_parse): Use scoped_restore.
4308         * c-exp.y (c_parse): Use scoped_restore.
4309         * ada-exp.y (ada_parse): Use scoped_restore.
4310         * utils.h (make_cleanup_clear_parser_state): Remove.
4311
4312 2017-09-06  Keith Seitz  <keiths@redhat.com>
4313
4314         * dwarf2read.c (dw2_linkage_name_attr): New function.
4315         (dw2_linkage_name): New function.
4316         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
4317         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
4318         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
4319
4320 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4321
4322         * config/djgpp/djconfig.sh: Correct shell portability issue.
4323
4324 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4325
4326         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
4327
4328 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4329
4330         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
4331         * NEWS: Mention new FreeBSD/mips native configuration.
4332         * configure.host: Add aarch64*-*-freebsd*.
4333         * configure.nat: Likewise.
4334         * aarch64-fbsd-nat.c: New file.
4335
4336 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4337
4338         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
4339         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
4340         * NEWS: Mention new FreeBSD/aarch64 target.
4341         * configure.tgt: Add aarch64*-*-freebsd*.
4342         * aarch64-fbsd-tdep.c: New file.
4343         * aarch64-fbsd-tdep.h: New file.
4344
4345 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4346
4347         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
4348
4349 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
4350
4351         * parse.c (find_minsym_type_and_address): Don't relocate addresses
4352         of TLS symbols.
4353
4354 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4355
4356         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
4357         call.
4358
4359 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4360
4361         * infrun.c (follow_exec): Call add_thread after
4362         target_find_description.
4363
4364 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4365
4366         * infrun.c (handle_inferior_event_1): When exec'ing, read
4367         stop_pc after follow_exec.
4368
4369 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4370
4371         * remote.c (process_g_packet): Update error message.
4372
4373 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4374
4375         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
4376         targets.
4377
4378 2017-09-05  Pedro Alves  <palves@redhat.com>
4379
4380         * eval.c (eval_call, evaluate_funcall): New functions, factored
4381         out from ...
4382         (evaluate_subexp_standard): ... this.
4383
4384 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4385
4386         * amd64-tdep.c (amd64_target_description): Create target
4387         descriptions.
4388         (_initialize_amd64_tdep): Don't call functions
4389         initialize_tdesc_amd64_*.  Add self tests.
4390         * arch/amd64.c (amd64_create_target_description): Add parameter
4391         is_linux.  Call set_tdesc_osabi if is_linux is true.
4392         * arch/amd64.h (amd64_create_target_description): Update the
4393         declaration.
4394         * arch/i386.c (i386_create_target_description): Add parameter
4395         is_linux.  Call set_tdesc_osabi if is_linux is true.
4396         * arch/i386.h (i386_create_target_description): Update
4397         declaration.
4398         * configure.tgt: Add i386.o to gdb_target_obs.
4399         * features/Makefile (XMLTOC): Remove i386/*.xml.
4400         * features/i386/amd64-avx-avx512.c: Remove.
4401         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
4402         * features/i386/amd64-avx-mpx.c: Remove.
4403         * features/i386/amd64-avx.c: Remove.
4404         * features/i386/amd64-mpx.c: Remove.
4405         * features/i386/amd64.c: Remove.
4406         * features/i386/i386-avx-avx512.c: Remove.
4407         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
4408         * features/i386/i386-avx-mpx.c: Remove.
4409         * features/i386/i386-avx.c: Remove.
4410         * features/i386/i386-mmx.c: Remove.
4411         * features/i386/i386-mpx.c: Remove.
4412         * features/i386/i386.c: Remove.
4413         * i386-tdep.c: Don't include features/i386/i386*.c., include
4414         target-descriptions.h and arch/i386.h.
4415         (i386_target_description): Create target descriptions.
4416         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
4417         functions.  Do self tests.
4418
4419 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4420
4421         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
4422         * features/i386/amd64-avx-avx512-linux.c: Removed.
4423         * features/i386/amd64-avx-linux.c: Removed.
4424         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
4425         * features/i386/amd64-avx-mpx-linux.c: Removed.
4426         * features/i386/amd64-linux.c: Removed.
4427         * features/i386/amd64-mpx-linux.c: Removed.
4428         * features/i386/x32-avx-avx512-linux.c: Removed.
4429         * features/i386/x32-avx-linux.c: Removed.
4430         * features/i386/x32-linux.c: Removed.
4431
4432 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4433
4434         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
4435         features/i386/*.c.
4436         (amd64_linux_read_description): Call
4437         amd64_create_target_description.
4438         * arch/amd64.c: New file.
4439         * arch/amd64.h: New file.
4440         * configure.tgt (x86_64-*-linux*): Append amd64.o.
4441         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
4442
4443 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4444
4445         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
4446         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
4447         (amd64_linux_read_description): Create target descriptions.
4448         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
4449         functions.  Add unit tests.
4450         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
4451         x32-core.xml.
4452         * features/i386/64bit-avx.c: Generated.
4453         * features/i386/64bit-avx512.c: Generated.
4454         * features/i386/64bit-core.c: Generated.
4455         * features/i386/64bit-linux.c: Generated.
4456         * features/i386/64bit-mpx.c: Generated.
4457         * features/i386/64bit-pkeys.c: Generated.
4458         * features/i386/64bit-segments.c: Generated.
4459         * features/i386/64bit-sse.c: Generated.
4460         * features/i386/x32-core.c: Generated.
4461         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
4462         c files for amd64-linux and x32-linux.
4463
4464 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4465
4466         * amd64-linux-tdep.c (amd64_linux_read_description): New
4467         function.
4468         (amd64_linux_core_read_description): Call
4469         amd64_linux_read_description.
4470         (amd64_linux_init_abi): Likewise.
4471         (amd64_x32_linux_init_abi): Likewise.
4472         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
4473         * x86-linux-nat.c (x86_linux_read_description): Call
4474         amd64_linux_read_description.
4475
4476 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4477
4478         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
4479         comments.
4480
4481 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4482
4483         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
4484         * features/i386/i386-avx-avx512-linux.c: Remove.
4485         * features/i386/i386-avx-linux.c: Remove.
4486         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
4487         * features/i386/i386-avx-mpx-linux.c: Remove.
4488         * features/i386/i386-linux.c: Remove.
4489         * features/i386/i386-mmx-linux.c: Remove.
4490         * features/i386/i386-mpx-linux.c: Remove.
4491
4492 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4493
4494         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
4495         (SFILES): Add arch/i386.c.
4496         (HFILES_NO_SRCDIR): Add arch/i386.h.
4497         * arch/i386.c: New file.
4498         * arch/i386.h: New file.
4499         * arch/tdesc.h (allocate_target_description): Declare.
4500         (set_tdesc_architecture): Declare.
4501         (set_tdesc_osabi): Declare.
4502         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
4503         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
4504         include arch/i386.h.
4505         (i386_linux_read_description): Remove code and call
4506         i386_create_target_description.
4507         (set_tdesc_architecture): New function.
4508         (set_tdesc_osabi): New function.
4509         * target-descriptions.h (allocate_target_description): Remove.
4510
4511 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4512
4513         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
4514         * target-descriptions.c (tdesc_create_feature): Likewise, and
4515         adjust code.
4516         * features/i386/32bit-avx.c: Re-generated.
4517         * features/i386/32bit-avx512.c: Re-generated.
4518         * features/i386/32bit-core.c: Re-generated.
4519         * features/i386/32bit-linux.c: Re-generated.
4520         * features/i386/32bit-mpx.c: Re-generated.
4521         * features/i386/32bit-pkeys.c: Re-generated.
4522         * features/i386/32bit-sse.c: Re-generated.
4523
4524 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4525
4526         * regformats/regdef.h (struct reg): Override operator == and !=.
4527
4528 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4529
4530         * arch/tdesc.h: New file.
4531         * regformats/regdat.sh: Generate code using tdesc_create_reg.
4532         * target-descriptions.c: Update comments.
4533         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
4534         declarations.
4535         * features/i386/32bit-avx.c: Re-generated.
4536         * features/i386/32bit-avx512.c: Re-generated.
4537         * features/i386/32bit-core.c: Re-generated.
4538         * features/i386/32bit-linux.c: Re-generated.
4539         * features/i386/32bit-mpx.c: Re-generated.
4540         * features/i386/32bit-pkeys.c: Re-generated.
4541         * features/i386/32bit-sse.c: Re-generated.
4542
4543 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4544
4545         * regformats/regdat.sh: Update generated code.
4546
4547 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4548
4549         * regformats/regdat.sh: Adjust code order.
4550
4551 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4552
4553         * expprint.c (dump_subexp_body_standard): Use constant format
4554         string in fprintf_filtered call.
4555
4556 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4557
4558         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
4559         NetBSD/i386.
4560         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
4561
4562 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4563
4564         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
4565
4566 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4567
4568         * bsd-kvm.o: Define _KMEMUSER.
4569         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
4570         * configure: Regenerate.
4571
4572 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4573
4574         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
4575         * i386-fbsd-nat.c: Likewise.
4576
4577 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4578
4579         * unittests/array-view-selftests.c: Add include of <array>.
4580
4581 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4582
4583         * spu-tdep.c (flush_ea_cache): Add missing argument to
4584         call_function_by_hand.
4585
4586 2017-09-04  Pedro Alves  <palves@redhat.com>
4587
4588         * NEWS (Safer support for debugging with no debug info): New.
4589
4590 2017-09-04  Pedro Alves  <palves@redhat.com>
4591
4592         * c-exp.y (function_method, function_method_void): Add current
4593         instance flags to TYPE_INSTANCE.
4594         * dwarf2read.c (check_modifier): New.
4595         (compute_delayed_physnames): Assert that only C++ adds delayed
4596         physnames.  Mark fn_fields as const/volatile depending on
4597         physname.
4598         * eval.c (make_params): New type_instance_flags parameter.  Use
4599         it as the new type's instance flags.
4600         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
4601         flags element and pass it to make_params.
4602         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
4603         instance flags element.
4604         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
4605         * gdbtypes.h: Include "enum-flags.h".
4606         (type_instance_flags): New enum-flags type.
4607         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
4608         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
4609         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
4610         (follow_type_instance_flags): New function.
4611         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
4612         * parser-defs.h (follow_type_instance_flags): Declare.
4613         * valops.c (value_struct_elt_for_reference): const/volatile must
4614         match too.
4615
4616 2017-09-04  Pedro Alves  <palves@redhat.com>
4617
4618         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
4619         function/method scopes; lookup the nested name as a function local
4620         static variable.
4621
4622 2017-09-04  Pedro Alves  <palves@redhat.com>
4623
4624         (%type <voidval>): Add function_method.
4625         * c-exp.y (exp): New production for calls with no arguments.
4626         (function_method, function_method_void_or_typelist): New
4627         productions.
4628         (exp): New production for "method()::static_var".
4629         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
4630         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4631         Handle OP_FUNC_STATIC_VAR.
4632         * parse.c (operator_length_standard):
4633         Handle OP_FUNC_STATIC_VAR.
4634
4635 2017-09-04  Pedro Alves  <palves@redhat.com>
4636
4637         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
4638         handling.
4639         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4640         Ditto.
4641         * parse.c (operator_length_standard, operator_check_standard):
4642         Ditto.
4643         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
4644
4645 2017-09-04  Pedro Alves  <palves@redhat.com>
4646
4647         * ax-gdb.c: Include "typeprint.h".
4648         (gen_expr_for_cast): New function.
4649         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
4650         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
4651         type is unknown.
4652         * dwarf2read.c (new_symbol_full): Fallback to int instead of
4653         nodebug_data_symbol.
4654         * eval.c: Include "typeprint.h".
4655         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
4656         Error out if symbol has unknown type.
4657         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
4658         evaluate_subexp_for_cast.
4659         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
4660         OP_VAR_MSYM_VALUE.
4661         (evaluate_subexp_for_cast): New function.
4662         * gdbtypes.c (init_nodebug_var_type): New function.
4663         (objfile_type): Use it to initialize types of variables with no
4664         debug info.
4665         * typeprint.c (error_unknown_type): New.
4666         * typeprint.h (error_unknown_type): New declaration.
4667         * compile/compile-c-types.c (convert_type_basic): Handle
4668         TYPE_CODE_ERROR; warn and fallback to int for variables with
4669         unknown type.
4670
4671 2017-09-04  Pedro Alves  <palves@redhat.com>
4672
4673         * eval.c (evaluate_var_value): New function, factored out from ...
4674         (evaluate_subexp_standard): ... here.
4675
4676 2017-09-04  Pedro Alves  <palves@redhat.com>
4677
4678         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
4679         Remove useless assignments to 'op'.
4680
4681 2017-09-04  Pedro Alves  <palves@redhat.com>
4682
4683         * eval.c (eval_skip_value): New function.
4684         (evaluate_subexp_standard): Use it.
4685
4686 2017-09-04  Pedro Alves  <palves@redhat.com>
4687
4688         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
4689         function name from symbol/minsym and pass it to
4690         error_call_unknown_return_type.
4691
4692 2017-09-04  Pedro Alves  <palves@redhat.com>
4693
4694         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
4695         * ax-gdb.c (gen_msym_var_ref): New function.
4696         (gen_expr): Handle OP_VAR_MSYM_VALUE.
4697         * eval.c (evaluate_var_msym_value): New function.
4698         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
4699         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
4700         to call_function_by_hand.
4701         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4702         Handle OP_VAR_MSYM_VALUE.
4703         (union exp_element) <msymbol>: New field.
4704         * minsyms.h (struct type): Forward declare.
4705         (find_minsym_type_and_address): Declare.
4706         * parse.c (write_exp_elt_msym): New function.
4707         (write_exp_msymbol): Delete, refactored as ...
4708         (find_minsym_type_and_address): ... this new function.
4709         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
4710         (operator_length_standard, operator_check_standard): Handle
4711         OP_VAR_MSYM_VALUE.
4712         * std-operator.def (OP_VAR_MSYM_VALUE): New.
4713
4714 2017-09-04  Pedro Alves  <palves@redhat.com>
4715
4716         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
4717         TYPE_GNU_IFUNC specially here.  Throw error if return type is
4718         unknown.
4719         * ada-typeprint.c (print_func_type): Handle functions with unknown
4720         return type.
4721         * c-typeprint.c (c_type_print_base): Handle functions and methods
4722         with unknown return type.
4723         * compile/compile-c-symbols.c (convert_symbol_bmsym)
4724         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
4725         * compile/compile-c-types.c: Include "objfiles.h".
4726         (convert_func): For functions with unknown return type, warn and
4727         default to int.
4728         * compile/compile-object-run.c (compile_object_run): Adjust call
4729         to call_function_by_hand_dummy.
4730         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
4731         call_function_by_hand.
4732         * eval.c (evaluate_subexp_standard): Adjust calls to
4733         call_function_by_hand.  Handle functions and methods with unknown
4734         return type.  Pass expect_type to call_function_by_hand.
4735         * f-typeprint.c (f_type_print_base): Handle functions with unknown
4736         return type.
4737         * gcore.c (call_target_sbrk): Adjust call to
4738         call_function_by_hand.
4739         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
4740         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
4741         an integer address type instead of nodebug.
4742         * guile/scm-value.c (gdbscm_value_call): Adjust call to
4743         call_function_by_hand.
4744         * infcall.c (error_call_unknown_return_type): New function.
4745         (call_function_by_hand): New "default_return_type" parameter.
4746         Pass it down.
4747         (call_function_by_hand_dummy): New "default_return_type"
4748         parameter.  Use it instead of defaulting to int.  If there's no
4749         default and the return type is unknown, throw an error.  If
4750         there's a default return type, and the called function has no
4751         debug info, then assume the function is prototyped.
4752         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
4753         New "default_return_type" parameter.
4754         (error_call_unknown_return_type): New declaration.
4755         * linux-fork.c (call_lseek): Cast return type of lseek.
4756         (inferior_call_waitpid, checkpoint_command): Adjust calls to
4757         call_function_by_hand.
4758         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
4759         calls to call_function_by_hand.
4760         * m2-typeprint.c (m2_procedure): Handle functions with unknown
4761         return type.
4762         * objc-lang.c (lookup_objc_class, lookup_child_selector)
4763         (value_nsstring, print_object_command): Adjust calls to
4764         call_function_by_hand.
4765         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
4766         functions with unknown return type.
4767         (pascal_type_print_func_varspec_suffix): New function.
4768         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
4769         TYPE_CODE_METHOD>: Use it.
4770         * python/py-value.c (valpy_call): Adjust call to
4771         call_function_by_hand.
4772         * rust-lang.c (rust_evaluate_funcall): Adjust call to
4773         call_function_by_hand.
4774         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
4775         call_function_by_hand.
4776         * valops.c (value_allocate_space_in_inferior): Adjust call to
4777         call_function_by_hand.
4778         * typeprint.c (type_print_unknown_return_type): New function.
4779         * typeprint.h (type_print_unknown_return_type): New declaration.
4780
4781 2017-09-04  Pedro Alves  <palves@redhat.com>
4782
4783         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
4784         types with more than one parameter as prototyped.
4785
4786 2017-09-04  Pedro Alves  <palves@redhat.com>
4787
4788         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
4789         (disassemble_command): Use gdb_disassembly_flags instead of bare
4790         int.
4791         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
4792         (dump_insns, do_mixed_source_and_assembly_deprecated)
4793         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
4794         Use gdb_disassembly_flags instead of bare int.
4795         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
4796         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
4797         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
4798         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
4799         (enum gdb_disassembly_flag): ... values of this new enumeration.
4800         (gdb_disassembly_flags): Define.
4801         (gdb_disassembly)
4802         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
4803         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
4804         gdb_disassembly_flags instead of bare int.
4805         * record-btrace.c (btrace_insn_history)
4806         (record_btrace_insn_history, record_btrace_insn_history_range)
4807         (record_btrace_insn_history_from): Use gdb_disassembly_flags
4808         instead of bare int.
4809         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
4810         Use gdb_disassembly_flags instead of bare int.
4811         * target-debug.h (target_debug_print_gdb_disassembly_flags):
4812         Define.
4813         * target-delegates.c: Regenerate.
4814         * target.c (target_insn_history, target_insn_history_from)
4815         (target_insn_history_range): Use gdb_disassembly_flags instead of
4816         bare int.
4817         * target.h: Include "disasm.h".
4818         (struct target_ops) <to_insn_history, to_insn_history_from,
4819         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
4820         int.
4821         (target_insn_history, target_insn_history_from)
4822         (target_insn_history_range): Use gdb_disassembly_flags instead of
4823         bare int.
4824
4825 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
4826
4827         * cli/cli-script.c (build_command_line): For if/while commands,
4828         check whether args is empty.
4829
4830 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
4831
4832         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
4833         (enum command_control_type): Likewise.
4834         (struct command_line): Likewise.
4835         (free_command_lines): Likewise.
4836         (struct command_lines_deleter): Likewise.
4837         (command_line_up): Likewise.
4838         (read_command_lines): Likewise.
4839         (read_command_lines_1): Likewise.
4840         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
4841         (enum command_control_type): Likewise.
4842         (struct command_line): Likewise.
4843         (free_command_lines): Likewise.
4844         (struct command_lines_deleter): Likewise.
4845         (command_line_up): Likewise.
4846         (read_command_lines): Likewise.
4847         (read_command_lines_1): Likewise.
4848         * breakpoint.h: Include cli/cli-script.h.
4849         * extension-priv.h: Likewise.
4850         * gdbcmd.h: Likewise.
4851
4852 2017-09-04  Pedro Alves  <palves@redhat.com>
4853
4854         * ada-lang.c (is_known_support_routine): Move sal declaration to
4855         where it is initialized.
4856         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
4857         (parse_breakpoint_sals, decode_static_tracepoint_spec)
4858         (clear_command, update_static_tracepoint): Remove init_sal
4859         references.  Move declarations closer to initializations.
4860         * cli/cli-cmds.c (list_command): Move sal declarations closer to
4861         initializations.
4862         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
4863         references.  Move sal declarations closer to initializations.
4864         * frame.c (find_frame_sal): Return a symtab_and_line via function
4865         return instead of output parameter.  Remove init_sal references.
4866         * frame.h (find_frame_sal): Return a symtab_and_line via function
4867         return instead of output parameter.
4868         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
4869         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
4870         instead of memset.
4871         (gdbscm_find_pc_line): Remove init_sal reference.
4872         * infcall.c (call_function_by_hand_dummy): Remove init_sal
4873         references.  Move declarations closer to initializations.
4874         * infcmd.c (set_step_frame): Update.  Move declarations closer to
4875         initializations.
4876         (finish_backward): Remove init_sal references.  Move declarations
4877         closer to initializations.
4878         * infrun.c (process_event_stop_test, handle_step_into_function)
4879         (insert_hp_step_resume_breakpoint_at_frame)
4880         (insert_step_resume_breakpoint_at_caller): Likewise.
4881         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
4882         (symbol_to_sal): Likewise.
4883         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
4884         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
4885         to its initialization.
4886         * reverse.c (save_bookmark_command): Use new/delete.  Remove
4887         init_sal references.  Move declarations closer to initializations.
4888         * source.c (get_current_source_symtab_and_line): Remove brace
4889         initialization.
4890         (set_current_source_symtab_and_line): Now takes the sal by const
4891         reference.  Remove brace initialization.
4892         (line_info): Remove init_sal reference.
4893         * source.h (set_current_source_symtab_and_line): Now takes a
4894         symtab_and_line via const reference.
4895         * stack.c (set_current_sal_from_frame): Adjust.
4896         (print_frame_info): Adjust.
4897         (get_last_displayed_sal): Return the sal via function return
4898         instead of via output parameter.  Simplify.
4899         (frame_info): Adjust.
4900         * stack.h (get_last_displayed_sal): Return the sal via function
4901         return instead of via output parameter.
4902         * symtab.c (init_sal): Delete.
4903         (find_pc_sect_line): Remove init_sal references.  Move
4904         declarations closer to initializations.
4905         (find_function_start_sal): Remove init_sal references.  Move
4906         declarations closer to initializations.
4907         * symtab.h (struct symtab_and_line): In-class initialize all
4908         fields.
4909         * tracepoint.c (set_traceframe_context)
4910         (print_one_static_tracepoint_marker): Remove init_sal references.
4911         Move declarations closer to initializations.
4912         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
4913         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
4914         declarations closer to initializations.
4915         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
4916         init_sal references.  Adjust.
4917
4918 2017-09-04  Pedro Alves  <palves@redhat.com>
4919
4920         * ax-gdb.c (agent_command_1): Use range-for.
4921         * break-catch-throw.c (re_set_exception_catchpoint): Update.
4922         * breakpoint.c: Include "common/array-view.h".
4923         (init_breakpoint_sal, create_breakpoint_sal): Change sals
4924         parameter from struct symtabs_and_lines to
4925         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
4926         (breakpoint_sals_to_pc): Change sals parameter from struct
4927         symtabs_and_lines to std::vector reference.
4928         (check_fast_tracepoint_sals): Change sals parameter from struct
4929         symtabs_and_lines to std::array_view.  Use range-for.
4930         (decode_static_tracepoint_spec): Return a std::vector instead of
4931         symtabs_and_lines.  Update.
4932         (create_breakpoint): Update.
4933         (break_range_command, until_break_command, clear_command): Update.
4934         (base_breakpoint_decode_location, bkpt_decode_location)
4935         (bkpt_probe_create_sals_from_location)
4936         (bkpt_probe_decode_location, tracepoint_decode_location)
4937         (tracepoint_probe_decode_location)
4938         (strace_marker_create_sals_from_location): Return a std::vector
4939         instead of symtabs_and_lines.
4940         (strace_marker_create_breakpoints_sal): Update.
4941         (strace_marker_decode_location): Return a std::vector instead of
4942         symtabs_and_lines.  Update.
4943         (update_breakpoint_locations): Change struct symtabs_and_lines
4944         parameters to gdb::array_view.  Adjust.
4945         (location_to_sals): Return a std::vector instead of
4946         symtabs_and_lines.  Update.
4947         (breakpoint_re_set_default): Use std::vector instead of struct
4948         symtabs_and_lines.
4949         (decode_location_default): Return a std::vector instead of
4950         symtabs_and_lines.  Update.
4951         * breakpoint.h: Include "common/array-view.h".
4952         (struct breakpoint_ops) <decode_location>: Now returns a
4953         std::vector instead of returning a symtabs_and_lines via output
4954         parameter.
4955         (update_breakpoint_locations): Change sals parameters to use
4956         gdb::array_view.
4957         * cli/cli-cmds.c (edit_command, list_command): Update to use
4958         std::vector and gdb::array_view.
4959         (ambiguous_line_spec): Adjust to use gdb::array_view and
4960         range-for.
4961         (compare_symtabs): Rename to ...
4962         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
4963         const reference and adjust.
4964         (filter_sals): Rewrite using std::vector and standard algorithms.
4965         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
4966         (jump_command): Update to use std::vector.
4967         * linespec.c (struct linespec_state) <canonical_names>: Update
4968         comment.
4969         (add_sal_to_sals_basic): Delete.
4970         (add_sal_to_sals, filter_results, convert_results_to_lsals)
4971         (decode_line_2, create_sals_line_offset)
4972         (convert_address_location_to_sals, convert_linespec_to_sals)
4973         (convert_explicit_location_to_sals, parse_linespec)
4974         (event_location_to_sals, decode_line_full, decode_line_1)
4975         (decode_line_with_current_source)
4976         (decode_line_with_last_displayed, decode_objc)
4977         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
4978         (linespec_result::~linespec_result): Adjust to use std::vector
4979         instead of symtabs_and_lines.
4980         * linespec.h (linespec_sals::sals): Now a std::vector.
4981         (struct linespec_result): Use std::vector, bool, and in-class
4982         initialization.
4983         (decode_line_1, decode_line_with_current_source)
4984         (decode_line_with_last_displayed): Return std::vector.
4985         * macrocmd.c (info_macros_command): Use std::vector.
4986         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
4987         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
4988         std::vector.
4989         * probe.h (parse_probes): Return a std::vector.
4990         * python/python.c (gdbpy_decode_line): Use std::vector and
4991         gdb::array_view.
4992         * source.c (select_source_symtab, line_info): Use std::vector.
4993         * stack.c (func_command): Use std::vector.
4994         * symtab.h (struct symtabs_and_lines): Delete.
4995         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
4996
4997 2017-09-04  Pedro Alves  <palves@redhat.com>
4998
4999         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5000         unittests/array-view-selftests.c.
5001         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
5002         * common/array-view.h: New file.
5003         * unittests/array-view-selftests.c: New file.
5004
5005 2017-09-04  Pedro Alves  <palves@redhat.com>
5006
5007         * cli/cli-cmds.c (edit_command): Pass message to
5008         ambiguous_line_spec.
5009         (list_command): Pass message to ambiguous_line_spec.  Say
5010         "first"/"last" instead of "start" and "end" to be consistent with
5011         the manual.
5012         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
5013         them to print formatted message.
5014
5015 2017-09-04  Pedro Alves  <palves@redhat.com>
5016
5017         * btrace.c (ftrace_add_pt): Pass btrace_insn to
5018         ftrace_update_insns by reference instead of pointer.
5019
5020 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5021
5022         * i386-go32-tdep.c: Include x86-xstate.h.
5023         (i386_go32_init_abi): Call i386_target_description.
5024         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
5025         if xcr0 is X86_XSTATE_X87_MASK.
5026         * i386-tdep.h (tdesc_i386): Remove the declaration.
5027         (tdesc_i386_mmx): Likewise.
5028
5029 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5030
5031         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
5032         X86_XSTATE_SSE_MASK instead of 0.
5033
5034 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5035
5036         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
5037         i386_target_description.
5038         * i386-fbsd-nat.c (i386fbsd_read_description): Call
5039         i386_target_description.
5040         * i386-tdep.c (i386_gdbarch_init): Likewise.
5041
5042 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5043
5044         * amd64-darwin-tdep.c: Include "x86-xstate.h".
5045         (x86_darwin_init_abi_64): Call amd64_target_description.
5046         * amd64-dicos-tdep.c: Likewise.
5047         * amd64-fbsd-nat.c: Likewise.
5048         * amd64-fbsd-tdep.c: Likewise.
5049         * amd64-nbsd-tdep.c: Likewise.
5050         * amd64-obsd-tdep.c: Likewise.
5051         * amd64-sol2-tdep.c: Likewise.
5052         * amd64-windows-tdep.c: Likewise.
5053         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
5054
5055 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5056
5057         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
5058         (btrace_function) <insn>: Change type to use std::vector.
5059         * btrace.c (ftrace_debug, ftrace_call_num_insn,
5060         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
5061         ftrace_update_insns, ftrace_compute_global_level_offset,
5062         btrace_stitch_bts, btrace_clear, btrace_insn_get,
5063         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
5064         change to std::vector.
5065         (ftrace_update_insns): Adjust to change to std::vector, change
5066         type of INSN parameter.
5067         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
5068         * record-btrace.c (btrace_call_history_insn_range,
5069         btrace_compute_src_line_range,
5070         record_btrace_frame_prev_register): Adjust to change to
5071         std::vector.
5072         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
5073         to change to std::vector.
5074
5075 2017-09-03  Tom Tromey  <tom@tromey.com>
5076
5077         * corefile.c (reopen_exec_file): Use std::string.
5078
5079 2017-09-03  Tom Tromey  <tom@tromey.com>
5080
5081         * compile/compile.c (compile_register_name_mangled): Return
5082         std::string.
5083         * compile/compile-loc2c.c (pushf_register_address): Update.
5084         (pushf_register): Update.
5085         * compile/compile-c-types.c (convert_array): Update.
5086         * compile/compile-c-symbols.c (generate_vla_size): Update.
5087         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
5088         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
5089         (convert_one_symbol): Update.
5090         (generate_c_for_for_one_variable): Update.
5091         * compile/compile-c-support.c (c_get_range_decl_name): Return a
5092         std::string.
5093         (generate_register_struct): Update.
5094         * compile/compile-internal.h (c_get_range_decl_name): Return a
5095         std::string.
5096         (compile_register_name_mangled): Return std::string.
5097
5098 2017-09-03  Tom Tromey  <tom@tromey.com>
5099
5100         * utils.c (perror_string): Return a std::string.
5101         (throw_perror_with_name, perror_warning_with_name): Update.
5102
5103 2017-09-03  Tom Tromey  <tom@tromey.com>
5104
5105         * demangle.c (demangle_command): Use std::string,
5106         unique_xmalloc_ptr.
5107
5108 2017-09-03  Tom Tromey  <tom@tromey.com>
5109
5110         * cli/cli-setshow.c (do_set_command): Use std::string.
5111
5112 2017-09-03  Tom Tromey  <tom@tromey.com>
5113
5114         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
5115
5116 2017-09-03  Tom Tromey  <tom@tromey.com>
5117
5118         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
5119
5120 2017-09-03  Tom Tromey  <tom@tromey.com>
5121
5122         * mi/mi-cmd-env.c (env_execute_cli_command): Use
5123         gdb::unique_xmalloc_ptr.
5124
5125 2017-09-03  Tom Tromey  <tom@tromey.com>
5126
5127         * thread.c (print_thread_info_1): Use string_printf.
5128         (thread_apply_command, thread_apply_all_command): Use
5129         std::string.
5130
5131 2017-09-03  Tom Tromey  <tom@tromey.com>
5132
5133         * valprint.c (val_print_string): Update.
5134         * gdbcore.h (memory_error_message): Return std::string.
5135         * corefile.c (memory_error_message): Return std::string.
5136         (memory_error): Update.
5137         * breakpoint.c (insert_bp_location): Update.
5138
5139 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
5140
5141         * target/waitstatus.h (target_waitstatus_to_string): Change
5142         return type to std::string.
5143         * target/waitstatus.c (target_waitstatus_to_string): Return
5144         std::string.
5145         * target.h (target_waitstatus_to_string): Remove declaration.
5146         * infrun.c (resume, clear_proceed_status_thread,
5147         print_target_wait_results, do_target_wait, save_waitstatus,
5148         stop_all_threads): Adjust.
5149         * record-btrace.c (record_btrace_wait): Adjust.
5150         * target-debug.h
5151         (target_debug_print_struct_target_waitstatus_p): Adjust.
5152
5153 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
5154
5155         PR gdb/22046
5156         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
5157         detection.
5158
5159 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
5160
5161         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
5162         for setting/unsetting environment variables on the remote target.
5163         (New remote packets): Add entries for QEnvironmentHexEncoded,
5164         QEnvironmentUnset and QEnvironmentReset.
5165         * common/environ.c (gdb_environ::operator=): Extend method to
5166         handle m_user_set_env_list and m_user_unset_env_list.
5167         (gdb_environ::clear): Likewise.
5168         (match_var_in_string): Change type of first parameter from 'char
5169         *' to 'const char *'.
5170         (gdb_environ::set): Extend method to handle
5171         m_user_set_env_list and m_user_unset_env_list.
5172         (gdb_environ::unset): Likewise.
5173         (gdb_environ::clear_user_set_env): New method.
5174         (gdb_environ::user_set_envp): Likewise.
5175         (gdb_environ::user_unset_envp): Likewise.
5176         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
5177         m_user_unset_env_list on move constructor/assignment.
5178         (unset): Add new default parameter 'update_unset_list = true'.
5179         (clear_user_set_env): New method.
5180         (user_set_envp): Likewise.
5181         (user_unset_envp): Likewise.
5182         (m_user_set_env_list): New std::set.
5183         (m_user_unset_env_list): Likewise.
5184         * common/rsp-low.c (hex2str): New function.
5185         (bin2hex): New overload for bin2hex function.
5186         * common/rsp-low.c (hex2str): New prototype.
5187         (str2hex): New overload prototype.
5188         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
5189         QEnvironmentUnset and QEnvironmentReset.
5190         (remote_protocol_features): Add QEnvironmentHexEncoded,
5191         QEnvironmentUnset and QEnvironmentReset packets.
5192         (send_environment_packet): New function.
5193         (extended_remote_environment_support): Likewise.
5194         (extended_remote_create_inferior): Call
5195         extended_remote_environment_support.
5196         (_initialize_remote): Add QEnvironmentHexEncoded,
5197         QEnvironmentUnset and QEnvironmentReset packet configs.
5198         * unittests/environ-selftests.c (gdb_selftest_env_var):
5199         New variable.
5200         (test_vector_initialization): New function.
5201         (test_init_from_host_environ): Likewise.
5202         (test_reinit_from_host_environ): Likewise.
5203         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
5204         Likewise.
5205         (test_unset_set_empty_vector): Likewise.
5206         (test_vector_clear): Likewise.
5207         (test_std_move): Likewise.
5208         (test_move_constructor):
5209         (test_self_move): Likewise.
5210         (test_set_unset_reset): Likewise.
5211         (run_tests): Rewrite in terms of the functions above.
5212
5213 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
5214
5215         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
5216         (adi_available): Use a temp variable of type CORE_ADDR as argument
5217         3 when calling target_auxv_search.
5218         (adi_normalize_address): Use masks and xor operators to calculate
5219         normalized address.
5220         (adi_read_versions, adi_write_versions, adi_print_versions)
5221         (do_examine, do_assign): Use paddress.
5222
5223 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
5224
5225         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
5226         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
5227         out of loop and add supply of FIR.
5228         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
5229         add collect of FIR.
5230
5231 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
5232
5233         PR gdb/21827
5234         * cli/cli-script.c (define_command): Don't convert command name
5235         to lower case.
5236
5237 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
5238
5239         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
5240         Update all callers accordingly. Remove all code blocks handling
5241         the case where DISPP is not NULL.
5242
5243 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5244
5245         PR symtab/22003
5246         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
5247         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5248         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
5249
5250 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5251
5252         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
5253         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
5254         (read_comp_units_from_section): New parameter abbrev_section, use
5255         read_and_check_comp_unit_head, allocate signatured_type if needed.
5256         (create_all_comp_units): Update read_comp_units_from_section caller.
5257
5258 2017-08-23  Pedro Alves  <palves@redhat.com>
5259
5260         PR remote/21852
5261         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
5262         to null_ptid and switch to thread without reading the registers
5263         after adding the inferior.
5264
5265 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5266
5267         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
5268         compile-gcc.
5269         * compile/compile.c (compile_gcc, show_compile_gcc): New.
5270         (compile_to_object): Implement compile_gcc.
5271         (_initialize_compile): Install "set compile-gcc".  Initialize
5272         compile_gcc.
5273
5274 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5275
5276         * compile/compile.c (compile_to_object): Conditionally call
5277         set_verbose.  Conditionally call compile or compile_v0.
5278
5279 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
5280
5281         * sparc64-tdep.h: (adi_normalize_address): New export.
5282         * sparc-nat.h: (open_adi_tag_fd): New export.
5283         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
5284         * sparc64-linux-tdep.c:
5285         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
5286         (sparc64_linux_handle_segmentation_fault): New function.
5287         (sparc64_linux_init_abi): Register
5288         sparc64_linux_handle_segmentation_fault
5289         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
5290         (sparc64_addr_bits_remove): New function.
5291         (sparc64_init_abi): Register sparc64_addr_bits_remove.
5292         (MAX_PROC_NAME_SIZE): New macro.
5293         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
5294         (sparc64adilist): New variable.
5295         (adi_proc_list): New variable.
5296         (find_adi_info): New function.
5297         (add_adi_info): New function.
5298         (get_adi_info_proc): New function.
5299         (get_adi_info): New function.
5300         (info_adi_command): New function.
5301         (read_maps_entry): New function.
5302         (adi_available): New function.
5303         (adi_normalize_address): New function.
5304         (adi_align_address): New function.
5305         (adi_convert_byte_count): New function.
5306         (adi_tag_fd): New function.
5307         (adi_is_addr_mapped): New function.
5308         (adi_read_versions): New function.
5309         (adi_write_versions): New function.
5310         (adi_print_versions): New function.
5311         (do_examine): New function.
5312         (do_assign): New function.
5313         (adi_examine_command): New function.
5314         (adi_assign_command): New function.
5315         (_initialize_sparc64_adi_tdep): New function.
5316
5317 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
5318
5319         * breakpoint.c (breakpoints_info): Rename to ...
5320         (info_breakpoints_command): ... this.
5321         (watchpoints_info): Rename to ...
5322         (info_watchpoints_command): ... this.
5323         (tracepoints_info): Rename to ...
5324         (info_tracepoints_command): ... this.
5325         (_initialize_breakpoint): Adjust.
5326         * dcache.c (dcache_info): Rename to ...
5327         (info_display_command): ... this.
5328         (_initialize_dcache): Adjust.
5329         * frame.h (args_info): Rename to ...
5330         (info_args_command): ... this.
5331         (locals_info): Rename to ...
5332         (info_locals_command): ... this.
5333         * infcmd.c (nofp_registers_info): Rename to ...
5334         (info_registers_command): ... this.
5335         (float_info): Rename to ...
5336         (info_float_command): ... this.
5337         (program_info): Rename to ...
5338         (info_program_command): ... this.
5339         (all_registers_info): Rename to ...
5340         (info_all_registers_command): ... this.
5341         (vector_info): Rename to ...
5342         (info_vector_command): ... this.
5343         (float_info): Rename to ...
5344         (info_float_command): ... this.
5345         (_initialize_infcmd): Adjust.
5346         * inferior.h (term_info): Rename to ...
5347         (info_terminal_command): ... this.
5348         * inflow.c (term_info): Rename to ...
5349         (info_terminal_command): ... this.
5350         (_initialize_inflow): Adjust.
5351         * infrun.c (signals_info): Rename to ...
5352         (info_signals_command): ... this.
5353         (_initialize_infrun): Adjust.
5354         * objc-lang.c (classes_info): Rename to ...
5355         (info_classes_command): ... this.
5356         (selectors_info): Rename to ...
5357         (info_selectors_command): ... this.
5358         (_initialize_objc_language): Adjust.
5359         * printcmd.c (sym_info): Rename to ...
5360         (info_symbol_command): ... this.
5361         (address_info): Rename to ...
5362         (info_address_command): ... this.
5363         (display_info): Rename to ...
5364         (info_display_command): ... this.
5365         (_initialize_printcmd): Adjust.
5366         * reverse.c (bookmarks_info): Rename to ...
5367         (info_breakpoints_command): ... this.
5368         (_initialize_reverse): Adjust.
5369         * ser-go32.c (dos_info): Rename to ...
5370         (info_serial_command): ... this.
5371         (_initialize_ser_dos): Adjust.
5372         * skip.c (skip_info): Rename to ...
5373         (info_skip_command): ... this.
5374         (_initialize_step_skip): Adjust.
5375         * source.c (line_info): Rename to ...
5376         (info_line_command): ... this.
5377         (source_info): Rename to ...
5378         (info_source_command)
5379         * stack.c (frame_info): Rename to ...
5380         (info_frame_command): ... this.
5381         (locals_info): Rename to ...
5382         (info_locals_command): ... this.
5383         (args_info): Rename to ...
5384         (info_args_command): ... this.
5385         (_initialize_stack): Adjust.
5386         * symtab.c (sources_info): Rename to ...
5387         (info_sources_command): ... this.
5388         (variables_info): Rename to ...
5389         (info_variables_command): ... this.
5390         (functions_info): Rename to ...
5391         (info_functions_command): ... this.
5392         (types_info): Rename to ...
5393         (info_types_command): ... this.
5394         (_initialize_symtab): Adjust.
5395         * target.c (target_info): Rename to ...
5396         (info_target_command): ... this.
5397         (initialize_targets): Adjust.
5398         * tracepoint.c (tvariables_info): Rename to ...
5399         (info_tvariables_command): ... this.
5400         (scope_info): Rename to ...
5401         (info_scope_command): ... this.
5402         (trace_dump_actions): Adjust.
5403         (_initialize_tracepoint): Adjust.
5404
5405 2017-08-22  Tom Tromey  <tom@tromey.com>
5406
5407         * breakpoint.h (install_breakpoint): Update.
5408         * breakpoint.c (add_solib_catchpoint): Update.
5409         (install_breakpoint): Change argument to a std::unique_ptr.
5410         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
5411         (create_breakpoint_sal, create_breakpoint): Update.
5412         (watch_command_1, catch_exec_command_1)
5413         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
5414         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
5415         Return the breakpoint.
5416         (set_raw_breakpoint_without_location, set_raw_breakpoint)
5417         (new_single_step_breakpoint): Update.
5418         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
5419         std::unique_ptr.
5420         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5421         std::unique_ptr.
5422         * break-catch-sig.c (create_signal_catchpoint): Use
5423         std::unique_ptr.
5424         * ada-lang.c (create_ada_exception_catchpoint): Use
5425         std::unique_ptr.
5426
5427 2017-08-22  Tom Tromey  <tom@tromey.com>
5428
5429         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
5430
5431 2017-08-22  Tom Tromey  <tom@tromey.com>
5432
5433         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
5434         (lookup_partial_symbol): Update.
5435
5436 2017-08-22  Tom Tromey  <tom@tromey.com>
5437
5438         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
5439         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
5440         (find_and_open_source, symtab_to_fullname): Update.
5441         * psymtab.c (psymtab_to_fullname): Update.
5442
5443 2017-08-22  Tom Tromey  <tom@tromey.com>
5444
5445         * exec.c (exec_file_attach): Update.
5446         * linux-thread-db.c (try_thread_db_load): Update.
5447         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
5448         * utils.c (gdb_realpath): Change return type.
5449         (gdb_realpath_keepfile): Update.
5450         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
5451         (_initialize_utils): Register the new self test.
5452         * source.c (openp): Update.
5453         (find_and_open_source): Update.
5454         * nto-tdep.c (nto_find_and_open_solib): Update.
5455         * main.c (set_gdb_data_directory): Update.
5456         (captured_main_1): Update.
5457         * dwarf2read.c (dwarf2_get_dwz_file): Update
5458         (dw2_map_symbol_filenames): Update.
5459         * auto-load.c (auto_load_safe_path_vec_update): Update.
5460         (filename_is_in_auto_load_safe_path_vec): Change type of
5461         "filename_realp".
5462         (auto_load_objfile_script): Update.
5463         (file_is_auto_load_safe): Update.  Use std::string.
5464         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
5465
5466 2017-08-22  Tom Tromey  <tom@tromey.com>
5467
5468         * utils.c (gdb_realpath_keepfile): Return a
5469         gdb::unique_xmalloc_ptr.
5470         * exec.c (exec_file_attach): Update.
5471         * utils.h (gdb_realpath_keepfile): Return a
5472         gdb::unique_xmalloc_ptr.
5473
5474 2017-08-22  Tom Tromey  <tom@tromey.com>
5475
5476         * compile/compile.c (compile_file_command): Use
5477         gdb::unique_xmalloc_ptr, std::string.
5478         * utils.c (gdb_abspath): Change return type.
5479         * source.c (openp): Update.
5480         * objfiles.c (allocate_objfile): Update.
5481         * main.c (set_gdb_data_directory): Update.
5482         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
5483
5484 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
5485
5486         * cli-cmds.c (list_commands): List actual code around more than
5487         one location.
5488
5489 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
5490
5491         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
5492
5493 2017-08-21  Pedro Alves  <palves@redhat.com>
5494
5495         PR gdb/19487
5496         * c-exp.y (variable production): Handle function aliases.
5497         * minsyms.c (msymbol_is_text): New function.
5498         * minsyms.h (msymbol_is_text): Declare.
5499         * symtab.c (find_function_alias_target): New function.
5500         * symtab.h (find_function_alias_target): Declare.
5501
5502 2017-08-21  Pedro Alves  <palves@redhat.com>
5503
5504         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
5505         typedefs.
5506         * typeprint.c (whatis_exp): If handling "whatis", and expression
5507         is OP_TYPE, strip one typedef level.  Otherwise don't strip
5508         typedefs here.
5509         * valops.c (value_cast): Save "to" type before resolving
5510         stubs/typedefs.  Use that type as resulting value's type.
5511
5512 2017-08-18  Tom Tromey  <tom@tromey.com>
5513             Pedro Alves  <palves@redhat.com>
5514
5515         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
5516         * sol-thread.c (sol_thread_resume, sol_thread_wait)
5517         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
5518         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
5519         * proc-service.c (ps_xfer_memory): Use scoped_restore.
5520         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
5521         (linux_get_siginfo_data): Add "thread" argument.  Use
5522         scoped_restore.
5523         * linux-nat.c (linux_child_follow_fork)
5524         (check_stopped_by_watchpoint): Use scoped_restore.
5525         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
5526         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
5527         (restore_inferior_ptid, save_inferior_ptid): Remove.
5528         * btrace.c (btrace_fetch): Use scoped_restore.
5529         * bsd-uthread.c (bsd_uthread_fetch_registers)
5530         (bsd_uthread_store_registers): Use scoped_restore.
5531         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
5532         scoped_restore.
5533         * aix-thread.c (aix_thread_resume, aix_thread_wait)
5534         (aix_thread_xfer_partial): Use scoped_restore.
5535         * inferior.h (save_inferior_ptid): Remove.
5536
5537 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5538
5539         PR tdep/21818
5540         * arm-tdep.c (gdb_print_insn_arm): Mark
5541         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
5542
5543 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5544
5545         * NEWS: Mention GDBserver's new option "--selftest".
5546         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
5547         * selftest.c: Move it to common/selftest.c.
5548         * selftest.h: Move it to common/selftest.h.
5549         * selftest-arch.c (reset): New function.
5550         (tests_with_arch): Call reset.
5551
5552 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5553
5554         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
5555         instead of exception_fprintf and printf_filtered.
5556
5557 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5558
5559         * selftest.c (register_self_test): Rename it to
5560         selftests::register_test.
5561         (run_self_tests): selftest::run_tests.
5562         * selftest.h: Update declarations.
5563         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
5564         selftests::register_test_foreach_arch.
5565         * selftest-arch.h: Update declaration.
5566         * aarch64-tdep.c: Update.
5567         * arm-tdep.c: Likewise.
5568         * disasm-selftests.c: Likewise.
5569         * dwarf2loc.c: Likewise.
5570         * dwarf2-frame.c: Likewise.
5571         * findvar.c: Likewise.
5572         * gdbarch-selftests.c: Likewise.
5573         * maint.c (maintenance_selftest): Likewise.
5574         * regcache.c: Likewise.
5575         * rust-exp.y: Likewise.
5576         * selftest-arch.c: Likewise.
5577         * unittests/environ-selftests.c: Likewise.
5578         * unittests/function-view-selftests.c: Likewise.
5579         * unittests/offset-type-selftests.c: Likewise.
5580         * unittests/optional-selftests.c: Likewise.
5581         * unittests/scoped_restore-selftests.c: Likewise.
5582         * utils-selftests.c: Likewise.
5583
5584 2017-08-17  Pedro Alves  <palves@redhat.com>
5585
5586         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
5587         local.
5588
5589 2017-08-17  Pedro Alves  <palves@redhat.com>
5590
5591         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
5592         field.
5593         (reset_die_in_process): Delete, replaced by ...
5594         (process_die_scope): ... this new class.  Make it responsible for
5595         freeing cu->line_header too.
5596         (process_die): Use process_die_scope.
5597         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
5598         cu->line_header_die_owner.  Don't release the line header if it's
5599         owned by the CU.
5600         (setup_type_unit_groups): Make the CU/DIE own the line header.
5601         Don't release the line header here.
5602
5603 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
5604
5605         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
5606
5607 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5608
5609         * NEWS: Mention new shortcuts for nexti and stepi in TUI
5610         Single-Key mode
5611
5612 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5613
5614         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
5615         mode command list.
5616
5617 2017-08-15  Stafford Horne  <shorne@gmail.com>
5618
5619         * MAINTAINERS (Write After Approval): Add Stafford Horne.
5620
5621 2017-08-15  Stafford Horne  <shorne@gmail.com>
5622
5623         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
5624
5625 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
5626
5627         PR gdb/21954
5628         * infcmd.c (unset_environment_command): Use the 'clear' method on
5629         the environment instead of resetting it.
5630
5631 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
5632
5633         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
5634         platforms.
5635
5636 2017-08-14  Tom Tromey  <tom@tromey.com>
5637
5638         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
5639         (print_binary_chars): Likewise.
5640         (BITS_IN_BYTES): Remove.
5641
5642 2017-08-14  Tom Tromey  <tom@tromey.com>
5643
5644         PR gdb/21675
5645         * valprint.c (LOW_ZERO): Change value to 034.
5646         (print_octal_chars): Add static_asserts for octal constants.
5647         * printcmd.c (print_scalar_formatted): Add 'd' case.
5648
5649 2017-08-11  Tom Tromey  <tom@tromey.com>
5650
5651         * symfile.c (add_symbol_file_command): Use std::vector.
5652
5653 2017-08-14  Tom Tromey  <tom@tromey.com>
5654
5655         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
5656         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5657         std::move.
5658         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
5659
5660 2017-08-11  Pedro Alves  <palves@redhat.com>
5661
5662         * infrun.c (process_event_stop_test): Adjust
5663         function_name_is_marked_for_skip call.
5664         * skip.c: Include <list>.
5665         (skiplist_entry): Make it a class with private fields, and
5666         getters/setters.
5667         (skiplist_entry_chain): Delete.
5668         (skiplist_entries): New.
5669         (skiplist_entry_count): Delete.
5670         (highest_skiplist_entry_num): New.
5671         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
5672         (add_skiplist_entry): Delete.
5673         (skiplist_entry::skiplist_entry): New.
5674         (skiplist_entry::add_entry): New.
5675         (skip_file_command, skip_function): Adjust.
5676         (compile_skip_regexp): Delete.
5677         (skip_command): Don't compile regexp here.  Adjust to use
5678         skiplist_entry::add_entry.
5679         (skip_info): Adjust to use range-for and getters.
5680         (skip_enable_command, skip_disable_command): Adjust to use
5681         range-for and setters.
5682         (skip_delete_command): Adjust to use std::list.
5683         (add_skiplist_entry): Delete.
5684         (skip_file_p): Delete, refactored as ...
5685         (skiplist_entry::do_skip_file_p): ... this new method.
5686         (skip_gfile_p): Delete, refactored as ...
5687         (skiplist_entry::do_gskip_file_p): ... this new method.
5688         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
5689         (skiplist_entry::skip_function_p): ... this new method.
5690         (function_name_is_marked_for_skip): Now returns bool, and takes
5691         the function sal by const reference.  Adjust to use range-for and
5692         skiplist_entry methods.
5693         (_initialize_step_skip): Remove references to
5694         skiplist_entry_chain, skiplist_entry_count.
5695         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
5696         takes the function sal by const reference.
5697
5698 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5699
5700         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
5701         (dwarf2_frame_cache): Remove reset_cache_cleanup.
5702         (dwarf2_frame_cache):
5703         * frame-unwind.c (frame_unwind_try_unwinder): Catch
5704         RETURN_MASK_ALL and set *this_case to NULL.
5705         * frame-unwind.h: Update comments.
5706
5707 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5708
5709         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
5710         (dwarf2_frame_state_copy_regs): Remove.
5711         (dwarf2_frame_state_free_regs): Remove.
5712         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
5713         (dwarf2_restore_rule): Call method .alloc_regs instead of
5714         dwarf2_frame_state_alloc_regs.
5715         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
5716         constructor.  Call std::move.
5717         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
5718         (dwarf2_frame_cache): Likewise.
5719
5720         [GDB_SELF_TEST]: Include selftest.h and
5721         selftest-arch.h.
5722         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
5723         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
5724         execute_cfa_program_test.
5725
5726         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
5727         copy ctor, assignment operator, move assignment.
5728         <alloc_regs>: New method.
5729         <swap>: New method.
5730         (struct dwarf2_frame_state): Delete dtor.
5731         (dwarf2_frame_state_alloc_regs): Remove declaration.
5732         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
5733         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
5734
5735 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5736
5737         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
5738         (dwarf2_frame_state::dwarf2_frame_state): New.
5739         (dwarf2_frame_state::~dwarf2_frame_state): New.
5740         (dwarf2_fetch_cfa_info): Update.
5741         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
5742         rather than a pointer.  Update code.
5743         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
5744         dtor.
5745         <data_align, code_align, retaddr_column>: Change them to const.
5746         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
5747         to bool.
5748
5749 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5750
5751         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
5752         <loc.exp>: New field.
5753         * dwarf2-frame.c (execute_cfa_program): Update.
5754         (dwarf2_frame_prev_register): Update.
5755
5756 2017-08-10  Pedro Alves  <palves@redhat.com>
5757
5758         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
5759
5760 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
5761
5762         * fbsd-nat.c (struct fbsd_fork_info): Remove.
5763         (fbsd_pending_children): Use std::list.
5764         (fbsd_remember_child): Likewise.
5765         (fbsd_is_child_pending): Likewise.
5766         (fbsd_pending_vfork_done): Use std::forward_list.
5767         (fbsd_add_vfork_done): Likewise.
5768         (fbsd_is_vfork_done_pending): Likewise.
5769         (fbsd_next_vfork_done): Likewise.
5770
5771 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
5772
5773         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
5774         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
5775         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
5776         for `mapfilename'.
5777         (fbsd_xfer_partial): Use gdb::byte_vector.
5778         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
5779
5780 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
5781
5782         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
5783         "filestuff.h".
5784         (fbsd_find_memory_regions): Fix `mapfile' initialization.
5785
5786 2017-08-09  Tom Tromey  <tom@tromey.com>
5787
5788         * skip.c (skiplist_entry): New constructor.
5789         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
5790         (skiplist_entry::file_is_glob): Now bool.
5791         (skiplist_entry::file, skiplist_entry::function): Now
5792         std::string.
5793         (make_skip_entry): Return a unique_ptr.  Use new.
5794         (free_skiplist_entry, free_skiplist_entry_cleanup)
5795         (make_free_skiplist_entry_cleanup): Remove.
5796         (skip_command, skip_disable_command, add_skiplist_entry)
5797         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
5798         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
5799         (function_name_is_marked_for_skip): Update.
5800         (skip_delete_command): Update.  Use delete.
5801
5802 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
5803
5804         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
5805         (aarch64_linux_core_read_description): New function.
5806         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
5807
5808 2017-08-09  Pedro Alves  <palves@redhat.com>
5809
5810         * cp-name-parser.y (cp_comp_to_string): Return a
5811         gdb::unique_xmalloc_ptr<char>.
5812         * cp-support.c (replace_typedefs_qualified_name)
5813         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
5814         (cp_canonicalize_string_full): Use op= instead of explicit
5815         convertion.
5816         (cp_class_name_from_physname, method_name_from_physname)
5817         (cp_func_name, cp_remove_params): Adjust to use
5818         gdb::unique_xmalloc_ptr<char>.
5819         * cp-support.h (cp_comp_to_string): Return a
5820         gdb::unique_xmalloc_ptr<char>.
5821         * python/py-type.c (typy_lookup_type): Adjust to use
5822         gdb::unique_xmalloc_ptr<char>.
5823
5824 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
5825
5826         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
5827
5828 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
5829             Yao Qi  <yao.qi@linaro.org>
5830
5831         * cp-support.c (cp_canonicalize_string_full): Use
5832         gdb::unique_xmalloc_ptr<char>.
5833         (cp_canonicalize_string): Likewise.
5834
5835 2017-08-09  Yao Qi  <yao.qi@linaro.org>
5836
5837         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
5838         * regformats/i386/amd64-avx-avx512.dat: Remove.
5839         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
5840         * regformats/i386/amd64-avx-mpx.dat:Remove.
5841         * regformats/i386/amd64-avx.dat: Remove.
5842         * regformats/i386/amd64-mpx.dat: Remove.
5843         * regformats/i386/i386-avx-avx512.dat: Remove.
5844         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
5845         * regformats/i386/i386-avx-mpx.dat: Remove.
5846         * regformats/i386/i386-mmx.dat: Remove.
5847         * regformats/i386/i386-mpx.dat: Remove.
5848
5849 2017-08-09  Yao Qi  <yao.qi@linaro.org>
5850
5851         * amd64-tdep.h (tdesc_x32): Remove the declaration.
5852         * amd64-tdep.c: Don't include features/i386/x32*.c.
5853         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
5854         functions.
5855         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
5856         and i386/x32-avx-avx512.
5857         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
5858         and i386/x32.xml.
5859         * features/i386/x32-avx-avx512.c: Removed.
5860         * features/i386/x32-avx-avx512.xml: Removed.
5861         * features/i386/x32-avx.c: Removed.
5862         * features/i386/x32-avx.xml: Removed.
5863         * features/i386/x32.c: Removed.
5864         * features/i386/x32.xml: Removed.
5865         * regformats/i386/x32-avx-avx512.dat: Removed.
5866         * regformats/i386/x32-avx.dat: Removed.
5867         * regformats/i386/x32.dat: Removed.
5868
5869 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
5870
5871         PR breakpoints/21886
5872         * mem-break.c (default_memory_insert_breakpoint): Use
5873         `->placed_address' rather than `->reqstd_address' for the
5874         breakpoint location.
5875
5876 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
5877
5878         * arch-utils.c (default_print_insn): Remove arch/mach/endian
5879         assertions.
5880
5881 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
5882
5883         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
5884         a union of `tdep_info', `tdesc_data' and `id'.
5885         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
5886         rather than `info.tdep_info'.
5887         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
5888         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5889         * i386-tdep.c (i386_gdbarch_init): Likewise.
5890         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
5891         * mips-tdep.c (mips_gdbarch_init): Likewise.
5892         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5893         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5894         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
5895         `info.tdep_info'.
5896         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
5897         `info.tdep_info'.
5898         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5899         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
5900         `info.tdep_info'.
5901         * spu-tdep.c (spu_gdbarch_init): Likewise.
5902         * gdbarch.h: Regenerate.
5903
5904 2017-08-07  Leszek Swirski  <leszeks@google.com>
5905
5906         PR symtab/20899
5907         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
5908
5909 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5910
5911         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
5912         (gdbsim_open): Rename gdb_argv args object to argv.
5913
5914 2017-08-05  Tom Tromey  <tom@tromey.com>
5915
5916         * compile/compile-object-load.c (compile_object_load): Use
5917         gdb::unique_xmalloc_ptr.
5918         * cli/cli-dump.c (scan_filename): Rename from
5919         scan_filename_with_cleanup.  Change return type.
5920         (scan_expression): Rename from scan_expression_with_cleanup.
5921         Change return type.
5922         (dump_memory_to_file, dump_value_to_file, restore_command):
5923         Use gdb::unique_xmalloc_ptr.  Update.
5924         * cli/cli-cmds.c (find_and_open_script): Use
5925         gdb::unique_xmalloc_ptr.
5926         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
5927         * symmisc.c (maintenance_print_symbols)
5928         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
5929         * symfile.c (symfile_bfd_open, generic_load)
5930         (add_symbol_file_command, remove_symbol_file_command): Use
5931         gdb::unique_xmalloc_ptr.
5932         * source.c (openp): Use gdb::unique_xmalloc_ptr.
5933         * psymtab.c (maintenance_print_psymbols): Use
5934         gdb::unique_xmalloc_ptr.
5935         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
5936         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
5937         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
5938         (reload_shared_libraries_1): Likewise.
5939
5940 2017-08-05  Tom Tromey  <tom@tromey.com>
5941
5942         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
5943         (rust_op_vector, rust_set_vector): New typedefs.
5944         (current_parser): New global.
5945         (work_obstack): Change to pointer type.  Update all users.
5946         (rust_ast, pstate): Remove globals.
5947         (struct rust_parser): New.
5948         (%union) <params, field_inits>: Change type.
5949         (start, tuple_expr, unit_expr, struct_expr_list, literal)
5950         (field_expr, expr_list, maybe_expr_list, type_list): Update.
5951         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
5952         (convert_params_to_types, convert_params_to_expression): Change
5953         type of "params".
5954         (ast_string): Change type of "fields".
5955         (rust_parse): Make a rust_parser.  Remove cleanups.
5956         (rust_lex_tests): Make and install an auto_obstack.
5957
5958 2017-08-04  Yao Qi  <yao.qi@linaro.org>
5959
5960         * configure.srv (ipa_x32_linux_regobj): New.
5961         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
5962         instead of X86_TDESC_AVX512.
5963         (initialize_low_tracepoint): Call
5964         init_registers_x32_avx_avx512_linux.
5965
5966 2017-08-04  Yao Qi  <yao.qi@linaro.org>
5967
5968         * utils.h (gdb_argv): Add namespace std for nullptr_t.
5969
5970 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5971
5972         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
5973
5974 2017-08-03  Tom Tromey  <tom@tromey.com>
5975
5976         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
5977         Remove.
5978         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
5979
5980 2017-08-03  Tom Tromey  <tom@tromey.com>
5981
5982         * python/py-param.c (compute_enum_values): Use gdb_argv.
5983
5984 2017-08-03  Tom Tromey  <tom@tromey.com>
5985
5986         * utils.h (struct gdb_argv_deleter): New.
5987         (gdb_argv): New class.
5988         * utils.c (gdb_argv::reset): New method.
5989         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
5990         * tracefile.c (tsave_command): Use gdb_argv.
5991         * top.c (new_ui_command): Use gdb_argv.
5992         * symmisc.c (maintenance_print_symbols)
5993         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
5994         * symfile.c (symbol_file_command, generic_load)
5995         (remove_symbol_file_command): Use gdb_argv.
5996         * stack.c (backtrace_command): Use gdb_argv.
5997         * source.c (add_path, show_substitute_path_command)
5998         (unset_substitute_path_command, set_substitute_path_command):
5999         Use gdb_argv.
6000         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
6001         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
6002         * remote.c (extended_remote_run, remote_put_command)
6003         (remote_get_command, remote_delete_command): Use gdb_argv.
6004         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
6005         (gdbsim_open): Use gdb_argv.
6006         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
6007         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
6008         * procfs.c (procfs_info_proc): Use gdb_argv.
6009         * interps.c (interpreter_exec_cmd): Use gdb_argv.
6010         * infrun.c (handle_command): Use gdb_argv.
6011         * inferior.c (add_inferior_command, clone_inferior_command):
6012         Use gdb_argv.
6013         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
6014         * exec.c (exec_file_command): Use gdb_argv.
6015         * cli/cli-cmds.c (alias_command): Use gdb_argv.
6016         * compile/compile.c (build_argc_argv): Use gdb_argv.
6017
6018 2017-08-03  Tom Tromey  <tom@tromey.com>
6019
6020         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
6021
6022 2017-08-03  Tom Tromey  <tom@tromey.com>
6023
6024         * python/python.c (compute_python_string): Return std::string.
6025         (gdbpy_eval_from_control_command): Update.
6026         (do_start_initialization): Use std::string.
6027         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
6028         xstrprintf.
6029         * python/py-breakpoint.c (local_setattro): Use string_printf, not
6030         xstrprintf.
6031
6032 2017-08-03  Tom Tromey  <tom@tromey.com>
6033
6034         * top.h (do_restore_instream_cleanup): Remove.
6035         * top.c (do_restore_instream_cleanup): Remove.
6036         (read_command_file): Use scoped_restore.
6037         * cli/cli-script.c (execute_user_command): Use scoped_restore.
6038
6039 2017-08-03  Tom Tromey  <tom@tromey.com>
6040
6041         * cli/cli-script.c (execute_user_command)
6042         (execute_control_command): Use scoped_restore.
6043
6044 2017-08-03  Tom Tromey  <tom@tromey.com>
6045
6046         * cli/cli-script.c (do_restore_user_call_depth): Remove.
6047         (execute_user_command): Remove user_call_depth; use
6048         user_args_stack's size instead.
6049
6050 2017-08-03  Tom Tromey  <tom@tromey.com>
6051
6052         * top.h (in_user_command): Remove.
6053         * top.c (in_user_command): Remove.
6054         * cli/cli-script.c (do_restore_user_call_depth)
6055         (execute_user_command): Update.
6056
6057 2017-08-03  Tom Tromey  <tom@tromey.com>
6058
6059         * valops.c (search_struct_method): Use gdb::byte_vector.
6060         * valarith.c (value_concat): Use std::vector.
6061         * target.c (memory_xfer_partial): Use gdb::byte_vector.
6062         (simple_search_memory): Likewise.
6063         * printcmd.c (find_string_backward): Use gdb::byte_vector.
6064         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
6065         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
6066         * elfread.c (elf_rel_plt_read): Use std::string.
6067         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
6068         * cli/cli-dump.c (restore_section_callback): Use
6069         gdb::byte_vector.
6070
6071 2017-08-03  Tom Tromey  <tom@tromey.com>
6072
6073         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
6074
6075 2017-08-03  Tom Tromey  <tom@tromey.com>
6076
6077         * tui/tui-regs.c (tui_restore_gdbout): Remove.
6078         (tui_register_format): Use scoped_restore.
6079
6080 2017-08-03  Tom Tromey  <tom@tromey.com>
6081
6082         * reverse.c (exec_direction_default): Remove.
6083         (exec_reverse_once): Use scoped_restore.
6084         * remote.c (restore_remote_timeout): Remove.
6085         (remote_flash_erase, remote_flash_write, remote_flash_done)
6086         (readchar, remote_serial_write): Use scoped_restore.
6087         * cli/cli-script.c (struct source_cleanup_lines_args)
6088         (source_cleanup_lines): Remove.
6089         (script_from_file): Use scoped_restore.
6090         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
6091         (source_command): Use scoped_restore.
6092
6093 2017-08-03  Tom Tromey  <tom@tromey.com>
6094
6095         * utils.h (make_cleanup_free_so): Remove.
6096         * utils.c (do_free_so, make_cleanup_free_so): Remove.
6097         * solist.h (struct so_deleter): New.
6098         (so_list_up): New typedef.
6099         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
6100
6101 2017-08-03  Tom Tromey  <tom@tromey.com>
6102
6103         * utils.h (make_cleanup_restore_current_language): Remove.
6104         * utils.c (do_restore_current_language)
6105         (make_cleanup_restore_current_language): Remove.
6106         * parse.c (parse_exp_in_context_1)
6107         (parse_expression_with_language): Use
6108         scoped_restore_current_language.
6109         * mi/mi-main.c (mi_cmd_execute): Use
6110         scoped_restore_current_language.
6111         * language.h (scoped_restore_current_language): New class.
6112
6113 2017-08-03  Tom Tromey  <tom@tromey.com>
6114
6115         * compile/compile.c (cleanup_unlink_file): Remove.
6116         (compile_to_object): Use gdb::unlinker.
6117         (eval_compile_command): Likewise.
6118
6119 2017-08-03  Tom Tromey  <tom@tromey.com>
6120
6121         * utils.h (make_cleanup_fclose): Remove.
6122         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
6123
6124 2017-08-03  Tom Tromey  <tom@tromey.com>
6125
6126         * top.c (open_terminal_stream): Return gdb_file_up.
6127         (new_ui_command): Update.
6128
6129 2017-08-03  Tom Tromey  <tom@tromey.com>
6130
6131         * source.c (print_source_lines_base, forward_search_command)
6132         (reverse_search_command): Use gdb_file_up.
6133
6134 2017-08-03  Tom Tromey  <tom@tromey.com>
6135
6136         * fbsd-nat.c (fbsd_find_memory_regions): Update.
6137
6138 2017-08-03  Tom Tromey  <tom@tromey.com>
6139
6140         * cli/cli-cmds.c (find_and_open_script): Change return type.
6141         Remove "streamp" and "full_path" parameters.
6142         (source_script_with_search): Update.
6143         * auto-load.c (source_script_file): Update.
6144         * cli/cli-cmds.h (find_and_open_script): Change type.
6145         (open_script): New struct.
6146
6147 2017-08-03  Tom Tromey  <tom@tromey.com>
6148
6149         * xml-support.c (xml_fetch_content_from_file): Update.
6150         * ui-file.c (stdio_file::open): Update.
6151         * tracefile-tfile.c (tfile_start): Update.
6152         * remote.c (remote_file_put, remote_file_get): Update.
6153         * nat/linux-procfs.c (linux_proc_get_int)
6154         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
6155         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
6156         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
6157         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
6158         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
6159         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
6160         * linux-nat.c (linux_proc_pending_signals): Update.
6161         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
6162         (file_closer): Remove.
6163         * compile/compile.c (compile_to_object): Update.
6164         * common/filestuff.h (struct gdb_file_deleter): New.
6165         (gdb_file_up): New typedef.
6166         (gdb_fopen_cloexec): Change return type.
6167         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
6168         * cli/cli-dump.c (fopen_with_cleanup): Remove.
6169         (dump_binary_file, restore_binary_file): Update.
6170         * auto-load.c (auto_load_objfile_script_1): Update.
6171
6172 2017-08-03  Tom Tromey  <tom@tromey.com>
6173
6174         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
6175         (info_static_tracepoint_markers_command): Likewise.
6176         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
6177         * skip.c (skip_info): Use ui_out_emit_table.
6178         * progspace.c (print_program_space): Use ui_out_emit_table.
6179         * osdata.c (info_osdata): Use ui_out_emit_table.
6180         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
6181         ui_out_emit_table.
6182         * linux-thread-db.c (info_auto_load_libthread_db): Use
6183         ui_out_emit_table.
6184         * inferior.c (print_inferior): Use ui_out_emit_table.
6185         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
6186         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
6187         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
6188         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
6189         * ui-out.h (class ui_out_emit_table): New.
6190
6191 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
6192
6193         * mips-tdep.c (mips_fpu_type_str): New function.
6194         (mips_dump_tdep): Call it.
6195
6196 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
6197
6198         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
6199         `->mips_fpu_type'.
6200
6201 2017-07-31  Xavier Roirand  <roirand@adacore.com>
6202
6203         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
6204
6205 2017-07-27  Xavier Roirand  <roirand@adacore.com>
6206
6207         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
6208
6209 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6210
6211         * cli/cli-cmds.c (maintenancechecklist): New variable.
6212         * gdbcmd.h (maintenancechecklist): Declare it.
6213         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
6214         Call i386_linux_read_description with different masks.
6215         * maint.c (maintenance_check_command): New function.
6216         (_initialize_maint_cmds): Call add_prefix_cmd.
6217         * target-descriptions.c (tdesc_reg): override operator != and ==.
6218         (tdesc_type): Likewise.
6219         (tdesc_feature): Likewise.
6220         (target_desc): Likewise.
6221         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
6222         (maintenance_check_xml_descriptions): New function.
6223         (_initialize_target_descriptions) Add command "xml-descriptions".
6224         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
6225
6226 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6227
6228         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
6229         Include features/i386/32bit-*.c.
6230         (i386_linux_read_description): Generate target description if it
6231         doesn't exist.
6232         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
6233         functions.
6234         * features/i386/32bit-linux.c: Re-generated.
6235         * features/i386/32bit-sse.c: Likewise.
6236         * target-descriptions.c (print_c_feature::visit): Print code to
6237         set register number if needed.
6238         (print_c_feature) <m_next_regnum>: New field.
6239
6240 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6241
6242         * features/Makefile (CFILES): Rename with TDESC_CFILES.
6243         (FEATURE_XMLFILES): New.
6244         (FEATURE_CFILES): New.
6245         New rules.
6246         (clean-cfiles): Remove generated c files.
6247         * features/i386/32bit-avx.c: Generated.
6248         * features/i386/32bit-avx512.c: Generated.
6249         * features/i386/32bit-core.c: Generated.
6250         * features/i386/32bit-linux.c: Generated.
6251         * features/i386/32bit-mpx.c: Generated.
6252         * features/i386/32bit-pkeys.c: Generated.
6253         * features/i386/32bit-sse.c: Generated.
6254         * target-descriptions.c: Include algorithm.
6255         (tdesc_element_visitor): Add method visit_end.
6256         (print_c_tdesc): Implement visit_end.
6257         (print_c_tdesc:: m_filename_after_features): Move it to
6258         protected.
6259         (print_c_feature): New class.
6260         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
6261         name starts with "i386/32bit-".
6262
6263 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6264
6265         * target-descriptions.c (tdesc_element_visitor): New class.
6266         (tdesc_element): New class.
6267         (tdesc_reg): Inherit from tdesc_element.
6268         (tdesc_reg::accept): New function.
6269         (tdesc_type): Inherit from tdesc_element.
6270         (tdesc_type::accept): New function.
6271         (tdesc_feature): Inherit from tdesc_element.
6272         (tdesc_feature::accept): New function.
6273         (target_desc): Inherit from tdesc_element.
6274         (target_desc::target_desc): New.
6275         (target_desc::~target_desc): New.
6276         (target_desc::accept): New.
6277         (allocate_target_description): Use new.
6278         (free_target_description): Use delete.
6279         (print_c_tdesc): New class.
6280         (maint_print_c_tdesc_cmd): Adjust.
6281
6282         * features/aarch64.c: Re-generated.
6283         * features/arc-arcompact.c: Re-generated.
6284         * features/arc-v2.c: Re-generated.
6285         * features/arm/arm-with-iwmmxt.c: Re-generated.
6286         * features/arm/arm-with-m.c: Re-generated.
6287         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
6288         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
6289         * features/arm/arm-with-neon.c: Re-generated.
6290         * features/arm/arm-with-vfpv2.c: Re-generated.
6291         * features/arm/arm-with-vfpv3.c: Re-generated.
6292         * features/i386/amd64-avx-avx512.c: Re-generated.
6293         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6294         * features/i386/amd64-avx.c: Re-generated.
6295         * features/i386/amd64-avx-linux.c: Re-generated.
6296         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
6297         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6298         * features/i386/amd64-avx-mpx.c: Re-generated.
6299         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
6300         * features/i386/amd64.c: Re-generated.
6301         * features/i386/amd64-linux.c: Re-generated.
6302         * features/i386/amd64-mpx.c: Re-generated.
6303         * features/i386/amd64-mpx-linux.c: Re-generated.
6304         * features/i386/i386-avx-avx512.c: Re-generated.
6305         * features/i386/i386-avx-avx512-linux.c: Re-generated.
6306         * features/i386/i386-avx.c: Re-generated.
6307         * features/i386/i386-avx-linux.c: Re-generated.
6308         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
6309         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
6310         * features/i386/i386-avx-mpx.c: Re-generated.
6311         * features/i386/i386-avx-mpx-linux.c: Re-generated.
6312         * features/i386/i386.c: Re-generated.
6313         * features/i386/i386-linux.c: Re-generated.
6314         * features/i386/i386-mmx.c: Re-generated.
6315         * features/i386/i386-mmx-linux.c: Re-generated.
6316         * features/i386/i386-mpx.c: Re-generated.
6317         * features/i386/i386-mpx-linux.c: Re-generated.
6318         * features/i386/x32-avx-avx512.c: Re-generated.
6319         * features/i386/x32-avx-avx512-linux.c: Re-generated.
6320         * features/i386/x32-avx.c: Re-generated.
6321         * features/i386/x32-avx-linux.c: Re-generated.
6322         * features/i386/x32.c: Re-generated.
6323         * features/i386/x32-linux.c: Re-generated.
6324         * features/microblaze.c: Re-generated.
6325         * features/microblaze-with-stack-protect.c: Re-generated.
6326         * features/mips64-dsp-linux.c: Re-generated.
6327         * features/mips64-linux.c: Re-generated.
6328         * features/mips-dsp-linux.c: Re-generated.
6329         * features/mips-linux.c: Re-generated.
6330         * features/nds32.c: Re-generated.
6331         * features/nios2.c: Re-generated.
6332         * features/nios2-linux.c: Re-generated.
6333         * features/rs6000/powerpc-32.c: Re-generated.
6334         * features/rs6000/powerpc-32l.c: Re-generated.
6335         * features/rs6000/powerpc-403.c: Re-generated.
6336         * features/rs6000/powerpc-403gc.c : Re-generated.
6337         * features/rs6000/powerpc-405.c: Re-generated.
6338         * features/rs6000/powerpc-505.c: Re-generated.
6339         * features/rs6000/powerpc-601.c: Re-generated.
6340         * features/rs6000/powerpc-602.c: Re-generated.
6341         * features/rs6000/powerpc-603.c: Re-generated.
6342         * features/rs6000/powerpc-604.c: Re-generated.
6343         * features/rs6000/powerpc-64.c: Re-generated.
6344         * features/rs6000/powerpc-64l.c: Re-generated.
6345         * features/rs6000/powerpc-7400.c: Re-generated.
6346         * features/rs6000/powerpc-750.c: Re-generated.
6347         * features/rs6000/powerpc-860.c: Re-generated.
6348         * features/rs6000/powerpc-altivec32.c: Re-generated.
6349         * features/rs6000/powerpc-altivec32l.c: Re-generated.
6350         * features/rs6000/powerpc-altivec64.c: Re-generated.
6351         * features/rs6000/powerpc-altivec64l.c: Re-generated.
6352         * features/rs6000/powerpc-cell32l.c: Re-generated.
6353         * features/rs6000/powerpc-cell64l.c: Re-generated.
6354         * features/rs6000/powerpc-e500.c: Re-generated.
6355         * features/rs6000/powerpc-e500l.c: Re-generated.
6356         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
6357         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
6358         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
6359         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
6360         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
6361         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
6362         * features/rs6000/powerpc-vsx32.c: Re-generated.
6363         * features/rs6000/powerpc-vsx32l.c: Re-generated.
6364         * features/rs6000/powerpc-vsx64.c: Re-generated.
6365         * features/rs6000/powerpc-vsx64l.c: Re-generated.
6366         * features/rs6000/rs6000.c: Re-generated.
6367         * features/s390-linux32.c: Re-generated.
6368         * features/s390-linux32v1.c: Re-generated.
6369         * features/s390-linux32v2.c: Re-generated.
6370         * features/s390-linux64.c: Re-generated.
6371         * features/s390-linux64v1.c: Re-generated.
6372         * features/s390-linux64v2.c: Re-generated.
6373         * features/s390-te-linux64.c: Re-generated.
6374         * features/s390-tevx-linux64.c: Re-generated.
6375         * features/s390-vx-linux64.c: Re-generated.
6376         * features/s390x-linux64.c: Re-generated.
6377         * features/s390x-linux64v1.c: Re-generated.
6378         * features/s390x-linux64v2.c: Re-generated.
6379         * features/s390x-te-linux64.c: Re-generated.
6380         * features/s390x-tevx-linux64.c: Re-generated.
6381         * features/s390x-vx-linux64.c: Re-generated.
6382         * features/sparc/sparc32-solaris.c: Re-generated.
6383         * features/sparc/sparc64-solaris.c: Re-generated.
6384         * features/tic6x-c62x.c: Re-generated.
6385         * features/tic6x-c62x-linux.c: Re-generated.
6386         * features/tic6x-c64x.c: Re-generated.
6387         * features/tic6x-c64x-linux.c: Re-generated.
6388         * features/tic6x-c64xp.c: Re-generated.
6389         * features/tic6x-c64xp-linux.c: Re-generated.
6390
6391 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6392
6393         * i386-linux-tdep.c (i386_linux_read_description): New function.
6394         (i386_linux_core_read_description): Call
6395         i386_linux_read_description.
6396         * i386-linux-tdep.h (i386_linux_read_description): Declare.
6397         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
6398         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
6399         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
6400         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
6401         * x86-linux-nat.c (x86_linux_read_description): Call
6402         i386_linux_read_description.
6403
6404 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6405
6406         * NEWS: Mention it.
6407         * features/Makefile (%.c: %.xml): Pass the xml file name to
6408         command "maint print c-tdesc".
6409         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
6410         name from 'arg'.
6411
6412 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6413
6414         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
6415         in-class initialization.
6416         (tdesc_create_feature): Call new instead of XCNEW.
6417         (free_target_description): Ue delete.
6418
6419 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
6420
6421         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
6422
6423 2017-07-25  Yao Qi  <yao.qi@linaro.org>
6424
6425         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
6426         constant.
6427         (amd64_x32_init_abi): Likewise.
6428         * amd64-tdep.h (amd64_init_abi): Update declaration.
6429         (amd64_x32_init_abi): Likewise.
6430
6431 2017-07-25  Yao Qi  <yao.qi@linaro.org>
6432
6433         PR tdep/21717
6434         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
6435         condition for FPSCR.
6436         (arm_linux_store_inferior_registers): Likewise.
6437
6438 2017-07-22  Tom Tromey  <tom@tromey.com>
6439
6440         * break-catch-syscall.c (struct catch_syscall_inferior_data)
6441         <syscalls_counts>: Now a std::vector.
6442         (get_catch_syscall_inferior_data): Use "new".
6443         (catch_syscall_inferior_data_cleanup): Use "delete".
6444         (insert_catch_syscall, remove_catch_syscall)
6445         (clear_syscall_counts): Update.
6446
6447 2017-07-22  Tom Tromey  <tom@tromey.com>
6448
6449         * break-catch-syscall.c (syscall_catchpoint)
6450         <syscalls_to_be_caught>: Now a std::vector<int>
6451         (~syscall_catchpoint): Remove.
6452         (insert_catch_syscall, remove_catch_syscall)
6453         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
6454         (print_mention_catch_syscall, print_recreate_catch_syscall):
6455         Update.
6456         (create_syscall_event_catchpoint): Change type of "filter"
6457         parameter.
6458         (catch_syscall_split_args): Return a std::vector.
6459         (catch_syscall_command_1, catching_syscall_number_1): Update.
6460
6461 2017-07-22  Tom Tromey  <tom@tromey.com>
6462
6463         * break-catch-throw.c (struct exception_catchpoint)
6464         <exception_rx>: Now a std::string.
6465         (~exception_catchpoint): Remove.
6466         (print_one_detail_exception_catchpoint): Update.
6467         (handle_gnu_v3_exceptions): Change type of except_rx.
6468         (extract_exception_regexp): Return a std::string.
6469         (catch_exception_command_1): Update.
6470
6471 2017-07-22  Tom Tromey  <tom@tromey.com>
6472
6473         * break-catch-sig.c (gdb_signal_type): Remove typedef.
6474         (struct signal_catchpoint) <signals_to_be_caught>: Now a
6475         std::vector.
6476         <catch_all>: Now a bool.
6477         (~signal_catchpoint): Remove.
6478         (signal_catchpoint_insert_location)
6479         (signal_catchpoint_remove_location)
6480         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
6481         (signal_catchpoint_print_mention)
6482         (signal_catchpoint_print_recreate)
6483         (signal_catchpoint_explains_signal): Update.
6484         (create_signal_catchpoint): Change type of "filter" and
6485         "catch_all".
6486         (catch_signal_split_args): Return a std::vector.  Change type of
6487         "catch_all".
6488         (catch_signal_command): Update.
6489
6490 2017-07-20  Pedro Alves  <palves@redhat.com>
6491
6492         * ada-lang.c (ada_language_defn): Make extern.
6493         (_initialize_ada_language): Remove add_language call.
6494         * c-lang.c (c_language_defn, cplus_language_defn)
6495         (asm_language_defn, minimal_language_defn): Make extern.
6496         (_initialize_c_language): Delete.
6497         * completer.c (compare_cstrings): Delete, moved to utils.h.
6498         * d-lang.c (d_language_defn): Make extern.
6499         (_initialize_d_language): Remove add_language calls.
6500         * defs.h (enum language): Add comment.
6501         * f-lang.c (f_language_defn): Make extern.
6502         (_initialize_f_language): Remove add_language call.
6503         * go-lang.c (go_language_defn): Make extern.
6504         (_initialize_go_language): Remove add_language call.
6505         * language.c: Include <algorithm>.
6506         (languages): Redefine as const array.
6507         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
6508         (set_language_command): Handle "local".  Use for-range loop.
6509         (set_language): Remove loop.
6510         (language_enum): Rewrite.
6511         (language_def, language_str): Remove loops.
6512         (add_language): Delete.
6513         (add_set_language_command): New, based on add_languages.
6514         (skip_language_trampoline): Adjust.
6515         (local_language_defn): Delete.
6516         (language_gdbarch_post_init): Adjust.
6517         (_initialize_language): Remove add_language calls.  Call
6518         add_set_language_command.
6519         * language.h (add_language): Delete.
6520         (auto_language_defn)
6521         (unknown_language_defn, minimal_language_defn, ada_language_defn)
6522         (asm_language_defn, c_language_defn, cplus_language_defn)
6523         (d_language_defn, f_language_defn, go_language_defn)
6524         (m2_language_defn, objc_language_defn, opencl_language_defn)
6525         (pascal_language_defn, rust_language_defn): Declare.
6526         * m2-lang.c (m2_language_defn): Make extern.
6527         (_initialize_m2_language): Remove add_language call.
6528         * objc-lang.c (objc_language_defn): Make extern.
6529         (_initialize_objc_language): Remove add_language call.
6530         * opencl-lang.c (opencl_language_defn): Make extern.
6531         (_initialize_opencl_language): Remove add_language call.
6532         * p-lang.c (pascal_language_defn): Make extern.
6533         (_initialize_pascal_language): Delete.
6534         * rust-lang.c (rust_language_defn): Make extern.
6535         (_initialize_rust_language): Delete.
6536         * utils.h (compare_cstrings): New static inline function.
6537
6538 2017-07-20  Pedro Alves  <palves@redhat.com>
6539
6540         * ada-lang.c (ada_to_fixed_type_1): Adjust.
6541         (get_var_value): Constify parameters.
6542         (get_int_var_value): Change prototype.
6543         (to_fixed_range_type): Adjust.
6544         * ada-lang.h (get_int_var_value): Change prototype.
6545
6546 2017-07-20  Pedro Alves  <palves@redhat.com>
6547
6548         * dwarf2read.c (dw2_lookup_symbol): Use
6549         SYMBOL_MATCHES_SEARCH_NAME.
6550         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
6551
6552 2017-07-20  Pedro Alves  <palves@redhat.com>
6553
6554         * block.c (block_iter_name_step, block_iter_name_first)
6555         (block_iter_name_next): Delete.
6556         (block_lookup_symbol_primary): Adjust to use
6557         dict_iter_match_first/dict_iter_match_next.
6558         * block.h (block_iter_name_first, block_iter_name_next): Delete
6559         declarations.
6560         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
6561         dict_iter_match_first/dict_iter_match_next.
6562
6563 2017-07-20  Pedro Alves  <palves@redhat.com>
6564
6565         * cp-support.c (cp_find_first_component_aux): Add missing case for
6566         end of string.
6567
6568 2017-07-18  David Blaikie  <dblaikie@gmail.com>
6569
6570         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
6571         of dwo_cu's dwo_file.
6572
6573 2017-07-18  Yao Qi  <yao.qi@linaro.org>
6574
6575         * remote.c (store_registers_using_G): Remove one line comment.
6576
6577 2017-07-18  Yao Qi  <yao.qi@linaro.org>
6578
6579         * regcache.c (regcache_cpy): Simplify it.
6580         (regcache::cpy_no_passthrough): Remove it.
6581         * regcache.h (cpy_no_passthrough): Remove it.
6582         (regcache_dup, regcache_cpy): Update comments.
6583
6584 2017-07-18  Pedro Alves  <palves@redhat.com>
6585
6586         * remote-sim.c (sim_command_completer): Adjust to work with a
6587         completion_tracker instead of a VEC.
6588
6589 2017-07-17  Pedro Alves  <palves@redhat.com>
6590
6591         * completer.c (complete_source_filenames): New function.
6592         (complete_address_and_linespec_locations): New function.
6593         (location_completer): Use complete_address_and_linespec_locations.
6594         (completion_tracker::build_completion_result): Honor the tracker's
6595         request to suppress append.
6596         * completer.h (completion_tracker::suppress_append_ws)
6597         (completion_tracker::set_suppress_append_ws): New methods.
6598         (completion_tracker::m_suppress_append_ws): New field.
6599         (complete_source_filenames): New declaration.
6600         * linespec.c (linespec_complete_what): New.
6601         (struct ls_parser) <complete_what, completion_word,
6602         completion_quote_char, completion_quote_end, completion_tracker>:
6603         New fields.
6604         (string_find_incomplete_keyword_at_end): New.
6605         (linespec_lexer_lex_string): Record quote char.  If in completion
6606         mode, don't throw.
6607         (linespec_lexer_consume_token): Advance the completion word point.
6608         (linespec_lexer_peek_token): Save/restore completion info.
6609         (save_stream_and_consume_token): New.
6610         (set_completion_after_number): New.
6611         (linespec_parse_basic): Set what to complete next depending on
6612         token.  Handle function and label completions specially.
6613         (parse_linespec): Disable objc shortcut in completion mode.  Set
6614         what to complete next depending on token type.  Skip keyword if in
6615         completion mode.
6616         (complete_linespec_component, linespec_complete): New.
6617         * linespec.h (linespec_complete): Declare.
6618
6619 2017-07-17  Pedro Alves  <palves@redhat.com>
6620
6621         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
6622         Handle 'operator<' / 'operator<<'.
6623
6624 2017-07-17  Pedro Alves  <palves@redhat.com>
6625
6626         * completer.c (collect_explicit_location_matches): Handle
6627         MATCH_LABEL.
6628         (convert_explicit_location_to_linespec): New, factored out from
6629         ...
6630         (convert_explicit_location_to_sals): ... this.
6631         (complete_label): New.
6632         (linespec_complete_label, find_label_symbols_in_block): New.
6633         (find_label_symbols): Add completion_mode parameter and adjust to
6634         call find_label_symbols_in_block.
6635         * linespec.h (linespec_complete_label): Declare.
6636
6637 2017-07-17  Pedro Alves  <palves@redhat.com>
6638
6639         * ada-lang.c (ada_collect_symbol_completion_matches): Add
6640         complete_symbol_mode parameter.
6641         * cli/cli-cmds.c (complete_command): Get the completion result out
6642         of the handle_brkchars tracker if used a custom word point.
6643         * completer.c: Include "linespec.h".
6644         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
6645         (advance_to_expression_complete_word_point): New.
6646         (completion_tracker::completes_to_completion_word): New.
6647         (complete_files_symbols): Pass down
6648         complete_symbol_mode::EXPRESSION.
6649         (explicit_options, probe_options): New.
6650         (collect_explicit_location_matches): Complete on the
6651         explictit_loc->foo instead of word.  Use
6652         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
6653         keyword and options completions.
6654         (backup_text_ptr): Delete.
6655         (skip_keyword): New.
6656         (complete_explicit_location): Remove 'word' parameter.  Add
6657         language, quoted_arg_start and quoted_arg_end parameters.
6658         Rewrite, parsing left to right.
6659         (location_completer): Rewrite.
6660         (location_completer_handle_brkchars): New function.
6661         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
6662         (enum complete_line_internal_reason): Adjust comments.
6663         (completion_tracker::discard_completions): New.
6664         (completer_handle_brkchars_func_for_completer): Handle
6665         location_completer.
6666         (gdb_custom_word_point_brkchars)
6667         (gdb_org_rl_basic_quote_characters): New.
6668         (gdb_completion_word_break_characters_throw)
6669         (completion_find_completion_word): Handle trackers that use a
6670         custom word point.
6671         (completion_tracker::advance_custom_word_point_by): New.
6672         (completion_tracker::build_completion_result): Don't rely on
6673         readline appending the quote char.
6674         (gdb_rl_attempted_completion_function_throw): Handle trackers that
6675         use a custom word point.
6676         (gdb_rl_attempted_completion_function): Restore
6677         rl_basic_quote_characters.
6678         * completer.h (class completion_tracker): Extend intro comment.
6679         (completion_tracker::set_quote_char)
6680         (completion_tracker::quote_char)
6681         (completion_tracker::set_use_custom_word_point)
6682         (completion_tracker::use_custom_word_point)
6683         (completion_tracker::custom_word_point)
6684         (completion_tracker::set_custom_word_point)
6685         (completion_tracker::advance_custom_word_point_by)
6686         (completion_tracker::completes_to_completion_word)
6687         (completion_tracker::discard_completions): New methods.
6688         (completion_tracker::m_quote_char)
6689         (completion_tracker::m_use_custom_word_point)
6690         (completion_tracker::m_custom_word_point): New fields.
6691         (advance_to_expression_complete_word_point): Declare.
6692         * f-lang.c (f_collect_symbol_completion_matches): Add
6693         complete_symbol_mode parameter.
6694         * language.h (struct language_defn)
6695         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
6696         parameter.
6697         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
6698         (linespec_complete_function): New function.
6699         (linespec_lexer_lex_keyword): Adjust.
6700         * linespec.h (linespec_keywords, linespec_complete_function): New
6701         declarations.
6702         * location.c (find_end_quote): New function.
6703         (explicit_location_lex_one): Add explicit_completion_info
6704         parameter.  Save quoting info.  Don't throw if being called for
6705         completion.  Don't handle Ada operators here.
6706         (is_cp_operator, skip_op_false_positives, first_of)
6707         (explicit_location_lex_one_function): New function.
6708         (string_to_explicit_location): Replace 'dont_throw' parameter with
6709         an explicit_completion_info pointer parameter.  Handle it.  Don't
6710         use explicit_location_lex_one to lex function names.  Use
6711         explicit_location_lex_one_function instead.
6712         * location.h (struct explicit_completion_info): New.
6713         (string_to_explicit_location): Replace 'dont_throw' parameter with
6714         an explicit_completion_info pointer parameter.
6715         * symtab.c (default_collect_symbol_completion_matches_break_on):
6716         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
6717         (default_collect_symbol_completion_matches)
6718         (collect_symbol_completion_matches): Add complete_symbol_mode
6719         parameter.
6720         (collect_symbol_completion_matches_type): Pass down
6721         complete_symbol_mode::EXPRESSION.
6722         (collect_file_symbol_completion_matches): Add complete_symbol_mode
6723         parameter.  Handle LINESPEC mode.
6724         * symtab.h (complete_symbol_mode): New.
6725         (default_collect_symbol_completion_matches_break_on)
6726         (default_collect_symbol_completion_matches)
6727         (collect_symbol_completion_matches)
6728         (collect_file_symbol_completion_matches): Add complete_symbol_mode
6729         parameter.
6730
6731 2017-07-17  Pedro Alves  <palves@redhat.com>
6732
6733         * utils.c (enum class strncmp_iw_mode): New.
6734         (strcmp_iw): Rename to ...
6735         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
6736         parameters.  Handle them.
6737         (strncmp_iw): New.
6738         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
6739         * utils.h (strncmp_iw): Declare.
6740         (strcmp_iw): Move describing comments here.
6741
6742 2017-07-17  Pedro Alves  <palves@redhat.com>
6743
6744         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
6745         CP_OPERATOR_STR.
6746         * c-typeprint.c (is_type_conversion_operator): Use
6747         CP_OPERATOR_STR.
6748         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
6749         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
6750         CP_OPERATOR_LEN.
6751         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
6752         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
6753         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
6754         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
6755         CP_OPERATOR_STR.
6756         * location.c: Include "cp-support.h".
6757         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
6758         CP_OPERATOR_STR.
6759         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
6760         CP_OPERATOR_LEN.
6761
6762 2017-07-17  Pedro Alves  <palves@redhat.com>
6763
6764         * cli/cli-cmds.c (complete_command): Use a completion tracker
6765         along with completion_find_completion_word for handle_brkchars
6766         phase.
6767         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
6768         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
6769         (struct gdb_rl_completion_word_info): New.
6770         (gdb_rl_find_completion_word): New.
6771         (completion_find_completion_word): New.
6772         * completer.h (completion_find_completion_word): Declare.
6773
6774 2017-07-17  Pedro Alves  <palves@redhat.com>
6775
6776         * ada-lang.c (symbol_completion_match): Adjust comments.
6777         (symbol_completion_add): Replace vector parameter with
6778         completion_tracker parameter.  Use it.
6779         (ada_make_symbol_completion_list): Rename to...
6780         (ada_collect_symbol_completion_matches): ... this.  Add
6781         completion_tracker parameter and use it.
6782         (ada_language_defn): Adjust.
6783         * break-catch-syscall.c (catch_syscall_completer): Adjust
6784         prototype and work with completion_tracker instead of VEC.
6785         * breakpoint.c (condition_completer): Adjust prototype and work
6786         with completion_tracker instead of VEC.
6787         * c-lang.c (c_language_defn, cplus_language_defn)
6788         (asm_language_defn, minimal_language_defn): Adjust to renames.
6789         * cli/cli-cmds.c (complete_command): Rework using
6790         completion_tracker.  Catch exceptions when completing.
6791         * cli/cli-decode.c (integer_unlimited_completer)
6792         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
6793         with completion_tracker instead of VEC.
6794         * command.h (struct completion_tracker): Forward declare.
6795         (completer_ftype, completer_handle_brkchars_ftype): Change
6796         types.
6797         (complete_on_cmdlist, complete_on_enum): Adjust.
6798         * completer.c: Include <algorithm>.
6799         (struct gdb_completer_state): New.
6800         (current_completion): New global.
6801         (readline_line_completion_function): Delete.
6802         (noop_completer, filename_completer)
6803         (filename_completer_handle_brkchars, complete_files_symbols)
6804         (linespec_location_completer): Adjust to work with a
6805         completion_tracker instead of a VEC.
6806         (string_or_empty): New.
6807         (collect_explicit_location_matches): Adjust to work with a
6808         completion_tracker instead of a VEC.
6809         (explicit_location_completer): Rename to ...
6810         (complete_explicit_location): ... this and adjust to work with a
6811         completion_tracker instead of a VEC.
6812         (location_completer): Adjust to work with a completion_tracker
6813         instead of a VEC.
6814         (add_struct_fields): Adjust to work with a completion_list instead
6815         of VEC.
6816         (expression_completer): Rename to ...
6817         (complete_expression): ... this and adjust to work with a
6818         completion_tracker instead of a VEC.  Use complete_files_symbols.
6819         (expression_completer): Reimplement on top of complete_expression.
6820         (symbol_completer): Adjust to work with a completion_tracker
6821         instead of a VEC.
6822         (enum complete_line_internal_reason): Add describing comments.
6823         (complete_line_internal_normal_command): Adjust to work with a
6824         completion_tracker instead of a VEC.
6825         (complete_line_internal): Rename to ...
6826         (complete_line_internal_1): ... this and adjust to work with a
6827         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
6828         handle_brkchars phase.
6829         (new_completion_tracker): Delete.
6830         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
6831         complete_line_internal_1.
6832         (free_completion_tracker): Delete.
6833         (INITIAL_COMPLETION_HTAB_SIZE): New.
6834         (completion_tracker::completion_tracker)
6835         (completion_tracker::~completion_tracker): New.
6836         (maybe_add_completion): Delete.
6837         (completion_tracker::maybe_add_completion)
6838         (completion_tracker::add_completion)
6839         (completion_tracker::add_completions): New.
6840         (throw_max_completions_reached_error): Delete.
6841         (complete_line): Adjust to work with a completion_tracker instead
6842         of a VEC.  Don't create a completion_tracker_t or check for max
6843         completions here.
6844         (command_completer, command_completer_handle_brkchars)
6845         (signal_completer, reg_or_group_completer_1)
6846         (reg_or_group_completer, default_completer_handle_brkchars):
6847         Adjust to work with a completion_tracker.
6848         (gdb_completion_word_break_characters_throw): New.
6849         (gdb_completion_word_break_characters): Reimplement.
6850         (line_completion_function): Delete.
6851         (completion_tracker::recompute_lowest_common_denominator)
6852         (expand_preserving_ws)
6853         (completion_tracker::build_completion_result)
6854         (completion_result::completion_result)
6855         (completion_result::completion_result)
6856         (completion_result::~completion_result)
6857         (completion_result::completion_result)
6858         (completion_result::release_match_list, compare_cstrings)
6859         (completion_result::sort_match_list)
6860         (completion_result::reset_match_list)
6861         (gdb_rl_attempted_completion_function_throw)
6862         (gdb_rl_attempted_completion_function): New.
6863         * completer.h (completion_list, struct completion_result)
6864         (class completion_tracker): New.
6865         (complete_line): Add completion_tracker parameter.
6866         (readline_line_completion_function): Delete.
6867         (gdb_rl_attempted_completion_function): New.
6868         (noop_completer, filename_completer, expression_completer)
6869         (location_completer, symbol_completer, command_completer)
6870         (signal_completer, reg_or_group_completer): Update prototypes.
6871         (completion_tracker_t, new_completion_tracker)
6872         (make_cleanup_free_completion_tracker): Delete.
6873         (enum maybe_add_completion_enum): Delete.
6874         (maybe_add_completion): Delete.
6875         (throw_max_completions_reached_error): Delete.
6876         * corefile.c (complete_set_gnutarget): Adjust to work with a
6877         completion_tracker instead of a VEC.
6878         * cp-abi.c (cp_abi_completer): Adjust to work with a
6879         completion_tracker instead of a VEC.
6880         * d-lang.c (d_language_defn): Adjust.
6881         * disasm.c (disassembler_options_completer): Adjust to work with a
6882         completion_tracker instead of a VEC.
6883         * f-lang.c (f_make_symbol_completion_list): Rename to ...
6884         (f_collect_symbol_completion_matches): ... this.  Adjust to work
6885         with a completion_tracker instead of a VEC.
6886         (f_language_defn): Adjust.
6887         * go-lang.c (go_language_defn): Adjust.
6888         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
6889         Adjust to work with a completion_tracker instead of a VEC.
6890         * infrun.c (handle_completer): Likewise.
6891         * interps.c (interpreter_completer): Likewise.
6892         * interps.h (interpreter_completer): Likewise.
6893         * language.c (unknown_language_defn, auto_language_defn)
6894         (local_language_defn): Adjust.
6895         * language.h (language_defn::la_make_symbol_completion_list):
6896         Rename to ...
6897         (language_defn::la_collect_symbol_completion_matches): ... this
6898         and adjust to work with a completion_tracker instead of a VEC.
6899         * m2-lang.c (m2_language_defn): Adjust.
6900         * objc-lang.c (objc_language_defn): Adjust.
6901         * opencl-lang.c (opencl_language_defn): Adjust.
6902         * p-lang.c (pascal_language_defn): Adjust.
6903         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
6904         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
6905         with a completion_tracker.
6906         * rust-lang.c (rust_language_defn): Adjust.
6907         * symtab.c (free_completion_list, do_free_completion_list)
6908         (return_val, completion_tracker): Delete.
6909         (completion_list_add_name, completion_list_add_symbol)
6910         (completion_list_add_msymbol, completion_list_objc_symbol)
6911         (completion_list_add_fields, add_symtab_completions): Add
6912         completion_tracker parameter and use it.
6913         (default_make_symbol_completion_list_break_on_1): Rename to...
6914         (default_collect_symbol_completion_matches_break_on): ... this.
6915         Add completion_tracker parameter and use it instead of allocating
6916         a completion tracker here.
6917         (default_make_symbol_completion_list_break_on): Delete old
6918         implementation.
6919         (default_make_symbol_completion_list): Delete.
6920         (default_collect_symbol_completion_matches): New.
6921         (make_symbol_completion_list): Delete.
6922         (collect_symbol_completion_matches): New.
6923         (make_symbol_completion_type): Rename to ...
6924         (collect_symbol_completion_matches_type): ... this.  Add
6925         completion_tracker parameter and use it instead of VEC.
6926         (make_file_symbol_completion_list_1): Rename to...
6927         (collect_file_symbol_completion_matches): ... this.  Add
6928         completion_tracker parameter and use it instead of VEC.
6929         (make_file_symbol_completion_list): Delete.
6930         (add_filename_to_list): Use completion_list instead of a VEC.
6931         (add_partial_filename_data::list): Now a completion_list.
6932         (make_source_files_completion_list): Work with a completion_list
6933         instead of a VEC.
6934         * symtab.h: Include "completer.h".
6935         (default_make_symbol_completion_list_break_on)
6936         (default_make_symbol_completion_list, make_symbol_completion_list)
6937         (make_symbol_completion_type, make_file_symbol_completion_list)
6938         (make_source_files_completion_list): Delete.
6939         (default_collect_symbol_completion_matches_break_on)
6940         (default_collect_symbol_completion_matches)
6941         (collect_symbol_completion_matches)
6942         (collect_symbol_completion_matches_type)
6943         (collect_file_symbol_completion_matches)
6944         (make_source_files_completion_list): New.
6945         * top.c (init_main): Don't install a rl_completion_entry_function
6946         hook.  Install a rl_attempted_completion_function hook instead.
6947         * tui/tui-layout.c (layout_completer): Adjust to work with a
6948         completion_tracker.
6949         * tui/tui-regs.c (tui_reggroup_completer):
6950         * tui/tui-win.c (window_name_completer, focus_completer)
6951         (winheight_completer): Adjust to work with a completion_tracker.
6952         * value.c: Include "completer.h".
6953         (complete_internalvar): Adjust to work with a completion_tracker.
6954         * value.h (complete_internalvar): Likewise.
6955
6956 2017-07-17  Pedro Alves  <palves@redhat.com>
6957
6958         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
6959         renames.
6960         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
6961         comments to completer_ftype's declaration.
6962         <completer_handle_brkchars>: Change type to
6963         completer_handle_brkchars_ftype.
6964         * command.h (completer_ftype): Add describing comment and give
6965         names to parameters.
6966         (completer_ftype_void): Rename to ...
6967         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
6968         (set_cmd_completer_handle_brkchars): Adjust.
6969         * completer.c (filename_completer_handle_brkchars): New function.
6970         (complete_line_internal_normal_command): New function, factored
6971         out from ...
6972         (complete_line_internal): ... here.
6973         (command_completer_handle_brkchars)
6974         (default_completer_handle_brkchars)
6975         (completer_handle_brkchars_func_for_completer): New functions.
6976         * completer.h (set_gdb_completion_word_break_characters): Delete
6977         declaration.
6978         (completer_handle_brkchars_func_for_completer): New declaration.
6979         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
6980         completer_handle_brkchars_func_for_completer.
6981
6982 2017-07-17  Pedro Alves  <palves@redhat.com>
6983
6984         * completer.c (symbol_completer): New function, based on
6985         make_symbol_completion_list_fn.
6986         * completer.h (symbol_completer): New declaration.
6987         * guile/scm-cmd.c (cmdscm_completers): Adjust.
6988         * python/py-cmd.c (completers): Adjust.
6989         * symtab.c (make_symbol_completion_list_fn): Delete.
6990         * symtab.h (make_symbol_completion_list_fn): Delete.
6991         * cli/cli-decode.c (add_cmd): Adjust.
6992
6993 2017-07-17  Pedro Alves  <palves@redhat.com>
6994
6995         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
6996         * dwarf2read.c: Include "filename-seen-cache.h".
6997         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
6998         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
6999         * filename-seen-cache.c: New file.
7000         * filename-seen-cache.h: New file.
7001         * symtab.c: Include "filename-seen-cache.h".
7002         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
7003         (create_filename_seen_cache, clear_filename_seen_cache)
7004         (delete_filename_seen_cache, filename_seen): Delete, parts moved
7005         to filename-seen-cache.h/filename-seen-cache.c.
7006         (output_source_filename, sources_info)
7007         (maybe_add_partial_symtab_filename)
7008         (make_source_files_completion_list): Adjust to use
7009         filename_seen_cache.
7010
7011 2017-07-17  Pedro Alves  <palves@redhat.com>
7012
7013         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
7014         fields.
7015         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
7016         dwarf2_debug_sections*)): New.
7017         (dwarf2_per_objfile::dwarf2_per_objfile(const
7018         dwarf2_per_objfile&)): Declare as deleted.
7019         (dwarf2_per_objfile::operator=): Declare as deleted.
7020         (dwarf2_per_objfile::dwarf2_per_objfile)
7021         (dwarf2_per_objfile::~dwarf2_per_objfile)
7022         (dwarf2_per_objfile::free_cached_comp_units): New.
7023         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
7024         ctor.  Call dwarf2_per_objfile's ctor manually.
7025         (dwarf2_locate_sections): Deleted/refactored as ...
7026         (dwarf2_per_objfile::locate_sections): ... this new method.
7027         (free_cached_comp_units): Defer to
7028         dwarf2_per_objfile::free_cached_comp_units.
7029         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
7030
7031 2017-07-14  Tom Tromey  <tom@tromey.com>
7032
7033         PR rust/21764:
7034         * rust-exp.y (convert_ast_to_expression): Add "want_type"
7035         parameter.
7036         <UNOP_SIZEOF>: Split into separate case.
7037         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
7038
7039 2017-07-14  Tom Tromey  <tom@tromey.com>
7040
7041         PR rust/21763:
7042         * symtab.c (symbol_matches_domain): Add language_rust to special
7043         case.
7044         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
7045         treat LOC_TYPEDEF symbols as variables.
7046
7047 2017-07-14  Pedro Alves  <palves@redhat.com>
7048
7049         * symtab.c (make_file_symbol_completion_list_1): Iterate over
7050         symtabs matching all symtabs with SRCFILE as file name instead of
7051         only considering the first hit, with lookup_symtab.
7052
7053 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7054
7055         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
7056         operator_name parameters.
7057         (gen_expr): Update function call.
7058
7059 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7060
7061         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
7062         parameter.
7063         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
7064         Likewise.
7065         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
7066         parameter, use agent_expr::gdbarch instead, update function
7067         calls.
7068         (locexpr_tracepoint_var_ref): Likewise.
7069         (loclist_tracepoint_var_ref): Likewise.
7070         * ax-gdb.c (gen_trace_static_fields): Likewise.
7071         (gen_traced_pop): Likewise.
7072         (gen_frame_args_address): Likewise.
7073         (gen_frame_locals_address): Likewise.
7074         (gen_var_ref): Likewise.
7075         (gen_struct_ref_recursive): Likewise.
7076         (gen_static_field): Likewise.
7077         (gen_maybe_namespace_elt): Likewise.
7078         (gen_expr): Likewise.
7079         (gen_trace_for_var): Likewise.
7080         (gen_trace_for_expr): Likewise.
7081         (gen_trace_for_return_address): Likewise.
7082
7083 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7084
7085         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
7086         parameter.
7087         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
7088
7089 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7090
7091         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
7092         from ax, update calls.
7093         (gen_usual_arithmetic): Likewise.
7094         (gen_integral_promotions): Likewise.
7095         (gen_bitfield_ref): Likewise.
7096         (gen_primitive_field): Likewise.
7097         (gen_struct_ref_recursive): Likewise.
7098         (gen_struct_ref): Likewise.
7099         (gen_maybe_namespace_elt): Likewise.
7100         (gen_struct_elt_for_reference): Likewise.
7101         (gen_namespace_elt): Likewise.
7102         (gen_aggregate_elt_ref): Likewise.
7103         (gen_expr): Get gdbarch from ax, update calls.
7104         (gen_expr_binop_rest): Likewise.
7105
7106 2017-07-13  Pedro Alves  <palves@redhat.com>
7107
7108         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
7109         as default tdesc.
7110         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
7111         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
7112         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
7113         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
7114         tdep.
7115         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
7116         Get final tdesc from the tdep.
7117         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
7118         default tdesc.
7119         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7120         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7121         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
7122         Use it as default tdesc.
7123         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
7124         down to amd_init_abi.  No longer handle fallback tdesc here.
7125         * amd64-tdep.h (tdesc_x32): Declare.
7126         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
7127         parameter.
7128         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
7129         as default tdesc.
7130
7131 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7132
7133         * s390-linux-tdep.c (s390_process_record): Add support for
7134         instructions new in arch12.
7135
7136 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7137
7138         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
7139         PT_GETFSBASE and PT_GETGSBASE.
7140         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
7141         PT_SETGSBASE.
7142
7143 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7144
7145         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
7146         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
7147         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
7148         those rules.
7149         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
7150         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
7151         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
7152         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
7153         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
7154         * features/i386/amd64.xml: Add 64bit-segments.xml.
7155         * features/i386/amd64-avx-avx512.c: Regenerated.
7156         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
7157         * features/i386/amd64-avx-mpx.c: Regenerated.
7158         * features/i386/amd64-avx.c: Regenerated.
7159         * features/i386/amd64-mpx.c: Regenerated.
7160         * features/i386/amd64.c: Regenerated.
7161         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
7162         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7163         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
7164         * regformats/i386/amd64-avx.dat: Regenerated.
7165         * regformats/i386/amd64-mpx.dat: Regenerated.
7166         * regformats/i386/amd64.dat: Regenerated.
7167
7168 2017-07-10  Yao Qi  <yao.qi@linaro.org>
7169
7170         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7171         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7172
7173 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
7174
7175         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
7176         unsetenv.
7177         * gnulib/aclocal.m4: Regenerate.
7178         * gnulib/config.in: Regenerate.
7179         * gnulib/configure: Regenerate.
7180         * gnulib/import/Makefile.am: Regenerate.
7181         * gnulib/import/Makefile.in: Regenerate.
7182         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7183         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7184         * gnulib/import/m4/environ.m4: New file.
7185         * gnulib/import/m4/setenv.m4: New file.
7186         * gnulib/import/setenv.c: New file.
7187         * gnulib/import/unsetenv.c: New file.
7188
7189 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
7190
7191         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
7192         address when op is DW_OP_addr.
7193
7194 2017-07-09  Tom Tromey  <tom@tromey.com>
7195
7196         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
7197         check and apply to outer type.
7198
7199 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7200
7201         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
7202         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
7203         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
7204         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
7205
7206 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7207
7208         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
7209
7210 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7211
7212         * corelow.c (get_core_siginfo): Remove.
7213         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
7214         instead of get_core_siginfo.
7215         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
7216         * gdbarch.h: Re-generate.
7217         * gdbarch.c: Re-generate.
7218         * linux-tdep.c (linux_core_xfer_siginfo): New.
7219         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
7220
7221 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7222
7223         * corelow.c (thread_section_name): Move to ...
7224         * gdbcore.h (thread_section_name): ... here.
7225
7226 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7227
7228         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
7229         (struct siginfo32): New.
7230         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
7231         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
7232         via ptrace(PT_LWPINFO).
7233
7234 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7235
7236         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
7237         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
7238         (fbsd_get_siginfo_type): New.
7239         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
7240         (_initialize_fbsd_tdep): New.
7241
7242 2017-07-06  David Blaikie  <dblaikie@gmail.com>
7243
7244         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
7245         a singular dwo_unit*) to support multiple CUs in the same way that
7246         multiple TUs are supported.
7247         (create_cus_hash_table): Replace create_dwo_cu with a function for
7248         parsing multiple CUs from a DWO file.
7249         (open_and_init_dwo_file): Use create_cus_hash_table rather than
7250         create_dwo_cu.
7251         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
7252         htab_find, rather than comparing the signature to a singleton CU in
7253         the dwo_file.
7254
7255 2017-07-06  Pedro Alves  <palves@redhat.com>
7256
7257         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
7258
7259 2017-07-04  Pedro Alves  <palves@redhat.com>
7260
7261         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
7262         * gdbtypes.h (TYPE_STATIC): Delete.
7263         (struct fn_field) <is_public, is_abstract, is_static, is_final,
7264         is_synchronized, is_native>: Delete.
7265         <dummy>: Bump.
7266         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
7267         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
7268         (TYPE_FN_FIELD_ABSTRACT): Delete.
7269
7270 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
7271
7272         * buffer.h (buffer_finish): Fix spelling mistakes.
7273
7274 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
7275
7276         * .dir-locals.el: Automatically switch to C-style comments in
7277         versions of Emacs that support the feature.
7278
7279 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7280             Pedro Alves  <palves@redhat.com>
7281
7282         PR cli/21688
7283         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
7284         (process_next_line): New variable 'inline_cmd'.
7285         Adjust 'if' clauses for "python", "compile" and "guile" to use
7286         'command_name_equals' and check for '!inline_cmd'.
7287
7288 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7289
7290         PR cli/21688
7291         * cli/cli-script.c (command_name_equals_not_inline): New function.
7292         (process_next_line): Adjust 'if' clauses for "python", "compile"
7293         and "guile" to use command_name_equals_not_inline.
7294
7295 2017-06-29  Pedro Alves  <palves@redhat.com>
7296
7297         * completer.c (expression_completer): Call
7298         linespec_location_completer instead of location_completer.
7299
7300 2017-06-29  Pedro Alves  <palves@redhat.com>
7301
7302         * completer.c (expression_completer): Remove code that recomputes
7303         'text' from 'word'.
7304
7305 2017-06-29  Yao Qi  <yao.qi@linaro.org>
7306
7307         * regformats/regdat.sh: Generate code with
7308         "ifndef IN_PROCESS_AGENT".
7309
7310 2017-06-28  Pedro Alves  <palves@redhat.com>
7311
7312         * command.h: Include "common/scoped_restore.h".
7313
7314 2017-06-28  Yao Qi  <yao.qi@linaro.org>
7315
7316         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
7317         instead of obstack_grow.
7318
7319 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
7320
7321         PR gdb/21337
7322         * symfile.c (reread_symbols): Call objfiles_changed just before
7323         read_symbols.
7324
7325 2017-06-27  Pedro Alves  <palves@redhat.com>
7326
7327         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
7328         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
7329         (completion_list_add_symbol, completion_list_add_msymbol):
7330         ... these new functions.
7331         (add_symtab_completions)
7332         (default_make_symbol_completion_list_break_on_1): Adjust.
7333
7334 2017-06-27  Pedro Alves  <palves@redhat.com>
7335
7336         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
7337         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
7338         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
7339         dtor.
7340         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
7341         'storage_obstack' field an auto_obstack.  In-class initialize all
7342         non-bitfield fields.  Make minsyms_read bool.
7343         * symfile.c (read_symbols): Adjust.
7344
7345 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
7346
7347         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
7348         (gdbsim_store_register): Likewise.
7349
7350 2017-06-27  Pedro Alves  <palves@redhat.com>
7351
7352         * c-exp.y (name_obstack): Now an auto_obstack.
7353         (yylex): Use auto_obstack::clear.
7354         (c_parse): Use auto_obstack::clear instead of reinitializing and
7355         freeing the obstack.
7356         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
7357         * d-exp.y (name_obstack): Now an auto_obstack.
7358         (yylex): Use auto_obstack::clear.
7359         (d_parse): Use auto_obstack::clear instead of reinitializing and
7360         freeing the obstack.
7361         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
7362         auto_obstack.
7363         * dwarf2read.c (create_addrmap_from_index)
7364         (dwarf2_build_psymtabs_hard)
7365         (update_enumeration_type_from_children): Likewise.
7366         * gdb_obstack.h (auto_obstack): New type.
7367         * go-exp.y (name_obstack): Now an auto_obstack.
7368         (build_packaged_name): Use auto_obstack::clear.
7369         (go_parse): Use auto_obstack::clear instead of reinitializing and
7370         freeing the obstack.
7371         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
7372         auto_obstack.
7373         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
7374         * rust-exp.y (work_obstack): Now an auto_obstack.
7375         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
7376         reinitializing and freeing the obstack.
7377         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
7378         (host_char_to_target): Use auto_obstack.
7379         * utils.h (make_cleanup_obstack_free): Delete declaration.
7380         * valprint.c (generic_emit_char, generic_printstr): Use
7381         auto_obstack.
7382
7383 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7384
7385         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
7386         thread.
7387         (darwin_init_thread_list): Don't update dummy thread.
7388         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
7389
7390 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7391
7392         * record-full.c (netorder16): Remove.
7393
7394 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7395
7396         * common/diagnostics.h: Define macros for GCC.
7397         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
7398         * common/vec.h: Include diagnostics.h.
7399         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
7400         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
7401         warning.
7402
7403 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7404
7405         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
7406         New macro.
7407         * ada-lex.l: Ignore deprecated register warnings.
7408
7409 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7410
7411         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
7412         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
7413
7414 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7415
7416         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
7417         its own line.
7418
7419 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7420
7421         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
7422
7423 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
7424
7425         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
7426         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
7427         (xtensa_register_read_masked): Likewise.
7428
7429 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
7430
7431         * common/environ.c (gdb_environ::unset): Update comment.
7432
7433 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7434
7435         * python/py-unwind.c (pyuw_sniffer): Allocate space for
7436         registers.
7437
7438 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7439
7440         * record-full.c (record_full_exec_insn): Use byte_vector.
7441
7442 2017-06-22  Yao Qi  <yao.qi@linaro.org>
7443
7444         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
7445         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7446
7447 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7448
7449         * remote.c (cached_reg): Move from here...
7450         * regcache.h (cached_reg): ...to here.
7451         * python/py-unwind.c (struct reg_info): Remove.
7452         (cached_frame_info): Use cached_reg_t.
7453         (pyuw_prev_register): Likewise.
7454         (pyuw_sniffer): Use cached_reg_t and allocate registers.
7455         (pyuw_dealloc_cache): Free all registers.
7456
7457 2017-06-22  Pedro Alves  <palves@redhat.com>
7458             Simon Marchi  <simon.marchi@ericsson.com>
7459
7460         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
7461         warning.
7462         * common/diagnostics.h: New file.
7463
7464 2017-06-22  Pedro Alves  <palves@redhat.com>
7465
7466         * common/agent.h: Add include guards.
7467
7468 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
7469
7470         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
7471         talk about addressable units instead of bytes.
7472
7473 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
7474
7475         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
7476         of '::const_iterator'.
7477
7478 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
7479
7480         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7481         'unittests/environ-selftests.c'.
7482         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
7483         * charset.c (find_charset_names): Declare object 'iconv_env'.
7484         Update code to use 'iconv_env' object.  Remove call to
7485         'free_environ'.
7486         * common/environ.c: Include <utility>.
7487         (make_environ): Delete function.
7488         (free_environ): Delete function.
7489         (gdb_environ::clear): New function.
7490         (gdb_environ::operator=): New function.
7491         (gdb_environ::get): Likewise.
7492         (environ_vector): Delete function.
7493         (set_in_environ): Delete function.
7494         (gdb_environ::set): New function.
7495         (unset_in_environ): Delete function.
7496         (gdb_environ::unset): New function.
7497         (gdb_environ::envp): Likewise.
7498         * common/environ.h: Include <vector>.
7499         (struct gdb_environ): Delete; transform into...
7500         (class gdb_environ): ... this class.
7501         (free_environ): Delete prototype.
7502         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
7503         environ_vector): Likewise.
7504         * infcmd.c (run_command_1): Update code to call
7505         'envp' from 'gdb_environ' class.
7506         (environment_info): Update code to call methods from 'gdb_environ'
7507         class.
7508         (unset_environment_command): Likewise.
7509         (path_info): Likewise.
7510         (path_command): Likewise.
7511         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
7512         (inferior::inferior): Initialize 'environment' using the host's
7513         information.
7514         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
7515         Include "environ.h".
7516         (class inferior) <environment>: Change type from 'struct
7517         gdb_environ' to 'gdb_environ'.
7518         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
7519         methods from 'gdb_environ' class.
7520         * solib.c (solib_find_1): Likewise
7521         * unittests/environ-selftests.c: New file.
7522
7523 2017-06-20  Yao Qi  <yao.qi@linaro.org>
7524
7525         * features/i386/i386-linux.xml: Exchange the order of including
7526         32bit-linux.xml and 32bit-sse.xml.
7527         * features/i386/i386-linux.c: Regenerated.
7528
7529 2017-06-20  Yao Qi  <yao.qi@linaro.org>
7530
7531         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
7532         Delete copy ctor and assignment operator.
7533         (tdesc_type): Likewise.
7534         (tdesc_feature): Likewise.
7535         (tdesc_free_reg): Remove.
7536         (tdesc_create_reg): Use new.
7537         (tdesc_free_type): Remove.
7538         (tdesc_create_vector): Use new.
7539         (tdesc_create_union): Likewise.
7540         (tdesc_create_flags): Likewise.
7541         (tdesc_create_enum): Likewise.
7542         (tdesc_free_feature): Delete.
7543         (free_target_description): Use delete.
7544
7545 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
7546
7547         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
7548         registers.
7549
7550 2017-06-19  Pedro Alves  <palves@redhat.com>
7551
7552         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
7553         after gdb::unlinker.
7554
7555 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
7556
7557         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
7558         gdb_environ to access an environment variable.
7559
7560 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
7561
7562         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
7563         gdb_byte*.
7564
7565 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7566
7567         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
7568
7569 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7570
7571         * configure: Re-generate.
7572         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
7573
7574 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7575
7576         * configure: Re-generate.
7577         * warning.m4: Pass -Werror to compiler when checking for
7578         supported warning flags.
7579
7580 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7581
7582         * Makefile.in (COMPILE.pre): Add "-x c++".
7583
7584 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
7585             Pedro Alves  <palves@redhat.com>
7586             Yao Qi  <yao.qi@linaro.org>
7587
7588         * defs.h (RequireLongest): New.
7589         (extract_integer): Declare function template.
7590         (extract_signed_integer): Remove the declaration, but define it
7591         static inline.
7592         (extract_unsigned_integer): Likewise.
7593         (store_integer): Declare function template.
7594         (store_signed_integer): Remove the declaration, but define it
7595         static inline.
7596         (store_unsigned_integer): Likewise.
7597         * findvar.c (extract_integer): New function template.
7598         (extract_signed_integer): Remove.
7599         (extract_unsigned_integer): Remove.
7600         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
7601         instantiations.
7602         (store_integer): New function template.
7603         (store_signed_integer): Remove.
7604         (store_unsigned_integer): Remove.
7605         (store_integer): Explicit instantiations.
7606         * regcache.c (regcache_raw_read_signed): Update.
7607         (regcache::raw_read): New function.
7608         (regcache::raw_read_signed): Remove.
7609         (regcache::raw_read_unsigned): Remove.
7610         (regcache_raw_read_unsigned): Update.
7611         (regcache_raw_write_unsigned): Update.
7612         (regcache::raw_write_signed): Remove.
7613         (regcache::raw_write): New function.
7614         (regcache_cooked_read_signed): Update.
7615         (regcache::raw_write_unsigned): Remove.
7616         (regcache::cooked_read_signed): Remove.
7617         (regcache_cooked_read_unsigned): Update.
7618         (regcache::cooked_read_unsigned): Remove.
7619         (regcache_cooked_write_signed): Update.
7620         (regcache_cooked_write_unsigned): Update.
7621         * regcache.h (regcache) <raw_read_signed>: Remove.
7622         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
7623         <raw_read, raw_write>: New.
7624         <cooked_read_signed, cooked_write_signed>: Remove.
7625         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
7626         <cooked_read, cooked_write>: New.
7627         * sh64-tdep.c (sh64_pseudo_register_read): Update.
7628         (sh64_pseudo_register_write): Update.
7629
7630 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
7631
7632         * arc-tdep.c (arc_disassembler_options): New variable.
7633         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
7634         of default_print_insn.
7635         (arc_delayed_print_insn): Set info->section when needed,
7636         use default_print_insn to retrieve a disassembler.
7637
7638 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
7639
7640         PR gdb/21574
7641         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
7642         to mention $SHELL and startup-with-shell.
7643
7644 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
7645
7646         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
7647
7648 2017-06-14  Yao Qi  <yao.qi@linaro.org>
7649
7650         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
7651         default_print_insn instead of print_insn_aarch64.
7652         * arm-tdep.c (gdb_print_insn_arm): Call
7653         default_print_insn instead of print_insn_big_arm
7654         and print_insn_little_arm.
7655         * i386-tdep.c (i386_print_insn): Call default_print_insn
7656         instead of print_insn_i386.
7657         * ia64-tdep.c (ia64_print_insn): Call
7658         default_print_insn instead of print_insn_ia64.
7659         * mips-tdep.c (gdb_print_insn_mips): Call
7660         default_print_insn instead of print_insn_big_mips
7661         and print_insn_little_mips.
7662         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
7663         instead of print_insn_spu.
7664
7665 2017-06-14  Pedro Alves  <palves@redhat.com>
7666
7667         * ada-lang.c: Include "common/byte-vector.h".
7668         (ada_value_primitive_packed_val): Use gdb::byte_vector.
7669         * charset.c (wchar_iterator::iterate): Resize the vector instead
7670         of reserving it.
7671         * common/byte-vector.h: Include "common/def-vector.h".
7672         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
7673         * cli/cli-dump.c: Include "common/byte-vector.h".
7674         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
7675         * common/byte-vector.h: New file.
7676         * common/def-vector.h: New file.
7677         * common/default-init-alloc.h: New file.
7678         * dwarf2loc.c: Include "common/byte-vector.h".
7679         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
7680         instead of reserving it.
7681         * dwarf2read.c: Include "common/byte-vector.h".
7682         (data_buf::m_vec): Now a gdb::byte_vector.
7683         * gdb_regex.c: Include "common/def-vector.h".
7684         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
7685         * mi/mi-main.c: Include "common/byte-vector.h".
7686         (mi_cmd_data_read_memory): Use gdb::byte_vector.
7687         * printcmd.c: Include "common/byte-vector.h".
7688         (print_scalar_formatted): Use gdb::byte_vector.
7689         * valprint.c: Include "common/byte-vector.h".
7690         (maybe_negate_by_bytes, print_decimal_chars): Use
7691         gdb::byte_vector.
7692
7693 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7694
7695         * darwin-nat.c: Include "nat/fork-inferior.h".
7696
7697 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7698
7699         * configure.nat: Factor out Darwin bits that are not
7700         architecture-specific.  Add fork-inferior.o.
7701
7702 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7703
7704         * configure.nat: Factor out AIX bits that are not
7705         architecture-specific.  Add fork-inferior.o.
7706
7707 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7708
7709         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
7710         (read_pieced_value, write_pieced_value): ...here.  Reduce to
7711         wrappers that just call rw_pieced_value.
7712
7713 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7714
7715         * dwarf2loc.c (write_pieced_value): When writing the data for a
7716         memory piece, use write_memory_with_notification instead of
7717         write_memory.
7718
7719 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7720
7721         * valops.c (read_value_memory): Change embedded_offset to
7722         represent a bit offset instead of a byte offset.
7723         * value.h (read_value_memory): Adjust comment.
7724
7725 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7726
7727         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
7728         dest_offset_bits and source_offset_bits.
7729         (write_pieced_value): Likewise.
7730
7731 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7732
7733         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
7734         given by DW_OP_bit_piece.
7735         (write_pieced_value): Likewise.
7736
7737 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7738
7739         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
7740         some other preparations to the places where sufficient information
7741         is available.
7742         (write_pieced_value): Likewise.
7743
7744 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7745
7746         * dwarf2loc.c (bits_to_bytes): New function.
7747         (read_pieced_value): Fix offset calculations for register pieces
7748         on big-endian targets.
7749         (write_pieced_value): Likewise.
7750
7751 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7752
7753         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
7754         (write_pieced_value): Likewise.
7755
7756 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7757
7758         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
7759         transfer the source value's least significant bits, instead of its
7760         lowest-addressed ones.  Rename type_len to max_offset.
7761         (read_pieced_value): Mirror above changes to write_pieced_value as
7762         applicable.
7763
7764 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7765
7766         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
7767         truncate full bytes from dest_offset_bits before using it as an
7768         offset into the buffer.
7769
7770 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7771
7772         * dwarf2loc.c (write_pieced_value): Include transfer size in
7773         byte-wise check.
7774
7775 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7776
7777         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
7778         calculation of this_size.
7779
7780 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7781
7782         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
7783         when targeting a bit-field.
7784         (write_pieced_value): Likewise.
7785
7786 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7787
7788         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
7789         (allocate_piece_closure): Drop addr_size parameter.
7790         (dwarf2_evaluate_loc_desc_full): Adjust call to
7791         allocate_piece_closure.
7792
7793 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7794
7795         PR gdb/21226
7796         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
7797         the LSB end, independent of endianness.
7798
7799 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7800
7801         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
7802         size capping.
7803
7804 2017-06-13  Yao Qi  <yao.qi@linaro.org>
7805
7806         * mips-linux-nat.c: Move include features/mips*-linux.c to
7807         mips-linux-tdep.c.
7808         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
7809         to mips-linux-tdep.c.
7810         * mips-linux-tdep.c: Include features/mips*-linux.c
7811         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
7812         functions.
7813         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
7814         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
7815         (tdesc_mips64_dsp_linux): Declare.
7816
7817 2017-06-12  Tom Tromey  <tom@tromey.com>
7818
7819         * valprint.h (val_print_type_code_int): Remove.
7820         * valprint.c (generic_val_print_int): Always call
7821         val_print_scalar_formatted.
7822         (val_print_type_code_int): Remove.
7823         * printcmd.c (print_scalar_formatted): Handle options->format==0.
7824         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
7825         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
7826         * ada-valprint.c (ada_val_print_num): Use
7827         val_print_scalar_formatted.
7828
7829 2017-06-12  Tom Tromey  <tom@tromey.com>
7830
7831         * printcmd.c (print_scalar_formatted): Unify the two switches.
7832         Don't convert scalars to LONGEST.
7833
7834 2017-06-12  Tom Tromey  <tom@tromey.com>
7835
7836         PR exp/16225:
7837         * valprint.h (print_decimal_chars): Update.
7838         * valprint.c (maybe_negate_by_bytes): New function.
7839         (print_decimal_chars): Add "is_signed" argument.
7840         * printcmd.c (print_scalar_formatted): Update.
7841
7842 2017-06-12  Tom Tromey  <tom@tromey.com>
7843
7844         PR exp/16225:
7845         * valprint.h (print_binary_chars, print_hex_chars): Update.
7846         * valprint.c (val_print_type_code_int): Update.
7847         (print_binary_chars): Add "zero_pad" argument.
7848         (emit_octal_digit): New function.
7849         (print_octal_chars): Don't zero-pad.
7850         (print_decimal_chars): Likewise.
7851         (print_hex_chars): Add "zero_pad" argument.
7852         * sh64-tdep.c (sh64_do_fp_register): Update.
7853         * regcache.c (regcache::dump): Update.
7854         * printcmd.c (print_scalar_formatted): Update.
7855         * infcmd.c (default_print_one_register_info): Update.
7856
7857 2017-06-12  Pedro Alves  <palves@redhat.com>
7858             Alan Hayward  <alan.hayward@arm.com>
7859
7860         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
7861         (mips_eabi_push_dummy_call): Rename local 'regsize' to
7862         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
7863         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
7864         Assert that abi_regsize bytes fit in 'ref_valbuf'.
7865
7866 2017-06-12  Pedro Alves  <palves@redhat.com>
7867
7868         * dwarf2read.c (mapped_symtab::data): Now a vector of
7869         symtab_index_entry instead of vector of
7870         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
7871         whether an element's name is NULL instead of checking whether the
7872         element itself is NULL.
7873         (find_slot): Change return type.  Adjust.
7874         (hash_expand, , add_index_entry, uniquify_cu_indices)
7875         (write_hash_table): Adjust.
7876
7877 2017-06-12  Pedro Alves  <palves@redhat.com>
7878
7879         * dwarf2read.c (recursively_count_psymbols): New function.
7880         (write_psymtabs_to_index): Call it to compute number of psyms and
7881         pass estimate size of psyms_seen to unordered_set's ctor.
7882
7883 2017-06-12  Pedro Alves  <palves@redhat.com>
7884
7885         * dwarf2read.c (write_hash_table): Check if key already exists
7886         before emplacing.
7887
7888 2017-06-12  Pedro Alves  <palves@redhat.com>
7889
7890         * dwarf2read.c (data_buf::append_space): Rename to...
7891         (data_buf::grow): ... this, and make private.  Adjust all callers.
7892         (data_buf::append_uint): New method.
7893         (add_address_entry, write_one_signatured_type)
7894         (write_psymtabs_to_index): Use it.
7895
7896 2017-06-12  Pedro Alves  <palves@redhat.com>
7897
7898         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
7899         (file_write (FILE *, const std::vector<Elem>&)): Delete.
7900         (data_buf::file_write): Call ::fwrite directly.
7901
7902 2017-06-12  Pedro Alves  <palves@redhat.com>
7903
7904         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
7905         std::vector::erase.
7906
7907 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
7908
7909         Code cleanup: C++ify .gdb_index producer.
7910         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
7911         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
7912         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
7913         (create_strtab, add_string): Remove.
7914         (file_write, data_buf): New.
7915         (struct symtab_index_entry): Use std::vector for cu_indices.
7916         (struct mapped_symtab): Use std::vector for data.
7917         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
7918         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
7919         Remove.
7920         (find_slot): Change return type.  Update it to the new data structures.
7921         (hash_expand, add_index_entry): Update it to the new data structures.
7922         (offset_type_compare): Remove.
7923         (uniquify_cu_indices): Update it to the new data structures.
7924         (c_str_view, c_str_view_hasher, vector_hasher): New.
7925         (add_indices_to_cpool): Remove.
7926         (write_hash_table): Update it to the new data structures.
7927         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
7928         (eq_psymtab_cu_index): Remove.
7929         (psym_index_map): New typedef.
7930         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
7931         reference and std::unordered_map for cu_index_htab.
7932         (add_address_entry, add_address_entry_worker, write_address_map)
7933         (write_psymbols): Update it to the new data structures.
7934         (write_obstack): Remove.
7935         (struct signatured_type_index_data): Change types_list to a data_buf
7936         reference and psyms_seen to a std::unordered_set reference.
7937         (write_one_signatured_type, recursively_write_psymbols)
7938         (write_psymtabs_to_index): Update it to the new data structures.
7939
7940 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
7941
7942         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
7943         separate-debug-file commands.
7944         * symfile.h (separate_debug_file_debug): New global.
7945         * symfile.c (separate_debug_file_debug): New global.
7946         (separate_debug_file_exists, find_separate_debug_file): Add
7947         debug output.
7948         (_initialize_symfile): Add "set debug separate-debug-file"
7949         command.
7950         * build-id.c (build_id_to_debug_bfd,
7951         find_separate_debug_file_by_buildid): Add debug output.
7952
7953 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
7954
7955         * gdbarch.sh (displaced_step_free_closure): Remove.
7956         * gdbarch.h, gdbarch.c: Re-generate.
7957         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
7958         displaced_step_free_closure.
7959         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
7960         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
7961         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7962         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
7963         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7964         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7965         * arch-utils.h (simple_displaced_step_free_closure): Remove.
7966         * arch-utils.c (simple_displaced_step_free_closure): Remove.
7967         * infrun.c (displaced_step_clear): Call xfree instead of
7968         gdbarch_displaced_step_free_closure.
7969
7970 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
7971
7972         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
7973         NULL".
7974
7975 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
7976
7977         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
7978         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
7979         (mn10300_push_dummy_call): Likewise.
7980
7981 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
7982
7983         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
7984
7985 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
7986
7987         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
7988
7989 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7990
7991         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
7992         able to start inferiors using a shell.
7993         (New remote packets): Announce new packet "QStartupWithShell".
7994         * remote.c: Add PACKET_QStartupWithShell.
7995         (extended_remote_create_inferior): Handle new
7996         PACKET_QStartupWithShell.
7997         (remote_protocol_features) <QStartupWithShell>: New entry for
7998         PACKET_QStartupWithShell.
7999         (_initialize_remote): Call "add_packet_config_cmd" for
8000         QStartupShell.
8001
8002 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8003             Pedro Alves  <palves@redhat.com>
8004
8005         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
8006         and "nat/fork-inferior.h".
8007         * common/common-inferior.h: New file, with contents from
8008         "gdb/inferior.h".
8009         * commom/common-utils.c: Include "common-utils.h".
8010         (stringify_argv): New function.
8011         * common/common-utils.h (stringify_argv): New prototype.
8012         * configure.nat: Add "fork-inferior.o" as a dependency for
8013         "*linux*", "fbsd*" and "nbsd*" hosts.
8014         * corefile.c (get_exec_file): Update comment.
8015         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
8016         instead of "startup_inferior".
8017         (darwin_create_inferior): Call "add_thread_silent" after
8018         "fork_inferior".
8019         * fork-child.c: Cleanup unnecessary includes.
8020         (SHELL_FILE): Move to "common/common-fork-child.c".
8021         (environ): Likewise.
8022         (exec_wrapper): Initialize.
8023         (get_exec_wrapper): New function.
8024         (breakup_args): Move to "common/common-fork-child.c"; rename to
8025         "breakup_args_for_exec".
8026         (escape_bang_in_quoted_argument): Move to
8027         "common/common-fork-child.c".
8028         (saved_ui): New variable.
8029         (prefork_hook): New function.
8030         (postfork_hook): Likewise.
8031         (postfork_child_hook): Likewise.
8032         (gdb_startup_inferior): Likewise.
8033         (fork_inferior): Move to "common/common-fork-child.c".  Update
8034         function to support gdbserver.
8035         (startup_inferior): Likewise.
8036         * gdbcore.h (get_exec_file): Remove declaration.
8037         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
8038         instead of "startup_inferior".  Call "add_thread_silent" after
8039         "fork_inferior".
8040         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
8041         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
8042         instead of "startup_inferior".  Call "add_thread_silent" after
8043         "fork_inferior".
8044         * inferior.h: Include "common-inferior.h".
8045         (trace_start_error): Move to "common/common-utils.h".
8046         (trace_start_error_with_name): Likewise.
8047         (fork_inferior): Move prototype to "nat/fork-inferior.h".
8048         (startup_inferior): Likewise.
8049         (gdb_startup_inferior): New prototype.
8050         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
8051         * nat/fork-inferior.h: New file.
8052         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
8053         instead of "startup_inferior".  Call "add_thread_silent" after
8054         "fork_inferior".
8055         * target.h (target_terminal_init): Move prototype to
8056         "target/target.h".
8057         (target_terminal_inferior): Likewise.
8058         (target_terminal_ours): Likewise.
8059         * target/target.h (target_terminal_init): New prototype, moved
8060         from "target.h".
8061         (target_terminal_inferior): Likewise.
8062         (target_terminal_ours): Likewise.
8063         * utils.c (gdb_flush_out_err): New function.
8064
8065 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8066
8067         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
8068         * common/common-gdbthread.h: New file, with parts from
8069         "gdb/gdbthread.h".
8070         * gdbthread.h: Include "common-gdbthread.h".
8071         (switch_to_thread): Moved to "common/common-gdbthread.h".
8072
8073 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8074
8075         * Makefile.in (SFILES): Add "common/job-control.c".
8076         (HFILES_NO_SRCDIR): Add "common/job-control.h".
8077         (COMMON_OBS): Add "job-control.o".
8078         * common/job-control.c: New file, with contents from
8079         "gdb/inflow.c".
8080         * common/job-control.h: New file, with contents from "terminal.h".
8081         * fork-child.c: Include "job-control.h".
8082         * inflow.c: Include "job-control.h".
8083         (gdb_setpgid): Move to "common/common-inflow.c".
8084         (_initialize_inflow): Move setting of "job_control" to
8085         "handle_job_control".
8086         * terminal.h (job_control): Moved to "common/common-terminal.h".
8087         (gdb_setpgid): Likewise.
8088         * top.c: Include "job_control.h".
8089         * utils.c: Likewise.
8090         (job_control): Moved to "job-control.c".
8091
8092 2017-06-07  Pedro Alves  <palves@redhat.com>
8093
8094         * Makefile.in (SFILES): Add gdb_regex.c.
8095         (COMMON_OBS): Add gdb_regex.o.
8096         * ada-lang.c (ada_add_standard_exceptions)
8097         (ada_add_exceptions_from_frame, name_matches_regex)
8098         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
8099         parameter type to compiled_regex.  Adjust.
8100         (ada_exceptions_list): Use compiled_regex.
8101         * break-catch-throw.c (exception_catchpoint::pattern): Now a
8102         std::unique_ptr<compiled_regex>.
8103         (exception_catchpoint::~exception_catchpoint): Remove regfree
8104         call.
8105         (check_status_exception_catchpoint): Adjust to use compiled_regex.
8106         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
8107         * breakpoint.c (solib_catchpoint::compiled): Now a
8108         std::unique_ptr<compiled_regex>.
8109         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
8110         (check_status_catch_solib): Adjust to use compiled_regex.
8111         (add_solib_catchpoint): Adjust to use compiled_regex.
8112         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
8113         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
8114         compiled_regex reference.  Adjust to use it.
8115         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
8116         declaration.  Include "gdb_regex.h".
8117         (apropos_cmd): Change regex parameter to compiled_regex reference.
8118         * gdb_regex.c: New file.
8119         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
8120         declarations.
8121         (class compiled_regex): New.
8122         * linux-tdep.c: Include "common/gdb_optional.h".
8123         (struct mapping_regexes): New, factored out from
8124         mapping_is_anonymous_p, and adjusted to use compiled_regex.
8125         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
8126         gdb::optional and remove cleanups.  Adjust to compiled_regex.
8127         * probe.c: Include "common/gdb_optional.h".
8128         (collect_probes): Use compiled_regex and gdb::optional and remove
8129         cleanups.
8130         * skip.c: Include "common/gdb_optional.h".
8131         (skiplist_entry::compiled_function_regexp): Now a
8132         gdb::optional<compiled_regex>.
8133         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
8134         (free_skiplist_entry): Remove regfree call.
8135         (compile_skip_regexp, skip_rfunction_p): Adjust to use
8136         compiled_regex and gdb::optional.
8137         * symtab.c: Include "common/gdb_optional.h".
8138         (search_symbols): Use compiled_regex and gdb::optional.
8139         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
8140         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
8141         to gdb_regex.c.
8142
8143 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8144
8145         * regcache.c (regcache::save): Avoid buffer use.
8146         (regcache::dump): Likewise.
8147
8148 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8149
8150         * sh-tdep.c (sh_pseudo_register_read): Remove
8151         MAX_REGISTER_SIZE.
8152         (sh_pseudo_register_write): Likewise.
8153         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
8154         (sh64_pseudo_register_write): Likewise
8155
8156 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8157
8158         * aarch64-tdep.c (aarch64_store_return_value): Use
8159         V_REGISTER_SIZE.
8160         (aarch64_pseudo_read_value): Likewise.
8161         (aarch64_pseudo_write): Likewise.
8162
8163 2017-06-06  Yao Qi  <yao.qi@linaro.org>
8164
8165         * regformats/regdef.h (set_register_cache): Remove the
8166         declaration.
8167
8168 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
8169
8170         * frame.c (frame_unwind_register_signed): Use
8171         frame_unwind_register_value.
8172
8173 2017-06-06  Pedro Alves  <palves@redhat.com>
8174
8175         PR breakpoints/21553
8176         * breakpoint.c (create_breakpoints_sal_default)
8177         (init_breakpoint_sal, create_breakpoint_sal): Use
8178         gdb::unique_xmalloc_ptr for string parameters.
8179         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8180         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
8181         (base_breakpoint_create_breakpoints_sal)
8182         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
8183         (strace_marker_create_breakpoints_sal)
8184         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
8185         string parameters.
8186         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
8187         gdb::unique_xmalloc_ptr for string parameters.
8188         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8189         parameters.
8190
8191 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8192
8193         * alpha-tdep.c (alpha_register_to_value): Use
8194         get_frame_register_value.
8195         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
8196
8197 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8198
8199         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
8200         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
8201         (ia64_value_to_register): Likewise.
8202         (ia64_extract_return_value): Likewise.
8203         (ia64_store_return_value): Likewise.
8204         (ia64_push_dummy_call): Likewise.
8205
8206 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
8207
8208         GDB 8.0 released.
8209
8210 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
8211
8212         * x86-linux-nat.c (struct arch_lwp_info): Remove.
8213
8214 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
8215
8216         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
8217         parameter.
8218         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
8219
8220 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
8221
8222         * event-loop.c (poll_timers): Unallocate timer using delete
8223         instead of xfree.
8224
8225 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8226
8227         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
8228         (struct breakpoint) <~breakpoint>: New.
8229         (struct watchpoint): Inherit from breakpoint.
8230         <~watchpoint>: New.
8231         <base>: Remove.
8232         (struct tracepoint): Inherit from breakpoint.
8233         <base>: Remove.
8234         * breakpoint.c (longjmp_breakpoint_ops): Remove.
8235         (struct longjmp_breakpoint): Inherit from breakpoint.
8236         <~longjmp_breakpoint>: New.
8237         <base>: Remove.
8238         (new_breakpoint_from_type): Remove casts.
8239         (watchpoint_in_thread_scope): Remove reference to base field.
8240         (watchpoint_del_at_next_stop): Likewise.
8241         (update_watchpoint): Likewise.
8242         (watchpoint_check): Likewise.
8243         (bpstat_check_watchpoint): Likewise.
8244         (set_longjmp_breakpoint): Likewise.
8245         (struct fork_catchpoint): Inherit from breakpoint.
8246         <base>: Remove.
8247         (struct solib_catchpoint): Inherit from breakpoint.
8248         <~solib_catchpoint>: New.
8249         <base>: Remove.
8250         (dtor_catch_solib): Change to ...
8251         (solib_catchpoint::~solib_catchpoint): ... this.
8252         (breakpoint_hit_catch_solib): Remove reference to base field.
8253         (add_solib_catchpoint): Likewise.
8254         (create_fork_vfork_event_catchpoint): Likewise.
8255         (struct exec_catchpoint): Inherit from breakpoint.
8256         <~exec_catchpoint>: New.
8257         <base>: Remove.
8258         (dtor_catch_exec): Change to ...
8259         (exec_catchpoint::~exec_catchpoint): ... this.
8260         (dtor_watchpoint): Change to ...
8261         (watchpoint::~watchpoint): ... this.
8262         (watch_command_1): Remove reference to base field.
8263         (catch_exec_command_1): Likewise.
8264         (base_breakpoint_dtor): Change to ...
8265         (breakpoint::~breakpoint): ... this.
8266         (base_breakpoint_ops): Remove dtor field value.
8267         (longjmp_bkpt_dtor): Change to ...
8268         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
8269         (strace_marker_create_breakpoints_sal): Remove reference to base
8270         field.
8271         (delete_breakpoint): Don't manually call breakpoint destructor.
8272         (create_tracepoint_from_upload): Remove reference to base field.
8273         (trace_pass_set_count): Likewise.
8274         (initialize_breakpoint_ops): Don't initialize
8275         momentary_breakpoint_ops, don't set dtors.
8276         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
8277         <~ada_catchpoint>: New.
8278         <base>: Remove.
8279         (create_excep_cond_exprs): Remove reference to base field.
8280         (dtor_exception): Change to ...
8281         (ada_catchpoint::~ada_catchpoint): ... this.
8282         (dtor_catch_exception): Remove.
8283         (dtor_catch_exception_unhandled): Remove.
8284         (dtor_catch_assert): Remove.
8285         (create_ada_exception_catchpoint): Remove reference to base
8286         field.
8287         (initialize_ada_catchpoint_ops): Don't set dtors.
8288         * break-catch-sig.c (struct signal_catchpoint): Inherit from
8289         breakpoint.
8290         <~signal_catchpoint>: New.
8291         <base>: Remove.
8292         (signal_catchpoint_dtor): Change to ...
8293         (signal_catchpoint::~signal_catchpoint): ... this.
8294         (create_signal_catchpoint): Remove reference to base field.
8295         (initialize_signal_catchpoint_ops): Don't set dtor.
8296         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
8297         from breakpoint.
8298         <~syscall_catchpoint>: New.
8299         <base>: Remove.
8300         (dtor_catch_syscall): Change to ...
8301         (syscall_catchpoint::~syscall_catchpoint): ... this.
8302         (create_syscall_event_catchpoint): Remove reference to base
8303         field.
8304         (initialize_syscall_catchpoint_ops): Don't set dtor.
8305         * break-catch-throw.c (struct exception_catchpoint): Inherit
8306         from breakpoint.
8307         <~exception_catchpoint>: New.
8308         <base>: Remove.
8309         (dtor_exception_catchpoint): Change to ...
8310         (exception_catchpoint::~exception_catchpoint): ... this.
8311         (handle_gnu_v3_exceptions): Remove reference to base field.
8312         (initialize_throw_catchpoint_ops): Don't set dtor.
8313         * ctf.c (ctf_get_traceframe_address): Remove reference to base
8314         field.
8315         * remote.c (remote_get_tracepoint_status): Likewise.
8316         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
8317         * tracefile.c (tracefile_fetch_registers): Likewise.
8318         * tracepoint.c (actions_command): Likewise.
8319         (validate_actionline): Likewise.
8320         (tfind_1): Likewise.
8321         (get_traceframe_location): Likewise.
8322         (find_matching_tracepoint_location): Likewise.
8323         (parse_tracepoint_status): Likewise.
8324         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
8325
8326 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8327
8328         * breakpoint.c (struct longjmp_breakpoint): New struct.
8329         (is_tracepoint_type): Change return type to bool.
8330         (is_longjmp_type): New function.
8331         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
8332         (set_raw_breakpoint_without_location): Use
8333         new_breakpoint_from_type.
8334         (set_raw_breakpoint): Likewise.
8335
8336 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8337
8338         * breakpoint.c (new_breakpoint_from_type): New function.
8339         (create_breakpoint_sal): Use new_breakpoint_from_type and
8340         unique_ptr.
8341         (create_breakpoint): Likewise.
8342
8343 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
8344
8345         * memattr.c (mem_info_command): Rename to ...
8346         (info_mem_command): ... this.
8347         (mem_enable_command): Rename to ...
8348         (enable_mem_command): ... this.
8349         (mem_disable_command): Rename to ...
8350         (disable_mem_command): ... this.
8351         (mem_delete_command): Rename to ...
8352         (delete_mem_command): ... this.
8353         (_initialize_mem): Adjust function names.
8354
8355 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8356
8357         * btrace.c (handle_pt_insn_events): New.
8358         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
8359         STATUS.  Split into this and ...
8360         (handle_pt_insn_event_flags): ... this.
8361
8362 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8363
8364         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
8365         and struct pt_insn.resynced.
8366         * configure: Regenerated.
8367         * config.in: Regenerated.
8368
8369 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8370
8371         * btrace.c (ftrace_find_call_by_number): New function.
8372         (ftrace_new_function): Store objects, not pointers.
8373         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
8374         ftrace_new_gap, ftrace_update_function,
8375         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
8376         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
8377         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
8378         btrace_ends_with_single_insn, btrace_call_get): Account for
8379         btrace_thread_info::functions now storing objects.
8380         * btrace.h (struct btrace_thread_info): Add constructor.
8381         (struct btrace_thread_info) <functions>: Make std::vector.
8382         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
8383         Initialize with default values.
8384         * record-btrace.c (record_btrace_frame_sniffer): Account for
8385         btrace_thread_info::functions now storing objects.
8386
8387 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8388
8389         * btrace.c: Remove typedef bfun_s.
8390         (ftrace_new_gap): Directly add gaps to the list of gaps.
8391         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
8392         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
8393         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
8394         instead of gdb VEC.
8395
8396 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8397
8398         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
8399         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
8400         with btrace_thread_info::next_segment and
8401         btrace_thread_info::prev_segment.
8402         * btrace.h: Remove struct btrace_func_link.
8403         (struct btrace_function): Replace pair of function segment pointers
8404         with pair of indices.
8405         * python/py-record-btrace.c (btpy_call_prev_sibling,
8406         btpy_call_next_sibling): Replace references to
8407         btrace_thread_info::segment with btrace_thread_info::next_segment and
8408         btrace_thread_info::prev_segment.
8409         * record-btrace.c (record_btrace_frame_this_id): Use
8410         btrace_find_call_by_number.
8411
8412 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8413
8414         * btrace.c (ftrace_new_function, ftrace_fixup_level,
8415         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
8416         btrace_insn_next, btrace_insn_prev): Remove references to
8417         btrace_thread_info::flow.
8418         * btrace.h (struct btrace_function): Remove FLOW.
8419
8420 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8421
8422         * btrace.c (ftrace_find_call_by_number): New function.
8423         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
8424         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
8425         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
8426         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
8427         index.
8428         * btrace.h (struct btrace_function): Turn UP into an index.
8429         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
8430         as an index.
8431         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
8432         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
8433         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
8434
8435 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8436
8437         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8438         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8439         ftrace_update_function, ftrace_compute_global_level_offset,
8440         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
8441         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
8442         btrace_insn_end, btrace_is_empty): Remove references to
8443         btrace_thread_info::begin and btrace_thread_info::end.
8444         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
8445         (struct btrace_thread_info) <functions>: Adjust comment.
8446         * record-btrace.c (record_btrace_start_replaying): Remove reference to
8447         btrace_thread_info::begin.
8448
8449 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8450
8451         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8452         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8453         ftrace_update_function): Remove arguments that implicitly were always
8454         BTINFO->END.
8455         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
8456         Don't pass BTINFO->END.
8457
8458 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8459
8460         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
8461         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
8462         btrace_find_insn_by_number): Replace function segment pointer with
8463         index.
8464         (btrace_insn_cmp): Simplify.
8465         * btrace.h: (struct btrace_insn_iterator) Rename index to
8466         insn_index.  Replace function segment pointer with index into function
8467         segment vector.
8468         * record-btrace.c (record_btrace_call_history): Replace function
8469         segment pointer use with index.
8470         (record_btrace_frame_sniffer): Retrieve function call segment through
8471         vector.
8472         (record_btrace_set_replay): Remove defunc't safety check.
8473
8474 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8475
8476         * btrace.c (btrace_ends_with_single_insn): New function.
8477         (btrace_call_get, btrace_call_number, btrace_call_begin,
8478         btrace_call_end, btrace_call_next, btrace_call_prev,
8479         btrace_find_call_by_number): Use index into call segment vector
8480         instead of pointer.
8481         (btrace_call_cmp): Simplify.
8482         * btrace.h (struct btrace_call_iterator): Replace function call segment
8483         pointer with index into vector.
8484         * record-btrace.c (record_btrace_call_history): Use index instead of
8485         pointer.
8486
8487 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8488
8489         * btrace.c (btrace_insn_begin, btrace_insn_end,
8490         btrace_find_insn_by_number): Add btinfo to iterator.
8491         * btrace.h (struct btrace_insn_iterator): Add btinfo.
8492
8493 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8494
8495         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
8496         and save pointers directly.
8497         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
8498         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
8499         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
8500         changed signature of functions.
8501         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
8502         (btrace_fetch): Remove code that adds btrace_function pointers to
8503         vector of btrace_functions.
8504         (btrace_clear): Simplify freeing vector of btrace_functions.
8505
8506 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8507
8508         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
8509         Replace VEC_* with std::vector functions.
8510         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
8511         (struct btrace_thread_info)<functions>: Change type to std::vector.
8512
8513 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8514
8515         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
8516         "Removed targets and native configurations" up.  Merge duplicate
8517         "New commands" sub-sections.  Add "New options" sub-sections.
8518
8519 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
8520
8521         * defs.h (copy_integer_to_size): New declaration.
8522         * findvar.c (copy_integer_to_size): New function.
8523         (do_cint_test): New selftest function.
8524         (copy_integer_to_size_test): Likewise.
8525         (_initialize_findvar): Likewise.
8526         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
8527         (mips_fbsd_collect_reg): Use raw_collect_integer.
8528         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
8529         (mips64_fill_gregset): Use raw_collect_integer
8530         (mips64_fill_fpregset): Use raw_supply_integer.
8531         * regcache.c (regcache::raw_supply_integer): New function.
8532         (regcache::raw_collect_integer): Likewise.
8533         * regcache.h: (regcache::raw_supply_integer): New declaration.
8534         (regcache::raw_collect_integer): Likewise.
8535
8536 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8537
8538         * Makefile.in (SFILES): Add gdbarch-selftests.c.
8539         (COMMON_OBS): Add gdbarch-selftests.o.
8540         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
8541         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
8542         * gdbarch-selftests.c: New file.
8543         * regcache.h (regcache) <~regcache>: Mark it virtual if
8544         GDB_SELF_TEST.
8545         <raw_write>: Likewise.
8546
8547 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8548
8549         * regcache.c (current_regcache): Change it to
8550         regcache::current_regcache.
8551         (regcache_observer_target_changed): Update.
8552         (regcache_thread_ptid_changed): Make it a regcache static
8553         method.
8554         (regcache_thread_ptid_changed): Update.
8555         (class regcache_access): New.
8556         (current_regcache_test): Update.
8557         (_initialize_regcache): Update.
8558         * regcache.h: Include forward_list.
8559         (regcache): Declare regcache_thread_ptid_changed and declare
8560         registers_changed_ptid as friend.
8561
8562 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8563
8564         * i387-tdep.c (i387_register_to_value): Use register_size
8565         instead of TYPE_LENGTH.
8566         * m68k-tdep.c (m68k_register_to_value): Likewise.
8567
8568 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8569
8570         * i387-tdep.c (i387_convert_register_p): Return false if type
8571         code isn't TYPE_CODE_FLT.
8572
8573 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8574
8575         * alpha-tdep.c (alpha_convert_register_p): Return true if type
8576         length is 4.
8577         (alpha_register_to_value): Remove type length check.
8578         (alpha_value_to_register): Likewise.
8579
8580 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8581
8582         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
8583         TYPE_CODE_FLT.
8584
8585 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8586
8587         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
8588         TYPE_CODE_FLT or not.
8589
8590 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8591
8592         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
8593         * avr-tdep.c (avr_gdbarch_init): Likewise.
8594         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8595         * cris-tdep.c (cris_gdbarch_init): Likewise.
8596         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8597         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8598         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8599         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
8600         * mep-tdep.c (mep_gdbarch_init): Likewise.
8601         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8602         * mips-tdep.c (mips_gdbarch_init): Likewise.
8603         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8604         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8605         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8606         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8607         * v850-tdep.c (v850_gdbarch_init): Likewise.
8608
8609 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8610
8611         * selftest-arch.c (tests_with_arch): Call registers_changed
8612         and reinit_frame_cache.
8613         * selftest.c (run_self_tests): Likewise.
8614
8615 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8616
8617         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
8618         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
8619
8620 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8621
8622         * rl78-tdep.c (rl78_gdbarch_init): Don't call
8623         set_gdbarch_print_insn.
8624
8625 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8626
8627         * h8300-tdep.c (h8300_gdbarch_init): Don't call
8628         set_gdbarch_print_insn.
8629
8630 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8631
8632         * alpha-tdep.c (alpha_gdbarch_init): Don't call
8633         set_gdbarch_print_insn.
8634         * arc-tdep.c (arc_gdbarch_init): Likewise.
8635         * arch-utils.c: include dis-asm.h.
8636         (default_print_insn): New function.
8637         * arch-utils.h (default_print_insn): Declare.
8638         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
8639         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8640         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
8641         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
8642         * frv-tdep.c (frv_gdbarch_init): Likewise.
8643         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8644         * gdbarch.sh (print_insn): Use default_print_insn.
8645         * gdbarch.c: Regenerated.
8646         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
8647         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
8648         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8649         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
8650         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8651         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
8652         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
8653         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
8654         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
8655         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8656         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8657         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8658         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8659         * mt-tdep.c (mt_gdbarch_init): Likewise.
8660         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8661         * nios2-tdep.c (nios2_print_insn): Remove.
8662         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
8663         * rx-tdep.c (rx_gdbarch_init): Likewise.
8664         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8665         * score-tdep.c (score_print_insn): Remove.
8666         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
8667         * sh-tdep.c (sh_gdbarch_init): Likewise.
8668         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8669         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8670         * tic6x-tdep.c (tic6x_print_insn): Remove.
8671         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
8672         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
8673         * v850-tdep.c (v850_gdbarch_init): Likewise.
8674         * vax-tdep.c (vax_gdbarch_init): Likewise.
8675         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8676         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
8677
8678 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
8679
8680         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
8681         (MIPS_FP0_REGNUM): Remove.
8682         (MIPS_FSR_REGNUM): Remove.
8683         (mips_fbsd_supply_fpregs): Use mips_regnum.
8684         (mips_fbsd_supply_gregs): Likewise.
8685         (mips_fbsd_collect_fpregs): Likewise.
8686         (mips_fbsd_collect_gregs): Likewise.
8687
8688 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
8689
8690         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
8691         (getpfpregs_supplies): New function.
8692         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
8693         getfpregs_supplies.
8694         (mips_fbsd_store_inferior_registers): Likewise.
8695
8696 2017-05-22  Pedro Alves <palves@redhat.com>
8697
8698         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
8699         maintainer.
8700
8701 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
8702
8703         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
8704         (store_register): Likewise.
8705         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
8706         (get_decimal_float_return_value): Likewise.
8707         (do_ppc_sysv_return_value): Likewise.
8708         (ppc64_sysv_abi_push_integer): Likewise.
8709         (ppc64_sysv_abi_push_freg): Likewise.
8710         (ppc64_sysv_abi_return_value_base): Likewise.
8711         (ppc64_sysv_abi_return_value): Likewise.
8712         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
8713         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
8714         * rs6000-nat.c: Likewise.
8715         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
8716         (rs6000_value_to_register): Likewise.
8717         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
8718
8719 2017-05-21  Tom Tromey  <tom@tromey.com>
8720
8721         PR rust/21466:
8722         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
8723         arrays as "[T]", not "[T; ]".
8724
8725 2017-05-19  Tom Tromey  <tom@tromey.com>
8726
8727         PR rust/21484:
8728         * rust-lang.c (exp_descriptor_rust): New function.
8729         (rust_language_defn): Use it.
8730         * p-lang.c (pascal_language_defn): Update.
8731         * opencl-lang.c (opencl_language_defn): Update.
8732         * objc-lang.c (objc_language_defn): Update.
8733         * m2-lang.c (m2_language_defn): Update.
8734         * language.h (struct language_defn)
8735         <la_watch_location_expression>: New member.
8736         * language.c (unknown_language_defn, auto_language_defn)
8737         (local_language_defn): Update.
8738         * go-lang.c (go_language_defn): Update.
8739         * f-lang.c (f_language_defn): Update.
8740         * d-lang.c (d_language_defn): Update.
8741         * c-lang.h (c_watch_location_expression): Declare.
8742         * c-lang.c (c_watch_location_expression): New function.
8743         (c_language_defn, cplus_language_defn, asm_language_defn)
8744         (minimal_language_defn): Use it.
8745         * breakpoint.c (watch_command_1): Call
8746         la_watch_location_expression.
8747         * ada-lang.c (ada_language_defn): Update.
8748
8749 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8750
8751         PR tui/21482
8752         * gdb_curses.h (NOMACROS): Define.
8753         (NCURSES_NOMACROS): Define.
8754
8755 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8756
8757         PR tui/21482
8758         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
8759         arg to char *.
8760         * tui/tui-wingeneral.c (box_win): Likewise.
8761         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
8762         (tui_show_source_line): Likewise.
8763         (tui_show_exec_info_content): Likewise.
8764
8765 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
8766
8767         * sparc-tdep.c (sparc_structure_return_p)
8768         (sparc_arg_on_registers_p): New functions.
8769         (sparc32_store_arguments): Use them.
8770         * sparc64-tdep.c (sparc64_16_byte_align_p)
8771         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
8772         Handle TYPE_CODE_ARRAY.
8773
8774 2017-05-17  Yao Qi  <yao.qi@linaro.org>
8775
8776         * cli/cli-decode.c (add_alias_cmd): New function.
8777         * command.h (add_alias_cmd): Declare.
8778         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
8779         instead call add_alias_cmd.
8780
8781 2017-05-17  Pedro Alves  <palves@redhat.com>
8782
8783         * Makefile.in (nat_extra_makefile_frag): Rename to ...
8784         (nat_makefile_frag): ... this.  All references updated.
8785         * configure.ac: Likewise.
8786         * configure.nat: Likewise.  Enhance comments.
8787         * configure: Regenerate.
8788
8789 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8790
8791         * procfs.c (procfs_create_inferior): Change prototype to match
8792         definition.
8793
8794 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
8795
8796         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
8797         C++ compiler warning.
8798
8799 2017-05-12  Tom Tromey  <tom@tromey.com>
8800
8801         PR rust/21483:
8802         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
8803         recurse, just call value_struct_elt directly.
8804
8805 2017-05-12  Tom Tromey  <tom@tromey.com>
8806
8807         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
8808         OP_RUST_ARRAY>: Fix.
8809
8810 2017-05-12  Tom Tromey  <tom@tromey.com>
8811
8812         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
8813
8814 2017-05-09  Yao Qi  <yao.qi@linaro.org>
8815
8816         * regcache.c: Include <forward_list>.
8817         (struct regcache_list): Remove.
8818         (current_regcache): Update.
8819         (get_thread_arch_aspace_regcache): Update for std::forward_list.
8820         (regcache_thread_ptid_changed): Likewise.
8821         (registers_changed_ptid): Likewise.
8822         (current_regcache_size): Likewise.
8823
8824 2017-05-09  Yao Qi  <yao.qi@linaro.org>
8825
8826         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
8827         (current_regcache_size): New function.
8828         (current_regcache_test): New function.
8829         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
8830
8831 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
8832
8833         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
8834         (print_gp_register_row): Use get_frame_register_value.
8835
8836 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
8837
8838         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
8839         (mips_supply_fpregset): Likewise.
8840         (mips64_supply_gregset): Likewise.
8841
8842 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
8843
8844         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
8845         regcache->raw_supply_zeroed.
8846
8847 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8848
8849         * configure.nat: Rearrange 'case' statements to match
8850         host before cpu.
8851
8852 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8853
8854         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
8855         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
8856         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
8857         "@nat_extra_makefile_frag@".
8858         (Makefile): Remove dependency on "@frags@".
8859         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
8860         (data-directory/Makefile): Likewise.
8861         * config/aarch64/linux.mh: Deleted; moved contents to
8862         "gdb/configure.nat".
8863         * config/alpha/alpha-linux.mh: Likewise.
8864         * config/alpha/nbsd.mh: Likewise.
8865         * config/arm/linux.mh: Likewise.
8866         * config/arm/nbsdelf.mh: Likewise.
8867         * config/i386/cygwin.mh: Likewise.
8868         * config/i386/cygwin64.mh: Likewise.
8869         * config/i386/darwin.mh: Likewise.
8870         * config/i386/fbsd.mh: Likewise.
8871         * config/i386/fbsd64.mh: Likewise.
8872         * config/i386/go32.mh: Likewise.
8873         * config/i386/i386gnu.mh: Likewise.
8874         * config/i386/i386sol2.mh: Likewise.
8875         * config/i386/linux.mh: Likewise.
8876         * config/i386/linux64.mh: Likewise.
8877         * config/i386/mingw.mh: Likewise.
8878         * config/i386/mingw64.mh: Likewise.
8879         * config/i386/nbsd64.mh: Likewise.
8880         * config/i386/nbsdelf.mh: Likewise.
8881         * config/i386/nto.mh: Likewise.
8882         * config/i386/obsd.mh: Likewise.
8883         * config/i386/obsd64.mh: Likewise.
8884         * config/i386/sol2-64.mh: Likewise.
8885         * config/ia64/linux.mh: Likewise.
8886         * config/m32r/linux.mh: Likewise.
8887         * config/m68k/linux.mh: Likewise.
8888         * config/m68k/nbsdelf.mh: Likewise.
8889         * config/m68k/obsd.mh: Likewise.
8890         * config/m88k/obsd.mh: Likewise.
8891         * config/mips/fbsd.mh: Likewise.
8892         * config/mips/linux.mh: Likewise.
8893         * config/mips/nbsd.mh: Likewise.
8894         * config/mips/obsd64.mh: Likewise.
8895         * config/pa/linux.mh: Likewise.
8896         * config/pa/nbsd.mh: Likewise.
8897         * config/pa/obsd.mh: Likewise.
8898         * config/powerpc/aix.mh: Likewise.
8899         * config/powerpc/fbsd.mh: Likewise.
8900         * config/powerpc/linux.mh: Likewise.
8901         * config/powerpc/nbsd.mh: Likewise.
8902         * config/powerpc/obsd.mh: Likewise.
8903         * config/powerpc/ppc64-linux.mh: Likewise.
8904         * config/powerpc/spu-linux.mh: Likewise.
8905         * config/s390/linux.mh: Likewise.
8906         * config/sh/nbsd.mh: Likewise.
8907         * config/sparc/fbsd.mh: Likewise.
8908         * config/sparc/linux.mh: Likewise.
8909         * config/sparc/linux64.mh: Likewise.
8910         * config/sparc/nbsd64.mh: Likewise.
8911         * config/sparc/nbsdelf.mh: Likewise.
8912         * config/sparc/obsd64.mh: Likewise.
8913         * config/sparc/sol2.mh: Likewise.
8914         * config/tilegx/linux.mh: Likewise.
8915         * config/vax/nbsdelf.mh: Likewise.
8916         * config/vax/obsd.mh: Likewise.
8917         * config/xtensa/linux.mh: Likewise.
8918         * config/i386/i386gnu.mn: New file, with excerpts from
8919         "config/i386/i386gnu.mh".
8920         * configure: Regenerate.
8921         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
8922         *.mh files under "gdb/config".
8923         * configure.nat: New file, with contents from the
8924         "gdb/config/*/*.mh" files.
8925
8926 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
8927
8928         * btrace.c (btrace_clear): Free insn vector.
8929
8930 2017-05-05  Pedro Alves  <palves@redhat.com>
8931
8932         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
8933         * configure: Regenerate.
8934
8935 2017-05-04  Pedro Alves  <palves@redhat.com>
8936
8937         * Makefile.in (SFILES): Add progspace-and-thread.c.
8938         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
8939         (COMMON_OBS): Add progspace-and-thread.o.
8940         * breakpoint.c: Include "progspace-and-thread.h".
8941         (update_inserted_breakpoint_locations)
8942         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
8943         Use scoped_restore_current_pspace_and_thread.
8944         (create_std_terminate_master_breakpoint): Use
8945         scoped_restore_current_program_space.
8946         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
8947         (print_breakpoint_location): Use
8948         scoped_restore_current_program_space.
8949         (bp_loc_is_permanent): Use
8950         scoped_restore_current_pspace_and_thread.
8951         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
8952         (download_tracepoint_locations): Use
8953         scoped_restore_current_pspace_and_thread.
8954         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
8955         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
8956         (enum step_over_calls_kind): Moved from inferior.h.
8957         (class scoped_restore_current_thread): New class.
8958         * gdbthread.h (make_cleanup_restore_current_thread): Delete
8959         declaration.
8960         (scoped_restore_current_thread): New class.
8961         * infcmd.c: Include "common/gdb_optional.h".
8962         (continue_1, proceed_after_attach): Use
8963         scoped_restore_current_thread.
8964         (notice_new_inferior): Use scoped_restore_current_thread.
8965         * inferior.c: Include "progspace-and-thread.h".
8966         (restore_inferior, save_current_inferior): Delete.
8967         (add_inferior_command, clone_inferior_command): Use
8968         scoped_restore_current_pspace_and_thread.
8969         * inferior.h (scoped_restore_current_inferior): New class.
8970         * infrun.c: Include "progspace-and-thread.h" and
8971         "common/gdb_optional.h".
8972         (follow_fork_inferior): Use
8973         scoped_restore_current_pspace_and_thread.
8974         (scoped_restore_exited_inferior): New class.
8975         (handle_vfork_child_exec_or_exit): Use
8976         scoped_restore_exited_inferior,
8977         scoped_restore_current_pspace_and_thread,
8978         scoped_restore_current_thread and scoped_restore.
8979         (fetch_inferior_event): Use scoped_restore_current_thread.
8980         * linespec.c (decode_line_full, decode_line_1): Use
8981         scoped_restore_current_program_space.
8982         * mi/mi-main.c: Include "progspace-and-thread.h".
8983         (exec_continue): Use scoped_restore_current_thread.
8984         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
8985         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
8986         * proc-service.c (ps_pglobal_lookup): Use
8987         scoped_restore_current_program_space.
8988         * progspace-and-thread.c: New file.
8989         * progspace-and-thread.h: New file.
8990         * progspace.c (release_program_space, clone_program_space): Use
8991         scoped_restore_current_program_space.
8992         (restore_program_space, save_current_program_space)
8993         (save_current_space_and_thread): Delete.
8994         (switch_to_program_space_and_thread): Moved to
8995         progspace-and-thread.c.
8996         * progspace.h (save_current_program_space)
8997         (save_current_space_and_thread): Delete declarations.
8998         (scoped_restore_current_program_space): New class.
8999         * remote.c (remote_btrace_maybe_reopen): Use
9000         scoped_restore_current_thread.
9001         * symtab.c: Include "progspace-and-thread.h".
9002         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
9003         * thread.c (print_thread_info_1): Use
9004         scoped_restore_current_thread.
9005         (struct current_thread_cleanup): Delete.
9006         (do_restore_current_thread_cleanup)
9007         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
9008         (scoped_restore_current_thread::~scoped_restore_current_thread):
9009         ... this new dtor.
9010         (make_cleanup_restore_current_thread): Rename/convert to ...
9011         (scoped_restore_current_thread::scoped_restore_current_thread):
9012         ... this new ctor.
9013         (thread_apply_all_command): Use scoped_restore_current_thread.
9014         (thread_apply_command): Use scoped_restore_current_thread.
9015         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
9016         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
9017
9018 2017-05-04  Pedro Alves  <palves@redhat.com>
9019
9020         * thread.c (make_cleanup_restore_current_thread): Move
9021         find_thread_ptid call before the is_stopped call.  Assert that the
9022         thread is found.  Replace is_stopped call by checking the thread's
9023         state directly.  Remove unnecessary NULL-thread check.
9024
9025 2017-05-04  Pedro Alves  <palves@redhat.com>
9026
9027         * corelow.c (thread_section_name): New class.
9028         (get_core_register_section, get_core_siginfo): Use it.
9029
9030 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9031
9032         * corelow.c (sniff_core_bfd): Remove extra semicolon.
9033         (get_core_register_section): Remove xfree of NULL pointer.
9034
9035 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
9036
9037         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
9038         * regcache.c (regcache::raw_supply_zeroed): New function.
9039         * regcache.h (regcache::raw_supply_zeroed): New declaration.
9040
9041 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
9042
9043         * gdbarch.sh: Remove commented out definition of
9044         TARGET_CHAR_BIT.
9045         * gdbarch.h: Re-generate.
9046
9047 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
9048
9049         * configure: Regenerate.
9050
9051 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
9052
9053         * solib-target.c (solib_target_relocate_section_addresses):
9054         Remove num_section_bases, num_bases, segment_bases variables.
9055
9056 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9057
9058         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
9059
9060 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9061
9062         * solib-target.c: Include <vector>
9063         (struct lm_info_target) <~lm_info_target>: Remove.
9064         <segment_bases, section_bases>: Change type to
9065         std::vector<CORE_ADDR>.
9066         (library_list_start_segment, library_list_start_section,
9067         library_list_end_library,
9068         solib_target_relocate_section_addresses): Adjust.
9069
9070 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9071
9072         * gdbarch.sh (software_single_step): Change return type to
9073         std::vector<CORE_ADDR>.
9074         * gdbarch.c, gdbarch.h: Re-generate.
9075         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
9076         Adjust.
9077         (arm_deal_with_atomic_sequence_raw): Adjust.
9078         (thumb_get_next_pcs_raw): Adjust.
9079         (arm_get_next_pcs_raw): Adjust.
9080         (arm_get_next_pcs): Adjust.
9081         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
9082         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
9083         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
9084         (alpha_software_single_step): Adjust.
9085         * alpha-tdep.h (alpha_software_single_step): Adjust.
9086         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
9087         * arm-tdep.c (arm_software_single_step): Adjust.
9088         (arm_breakpoint_kind_from_current_state): Adjust.
9089         * arm-tdep.h (arm_software_single_step): Adjust.
9090         * breakpoint.c (insert_single_step_breakpoint): Adjust.
9091         * cris-tdep.c (cris_software_single_step): Adjust.
9092         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
9093         (micromips_deal_with_atomic_sequence): Adjust.
9094         (deal_with_atomic_sequence): Adjust.
9095         (mips_software_single_step): Adjust.
9096         * mips-tdep.h (mips_software_single_step): Adjust.
9097         * moxie-tdep.c (moxie_software_single_step): Adjust.
9098         * nios2-tdep.c (nios2_software_single_step): Adjust.
9099         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
9100         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
9101         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
9102         * s390-linux-tdep.c (s390_software_single_step): Adjust.
9103         * sparc-tdep.c (sparc_software_single_step): Adjust.
9104         * spu-tdep.c (spu_software_single_step): Adjust.
9105         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
9106
9107 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9108
9109         * gdbarch.sh: Use semi-colon as field separator instead of colon.
9110         * gdbarch.h: Re-generate.
9111
9112 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9113
9114         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
9115         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
9116         * python/py-instruction.c, python/py-instruction.h: New file.
9117         * python/py-record.c: Add py-instruction.h include.
9118         (gdbpy_initialize_record): Make gdb.Instruction a super class of
9119         gdb.RecordInstruction.
9120         * python/python-internal.h: Add gdbpy_initialize_instruction
9121         declaration.
9122         * python/python.c (do_start_initialization): Add
9123         gdbpy_initialize_instruction.
9124
9125 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9126
9127         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
9128         Remove.
9129         (btrace_func_from_recpy_func): New function.
9130         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
9131         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
9132         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
9133         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
9134         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
9135         Also, use new helper functions.
9136         (btpy_list_item): Use new helper functions.
9137         (recpy_bt_function_call_history): Use new type name.
9138         (btpy_call_getset): Remove.
9139         (gdbpy_initialize_btrace): Remove code to initialize
9140         gdb.BtraceFunctionCall.
9141         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
9142         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
9143         recpy_bt_func_prev, recpy_bt_func_next): New export.
9144         * python/py-record.c (recpy_func_type): New static object.
9145         (recpy_func_new, recpy_func_level, recpy_func_symbol,
9146         recpy_func_instructions, recpy_func_up, recpy_func_prev,
9147         recpy_func_next): New function.
9148         (recpy_element_hash, recpy_element_richcompare): Updated comment.
9149         (recpy_func_getset): New static object.
9150         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
9151         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
9152
9153 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9154
9155         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
9156         (btpy_object, btpy_insn_type, btpy_new): Remove.
9157         (btpy_list_object): Use gdb.RecordInstruction type instead of
9158         gdb.BtraceInstruction type.
9159         (btrace_insn_from_recpy_insn): New function.
9160         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
9161         btpy_new.
9162         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
9163         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
9164         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
9165         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
9166         instead of btpy_object.
9167         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9168         btpy_insn_data, btpy_insn_decode): Rename to ...
9169         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
9170         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
9171         recpy_bt_insn_decode): This.  Also, use new helper functions.
9172         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
9173         recpy_insn_type.
9174         (btpy_insn_getset): Remove.
9175         (gdbpy_initialize_btrace): Remove code to initialize
9176         gdb.BtraceInstruction.  Use recpy_element_object.
9177         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
9178         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
9179         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
9180         * python/py-record.c (recpy_insn_type): New static object.
9181         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
9182         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
9183         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
9184         New function.
9185         (recpy_insn_getset): New static object.
9186         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
9187         * python/py-record.h (recpy_element_object): New typedef.
9188         (recpy_insn_type, recpy_insn_new): New export.
9189
9190 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9191
9192         * py-record-btrace.c (btpy_insn_new): Removed.
9193         (btpy_insn_or_gap_new): New function.
9194         (btpy_insn_error): Removed.
9195         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9196         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
9197         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
9198         btpy_insn_or_gap_new instead of btpy_insn_new.
9199         (btpy_insn_getset): Remove btpy_insn_error.
9200         * py-record.c (recpy_gap_type): New static object.
9201         (recpy_gap_object): New typedef.
9202         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
9203         recpy_gap_reason_string): New function.
9204         (recpy_gap_getset): New static object.
9205         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
9206         * py-record.h (recpy_gap_new): New export.
9207
9208 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9209
9210         * python/py-record.c (recpy_ptid): Remove.
9211         (recpy_record_getset): Remove recpy_ptid.
9212
9213 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9214
9215         * btrace.c (btrace_fetch): Set inferior_ptid.
9216         * python/py-record-btrace.c: Add "py-record.h" include.
9217         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
9218         recpy_bt_end, recpy_bt_instruction_history,
9219         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
9220         in gdb.Record object instead of current ptid.
9221         * python/py-record.c: Include new "py-record.h" file.
9222         (recpy_record_object): Moved to py-record.h.
9223         * python/py-record.h: New file.
9224
9225 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9226
9227         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
9228         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
9229         indentation.
9230
9231 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
9232
9233         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
9234         the past maintainers section.
9235
9236 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9237
9238         * infcmd.c (get_return_value): Use regcache ctor, and remove
9239         cleanup.
9240
9241 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9242             Pedro Alves  <palves@redhat.com>
9243
9244         * regcache.c (regcache::regcache): New tag dispatch ctor.
9245         (do_cooked_read): Moved above.
9246         (regcache_dup): Use the tag dispatch ctor..
9247         * regcache.h (regcache): Declare ctor, delete copy ctor and
9248         assignment operator, remove friend regcache_dup.
9249
9250 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9251
9252         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
9253         call method save instead of regcache_cpy.
9254         * regcache.h (struct regcache): Make regcache_dup a friend.
9255
9256 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9257
9258         * regcache.c (struct regcache): Move to regcache.h
9259         (regcache::arch): New method.
9260         (regcache_get_ptid): Update.
9261         (get_regcache_arch): Call arch method.
9262         (get_regcache_aspace): Call method aspace.
9263         (register_buffer): Change it to method.
9264         (regcache_save): Change it to regcache::save.
9265         (regcache_restore): Likewise.
9266         (regcache_cpy_no_passthrough): Remove the declaration.
9267         (regcache_cpy): Call methods restore and cpy_no_passthrough.
9268         (regcache_cpy_no_passthrough): Change it to method
9269         cpy_no_passthrough.
9270         (regcache_register_status): Change it to method
9271         get_register_status.
9272         (regcache_invalidate): Change it to method invalidate.
9273         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
9274         (regcache_raw_update): Change it to method raw_update.
9275         (regcache_raw_read): Likewise.
9276         (regcache_raw_read_signed): Likewise.
9277         (regcache_raw_read_unsigned): Likewise.
9278         (regcache_raw_write_signed): Likewise.
9279         (regcache_raw_write_unsigned): Likewise.
9280         (regcache_cooked_read): Likewise.
9281         (regcache_cooked_read_value): Likewise.
9282         (regcache_cooked_read_signed): Likewise.
9283         (regcache_cooked_read_unsigned): Likewise.
9284         (regcache_cooked_write_signed): Likewise.
9285         (regcache_cooked_write_unsigned): Likewise.
9286         (regcache_raw_set_cached_value): Likewise.
9287         (regcache_raw_write): Likewise.
9288         (regcache_cooked_write): Likewise.
9289         (regcache_xfer_part): Likewise.
9290         (regcache_raw_read_part): Likewise.
9291         (regcache_raw_write_part): Likewise.
9292         (regcache_cooked_read_part): Likewise.
9293         (regcache_cooked_write_part): Likewise.
9294         (regcache_raw_supply): Likewise.
9295         (regcache_raw_collect): Likewise.
9296         (regcache_transfer_regset): Likewise.
9297         (regcache_supply_regset): Likewise.
9298         (regcache_collect_regset): Likewise.
9299         (regcache_debug_print_register): Likewise.
9300         (enum regcache_dump_what): Move it to regcache.h.
9301         (regcache_dump): Change it to method dump.
9302         * regcache.h (enum regcache_dump_what): New.
9303         (class regcache): New.
9304         * target.c (target_fetch_registers): Call method
9305         debug_print_register.
9306         (target_store_registers): Likewise.
9307
9308 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9309
9310         * windows-nat.c (struct lm_info_windows): Initialize field.
9311         (windows_make_so): Allocate lm_info_windows with new.
9312         (windows_free_so): Free lm_info_windows with delete.
9313
9314 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9315
9316         * solib-darwin.c (struct lm_info_darwin): Initialize field.
9317         (darwin_current_sos): Allocate lm_info_darwin with new, remove
9318         cleanup.
9319         (darwin_free_so): Free lm_info_darwin with delete.
9320
9321 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9322
9323         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
9324         <l_addr_p>: Change type to bool.
9325         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
9326         (svr4_free_so): Free lm_info_svr4 with delete.
9327         (svr4_copy_library_list): Replace memcpy with call to copy
9328         constructor.
9329         (library_list_start_library, svr4_default_sos): Allocate
9330         lm_info_svr4 with new.
9331
9332 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9333
9334         * solib-target.c (struct lm_info_target): Add destructor,
9335         initialize fields.
9336         <name>: Change type to std::string.
9337         (library_list_start_library): Allocate lm_info_target with new.
9338         (solib_target_free_library_list): Free lm_info_target with
9339         delete.
9340         (solib_target_current_sos): Adapt to std::string.
9341         (solib_target_free_so): Free lm_info_target with delete.
9342
9343 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9344
9345         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
9346         fields.
9347         (frv_current_sos): Allocate lm_info_frv with new.
9348         (frv_relocate_main_executable): Free lm_info_frv with delete,
9349         allocate with new.
9350         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
9351
9352 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9353
9354         * solib-frv.c (struct lm_info_frv): Fix indentation.
9355
9356 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9357
9358         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
9359         map field.
9360         (dsbt_current_sos): Allocate lm_info_dsbt with new.
9361         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
9362         and allocate with new.
9363         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
9364
9365 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9366
9367         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
9368         <filename, member_name>: Change type to std::string.
9369         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
9370         (library_list_start_library): Allocate lm_info_aix with new.
9371         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
9372         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
9373         with copy constructor.
9374
9375 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9376
9377         * solist.h (struct lm_info): Remove.
9378         (struct lm_info_base): New class.
9379         (struct so_list) <lm_info>: Change type to lm_info_base *.
9380         * nto-tdep.c (struct lm_info): Remove.
9381         (lm_addr): Adjust.
9382         * solib-aix.c (struct lm_info): Rename to ...
9383         (struct lm_info_aix): ... this.  Extend lm_info_base.
9384         (lm_info_p): Rename to ...
9385         (lm_info_aix_p): ... this, and adjust.
9386         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
9387         solib_aix_parse_libraries, library_list_start_library,
9388         solib_aix_free_library_list, solib_aix_parse_libraries,
9389         solib_aix_get_library_list,
9390         solib_aix_relocate_section_addresses, solib_aix_free_so,
9391         solib_aix_get_section_offsets,
9392         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
9393         Adjust.
9394         (struct solib_aix_inferior_data) <library_list>: Adjust.
9395         * solib-darwin.c (struct lm_info): Rename to ...
9396         (struct lm_info_darwin): ... this.  Extend lm_info_base.
9397         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
9398         * solib-dsbt.c (struct lm_info): Rename to ...
9399         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
9400         (struct dsbt_info) <main_executable_lm_info): Adjust.
9401         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
9402         dsbt_relocate_section_addresses): Adjust.
9403         * solib-frv.c (struct lm_info): Rename to ...
9404         (struct lm_info_frv): ... this.  Extend lm_info_base.
9405         (main_executable_lm_info): Adjust.
9406         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
9407         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
9408         find_canonical_descriptor_in_load_object,
9409         frv_fdpic_find_canonical_descriptor): Adjust.
9410         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
9411         to lm_info_svr4.
9412         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
9413         svr4_clear_so, svr4_copy_library_list,
9414         library_list_start_library, svr4_default_sos, svr4_read_so_list,
9415         svr4_current_sos, svr4_fetch_objfile_link_map,
9416         solist_update_incremental): Adjust.
9417         * solib-svr4.h (struct lm_info_svr4): Move here from
9418         solib-svr4.c.
9419         * solib-target.c (struct lm_info): Rename to ...
9420         (struct lm_info_target): ... this.  Extend lm_info_base.
9421         (lm_info_p): Rename to ...
9422         (lm_info_target_p): ... this.
9423         (solib_target_parse_libraries, library_list_start_segment,
9424         library_list_start_section, library_list_start_library,
9425         library_list_end_library, solib_target_free_library_list,
9426         solib_target_current_sos, solib_target_free_so,
9427         solib_target_relocate_section_addresses): Adjust.
9428         * windows-nat.c (struct lm_info): Rename to ...
9429         (struct lm_info_windows): ... this.  Extend lm_info_base.
9430         (windows_make_so, handle_load_dll, handle_unload_dll,
9431         windows_xfer_shared_libraries): Adjust.
9432
9433 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9434
9435         * solib-darwin.c (struct darwin_so_list): Remove.
9436         (darwin_current_sos): Allocate an so_list object instead of a
9437         darwin_so_list, separately allocate an lm_info object.
9438         (darwin_free_so): Free lm_info.
9439
9440 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
9441
9442         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
9443         with fprintf_filtered.
9444
9445 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9446
9447         * regcache.c (regcache::regcache): New function.
9448         (regcache::~regcache): New function.
9449         (regcache_xmalloc_1): Remove.
9450         (regcache_xmalloc): Call new regcache.
9451         (regcache_xfree): Call delete regcache.
9452         (get_thread_arch_aspace_regcache): Call new regcache.
9453
9454 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9455
9456         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
9457         lwp instead of ptid_get_lwp.
9458
9459 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9460
9461         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
9462         lwp_info instead of getting from inferior_ptid.
9463
9464 2017-04-27  Keith Seitz  <keiths@redhat.com>
9465
9466         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
9467         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
9468         (CV_CONVERSION_BADNESS): Define.
9469         (rank_one_type): Remove overly restrictive rvalue reference
9470         rank checks.
9471         Add cv-qualifier checks and subranks for type equality.
9472         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
9473         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
9474         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
9475
9476 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
9477
9478         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
9479         count when creating the object.
9480
9481 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
9482             Ulrich Weigand  <uweigand@de.ibm.com>
9483
9484         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
9485         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
9486         is used in AIX.
9487         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
9488         (process_xcoff_symbol): Likewise.
9489         (scan_xcoff_symtab): Likewise.
9490
9491 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9492
9493         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
9494         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
9495         (ia64_access_reg): Use get_frame_register_unsigned.
9496         (ia64_access_rse_reg): Likewise.
9497         (ia64_libunwind_frame_prev_register): Likewise.
9498
9499 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
9500
9501         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
9502         * gdbarch.c: Regenerated.
9503         * gdbarch.h: Regenerated.
9504         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
9505         visibility external.
9506         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
9507         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
9508         (enum cfa_how_kind): Move to ...
9509         (struct dwarf2_frame_state_reg_info): Likewise.
9510         (struct dwarf2_frame_state): Likewise.
9511         * dwarf2-frame.h: ... here.
9512         (dwarf2_frame_state_alloc_regs): New declaration.
9513         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
9514         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
9515
9516 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9517
9518         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
9519         regcache_raw_read_unsigned.
9520         (xtensa_pseudo_register_write): Likewise.
9521
9522 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9523
9524         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
9525         (nds32_pseudo_register_write): Likewise.
9526
9527 2017-04-25  Yao Qi  <yao.qi@linaro.org>
9528
9529         * regcache.c (struct regcache) <readonly_p>: Change its type
9530         to bool.
9531         (regcache_xmalloc_1): Update parameter type and callers update.
9532
9533 2017-04-25  Yao Qi  <yao.qi@linaro.org>
9534
9535         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
9536         set_gdbarch_wchar_bit.
9537         * arm-tdep.c (arm_gdbarch_init): Likewise.
9538
9539 2017-04-25  Pedro Alves  <palves@redhat.com>
9540
9541         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
9542         (BothAreRelocatable, memcopy, memmove): Don't define.
9543         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
9544         macros.
9545
9546 2017-04-25  Pedro Alves  <palves@redhat.com>
9547
9548         * common/common-defs.h: Include "common/poison.h".
9549         * common/function-view.h: (Not, Or, Requires): Move to traits.h
9550         and adjust.
9551         * common/poison.h: New file.
9552         * common/traits.h: Include <type_traits>.
9553         (Not, Or, Requires): New, moved from common/function-view.h.
9554
9555 2017-04-25  Pedro Alves  <palves@redhat.com>
9556
9557         * breakpoint.h (struct breakpoint): In-class initialize all
9558         fields.  Make boolean fields "bool".
9559         * breakpoint.c (init_raw_breakpoint_without_location): Remove
9560         memset call and initializations no longer necessary.
9561
9562 2017-04-25  Pedro Alves  <palves@redhat.com>
9563
9564         * btrace.c (pt_btrace_insn_flags): Change parameter type to
9565         reference.
9566         (pt_btrace_insn): New function.
9567         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
9568
9569 2017-04-25  Pedro Alves  <palves@redhat.com>
9570
9571         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
9572         "base" field and inherit from "bp_location" instead.  Add
9573         non-default ctor.
9574         (allocate_location_exception): Use new non-default ctor.
9575         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
9576         (init_bp_location): Convert to ...
9577         (bp_location::bp_location): ... this new ctor, and remove memset
9578         call.
9579         (base_breakpoint_allocate_location): Use the new non-default ctor.
9580         * breakpoint.h (bp_location): Now a class.  Declare default and
9581         non-default ctors.  In-class initialize all members.
9582         (init_bp_location): Remove declaration.
9583
9584 2017-04-25  Pedro Alves  <palves@redhat.com>
9585
9586         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
9587         assignment operator.
9588
9589 2017-04-24  Yao Qi  <yao.qi@linaro.org>
9590
9591         * doublest.c (convert_doublest_to_floatformat): Call
9592         floatformat_totalsize_bytes.
9593
9594 2017-04-22  Tom Tromey  <tom@tromey.com>
9595
9596         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
9597         ui_out_emit_list.
9598         * stack.c (print_frame): Use ui_out_emit_list.
9599         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9600         ui_out_emit_list.
9601         * mi/mi-main.c (print_one_inferior)
9602         (mi_cmd_data_list_register_names)
9603         (mi_cmd_data_list_register_values, mi_cmd_list_features)
9604         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
9605         ui_out_emit_list.
9606         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
9607         (mi_output_solib_attribs): Use ui_out_emit_list,
9608         ui_out_emit_tuple.
9609         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
9610         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
9611         (mi_cmd_stack_list_args, list_args_or_locals): Use
9612         ui_out_emit_list.
9613         * disasm.c (do_assembly_only): Use ui_out_emit_list.
9614         * breakpoint.c (print_solib_event, output_thread_groups): Use
9615         ui_out_emit_list.
9616
9617 2017-04-22  Tom Tromey  <tom@tromey.com>
9618
9619         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
9620         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
9621         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
9622
9623 2017-04-22  Tom Tromey  <tom@tromey.com>
9624
9625         * tracepoint.c (tvariables_info_1)
9626         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
9627
9628 2017-04-22  Tom Tromey  <tom@tromey.com>
9629
9630         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
9631         annotate_arg_emitter.
9632         * breakpoint.c (print_mention_watchpoint)
9633         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
9634         * annotate.h (struct annotate_arg_emitter): New.
9635
9636 2017-04-22  Tom Tromey  <tom@tromey.com>
9637
9638         * record-btrace.c (record_btrace_insn_history)
9639         (record_btrace_insn_history_range, record_btrace_call_history)
9640         (record_btrace_call_history_range): Use ui_out_emit_tuple.
9641         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
9642         ui_out_emit_tuple.
9643         * stack.c (print_frame_info): Use ui_out_emit_tuple.
9644         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
9645         * skip.c (skip_info): Use ui_out_emit_tuple.
9646         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
9647         * progspace.c (print_program_space): Use ui_out_emit_tuple.
9648         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
9649         * osdata.c (info_osdata): Use ui_out_emit_tuple.
9650         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9651         ui_out_emit_tuple.
9652         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
9653         (output_register, mi_cmd_data_read_memory)
9654         (mi_cmd_data_read_memory_bytes, mi_load_progress)
9655         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
9656         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
9657         Use ui_out_emit_tuple.
9658         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
9659         ui_out_emit_tuple.
9660         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9661         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
9662         * linux-thread-db.c (info_auto_load_libthread_db): Use
9663         ui_out_emit_tuple.
9664         * inferior.c (print_inferior): Use ui_out_emit_tuple.
9665         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
9666         * disasm.c (do_mixed_source_and_assembly_deprecated)
9667         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
9668         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
9669         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
9670         * breakpoint.c (print_one_breakpoint_location)
9671         (print_one_breakpoint): Use ui_out_emit_tuple.
9672         * auto-load.c (print_script, info_auto_load_cmd): Use
9673         ui_out_emit_tuple.
9674         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
9675
9676 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
9677
9678         * thread.c (print_thread_info_1): Remove dead code.
9679
9680 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
9681
9682         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
9683         GDB_SELF_TEST.
9684         * arm-tdep.c (selftests::arm_record_test): Likewise.
9685
9686 2017-04-21  Yao Qi  <yao.qi@linaro.org>
9687
9688         * regcache.c (regcache_restore): Remove argument 2.  Replace
9689         argument 3 with regcache.  Get register status from
9690         src->register_status and get register contents from
9691         register_buffer (src, regnum).
9692         (regcache_cpy): Update.
9693
9694 2017-04-19  Pedro Alves  <palves@redhat.com>
9695
9696         * gdbthread.h (thread): Add missing closing parenthesis in
9697         comment.
9698
9699 2017-04-19  Pedro Alves  <palves@redhat.com>
9700
9701         * common/refcounted-object.h: New file.
9702         * gdbthread.h: Include "common/refcounted-object.h".
9703         (thread_info): Inherit from refcounted_object and add comments.
9704         (thread_info::incref, thread_info::decref)
9705         (thread_info::m_refcount): Delete.
9706         (thread_info::deletable): Use the refcounted_object::refcount()
9707         method.
9708         * inferior.c (current_inferior_): Add comment.
9709         (set_current_inferior): Increment/decrement refcounts.
9710         (prune_inferiors, remove_inferior_command): Skip inferiors marked
9711         not-deletable instead of comparing with the current inferior.
9712         (initialize_inferiors): Increment the initial inferior's refcount.
9713         * inferior.h (struct inferior): Forward declare.
9714         Include "common/refcounted-object.h".
9715         (current_inferior, set_current_inferior): Move declaration to
9716         before struct inferior's definition, and fix comment.
9717         (inferior): Inherit from refcounted_object.  Add comments.
9718         * thread.c (switch_to_thread_no_regs): Reference the thread's
9719         inferior pointer directly instead of doing a ptid lookup.
9720         (switch_to_no_thread): New function.
9721         (switch_to_thread(thread_info *)): New function, factored out
9722         from ...
9723         (switch_to_thread(ptid_t)): ... this.
9724         (restore_current_thread): Delete.
9725         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
9726         fields, and add 'inf' field.
9727         (do_restore_current_thread_cleanup): Check whether old->inf is
9728         alive instead of looking up an inferior by ptid.  Use
9729         switch_to_thread and switch_to_no_thread.
9730         (restore_current_thread_cleanup_dtor): Use old->inf directly
9731         instead of lookup up an inferior by id.  Decref the inferior.
9732         Don't restore 'removable'.
9733         (make_cleanup_restore_current_thread): Same the inferior pointer
9734         in old, instead of the inferior number.  Incref the inferior.
9735         Don't save/clear 'removable'.
9736
9737 2017-04-19  Pedro Alves  <palves@redhat.com>
9738
9739         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9740         unittests/scoped_restore-selftests.c.
9741         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
9742         * common/scoped_restore.h (scoped_restore_base): Make "class".
9743         (scoped_restore_base::release): New public method.
9744         (scoped_restore_base::scoped_restore_base): New protected ctor.
9745         (scoped_restore_base::m_saved_var): New protected field.
9746         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
9747         scoped_restore_base base class instead of m_saved_var directly.
9748         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
9749         (scoped_restore_tmpl::scoped_restore_tmpl(const
9750         scoped_restore_tmpl<T>&)): Likewise.
9751         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
9752         method.
9753         (scoped_restore_tmpl::saved_var): New method.
9754         (scoped_restore_tmpl::m_saved_var): Delete.
9755         * inferior.h (inferior::detaching): Now a bool.
9756         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
9757         cleanup.
9758         * unittests/scoped_restore-selftests.c: New file.
9759
9760 2017-04-19  Pedro Alves  <palves@redhat.com>
9761
9762         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
9763         Re-sort in alphabetic order.
9764
9765 2017-04-18  Pedro Alves  <palves@redhat.com>
9766
9767         * xml-support.c (obstack_xml_printf): Delete.
9768         * xml-support.h (obstack_xml_printf): Delete.
9769
9770 2017-04-18  Pedro Alves  <palves@redhat.com>
9771
9772         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
9773         vdebug, verror, body_text, start_element, end_element, name,
9774         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
9775         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
9776         is_xinclude>: Make private and add m_ prefix.
9777         (gdb_xml_parser::body_text): New method, based on ...
9778         (gdb_xml_body_text): ... this.  Adjust.
9779         (gdb_xml_parser::vdebug): New method, based on ...
9780         (gdb_xml_debug): ... this.  Adjust.
9781         (gdb_xml_parser::verror): New method, based on ...
9782         (gdb_xml_error): ... this.  Adjust.
9783         (gdb_xml_parser::start_element): New method, based on ...
9784         (gdb_xml_start_element): ... this.  Adjust.
9785         (gdb_xml_start_element_wrapper): Defer to
9786         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
9787         (gdb_xml_parser::end_element): New method, based on ...
9788         (gdb_xml_end_element_wrapper): ... this.  Adjust.
9789         (gdb_xml_parser::~gdb_xml_parser): Adjust.
9790         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
9791         (gdb_xml_parser::use_dtd): New method, based on ...
9792         (gdb_xml_use_dtd): ... this.  Adjust.
9793         (gdb_xml_parser::parse): New method, based on ...
9794         (gdb_xml_parse): ... this.  Adjust.
9795         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
9796         (xinclude_start_include): Adjust to call the parser's name method.
9797         (xml_xinclude_default, xml_xinclude_start_doctype)
9798         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
9799         method.
9800         (xml_process_xincludes): Adjust to call parser methods.
9801         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
9802         declarations.
9803
9804 2017-04-18  Pedro Alves  <palves@redhat.com>
9805
9806         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
9807         gdb::optional<std::string>.
9808         * xml-support.c: Include <string>.
9809         (scope_level::scope_level(scope_level &&))
9810         (scope_level::~scope_level): Delete.
9811         (scope_level::body): Now a std::string.
9812         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
9813         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
9814         parameter.
9815         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
9816         (xinclude_parsing_data::output): Now a std::string reference.
9817         (xinclude_start_include): Adjust.
9818         (xml_xinclude_default): Adjust.
9819         (xml_process_xincludes): Add 'output' parameter, and return bool.
9820         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
9821         and return bool.
9822         * xml-tdesc.c: Include <unordered_map> and <string>.
9823         (tdesc_xml_cache): Delete.
9824         (tdesc_xml_cache_s): Delete.
9825         (xml_cache): Now an std::unordered_map.
9826         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
9827         (target_fetch_description_xml): Change return type to
9828         gdb::optional<std::string>, and adjust.
9829         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
9830         (target_fetch_description_xml): Change return type to
9831         gdb::optional<std::string>.
9832
9833 2017-04-18  Pedro Alves  <palves@redhat.com>
9834
9835         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9836         unittests/optional-selftests.c.
9837         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
9838         * unittests/optional-selftests.c: New file.
9839         * unittests/optional/assignment/1.cc: New file.
9840         * unittests/optional/assignment/2.cc: New file.
9841         * unittests/optional/assignment/3.cc: New file.
9842         * unittests/optional/assignment/4.cc: New file.
9843         * unittests/optional/assignment/5.cc: New file.
9844         * unittests/optional/assignment/6.cc: New file.
9845         * unittests/optional/assignment/7.cc: New file.
9846         * unittests/optional/cons/copy.cc: New file.
9847         * unittests/optional/cons/default.cc: New file.
9848         * unittests/optional/cons/move.cc: New file.
9849         * unittests/optional/cons/value.cc: New file.
9850         * unittests/optional/in_place.cc: New file.
9851         * unittests/optional/observers/1.cc: New file.
9852         * unittests/optional/observers/2.cc: New file.
9853
9854 2017-04-18  Pedro Alves  <palves@redhat.com>
9855
9856         * common/gdb_optional.h: Include common/traits.h.
9857         (in_place_t): New type.
9858         (in_place): New constexpr variable.
9859         (optional::optional): Remove member initialization of
9860         m_instantiated.
9861         (optional::optional(in_place_t...)): New constructor.
9862         (optional::~optional): Use reset.
9863         (optional::optional(const optional&)): New.
9864         (optional::optional(const optional&&)): New.
9865         (optional::optional(T &)): New.
9866         (optional::optional(T &&)): New.
9867         (operator::operator=(const optional &)): New.
9868         (operator::operator=(optional &&)): New.
9869         (operator::operator= (const T &))
9870         (operator::operator= (T &&))
9871         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
9872         (operator::reset): New.
9873         (operator::m_instantiated):: Add in-class initializer.
9874         * common/traits.h: Include <type_traits>.
9875         (struct And): New types.
9876
9877 2017-04-18  Pedro Alves  <palves@redhat.com>
9878
9879         * xml-support.c: Include <vector>.
9880         (scope_level::scope_level(const gdb_xml_element *))
9881         (scope_level::scope_level(scope_level&&)): New.
9882         (scope_level::~scope_level): New.
9883         (scope_level_s): Delete.
9884         (gdb_xml_parser::scopes): Now a std::vector.
9885         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
9886         Use std::vector.
9887         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
9888         scope cleanup code.
9889         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
9890         of the scopes member.  Use std::vector::emplace_back.
9891
9892 2017-04-18  Pedro Alves  <palves@redhat.com>
9893
9894         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
9895         a bool.
9896         (gdb_xml_end_element): Change type of first parameter.
9897         (gdb_xml_cleanup): Rename to ...
9898         (gdb_xml_parser::~gdb_xml_parser): ... this.
9899         (gdb_xml_create_parser_and_cleanup): Delete with ...
9900         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
9901         to this new ctor.
9902         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
9903         using gdb_xml_create_parser_and_cleanup.
9904         (xinclude_parsing_data): Add ctor/dtor.
9905         (xml_xinclude_cleanup): Delete.
9906         (xml_process_xincludes): Create a local xinclude_parsing_data
9907         instead of heap-allocating one.  Create a local gdb_xml_parser
9908         instead of heap-allocating one with
9909         gdb_xml_create_parser_and_cleanup.
9910
9911 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
9912
9913         PR threads/20743
9914         * fbsd-nat.c (resume_one_thread_cb): Remove.
9915         (resume_all_threads_cb): Remove.
9916         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
9917         iterate_over_threads.
9918
9919 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
9920
9921         * NEWS: Create a new section for the next release branch.
9922         Rename the section of the current branch, now that it has
9923         been cut.
9924
9925 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
9926
9927         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
9928         * version.in: Bump version to 8.0.50.DATE-git.
9929
9930 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
9931
9932         PR gdb/21385
9933         * windows-nat.c (windows_create_inferior): Declare 'allargs'
9934         independently of the host, and fix build breakage on Cygwin.
9935
9936 2017-04-13  Pedro Alves  <palves@redhat.com>
9937
9938         * inferior.c (free_inferior): Convert to ...
9939         (inferior::~inferior): ... this dtor.
9940         (inferior::inferior): New ctor, factored out from ...
9941         (add_inferior_silent): ... here.  Allocate the inferior with a new
9942         expression.
9943         (delete_inferior): Call delete instead of free_inferior.
9944         * inferior.h (gdb_environ, continuation): Forward declare.
9945         (inferior): Now a class.  Add in-class initialization to all
9946         members.  Make boolean fields bool, except 'detaching'.
9947         (inferior::inferior): New explicit ctor.
9948         (inferior::~inferior): New.
9949
9950 2017-04-13  Pedro Alves  <palves@redhat.com>
9951
9952         * inferior.c (init_inferior_list): Delete.
9953         * inferior.h (init_inferior_list): Delete.
9954
9955 2017-04-13  Pedro Alves  <palves@redhat.com>
9956
9957         PR threads/13217
9958         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
9959         (top level): Call it twice, with different thread sets.
9960
9961 2017-04-13  Pedro Alves  <palves@redhat.com>
9962
9963         * thread.c: Include <algorithm>.
9964         (thread_array_cleanup): Delete.
9965         (scoped_inc_dec_ref): New class.
9966         (live_threads_count): New function.
9967         (set_thread_refcount): Delete.
9968         (tp_array_compar_ascending): Now a bool.
9969         (tp_array_compar): Convert to a std::sort comparison function.
9970         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
9971         and live_threads_count.
9972
9973 2017-04-13  Pedro Alves  <palves@redhat.com>
9974
9975         * infrun.c (follow_fork_inferior): Also switch the current
9976         inferior.
9977
9978 2017-04-13  Pedro Alves  <palves@redhat.com>
9979
9980         * breakpoint.c (watch_command_1): Save watchpoint-frame info
9981         before calling create_internal_breakpoint.
9982
9983 2017-04-13  Pedro Alves  <palves@redhat.com>
9984
9985         * fork-child.c (execv_argv): New class.
9986         (breakup_args): Refactored as ...
9987         (execv_argv::init_for_no_shell): .. this method of execv_argv.
9988         Copy arguments to storage and replace separators with NULL
9989         terminators in place.
9990         (escape_bang_in_quoted_argument): Adjust to return bool.
9991         (execv_argv::execv_argv): New ctor.
9992         (execv_argv::init_for_shell): New method, factored out from
9993         fork_inferior.  Don't strdup strings into the vector.
9994         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
9995         Remove free_vector_argv call.
9996
9997 2017-04-13  Yao Qi  <yao.qi@linaro.org>
9998
9999         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
10000         tdep->rx_psw_type.
10001
10002 2017-04-13  Yao Qi  <yao.qi@linaro.org>
10003
10004         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
10005         * rx-tdep.c (rx_gdbarch_init): Likewise.
10006
10007 2017-04-13  Pedro Alves  <palves@redhat.com>
10008
10009         * breakpoint.h (struct breakpoint): Reindent.
10010
10011 2017-04-13  Pedro Alves  <palves@redhat.com>
10012
10013         * breakpoint.c (bp_location): Rename to ...
10014         (bp_locations): ... this.  All references updated.
10015         (bp_location_count): Rename to ...
10016         (bp_locations_count): ... this.  All references updated.
10017         (bp_location_placed_address_before_address_max): Rename to ...
10018         (bp_locations_placed_address_before_address_max): ... this.  All
10019         references updated.
10020         (bp_location_shadow_len_after_address_max): Rename to ...
10021         (bp_locations_shadow_len_after_address_max): ... this.  All
10022         references updated.
10023         (bp_location_compare_addrs): Rename to ...
10024         (bp_locations_compare_addrs): ... this.  All references updated.
10025         (bp_location_compare):Rename to ...
10026         (bp_locations_compare): ... this.  All references updated.
10027         (bp_location_target_extensions_update): Rename to ...
10028         (bp_locations_target_extensions_update): ... this.  All references
10029         updated.
10030
10031 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10032
10033         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
10034         * common/common.m4: Check headers 'termios.h', 'termio.h' and
10035         'sgtty.h'.
10036         * common/gdb_termios.h: New file, with parts of "terminal.h".
10037         * inflow.c: Include "gdb_termios.h".
10038         * ser-unix.c: Include "gdb_termios.h".
10039         * terminal.h: Move terminal-related defines to
10040         "common/gdb_termios.h".
10041
10042 2017-04-12  Tom Tromey  <tom@tromey.com>
10043
10044         * probe.c (parse_probes): Update.
10045         * location.h (delete_event_location): Don't declare.
10046         (event_location_deleter::operator()): Update.
10047         * location.c (event_location_deleter::operator()): Rename from
10048         delete_event_location.
10049         * linespec.h (linespec_result) <location>: Change type to
10050         event_location_up.
10051         * linespec.c (canonicalize_linespec, event_location_to_sals)
10052         (decode_objc): Update.
10053         (linespec_result): Don't call delete_event_location.
10054         * breakpoint.c (create_breakpoints_sal)
10055         (bkpt_probe_create_sals_from_location)
10056         (strace_marker_create_sals_from_location): Update.
10057
10058 2017-04-12  Tom Tromey  <tom@tromey.com>
10059
10060         * linespec.h (struct linespec_result): Add constructor and
10061         destructor.
10062         (init_linespec_result, destroy_linespec_result)
10063         (make_cleanup_destroy_linespec_result): Don't declare.
10064         * linespec.c (init_linespec_result): Remove.
10065         (linespec_result::~linespec_result): Rename from
10066         destroy_linespec_result.  Update.
10067         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
10068         Remove.
10069         * breakpoint.c (create_breakpoint, break_range_command)
10070         (decode_location_default): Update.
10071         * ax-gdb.c (agent_command_1): Update.
10072
10073 2017-04-12  Tom Tromey  <tom@tromey.com>
10074
10075         * remote.c (remote_download_tracepoint): Update.
10076         * python/py-breakpoint.c (bppy_get_location): Update.
10077         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
10078         (gdbscm_breakpoint_location): Update.
10079         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
10080         * breakpoint.h (struct breakpoint) <location, location_range_end>:
10081         Change type to event_location_up.
10082         * breakpoint.c (create_overlay_event_breakpoint)
10083         (create_longjmp_master_breakpoint)
10084         (create_std_terminate_master_breakpoint)
10085         (create_exception_master_breakpoint)
10086         (breakpoint_event_location_empty_p, print_breakpoint_location)
10087         (print_one_breakpoint_location, create_thread_event_breakpoint)
10088         (init_breakpoint_sal, create_breakpoint)
10089         (print_recreate_ranged_breakpoint, break_range_command)
10090         (init_ada_exception_breakpoint, say_where): Update.
10091         (base_breakpoint_dtor): Don't call delete_event_location.
10092         (bkpt_print_recreate, tracepoint_print_recreate)
10093         (dprintf_print_recreate, update_static_tracepoint)
10094         (breakpoint_re_set_default): Update.
10095
10096 2017-04-12  Tom Tromey  <tom@tromey.com>
10097
10098         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
10099         type of "to_do".  Update.
10100         (compute_stack_depth): Use std::vector.
10101
10102 2017-04-12  Tom Tromey  <tom@tromey.com>
10103
10104         * printcmd.c (find_instruction_backward): Use std::vector.
10105
10106 2017-04-12  Tom Tromey  <tom@tromey.com>
10107
10108         * symfile.c (objfilep): Remove typedef.
10109         (reread_symbols): Use a std::vector.
10110
10111 2017-04-12  Tom Tromey  <tom@tromey.com>
10112
10113         * mi/mi-main.c (exec_direction_forward): Remove.
10114         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
10115         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
10116         scoped_restore.
10117         * guile/guile.c (guile_repl_command, guile_command)
10118         (gdbscm_execute_gdb_command): Use scoped_restore.
10119         * go-exp.y (go_parse): Use scoped_restore.
10120         * d-exp.y (d_parse): Use scoped_restore.
10121         * cli/cli-decode.c (cmd_func): Use scoped_restore.
10122         * c-exp.y (c_parse): Use scoped_restore.
10123
10124 2017-04-12  Tom Tromey  <tom@tromey.com>
10125
10126         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
10127         (mi_parse): Update return type.
10128         (mi_parse_free): Remove.
10129         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
10130         (mi_parse::~mi_parse): Rename from mi_parse_free.
10131         (mi_parse_cleanup): Remove.
10132         (mi_parse): Return a unique_ptr.  Use new.
10133         * mi/mi-main.c (mi_execute_command): Update.
10134
10135 2017-04-12  Tom Tromey  <tom@tromey.com>
10136
10137         * location.c (explicit_location_lex_one): Return a
10138         unique_xmalloc_ptr.
10139         (string_to_explicit_location): Update.  Remove cleanups.
10140
10141 2017-04-12  Tom Tromey  <tom@tromey.com>
10142
10143         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
10144         (compare_value_and_voffset): Change type.  Update.
10145         (compute_vtable_size): Change type of "offset_vec".
10146         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
10147         (gnuv3_get_typeid): Remove extraneous declaration.
10148
10149 2017-04-12  Tom Tromey  <tom@tromey.com>
10150
10151         * charset.h (wchar_iterator): Fix comment.
10152
10153 2017-04-12  Tom Tromey  <tom@tromey.com>
10154
10155         * charset.c (iconv_wrapper): New class.
10156         (cleanup_iconv): Remove.
10157         (convert_between_encodings): Use it.
10158
10159 2017-04-12  Tom Tromey  <tom@tromey.com>
10160
10161         * symfile.h (increment_reading_symtab): Update type.
10162         * symfile.c (decrement_reading_symtab): Remove.
10163         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
10164         * psymtab.c (psymtab_to_symtab): Update.
10165         * dwarf2read.c (dw2_instantiate_symtab): Update.
10166
10167 2017-04-12  Tom Tromey  <tom@tromey.com>
10168
10169         * jit.c (struct jit_reader): Declare separately.  Add constructor
10170         and destructor.  Change type of "handle".
10171         (loaded_jit_reader): Define separately.
10172         (jit_reader_load): Update.  New "new".
10173         (jit_reader_unload_command): Use "delete".
10174         * gdb-dlfcn.h (struct dlclose_deleter): New.
10175         (gdb_dlhandle_up): New typedef.
10176         (gdb_dlopen, gdb_dlsym): Update types.
10177         (gdb_dlclose): Remove.
10178         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
10179         (gdb_dlsym): Change type of "handle".
10180         (make_cleanup_dlclose): Remove.
10181         (dlclose_deleter::operator()): Rename from gdb_dlclose.
10182         * compile/compile-c-support.c (load_libcc): Update.
10183
10184 2017-04-12  Tom Tromey  <tom@tromey.com>
10185
10186         * symtab.h (find_pcs_for_symtab_line): Change return type.
10187         * symtab.c (find_pcs_for_symtab_line): Change return type.
10188         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
10189         type of "vec".  Update.
10190         (ltpy_get_pcs_for_line): Update.
10191         * linespec.c (decode_digits_ordinary): Update.
10192
10193 2017-04-12  Tom Tromey  <tom@tromey.com>
10194
10195         * tracepoint.c (actions_command): Update.
10196         * python/python.c (python_command, python_interactive_command):
10197         Update.
10198         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10199         * guile/guile.c (guile_command): Update.
10200         * defs.h (read_command_lines, read_command_lines_1): Return
10201         command_line_up.
10202         (command_lines_deleter): New struct.
10203         (command_line_up): New typedef.
10204         * compile/compile.c (compile_code_command)
10205         (compile_print_command): Update.
10206         * cli/cli-script.h (get_command_line, copy_command_lines): Return
10207         command_line_up.
10208         (make_cleanup_free_command_lines): Remove.
10209         * cli/cli-script.c (get_command_line, read_command_lines_1)
10210         (copy_command_lines): Return command_line_up.
10211         (while_command, if_command, read_command_lines, define_command)
10212         (document_command): Update.
10213         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
10214         Remove.
10215         * breakpoint.h (breakpoint_set_commands): Change type of
10216         "commands".
10217         * breakpoint.c (breakpoint_set_commands): Change type of
10218         "commands".  Update.
10219         (do_map_commands_command, update_dprintf_command_list)
10220         (create_tracepoint_from_upload): Update.
10221
10222 2017-04-12  Tom Tromey  <tom@tromey.com>
10223
10224         * tracepoint.c (scope_info): Update.
10225         * spu-tdep.c (spu_catch_start): Update.
10226         * python/python.c (gdbpy_decode_line): Update.
10227         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
10228         * python/py-breakpoint.c (bppy_init): Update.
10229         * probe.c (parse_probes): Update.
10230         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
10231         * location.h (event_location_deleter): New struct.
10232         (event_location_up): New typedef.
10233         (new_linespec_location, new_address_location, new_probe_location)
10234         (new_explicit_location, copy_event_location)
10235         (string_to_event_location, string_to_event_location_basic)
10236         (string_to_explicit_location): Update return type.
10237         (make_cleanup_delete_event_location): Remove.
10238         * location.c (new_linespec_location, new_address_location)
10239         (new_probe_location, new_explicit_location, copy_event_location):
10240         Return event_location_up.
10241         (delete_event_location_cleanup)
10242         (make_cleanup_delete_event_location): Remove.
10243         (string_to_explicit_location, string_to_event_location_basic)
10244         (string_to_event_location): Return event_location_up.
10245         * linespec.c (canonicalize_linespec, event_location_to_sals)
10246         (decode_line_with_current_source)
10247         (decode_line_with_last_displayed, decode_objc): Update.
10248         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
10249         * completer.c (location_completer): Update.
10250         * cli/cli-cmds.c (edit_command, list_command): Update.
10251         * breakpoint.c (create_overlay_event_breakpoint)
10252         (create_longjmp_master_breakpoint)
10253         (create_std_terminate_master_breakpoint)
10254         (create_exception_master_breakpoint)
10255         (create_thread_event_breakpoint): Update.
10256         (init_breakpoint_sal): Update.  Remove some dead code.
10257         (create_breakpoint_sal): Change type of "location".  Update.
10258         (create_breakpoints_sal, create_breakpoint, break_command_1)
10259         (dprintf_command, break_range_command, until_break_command)
10260         (init_ada_exception_breakpoint)
10261         (strace_marker_create_sals_from_location)
10262         (update_static_tracepoint, trace_command, ftrace_command)
10263         (strace_command, create_tracepoint_from_upload): Update.
10264         * break-catch-throw.c (re_set_exception_catchpoint): Update.
10265         * ax-gdb.c (agent_command_1): Update.
10266
10267 2017-04-12  Pedro Alves  <palves@redhat.com>
10268
10269         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
10270         * configure.tgt: Handle i[34567]86-*-go32* and
10271         i[34567]86-*-msdosdjgpp*.
10272         * i386-tdep.c (i386_svr4_reg_to_regnum):
10273         Make extern.
10274         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
10275         i386-go32-tdep.c.
10276         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
10277         * i386-go32-tdep.c: New file.
10278         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
10279         declarations.
10280
10281 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
10282
10283         * aix-thread.c (pd_status2str): Change return type to const char *.
10284
10285 2017-04-12  Pedro Alves  <palves@redhat.com>
10286
10287         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
10288         calls to set_gdbarch_gnu_triplet_regexp.
10289
10290 2017-04-12  Pedro Alves  <palves@redhat.com>
10291
10292         PR gdb/21323
10293         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
10294         New enum value.
10295         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
10296         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
10297         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
10298         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
10299         * gdbarch.h, gdbarch.c: Regenerate.
10300         * aarch64-tdep.c (aarch64_gdbarch_init): Override
10301         gdbarch_wchar_bit and gdbarch_wchar_signed.
10302         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
10303         * arm-tdep.c (arm_gdbarch_init): Likewise.
10304         * avr-tdep.c (avr_gdbarch_init): Likewise.
10305         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
10306         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
10307         * i386-tdep.c (i386_go32_init_abi): Likewise.
10308         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10309         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10310         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10311         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10312         * sh-tdep.c (sh_gdbarch_init): Likewise.
10313         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10314         * sparc64-tdep.c (sparc64_init_abi): Likewise.
10315         * windows-tdep.c (windows_init_abi): Likewise.
10316         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10317
10318 2017-04-12  Pedro Alves  <palves@redhat.com>
10319
10320         PR c++/21323
10321         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
10322         cplus_primitive_type_char32_t>: New enum values.
10323         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
10324         and cplus_primitive_type_char32_t.
10325         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
10326         32, use the archtecture's built-in type for char16_t and char32_t,
10327         respectively.  Otherwise, fallback to init_integer_type as before,
10328         but make the type unsigned, and issue a complaint.
10329         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
10330
10331 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
10332
10333         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
10334         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
10335
10336 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10337
10338         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
10339         'const char *'.
10340
10341 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10342
10343         * common/common-utils.c (free_vector_argv): New function.
10344         * common/common-utils.h: Include <vector>.
10345         (free_vector_argv): New prototype.
10346         * darwin-nat.c (darwin_create_inferior): Rewrite function
10347         prototype in order to constify "exec_file" and accept a
10348         "std::string" for "allargs".
10349         * fork-child.c: Include <vector>.
10350         (breakup_args): Rewrite function, using C++.
10351         (fork_inferior): Rewrite function header, constify "exec_file_arg"
10352         and accept "std::string" for "allargs".  Update the code to
10353         calculate "argv" based on "allargs".  Update calls to "exec_fun"
10354         and "execvp".
10355         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
10356         order to constify "exec_file" and accept a "std::string" for
10357         "allargs".
10358         * go32-nat.c (go32_create_inferior): Likewise.
10359         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
10360         * infcmd.c (run_command_1): Constify "exec_file".  Use
10361         "std::string" for inferior arguments.
10362         * inferior.h (fork_inferior): Update prototype.
10363         * linux-nat.c (linux_nat_create_inferior): Rewrite function
10364         prototype in order to constify "exec_file" and accept a
10365         "std::string" for "allargs".
10366         * nto-procfs.c (procfs_create_inferior): Likewise.
10367         * procfs.c (procfs_create_inferior): Likewise.
10368         * remote-sim.c (gdbsim_create_inferior): Likewise.
10369         * remote.c (extended_remote_run): Update code to accept
10370         "std::string" as argument.
10371         (extended_remote_create_inferior): Rewrite function prototype in
10372         order to constify "exec_file" and accept a "std::string" for
10373         "allargs".
10374         * rs6000-nat.c (super_create_inferior): Likewise.
10375         (rs6000_create_inferior): Likewise.
10376         * target.h (struct target_ops) <to_create_inferior>: Likewise.
10377         * windows-nat.c (windows_create_inferior): Likewise.
10378
10379 2017-04-11  Pedro Alves  <palves@redhat.com>
10380
10381         * thread.c: Fix whitespace throughout.
10382
10383 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10384
10385         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
10386
10387 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
10388
10389         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
10390
10391 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
10392
10393         PR gdb/21364
10394         * osdata.c (info_osdata): Check if 'type' is an empty string
10395         instead of NULL.
10396
10397 2017-04-10  Pedro Alves  <palves@redhat.com>
10398
10399         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
10400         (ptid_to_global_thread_id, in_thread_list)
10401         (do_captured_list_thread_ids, set_resumed, set_running)
10402         (set_executing, set_stop_requested, finish_thread_state)
10403         (validate_registers_access, can_access_registers_ptid)
10404         (print_thread_info_1, switch_to_thread)
10405         (do_restore_current_thread_cleanup)
10406         (make_cleanup_restore_current_thread, thread_command)
10407         (thread_name_command): Use operator== instead of ptid_equal.
10408
10409 2017-04-10  Pedro Alves  <palves@redhat.com>
10410
10411         * thread.c (struct current_thread_cleanup) <next>: Delete field.
10412         (current_thread_cleanup_chain): Delete.
10413         (restore_current_thread_cleanup_dtor)
10414         (make_cleanup_restore_current_thread): Remove references to
10415         current_thread_cleanup_chain.
10416
10417 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
10418
10419         * msp430-tdep.c (msp430_pseudo_register_read): Never return
10420         REG_UNKNOWN.
10421
10422 2017-04-10  Yao Qi  <yao.qi@linaro.org>
10423
10424         PR gdb/19942
10425         * gdbthread.h (thread_info::deletable): New method.
10426         (thread_info::incref): New method.
10427         (thread_info::decref): New method.
10428         (thread_info::refcount): Move it to private.
10429         * infrun.c (save_stop_context): Call inc_refcount.
10430         (release_stop_context_cleanup): Likewise.
10431         * thread.c (set_thread_exited): New function.
10432         (init_thread_list): Delete "tp" only it is deletable, otherwise
10433         call set_thread_exited.
10434         (delete_thread_1): Call set_thread_exited.
10435         (current_thread_cleanup) <inferior_pid>: Remove.
10436         <thread>: New field.
10437         (restore_current_thread_ptid_changed): Removed.
10438         (do_restore_current_thread_cleanup): Adjust.
10439         (restore_current_thread_cleanup_dtor): Don't call
10440         find_thread_ptid.
10441         (set_thread_refcount): Use dec_refcount.
10442         (make_cleanup_restore_current_thread): Adjust.
10443         (thread_apply_all_command): Call inc_refcount.
10444         (_initialize_thread): Don't call
10445         observer_attach_thread_ptid_changed.
10446
10447 2017-04-10  Yao Qi  <yao.qi@linaro.org>
10448
10449         * thread.c (delete_thread_1): Hoist code on marking thread as
10450         exited.
10451
10452 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10453
10454         * windows-nat.c (windows_detach): Initialize ptid with
10455         minus_one_ptid.
10456
10457 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10458
10459         * unittests/ptid-selftests.c: Fix erroneous assert messages.
10460
10461 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
10462
10463         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
10464         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
10465         (bfin_pseudo_register_write): Likewise
10466
10467 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
10468
10469         * common/ptid.h (struct ptid): Change to...
10470         (class ptid_t): ... this.
10471         <ptid_t>: New constructors.
10472         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
10473         matches>: New methods.
10474         <make_null, make_minus_one>: New static methods.
10475         <pid>: Rename to...
10476         <m_pid>: ...this.
10477         <lwp>: Rename to...
10478         <m_lwp>: ...this.
10479         <tid>: Rename to...
10480         <m_tid>: ...this.
10481         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
10482         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
10483         as references, move comment to class ptid_t.
10484         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
10485         ptid_t static methods.
10486         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
10487         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
10488         Take ptid arguments as references, implement using ptid_t methods.
10489         * unittests/ptid-selftests.c: New file.
10490         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10491         unittests/ptid-selftests.c.
10492         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
10493
10494 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
10495
10496         * python/python.c (python_run_simple_file): Cast mode literal to
10497         non-const char pointer as expected by PyFile_FromString.
10498
10499 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
10500
10501         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
10502         minus_one_ptid and null_ptid.
10503
10504 2017-04-05  Pedro Alves  <palves@redhat.com>
10505
10506         * warning.m4 (build_warnings): Remove -Wno-write-strings.
10507         * configure: Regenerate.
10508
10509 2017-04-05  Pedro Alves  <palves@redhat.com>
10510
10511         * ada-exp.y (yyerror): Constify.
10512         * ada-lang.c (bound_name, get_selections)
10513         (ada_variant_discrim_type)
10514         (ada_variant_discrim_name, ada_value_struct_elt)
10515         (ada_lookup_struct_elt_type, is_unchecked_variant)
10516         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
10517         (catch_ada_exception_command_split)
10518         (catch_ada_assert_command_split, catch_assert_command)
10519         (ada_op_name): Constify.
10520         * ada-lang.h (ada_yyerror, get_selections)
10521         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
10522         * arc-tdep.c (arc_print_frame_cache): Constify.
10523         * arm-tdep.c (arm_skip_stub): Constify.
10524         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
10525         (gen_aggregate_elt_ref): Constify.
10526         * bcache.c (print_bcache_statistics): Constify.
10527         * bcache.h (print_bcache_statistics): Constify.
10528         * break-catch-throw.c (catch_exception_command_1):
10529         * breakpoint.c (struct ep_type_description::description):
10530         Constify.
10531         (add_solib_catchpoint): Constify.
10532         (catch_fork_command_1): Add cast.
10533         (add_catch_command): Constify.
10534         * breakpoint.h (add_catch_command, add_solib_catchpoint):
10535         Constify.
10536         * bsd-uthread.c (bsd_uthread_state): Constify.
10537         * buildsym.c (patch_subfile_names): Constify.
10538         * buildsym.h (next_symbol_text_func, patch_subfile_names):
10539         Constify.
10540         * c-exp.y (yyerror): Constify.
10541         (token::oper): Constify.
10542         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
10543         * c-varobj.c (cplus_describe_child): Constify.
10544         * charset.c (find_charset_names): Add cast.
10545         (find_charset_names): Constify array and add const_cast.
10546         * cli/cli-cmds.c (complete_command, cd_command): Constify.
10547         (edit_command): Constify.
10548         * cli/cli-decode.c (lookup_cmd): Constify.
10549         * cli/cli-dump.c (dump_memory_command, dump_value_command):
10550         Constify.
10551         (struct dump_context): Constify.
10552         (add_dump_command, restore_command): Constify.
10553         * cli/cli-script.c (get_command_line): Constify.
10554         * cli/cli-script.h (get_command_line): Constify.
10555         * cli/cli-utils.c (check_for_argument): Constify.
10556         * cli/cli-utils.h (check_for_argument): Constify.
10557         * coff-pe-read.c (struct read_pe_section_data): Constify.
10558         * command.h (lookup_cmd): Constify.
10559         * common/print-utils.c (decimal2str): Constify.
10560         * completer.c (gdb_print_filename): Constify.
10561         * corefile.c (set_gnutarget): Constify.
10562         * cp-name-parser.y (yyerror): Constify.
10563         * cp-valprint.c (cp_print_class_member): Constify.
10564         * cris-tdep.c (cris_register_name, crisv32_register_name):
10565         Constify.
10566         * d-exp.y (yyerror): Constify.
10567         (struct token::oper): Constify.
10568         * d-lang.h (d_yyerror): Constify.
10569         * dbxread.c (struct header_file_location::name): Constify.
10570         (add_old_header_file, add_new_header_file, last_function_name)
10571         (dbx_next_symbol_text, add_bincl_to_list)
10572         (find_corresponding_bincl_psymtab, set_namestring)
10573         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
10574         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
10575         * defs.h (command_line_input, print_address_symbolic)
10576         (deprecated_readline_begin_hook): Constify.
10577         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
10578         Constify.
10579         * event-top.c (handle_line_of_input): Constify and add cast.
10580         * exceptions.c (catch_errors): Constify.
10581         * exceptions.h (catch_errors): Constify.
10582         * expprint.c (print_subexp_standard, op_string, op_name)
10583         (op_name_standard, dump_raw_expression, dump_raw_expression):
10584         * expression.h (op_name, op_string, dump_raw_expression):
10585         Constify.
10586         * f-exp.y (yyerror): Constify.
10587         (struct token::oper): Constify.
10588         (struct f77_boolean_val::name): Constify.
10589         * f-lang.c (f_word_break_characters): Constify.
10590         * f-lang.h (f_yyerror): Constify.
10591         * fork-child.c (fork_inferior): Add cast.
10592         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
10593         (new_variant): Constify.
10594         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
10595         * gdbarch.c: Regenerate.
10596         * gdbcore.h (set_gnutarget): Constify.
10597         * go-exp.y (yyerror): Constify.
10598         (token::oper): Constify.
10599         * go-lang.h (go_yyerror): Constify.
10600         * go32-nat.c (go32_sysinfo): Constify.
10601         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
10602         * guile/scm-cmd.c (cmdscm_function): Constify.
10603         * guile/scm-param.c (pascm_param_value): Constify.
10604         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
10605         (h8300sx_register_name): Constify.
10606         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
10607         Constify.
10608         * ia64-tdep.c (ia64_register_names): Constify.
10609         * infcmd.c (construct_inferior_arguments): Constify.
10610         (path_command, attach_post_wait): Constify.
10611         * language.c (show_range_command, show_case_command)
10612         (unk_lang_error): Constify.
10613         * language.h (language_defn::la_error)
10614         (language_defn::la_name_of_this): Constify.
10615         * linespec.c (decode_line_2): Constify.
10616         * linux-thread-db.c (thread_db_err_str): Constify.
10617         * lm32-tdep.c (lm32_register_name): Constify.
10618         * m2-exp.y (yyerror): Constify.
10619         * m2-lang.h (m2_yyerror): Constify.
10620         * m32r-tdep.c (m32r_register_names): Constify and make static.
10621         * m68hc11-tdep.c (m68hc11_register_names): Constify.
10622         * m88k-tdep.c (m88k_register_name): Constify.
10623         * macroexp.c (appendmem): Constify.
10624         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
10625         (upgrade_type, parse_external, parse_partial_symbols)
10626         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
10627         (new_symbol): Constify.
10628         * memattr.c (mem_info_command): Constify.
10629         * mep-tdep.c (register_name_from_keyword): Constify.
10630         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
10631         Constify.
10632         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
10633         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
10634         * mi/mi-main.c (captured_mi_execute_command): Constify and add
10635         cast.
10636         (mi_execute_async_cli_command): Constify.
10637         * mips-tdep.c (mips_register_name): Constify.
10638         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
10639         (am33_register_name, am33_2_register_name)
10640         * moxie-tdep.c (moxie_register_names): Constify.
10641         * nat/linux-osdata.c (osdata_type): Constify fields.
10642         * nto-tdep.c (nto_parse_redirection): Constify.
10643         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
10644         (lookup_child_selector): Constify.
10645         (objc_methcall::name): Constify.
10646         * objc-lang.h (lookup_objc_class, lookup_child_selector)
10647         (lookup_struct_typedef): Constify.
10648         * objfiles.c (pc_in_section): Constify.
10649         * objfiles.h (pc_in_section): Constify.
10650         * p-exp.y (struct token::oper): Constify.
10651         (yyerror): Constify.
10652         * p-lang.h (pascal_yyerror): Constify.
10653         * parser-defs.h (op_name_standard): Constify.
10654         (op_print::string): Constify.
10655         (exp_descriptor::op_name): Constify.
10656         * printcmd.c (print_address_symbolic): Constify.
10657         * psymtab.c (print_partial_symbols): Constify.
10658         * python/py-breakpoint.c (stop_func): Constify.
10659         (bppy_get_expression): Constify.
10660         * python/py-cmd.c (cmdpy_completer::name): Constify.
10661         (cmdpy_function): Constify.
10662         * python/py-event.c (evpy_add_attribute)
10663         (gdbpy_initialize_event_generic): Constify.
10664         * python/py-event.h (evpy_add_attribute)
10665         (gdbpy_initialize_event_generic): Constify.
10666         * python/py-evts.c (add_new_registry): Constify.
10667         * python/py-finishbreakpoint.c (outofscope_func): Constify.
10668         * python/py-framefilter.c (get_py_iter_from_func): Constify.
10669         * python/py-inferior.c (get_buffer): Add cast.
10670         * python/py-param.c (parm_constant::name): Constify.
10671         * python/py-unwind.c (fprint_frame_id): Constify.
10672         * python/python.c (gdbpy_parameter_value): Constify.
10673         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
10674         * remote.c (memory_packet_config::name): Constify.
10675         (show_packet_config_cmd, remote_write_bytes)
10676         (remote_buffer_add_string):
10677         * reverse.c (exec_reverse_once): Constify.
10678         * rs6000-tdep.c (variant::name, variant::description): Constify.
10679         * rust-exp.y (rustyyerror): Constify.
10680         * rust-lang.c (rust_op_name): Constify.
10681         * rust-lang.h (rustyyerror): Constify.
10682         * serial.h (serial_ops::name): Constify.
10683         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
10684         (sh_sh3e_register_name, sh_sh2e_register_name)
10685         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
10686         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
10687         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
10688         (sh_sh4al_dsp_register_name): Constify.
10689         * sh64-tdep.c (sh64_register_name): Constify.
10690         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
10691         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
10692         * stabsread.c (patch_block_stabs, read_type_number)
10693         (ref_map::stabs, ref_add, process_reference)
10694         (symbol_reference_defined, define_symbol, define_symbol)
10695         (error_type, read_type, read_member_functions, read_cpp_abbrev)
10696         (read_one_struct_field, read_struct_fields, read_baseclasses)
10697         (read_tilde_fields, read_struct_type, read_array_type)
10698         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
10699         (read_huge_number, read_range_type, read_args, common_block_start)
10700         (find_name_end): Constify.
10701         * stabsread.h (common_block_start, define_symbol)
10702         (process_one_symbol, symbol_reference_defined, ref_add):
10703         * symfile.c (get_section_index, add_symbol_file_command):
10704         * symfile.h (get_section_index): Constify.
10705         * target-descriptions.c (tdesc_type::name): Constify.
10706         (tdesc_free_type): Add cast.
10707         * target.c (find_default_run_target):
10708         (add_deprecated_target_alias, find_default_run_target)
10709         (target_announce_detach): Constify.
10710         (do_option): Constify.
10711         * target.h (add_deprecated_target_alias): Constify.
10712         * thread.c (print_thread_info_1): Constify.
10713         * top.c (deprecated_readline_begin_hook, command_line_input):
10714         Constify.
10715         (init_main): Add casts.
10716         * top.h (handle_line_of_input): Constify.
10717         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
10718         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
10719         (tfind_command): Rename to ...
10720         (tfind_command_1): ... this and constify.
10721         (tfind_command): New function.
10722         (tfind_end_command, tfind_start_command): Adjust.
10723         (encode_source_string): Constify.
10724         * tracepoint.h (encode_source_string): Constify.
10725         * tui/tui-data.c (tui_partial_win_by_name): Constify.
10726         * tui/tui-data.h (tui_partial_win_by_name): Constify.
10727         * tui/tui-source.c (tui_set_source_content_nil): Constify.
10728         * tui/tui-source.h (tui_set_source_content_nil): Constify.
10729         * tui/tui-win.c (parse_scrolling_args): Constify.
10730         * tui/tui-windata.c (tui_erase_data_content): Constify.
10731         * tui/tui-windata.h (tui_erase_data_content): Constify.
10732         * tui/tui-winsource.c (tui_erase_source_content): Constify.
10733         * tui/tui.c (tui_enable): Add cast.
10734         * utils.c (defaulted_query): Constify.
10735         (init_page_info): Add cast.
10736         (puts_debug, subset_compare): Constify.
10737         * utils.h (subset_compare): Constify.
10738         * varobj.c (varobj_format_string): Constify.
10739         * varobj.h (varobj_format_string): Constify.
10740         * vax-tdep.c (vax_register_name): Constify.
10741         * windows-nat.c (windows_detach): Constify.
10742         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
10743         * xml-support.c (gdb_xml_end_element): Constify.
10744         * xml-tdesc.c (tdesc_start_reg): Constify.
10745         * xstormy16-tdep.c (xstormy16_register_name): Constify.
10746         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
10747         * xtensa-tdep.h (xtensa_register_t::name): Constify.
10748
10749 2017-04-05  Pedro Alves  <palves@redhat.com>
10750
10751         * proc-api.c (struct trans): Constify.
10752         (procfs_note): Constify.
10753         * proc-events.c (struct trans, syscall_table):
10754         * proc-flags.c (struct trans): Constify.
10755         * proc-utils.h (procfs_note): Constify.
10756         * proc-why.c (struct trans): Constify.
10757         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
10758         (procfs_detach): Constify.
10759         * sol-thread.c (struct string_map): Constify.
10760         (td_err_string, td_state_string): Constify.
10761
10762 2017-04-05  Pedro Alves  <palves@redhat.com>
10763
10764         * proc-api.c (procfs_filename): Don't initialize
10765         procfs_filename.
10766         (prepare_to_trace): Assume procfs_filename is non-NULL.
10767         (_initialize_proc_api): Give procfs_filename a default value here.
10768
10769 2017-04-05  Pedro Alves  <palves@redhat.com>
10770
10771         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
10772         'cond_string' parameter.
10773         (extract_exception_regexp): Constify 'string' parameter.
10774         (catch_exception_command_1): Constify.
10775         * breakpoint.c (init_catchpoint)
10776         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
10777         parameter.
10778         (ep_parse_optional_if_clause, catch_fork_command_1)
10779         (catch_exec_command_1): Constify.
10780         * breakpoint.h (init_catchpoint): Constify 'cond_string'
10781         parameter.
10782         (ep_parse_optional_if_clause): Constify.
10783         * cli/cli-utils.c (remove_trailing_whitespace)
10784         (check_for_argument): Constify.
10785         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
10786         non-const overload.
10787         (check_for_argument): Likewise.
10788
10789 2017-04-05  Pedro Alves  <palves@redhat.com>
10790
10791         * event-top.c (command_line_handler): Add cast to execute_command
10792         call.
10793         * record-btrace.c (cmd_record_btrace_bts_start)
10794         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
10795         (cmd_record_btrace_start): Add cast to execute_command call.
10796         * record-full.c (record_full_goto_insn):
10797         * record.c (record_start, record_stop): Add cast to
10798         execute_command_to_string calls.
10799         (cmd_record_start): Add cast to execute_command calls.
10800
10801 2017-04-05  Pedro Alves  <palves@redhat.com>
10802
10803         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
10804         static inline function.
10805         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
10806         array and use gdb_PyArg_ParseTupleAndKeywords.
10807         * python/py-cmd.c (cmdpy_init): Likewise.
10808         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
10809         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
10810         (infpy_search_memory): Likewise.
10811         * python/py-objfile.c (objfpy_add_separate_debug_file)
10812         (gdbpy_lookup_objfile): Likewise.
10813         * python/py-symbol.c (gdbpy_lookup_symbol)
10814         (gdbpy_lookup_global_symbol): Likewise.
10815         * python/py-type.c (gdbpy_lookup_type): Likewise.
10816         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
10817         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
10818         Likewise.
10819
10820 2017-04-05  Pedro Alves  <palves@redhat.com>
10821
10822         * python/python-internal.h (gdb_PyGetSetDef): New type.
10823         * python/py-block.c (block_object_getset)
10824         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
10825         * python/py-event.c (event_object_getset)
10826         (finish_breakpoint_object_getset): Likewise.
10827         * python/py-inferior.c (inferior_object_getset): Likewise.
10828         * python/py-infthread.c (thread_object_getset): Likewise.
10829         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
10830         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
10831         * python/py-objfile.c (objfile_getset): Likewise.
10832         * python/py-progspace.c (pspace_getset): Likewise.
10833         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
10834         Likewise.
10835         * python/py-record.c (recpy_record_getset): Likewise.
10836         * python/py-symbol.c (symbol_object_getset): Likewise.
10837         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
10838         Likewise.
10839         * python/py-type.c (type_object_getset, field_object_getset):
10840         Likewise.
10841         * python/py-value.c (value_object_getset): Likewise.
10842
10843 2017-04-05  Pedro Alves  <palves@redhat.com>
10844
10845         * python/python-internal.h (gdb_PyObject_CallMethod)
10846         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
10847         New functions.
10848         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
10849         (PySys_GetObject, PySys_SetPath): New macros.
10850
10851 2017-04-05  Pedro Alves  <palves@redhat.com>
10852
10853         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
10854         info_osdata_command.
10855         * osdata.c (info_osdata_command): Rename to ...
10856         (info_osdata): ... this.  Constify 'type' parameter, and remove
10857         the 'from_tty' parameter.  Accept NULL TYPE.
10858         (info_osdata_command): New function.
10859         * osdata.h (info_osdata_command): Remove declaration.
10860         (info_osdata): New declaration.
10861
10862 2017-04-05  Pedro Alves  <palves@redhat.com>
10863
10864         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
10865         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
10866         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
10867         parameter.
10868         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
10869         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
10870         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
10871         parameter.
10872         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
10873         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
10874         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
10875         (mi_cmd_file_list_exec_source_files)
10876         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
10877         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
10878         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
10879         parameter.
10880         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
10881         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
10882         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
10883         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
10884         (mi_cmd_stack_info_frame): Constify 'command' parameter.
10885         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
10886         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
10887         'command' parameter.
10888         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
10889         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
10890         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
10891         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
10892         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
10893         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
10894         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
10895         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
10896         (mi_cmd_var_set_update_range): Constify 'command' parameter.
10897         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
10898         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
10899         parameter.
10900         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
10901         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
10902         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
10903         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
10904         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
10905         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
10906         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
10907         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
10908         (mi_cmd_data_list_changed_registers)
10909         (mi_cmd_data_write_register_values)
10910         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
10911         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
10912         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
10913         (mi_cmd_list_features, mi_cmd_list_target_features)
10914         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
10915         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
10916         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
10917         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
10918         (mi_cmd_trace_frame_collected): Constify 'command'
10919         parameter.
10920         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
10921         'command' parameter.
10922
10923 2017-04-05  Pedro Alves  <palves@redhat.com>
10924
10925         * ada-lang.c (ada_completer_word_break_characters): Now a const
10926         array.
10927         (ada_get_gdb_completer_word_break_characters): Constify.
10928         * completer.c (gdb_completer_command_word_break_characters)
10929         (gdb_completer_file_name_break_characters)
10930         (gdb_completer_quote_characters): Now const arrays.
10931         (get_gdb_completer_quote_characters): Constify.
10932         (set_rl_completer_word_break_characters): New function.
10933         (set_gdb_completion_word_break_characters)
10934         (complete_line_internal): Use it.
10935         * completer.h (get_gdb_completer_quote_characters): Constify.
10936         (set_rl_completer_word_break_characters): Declare.
10937         * f-lang.c (f_word_break_characters): Constify.
10938         * language.c (default_word_break_characters): Constify.
10939         * language.h (language_defn::la_word_break_characters): Constify.
10940         (default_word_break_characters): Constify.
10941         * top.c (init_main): Use set_rl_completer_word_break_characters.
10942
10943 2017-04-05  Pedro Alves  <palves@redhat.com>
10944
10945         * aix-thread.c (aix_thread_pid_to_str)
10946         (aix_thread_extra_thread_info): Constify.
10947         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
10948         * bsd-uthread.c (bsd_uthread_extra_thread_info)
10949         (bsd_uthread_pid_to_str): Constify.
10950         * corelow.c (core_pid_to_str): Constify.
10951         * darwin-nat.c (darwin_pid_to_str): Constify.
10952         * fbsd-nat.c (fbsd_pid_to_str): Constify.
10953         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
10954         Constify.
10955         * gnu-nat.c (gnu_pid_to_str): Constify.
10956         * go32-nat.c (go32_pid_to_str): Constify.
10957         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
10958         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
10959         * inferior.c (inferior_pid_to_str): Constify.
10960         * linux-nat.c (linux_nat_pid_to_str): Constify.
10961         * linux-tdep.c (linux_core_pid_to_str): Constify.
10962         * linux-thread-db.c (thread_db_pid_to_str)
10963         (thread_db_extra_thread_info): Constify.
10964         * nto-tdep.c (nto_extra_thread_info): Constify.
10965         * nto-tdep.h (nto_extra_thread_info): Constify.
10966         * obsd-nat.c (obsd_pid_to_str): Constify.
10967         * procfs.c (procfs_pid_to_str): Constify.
10968         * ravenscar-thread.c (ravenscar_extra_thread_info)
10969         (ravenscar_pid_to_str): Constify.
10970         * remote-sim.c (gdbsim_pid_to_str): Constify.
10971         * remote.c (remote_threads_extra_info, remote_pid_to_str):
10972         Constify.
10973         * sol-thread.c (solaris_pid_to_str): Constify.
10974         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
10975         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
10976         * target.c (default_pid_to_str, target_pid_to_str)
10977         (normal_pid_to_str, default_pid_to_str): Constify.
10978         * target.h (target_ops::to_pid_to_str)
10979         (target_ops::to_extra_thread_info): Constify.
10980         (target_pid_to_str, normal_pid_to_str): Constify.
10981         * windows-nat.c (windows_pid_to_str): Constify.
10982         * gdbarch.sh (core_pid_to_str): Constify.
10983         * target-delegates.c: Regenerate.
10984         * gdbarch.h, gdbarch.c: Regenerate.
10985
10986 2017-04-05  Pedro Alves  <palves@redhat.com>
10987
10988         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
10989         the memory of the temporary warning_pre_print override.
10990         * utils.c (warning_pre_print): Constify.
10991         * utils.h (warning_pre_print): Constify.
10992
10993 2017-04-05  Pedro Alves  <palves@redhat.com>
10994
10995         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
10996         (shell_command): New function.
10997         (make_command): Use std::string.
10998         (init_cli_cmds): Register shell_command instead of shell_escape.
10999
11000 2017-04-05  Pedro Alves  <palves@redhat.com>
11001
11002         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
11003         * tracepoint.c (default_collect): Don't initialize.
11004
11005 2017-04-05  Pedro Alves  <palves@redhat.com>
11006
11007         * macroexp.c (macro_buffer::shared): Now a bool.
11008         (init_buffer): Update.
11009         (init_shared_buffer): Constify 'addr' parameter.
11010         (substitute_args, expand, macro_expand, macro_expand_next): Remove
11011         casts.
11012
11013 2017-04-05  Pedro Alves  <palves@redhat.com>
11014
11015         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
11016         * disasm.c (set_disassembler_options): Constify local.
11017         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
11018
11019 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
11020
11021         PR gdb/21352
11022         * tracefile.c (tsave_command): Fix argument parsing for '-r'
11023         option.
11024
11025 2017-04-05  Yao Qi  <yao.qi@linaro.org>
11026
11027         * frame.c (frame_unwind_register_unsigned): Call
11028         frame_unwind_register_value.
11029
11030 2017-04-05  Yao Qi  <yao.qi@linaro.org>
11031
11032         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
11033         Use gdb_test_multiple, and don't match anchor.
11034
11035 2017-04-05  Pedro Alves  <palves@redhat.com>
11036
11037         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
11038         (Write After Approval): Remove Simon Marchi.
11039
11040 2017-04-05  Pedro Alves  <palves@redhat.com>
11041
11042         * common/gdb_optional.h (optional::optional): Make constexpr and
11043         initialize m_dummy.
11044
11045 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11046
11047         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11048         (amd64fbsd_jmp_buf_reg_offset): Remove.
11049         (amd64fbsd_supply_uthread): Remove function.
11050         (amd64fbsd_collect_uthread): Remove function.
11051         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
11052         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
11053         (x86_64-*-freebsd*): Remove bsd-uthread.o.
11054         (fbsd-nat.c): Update comment.
11055         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11056         (i386fbsd_jmp_buf_reg_offset): Remove.
11057         (i386fbsd_supply_uthread): Remove function.
11058         (i386fbsd_collect_uthread): Remove function.
11059         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
11060
11061 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11062
11063         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
11064         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
11065         * NEWS: Mention that support for FreeBSD/alpha was removed.
11066         * alpha-fbsd-tdep.c: Delete file.
11067         * config/alpha/fbsd.mh: Delete file.
11068         * configure.host: Delete alpha*-*-freebsd* and
11069         alpha*-*-kfreebsd*-gnu.
11070         * configure.tgt: Delete alpha*-*-freebsd* and
11071         alpha*-*-kfreebsd*-gnu.
11072
11073 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11074
11075         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
11076         amd64bsd_store_inferior_registers): Use ptid from regcache.
11077
11078 2017-04-04  Pedro Alves  <palves@redhat.com>
11079
11080         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
11081         data fields, make them private and add "m_" prefixes.
11082         (lnp_state_machine::lnp_state_machine): New ctor.
11083         (record_line, check_line_address, handle_set_discriminator)
11084         (handle_set_address, handle_advance_pc, handle_special_opcode)
11085         (handle_advance_line, handle_set_file, handle_negate_stmt)
11086         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
11087         (end_sequence, advance_line): New methods.
11088         (m_gdbarch, m_record_lines_p): New fields.
11089         (lnp_reader_state): Delete.
11090         (dwarf_record_line): Rename to ...
11091         (lnp_state_machine::record_line): ... adjust.
11092         (init_lnp_state_machine): Delete.
11093         (lnp_state_machine::lnp_state_machine): New.
11094         (check_line_address): Rename to ...
11095         (lnp_state_machine::check_line_address): This.
11096         (dwarf_decode_lines_1): Remove reference to "reader_state".
11097         Adjust lnp_state_machine having a non-default ctor.  Use bool.
11098         State machine internal state manipulation moved to
11099         lnp_state_machine methods.
11100
11101 2017-04-04  Pedro Alves  <palves@redhat.com>
11102
11103         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11104         unittests/offset-type-selftests.c.
11105         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
11106         * common/offset-type.h: New file.
11107         * common/preprocessor.h: New file.
11108         * common/traits.h: New file.
11109         * common/valid-expr.h: New file.
11110         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
11111         sect_offset and cu_offset strong typedefs throughout.
11112         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
11113         typedefs throughout.
11114         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
11115         sect_offset and cu_offset strong typedefs throughout.
11116         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
11117         typedefs throughout.
11118         * gdbtypes.h: Include "common/offset-type.h".
11119         (cu_offset): Now an offset type (strong typedef) instead of a
11120         struct.
11121         (sect_offset): Likewise.
11122         (union call_site_parameter_u): Rename "param_offset" field to
11123         "param_cu_off".
11124         * unittests/offset-type-selftests.c: New file.
11125
11126 2017-04-04  Pedro Alves  <palves@redhat.com>
11127
11128         * common/underlying.h: New file.
11129         * dwarf2read.c: Include "common/gdb_optional.h" and
11130         "common/underlying.h".
11131         (dir_index, file_name_index): New types.
11132         (file_entry): Use them.
11133         (file_entry::include): Use to_underlying.
11134         (line_header::add_file_name): Use dir_index.
11135         (read_formatted_entries): Use gdb::optional.  Read form before
11136         writting to file_entry.
11137         (dwarf_decode_line_header): Use dir_index.
11138         (lnp_state_machine::current_file): Use to_underlying.
11139         (lnp_state_machine::file): Change type to file_name_index.
11140         (dwarf_record_line): Use to_underlying.
11141         (init_lnp_state_machine): Use file_name_index.
11142         (dwarf_decode_lines_1): Use dir_index and file_name_index.
11143
11144 2017-04-04  Pedro Alves  <palves@redhat.com>
11145
11146         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
11147         operator bool, has_value and get methods.
11148
11149 2017-04-04  Pedro Alves  <palves@redhat.com>
11150
11151         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
11152         fields.
11153         (line_header): Initialize all data fields.  Change type of
11154         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
11155         Change type of include_dirs to std::vector<const char *>.  Remove
11156         num_include_dirs, include_dirs_size.  Change type of file_names to
11157         std::vector<file_entry>.  Remove num_file_names, file_names_size.
11158         (line_header::line_header): New.
11159         (line_header::add_include_dir, line_header::add_file_name): New
11160         methods.
11161         (line_header::include_dir_at): Remove NULL check.
11162         (line_header::file_name_at): Add const overload.
11163         (line_header_up): New unique_ptr typedef.
11164         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
11165         std::vector.  Remove free_line_header call.
11166         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
11167         free_line_header call.
11168         (free_cu_line_header): Delete.
11169         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
11170         (setup_type_unit_groups): Use line_header_up instead of cleanups.
11171         Adjust to use std::vector.
11172         (free_line_header): Delete.
11173         (free_line_header_voidp): Use delete.
11174         (add_include_dir): Replace with ...
11175         (line_header::add_include_dir): ... this method.  Use std::vector.
11176         (add_file_name): Replace with ...
11177         (line_header::add_file_name): ... this method.  Use std::vector.
11178         (add_include_dir_stub): Delete.
11179         (read_formatted_entries): Remove memset.
11180         (dwarf_decode_line_header): Return a line_header_up instead of a
11181         raw pointer.  Remove cleanup handling.  Pass lambdas to
11182         read_formatted_entries.  Adjust to use line_header methods.
11183         (dwarf_decode_lines_1): Adjust to use line_header methods.
11184         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
11185         use std::vector.
11186
11187 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
11188
11189         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
11190         instead of struct ptid.
11191
11192 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
11193
11194         * frame.c (get_frame_register_bytes): Unwind using value.
11195         (put_frame_register_bytes): Likewise.
11196
11197 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
11198
11199         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
11200         aggregate-like.
11201
11202 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
11203
11204         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
11205
11206 2017-03-29  Yao Qi  <yao.qi@linaro.org>
11207
11208         * gdbthread.h (struct thread_info): Declare constructor and
11209         destructor.  Add some in-class member initializers.
11210         * thread.c (free_thread): Remove.
11211         (init_thread_list): Call delete instead of free_thread.
11212         (new_thread): Call thread_info constructor.
11213         (thread_info::thread_info): New function.
11214         (thread_info::~thread_info): New function.
11215         (delete_thread_1): Call delete instead of free_thread.
11216         (make_cleanup_restore_current_thread): Move tp and frame to
11217         inner block.
11218
11219 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11220
11221         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
11222         (arc_skip_prologue): Likewise.
11223         (arc_make_frame_cache): Likewise.
11224         (arc_pv_get_operand): New function.
11225         (arc_is_in_prologue): Likewise.
11226         (arc_analyze_prologue): Likewise.
11227         (arc_print_frame_cache): Likewise.
11228         (MAX_PROLOGUE_LENGTH): New constant.
11229
11230 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11231
11232         * configure.tgt: Add arc-insn.o.
11233         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
11234         (dump_arc_instruction_command): New function.
11235         (arc_fprintf_disasm): Likewise.
11236         (arc_disassemble_info): Likewise.
11237         (arc_insn_get_operand_value): Likewise.
11238         (arc_insn_get_operand_value_signed): Likewise.
11239         (arc_insn_get_memory_base_reg): Likewise.
11240         (arc_insn_get_memory_offset): Likewise.
11241         (arc_insn_get_branch_target): Likewise.
11242         (arc_insn_dump): Likewise.
11243         (arc_insn_get_linear_next_pc): Likewise.
11244         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
11245         (arc_disassemble_info): Likewise.
11246         (arc_insn_get_branch_target): Likewise.
11247         (arc_insn_get_linear_next_pc): Likewise.
11248         * NEWS: Mention new "maint print arc arc-instruction".
11249
11250 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11251
11252         * arc-tdep (maintenance_print_arc_list): New variable.
11253         (maintenance_print_arc_command): New function.
11254
11255 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11256
11257         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
11258         Add "limm" and "reserved".
11259         (arc_cannot_fetch_register, arc_cannot_store_register): Add
11260         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
11261         * arc-tdep.h (arc_regnum): Likewise.
11262
11263 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11264
11265         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11266         for THREADPTR register.
11267         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
11268         register.
11269         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
11270         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
11271         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
11272
11273 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11274
11275         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
11276         registers above gdbarch_num_regs (gdbarch) as privileged in
11277         call0 ABI.
11278
11279 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11280
11281         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11282         for a single specified register or for all registers in
11283         a0_base..a0_base + C0_NREGS range.
11284         (supply_gregset_reg): Call regcache_raw_supply for a single
11285         specified register or for all registers in a0_base..a0_base +
11286         C0_NREGS range.
11287
11288 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11289
11290         * arch/xtensa.h (C0_NREGS): Add definition.
11291         * xtensa-tdep.c (C0_NREGS): Remove definition.
11292
11293 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11294
11295         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
11296         Drop xtensa_default_isa initialization.
11297         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
11298
11299 2017-03-27  Pedro Alves  <palves@redhat.com>
11300
11301         * dwarf2read.c (file_entry) <dir_index>: Add comment.
11302         (file_entry::include_dir): New method.
11303         (line_header::include_dir_at, line_header::file_name_at): New
11304         methods.
11305         (setup_type_unit_groups, setup_type_unit_groups)
11306         (psymtab_include_file_name): Simplify using the new methods.
11307         (lnp_state_machine) <the_line_header>: New field.
11308         <file>: Add comment.
11309         (lnp_state_machine::current_file): New method.
11310         (dwarf_record_line): Simplify using the new methods.
11311         (init_lnp_state_machine): Initialize the "the_line_header" field.
11312         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
11313         Simplify using the new methods.
11314
11315 2017-03-27  Pedro Alves  <palves@redhat.com>
11316
11317         * cp-name-parser.y (make_empty): Delete.
11318         (demangler_special, nested_name, ptr_operator, array_indicator)
11319         (direct_declarator, declarator_1): Use fill_comp instead of
11320         make_empty.
11321
11322 2017-03-27  Pedro Alves  <palves@redhat.com>
11323
11324         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
11325         to ATTRIBUTE_PRINTF.
11326         * solib-target.c (library_list_start_list): Print "string" not
11327         "version".
11328         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
11329         gdb_xml_error call.
11330
11331 2017-03-27  Pedro Alves  <palves@redhat.com>
11332
11333         * dwarf2read.c (struct file_and_directory): New.
11334         (dwarf2_get_dwz_file): Adjust to use std::string.
11335         (dw2_get_file_names_reader): Adjust to use file_and_directory.
11336         (find_file_and_directory): Adjust to return a file_and_directory
11337         object.
11338         (read_file_scope): Adjust to use file_and_directory.  Remove
11339         make_cleanup/do_cleanups calls.
11340         (open_and_init_dwp_file): Adjust to use std::string.  Remove
11341         make_cleanup/do_cleanups calls.
11342         * python/python.c (do_start_initialization): Adjust to ldirname
11343         returning a std::string.
11344         * utils.c (ldirname): Now returns a std::string.
11345         * utils.h (ldirname): Change return type to std::string.
11346         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
11347         returning a std::string.
11348         * xml-tdesc.c (file_read_description_xml): Likewise.
11349
11350 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
11351
11352         * regcache.c (regcache_debug_print_register): New function.
11353         * regcache.h (regcache_debug_print_register): New declaration.
11354         * target.c (debug_print_register): Remove.
11355         (target_fetch_registers): Call regcache_debug_print_register.
11356         (target_store_registers): Likewise.
11357
11358 2017-03-24  Pádraig Brady  <pbrady@fb.com>
11359
11360         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
11361         reference beyond the 'lh->include_dirs' array before accessing to
11362         it.
11363         (psymtab_include_file_name): Likewise.
11364         (dwarf_decode_lines_1): Likewise.
11365         (dwarf_decode_lines): Likewise.
11366         (file_file_name): Likewise.
11367
11368 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
11369
11370         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
11371         inferior_ptid.
11372         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11373         ps_lsetfpregs): Likewise.
11374         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
11375         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11376         ps_lsetfpregs): Likewise.
11377         * target.c (target_fetch_registers, target_store_registers):
11378         Remove asserts.
11379
11380 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
11381
11382         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
11383
11384 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11385
11386         * aarch64-tdep.c (aarch64_process_record_test): Declare.
11387         (_initialize_aarch64_tdep): Register it.
11388         (aarch64_record_load_store): Handle PRFM instruction.
11389         (aarch64_process_record_test): New function.
11390
11391 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11392
11393         * aarch64-tdep.c (aarch64_record_load_store): Fix code
11394         indentation.
11395
11396 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11397
11398         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
11399
11400 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11401
11402         python/python.c (do_start_initialization): Fix memory leak.
11403
11404 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11405
11406         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
11407         using get_ptrace_pid.
11408         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
11409         inferior_ptid.
11410         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
11411         inferior_ptid instead of pid.
11412
11413 2017-03-22  Yao Qi  <yao.qi@linaro.org>
11414
11415         * aarch64-tdep.c: Wrap locally used classes in anonymous
11416         namespace.
11417         * arm-tdep.c: Likewise.
11418         * linespec.c: Likewise.
11419         * ui-out.c: Likewise.
11420
11421 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
11422
11423         PR gdb/19637
11424         * python/lib/gdb/printer/bound_registers.py: Import sys.
11425
11426 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
11427
11428         * windows-nat.c (do_windows_fetch_inferior_registers): Add
11429         windows_thread_info parameter and use it instead of
11430         current_thread.
11431         (windows_fetch_inferior_registers): Don't set current_thread,
11432         pass the thread to do_windows_fetch_inferior_registers.  Use
11433         ptid from regcache instead of inferior_ptid.
11434         (do_windows_store_inferior_registers): Add windows_thread_info
11435         parameter and use it instead of current_thread.
11436         (windows_store_inferior_registers): Don't set current_thread,
11437         pass the thread to do_windows_store_inferior_registers.  Use
11438         ptid from regcache instead of inferior_ptid.
11439
11440 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
11441
11442         * ser-mingw.c (ser_windows_raw): Remove reference to
11443         struct serial::current_timeout.
11444
11445 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
11446
11447         PR tdep/20928
11448         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
11449         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
11450         (sparc64_fsr_type): Fix %fsr decoding.
11451
11452 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
11453
11454         * python/py-record-btrace.c (btpy_insn_data): Change return type
11455         for Python 2.
11456
11457 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
11458
11459         * spu-linux-nat.c (spu_fetch_inferior_registers,
11460         spu_store_inferior_registers): Use ptid from regcache, set and
11461         restore inferior_ptid.
11462         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
11463         Likewise.
11464
11465 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
11466
11467         * i386-linux-nat.c (fetch_register, store_register,
11468         i386_linux_fetch_inferior_registers,
11469         i386_linux_store_inferior_registers): Use ptid from regcache.
11470         * ia64-linux-nat.c (ia64_linux_fetch_register,
11471         ia64_linux_store_register): Likewise.
11472         * inf-ptrace.c (inf_ptrace_fetch_register,
11473         inf_ptrace_store_register): Likewise.
11474         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
11475         m32r_linux_store_inferior_registers): Likewise.
11476         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
11477         m68kbsd_store_inferior_registers): Likewise.
11478         * m68k-linux-nat.c (fetch_register, store_register,
11479         m68k_linux_fetch_inferior_registers,
11480         m68k_linux_store_inferior_registers): Likewise.
11481         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
11482         m88kbsd_store_inferior_registers): Likewise.
11483         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
11484         mips_fbsd_store_inferior_registers): Likewise.
11485         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
11486         mips64_linux_regsets_store_registers): Likewise.
11487         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
11488         mipsnbsd_store_inferior_registers): Likewise.
11489         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
11490         mips64obsd_store_inferior_registers): Likewise.
11491         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
11492         Likewise.
11493         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
11494         ppcfbsd_store_inferior_registers): Likewise.
11495         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
11496         ppc_linux_store_inferior_registers): Likewise.
11497         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
11498         ppcnbsd_store_inferior_registers): Likewise.
11499         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
11500         ppcobsd_store_registers): Likewise.
11501         * procfs.c (procfs_fetch_registers, procfs_store_registers):
11502         Likewise.
11503         * ravenscar-thread.c (ravenscar_fetch_registers,
11504         ravenscar_store_registers, ravenscar_prepare_to_store):
11505         Likewise.
11506         * record-btrace.c (record_btrace_fetch_registers,
11507         record_btrace_store_registers, record_btrace_prepare_to_store):
11508         Likewise.
11509         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
11510         Lookup inferior using ptid from regcache, instead of
11511         current_inferior.
11512         * remote.c (remote_fetch_registers, remote_store_registers): Use
11513         ptid from regcache.
11514         * rs6000-nat.c (fetch_register, store_register): Likewise.
11515         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
11516         s390_linux_store_inferior_registers): Likewise.
11517         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
11518         shnbsd_store_inferior_registers): Likewise.
11519         * sol-thread.c (sol_thread_fetch_registers,
11520         sol_thread_store_registers): Likewise.
11521         * sparc-nat.c (sparc_fetch_inferior_registers,
11522         sparc_store_inferior_registers): Likewise.
11523         * tilegx-linux-nat.c (fetch_inferior_registers,
11524         store_inferior_registers): Likewise.
11525         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
11526         vaxbsd_store_inferior_registers): Likewise.
11527         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
11528         store_xtregs): Likewise.
11529
11530 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11531
11532         PR gdb/14441
11533         * NEWS: Mention support for rvalue references in GDB and python.
11534         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
11535         supports both lvalue and rvalue references.
11536
11537 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11538
11539         PR gdb/14441
11540         * gdbtypes.c (rank_one_type): Implement overloading
11541         resolution rules regarding rvalue references.
11542
11543 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11544
11545         PR gdb/14441
11546         * aarch64-tdep.c (aarch64_type_align)
11547         (aarch64_extract_return_value, aarch64_store_return_value): Change
11548         lvalue reference type checks to general reference type checks.
11549         * amd64-tdep.c (amd64_classify): Likewise.
11550         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
11551         Likewise.
11552         * arm-tdep.c (arm_type_align, arm_extract_return_value)
11553         (arm_store_return_value): Likewise.
11554         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
11555         * c-typeprint.c (c_print_type): Likewise.
11556         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
11557         (cplus_number_of_children, cplus_describe_child): Likewise.
11558         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
11559         * completer.c (expression_completer): Likewise.
11560         * cp-support.c (make_symbol_overload_list_adl_namespace):
11561         Likewise.
11562         * darwin-nat-info.c (info_mach_region_command): Likewise.
11563         * dwarf2loc.c (entry_data_value_coerce_ref)
11564         (value_of_dwarf_reg_entry): Likewise.
11565         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
11566         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
11567         Likewise.
11568         * findvar.c (extract_typed_address, store_typed_address):
11569         Likewise.
11570         * gdbtypes.c (rank_one_type): Likewise.
11571         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
11572         * infcall.c (value_arg_coerce): Likewise.
11573         * language.c (pointer_type): Likewise.
11574         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
11575         Likewise.
11576         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
11577         * mn10300-tdep.c (mn10300_type_align): Likewise.
11578         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
11579         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
11580         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
11581         Likewise.
11582         * printcmd.c (print_formatted, x_command): Likewise.
11583         * python/py-type.c (typy_get_composite, typy_template_argument):
11584         Likewise.
11585         * python/py-value.c (valpy_referenced_value)
11586         (valpy_get_dynamic_type, value_has_field): Likewise.
11587         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
11588         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
11589         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
11590         * spu-tdep.c (spu_scalar_value_p): Likewise.
11591         * symtab.c (lookup_symbol_aux): Likewise.
11592         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
11593         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
11594         Likewise.
11595         * valops.c (value_cast_pointers, value_cast)
11596         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
11597         (value_struct_elt, value_struct_elt_bitpos)
11598         (value_find_oload_method_list, find_overload_match)
11599         (value_rtti_indirect_type): Likewise.
11600         * valprint.c (val_print_scalar_type_p, generic_val_print):
11601         Likewise.
11602         * value.c (value_actual_type, value_as_address, unpack_long)
11603         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
11604         (coerce_ref): Likewise.
11605         * varobj.c (varobj_get_value_type): Likewise.
11606
11607 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11608
11609         PR gdb/14441
11610         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
11611         table of constants.
11612         * python/lib/gdb/command/explore.py: Support exploring values
11613         of rvalue reference types.
11614         * python/lib/gdb/types.py: Implement get_basic_type() for
11615         rvalue reference types.
11616         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
11617         constant.
11618         * python/py-value.c (valpy_getitem): Add an rvalue reference
11619         check.
11620         (valpy_reference_value): Add new parameter "refcode".
11621         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
11622         New wrappers for valpy_reference_value().
11623         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11624         (gdbpy_invoke_xmethod): Likewise.
11625
11626 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11627
11628         PR gdb/14441
11629         * dwarf2read.c (process_die, read_type_die_1): Handle the
11630         DW_TAG_rvalue_reference_type DIE.
11631         (read_tag_reference_type): Add new parameter "refcode".
11632
11633 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11634
11635         PR gdb/14441
11636         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
11637         (c_type_print_modifier, c_type_print_varspec_suffix)
11638         (c_type_print_base): Support printing rvalue reference types.
11639         * c-valprint.c (c_val_print, c_value_print): Support printing
11640         rvalue reference values.
11641
11642 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11643
11644         PR gdb/14441
11645         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
11646         typename.
11647         * cp-support.c (replace_typedefs): Handle
11648         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
11649         * python/py-type.c (typy_lookup_type): Likewise.
11650
11651 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11652
11653         PR gdb/14441
11654         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
11655         * parse.c (insert_type): Change assert statement.
11656         (follow_types): Handle rvalue reference types.
11657         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
11658         constant.
11659
11660 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11661
11662         PR gdb/14441
11663         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
11664         value_ref() interface.
11665         * c-valprint.c (c_value_print): Likewise.
11666         * infcall.c (value_arg_coerce): Likewise.
11667         * python/py-value.c (valpy_reference_value): Likewise.
11668         * valops.c (value_cast, value_reinterpret_cast)
11669         (value_dynamic_cast, typecmp): Likewise.
11670         (value_ref): Parameterize by kind of return value reference type.
11671         * value.h (value_ref): Add new parameter "refcode".
11672
11673 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11674
11675         PR gdb/14441
11676         * dwarf2read.c (read_tag_reference_type): Use
11677         lookup_lvalue_reference_type() instead of lookup_reference_type().
11678         * eval.c (evaluate_subexp_standard): Likewise.
11679         * f-exp.y: Likewise.
11680         * gdbtypes.c (make_reference_type, lookup_reference_type):
11681         Generalize with rvalue reference types.
11682         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
11683         convenience wrappers for lookup_reference_type().
11684         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
11685         reference kind parameter.
11686         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
11687         wrappers for lookup_reference_type().
11688         * guile/scm-type.c (gdbscm_type_reference): Use
11689         lookup_lvalue_reference_type() instead of lookup_reference_type().
11690         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
11691         * parse.c (follow_types): Likewise.
11692         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
11693         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
11694         Likewise.
11695         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11696         (gdbpy_invoke_xmethod): Likewise.
11697         * stabsread.c: Provide extra argument to make_reference_type()
11698         call.
11699         * valops.c (value_ref, value_rtti_indirect_type): Use
11700         lookup_lvalue_reference_type() instead of lookup_reference_type().
11701
11702 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11703
11704         PR gdb/14441
11705         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
11706         (TYPE_IS_REFERENCE): New macro.
11707         (struct type): Add rvalue_reference_type field.
11708         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
11709
11710 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
11711
11712         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
11713         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
11714         New function definition.
11715         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
11716         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
11717         New function declaration.
11718         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
11719         * mi/mi-interp.h: New file.
11720         * solib.c (info_sharedlibrary_command): Replace for loop with
11721         ALL_SO_LIBS macro
11722         * solib.h (update_solib_list): New function declaration.
11723         (so_list_head): Move macro.
11724         * solist.h (ALL_SO_LIBS): New macro.
11725
11726 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
11727
11728         * infcmd.c (post_create_inferior): Remove unused argument in
11729         call to solib_add.
11730         * remote.c (remote_start_remote): Likewise.
11731         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
11732         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
11733         (enable_break): Likewise.
11734         * solib.c (update_solib_list): Remove unused target argument
11735         and its documentation.
11736         (solib_add): Remove unused target argument.  Remove unused
11737         argument in call to update_solib_list.
11738         (info_sharedlibrary_command): Remove unused argument in call
11739         to update_solib_list.
11740         (sharedlibrary_command): Remove unused argument in call to
11741         solib_add.
11742         (handle_solib_event): Likewise.
11743         (reload_shared_libraries): Likewise.
11744         * solib.h (solib_add): Remove unused target argument.
11745
11746 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11747
11748         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
11749         (s390_displaced_step_fixup): Cover relative branches with the
11750         default fixup handling.  This fixes lack of support for some
11751         relative branch instructions.
11752
11753 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11754
11755         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
11756         ptid from regcache.
11757
11758 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11759
11760         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
11761         i386_darwin_store_inferior_registers): Use ptid from regcache.
11762
11763 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11764
11765         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
11766         i386bsd_store_inferior_registers): Use ptid from regcache.
11767
11768 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11769
11770         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
11771         hppaobsd_store_registers): Use ptid from regcache.
11772
11773 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11774
11775         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
11776         hppanbsd_store_registers): Use ptid from regcache.
11777
11778 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11779
11780         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
11781         from regcache.  Use get_ptrace_pid.
11782
11783 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11784
11785         * corelow.c (get_core_register_section): Use ptid from regcache,
11786         update doc.
11787
11788 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11789
11790         * bsd-uthread.c (bsd_uthread_fetch_registers,
11791         bsd_uthread_store_registers): Use ptid from regcache, set and
11792         restore inferior_ptid.
11793
11794 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11795
11796         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
11797         fetch_fp_regs, store_register, store_regs, store_fp_register,
11798         store_fp_regs): Use ptid from regcache.
11799
11800 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11801
11802         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
11803         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
11804         store_vfp_regs): Use ptid from regcache.
11805
11806 2017-03-17  Pedro Alves  <palves@redhat.com>
11807
11808         PR remote/21188
11809         * ser-base.c (ser_base_wait_for): Add comment.
11810         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
11811         version.
11812         * ser-unix.c (hardwire_raw): Remove reference to
11813         scb->current_timeout.
11814         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
11815         (hardwire_ops): Install ser_base_readchar instead of
11816         hardwire_readchar.
11817         * serial.h (struct serial) <current_timeout, timeout_remaining>:
11818         Remove fields.
11819
11820 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
11821
11822         PR gdb/19637
11823         * python/lib/gdb/printer/bound_registers.py: Add support for
11824         Python 3.
11825
11826 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11827
11828         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
11829         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
11830         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
11831         byte_offset to subobj_byte_offset.  Fix the handling of
11832         DWARF_VALUE_STACK on big-endian targets when coming via an
11833         implicit pointer.
11834         (dwarf2_evaluate_loc_desc): Adjust call to
11835         dwarf2_evaluate_loc_desc_full.
11836         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
11837         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
11838
11839 2017-03-16  Yao Qi  <yao.qi@linaro.org>
11840
11841         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
11842         and REVSH instructions.
11843
11844 2017-03-16  Yao Qi  <yao.qi@linaro.org>
11845
11846         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
11847         (arm_record_test): Declare.
11848         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
11849         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
11850         align with the manual.
11851         (thumb_record_misc): Adjust the code order to align with the
11852         manual.
11853         (thumb2_record_decode_insn_handler): Fix instruction matching.
11854         (instruction_reader_thumb): New class.
11855         (arm_record_test): New function.
11856
11857 2017-03-16  Yao Qi  <yao.qi@linaro.org>
11858
11859         * arm-tdep.c (abstract_memory_reader): New class.
11860         (instruction_reader): New class.
11861         (extract_arm_insn): Add argument 'reader'.  Callers updated.
11862         (decode_insn): Likewise.
11863
11864 2017-03-16  Doug Evans  <dje@google.com>
11865
11866         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
11867         member.  Change type of TYPE member to SCM.  All uses updated.
11868         (lsscm_make_lazy_string_smob): Add assert.
11869         (lsscm_make_lazy_string): Flag bad length values.
11870         (lsscm_elt_type): New function.
11871         (gdbscm_lazy_string_to_value): Rewrite to use
11872         lsscm_safe_lazy_string_to_value.
11873         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
11874         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
11875         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
11876         in incoming type.
11877         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
11878         * guile/scm-type.c (tyscm_scm_to_type): New function.
11879
11880 2017-03-15  Doug Evans  <dje@google.com>
11881
11882         PR python/17728, python/18439, python/18779
11883         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
11884         member.  Change type of TYPE member to PyObject *.  All uses updated.
11885         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
11886         (gdbpy_create_lazy_string_object): Flag bad length values.
11887         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
11888         Handle typedefs in incoming type.
11889         (stpy_lazy_string_elt_type): New function.
11890         (gdbpy_extract_lazy_string): Call it.
11891         * python/py-value.c (valpy_lazy_string): Flag bad length values.
11892         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
11893         typedefs in incoming type.
11894
11895 2017-03-16  Doug Evans  <dje@google.com>
11896
11897         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
11898         * guile/scm-type.c (tyscm_scm_to_type): New function.
11899
11900 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
11901
11902         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
11903         "ULONGEST" for "skip".
11904
11905 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11906
11907         PR gdb/21220
11908         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
11909         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
11910         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
11911         over ptrace peek/poke until end of buffer or error.
11912
11913 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
11914
11915         * parse.c (length_of_subexp): Make static.
11916         * parser-defs.h (length_of_subexp): Remove.
11917
11918 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11919
11920         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
11921         as well.
11922
11923 2017-03-14  Pedro Alves  <palves@redhat.com>
11924
11925         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
11926         (main): Use std::unique_ptr.  Remove calls to
11927         cp_demangled_name_parse_free.
11928
11929 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11930
11931         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
11932         alphabsd_store_inferior_registers): Use regcache->ptid instead
11933         of inferior_ptid.
11934
11935 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11936
11937         * aix-thread.c (aix_thread_fetch_registers,
11938         aix_thread_store_registers): Use regcache->ptid instead of
11939         inferior_ptid.
11940
11941 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11942
11943         * aarch64-linux-nat.c (fetch_gregs_from_thread,
11944         store_gregs_to_thread, fetch_fpregs_from_thread,
11945         store_fpregs_to_thread): Use regcache->ptid instead of
11946         inferior_ptid.
11947
11948 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11949
11950         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
11951         amd64_linux_fetch_inferior_registers): Use regcache->ptid
11952         instead of inferior_ptid.
11953
11954 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11955
11956         * target.c (target_fetch_registers, target_store_registers): Add
11957         assert.
11958
11959 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11960
11961         * regcache.h (regcache_get_ptid): New function.
11962         * regcache.c (regcache_get_ptid): New function.
11963
11964 2017-03-13  Mark Wielaard  <mark@klomp.org>
11965
11966         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
11967
11968 2017-03-10  Keith Seitz  <keiths@redhat.com>
11969
11970         PR c++/8218
11971         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
11972
11973 2017-03-08  Pedro Alves  <palves@redhat.com>
11974
11975         PR gdb/18360
11976         * infrun.c (start_step_over, do_target_resume, resume)
11977         (restart_threads): Assert we're not resuming a thread that is
11978         meant to be stopped.
11979         (infrun_thread_stop_requested_callback): Delete.
11980         (infrun_thread_stop_requested): If the thread is internally
11981         stopped, queue a pending stop event and clear the thread's
11982         inline-frame state.
11983         (handle_stop_requested): New function.
11984         (handle_syscall_event, handle_inferior_event_1): Use
11985         handle_stop_requested.
11986         (handle_stop_requested): New function.
11987         (handle_signal_stop): Set the thread's stop_signal here instead of
11988         at caller.
11989         (finish_step_over): Clear step over info unconditionally.
11990         (handle_signal_stop): If the user had interrupted the event
11991         thread, consider the stop a random signal.
11992         (handle_signal_stop) <signal arrived while stepping over
11993         breakpoint>: Don't restart threads here.
11994         (stop_waiting): Don't clear step-over info here.
11995
11996 2017-03-08  Pedro Alves  <palves@redhat.com>
11997
11998         PR 21206
11999         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
12000         goes to argument 2, not 1.
12001
12002 2017-03-08  Pedro Alves  <palves@redhat.com>
12003
12004         PR cli/21218
12005         * top.c (gdb_readline_wrapper): Avoid passing NULL to
12006         display_gdb_prompt.
12007         (command_line_input): Add comment.
12008
12009 2017-03-08  Pedro Alves  <palves@redhat.com>
12010
12011         PR tui/21216
12012         * tui/tui-file.c (tui_file::write): New.
12013         * tui/tui-file.h (tui_file): Override "write".
12014         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
12015         factored out from ...
12016         (tui_puts): ... here.
12017         (tui_putc): Use them.
12018         (tui_write): New function.
12019         * tui/tui-io.h (tui_write): Declare.
12020
12021 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
12022
12023         * Makefile.in (SFILES): Replace "environ.c" with
12024         "common/environ.c".
12025         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
12026         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
12027         to...
12028         * common/environ.c: ... here.
12029         * environ.h: Moved to...
12030         * common/environ.h: ... here.
12031
12032 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
12033
12034         * gdbarch.sh (pstring_ptr): New static function.
12035         (gdbarch_disassembler_options): Use it.
12036         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
12037         not valid_disassembler_option->name.
12038         * gdbarch.c: Regenerate.
12039
12040 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
12041
12042         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
12043
12044 2017-03-07  Pedro Alves  <palves@redhat.com>
12045
12046         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
12047
12048 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12049
12050         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
12051         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
12052         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
12053         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
12054
12055 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
12056
12057         * xtensa-linux-nat.c (fetch_gregs): Remove const.
12058
12059 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
12060
12061         * remote.c (remote_add_target_side_commands): Use range-based
12062         for loop.
12063
12064 2017-03-03  Yao Qi  <yao.qi@linaro.org>
12065
12066         PR gdb/21165
12067         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
12068         value is lazy.
12069         * valprint.c (common_val_print): Likewise.
12070
12071 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
12072
12073         * NEWS: Mention new set/show disassembler-options commands.
12074         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
12075         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
12076         (prospective_options): New static variable.
12077         (gdb_disassembler::gdb_disassembler): Initialize
12078         m_di.disassembler_options.
12079         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
12080         (get_disassembler_options): New function.
12081         (set_disassembler_options): Likewise.
12082         (set_disassembler_options_sfunc): Likewise.
12083         (show_disassembler_options_sfunc): Likewise.
12084         (disassembler_options_completer): Likewise.
12085         (_initialize_disasm): Likewise.
12086         * disasm.h (get_disassembler_options): New prototype.
12087         (set_disassembler_options): Likewise.
12088         * gdbarch.sh (gdbarch_disassembler_options): New variable.
12089         (gdbarch_verify_disassembler_options): Likewise.
12090         * gdbarch.c: Regenerate.
12091         * gdbarch.h: Likewise.
12092         * arm-tdep.c (num_disassembly_options): Delete.
12093         (set_disassembly_style): Likewise.
12094         (arm_disassembler_options): New static variable.
12095         (set_disassembly_style_sfunc): Convert short style name into long
12096         option name.  Call set_disassembler_options.
12097         (show_disassembly_style_sfunc): New function.
12098         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
12099         set_gdbarch_verify_disassembler_options.
12100         (_initialize_arm_tdep): Delete regnames variable and update callers.
12101         (arm_disassembler_options): Initialize.
12102         (disasm_options): New variable.
12103         (num_disassembly_options): Rename from this...
12104         (num_disassembly_styles): ...to this.  Compute by scanning through
12105         disasm_options.
12106         (valid_disassembly_styles): Initialize using disasm_options.
12107         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
12108         set_arm_regname_option.
12109         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
12110         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
12111         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
12112         set_gdbarch_verify_disassembler_options.
12113         * s390-tdep.c (s390_disassembler_options): New static variable.
12114         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
12115         set_gdbarch_verify_disassembler_options.
12116
12117 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12118
12119         * remote.c (remote_add_target_side_condition): Remove "struct"
12120         keyword from range-based for loop.
12121
12122 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12123
12124         * remote.c (remote_add_target_side_condition): Use range-based
12125         for loop.  Update comment.
12126
12127 2017-02-27  Yao Qi  <yao.qi@linaro.org>
12128
12129         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
12130
12131 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
12132
12133         * regcache.c (regcache_raw_update): New function.
12134         (regcache_raw_read): Move code to regcache_raw_update.
12135         * regcache.h (regcache_raw_update): New declaration.
12136         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
12137
12138 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
12139
12140         * dwarf2read.c (create_debug_type_hash_table): Initialize
12141         header.signature and header.type_offset_in_tu.
12142
12143 2017-02-24  Pedro Alves  <palves@redhat.com>
12144
12145         * symtab.c (make_file_symbol_completion_list_1): Use
12146         add_symtab_completions.
12147
12148 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12149
12150         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
12151
12152 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12153
12154         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
12155         I386_MAX_REGISTER_SIZE.
12156         (i386_pseudo_register_write): Likewise.
12157         (i386_process_record): Likewise.
12158         * i387-tdep.c (i387_supply_xsave): Likewise.
12159         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
12160         (store_register): Likewise.
12161
12162 2017-02-23  Pedro Alves  <palves@redhat.com>
12163
12164         * ada-lang.c: Include "common/function-view.h".
12165         (ada_iterate_over_symbols): Adjust to use function_view as
12166         callback type.
12167         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
12168         (ada_make_symbol_completion_list): Use a lambda.
12169         (ada_exc_search_name_matches): Delete.
12170         (name_matches_regex): New.
12171         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
12172         * compile/compile-c-support.c: Include "common/function-view.h".
12173         (print_one_macro): Change prototype to accept a ui_file pointer.
12174         (write_macro_definitions): Use a lambda.
12175         * dwarf2read.c: Include "common/function-view.h".
12176         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
12177         (dw2_expand_symtabs_matching): Adjust to use function_view as
12178         callback type.
12179         * language.h: Include "common/function-view.h".
12180         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
12181         function_view as callback type.
12182         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
12183         * linespec.c: Include "common/function-view.h".
12184         (collect_info::add_symbol): New method.
12185         (struct symbol_and_data_callback, iterate_inline_only, struct
12186         symbol_matcher_data, iterate_name_matcher): Delete.
12187         (iterate_over_all_matching_symtabs): Adjust to use function_view
12188         as callback type and lambdas.
12189         (iterate_over_file_blocks): Adjust to use function_view as
12190         callback type.
12191         (decode_compound_collector): Now a class with private fields.
12192         (decode_compound_collector::release_symbols): New method.
12193         (collect_one_symbol): Rename to...
12194         (decode_compound_collector::operator()): ... this and adjust.
12195         (lookup_prefix_sym): decode_compound_collector construction bits
12196         move to decode_compound_collector ctor.  Pass the
12197         decode_compound_collector object directly as callback.  Remove
12198         cleanups and use decode_compound_collector::release_symbols
12199         instead.
12200         (symtab_collector): Now a class with private fields.
12201         (symtab_collector::release_symtabs): New method.
12202         (add_symtabs_to_list): Rename to...
12203         (symtab_collector::operator()): ... this and adjust.
12204         (collect_symtabs_from_filename): symtab_collector construction
12205         bits move to symtab_collector ctor.  Pass the symtab_collector
12206         object directly as callback.  Remove cleanups and use
12207         symtab_collector::release_symtabs instead.
12208         (collect_symbols): Delete.
12209         (add_matching_symbols_to_info): Use lambdas.
12210         * macrocmd.c (print_macro_callback): Delete.
12211         (info_macro_command): Use a lambda.
12212         (info_macros_command): Pass print_macro_definition as callable
12213         directly.
12214         (print_one_macro): Remove 'ignore' parameter.
12215         (macro_list_command): Adjust.
12216         * macrotab.c (macro_for_each_data::fn): Now a function_view.
12217         (macro_for_each_data::user_data): Delete field.
12218         (foreach_macro): Adjust to call the function_view.
12219         (macro_for_each): Adjust to use function_view as callback type.
12220         (foreach_macro_in_scope): Adjust to call the function_view.
12221         (macro_for_each_in_scope): Adjust to use function_view as callback
12222         type.
12223         * macrotab.h: Include "common/function-view.h".
12224         (macro_callback_fn): Declare a prototype instead of a pointer.
12225         Remove "user_data" parameter.
12226         (macro_for_each, macro_for_each_in_scope): Adjust to use
12227         function_view as callback type.
12228         * psymtab.c (partial_map_expand_apply)
12229         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
12230         Adjust to use function_view as callback type and to return bool.
12231         (psym_expand_symtabs_matching): Adjust to use function_view as
12232         callback types.
12233         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
12234         to use function_view as callback type and to return bool.
12235         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
12236         callback types.
12237         * symfile.c (expand_symtabs_matching): Adjust to use function_view
12238         as callback types.
12239         * symfile.h: Include "common/function-view.h".
12240         (expand_symtabs_file_matcher_ftype)
12241         (expand_symtabs_symbol_matcher_ftype)
12242         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
12243         return bool.
12244         (quick_symbol_functions::map_symtabs_matching_filename)
12245         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
12246         function_view as callback type and return bool.
12247         (expand_symtabs_matching): Adjust to use function_view as callback
12248         type.
12249         (maintenance_expand_name_matcher)
12250         (maintenance_expand_file_matcher): Delete.
12251         (maintenance_expand_symtabs): Use lambdas.
12252         * symtab.c (iterate_over_some_symtabs): Adjust to use
12253         function_view as callback types and return bool.
12254         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
12255         of a cleanup.
12256         (lookup_symtab_callback): Delete.
12257         (lookup_symtab): Use a lambda.
12258         (iterate_over_symbols): Adjust to use function_view as callback
12259         type.
12260         (struct search_symbols_data, search_symbols_file_matches)
12261         (search_symbols_name_matches): Delete.
12262         (search_symbols): Use a pair of lambdas.
12263         (struct add_name_data, add_macro_name, symbol_completion_matcher)
12264         (symtab_expansion_callback): Delete.
12265         (default_make_symbol_completion_list_break_on_1): Use lambdas.
12266         * symtab.h: Include "common/function-view.h".
12267         (iterate_over_some_symtabs): Adjust to use function_view as
12268         callback type and return bool.
12269         (iterate_over_symtabs): Adjust to use function_view as callback
12270         type.
12271         (symbol_found_callback_ftype): Remove 'data' parameter and return
12272         bool.
12273         (iterate_over_symbols): Adjust to use function_view as callback
12274         type.
12275
12276 2017-02-23  Pedro Alves  <palves@redhat.com>
12277
12278         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
12279         (%.o) <unittests/%.c>: New pattern.
12280         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
12281         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
12282         * common/function-view.h: New file.
12283         * unittests/function-view-selftests.c: New file.
12284         * configure: Regenerate.
12285
12286 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
12287
12288         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
12289         inferior_ptid.
12290         * go32-nat.c (go32_thread_alive): Likewise.
12291
12292 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12293
12294         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
12295         delete.
12296
12297 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12298
12299         * varobj.c (varobj_clear_saved_item): Use delete instead of
12300         xfree.
12301         (update_dynamic_varobj_children): Likewise.
12302
12303 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12304
12305         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
12306
12307 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
12308
12309         * common/enum-flags.h (enum_flags::enum_flags): Initialize
12310         m_enum_value to 0 in default constructor.
12311
12312 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
12313
12314         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
12315         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
12316         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
12317         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
12318         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
12319         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
12320         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
12321         IS_STORE_CONDITIONAL_INSN.
12322
12323 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12324
12325         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
12326
12327 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12328
12329         * NEWS (Changes since GDB 7.12): Add DWARF-5.
12330
12331 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12332
12333         * dwarf2read.c (skip_one_die, read_attribute_value)
12334         (dwarf2_const_value_attr, dump_die_shallow)
12335         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
12336         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
12337
12338 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12339
12340         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
12341         (dwarf_parse_macro_header): Accept DWARF version 5.
12342         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
12343
12344 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12345
12346         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
12347         DW_AT_GNU_*.
12348         * common/common-exceptions.h (enum errors): Likewise.
12349         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
12350         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
12351         (dwarf_expr_context::execute_stack_op): Likewise.
12352         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
12353         Likewise.
12354         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
12355         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
12356         (show_entry_values_debug, call_site_to_target_addr)
12357         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
12358         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
12359         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
12360         (value_of_dwarf_block_entry, indirect_pieced_value)
12361         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
12362         (disassemble_dwarf_expression): Likewise.
12363         * dwarf2read.c (process_die, inherit_abstract_dies)
12364         (read_call_site_scope): Likewise.
12365         * gdbtypes.h (struct func_type, struct call_site_parameter)
12366         (struct call_site): Likewise.
12367         * stack.c (read_frame_arg): Likewise.
12368         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
12369
12370 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12371
12372         * defs.h (read_unsigned_leb128): New declaration.
12373         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
12374         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
12375         (dwarf2_find_location_expression): Call also
12376         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
12377         * dwarf2loc.h (dwarf2_version): New declaration.
12378         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
12379         rnglists.
12380         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
12381         .debug_rnglists.
12382         (struct dwop_section_names): Add loclists_dwo.
12383         (dwop_section_names): Add .debug_loclists.dwo.
12384         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
12385         (struct dwarf2_per_cu_data): Add dwarf_version.
12386         (struct dwo_sections): Add loclists.
12387         (struct attr_abbrev): Add implicit_const.
12388         (read_indirect_line_string): New declaration.
12389         (read_unsigned_leb128): Delete declaration.
12390         (rcuh_kind): New definition.
12391         (read_and_check_comp_unit_head): Change parameter
12392         is_debug_types_section to section_kind.
12393         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
12394         (read_comp_unit_head): Change parameter abfd to section, add parameter
12395         section_kind.  Handle DWARF-5.
12396         (error_check_comp_unit_head): Accept also DWARF version 5.
12397         (read_and_check_comp_unit_head): Change parameter
12398         is_debug_types_section to section_kind.
12399         (read_and_check_type_unit_head): Delete function.
12400         (read_abbrev_offset): Handle DWARF-5.
12401         (create_debug_type_hash_table): Add parameter section_kind.  Process
12402         only DW_UT_type.  Use signature and type_offset_in_tu from struct
12403         comp_unit_head.
12404         (create_debug_types_hash_table): Update create_debug_type_hash_table
12405         caller.
12406         (create_all_type_units): Call create_debug_type_hash_table.
12407         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
12408         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
12409         caller.
12410         (skip_one_die): Handle DW_FORM_implicit_const.
12411         (dwarf2_rnglists_process): New function.
12412         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
12413         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
12414         (read_attribute_value): Handle DW_FORM_implicit_const,
12415         DW_FORM_line_strp.
12416         (read_attribute): Handle DW_FORM_implicit_const.
12417         (read_indirect_string_at_offset_from): New function from
12418         read_indirect_string_at_offset.
12419         (read_indirect_string_at_offset): Call
12420         read_indirect_string_at_offset_from.
12421         (read_indirect_line_string_at_offset): New function.
12422         (read_indirect_string): New function comment.
12423         (read_indirect_line_string): New function.
12424         (read_unsigned_leb128): Make it global.
12425         (dwarf2_string_attr): Handle DWARF-5.
12426         (add_include_dir_stub, read_formatted_entries): New functions.
12427         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
12428         Handle DWARF-5.
12429         (per_cu_header_read_in): Update read_comp_unit_head caller.
12430         (dwarf2_version): New function.
12431         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
12432         rnglists.
12433         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
12434         fields.
12435
12436 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12437
12438         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
12439
12440 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12441
12442         * dwarf2read.c (dwarf2_ranges_process): New function from
12443         dwarf2_ranges_read.
12444         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
12445         dwarf2_ranges_process.
12446
12447 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12448
12449         * dwarf2read.c (create_debug_type_hash_table): New function from
12450         create_debug_types_hash_table.
12451         (create_debug_types_hash_table): Call create_debug_type_hash_table.
12452         (create_all_type_units, open_and_init_dwo_file): Update
12453         create_debug_types_hash_table callers.
12454
12455 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
12456
12457         PR gdb/16188
12458         * fork-child.c (trace_start_error): Fix thinko.  va_end should
12459         refer to 'ap', not 'args'.
12460
12461 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
12462             Pedro Alves  <palves@redhat.com>
12463
12464         PR gdb/16188
12465         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
12466         calls succeeded.
12467         * fork-child.c (trace_start_error): New function.
12468         (trace_start_error_with_name): Likewise.
12469         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
12470         * inf-ptrace.c (inf_ptrace_me): Likewise.
12471         * inferior.h (trace_start_error): New prototype.
12472         (trace_start_error_with_name): Likewise.
12473
12474 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
12475
12476         PR gdb/21164
12477         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
12478         NULL before using it.
12479         * symmisc.c (maintenance_print_symbols): Likewise.
12480         (maintenance_print_msymbols): Likewise.
12481
12482 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12483
12484         * NEWS: Add record Python bindings entry.
12485
12486 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12487
12488         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
12489         py-record-full.o.
12490         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
12491         * python/py-record-btrace.c, python/py-record-btrace.h,
12492         python/py-record-full.c, python/py-record-full.h: New file.
12493         * python/py-record.c: Add include for py-record-btrace.h and
12494         py-record-full.h.
12495         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
12496         recpy_instruction_history, recpy_function_call_history, recpy_begin,
12497         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
12498         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
12499         New definition.
12500         (gdbpy_initialize_btrace): New export.
12501         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
12502
12503 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12504
12505         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
12506         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
12507         * python/py-record.c: New file.
12508         * python/python-internal.h (gdbpy_start_recording,
12509         gdbpy_current_recording, gdpy_stop_recording,
12510         gdbpy_initialize_record): New export.
12511         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
12512         (python_GdbMethods): Add gdbpy_start_recording,
12513         gdbpy_current_recording and gdbpy_stop_recording.
12514
12515 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12516
12517         * record-btrace.c (record_btrace_record_method): New function.
12518         (init_record_btrace_ops): Initialize to_record_method.
12519         * record-full.c (record_full_record_method): New function.
12520         (init_record_full_ops, init_record_full_core_ops): Add
12521         record_full_record_method.
12522         * record.h (enum record_method): New enum.
12523         * target-debug.h (target_debug_print_enum_record_method: New define.
12524         * target-delegates.c: Regenerate.
12525         * target.c (target_record_method): New function.
12526         * target.h: Include record.h.
12527         (struct target_ops) <to_record_method>: New field.
12528         (target_record_method): New export.
12529
12530 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12531
12532         * record.h (record_start, record_stop): New export.
12533         * record.c (record_start, record_stop): New function.
12534
12535 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12536
12537         * btrace.c (btrace_fetch): Copy function call segments pointer
12538         into a vector.
12539         (btrace_clear): Clear the vector.
12540         (btrace_find_insn_by_number): Use binary search to find the correct
12541         function call segment.
12542         * btrace.h (brace_fun_p): New typedef.
12543         (struct btrace_thread_info) <functions>: New field.
12544
12545 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12546
12547         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
12548         * btrace.c (btrace_decode_error): ... here.  New function.
12549         * btrace.h (btrace_decode_error): New export.
12550
12551 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12552
12553         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
12554         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
12555         btrace_find_insn_by_number): Remove special case for gaps.
12556         * btrace.h (btrace_insn_get_error): New export.
12557         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
12558         * record-btrace.c (btrace_insn_history): Print number for gaps.
12559         (record_btrace_info, record_btrace_goto): Handle gaps.
12560
12561 2017-02-14  Tom Tromey  <tom@tromey.com>
12562
12563         PR python/13598:
12564         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
12565         event.
12566         * python/py-evts.c (gdbpy_initialize_py_events): Add
12567         before_prompt registry.
12568         * python/py-events.h (events_object) <before_prompt>: New field.
12569
12570 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
12571
12572         * btrace.c (ftrace_new_switch): Preserve up link and flags.
12573
12574 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
12575
12576         * symfile (_initialize_symfile): Add usage text to the load command's
12577         help text.
12578
12579 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
12580
12581         * utils.c (defaulted_query): Don't query on secondary UIs.
12582
12583 2017-02-10  Tom Tromey  <tom@tromey.com>
12584
12585         * rust-lang.c (rust_get_disr_info): Remove unused variable.
12586
12587 2017-02-10  Tom Tromey  <tom@tromey.com>
12588
12589         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
12590         "cleanup" local.
12591         * python/py-type.c (typy_legacy_template_argument): Remove
12592         unnecessary "cleanup" local.
12593
12594 2017-02-10  Tom Tromey  <tom@tromey.com>
12595
12596         * python/python.c (do_start_initialization): New function, from
12597         _initialize_python.
12598         (_initialize_python): Call do_start_initialization.
12599         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
12600         goto.
12601
12602 2017-02-10  Tom Tromey  <tom@tromey.com>
12603
12604         * python/py-prettyprint.c (pretty_print_one_value): Use
12605         gdbpy_ref.
12606
12607 2017-02-10  Tom Tromey  <tom@tromey.com>
12608
12609         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
12610         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
12611         gdbpy_ref.
12612         * python/py-type.c (field_new): Use gdbpy_ref.
12613         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
12614         gdbpy_ref.
12615         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
12616         (py_free_pspace): Likewise.
12617         (pspace_to_pspace_object): Likewise.
12618         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
12619         (py_free_objfile): Likewise.
12620         (objfile_to_objfile_object): Likewise.
12621         * python/py-inferior.c (delete_thread_object): Use
12622         gdbpy_ref.
12623         (infpy_read_memory): Likewise.
12624         (py_free_inferior): Likewise.
12625         * python/py-evtregistry.c (create_eventregistry_object): Use
12626         gdbpy_ref.
12627         * python/py-event.c (create_event_object): Use gdbpy_ref.
12628
12629 2017-02-10  Tom Tromey  <tom@tromey.com>
12630
12631         * python/py-ref.h (gdbpy_ref_policy): Now a template.
12632         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
12633         used.
12634         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
12635         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
12636         python/py-exitedevent.c, python/py-finishbreakpoint.c,
12637         python/py-framefilter.c, python/py-function.c,
12638         python/py-inferior.c, python/py-infevents.c,
12639         python/py-linetable.c, python/py-newobjfileevent.c,
12640         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
12641         python/py-signalevent.c, python/py-stopevent.c,
12642         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
12643         python/py-unwind.c, python/py-utils.c, python/py-value.c,
12644         python/py-varobj.c, python/py-xmethods.c, python/python.c,
12645         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
12646
12647 2017-02-10  Tom Tromey  <tom@tromey.com>
12648
12649         * ui-out.h (ui_out_emit_type): New class.
12650         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
12651         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
12652         and ui_out_emit_tuple.
12653         (enumerate_locals): Likewise.
12654         (py_mi_print_variables, py_print_locals, py_print_args): Use
12655         ui_out_emit_list.
12656         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
12657         ui_out_emit_list.
12658         * common/gdb_optional.h: New file.
12659
12660 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
12661
12662         * MAINTAINERS (Write After Approval): Update my e-mail address.
12663
12664 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
12665
12666         PR gdb/21122
12667         * breakpoint.c (_initialize_breakpoint): Update the help description
12668         of the 'commands' command to indicate that it takes a list argument.
12669
12670 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
12671
12672         * interps.c (current_interp_set_logging): Remove "return".
12673
12674 2017-02-09  Gary Benson  <gbenson@redhat.com>
12675
12676         * symtab.c (add_symtab_completions): Prevent NULL pointer
12677         dereference.
12678
12679 2017-02-08  Pedro Alves  <palves@redhat.com>
12680
12681         * interps.c (interp::interp): Remove reference to quiet_p.
12682         (interp_set): Make static.  Remove dead "Switching to" output
12683         code.
12684         (interp_quiet_p, interp_set_quiet): Delete.
12685         (interpreter_exec_cmd): Don't set the interpreter quiet.
12686         * interps.h (interp_quiet_p): Make static.
12687         (class interp) <quiet_p>: Remove field
12688
12689 2017-02-08  Jerome Guitton  <guitton@adacore.com>
12690
12691         * cli/cli-decode.c (find_command_name_length): Make it extern.
12692         * cli/cli-decode.h (find_command_name_length): Declare.
12693         * cli/cli-script.c (command_name_equals, line_first_arg):
12694         New functions.
12695         (process_next_line): Use cli-decode to parse command names.
12696         (build_command_line): Make args a constant pointer.
12697
12698 2017-02-08  Jerome Guitton  <guitton@adacore.com>
12699
12700         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
12701         Remove case-insensitive search.
12702
12703 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
12704
12705         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
12706         at the end of the line.  Avoids an ARI warning.
12707
12708 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
12709
12710         * NEWS: Mention support for record/replay of Intel 64 rdrand and
12711         rdseed instructions.
12712         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
12713
12714 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
12715
12716         PR tdep/20936
12717         Provide and use sparc32 and sparc64 target description XML files.
12718         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
12719         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
12720         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
12721         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
12722         * features/sparc/sparc32-solaris.xml: New file.
12723         * features/sparc/sparc64-solaris.xml: New file.
12724         * features/sparc/sparc32-solaris.c: Generated.
12725         * features/sparc/sparc64-solaris.c: Generated.
12726         * sparc-tdep.h: Account for differences in target descriptions.
12727         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
12728         (sparc32_register_type): Use target provided registers.
12729         (validate_tdesc_registers): New function.
12730         (sparc32_gdbarch_init): Use tdesc_has_registers.
12731         Set pseudoregister functions.
12732         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
12733         (sparc64_register_type): Use target provided registers.
12734         (sparc64_init_abi): Set pseudoregister functions.
12735
12736 2017-02-03  Tom Tromey  <tom@tromey.com>
12737
12738         PR rust/21097:
12739         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
12740         with a single member.
12741
12742 2017-02-03  Pedro Alves  <palves@redhat.com>
12743
12744         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
12745         (cli_interp_base::~cli_interp_base): New.
12746         (cli_interp): New struct.
12747         (as_cli_interp): Cast the interp itself to cli_interp.
12748         (cli_interpreter_pre_command_loop): Rename to ...
12749         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
12750         parameter.
12751         (cli_interpreter_init): Rename to ...
12752         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
12753         boolean.  Make extern.
12754         (cli_interpreter_resume): Rename to ...
12755         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
12756         extern.
12757         (cli_interpreter_suspend): Rename to ...
12758         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
12759         extern.
12760         (cli_interpreter_exec): Rename to ...
12761         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
12762         extern.
12763         (cli_interpreter_supports_command_editing): Rename to ...
12764         (cli_interp_base::supports_command_editing): ... this.  Remove
12765         'interp' parameter.  Make extern.
12766         (cli_ui_out): Rename to ...
12767         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
12768         Make extern.
12769         (cli_set_logging): Rename to ...
12770         (cli_interp_base::set_logging): ... this.  Remove 'interp'
12771         parameter.  Make extern.
12772         (cli_interp_procs): Delete.
12773         (cli_interp_factory): Adjust to use "new".
12774         * cli/cli-interp.h: Include "interps.h".
12775         (struct cli_interp_base): New struct.
12776         * interps.c (struct interp): Delete.  Fields moved to interps.h.
12777         (interp_new): Delete.
12778         (interp::interp, interp::~interp): New.
12779         (interp_set): Use bool, and return void.  Assume the interpreter
12780         has suspend, init and resume methods, and that the all return
12781         void.
12782         (set_top_level_interpreter): interp_set returns void.
12783         (interp_ui_out): Adapt.
12784         (current_interp_set_logging): Adapt.
12785         (interp_data): Delete.
12786         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
12787         (interp_exec): Adapt.
12788         (top_level_interpreter_data): Delete.
12789         * interps.h (interp_init_ftype, interp_resume_ftype)
12790         (interp_suspend_ftype, interp_exec_ftype)
12791         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
12792         (class interp): New.
12793         (interp_new): Delete.
12794         (interp_set): Now returns void.  Use bool.
12795         (interp_data, top_level_interpreter_data): Delete.
12796         * mi/mi-common.h: Include interps.h.
12797         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
12798         init, resume, suspect, exec, interp_ui_out, set_logging and
12799         pre_command_loop methods.
12800         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
12801         (mi_interpreter_init): Rename to ...
12802         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
12803         bool, return void and make extern.  Adjust.
12804         (mi_interpreter_resume): ... Rename to ...
12805         (mi_interp::resume): ... this.  Remove the 'data' parameter,
12806         return void and make extern.  Adjust.
12807         (mi_interpreter_suspend): ... Rename to ...
12808         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
12809         return void and make extern.  Adjust.
12810         (mi_interpreter_exec): ... Rename to ...
12811         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
12812         extern.  Adjust.
12813         (mi_interpreter_pre_command_loop): ... Rename to ...
12814         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
12815         parameter and make extern.
12816         (mi_on_normal_stop_1): Adjust.
12817         (mi_ui_out): Rename to ...
12818         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
12819         parameter and make extern.  Adjust.
12820         (mi_set_logging): Rename to ...
12821         (mi_interp::set_logging): ... this.  Remove the 'interp'
12822         parameter and make extern.  Adjust.
12823         (mi_interp_procs): Delete.
12824         (mi_interp_factory): Adjust to use 'new'.
12825         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
12826         (mi_print_exception, mi_execute_command, mi_load_progress):
12827         Adjust.
12828         * tui/tui-interp.c (tui_interp): New class.
12829         (as_tui_interp): Return a tui_interp pointer.
12830         (tui_on_normal_stop, tui_on_signal_received)
12831         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
12832         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
12833         to use interp::interp_ui_out.
12834         (tui_init): Rename to ...
12835         (tui_interp::init): ... this.  Remove the 'self' parameter, use
12836         bool, return void and make extern.  Adjust.
12837         (tui_resume): Rename to ...
12838         (tui_interp::resume): ... this.  Remove the 'data' parameter,
12839         return void and make extern.  Adjust.
12840         (tui_suspend): Rename to ...
12841         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
12842         return void and make extern.  Adjust.
12843         (tui_ui_out): Rename to ...
12844         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
12845         parameter, and make extern.  Adjust.
12846         (tui_exec): Rename to ...
12847         (tui_interp::exec): ... this.  Remove the 'data' parameter and
12848         make extern.
12849         (tui_interp_procs): Delete.
12850         (tui_interp_factory): Use "new".
12851
12852 2017-02-02  Tom Tromey  <tom@tromey.com>
12853
12854         * rust-exp.y (ends_raw_string, space_then_number)
12855         (rust_identifier_start_p): Return bool.
12856         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
12857         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
12858         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
12859         (rust_chartype_p): Return bool.
12860         (val_print_struct, rust_print_struct_def, rust_print_type):
12861         Update.
12862         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
12863         Return bool.
12864
12865 2017-02-02  Tom Tromey  <tom@tromey.com>
12866
12867         * rust-lang.c: Reindent.
12868
12869 2017-02-02  Tom Tromey  <tom@tromey.com>
12870
12871         * rust-lang.h (rust_crate_for_block): Update.
12872         * rust-lang.c (rust_crate_for_block): Return std::string.
12873         (rust_get_disr_info): Use std:;string, not
12874         gdb::unique_xmalloc_ptr.
12875         * rust-exp.y (crate_name): Update.
12876
12877 2017-02-02  Pedro Alves  <palves@redhat.com>
12878
12879         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
12880         field out of gdb_disassembler_test and make it static.
12881
12882 2017-02-02  Pedro Alves  <palves@redhat.com>
12883
12884         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
12885         mi1_interp and mi_interp fields.
12886
12887 2017-02-02  Pedro Alves  <palves@redhat.com>
12888
12889         * cli/cli-interp.c (struct saved_output_files, saved_output):
12890         Moved from cli/cli-logging.c.
12891         (cli_set_logging): New function.
12892         (cli_interp_procs): Install cli_set_logging.
12893         * cli/cli-interp.h (make_logging_output, cli_set_logging):
12894         Declare.
12895         * cli/cli-logging.c (struct saved_output_files, saved_output):
12896         Moved to cli/cli-interp.c.
12897         (pop_output_files): Don't save outputs here.
12898         (make_logging_output): New function.
12899         (handle_redirections): Don't build tee nor save previous outputs
12900         here.
12901         * interps.c (current_interp_set_logging): Change prototype.
12902         Assume there's always a set_logging_proc method installed.
12903         * interps.h (interp_set_logging_ftype): Change prototype.
12904         (current_interp_set_logging): Change prototype and adjust comment.
12905         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
12906         use make_logging_output.
12907         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
12908 2017-02-02  Pedro Alves  <palves@redhat.com>
12909
12910         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
12911         from ...
12912         (set_logging_overwrite): ... here.
12913         (logging_no_redirect_file): Delete.
12914         (set_logging_redirect): Don't handle redirection on the fly.
12915         Instead warn that "logging off" / "logging on" is necessary.
12916         (pop_output_files): Delete references to logging_no_redirect_file.
12917         (show_logging_command): Always speak in terms of what will happen
12918         once logging is reenabled.
12919
12920 2017-02-02  Pedro Alves  <palves@redhat.com>
12921
12922         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
12923
12924 2017-02-02  Pedro Alves  <palves@redhat.com>
12925
12926         * disasm.c (gdb_pretty_print_insn): Rename to ...
12927         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
12928         Remove gdbarch parameter.  Adapt to clear the object's buffers
12929         instead of allocating new buffers, and to print using the object's
12930         gdb_disassembler instead of calling gdb_print_insn.
12931         (dump_insns): Use gdb_pretty_print_disassembler.
12932         * disasm.h (gdb_pretty_print_insn): Delete declaration.
12933         (gdb_pretty_print_disassembler): New class.
12934         * record-btrace.c (btrace_insn_history): Use
12935         gdb_pretty_print_disassembler.
12936
12937 2017-02-02  Pedro Alves  <palves@redhat.com>
12938
12939         * ada-lang.c (type_as_string): Use string_file.
12940         * ada-valprint.c (ada_print_floating): Use string_file.
12941         * ada-varobj.c (ada_varobj_scalar_image)
12942         (ada_varobj_get_value_image): Use string_file.
12943         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
12944         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
12945         * breakpoint.c (update_inserted_breakpoint_locations)
12946         (insert_breakpoint_locations, reattach_breakpoints)
12947         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
12948         (print_it_watchpoint): Use string_file.
12949         (save_breakpoints): Use stdio_file.
12950         * c-exp.y (oper): Use string_file.
12951         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
12952         tee_file.
12953         (pop_output_files): Use delete.
12954         (handle_redirections): Use stdio_file and tee_file.
12955         * cli/cli-setshow.c (do_show_command): Use string_file.
12956         * compile/compile-c-support.c (c_compute_program): Use
12957         string_file.
12958         * compile/compile-c-symbols.c (generate_vla_size): Take a
12959         'string_file &' instead of a 'ui_file *'.
12960         (generate_c_for_for_one_variable): Take a 'string_file &' instead
12961         of a 'ui_file *'.  Use string_file.
12962         (generate_c_for_variable_locations): Take a 'string_file &'
12963         instead of a 'ui_file *'.
12964         * compile/compile-internal.h (generate_c_for_for_one_variable):
12965         Take a 'string_file &' instead of a 'ui_file *'.
12966         * compile/compile-loc2c.c (push, pushf, unary, binary)
12967         (print_label, pushf_register_address, pushf_register)
12968         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
12969         'ui_file *'.  Adjust.
12970         * compile/compile.c (compile_to_object): Use string_file.
12971         * compile/compile.h (compile_dwarf_expr_to_c)
12972         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
12973         'ui_file *'.
12974         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
12975         (replace_typedefs_qualified_name): Use string_file and
12976         obstack_copy0.
12977         * disasm.c (gdb_pretty_print_insn): Use string_file.
12978         (gdb_disassembly): Adjust reference the null_stream global.
12979         (do_ui_file_delete): Delete.
12980         (gdb_insn_length): Use null_stream.
12981         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
12982         * dwarf2loc.c (dwarf2_compile_property_to_c)
12983         (locexpr_generate_c_location, loclist_generate_c_location): Take a
12984         'string_file &' instead of a 'ui_file *'.
12985         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
12986         * dwarf2read.c (do_ui_file_peek_last): Delete.
12987         (dwarf2_compute_name): Use string_file.
12988         * event-top.c (gdb_setup_readline): Use stdio_file.
12989         * gdbarch.sh (verify_gdbarch): Use string_file.
12990         * gdbtypes.c (safe_parse_type): Use null_stream.
12991         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
12992         string_file.
12993         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
12994         'string_file *' instead of a 'ui_file *'.
12995         (gdbscm_arch_disassemble): Use string_file.
12996         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
12997         * guile/scm-ports.c (class ioscm_file_port): Now a class that
12998         inherits from ui_file.
12999         (ioscm_file_port_delete, ioscm_file_port_rewind)
13000         (ioscm_file_port_put): Delete.
13001         (ioscm_file_port_write): Rename to ...
13002         (ioscm_file_port::write): ... this.  Remove file_port_magic
13003         checks.
13004         (ioscm_file_port_new): Delete.
13005         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
13006         ui_file_up.
13007         * guile/scm-type.c (tyscm_type_name): Use string_file.
13008         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
13009         Use string_file.
13010         * infcmd.c (print_return_value_1): Use string_file.
13011         * infrun.c (print_target_wait_results): Use string_file.
13012         * language.c (add_language): Use string_file.
13013         * location.c (explicit_to_string_internal): Use string_file.
13014         * main.c (captured_main_1): Use null_file.
13015         * maint.c (maintenance_print_architecture): Use stdio_file.
13016         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
13017         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
13018         event_channel>: Change type to mi_console_file pointer.
13019         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
13020         (mi_console_file_delete): Delete.
13021         (struct mi_console_file): Delete.
13022         (mi_console_file_magic): Delete.
13023         (mi_console_file_new): Delete.
13024         (mi_console_file::mi_console_file): New.
13025         (mi_console_file_delete): Delete.
13026         (mi_console_file_fputs): Delete.
13027         (mi_console_file::write): New.
13028         (mi_console_raw_packet): Delete.
13029         (mi_console_file::flush): New.
13030         (mi_console_file_flush): Delete.
13031         (mi_console_set_raw): Rename to ...
13032         (mi_console_file::set_raw): ... this.
13033         * mi/mi-console.h (class mi_console_file): New class.
13034         (mi_console_file_new, mi_console_set_raw): Delete.
13035         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
13036         (mi_set_logging): Use delete and tee_file.  Adjust.
13037         * mi/mi-main.c (output_register): Use string_file.
13038         (mi_cmd_data_evaluate_expression): Use string_file.
13039         (mi_cmd_data_read_memory): Use string_file.
13040         (mi_cmd_execute, print_variable_or_computed): Use string_file.
13041         * mi/mi-out.c (mi_ui_out::main_stream): New.
13042         (mi_ui_out::rewind): Use main_stream and
13043         string_file.
13044         (mi_ui_out::put): Use main_stream and string_file.
13045         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13046         Allocate a 'string_file' instead.
13047         (mi_out_new): Don't allocate a mem_fileopen stream here.
13048         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13049         (mi_ui_out::main_stream): Declare method.
13050         * printcmd.c (eval_command): Use string_file.
13051         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
13052         * python/py-arch.c (archpy_disassemble): Use string_file.
13053         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
13054         * python/py-frame.c (frapy_str): Use string_file.
13055         * python/py-framefilter.c (py_print_type, py_print_single_arg):
13056         Use string_file.
13057         * python/py-type.c (typy_str): Use string_file.
13058         * python/py-unwind.c (unwind_infopy_str): Use string_file.
13059         * python/py-value.c (valpy_str): Use string_file.
13060         * record-btrace.c (btrace_insn_history): Use string_file.
13061         * regcache.c (regcache_print): Use stdio_file.
13062         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
13063         * remote.c (escape_buffer): Use string_file.
13064         * rust-lang.c (rust_get_disr_info): Use string_file.
13065         * serial.c (serial_open_ops_1): Use stdio_file.
13066         (do_serial_close): Use delete.
13067         * stack.c (print_frame_arg): Use string_file.
13068         (print_frame_args): Remove local mem_fileopen stream, not used.
13069         (print_frame): Use string_file.
13070         * symmisc.c (maintenance_print_symbols): Use stdio_file.
13071         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
13072         Take a 'string_file *' instead of a 'ui_file *'.
13073         * top.c (new_ui): Use stdio_file and stderr_file.
13074         (free_ui): Use delete.
13075         (execute_command_to_string): Use string_file.
13076         (quit_confirm): Use string_file.
13077         * tracepoint.c (collection_list::append_exp): Use string_file.
13078         * tui/tui-disasm.c (tui_disassemble): Use string_file.
13079         * tui/tui-file.c: Don't include "ui-file.h".
13080         (enum streamtype, struct tui_stream): Delete.
13081         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
13082         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
13083         (tui_file::tui_file): New method.
13084         (tui_file_fputs): Delete.
13085         (tui_file_get_strbuf): Delete.
13086         (tui_file::puts): New method.
13087         (tui_file_adjust_strbuf): Delete.
13088         (tui_file_flush): Delete.
13089         (tui_file::flush): New method.
13090         * tui/tui-file.h: Tweak intro comment.
13091         Include ui-file.h.
13092         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
13093         (tui_file_adjust_strbuf): Delete declarations.
13094         (class tui_file): New class.
13095         * tui/tui-io.c (tui_initialize_io): Use tui_file.
13096         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
13097         (tui_register_format): Use string_stream.
13098         * tui/tui-stack.c (tui_make_status_line): Use string_file.
13099         (tui_get_function_from_frame): Use string_file.
13100         * typeprint.c (type_to_string): Use string_file.
13101         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
13102         (null_stream): New global.
13103         (ui_file_delete): Delete.
13104         (ui_file::ui_file): New.
13105         (null_file_isatty): Delete.
13106         (ui_file::~ui_file): New.
13107         (null_file_rewind): Delete.
13108         (ui_file::printf): New.
13109         (null_file_put): Delete.
13110         (null_file_flush): Delete.
13111         (ui_file::putstr): New.
13112         (null_file_write): Delete.
13113         (ui_file::putstrn): New.
13114         (null_file_read): Delete.
13115         (ui_file::putc): New.
13116         (null_file_fputs): Delete.
13117         (null_file_write_async_safe): Delete.
13118         (ui_file::vprintf): New.
13119         (null_file_delete): Delete.
13120         (null_file::write): New.
13121         (null_file_fseek): Delete.
13122         (null_file::puts): New.
13123         (ui_file_data): Delete.
13124         (null_file::write_async_safe): New.
13125         (gdb_flush, ui_file_isatty): Adjust.
13126         (ui_file_put, ui_file_rewind): Delete.
13127         (ui_file_write): Adjust.
13128         (ui_file_write_for_put): Delete.
13129         (ui_file_write_async_safe, ui_file_read): Adjust.
13130         (ui_file_fseek): Delete.
13131         (fputs_unfiltered): Adjust.
13132         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
13133         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
13134         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
13135         (set_ui_file_data): Delete.
13136         (string_file::~string_file, string_file::write)
13137         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
13138         (do_ui_file_as_string, ui_file_as_string): Delete.
13139         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
13140         (struct mem_file): Delete.
13141         (mem_file_new): Delete.
13142         (stdio_file::stdio_file): New.
13143         (mem_file_delete): Delete.
13144         (stdio_file::stdio_file): New.
13145         (mem_fileopen): Delete.
13146         (stdio_file::~stdio_file): New.
13147         (mem_file_rewind): Delete.
13148         (stdio_file::set_stream): New.
13149         (mem_file_put): Delete.
13150         (stdio_file::open): New.
13151         (mem_file_write): Delete.
13152         (stdio_file_magic, struct stdio_file): Delete.
13153         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
13154         (stdio_file::flush): New.
13155         (stdio_file_read): Rename to ...
13156         (stdio_file::read): ... this.  Adjust.
13157         (stdio_file_write): Rename to ...
13158         (stdio_file::write): ... this.  Adjust.
13159         (stdio_file_write_async_safe): Rename to ...
13160         (stdio_file::write_async_safe) ... this.  Adjust.
13161         (stdio_file_fputs): Rename to ...
13162         (stdio_file::puts) ... this.  Adjust.
13163         (stdio_file_isatty): Delete.
13164         (stdio_file_fseek): Delete.
13165         (stdio_file::isatty): New.
13166         (stderr_file_write): Rename to ...
13167         (stderr_file::write) ... this.  Adjust.
13168         (stderr_file_fputs): Rename to ...
13169         (stderr_file::puts) ... this.  Adjust.
13170         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
13171         (stderr_file::stderr_file): New.
13172         (tee_file_magic): Delete.
13173         (struct tee_file): Delete.
13174         (tee_file::tee_file): New.
13175         (tee_file_new): Delete.
13176         (tee_file::~tee_file): New.
13177         (tee_file_delete): Delete.
13178         (tee_file_flush): Rename to ...
13179         (tee_file::flush): ... this.  Adjust.
13180         (tee_file_write): Rename to ...
13181         (tee_file::write): ... this.  Adjust.
13182         (tee_file::write_async_safe): New.
13183         (tee_file_fputs): Rename to ...
13184         (tee_file::puts): ... this.  Adjust.
13185         (tee_file_isatty): Rename to ...
13186         (tee_file::isatty): ... this.  Adjust.
13187         * ui-file.h (struct obstack, struct ui_file): Don't
13188         forward-declare.
13189         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
13190         (ui_file_write_ftype)
13191         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
13192         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
13193         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
13194         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
13195         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
13196         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
13197         (set_ui_file_fseek): Delete.
13198         (ui_file_data, ui_file_delete, ui_file_rewind)
13199         (struct ui_file): New.
13200         (ui_file_up): New.
13201         (class null_file): New.
13202         (null_stream): Declare.
13203         (ui_file_write_for_put, ui_file_put): Delete.
13204         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
13205         Delete.
13206         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
13207         (gdb_fopen, tee_file_new): Delete.
13208         (struct string_file): New.
13209         (struct stdio_file): New.
13210         (stdio_file_up): New.
13211         (struct stderr_file): New.
13212         (class tee_file): New.
13213         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
13214         of a 'ui_file *'.  Adjust.
13215         * ui-out.h (class ui_out) <field_stream>: Likewise.
13216         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
13217         (null_stream): Delete.
13218         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
13219         Adjust.
13220         * utils.h (struct ui_file): Delete forward declaration..
13221         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
13222         (error_stream): Take a 'string_file &' instead of a
13223         'ui_file *'.
13224         * varobj.c (varobj_value_get_print_value): Use string_file.
13225         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
13226         * gdbarch.c: Regenerate.
13227
13228 2017-02-02  Pedro Alves  <palves@redhat.com>
13229
13230         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
13231         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
13232         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
13233         Adjust to call gdb_print_insn instead of
13234         gdb_disassembler::print_insn.
13235         (dump_insns, do_mixed_source_and_assembly_deprecated)
13236         (do_mixed_source_and_assembly, do_assembly_only): Add back a
13237         'gdbarch' parameter.  Remove gdb_disassembler parameter.
13238         (gdb_disassembly): Don't allocate a gdb_disassembler here.
13239         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
13240         declaration.
13241         (gdb_pretty_print_insn): Re-add declaration.
13242         * record-btrace.c (btrace_insn_history): Don't allocate a
13243         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
13244
13245 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
13246
13247         * disasm.h (gdb_disassembly): Remove file_string parameter.
13248         * disasm.c (gdb_disassembly): Likewise.
13249         * cli/cli-cmds.c (print_disassembly): Adapt.
13250         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
13251         * stack.c (do_gdb_disassembly): Likewise.
13252
13253 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13254
13255         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
13256         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
13257         targets.  And if the implicit value is longer than needed, extract
13258         the first bytes instead of the "least significant" ones.
13259
13260 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13261
13262         * btrace.c (btrace_enable): Do not call btrace_add_pc for
13263         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
13264         (btrace_fetch): Assert can_access_registers_ptid.
13265         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
13266         validate_registers_access.
13267
13268 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13269
13270         * gdbthread.h (can_access_registers_ptid): New.
13271         * thread.c (can_access_registers_ptid): New.
13272
13273 2017-02-01  Pedro Alves  <palves@redhat.com>
13274
13275         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
13276
13277 2017-01-31  Pedro Alves  <palves@redhat.com>
13278
13279         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
13280         Fix typos.
13281
13282 2017-01-31  Pedro Alves  <palves@redhat.com>
13283
13284         * stack.c (print_frame_args): Remove local mem_fileopen stream,
13285         not used.
13286
13287 2017-01-31  Pedro Alves  <palves@redhat.com>
13288
13289         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
13290
13291 2017-01-31  Pedro Alves  <palves@redhat.com>
13292
13293         * common/scoped_restore.h
13294         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
13295         change the value's parameter type to T2.
13296         (make_scoped_restore): Likewise.
13297
13298 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13299             Richard Henderson  <rth@redhat.com>
13300
13301         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
13302         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
13303         GS_BASE for older kernels.
13304         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
13305         GS_BASE for older kernels.
13306         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
13307         and GS_BASE to the offset table.
13308         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
13309         system register group.
13310         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
13311         for older kernels.
13312         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
13313         amd64 ABI.
13314         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
13315         AMD64_GSBASE_REGNUM.
13316         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
13317         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
13318         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
13319         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
13320         i386/64bit-segments.xml in those rules.
13321         * features/i386/64bit-segments.xml: New file.
13322         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
13323         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
13324         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
13325         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
13326         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
13327         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
13328         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
13329         * features/i386/amd64-avx-linux.c: Regenerated.
13330         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
13331         * features/i386/amd64-avx-mpx.c: Regenerated.
13332         * features/i386/amd64-avx512-linux.c: Regenerated.
13333         * features/i386/amd64-linux.c: Regenerated.
13334         * features/i386/amd64-mpx-linux.c: Regenerated.
13335         * features/i386/i386-avx-mpx-linux.c: Regenerated.
13336         * features/i386/i386-avx-mpx.c: Regenerated.
13337         * features/i386/x32-avx-linux.c: Regenerated.
13338         * features/i386/x32-avx512-linux.c: Regenerated.
13339         * regformats/i386/amd64-avx-linux.dat: Regenerated.
13340         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
13341         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
13342         * regformats/i386/amd64-linux.dat: Regenerated.
13343         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
13344         * regformats/i386/x32-avx-linux.dat: Regenerated.
13345         * regformats/i386/x32-avx512-linux.dat: Regenerated.
13346         * regformats/i386/x32-linux.dat: Regenerated.
13347
13348 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13349
13350         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
13351         Set to AMD64_NUM_REGS.
13352
13353 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13354
13355         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
13356         that checks validity of a register number.
13357
13358 2017-01-27  Kees Cook  <keescook@google.com>
13359
13360         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
13361         fetch_fpregs if target has fpa registers.
13362         (arm_linux_store_inferior_registers): Call store_fpregs if target
13363         has fpa registers.
13364
13365 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13366
13367         * cris-tdep.c (cris_gdbarch_init): Remove check for
13368         info.byte_order and force it to BFD_ENDIAN_LITTLE.
13369
13370 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
13371
13372         * corelow.c (get_core_register_section): Check for regset
13373         existence before checking for REGSET_VARIABLE_SIZE.
13374
13375 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13376             Pedro Alves  <palves@redhat.com>
13377
13378         PR gdb/20939
13379         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
13380         call memory_error, save memaddr instead.
13381         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
13382         negative, cal memory_error.
13383         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
13384
13385 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13386
13387         * disasm-selftests.c (memory_error_test): New function.
13388         (_initialize_disasm_selftests): Register memory_error_test.
13389
13390 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13391
13392         * Makefile.in (SFILES): Add disasm-selftests.c and
13393         selftest-arch.c.
13394         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
13395         * disasm-selftests.c: New file.
13396         * selftest-arch.c: New file.
13397         * selftest-arch.h: New file.
13398
13399 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13400
13401         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
13402         to bfd_arch_mep.  Don't return 0 if section is not
13403         found.  Call print_insn_mep.
13404
13405 2017-01-26  Pedro Alves  <palves@redhat.com>
13406             Yao Qi  <yao.qi@linaro.org>
13407
13408         * arm-tdep.c: Include "disasm.h".
13409         (gdb_print_insn_arm): Update code to get gdbarch.
13410         * disasm.c (dis_asm_read_memory): Change it to
13411         gdb_disassembler::dis_asm_read_memory.
13412         (dis_asm_memory_error): Likewise.
13413         (dis_asm_print_address): Likewise.
13414         (gdb_pretty_print_insn): Change it to
13415         gdb_disassembler::pretty_print_insn.
13416         (dump_insns): Add one argument gdb_disassemlber.  All
13417         callers updated.
13418         (do_mixed_source_and_assembly_deprecated): Likewise.
13419         (do_mixed_source_and_assembly): Likewise.
13420         (do_assembly_only): Likewise.
13421         (gdb_disassembler::gdb_disassembler): New.
13422         (gdb_disassembler::print_insn): New.
13423         * disasm.h (class gdb_disassembler): New.
13424         (gdb_pretty_print_insn): Remove declaration.
13425         (gdb_disassemble_info): Likewise.
13426         * guile/scm-disasm.c (class gdbscm_disassembler): New.
13427         (gdbscm_disasm_read_memory_worker): Update.
13428         (gdbscm_disasm_read_memory): Update.
13429         (gdbscm_disasm_memory_error): Remove.
13430         (gdbscm_disasm_print_address): Remove.
13431         (gdbscm_disassembler::gdbscm_disassembler): New.
13432         (gdbscm_print_insn_from_port): Update.
13433         * mips-tdep.c: Include disasm.h.
13434         (gdb_print_insn_mips): Update code to get gdbarch.
13435         * record-btrace.c (btrace_insn_history): Update.
13436         * spu-tdep.c: Include disasm.h.
13437         (struct spu_dis_asm_data): Remove.
13438         (struct spu_dis_asm_info): New.
13439         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
13440         SPU id.
13441         (gdb_print_insn_spu): Cast disassemble_info to
13442         spu_dis_asm_info.
13443
13444 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13445
13446         * disasm.c (do_ui_file_delete): Delete.
13447         (gdb_insn_length): Move code creating stream to ...
13448         * utils.c (null_stream): ... here.  New function.
13449         * utils.h (null_stream): Declare.
13450
13451 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
13452
13453         * python/py-inferior.c (find_thread_object): Return directly
13454         from the loop.  Remove "found" variable.
13455
13456 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
13457
13458         GDB 7.12.1 released.
13459
13460 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
13461
13462         * python/py-function.c (fnpy_call): Reorder declarations to have
13463         the gdbpy_enter object declared first.
13464         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
13465
13466 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
13467
13468         PR python/21068
13469         * python/python-internal.h (PyMem_RawMalloc): Define for
13470         Python < 3.4.
13471         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
13472         PyMem_RawMalloc instead of PyMem_Malloc.
13473
13474 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
13475             Luis Machado  <lgustavo@codesourcery.com>
13476
13477         * NEWS (New commands): Mention flash-erase.
13478         (New MI commands): Mention target-flash-erase.
13479         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
13480         command.
13481         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
13482         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
13483         * target.c (flash_erase_command): New function.
13484         (initialize_targets): Add new flash-erase command.
13485         * target.h (flash_erase_command): New declaration.
13486
13487 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
13488
13489         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
13490         HAVE_SYS_PROCFS_H is defined.
13491
13492 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
13493
13494         * remote.c (struct cached_reg): Change data into a pointer.
13495         * (stop_reply_dtr): Free data pointers before deleting vector.
13496         (process_stop_reply): Likewise.
13497         (remote_parse_stop_reply): Allocate space for data
13498
13499 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
13500
13501         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
13502         MAX_REGISTER_SIZE.
13503         (amd64_pseudo_register_read_value): Likewise.
13504         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
13505         (store_register_using_P): Likewise.
13506         * regcache.c (regcache_xfer_part): Likewise.
13507
13508 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
13509
13510         Split real and pseudo registers.
13511         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
13512         (sparc32_pseudo_regnum): New enum.
13513         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
13514         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
13515         (SPARC32_CP0_REGISTERS): New macro.
13516         (sparc32_pseudo_register_name): New function.
13517         (sparc32_register_name): Use sparc32_pseudo_register_name.
13518         (sparc32_pseudo_register_type): New function.
13519         (sparc32_register_type): Use sparc32_pseudo_register_type.
13520         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
13521         pseudo register numbers.
13522         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
13523         (SPARC64_CP0_REGISTERS): New macro.
13524         (sparc64_pseudo_register_name): New function.
13525         (sparc64_register_name): Use sparc64_pseudo_register_name.
13526         (sparc64_pseudo_register_type): New function.
13527         (sparc64_register_type): Use sparc64_pseudo_register_type.
13528         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
13529         pseudo register numbers.
13530         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
13531         sparc64_store_arguments): Handle pseudo register numbers.
13532
13533 2017-01-13  Yao Qi  <yao.qi@linaro.org>
13534
13535         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
13536         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
13537         output.
13538         (getpkt_or_notif_sane_1): Likewise.
13539
13540 2017-01-13  Yao Qi  <yao.qi@linaro.org>
13541
13542         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
13543         of CC.  Pass "-x c++-header" instead of "-x c".
13544
13545 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13546
13547         * remote.c (remote_can_async_p): Update comment.
13548
13549 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13550
13551         * linux-nat.c (linux_nat_can_async_p): Update comment.
13552
13553 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13554
13555         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
13556
13557 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
13558
13559         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
13560
13561 2017-01-10  Tom Tromey  <tom@tromey.com>
13562
13563         * python/py-type.c (typy_legacy_template_argument): Update.
13564         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
13565         ~demangle_parse_info): Declare new members.
13566         (cp_demangled_name_to_comp): Return unique_ptr.
13567         (cp_demangled_name_parse_free)
13568         (make_cleanup_cp_demangled_name_parse_free)
13569         (cp_new_demangle_parse_info): Remove.
13570         * cp-support.c (do_demangled_name_parse_free_cleanup)
13571         (make_cleanup_cp_demangled_name_parse_free): Remove.
13572         (inspect_type, cp_canonicalize_string_full)
13573         (cp_canonicalize_string): Update.
13574         (mangled_name_to_comp): Change return type.
13575         (cp_class_name_from_physname, method_name_from_physname)
13576         (cp_func_name, cp_remove_params): Update.
13577         * cp-name-parser.y (demangle_parse_info): New constructor, from
13578         cp_new_demangle_parse_info.
13579         (~demangle_parse_info): New destructor, from
13580         cp_demangled_name_parse_free.
13581         (cp_merge_demangle_parse_infos): Update.
13582         (cp_demangled_name_to_comp): Change return type.
13583
13584 2017-01-10  Tom Tromey  <tom@tromey.com>
13585
13586         * top.c (prevent_dont_repeat): Change return type.
13587         * python/python.c (execute_gdb_command): Use std::string.
13588         Update.
13589         * guile/guile.c (gdbscm_execute_gdb_command): Update.
13590         * command.h (prevent_dont_repeat): Change return type.
13591         * breakpoint.c (bpstat_do_actions_1): Update.
13592
13593 2017-01-10  Tom Tromey  <tom@tromey.com>
13594
13595         * value.h (scoped_value_mark::~scoped_value_mark): Call
13596         free_to_mark.
13597         (scoped_value_mark::free_to_mark): New method.
13598         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
13599         scoped_value_mark.
13600
13601 2017-01-10  Tom Tromey  <tom@tromey.com>
13602
13603         * python/py-value.c (valpy_dereference, valpy_referenced_value)
13604         (valpy_reference_value, valpy_const_value, valpy_get_address)
13605         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
13606         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
13607         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
13608         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
13609         scoped_value_mark.
13610         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
13611         * value.h (scoped_value_mark): New class.
13612
13613 2017-01-10  Tom Tromey  <tom@tromey.com>
13614
13615         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
13616         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
13617         * psymtab.c (discard_psymtabs_upto): Remove.
13618         (make_cleanup_discard_psymtabs): Remove.
13619         (struct psymtab_state): Remove.
13620
13621 2017-01-10  Tom Tromey  <tom@tromey.com>
13622
13623         * record-full.c (record_full_save_cleanups): Remove.
13624         (record_full_save): Use gdb::unlinker.
13625         * gcore.c (do_bfd_delete_cleanup): Remove.
13626         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
13627         cleanups.
13628         * dwarf2read.c (unlink_if_set): Remove.
13629         (write_psymtabs_to_index): Use gdb::unlinker.
13630         * common/gdb_unlinker.h: New file.
13631
13632 2017-01-10  Tom Tromey  <tom@tromey.com>
13633
13634         * windows-tdep.c (windows_xfer_shared_library): Update.
13635         * windows-nat.c (windows_make_so): Update.
13636         * utils.h (make_cleanup_bfd_unref): Remove.
13637         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
13638         * symfile.h (symfile_bfd_open)
13639         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
13640         * symfile.c (read_symbols, symbol_file_add)
13641         (separate_debug_file_exists): Update.
13642         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
13643         (generic_load, reread_symbols): Update.
13644         * symfile-mem.c (symbol_file_add_from_memory): Update.
13645         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
13646         (spu_symbol_file_add_from_memory): Update.
13647         * solist.h (struct target_so_ops) <bfd_open>: Return
13648         gdb_bfd_ref_ptr.
13649         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
13650         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
13651         gdb_bfd_ref_ptr.
13652         (solib_map_sections, reload_shared_libraries_1): Update.
13653         * solib-svr4.c (enable_break): Update.
13654         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
13655         * solib-frv.c (enable_break2): Update.
13656         * solib-dsbt.c (enable_break): Update.
13657         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
13658         gdb_bfd_ref_ptr.
13659         (darwin_solib_get_all_image_info_addr_at_init): Update.
13660         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
13661         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
13662         * record-full.c (record_full_save): Update.
13663         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
13664         * procfs.c (insert_dbx_link_bpt_in_file): Update.
13665         * minidebug.c (find_separate_debug_file_in_section): Return
13666         gdb_bfd_ref_ptr.
13667         * machoread.c (macho_add_oso_symfile): Change abfd to
13668         gdb_bfd_ref_ptr.
13669         (macho_symfile_read_all_oso): Update.
13670         (macho_check_dsym): Return gdb_bfd_ref_ptr.
13671         (macho_symfile_read): Update.
13672         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
13673         (jit_bfd_try_read_symtab): Update.
13674         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13675         (gdb_bfd_openw, gdb_bfd_openr_iovec)
13676         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13677         gdb_bfd_ref_ptr.
13678         (gdb_bfd_ref_policy): New struct.
13679         (gdb_bfd_ref_ptr): New typedef.
13680         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13681         (gdb_bfd_openw, gdb_bfd_openr_iovec)
13682         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13683         gdb_bfd_ref_ptr.
13684         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13685         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13686         (gcore_command): Update.
13687         * exec.c (exec_file_attach): Update.
13688         * elfread.c (elf_symfile_read): Update.
13689         * dwarf2read.c (dwarf2_get_dwz_file): Update.
13690         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
13691         (open_and_init_dwo_file): Update.
13692         (open_dwp_file): Return gdb_bfd_ref_ptr.
13693         (open_and_init_dwp_file): Update.
13694         * corelow.c (core_open): Update.
13695         * compile/compile-object-load.c (compile_object_load): Update.
13696         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
13697         * coffread.c (coff_symfile_read): Update.
13698         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
13699         gdb_bfd_ref_ptr.  Rename.
13700         (dump_bfd_file, restore_command): Update.
13701         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13702         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13703         (find_separate_debug_file_by_buildid): Update.
13704
13705 2017-01-10  Tom Tromey  <tom@tromey.com>
13706
13707         * common/gdb_ref_ptr.h: New file.
13708         * python/py-ref.h (struct gdbpy_ref_policy): New.
13709         (gdbpy_ref): Now a typedef.
13710
13711 2017-01-10  Tom Tromey  <tom@tromey.com>
13712
13713         * utils.h (make_cleanup_htab_delete): Don't declare.
13714         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
13715         Remove.
13716         * linespec.c (decode_compound_collector): Add constructor,
13717         destructor.
13718         (lookup_prefix_sym): Remove cleanup.
13719         (symtab_collector): Add constructor, destructor.
13720         (collect_symtabs_from_filename): Remove cleanup.
13721         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
13722         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
13723         Use htab_up.
13724         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
13725         * dwarf2read.c (dw2_expand_symtabs_matching)
13726         (dw2_map_symbol_filenames, dwarf_decode_macros)
13727         (write_psymtabs_to_index): Use htab_up.
13728         * dwarf2loc.c (func_verify_no_selftailcall)
13729         (call_site_find_chain_1, func_verify_no_selftailcall)
13730         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
13731         std::vector, gdb::unique_xmalloc_ptr.
13732         (call_sitep): Remove typedef.
13733         (dwarf2_locexpr_baton_eval): Remove unused variable.
13734
13735 2017-01-10  Tom Tromey  <tom@tromey.com>
13736
13737         * python/python-internal.h (make_cleanup_py_decref)
13738         (make_cleanup_py_xdecref): Don't declare.
13739         * python/py-utils.c (py_decref, make_cleanup_py_decref)
13740         (py_xdecref, make_cleanup_py_xdecref): Remove.
13741
13742 2017-01-10  Tom Tromey  <tom@tromey.com>
13743
13744         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
13745         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
13746
13747 2017-01-10  Tom Tromey  <tom@tromey.com>
13748
13749         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
13750
13751 2017-01-10  Tom Tromey  <tom@tromey.com>
13752
13753         * python/py-utils.c (unicode_to_encoded_string)
13754         (python_string_to_target_string)
13755         (python_string_to_target_python_string)
13756         (python_string_to_host_string, gdbpy_obj_to_string)
13757         (get_addr_from_python): Use gdbpy_ref.
13758
13759 2017-01-10  Tom Tromey  <tom@tromey.com>
13760
13761         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
13762         gdbpy_ref.
13763
13764 2017-01-10  Tom Tromey  <tom@tromey.com>
13765
13766         * python/python.c (eval_python_command, gdbpy_decode_line)
13767         (gdbpy_run_events, gdbpy_start_type_printers)
13768         (gdbpy_apply_type_printers): Use gdbpy_ref.
13769
13770 2017-01-10  Tom Tromey  <tom@tromey.com>
13771
13772         * python/py-param.c (get_doc_string, compute_enum_values): Use
13773         gdbpy_ref.
13774
13775 2017-01-10  Tom Tromey  <tom@tromey.com>
13776
13777         * python/py-inferior.c (find_thread_object, build_inferior_list):
13778         Use gdbpy_ref.
13779
13780 2017-01-10  Tom Tromey  <tom@tromey.com>
13781
13782         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13783
13784 2017-01-10  Tom Tromey  <tom@tromey.com>
13785
13786         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
13787         gdbpy_ref.
13788
13789 2017-01-10  Tom Tromey  <tom@tromey.com>
13790
13791         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
13792         extra incref.
13793         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
13794         Use gdbpy_ref.
13795
13796 2017-01-10  Tom Tromey  <tom@tromey.com>
13797
13798         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
13799         gdbpy_ref.
13800
13801 2017-01-10  Tom Tromey  <tom@tromey.com>
13802
13803         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
13804         decref results of PyArg_ParseTupleAndKeywords.
13805
13806 2017-01-10  Tom Tromey  <tom@tromey.com>
13807
13808         * python/python.c (python_run_simple_file): Use
13809         unique_xmalloc_ptr, gdbpy_ref.
13810
13811 2017-01-10  Tom Tromey  <tom@tromey.com>
13812
13813         * python/py-prettyprint.c (print_stack_unless_memory_error)
13814         (print_string_repr, print_children): Use gdbpy_ref.
13815         (dummy_python_frame): New class.
13816         (dummy_python_frame::dummy_python_frame): Rename from
13817         push_dummy_python_frame.
13818         (py_restore_tstate): Remove.
13819
13820 2017-01-10  Tom Tromey  <tom@tromey.com>
13821
13822         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13823
13824 2017-01-10  Tom Tromey  <tom@tromey.com>
13825
13826         * python/python.c (ensure_python_env, restore_python_env):
13827         Remove.
13828         * python/python-internal.h (ensure_python_env): Don't declare.
13829         * varobj.h (varobj_ensure_python_env): Don't declare.
13830         * varobj.c (varobj_ensure_python_env): Remove.
13831
13832 2017-01-10  Tom Tromey  <tom@tromey.com>
13833
13834         * varobj.c (varobj_value_get_print_value): Use
13835         gdbpy_enter_varobj.
13836
13837 2017-01-10  Tom Tromey  <tom@tromey.com>
13838
13839         * python/py-prettyprint.c (print_string_repr, print_children):
13840         Update.
13841         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
13842         of "encoding".
13843         * varobj.c (varobj_value_get_print_value): Update.
13844         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
13845
13846 2017-01-10  Tom Tromey  <tom@tromey.com>
13847
13848         * varobj.c (varobj_get_display_hint)
13849         (dynamic_varobj_has_child_method, install_new_value_visualizer)
13850         (varobj_set_visualizer, free_variable): Use
13851         gdbpy_enter_varobj.
13852
13853 2017-01-10  Tom Tromey  <tom@tromey.com>
13854
13855         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
13856         (do_finish_initialization): New function.  Use gdbpy_ref.
13857         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
13858         do_finish_initialization.
13859
13860 2017-01-10  Tom Tromey  <tom@tromey.com>
13861
13862         * python/py-param.c (get_set_value, get_show_value): Use
13863         gdbpy_enter, gdbpy_ref.
13864
13865 2017-01-10  Tom Tromey  <tom@tromey.com>
13866
13867         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
13868
13869 2017-01-10  Tom Tromey  <tom@tromey.com>
13870
13871         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
13872
13873 2017-01-10  Tom Tromey  <tom@tromey.com>
13874
13875         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
13876         Use gdbpy_enter_varobj.
13877
13878 2017-01-10  Tom Tromey  <tom@tromey.com>
13879
13880         * varobj.c (gdbpy_enter_varobj): New constructor.
13881         * python/python-internal.h (gdbpy_enter_varobj): New class.
13882         * python/py-varobj.c (py_varobj_get_iterator): Use
13883         gdbpy_enter_varobj.
13884
13885 2017-01-10  Tom Tromey  <tom@tromey.com>
13886
13887         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
13888         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
13889         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
13890         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
13891         unique_xmalloc_ptr.
13892         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
13893
13894 2017-01-10  Tom Tromey  <tom@tromey.com>
13895
13896         * python/py-xmethods.c (invoke_match_method): Use
13897         gdbpy_ref.
13898
13899 2017-01-10  Tom Tromey  <tom@tromey.com>
13900
13901         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
13902         gdbpy_enter, gdbpy_ref.
13903
13904 2017-01-10  Tom Tromey  <tom@tromey.com>
13905
13906         * python/python.c (python_interactive_command): Use gdbpy_enter.
13907
13908 2017-01-10  Tom Tromey  <tom@tromey.com>
13909
13910         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
13911         gdbpy_ref.
13912
13913 2017-01-10  Tom Tromey  <tom@tromey.com>
13914
13915         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
13916         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
13917
13918 2017-01-10  Tom Tromey  <tom@tromey.com>
13919
13920         * utils.h (htab_deleter): New struct.
13921         (htab_up): New typedef.
13922         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
13923         gdbpy_enter, gdbpy_ref, htab_up.
13924
13925 2017-01-10  Tom Tromey  <tom@tromey.com>
13926
13927         * python/py-unwind.c (pending_frame_invalidate): Remove.
13928         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
13929
13930 2017-01-10  Tom Tromey  <tom@tromey.com>
13931
13932         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
13933         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
13934
13935 2017-01-10  Tom Tromey  <tom@tromey.com>
13936
13937         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
13938
13939 2017-01-10  Tom Tromey  <tom@tromey.com>
13940
13941         * python/python.c (gdbpy_eval_from_control_command)
13942         (gdbpy_source_script, gdbpy_run_events)
13943         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
13944         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
13945         gdbpy_enter.
13946
13947 2017-01-10  Tom Tromey  <tom@tromey.com>
13948
13949         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
13950
13951 2017-01-10  Tom Tromey  <tom@tromey.com>
13952
13953         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
13954
13955 2017-01-10  Tom Tromey  <tom@tromey.com>
13956
13957         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
13958         (python_on_inferior_call_pre, python_on_inferior_call_post)
13959         (python_on_memory_change, python_on_register_change)
13960         (python_inferior_exit, python_new_objfile, add_thread_object)
13961         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
13962
13963 2017-01-10  Tom Tromey  <tom@tromey.com>
13964
13965         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
13966         (bpfinishpy_handle_exit): Use gdbpy_enter.
13967
13968 2017-01-10  Tom Tromey  <tom@tromey.com>
13969
13970         * python/py-cmd.c (cmdpy_destroyer)
13971         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
13972         gdbpy_enter.
13973
13974 2017-01-10  Tom Tromey  <tom@tromey.com>
13975
13976         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
13977         gdbpy_enter.
13978         (gdbpy_breakpoint_has_cond): Likewise.
13979
13980 2017-01-10  Tom Tromey  <tom@tromey.com>
13981
13982         * python/python.c (gdbpy_enter): New constructor.
13983         (~gdbpy_enter): New destructor.
13984         (restore_python_env, ensure_python_env): Rewrite.
13985         * python/python-internal.h (gdbpy_enter): New class.
13986
13987 2017-01-10  Tom Tromey  <tom@tromey.com>
13988
13989         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
13990
13991 2017-01-10  Tom Tromey  <tom@tromey.com>
13992
13993         * python/py-value.c (value_has_field, get_field_flag)
13994         (get_field_type, valpy_getitem, convert_value_from_python): Use
13995         gdbpy_ref.
13996
13997 2017-01-10  Tom Tromey  <tom@tromey.com>
13998
13999         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
14000         gdbpy_ref.
14001
14002 2017-01-10  Tom Tromey  <tom@tromey.com>
14003
14004         * python/py-prettyprint.c (search_pp_list)
14005         (find_pretty_printer_from_objfiles)
14006         (find_pretty_printer_from_progspace)
14007         (find_pretty_printer_from_gdb, find_pretty_printer)
14008         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
14009         gdbpy_ref.
14010
14011 2017-01-10  Tom Tromey  <tom@tromey.com>
14012
14013         * python/py-param.c (call_doc_function): Use gdbpy_ref.
14014
14015 2017-01-10  Tom Tromey  <tom@tromey.com>
14016
14017         * python/py-linetable.c (build_line_table_tuple_from_pcs)
14018         (ltpy_get_all_source_lines): Use gdbpy_ref.
14019
14020 2017-01-10  Tom Tromey  <tom@tromey.com>
14021
14022         * python/py-framefilter.c (extract_sym, extract_value)
14023         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
14024         gdbpy_ref.
14025
14026 2017-01-10  Tom Tromey  <tom@tromey.com>
14027
14028         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
14029
14030 2017-01-10  Tom Tromey  <tom@tromey.com>
14031
14032         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
14033
14034 2017-01-10  Tom Tromey  <tom@tromey.com>
14035
14036         * python/py-function.c (convert_values_to_python, fnpy_init): Use
14037         gdbpy_ref.
14038
14039 2017-01-10  Tom Tromey  <tom@tromey.com>
14040
14041         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
14042
14043 2017-01-10  Tom Tromey  <tom@tromey.com>
14044
14045         * python/py-type.c (convert_field, make_fielditem, typy_fields)
14046         (typy_range): Use gdbpy_ref.
14047
14048 2017-01-10  Tom Tromey  <tom@tromey.com>
14049
14050         * python/py-threadevent.c (create_thread_event_object): Use
14051         gdbpy_ref.
14052         * python/py-stopevent.c (create_stop_event_object): Simplify.
14053         (emit_stop_event): Use gdbpy_ref.
14054         * python/py-signalevent.c (create_signal_event_object): Use
14055         gdbpy_ref.
14056         * python/py-newobjfileevent.c (create_new_objfile_event_object)
14057         (emit_new_objfile_event, create_clear_objfiles_event_object)
14058         (emit_clear_objfiles_event): Use gdbpy_ref.
14059         * python/py-infevents.c (create_inferior_call_event_object)
14060         (create_register_changed_event_object)
14061         (create_memory_changed_event_object, emit_inferior_call_event)
14062         (emit_memory_changed_event, emit_register_changed_event): Use
14063         gdbpy_ref.
14064         * python/py-exitedevent.c (create_exited_event_object)
14065         (emit_exited_event): Use gdbpy_ref.
14066         * python/py-event.h (evpy_emit_event): Remove
14067         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
14068         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
14069         * python/py-continueevent.c (emit_continue_event): Use
14070         gdbpy_ref.
14071         * python/py-breakpoint.c (gdbpy_breakpoint_created)
14072         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
14073         gdbpy_ref.
14074         * python/py-bpevent.c (create_breakpoint_event_object): Use
14075         gdbpy_ref.
14076
14077 2017-01-10  Tom Tromey  <tom@tromey.com>
14078
14079         * python/py-ref.h: New file.
14080
14081 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
14082
14083         * cli-out.c (cli_ui_out::do_redirect): Change return type to
14084         void.
14085         * cli-out.h (cli_ui_out::do_redirect): Likewise.
14086         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
14087         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
14088         * ui-out.c (ui_out::redirect): Likewise.
14089         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
14090         * cli/cli-logging.c (set_logging_redirect): Update call site of
14091         ui_out::redirect.
14092         (handle_redirections): Likewise.
14093         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
14094         * top.c (execute_command_to_string): Likewise.
14095         * utils.c (do_ui_out_redirect_pop): Likewise.
14096
14097 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
14098
14099         * stack.c (_initialize_stack): Update "frame" command help message.
14100
14101 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
14102
14103         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
14104
14105 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14106
14107         * x86-linux-nat.h: Include gdb_proc_service.h.
14108
14109 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14110
14111         * ser-base.h: Include serial.h.
14112
14113 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14114
14115         * ppc-linux-tdep.h: Include ppc-tdep.h.
14116
14117 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14118
14119         * nat/amd64-linux-siginfo.h: Include signal.h.
14120
14121 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14122
14123         * nat/aarch64-linux-hw-point.h: Include break-common.h.
14124
14125 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14126
14127         * mi/mi-parse.h: Include mi-cmds.h.
14128
14129 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14130
14131         * inf-loop.c: Don't include "target.h".
14132         * inf-loop.h: Include it here.
14133
14134 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14135
14136         * dfp.h: Include "dboulest.h" and "expression.h".
14137
14138 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14139
14140         * ax-gdb.h: Include "ax.h".
14141
14142 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14143
14144         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
14145         with nat/gdb_ptrace.h.
14146
14147 2017-01-05  Yao Qi  <yao.qi@linaro.org>
14148
14149         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
14150         new line.
14151         (mips64_fbsd_sigframe_init): Likewise.
14152
14153 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14154
14155         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
14156         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
14157
14158 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14159
14160         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
14161         * NEWS: Mention new FreeBSD/mips native configuration.
14162         * config/mips/fbsd.mh: New file.
14163         * configure.host: Add mips*-*-freebsd*.
14164         * mips-fbsd-nat.c: New file.
14165
14166 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14167
14168         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
14169         (ALLDEPFILES): Add mips-fbsd-tdep.c.
14170         * NEWS: Mention new FreeBSD/mips target.
14171         * configure.tgt: Add mips*-*-freebsd*.
14172         * mips-fbsd-tdep.c: New file.
14173         * mips-fbsd-tdep.h: New file.
14174
14175 2017-01-04  Yao Qi  <yao.qi@linaro.org>
14176
14177         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
14178         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
14179
14180 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14181
14182         Update copyright year range in all GDB files.
14183
14184 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14185
14186         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
14187
14188 For older changes see ChangeLog-2016.
14189 \f
14190 Local Variables:
14191 mode: change-log
14192 left-margin: 8
14193 fill-column: 74
14194 version-control: never
14195 coding: utf-8
14196 End: