5a680edd85d0dbc3370fd2610496bd1a34c9e551
[external/binutils.git] / gdb / ChangeLog
1 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
2
3         * common/common-utils.h (in_inclusive_range): New function.
4         * arm-tdep.c (arm_record_extension_space): Use
5         in_inclusive_range.
6         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
7         * cris-tdep.c (cris_spec_reg_applicable): Use
8         in_inclusive_range.
9
10 2017-10-30  Pedro Alves  <palves@redhat.com>
11             Simon Marchi <simon.marchi@ericsson.com>
12
13         * remote.c (remote_set_syscall_catchpoint): Build a std::string
14         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
15
16 2017-10-30  Pedro Alves  <palves@redhat.com>
17
18         * common/common-utils.c (string_appendf, string_vappendf): New
19         functions.
20         * common/common-utils.h (string_appendf, string_vappendf): New
21         declarations.
22         * unittests/common-utils-selftests.c (string_appendf_func)
23         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
24         (string_vappendf_tests): New functions.
25         (_initialize_common_utils_selftests): Register "string_appendf" and
26         "string_vappendf tests".
27
28 2017-10-30  Pedro Alves  <palves@redhat.com>
29
30         * unittests/common-utils-selftests.c (format_func): New typedef.
31         (string_printf_tests, string_vprintf_tests): Tests factored out
32         and merged to ...
33         (test_format_func): ... this new function.
34         (string_printf_tests, string_vprintf_tests): Reimplement on top of
35         test_format_func.
36
37 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
38
39         * darwin-nat.c: Remove include of gdb.h.
40
41 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
42
43         * xtensa-xtregs.c: Fix formatting issues.
44
45 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
46
47         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
48
49 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
50
51         PR python/21213
52         * python/py-infthread.c (thpy_get_inferior): Increment reference
53         of inferior before returning it.
54
55 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
56
57         * unittests/common-utils-selftests.c (format): Add
58         ATTRIBUTE_PRINTF.
59
60 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
61
62         * xml-syscall.c (struct syscall_desc): Add constructor.
63         <name>: Change type to std::string.
64         (syscall_desc_up): New typedef.
65         (syscall_desc_p): Remove typeder.
66         (DEF_VEC_P(syscall_desc_p)): Remove.
67         (struct syscall_group_desc): Add constructor.
68         <name>: Change type to std::string.
69         <syscalls>: Change type to std::vector.
70         (syscall_group_desc_up): New typedef.
71         (syscall_group_desc_p): Remove typedef.
72         (DEF_VEC_P(syscall_group_desc_p)): Remove.
73         (struct syscalls_info) <syscalls>: Change type to std::vector of
74         unique_ptr.
75         <groups>: Likewise.
76         <my_gdb_datadir>: Change type to std::string.
77         (syscalls_info_up): New typedef.
78         (allocate_syscalls_info): Remove.
79         (syscalls_info_free_syscalls_desc): Remove.
80         (syscalls_info_free_syscall_group_desc): Remove.
81         (free_syscalls_info): Remove.
82         (make_cleanup_free_syscalls_info): Remove.
83         (syscall_group_create_syscall_group_desc): Adjust.
84         (syscall_group_add_syscall): Adjust.
85         (syscall_create_syscall_desc): Adjust.
86         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
87         (init_syscalls_info): Adjust.
88         (syscall_group_get_group_by_name): Adjust.
89         (xml_get_syscall_number): Adjust.
90         (xml_get_syscall_name): Adjust.
91         (xml_list_of_syscalls): Adjust.
92         (xml_list_syscalls_by_group): Adjust.
93         (xml_list_of_groups): Adjust.
94
95 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
96
97         * probe.h: Don't include gdb_vecs.h.
98         (DEF_VEC_P (probe_p)): Remove.
99         (find_probes_in_objfile): Return an std::vector.
100         * probe.c (find_probes_in_objfile): Likewise.
101         * breakpoint.c (breakpoint_objfile_data)
102         <longjmp_probes>: Change type to std::vector.
103         <exception_probes>: Likewise.
104         (free_breakpoint_probes): Don't manually free vectors.
105         (create_longjmp_master_breakpoint): Adjust.
106         (create_exception_master_breakpoint): Adjust.
107         * solib-svr4.c (svr4_create_probe_breakpoints): Change
108         parameter type, adjust.
109         (svr4_create_solib_event_breakpoints): Adjust.
110
111 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
112
113         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
114         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
115         with new.
116         (free_breakpoint_probes): Rename to ...
117         (free_breakpoint_objfile_data): ... this, and call delete on
118         bp_objfile_data..
119
120 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
121
122         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
123         (loaded_script_ptr): Remove typedef.
124         (DEF_VEC_P (loaded_script_ptr)): Remove.
125         (struct collect_matching_scripts_data): Add constructor.
126         <scripts_p>: Change type to (pointer to) std::vector.
127         (collect_matching_scripts_data): Adjust.
128         (sort_scripts_by_name): Make suitable for std::sort.
129         (print_scripts): Don't sort vector, adjust to std::vector.
130         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
131
132 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
133
134         * symfile.c (filename_language): Make struct, not typedef.  Add
135         constructor.
136         <ext>: Change type to std::string.
137         (DEF_VEC_O (filename_language)): Remove.
138         (filename_language_table): Change type to std::vector.
139         (add_filename_language): Adjust.
140         (set_ext_lang_command): Adjust.
141         (info_ext_lang_command): Adjust.
142         (deduce_language_from_filename): Adjust.
143         (class scoped_restore_filename_language_table): Remove.
144         (test_filename_language): Use scoped_restore.
145         (test_set_ext_lang_command): Use scoped_restore, adjust to
146         std::vector change.
147
148 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
149
150         * symfile.c: Include selftest.h.
151         (class scoped_restore_filename_language_table): New.
152         (test_filename_language): New test.
153         (test_set_ext_lang_command): New test.
154         (_initialize_symfile): Register tests.
155
156 2017-10-27  Keith Seitz  <keiths@redhat.com>
157
158         * breakpoint.c (print_breakpoint_location): Use the symbol saved
159         in the bp_location, falling back to find_pc_sect_function when
160         needed.
161         (add_location_to_breakpoint): Save sal->symbol.
162         * breakpoint.h (struct bp_location) <symbol>: New field.
163         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
164         * symtab.h (struct symtab_and_line) <symbol>: New field.
165
166 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
167
168         PR gdb/13669
169         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
170         to rewind obstack.
171
172 2017-10-26  Pedro Alves  <palves@redhat.com>
173
174         * remote.c (remote_async_terminal_ours_p): Delete.
175         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
176         Remove references to 'remote_async_terminal_ours_p'.
177
178 2017-10-26  Yao Qi  <yao.qi@linaro.org>
179
180         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
181
182 2017-10-26  Yao Qi  <yao.qi@linaro.org>
183
184         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
185         aspace const.
186         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
187         Likewise.
188         * breakpoint.c (bpstat_check_location): Remove cast.
189         (breakpoint_hit_catch_fork): Make aspce const.
190         (breakpoint_hit_catch_solib): Likewise.
191         (breakpoint_hit_catch_exec): Likewise.
192         (breakpoint_hit_ranged_breakpoint): Likewise.
193         (breakpoint_hit_watchpoint): Likewise.
194         (base_breakpoint_breakpoint_hit): Likewise.
195         (bkpt_breakpoint_hit): Likewise.
196         (dprintf_breakpoint_hit): Likewise.
197         (tracepoint_breakpoint_hit): Likewise.
198         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
199
200 2017-10-26  Yao Qi  <yao.qi@linaro.org>
201
202         * breakpoint.c (breakpoint_location_address_match): Change
203         "struct address_space *" to "const address_space".
204         (breakpoint_location_address_range_overlap): Likewise.
205         (breakpoint_here_p): Likewise.
206         (breakpoint_in_range_p): Likewise.
207         (moribund_breakpoint_here_p): Likewise.
208         (bp_location_inserted_here_p): Likewise.
209         (software_breakpoint_inserted_here_p): Likewise.
210         (hardware_breakpoint_inserted_here_p): Likewise.
211         (hardware_watchpoint_inserted_in_range): Likewise.
212         (bpstat_check_location): Likewise.
213         (bpstat_stop_status): Likewise.
214         (breakpoint_address_match): Likewise.
215         (breakpoint_address_match_range): Likewise.
216         (breakpoint_location_address_match): Likewise.
217         (breakpoint_location_address_range_overlap): Likewise.
218         (insert_single_step_breakpoint): Likewise.
219         (breakpoint_has_location_inserted_here): Likewise.
220         (single_step_breakpoint_inserted_here_p): Likewise.
221         (pc_at_non_inline_function): Likewise.
222         * breakpoint.h (bpstat_stop_status): Update declaration.
223         (breakpoint_here_p): Likewise.
224         (breakpoint_in_range_p): Likewise.
225         (moribund_breakpoint_here_p): Likewise.
226         (breakpoint_inserted_here_p): Likewise.
227         (software_breakpoint_inserted_here_p): Likewise.
228         (hardware_breakpoint_inserted_here_p): Likewise.
229         (breakpoint_has_location_inserted_here): Likewise.
230         (single_step_breakpoint_inserted_here_p): Likewise.
231         (hardware_watchpoint_inserted_in_range): Likewise.
232         (breakpoint_address_match): Likewise.
233         (insert_single_step_breakpoint): Likewise.
234         (pc_at_non_inline_function): Likewise.
235         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
236         * record.c (record_check_stopped_by_breakpoint): Likewise.
237         * record.h (record_check_stopped_by_breakpoint): Likewise.
238         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
239
240 2017-10-25  Yao Qi  <yao.qi@linaro.org>
241
242         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
243         regcache->arch () instead get_regcache_arch.
244         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
245         Likewise.
246         (aarch64_fbsd_store_inferior_registers): Likewise.
247         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
248         (store_gregs_to_thread): Likewise.
249         (fetch_fpregs_from_thread): Likewise.
250         (store_fpregs_to_thread): Likewise.
251         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
252         (aarch64_store_return_value): Likewise.
253         (aarch64_software_single_step): Likewise.
254         * aix-thread.c (aix_thread_wait): Likewise.
255         (supply_reg32): Likewise.
256         (supply_sprs64): Likewise.
257         (supply_sprs32): Likewise.
258         (fill_gprs64): Likewise.
259         (fill_gprs32): Likewise.
260         (fill_sprs64): Likewise.
261         (fill_sprs32): Likewise.
262         (store_regs_user_thread): Likewise.
263         (store_regs_kernel_thread): Likewise.
264         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
265         (alphabsd_store_inferior_registers): Likewise.
266         * alpha-tdep.c (alpha_extract_return_value): Likewise.
267         (alpha_store_return_value): Likewise.
268         (alpha_deal_with_atomic_sequence): Likewise.
269         (alpha_next_pc): Likewise.
270         (alpha_software_single_step): Likewise.
271         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
272         (amd64bsd_store_inferior_registers): Likewise.
273         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
274         Likewise.
275         (amd64_linux_store_inferior_registers): Likewise.
276         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
277         (amd64_collect_native_gregset): Likewise.
278         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
279         (amd64obsd_collect_uthread): Likewise.
280         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
281         (amd64_collect_fpregset): Likewise.
282         (amd64_supply_fxsave): Likewise.
283         (amd64_supply_xsave): Likewise.
284         (amd64_collect_fxsave): Likewise.
285         (amd64_collect_xsave): Likewise.
286         * arc-tdep.c (arc_write_pc): Likewise.
287         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
288         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
289         (arm_fbsd_store_inferior_registers): Likewise.
290         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
291         (store_vfp_regs): Likewise.
292         (arm_linux_fetch_inferior_registers): Likewise.
293         (arm_linux_store_inferior_registers): Likewise.
294         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
295         (arm_linux_sigreturn_next_pc): Likewise.
296         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
297         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
298         (fetch_register): Likewise.
299         (store_register): Likewise.
300         * arm-tdep.c (arm_is_thumb): Likewise.
301         (displaced_in_arm_mode): Likewise.
302         (bx_write_pc): Likewise.
303         (arm_get_next_pcs_addr_bits_remove): Likewise.
304         (arm_software_single_step): Likewise.
305         (arm_extract_return_value): Likewise.
306         (arm_store_return_value): Likewise.
307         (arm_write_pc): Likewise.
308         * bfin-tdep.c (bfin_extract_return_value): Likewise.
309         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
310         (bsd_uthread_store_registers): Likewise.
311         * core-regset.c (fetch_core_registers): Likewise.
312         * corelow.c (get_core_registers): Likewise.
313         * cris-tdep.c (cris_store_return_value): Likewise.
314         (cris_extract_return_value): Likewise.
315         (find_step_target): Likewise.
316         (find_step_target): Likewise.
317         (cris_software_single_step): Likewise.
318         * ctf.c (ctf_fetch_registers): Likewise.
319         * darwin-nat.c (cancel_breakpoint): Likewise.
320         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
321         * frv-tdep.c (frv_extract_return_value): Likewise.
322         * ft32-tdep.c (ft32_store_return_value): Likewise.
323         (ft32_extract_return_value): Likewise.
324         * go32-nat.c (fetch_register): Likewise.
325         (go32_fetch_registers): Likewise.
326         (go32_store_registers): Likewise.
327         (store_register): Likewise.
328         * h8300-tdep.c (h8300_extract_return_value): Likewise.
329         (h8300_store_return_value): Likewise.
330         * hppa-linux-nat.c (fetch_register): Likewise.
331         (store_register): Likewise.
332         (hppa_linux_fetch_inferior_registers): Likewise.
333         (hppa_linux_store_inferior_registers): Likewise.
334         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
335         (i386_darwin_store_inferior_registers): Likewise.
336         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
337         (gnu_store_registers): Likewise.
338         * i386-linux-nat.c (fetch_register): Likewise.
339         (store_register): Likewise.
340         (supply_gregset): Likewise.
341         (fill_gregset): Likewise.
342         (i386_linux_fetch_inferior_registers): Likewise.
343         (i386_linux_store_inferior_registers): Likewise.
344         (i386_linux_resume): Likewise.
345         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
346         Likewise.
347         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
348         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
349         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
350         (i386obsd_collect_uthread): Likewise.
351         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
352         (i386_supply_gregset): Likewise.
353         (i386_collect_gregset): Likewise.
354         (i386_supply_fpregset): Likewise.
355         (i386_collect_fpregset): Likewise.
356         (i386_mpx_bd_base): Likewise.
357         * i386-v4-nat.c (supply_fpregset): Likewise.
358         (fill_fpregset): Likewise.
359         * i387-tdep.c (i387_supply_fsave): Likewise.
360         (i387_collect_fsave): Likewise.
361         (i387_supply_fxsave): Likewise.
362         (i387_collect_fxsave): Likewise.
363         (i387_supply_xsave): Likewise.
364         (i387_collect_xsave): Likewise.
365         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
366         (ia64_linux_store_registers): Likewise.
367         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
368         (ia64_extract_return_value): Likewise.
369         (ia64_store_return_value): Likewise.
370         (find_func_descr): Likewise.
371         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
372         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
373         (inf_ptrace_store_registers): Likewise.
374         * infrun.c (use_displaced_stepping): Likewise.
375         (displaced_step_prepare_throw): Likewise.
376         (resume): Likewise.
377         (proceed): Likewise.
378         (do_target_wait): Likewise.
379         (adjust_pc_after_break): Likewise.
380         (handle_inferior_event_1): Likewise.
381         (handle_signal_stop): Likewise.
382         (save_infcall_suspend_state): Likewise.
383         (restore_infcall_suspend_state): Likewise.
384         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
385         * jit.c (jit_frame_prev_register): Likewise.
386         * linux-nat.c (save_stop_reason): Likewise.
387         (linux_nat_wait_1): Likewise.
388         (resume_stopped_resumed_lwps): Likewise.
389         * linux-record.c (record_linux_sockaddr): Likewise.
390         (record_linux_msghdr): Likewise.
391         (record_linux_system_call): Likewise.
392         * linux-tdep.c (linux_collect_thread_registers): Likewise.
393         * lm32-tdep.c (lm32_extract_return_value): Likewise.
394         (lm32_store_return_value): Likewise.
395         * m32c-tdep.c (m32c_read_flg): Likewise.
396         (m32c_pseudo_register_read): Likewise.
397         (m32c_pseudo_register_write): Likewise.
398         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
399         (m32r_linux_collect_gregset): Likewise.
400         * m32r-tdep.c (m32r_store_return_value): Likewise.
401         (m32r_extract_return_value): Likewise.
402         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
403         (m68kbsd_collect_fpregset): Likewise.
404         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
405         * m68k-linux-nat.c (fetch_register): Likewise.
406         (old_fetch_inferior_registers): Likewise.
407         (old_store_inferior_registers): Likewise.
408         (store_regs): Likewise.
409         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
410         (m68k_svr4_store_return_value): Likewise.
411         * m88k-tdep.c (m88k_store_arguments): Likewise.
412         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
413         (mi_cmd_data_write_register_values): Likewise.
414         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
415         (mips_fbsd_store_inferior_registers): Likewise.
416         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
417         (mips_fbsd_supply_gregs): Likewise.
418         (mips_fbsd_collect_fpregs): Likewise.
419         (mips_fbsd_collect_gregs): Likewise.
420         (mips_fbsd_supply_fpregset): Likewise.
421         (mips_fbsd_collect_fpregset): Likewise.
422         (mips_fbsd_supply_gregset): Likewise.
423         (mips_fbsd_collect_gregset): Likewise.
424         * mips-linux-nat.c (supply_gregset): Likewise.
425         (fill_gregset): Likewise.
426         (supply_fpregset): Likewise.
427         (fill_fpregset): Likewise.
428         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
429         (mips_fill_gregset): Likewise.
430         (mips_supply_fpregset): Likewise.
431         (mips_fill_fpregset): Likewise.
432         (mips64_supply_gregset): Likewise.
433         (micromips_linux_sigframe_validate): Likewise.
434         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
435         (mipsnbsd_fetch_inferior_registers): Likewise.
436         (mipsnbsd_store_inferior_registers): Likewise.
437         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
438         (mipsnbsd_supply_gregset): Likewise.
439         (mipsnbsd_iterate_over_regset_sections): Likewise.
440         (mipsnbsd_supply_reg): Likewise.
441         (mipsnbsd_supply_fpreg): Likewise.
442         * mips-tdep.c (mips_in_frame_stub): Likewise.
443         (mips_dummy_id): Likewise.
444         (is_octeon_bbit_op): Likewise.
445         (micromips_bc1_pc): Likewise.
446         (extended_mips16_next_pc): Likewise.
447         (mips16_next_pc): Likewise.
448         (deal_with_atomic_sequence): Likewise.
449         * moxie-tdep.c (moxie_process_readu): Likewise.
450         * nios2-tdep.c (nios2_get_next_pc): Likewise.
451         * nto-procfs.c (procfs_store_registers): Likewise.
452         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
453         (ppcfbsd_store_inferior_registers): Likewise.
454         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
455         (fetch_altivec_register): Likewise.
456         (get_spe_registers): Likewise.
457         (fetch_spe_register): Likewise.
458         (fetch_altivec_registers): Likewise.
459         (fetch_all_gp_regs): Likewise.
460         (fetch_all_fp_regs): Likewise.
461         (store_vsx_register): Likewise.
462         (store_altivec_register): Likewise.
463         (set_spe_registers): Likewise.
464         (store_spe_register): Likewise.
465         (store_altivec_registers): Likewise.
466         (store_all_gp_regs): Likewise.
467         (store_all_fp_regs): Likewise.
468         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
469         (ppc_linux_collect_gregset): Likewise.
470         (ppc_canonicalize_syscall): Likewise.
471         (ppc_linux_record_signal): Likewise.
472         (ppu2spu_prev_register): Likewise.
473         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
474         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
475         (ppcobsd_store_registers): Likewise.
476         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
477         Likewise.
478         (ppc_ravenscar_generic_store_registers): Likewise.
479         * procfs.c (procfs_fetch_registers): Likewise.
480         (procfs_store_registers): Likewise.
481         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
482         (ravenscar_store_registers): Likewise.
483         (ravenscar_prepare_to_store): Likewise.
484         * record-btrace.c (record_btrace_fetch_registers): Likewise.
485         * record-full.c (record_full_wait_1): Likewise.
486         (record_full_registers_change): Likewise.
487         (record_full_store_registers): Likewise.
488         (record_full_core_fetch_registers): Likewise.
489         (record_full_save): Likewise.
490         (record_full_goto_insn): Likewise.
491         * regcache.c (regcache_register_size): Likewise.
492         (get_regcache_arch): Remove.
493         (regcache_read_pc): Likewise.
494         * regcache.h (get_regcache_arch): Remove.
495         * remote-sim.c (gdbsim_fetch_register): Likewise.
496         (gdbsim_store_register): Likewise.
497         * remote.c (fetch_register_using_p): Likewise.
498         (send_g_packet): Likewise.
499         (remote_prepare_to_store): Likewise.
500         (store_registers_using_G): Likewise.
501         * reverse.c (save_bookmark_command): Likewise.
502         (goto_bookmark_command): Likewise.
503         * rs6000-aix-tdep.c (branch_dest): Likewise.
504         * rs6000-nat.c (rs6000_ptrace64): Likewise.
505         (fetch_register): Likewise.
506         * rs6000-tdep.c (ppc_supply_reg): Likewise.
507         (ppc_collect_reg): Likewise.
508         (ppc_collect_gregset): Likewise.
509         (ppc_collect_fpregset): Likewise.
510         (ppc_collect_vsxregset): Likewise.
511         (ppc_collect_vrregset): Likewise.
512         (ppc_displaced_step_hw_singlestep): Likewise.
513         (rs6000_pseudo_register_read): Likewise.
514         (rs6000_pseudo_register_write): Likewise.
515         * s390-linux-nat.c (supply_gregset): Likewise.
516         (fill_gregset): Likewise.
517         (s390_linux_fetch_inferior_registers): Likewise.
518         * s390-linux-tdep.c (s390_write_pc): Likewise.
519         (s390_software_single_step): Likewise.
520         (s390_all_but_pc_registers_record): Likewise.
521         (s390_linux_syscall_record): Likewise.
522         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
523         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
524         (shnbsd_store_inferior_registers): Likewise.
525         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
526         (sh_extract_return_value_fpu): Likewise.
527         (sh_store_return_value_nofpu): Likewise.
528         (sh_corefile_supply_regset): Likewise.
529         (sh_corefile_collect_regset): Likewise.
530         * sh64-tdep.c (sh64_extract_return_value): Likewise.
531         (sh64_store_return_value): Likewise.
532         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
533         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
534         (sparc_store_inferior_registers): Likewise.
535         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
536         (sparc_ravenscar_prepare_to_store): Likewise.
537         * sparc-tdep.c (sparc32_store_arguments): Likewise.
538         (sparc_analyze_control_transfer): Likewise.
539         (sparc_step_trap): Likewise.
540         (sparc_software_single_step): Likewise.
541         (sparc32_gdbarch_init): Likewise.
542         (sparc_supply_rwindow): Likewise.
543         (sparc_collect_rwindow): Likewise.
544         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
545         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
546         (sparc64nbsd_collect_gregset): Likewise.
547         (sparc64nbsd_supply_fpregset): Likewise.
548         (sparc64nbsd_collect_fpregset): Likewise.
549         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
550         (sparc64_supply_gregset): Likewise.
551         (sparc64_collect_gregset): Likewise.
552         (sparc64_supply_fpregset): Likewise.
553         (sparc64_collect_fpregset): Likewise.
554         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
555         * spu-tdep.c (spu_unwind_sp): Likewise.
556         (spu2ppu_prev_register): Likewise.
557         (spu_memory_remove_breakpoint): Likewise.
558         * stack.c (return_command): Likewise.
559         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
560         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
561         * tracefile.c (trace_save_ctf): Likewise.
562         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
563         (do_windows_store_inferior_registers): Likewise.
564         (windows_resume): Likewise.
565         * xtensa-linux-nat.c (fill_gregset): Likewise.
566         (supply_gregset_reg): Likewise.
567         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
568         (xtensa_register_read_masked): Likewise.
569         (xtensa_supply_gregset): Likewise.
570         (xtensa_extract_return_value): Likewise.
571         (xtensa_store_return_value): Likewise.
572
573 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
574
575         * doublest.c (floatformat_from_string): New function.
576         * doublest.h (floatformat_from_string): Add prototype.
577
578         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
579         (OP_FLOAT): ... this.
580         * expression.h: Do not include "doublest.h".
581         (union exp_element): Replace doubleconst and decfloatconst by
582         new element floatconst.
583         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
584         (ada_evaluate_subexp): Likewise.
585         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
586         OP_DOUBLE and OP_DECFLOAT.
587         * expprint.c (print_subexp_standard): Likewise.
588         (dump_subexp_body_standard): Likewise.
589         * breakpoint.c (watchpoint_exp_is_const): Likewise.
590
591         * parse.c: Include "dfp.h".
592         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
593         (write_exp_elt_floatcst): New function.
594         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
595         and OP_DECFLOAT.
596         (operator_check_standard): Likewise.
597         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
598         Return target format buffer instead of host DOUBLEST.
599         Use floatformat_from_string and decimal_from_string to parse
600         either binary or decimal floating-point types.
601         (parse_c_float): Remove.
602         * parser-defs.h: Do not include "doublest.h".
603         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
604         (write_exp_elt_floatcst): Add prototype.
605         (parse_float): Update prototype.
606         (parse_c_float): Remove.
607
608         * c-exp.y: Do not include "dfp.h".
609         (typed_val_float): Use byte buffer instead of DOUBLEST.
610         (typed_val_decfloat): Remove.
611         (DECFLOAT): Remove.
612         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
613         (parse_number): Update to new parse_float interface.
614         Parse suffixes and determine type before calling parse_float.
615         Handle decimal and binary FP types the same way.
616
617         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
618         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
619         (parse_number): Update to new parse_float interface.
620         Parse suffixes and determine type before calling parse_float.
621
622         * f-exp.y: Replace dval by typed_val_float.
623         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
624         (parse_number): Use parse_float instead of atof.
625
626         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
627         (parse_go_float): Remove.
628         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
629         (parse_number): Call parse_float instead of parse_go_float.
630         Parse suffixes and determine type before calling parse_float.
631
632         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
633         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
634         (parse_number): Update to new parse_float interface.
635         Parse suffixes and determine type before calling parse_float.
636
637         * m2-exp.y: Replace dval by byte buffer val.
638         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
639         (parse_number): Call parse_float instead of atof.
640
641         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
642         (lex_number): Call parse_float instead of strtod.
643         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
644         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
645         Use write_exp_elt_floatcst.
646         (unit_testing): Remove static variable.
647         (rust_type): Do not check unit_testing.
648         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
649
650         * ada-exp.y (type_float, type_double): Remove.
651         (typed_val_float): Use byte buffer instead of DOUBLEST.
652         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
653         * ada-lex.l (processReal): Use parse_float instead of sscanf.
654
655 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
656
657         * aarch64-tdep.h (enum aarch64_regnum): Remove.
658         * arch/aarch64.h: New file.
659
660 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
661
662         * dfp.h (decimal_from_string): Use const reference for argument.
663         * dfp.c (decimal_from_string): Likewise.
664
665 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
666
667         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
668         * sh64-tdep.c (sh64_do_fp_register): Likewise.
669         * mips-tdep.c (mips_print_fp_register): Likewise.
670
671 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
672
673         * common/format.h (enum argclass): Replace decfloat_arg by
674         dec32float_arg, dec64float_arg, and dec128float_arg.
675         * common/format.c (parse_format_string): Update to return
676         new decimal float argument classes.
677
678         * printcmd.c (printf_decfloat): Rename to ...
679         (printf_floating): ... this.  Add argclass argument, and use it
680         instead of parsing the format string again.  Add support for
681         binary floating-point values, using floatformat_to_string.
682         Convert value to the target format if it doesn't already match.
683         (ui_printf): Call printf_floating instead of printf_decfloat,
684         also for double_arg / long_double_arg.  Pass argclass.
685
686         * dfp.c (decimal_to_string): Add format string argument.
687         * dfp.h (decimal_to_string): Likewise.
688
689         * doublest.c (floatformat_to_string): Add format string argument.
690         * doublest.h (floatformat_to_string): Likewise.
691
692 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
693
694         * doublest.c (floatformat_precision): New routine.
695         (floatformat_to_string): Likewise.
696         * doublest.c (floatformat_to_string): Add prototype.
697
698         * printcmd.c (print_scalar_formatted): Only call print_floating
699         on floating-point types.
700         * valprint.c: Do not include "floatformat.h".
701         (generic_val_print_decfloat): Remove.
702         (generic_val_print): Call generic_val_print_float for both
703         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
704         (print_floating): Use floatformat_to_string.  Handle decimal float.
705         (print_decimal_floating): Remove, merge into floatformat_to_string.
706         * value.h (print_decimal_floating): Remove.
707
708         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
709
710 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
711
712         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
713
714 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
715
716         * memattr.h: Don't include vec.h.
717         (struct mem_attrib): Initialize fields.
718         <unknown>: New static method.
719         (struct mem_region): Add constructors, operator<, initialize
720         fields.
721         * memattr.c: Include algorithm.
722         (default_mem_attrib, unknown_mem_attrib): Remove.
723         (user_mem_region_list): New global.
724         (target_mem_region_list, mem_region_list): Change type to
725         std::vector<mem_region>.
726         (mem_use_target): Now a function.
727         (target_mem_regions_valid): Change type to bool.
728         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
729         (require_user_regions): Adjust.
730         (require_target_regions): Adjust.
731         (create_mem_region): Adjust.
732         (lookup_mem_region): Adjust.
733         (invalidate_target_mem_regions): Adjust.
734         (mem_clear): Rename to...
735         (user_mem_clear): ... this, and adjust.
736         (mem_command): Adjust.
737         (info_mem_command): Adjust.
738         (mem_enable, enable_mem_command, mem_disable,
739         disable_mem_command): Adjust.
740         (mem_delete): Adjust.
741         (delete_mem_command): Adjust.
742         * memory-map.h (parse_memory_map): Return an std::vector.
743         * memory-map.c (parse_memory_map): Likewise.
744         (struct memory_map_parsing_data): Add constructor.
745         <memory_map>: Point to std::vector.
746         (memory_map_start_memory): Adjust.
747         (memory_map_end_memory): Adjust.
748         (memory_map_end_property): Adjust.
749         (clear_result): Remove.
750         * remote.c (remote_memory_map): Return an std::vector.
751         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
752         Remove.
753         (target_debug_print_mem_region_vector): New.
754         * target-delegates.c: Regenerate.
755         * target.h (mem_region_vector): New typedef.
756         (to_memory_map): Return mem_region_vector.
757         (target_memory_map): Return an std::vector.
758         * target.c (target_memory_map): Return an std::vector.
759         (flash_erase_command): Adjust.
760
761 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
762
763         * memory-map.c (struct memory_map_parsing_data) <property_name>:
764         Change type to std::string.
765         (memory_map_start_property): Adjust.
766         (memory_map_end_property): Adjust.
767
768 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
769
770         * infrun.h: Include common/byte-vector.h.
771         (struct displaced_step_closure): New struct.
772         (struct buf_displaced_step_closure): New struct.
773         * infrun.c (displaced_step_closure::~displaced_step_closure):
774         Provide default implementation.
775         (displaced_step_clear): Deallocate step closure with delete.
776         * aarch64-tdep.c (displaced_step_closure): Rename to ...
777         (aarch64_displaced_step_closure): ... this, extend
778         displaced_step_closure.
779         (aarch64_displaced_step_data) <dsc>: Change type to
780         aarch64_displaced_step_closure.
781         (aarch64_displaced_step_copy_insn): Adjust to type change, use
782         unique_ptr.
783         (aarch64_displaced_step_fixup): Add cast for displaced step
784         closure.
785         * amd64-tdep.c (displaced_step_closure): Rename to ...
786         (amd64_displaced_step_closure): ... this, extend
787         displaced_step_closure.
788         <insn_buf>: Change type to std::vector<gdb_byte>.
789         <max_len>: Remove.
790         (fixup_riprel): Change type of DSC parameter, adjust to type
791         change of insn_buf.
792         (fixup_displaced_copy): Change type of DSC parameter.
793         (amd64_displaced_step_copy_insn): Instantiate
794         amd64_displaced_step_closure.
795         (amd64_displaced_step_fixup): Add cast for closure type, adjust
796         to type change of insn_buf.
797         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
798         parameter DSC.
799         (arm_linux_copy_svc): Likewise.
800         (cleanup_kernel_helper_return): Likewise.
801         (arm_catch_kernel_helper_return): Likewise.
802         (arm_linux_displaced_step_copy_insn): Instantiate
803         arm_displaced_step_closure.
804         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
805         (displaced_read_reg): Change type of parameter DSC.
806         (branch_write_pc): Likewise.
807         (load_write_pc): Likewise.
808         (alu_write_pc): Likewise.
809         (displaced_write_reg): Likewise.
810         (arm_copy_unmodified): Likewise.
811         (thumb_copy_unmodified_32bit): Likewise.
812         (thumb_copy_unmodified_16bit): Likewise.
813         (cleanup_preload): Likewise.
814         (install_preload): Likewise.
815         (arm_copy_preload): Likewise.
816         (thumb2_copy_preload): Likewise.
817         (install_preload_reg): Likewise.
818         (arm_copy_preload_reg): Likewise.
819         (cleanup_copro_load_store): Likewise.
820         (install_copro_load_store): Likewise.
821         (arm_copy_copro_load_store) Likewise.
822         (thumb2_copy_copro_load_store): Likewise.
823         (cleanup_branch): Likewise.
824         (install_b_bl_blx): Likewise.
825         (arm_copy_b_bl_blx): Likewise.
826         (thumb2_copy_b_bl_blx): Likewise.
827         (thumb_copy_b): Likewise.
828         (install_bx_blx_reg): Likewise.
829         (arm_copy_bx_blx_reg): Likewise.
830         (thumb_copy_bx_blx_reg): Likewise.
831         (cleanup_alu_imm): Likewise.
832         (arm_copy_alu_imm): Likewise.
833         (thumb2_copy_alu_imm): Likewise.
834         (cleanup_alu_reg): Likewise.
835         (install_alu_reg): Likewise.
836         (arm_copy_alu_reg): Likewise.
837         (thumb_copy_alu_reg): Likewise.
838         (cleanup_alu_shifted_reg): Likewise.
839         (install_alu_shifted_reg): Likewise.
840         (arm_copy_alu_shifted_reg): Likewise.
841         (cleanup_load): Likewise.
842         (cleanup_store): Likewise.
843         (arm_copy_extra_ld_st): Likewise.
844         (install_load_store): Likewise.
845         (thumb2_copy_load_literal): Likewise.
846         (thumb2_copy_load_reg_imm): Likewise.
847         (arm_copy_ldr_str_ldrb_strb): Likewise.
848         (cleanup_block_load_all): Likewise.
849         (cleanup_block_store_pc): Likewise.
850         (cleanup_block_load_pc): Likewise.
851         (arm_copy_block_xfer): Likewise.
852         (thumb2_copy_block_xfer): Likewise.
853         (cleanup_svc): Likewise.
854         (install_svc): Likewise.
855         (arm_copy_svc): Likewise.
856         (thumb_copy_svc): Likewise.
857         (arm_copy_undef): Likewise.
858         (thumb_32bit_copy_undef): Likewise.
859         (arm_copy_unpred): Likewise.
860         (arm_decode_misc_memhint_neon): Likewise.
861         (arm_decode_unconditional): Likewise.
862         (arm_decode_miscellaneous): Likewise.
863         (arm_decode_dp_misc): Likewise.
864         (arm_decode_ld_st_word_ubyte): Likewise.
865         (arm_decode_media): Likewise.
866         (arm_decode_b_bl_ldmstm): Likewise.
867         (arm_decode_ext_reg_ld_st): Likewise.
868         (thumb2_decode_dp_shift_reg): Likewise.
869         (thumb2_decode_ext_reg_ld_st): Likewise.
870         (arm_decode_svc_copro): Likewise.
871         (thumb2_decode_svc_copro): Likewise.
872         (install_pc_relative): Likewise.
873         (thumb_copy_pc_relative_16bit): Likewise.
874         (thumb_decode_pc_relative_16bit): Likewise.
875         (thumb_copy_pc_relative_32bit): Likewise.
876         (thumb_copy_16bit_ldr_literal): Likewise.
877         (thumb_copy_cbnz_cbz): Likewise.
878         (thumb2_copy_table_branch): Likewise.
879         (cleanup_pop_pc_16bit_all): Likewise.
880         (thumb_copy_pop_pc_16bit): Likewise.
881         (thumb_process_displaced_16bit_insn): Likewise.
882         (decode_thumb_32bit_ld_mem_hints): Likewise.
883         (thumb_process_displaced_32bit_insn): Likewise.
884         (thumb_process_displaced_insn): Likewise.
885         (arm_process_displaced_insn): Likewise.
886         (arm_displaced_init_closure): Likewise.
887         (arm_displaced_step_fixup): Add cast for closure.
888         * arm-tdep.h: Include infrun.h.
889         (displaced_step_closure): Rename to ...
890         (arm_displaced_step_closure): ... this, extend
891         displaced_step_closure.
892         <u::svc::copy_svc_os>: Change type of parameter DSC.
893         <cleanup>: Likewise.
894         (arm_process_displaced_insn): Likewise.
895         (arm_displaced_init_closure): Likewise.
896         (displaced_read_reg): Likewise.
897         (displaced_write_reg): Likewise.
898         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
899         Adjust.
900         * i386-tdep.h: Include infrun.h.
901         (i386_displaced_step_closure): New typedef.
902         * i386-tdep.c (i386_displaced_step_copy_insn): Use
903         i386_displaced_step_closure.
904         (i386_displaced_step_fixup): Adjust.
905         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
906         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
907         and unique_ptr.
908         (ppc_displaced_step_fixup): Adjust.
909         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
910         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
911         and unique_ptr.
912         (s390_displaced_step_fixup): Adjust.
913
914 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
915
916         * interps.h (interp_resume, interp_suspend, interp_set_temp):
917         Remove declarations.
918
919 2017-10-20  Tom Tromey  <tom@tromey.com>
920
921         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
922         std::vector.
923         (gdb_bfd_record_inclusion): Update.
924         (bfdp): Remove typedef.
925
926 2017-10-20  Tom Tromey  <tom@tromey.com>
927
928         * gdb_bfd.c (gdb_bfd_ref): Use new.
929         (struct gdb_bfd_data): Add constructor, destructor, and member
930         initializers.
931         (gdb_bfd_unref): Use delete.
932
933 2017-10-20  Tom Tromey  <tom@tromey.com>
934
935         * exec.c (exec_file_attach): Use new_bfd_ref.
936         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
937         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
938         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
939         new_bfd_ref.
940         * gdb_bfd.h (new_bfd_ref): New function.
941
942 2017-10-20  Pedro Alves  <palves@redhat.com>
943
944         * main.c (captured_command_loop): Add attribute noinline.
945
946 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
947
948         * interps.c (struct interp_factory): Add constructor.
949         (interp_factory_p): Remove typedef.
950         (DEF_VEC_P(interp_factory_p)): Remove.
951         (interpreter_factories): Change type to std::vector.
952         (interp_factory_register): Adjust.
953         (interp_lookup): Adjust.
954         (interpreter_completer): Adjust.
955
956 2017-10-19  Tom Tromey  <tom@tromey.com>
957
958         * break-catch-syscall.c (catch_syscall_completer): Use
959         std::string, gdb::unique_xmalloc_ptr.
960
961 2017-10-19  Tom Tromey  <tom@tromey.com>
962
963         * infcall.c (call_function_by_hand_dummy): Use std::string.
964
965 2017-10-19  Tom Tromey  <tom@tromey.com>
966
967         * mi/mi-main.c (mi_cmd_execute): Update.
968         * top.h (prepare_execute_command): Return scoped_value_mark.
969         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
970         Add move constructor.
971         * top.c (prepare_execute_command): Return scoped_value_mark.
972         (execute_command): Update.
973
974 2017-10-19  Pedro Alves  <palves@redhat.com>
975
976         * xml-support.c (xml_fetch_content_from_file): Check fread's
977         return.
978
979 2017-10-19  Pedro Alves  <palves@redhat.com>
980
981         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
982         async.
983         (handle_error_fd): New function.
984         (ser_base_async): Add/delete an event loop file handler for
985         error_fd.
986
987 2017-10-19  Pedro Alves  <palves@redhat.com>
988
989         * xml-support.c (xml_fetch_content_from_file): Don't read in
990         chunks.  Instead use fseek to determine the file's size, and read
991         it in one go.
992
993 2017-11-18  Keith Seitz  <keiths@redhat.com>
994
995         * c-exp.y (oper): Canonicalize conversion operators of user-defined
996         types.
997         Add whitespace to front of type name.
998
999 2017-10-18  Keith Seitz  <keiths@redhat.com>
1000
1001         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
1002         DW_AT_accessibility.
1003
1004 2017-10-18  Yao Qi  <yao.qi@linaro.org>
1005
1006         * features/tic6x-c62x-linux.c: Remove.
1007
1008 2017-10-17  Tom Tromey  <tom@tromey.com>
1009
1010         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
1011         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
1012         (do_mixed_source_and_assembly): Likewise.
1013
1014 2017-10-17  Tom Tromey  <tom@tromey.com>
1015
1016         * regcache.c (regcache::xfer_part): Remove assertion.
1017
1018 2017-10-17  Pedro Alves  <palves@redhat.com>
1019
1020         * xml-support.c (xml_fetch_content_from_file): Call
1021         unique_ptr::release() instead unique_ptr::get() when passing
1022         through xrealloc.
1023
1024 2017-10-17  Yao Qi  <yao.qi@linaro.org>
1025
1026         * regcache.c (regcache::xfer_part): Remove parameters read and
1027         write, add parameter is_raw.  All callers are updated.
1028
1029 2017-10-16  Keith Seitz  <keiths@redhat.com>
1030
1031         * c-typeprint.c (enum access_specifier): Moved here from
1032         c_type_print_base.
1033         (output_access_specifier): New function.
1034         (c_type_print_base): Consider typedefs when assessing
1035         whether access labels are needed.
1036         Use output_access_specifier as needed.
1037         Output access specifier for typedefs, if needed.
1038         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
1039         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
1040         fields.
1041         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
1042         accessor macros.
1043
1044 2017-10-16  Tom Tromey  <tom@tromey.com>
1045
1046         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
1047         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
1048         * target.c (target_fileio_read_stralloc): Update.
1049         * sparc64-tdep.c (adi_is_addr_mapped): Update.
1050         * target.h (target_fileio_read_stralloc): Return
1051         unique_xmalloc_ptr.
1052
1053 2017-10-16  Tom Tromey  <tom@tromey.com>
1054
1055         * xml-syscall.c (xml_init_syscalls_info): Update.
1056         * xml-support.c (xinclude_start_include): Update.
1057         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
1058         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
1059         (xml_fetch_content_from_file): Likewise.
1060         * osdata.c (get_osdata): Update.
1061         * target.h (target_read_stralloc, target_get_osdata): Return
1062         unique_xmalloc_ptr.
1063         * solib-aix.c (solib_aix_get_library_list): Update.
1064         * solib-target.c (solib_target_current_sos): Update.
1065         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
1066         * xml-tdesc.c (fetch_available_features_from_target): Update.
1067         (target_fetch_description_xml): Update.
1068         (file_read_description_xml): Update.
1069         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
1070         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
1071         (remote_pid_to_exec_file): Update.
1072         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
1073         (target_get_osdata): Likewise.
1074
1075 2017-10-16  Tom Tromey  <tom@tromey.com>
1076
1077         * remote.c (remote_register_number_and_offset): Use std::vector.
1078         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
1079         (putpkt_binary): Use gdb::def_vector.
1080         (compare_sections_command): Use gdb::byte_vector.
1081
1082 2017-10-16  Tom Tromey  <tom@tromey.com>
1083
1084         * ppc-linux-nat.c (hwdebug_insert_point): Use
1085         gdb::unique_xmalloc_ptr, XDUP.
1086
1087 2017-10-16  Tom Tromey  <tom@tromey.com>
1088
1089         * probe.c (parse_probes): Use std::string.
1090         (info_probes_for_ops, enable_probes_command)
1091         (disable_probes_command): Remove cleanups.
1092
1093 2017-10-16  Tom Tromey  <tom@tromey.com>
1094
1095         * buildsym.c (block_compar): Remove.
1096         (end_symtab_get_static_block): Use std::vector.
1097
1098 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
1099
1100         * memrange.h (struct mem_range): Define operator< and operator==.
1101         (mem_range_s): Remove.
1102         (DEF_VEC_O (mem_range_s)): Remove.
1103         (normalize_mem_ranges): Change parameter type to std::vector.
1104         * memrange.c (compare_mem_ranges): Remove.
1105         (normalize_mem_ranges): Change parameter type to std::vector,
1106         adjust to vector change.
1107         * exec.c (section_table_available_memory): Return vector, remove
1108         parameter.
1109         (section_table_read_available_memory): Adjust to std::vector
1110         change.
1111         * remote.c (remote_read_bytes): Adjust to std::vector
1112         change.
1113         * tracepoint.h (traceframe_available_memory): Change parameter
1114         type to std::vector.
1115         * tracepoint.c (traceframe_available_memory): Change parameter
1116         type to std::vector, adjust.
1117         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
1118         std::vector change.
1119         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1120         unittests/memrange-selftests.c.
1121         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
1122         * gdb/unittests/memrange-selftests.c: New file.
1123
1124 2017-10-16  Pedro Alves  <palves@redhat.com>
1125
1126         * elfread.c (probe_key_free): Rename range-for variable.
1127         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
1128         (find_probe_by_pc, collect_probes): Rename range-for variable.
1129
1130 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1131
1132         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
1133         * features/tic6x-c62x.c: Remove.
1134         * features/tic6x-c64x-linux.c: Remove.
1135         * features/tic6x-c64x.c: Remove.
1136         * features/tic6x-c64xp-linux.c: Remove.
1137         * features/tic6x-c64xp.c: Remove.
1138         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
1139         initialize_tdesc_tic6x_*_linux functions.
1140         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
1141         initialize_tdesc_tic6x_* functions.
1142
1143 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1144
1145         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
1146         tic6x-c62x.
1147         * regformats/tic6x-c62x.dat: Remove.
1148         * regformats/tic6x-c64x.dat: Remove.
1149         * regformats/tic6x-c64xp.dat: Remove.
1150
1151 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
1152
1153         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
1154         (the !HAVE_LIBEXPAT version).
1155
1156 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1157
1158         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
1159         const.
1160
1161 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1162
1163         * target.h: Include tracepoint.h.
1164         (enum trace_find_type): Move to tracepoint.h.
1165         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
1166         * tracepoint.h: Don't include target.h
1167         (enum trace_find_type): Move from target.h.
1168         (parse_traceframe_info): Return a unique ptr.
1169         * tracepoint.c (current_traceframe_info): Change type to unique
1170         ptr.
1171         (free_traceframe_info): Remove.
1172         (clear_traceframe_info): Don't manually free
1173         current_traceframe_info.
1174         (free_result): Remove.
1175         (parse_traceframe_info): Return a unique ptr.
1176         (get_traceframe_info): Adjust to unique ptr.
1177         * ctf.c (ctf_traceframe_info): Return a unique ptr.
1178         * remote.c (remote_traceframe_info): Return a unique ptr.
1179         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
1180         ptr.
1181         * target-debug.h (target_debug_print_traceframe_info_up): New
1182         macro.
1183         * target-delegates.c: Regenerate.
1184
1185 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1186
1187         * memrange.h (struct mem_range): Add constructors.
1188         * tracepoint.h (struct traceframe_info) <memory>: Change type to
1189         std::vector<mem_range>.
1190         * tracepoint.c (free_traceframe_info): Don't manually free
1191         vector.
1192         (traceframe_info_start_memory): Adjust to vector change.
1193         (traceframe_available_memory): Likewise.
1194         * tracefile-tfile.c (build_traceframe_info): Likewise.
1195         * ctf.c (ctf_traceframe_info): Likewise.
1196
1197 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1198
1199         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
1200         std::vector<int>.
1201         * tracepoint.c (free_traceframe_info): Deallocate with delete.
1202         (traceframe_info_start_tvar): Adjust to vector change.
1203         (parse_traceframe_info): Allocate with new.
1204         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
1205         vector change.
1206         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
1207         change.
1208         tfile_traceframe_info): Allocate with new.
1209         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
1210         change.
1211
1212 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1213
1214         * tracepoint.c (traceframe_info): Rename to...
1215         (current_traceframe_info): ...this.
1216         (clear_traceframe_info): Adjust.
1217         (get_traceframe_info): Adjust.
1218
1219 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1220
1221         * nat/linux-osdata.c: Include algorithm.
1222         (compare_processes): Remove.
1223         (struct pid_pgid_entry): New struct.
1224         (linux_xfer_osdata_processgroups): Use std::vector instead of
1225         XNEWVEC.
1226
1227 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1228
1229         * objfiles.h: Don't include symfile.h.
1230         (struct partial_symbol): Remove forward-declaration.
1231         (struct objfile) <global_psymbols, static_psymbols>: Change type
1232         to std::vector<partial_symbol *>.
1233         * objfiles.c (objfile::objfile): Don't memset those fields.
1234         (objfile::~objfile): Don't free those fields.
1235         * psympriv.h (struct psymbol_allocation_list): Remove
1236         forward-declaration.
1237         (add_psymbol_to_list): Change psymbol_allocation_list parameter
1238         to std::vector.
1239         (start_psymtab_common): Change parameters to std::vector.
1240         * psymtab.c: Include algorithm.
1241         (require_partial_symbols): Call shrink_to_fit.
1242         (find_pc_sect_psymbol): Adjust to vector change.
1243         (match_partial_symbol): Likewise.
1244         (lookup_partial_symbol): Likewise.
1245         (psym_relocate): Likewise.
1246         (dump_psymtab): Likewise.
1247         (recursively_search_psymtabs): Likewise.
1248         (compare_psymbols): Remove.
1249         (sort_pst_symbols): Adjust to vector change.
1250         (start_psymtab_common): Likewise.
1251         (end_psymtab_common): Likewise.
1252         (psymbol_bcache_full): De-constify return value.
1253         (add_psymbol_to_bcache): Likewise.
1254         (extend_psymbol_list): Remove.
1255         (append_psymbol_to_list): Adjust to vector change.
1256         (add_psymbol_to_list): Likewise.
1257         (init_psymbol_list): Likewise.
1258         (maintenance_info_psymtabs): Likewise.
1259         (maintenance_check_psymtabs): Likewise.
1260         * symfile.h (struct psymbol_allocation_list): Remove.
1261         * symfile.c (reread_symbols): Adjust to vector change.
1262         * dbxread.c (start_psymtab): Change type of parameters.
1263         (dbx_symfile_read): Adjust to vector change.
1264         (read_dbx_symtab): Likewise.
1265         (start_psymtab): Change type of parameters.
1266         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
1267         (create_partial_symtab): Likewise.
1268         (add_partial_symbol): Likewise.
1269         (write_one_signatured_type): Likewise.
1270         (recursively_write_psymbols): Likewise.
1271         * mdebugread.c (parse_partial_symbols): Likewise.
1272         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
1273         (scan_xcoff_symtab): Adjust to vector change.
1274         (xcoff_initial_scan): Likewise.
1275
1276 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
1277
1278         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
1279
1280 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1281
1282         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
1283         Remove s390x-*-expedite, add s390x-expedite.
1284
1285 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1286
1287         * features/s390-gs-linux64.c: Regenerated.
1288         * features/s390x-gs-linux64.c: Regenerated.
1289
1290 2017-10-13  Tom Tromey  <tom@tromey.com>
1291
1292         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1293         * solib.c (update_solib_list, reload_shared_libraries_1): Use
1294         delete.
1295         * symfile.c (symbol_file_add_with_addrs): Use new.
1296         (symbol_file_add_separate): Update comment.
1297         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
1298         * jit.c (jit_object_close_impl): Use new.
1299         (jit_unregister_code): Use delete.
1300         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
1301         (~objfile): Rename from free_objfile.
1302         (free_objfile_separate_debug, do_free_objfile_cleanup)
1303         (free_all_objfiles, objfile_purge_solibs): Use delete.
1304         * objfiles.h (struct objfile): Add constructor and destructor.
1305         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
1306         (allocate_objfile, free_objfile): Don't declare.
1307         (struct objstats): Add initializers.
1308
1309 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1310
1311         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
1312         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
1313         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
1314         * gdbarch.h: Regenerate.
1315         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1316         Adjust comment.
1317         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
1318         (i386_displaced_step_fixup): Adjust comment.
1319         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
1320
1321 2017-10-12  Tom Tromey  <tom@tromey.com>
1322
1323         * prologue-value.h (pv_area::store_would_trash): Return bool.
1324         (pv_area::find_reg): Likewise.
1325         * prologue-value.c (pv_area::store_would_trash): Return bool.
1326         (pv_area::find_reg): Likewise.
1327
1328 2017-10-12  Tom Tromey  <tom@tromey.com>
1329
1330         * s390-linux-tdep.c (s390_store, s390_load)
1331         (s390_check_for_saved, s390_analyze_prologue): Update.
1332         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
1333         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
1334         * prologue-value.h (class pv_area): Move from prologue-value.c.
1335         Change names of members.  Add constructor, destructor, member
1336         functions.
1337         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
1338         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
1339         (pv_area_fetch, pv_area_scan): Don't declare.
1340         * prologue-value.c (struct pv_area::area_entry): Now member of
1341         pv_area.
1342         (struct pv_area): Move to prologue-value.h.
1343         (pv_area::pv_area): Rename from make_pv_area.
1344         (pv_area::~pv_area): Rename from free_pv_area.
1345         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
1346         (clear_entries, find_entry, overlaps, store_would_trash, store)
1347         (fetch, find_reg, scan): Now member of pv_area.
1348         Remove "area" argument.  Update.
1349         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
1350         Update.
1351         * mn10300-tdep.c (push_reg, check_for_saved)
1352         (mn10300_analyze_prologue): Update.
1353         * mep-tdep.c (is_arg_spill, check_for_saved)
1354         (mep_analyze_prologue): Update.
1355         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
1356         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
1357         (m32c_is_struct_return, m32c_analyze_prologue): Update.
1358         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
1359         Update.
1360         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
1361         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
1362
1363 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1364
1365         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
1366         * linux-nat.c (linux_nat_delete_thread): New variable.
1367         (lwp_free): Invoke linux_nat_delete_thread if set.
1368         (linux_nat_set_delete_thread): New function.
1369         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
1370         thread delete callback.
1371         * arm-linux-nat.c (arm_linux_delete_thread): New function.
1372         (_initialize_arm_linux_nat): Assign thread delete callback.
1373         * s390-linux-nat.c (s390_delete_thread): New function.
1374         (_initialize_s390_nat): Assign thread delete callback.
1375         * x86-linux-nat.c (x86_linux_add_target): Likewise.
1376         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
1377         function.
1378         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
1379         declaration.
1380         * nat/x86-linux.c (x86_linux_delete_thread): New function.
1381         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
1382
1383 2017-10-09  Tom Tromey  <tom@tromey.com>
1384
1385         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
1386         std::string.
1387         * tui/tui-layout.c (enum tui_status): Use std::string.
1388
1389 2017-10-11  Tom Tromey  <tom@tromey.com>
1390
1391         * gdbthread.h (thread_command): Constify.
1392         * inferior.h (detach_command): Constify.
1393         * top.h (set_history, show_history): Constify.
1394         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
1395         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
1396         * bsd-kvm.c (bsd_kvm_cmd): Constify.
1397         * printcmd.c (set_command): Constify.
1398         (non_const_set_command): New function.
1399         * dcache.c (set_dcache_command, show_dcache_command): Constify.
1400         * breakpoint.c (enable_command, disable_command, delete_command)
1401         (catch_command, tcatch_command, set_breakpoint_cmd)
1402         (show_breakpoint_cmd): Constify.
1403         * macrocmd.c (macro_command): Constify.
1404         * infcmd.c (unset_command, kill_command, detach_command)
1405         (info_proc_cmd): Constify.
1406         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
1407         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
1408         (info_auto_load_cmd): Constify.
1409         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
1410         (unset_tdesc_cmd): Constify.
1411         * ada-lang.c (set_ada_command, show_ada_command)
1412         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
1413         * guile/guile.c (set_guile_command, show_guile_command)
1414         (info_guile_command): Constify.
1415         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
1416         Constify.
1417         * skip.c (skip_command): Constify.
1418         * compile/compile.c (_initialize_compile): Constify.
1419         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
1420         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
1421         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
1422         (maint_btrace_pt_show_cmd): Constify.
1423         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
1424         Constify.
1425         * python/python.c (user_show_python, user_set_python): Constify.
1426         * mips-tdep.c (set_mips_command, show_mips_command)
1427         (set_mipsfpu_command): Constify.
1428         * record-btrace.c (cmd_record_btrace_start)
1429         (cmd_set_record_btrace, cmd_show_record_btrace)
1430         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
1431         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
1432         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
1433         Constify.
1434         * symfile.c (overlay_command): Constify.
1435         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
1436         * cli/cli-logging.c (set_logging_command, show_logging_command):
1437         Constify.
1438         * cli/cli-dump.c (dump_command, append_command)
1439         (srec_dump_command, ihex_dump_command, verilog_dump_command)
1440         (tekhex_dump_command, binary_dump_command)
1441         (binary_append_command): Constify.
1442         * cli/cli-decode.c (struct cmd_list_element): Change type of
1443         "fun".
1444         * cli/cli-cmds.c (info_command, show_command, set_debug)
1445         (show_debug): Constify.
1446         (show_command): Add non-const overload.
1447         * top.c (set_history, show_history): Constify.
1448         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
1449         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
1450         * target.c (target_command): Constify.
1451         * sparc64-tdep.c (info_adi_command): Constify.
1452         * record-full.c (cmd_record_full_start): Constify.
1453         (set_record_full_command): Constify.  Fix typo.
1454         (show_record_full_command): Constify.
1455         * thread.c (thread_command, thread_apply_command): Constify.
1456         * memattr.c (dummy_cmd): Constify.
1457         * value.c (function_command): Constify.
1458         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
1459         * probe.c (info_probes_command): Constify.
1460         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
1461         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
1462         (show_thread_cmd, set_thread_default_cmd)
1463         (show_thread_default_cmd): Constify.
1464         (check_empty): Constify.
1465         * tracepoint.c (tfind_command): Constify.
1466         * cp-support.c (maint_cplus_command): Constify.
1467         * windows-tdep.c (info_w32_command): Constify.
1468         * record.c (cmd_record_start, set_record_command)
1469         (show_record_command, info_record_command, cmd_record_goto):
1470         Constify.
1471         * ravenscar-thread.c (set_ravenscar_command)
1472         (show_ravenscar_command): Constify.
1473         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
1474         Constify.
1475         (add_internal_problem_command): Remove casts.
1476         * arc-tdep.c (maintenance_print_arc_command): Constify.
1477         * valprint.c (set_print, show_print, set_print_raw)
1478         (show_print_raw): Constify.
1479         * maint.c (maintenance_command, maintenance_info_command)
1480         (maintenance_print_command, maintenance_set_cmd)
1481         (maintenance_show_cmd, set_per_command_cmd)
1482         (show_per_command_cmd, maintenance_check_command): Constify.
1483         * language.c (set_check, show_check): Constify.
1484         * typeprint.c (show_print_type, set_print_type): Constify.
1485         * go32-nat.c (go32_info_dos_command): Constify.
1486
1487 2017-10-11  Tom Tromey  <tom@tromey.com>
1488
1489         * breakpoint.c (prepare_re_set_context): Remove.
1490         (breakpoint_re_set_one): Update.  Don't use cleanups.
1491         (breakpoint_re_set): Use scoped_restore, std::string, and
1492         scoped_restore_current_language.
1493
1494 2017-10-11  Tom Tromey  <tom@tromey.com>
1495
1496         * breakpoint.c (commands_command_1): Use std::string.
1497         (cleanup_executing_breakpoints): Remove.
1498         (bpstat_do_actions_1): Use scoped_restore.
1499         (bpstat_check_watchpoint): Use std::string.
1500         (decode_static_tracepoint_spec): Likewise.
1501         (break_range_command): Likewise.
1502         (watch_command_1): Likewise.
1503         (compare_breakpoints): Change argument types.
1504         (clear_command): Use std::vector.
1505         (cleanup_executing_breakpoints): Remove.
1506         (update_global_location_list): Use unique_xmalloc_ptr.
1507         (strace_command): Remove unused declaration.
1508
1509 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
1510
1511         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
1512         * NEWS: Mention new FreeBSD/arm native configuration.
1513         * configure.host: Add arm*-*-freebsd*.
1514         * configure.nat: Likewise.
1515         * arm-fbsd-nat.c: New file.
1516
1517 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
1518
1519         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
1520         (ALLDEPFILES): Add arm-fbsd-tdep.c.
1521         * NEWS: Mention new FreeBSD/arm target.
1522         * configure.tgt: Add arm*-*-freebsd*.
1523         * arm-fbsd-tdep.c: New file.
1524         * arm-fbsd-tdep.h: New file.
1525
1526 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
1527
1528         * linux-tdep.c (linux_make_corefile_notes): Remove call to
1529         `gdbarch_elfcore_write_linux_prpsinfo'.
1530         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
1531         method.
1532         (elf_internal_linux_prpsinfo): Remove declaration.
1533         * gdbarch.h: Regenerate.
1534         * gdbarch.c: Regenerate.
1535
1536 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
1537
1538         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
1539         `set_gdbarch_elfcore_write_linux_prpsinfo'.
1540
1541 2017-10-11  Pedro Alves  <palves@redhat.com>
1542
1543         * breakpoint.c (reattach_breakpoints): Delete.
1544         * breakpoint.h (reattach_breakpoints): Delete.
1545
1546 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
1547
1548         * symfile.c (registered_sym_fns): Make struct, not typedef.
1549         (DEF_VEC_O (registered_sym_fns)): Remove.
1550         (symtab_fns): Change type to std::vector.
1551         (add_symtab_fns): Adjust.
1552         (find_sym_fns): Adjust.
1553
1554 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
1555
1556         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
1557         * arc-tdep.h (arc_arch_is_em): New function.
1558         (arc_arch_is_hs): Likewise.
1559
1560 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
1561
1562         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
1563         parentheses in the declaration.
1564         (macro_lookup_inclusion): Likewise.
1565         (macro_lookup_definition): Likewise.
1566         * p-lang.h (pascal_builtin_types): Likewise.
1567         * tui/tui-data.c (tui_win_list): Likewise.
1568         * tui/tui-data.h (tui_win_list): Likewise.
1569         * utils.h (make_cleanup_free_section_addr_info): Likewise.
1570
1571 2017-10-11  Mark Rages  <markrages@gmail.com>
1572
1573         * target-memory.c (block_boundaries): Fix for block address not
1574         aligned on block size.
1575
1576 2017-10-10  Pedro Alves <palves@redhat.com>
1577             Tom Tromey  <tom@tromey.com>
1578
1579         * breakpoint.c (struct captured_breakpoint_query_args)
1580         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
1581         (print_breakpoint): New.
1582         * breakpoint.h (print_breakpoint): Declare.
1583         * common/common-exceptions.h (enum return_reason): Remove
1584         references to catch_exceptions.
1585         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
1586         Delete.
1587         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
1588         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
1589         * gdb.h: Delete.
1590         * gdbthread.h (thread_select): Declare.
1591         * mi/mi-cmd-break.c: Don't include gdb.h.
1592         (breakpoint_notify): Use print_breakpoint.
1593         * mi/mi-cmd-catch.c: Don't include gdb.h.
1594         * mi/mi-interp.c: Don't include gdb.h.
1595         (mi_print_breakpoint_for_event): New.
1596         (mi_breakpoint_created, mi_breakpoint_modified): Use
1597         mi_print_breakpoint_for_event.
1598         * mi/mi-main.c: Don't include gdb.h.
1599         (mi_cmd_thread_select): Parse the global thread ID here.  Use
1600         thread_select instead of gdb_thread_select.
1601         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
1602         of using gdb_list_thread_ids.
1603         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
1604         FILEIO_ENOSYS here.
1605         (remote_fileio_request): Use TRY/CATCH instead of
1606         catch_exceptions.
1607         * symfile-mem.c (struct symbol_file_add_from_memory_args)
1608         (symbol_file_add_from_memory_wrapper): Delete.
1609         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
1610         * thread.c: Don't include gdb.h.
1611         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
1612         (thread_alive): Use thread_select.
1613         (do_captured_thread_select): Delete, parts salvaged as ...
1614         (thread_select): ... this new function.
1615         (gdb_thread_select): Delete.
1616
1617 2017-10-10  Pedro Alves  <palves@redhat.com>
1618             Tom Tromey  <tom@tromey.com>
1619
1620         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
1621         and reverse logic.
1622         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
1623         No longer macros.  Instead ...
1624         (enum wp_check_result): They're now values of this new
1625         enumeration.
1626         (watchpoint_check): Change return type to wp_check_result and
1627         parameter type to bpstat.
1628         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
1629         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
1630         catch_errors.  Reverse logic of watchpoint_check call.
1631         (breakpoint_re_set_one): Now returns void and takes a breakpoint
1632         pointer as parameter.
1633         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
1634         * common/common-exceptions.c (throw_exception_sjlj): Update
1635         comments to avoid mentioning catch_errors.
1636         * exceptions.c (catch_errors): Delete.
1637         * exceptions.h: Update comments to avoid mentioning catch_errors.
1638         (catch_errors_ftype, catch_errors): Delete.
1639         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
1640         (hook_stop_stub): Delete.
1641         (restore_selected_frame): Change return type to void, and
1642         parameter type to const frame_id &.
1643         (restore_infcall_control_state): Use TRY/CATCH instead of
1644         catch_errors.
1645         * main.c (captured_command_loop): Return void and remove
1646         parameter.  Remove references to catch_errors.
1647         (captured_main): Use TRY/CATCH instead of catch_errors.
1648         * objc-lang.c (objc_submethod_helper_data)
1649         (find_objc_msgcall_submethod_helper): Delete.
1650         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
1651         catch_errors.
1652         * record-full.c (record_full_message): Return void.
1653         (record_full_message_args, record_full_message_wrapper): Delete.
1654         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
1655         instead of catch_errors.
1656         * solib-aix.c (solib_aix_open_symbol_file_object): Change
1657         parameter type to int.
1658         * solib-darwin.c (open_symbol_file_object): Ditto.
1659         * solib-dsbt.c (open_symbol_file_object): Ditto.
1660         * solib-frv.c (open_symbol_file_object): Ditto.
1661         * solib-svr4.c (open_symbol_file_object): Ditto.
1662         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
1663         * solib.c (update_solib_list): Use TRY/CATCH instead of
1664         catch_errors.
1665         * solist.h (struct target_so_ops) <open_symbol_file_object>:
1666         Change type.
1667         * symmisc.c (struct print_symbol_args): Remove.
1668         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
1669         (print_symbol): Change type.
1670         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
1671         and remove parameters.
1672         (catch_errors): New.
1673         (get_windows_debug_event): Adjust.
1674
1675 2017-10-09  Tom Tromey  <tom@tromey.com>
1676
1677         * mi/mi-main.c (free_splay_tree): Remove.
1678         (list_available_thread_groups): Use splay_tree_up.
1679         * common/gdb_splay_tree.h: New file.
1680
1681 2017-10-09  Tom Tromey  <tom@tromey.com>
1682
1683         * mi/mi-main.c (do_nothing): Remove.
1684         (list_available_thread_groups): Update.
1685
1686 2017-10-09  Pedro Alves  <palves@redhat.com>
1687
1688         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
1689         reading registers when switching context.
1690
1691 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
1692
1693         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
1694         (fbsd_convert_siginfo): Likewise.
1695         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
1696
1697 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
1698
1699         * configure.ac (try_guile_versions): Remove guile-2.2.
1700         * configure: Regenerate.
1701
1702 2017-10-09  Tom Tromey  <tom@tromey.com>
1703
1704         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
1705         (COMPILE.pre): Use $(CXX).
1706
1707 2017-10-09  Pedro Alves  <palves@redhat.com>
1708
1709         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
1710         Use bool.
1711         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1712         * cp-support.h (cp_remove_params): Now returns a
1713         gdb::unique_xmalloc_ptr.
1714         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
1715         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
1716         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
1717         returning a gdb::unique_xmalloc_ptr.
1718         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1719         * stack.c (find_frame_funname): Adjust to cp_remove_params
1720         returning a gdb::unique_xmalloc_ptr.
1721
1722 2017-10-08  Tom Tromey  <tom@tromey.com>
1723
1724         * dwarf2read.c (dwarf2_get_dwz_file): Use
1725         gdb::unique_xmalloc_ptr.
1726         (find_slot_in_mapped_hash): Likewise.
1727         (dwarf2_physname): Likewise.
1728         (create_dwo_unit_in_dwp_v1): Use std::string.
1729         (create_dwo_unit_in_dwp_v2): Likewise.
1730         (lookup_dwo_cutu): Likewise.
1731         (inherit_abstract_dies): Use std::vector.
1732         (read_array_type): Likewise.
1733         (dwarf_decode_macros): Remove unused declaration.
1734         (unsigned_int_compar): Remove.
1735         (dwarf2_build_psymtabs_hard): Use scoped_restore.
1736         (psymtabs_addrmap_cleanup): Remove.
1737
1738 2017-10-08  Tom Tromey  <tom@tromey.com>
1739
1740         * frame-unwind.c (frame_unwind_try_unwinder): Update.
1741         * frame.h (frame_cleanup_after_sniffer): Declare.
1742         (frame_prepare_for_sniffer): Return void.
1743         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
1744         type of argument.
1745         (frame_prepare_for_sniffer): Return void.
1746
1747 2017-10-08  Tom Tromey  <tom@tromey.com>
1748
1749         * utils.h (make_cleanup_value_free): Remove.
1750         * utils.c (do_value_free, struct cleanup): Remove.
1751         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
1752         Use gdb_value_up.
1753         * value.h (struct value_deleter): New.
1754         (gdb_value_up): New typedef.
1755
1756 2017-10-08  Tom Tromey  <tom@tromey.com>
1757
1758         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
1759         (make_cleanup_free_search_symbols): Remove.
1760         (search_symbols): Return std::vector.
1761         (symbol_search::compare_search_syms): Now member of
1762         symbol_search.  Change arguments.
1763         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
1764         (symtab_symbol_info, rbreak_command): Update.
1765         * symtab.h (struct symbol_search) <next>: Remove.
1766         Add constructors.
1767         (symbol_search::operator<): New function.
1768         (symbol_search::operator==): New function.
1769         (search_symbols): Remove std::vector.
1770         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
1771         (symbol_search::compare_search_syms): Declare.
1772
1773 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1774
1775         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
1776         arch/aarch64-insn.o.
1777         Remove one rule.
1778         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
1779
1780 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1781
1782         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
1783         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
1784         arch/arm-linux.o respectively.
1785         * configure.tgt: Likewise.
1786
1787 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1788
1789         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
1790         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
1791
1792 2017-10-06  Pedro Alves  <palves@redhat.com>
1793
1794         * windows-nat.c: Include <algorithm>.
1795
1796 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1797
1798         * configure.tgt (i386_tobjs): New variable.
1799         (amd64_tobjs): New variable.
1800         Set $cpu_obs and $os_obs.
1801
1802 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1803
1804         * Makefile.in (CONFIG_SRC_SUBDIR): New.
1805         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
1806         (clean): Remove object files and dependency files.
1807         (distclean): Remove the directory.
1808         * configure.ac: Invoke AC_CONFIG_COMMANDS.
1809         * configure: Re-generated.
1810         * configure.tgt: Replace amd64.o with arch/amd64.o.
1811
1812 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
1813
1814         PR build/22188
1815         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
1816         and SETEND.
1817
1818 2017-10-05  Pedro Alves  <palves@redhat.com>
1819
1820         * linux-nat.c (linux_child_follow_fork): When following the parent
1821         and detaching the child, consult the parent thread's architecture
1822         instead of the child's.
1823
1824 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
1825
1826         * ax.h: Do not include "doublest.h".
1827         (union agent_val): Remove.
1828
1829 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
1830
1831         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
1832         (decimal_to_string): Return std::string object.
1833         (decimal_from_string): Accept std::string object.  Return bool.
1834         (decimal_from_integral, decimal_from_doublest): Remove.
1835         (decimal_from_longest): Add prototype.
1836         (decimal_from_ulongest): Likewise.
1837         (decimal_to_longest): Likewise.
1838         (decimal_from_doublest): Likewise.
1839         * dfp.c: Do not include "gdbtypes.h" or "value.h".
1840         (MAX_DECIMAL_STRING): Move here.
1841         (decimal_to_string): Return std::string object.
1842         (decimal_from_string): Accept std::string object.  Return bool.
1843         (decimal_from_integral): Remove, replace by ...
1844         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
1845         (decimal_to_longest): New function.
1846         (decimal_from_floating): Remove, replace by ...
1847         (decimal_from_doublest): ... this new function.
1848         (decimal_to_doublest): Update to new decimal_to_string interface.
1849
1850         * value.c (unpack_long): Use decimal_to_longest.
1851         * valops.c (value_cast): Use decimal_from_doublest instead of
1852         decimal_from_floating.  Use decimal_from_[u]longest isntead of
1853         decimal_from_integral.
1854         * valarith.c (value_args_as_decimal): Likewise.
1855         * valprint.c (print_decimal_floating): Update to new
1856         decimal_to_string interface.
1857         * printcmd.c (printf_decfloat): Likewise.
1858         * c-exp.y (parse_number): Update to new decimal_from_string interface.
1859
1860 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
1861
1862         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
1863         * gdbtypes.c: Include "floatformat.h".
1864         * value.c: Likewise.
1865         * m68k-tdep.c: Likewise.
1866
1867         * findvar.c: Do not include "floatformat.h".
1868         * amd64-darwin-tdep.c: Likewise.
1869         * arm-linux-tdep.c: Likewise.
1870         * i386-darwin-tdep.c: Likewise.
1871         * i387-tdep.c: Likewise.
1872         * m68k-linux-tdep.c: Likewise.
1873         * mep-tdep.c: Likewise.
1874         * mips-tdep.c: Likewise.
1875         * nios2-tdep.c: Likewise.
1876         * s390-linux-tdep.c: Likewise.
1877         * sparc-obsd-tdep.c: Likewise.
1878         * sparc-tdep.c: Likewise.
1879         * sparc64-tdep.c: Likewise.
1880         * spu-tdep.c: Likewise.
1881         * tic6x-tdep.c: Likewise.
1882         * tilegx-tdep.c: Likewise.
1883         * vax-tdep.c: Likewise.
1884         * xstormy16-tdep.c: Likewise.
1885         * xtensa-tdep.c: Likewise.
1886
1887         * top.c: Do not include "doublest.h".
1888         * aarch64-tdep.c: Likewise.
1889         * alpha-tdep.c: Likewise.
1890         * arm-linux-tdep.c: Likewise.
1891         * m68k-linux-tdep.c: Likewise.
1892         * tilegx-tdep.c: Likewise.
1893         * xstormy16-tdep.c: Likewise.
1894
1895 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
1896
1897         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
1898         (mipsn32_fbsd_sigframe): Define.
1899         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
1900         for FreeBSD/mipsn32.
1901
1902 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
1903
1904         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
1905         AT_HWCAP.
1906
1907 2017-10-05  Tristan Gingold  <tgingold@free.fr>
1908
1909         * MAINTAINERS (Misc): Update my email address.
1910
1911 2017-10-04  Pedro Alves  <palves@redhat.com>
1912
1913         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
1914         it instead of target_gdbarch.
1915         (get_remote_state, get_remote_packet_size): Adjust
1916         get_remote_arch_state calls, passing down target_gdbarch
1917         explicitly.
1918         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
1919         'gdbarch' and use it instead of target_gdbarch.
1920         (get_memory_packet_size): Adjust get_remote_arch_state calls,
1921         passing down target_gdbarch explicitly.
1922         (struct stop_reply) <arch>: New field.
1923         (remote_parse_stop_reply): Use the stopped thread's architecture,
1924         not the current inferior's.  Save the architecture in the
1925         stop_reply.
1926         (process_stop_reply): Use the stop reply's architecture.
1927         (process_g_packet, remote_fetch_registers)
1928         (remote_prepare_to_store, store_registers_using_G)
1929         (remote_store_registers): Adjust get_remote_arch_state calls,
1930         using the regcache's architecture.
1931         (remote_get_trace_status): Adjust get_remote_arch_state calls,
1932         passing down target_gdbarch explicitly.
1933         * spu-multiarch.c (spu_thread_architecture): Defer to the target
1934         beneath instead of calling target_gdbarch.
1935         * target.c (default_thread_architecture): Use the specified
1936         inferior's architecture, instead of the current inferior's
1937         architecture (via target_gdbarch).
1938
1939 2017-10-04  Pedro Alves  <palves@redhat.com>
1940
1941         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
1942         case.
1943         (regcache_print): Handle !target_has_registers here instead.
1944
1945 2017-10-04  Pedro Alves  <palves@redhat.com>
1946
1947         * frame.c (create_test_frame): Delete.
1948         * frame.h (create_test_frame): Delete.
1949         * gdbarch-selftests.c: Include gdbthread.h and target.h.
1950         (class regcache_test): Delete.
1951         (test_target_has_registers, test_target_has_stack)
1952         (test_target_has_memory, test_target_prepare_to_store)
1953         (test_target_store_registers): New functions.
1954         (test_target_ops): New class.
1955         (register_to_value_test): Error out if there's already a
1956         process_stratum (or higher) target pushed.  Create a fuller mock
1957         environment, with mock target_ops, inferior, address space, thread
1958         and inferior_ptid.
1959         * progspace.c (struct address_space): Move to ...
1960         * progspace.h (struct address_space): ... here.
1961         * regcache.h (regcache::~regcache, regcache::raw_write)
1962         [GDB_SELF_TEST]: No longer virtual.
1963
1964 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
1965
1966         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
1967
1968 2017-10-04  Pedro Alves  <palves@redhat.com>
1969
1970         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
1971         out of 'between TRY and CATCH'.
1972
1973 2017-10-04  Pedro Alves  <palves@redhat.com>
1974
1975         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
1976         * common/common-exceptions.h (TRY): Open an outermost scope.
1977         Expand intro comment.
1978         (CATCH): Reindent.
1979         (END_CATCH): Close the outermost scope.
1980         * completer.c (complete_line_internal): Add missing END_CATCH.
1981
1982 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1983
1984         * NEWS (Changes since GDB 8.0): Add entry about new
1985         'set-cwd-on-gdbserver' feature.
1986         (New remote packets): Add entry for QSetWorkingDir.
1987         * common/common-inferior.h (set_inferior_cwd): New prototype.
1988         * infcmd.c (set_inferior_cwd): Remove "static".
1989         (show_cwd_command): Expand text to include remote debugging.
1990         * remote.c: Add PACKET_QSetWorkingDir.
1991         (remote_protocol_features) <QSetWorkingDir>: New entry for
1992         PACKET_QSetWorkingDir.
1993         (extended_remote_set_inferior_cwd): New function.
1994         (extended_remote_create_inferior): Call
1995         "extended_remote_set_inferior_cwd".
1996         (_initialize_remote): Call "add_packet_config_cmd" for
1997         QSetWorkingDir.
1998
1999 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2000
2001         * NEWS (New commands): Mention "set/show cwd".
2002         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
2003         "cd" command's help text.
2004         * common/common-inferior.h (get_inferior_cwd): New prototype.
2005         * infcmd.c (inferior_cwd_scratch): New global variable.
2006         (set_inferior_cwd): New function.
2007         (get_inferior_cwd): Likewise.
2008         (set_cwd_command): Likewise.
2009         (show_cwd_command): Likewise.
2010         (_initialize_infcmd): Add "set/show cwd" commands.
2011         * inferior.h (class inferior) <cwd>: New field.
2012         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
2013         (fork_inferior): Change inferior's cwd before its execution.
2014         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
2015         to CreateProcess.
2016
2017 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2018
2019         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
2020         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
2021         (COMMON_OBS): Add gdb_tilde_expand.o.
2022         * common/gdb_tilde_expand.c: New file.
2023         * common/gdb_tilde_expand.h: Likewise.
2024
2025 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
2026
2027         * gdbarch.sh (objfile): Remove duplicate declaration.
2028         * gdbarch.h: Regenerate.
2029
2030 2017-10-03  Tom Tromey  <tom@tromey.com>
2031
2032         * utils.c (internal_vproblem): Use string_vprintf.
2033
2034 2017-10-03  Tom Tromey  <tom@tromey.com>
2035
2036         * printcmd.c (info_symbol_command): Use std::string.
2037
2038 2017-10-03  Tom Tromey  <tom@tromey.com>
2039
2040         * top.c (gdb_safe_append_history): Use std::string.
2041
2042 2017-10-03  Tom Tromey  <tom@tromey.com>
2043
2044         * event-top.c (stdin_event_handler): Update.
2045         * main.c (captured_main_1): Update.
2046         * top.h (make_delete_ui_cleanup): Remove.
2047         (struct ui): Add constructor and destructor.
2048         (new_ui, delete_ui): Remove.
2049         * top.c (make_delete_ui_cleanup): Remove.
2050         (new_ui_command): Use std::unique_ptr.
2051         (delete_ui_cleanup): Remove.
2052         (ui::ui): Rename from new_ui.  Update.
2053         (free_ui): Remove.
2054         (ui::~ui): Rename from delete_ui.  Update.
2055
2056 2017-10-03  Tom Tromey  <tom@tromey.com>
2057
2058         * symfile.c (load_progress): Use gdb::byte_vector.
2059
2060 2017-10-03  Tom Tromey  <tom@tromey.com>
2061
2062         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
2063         declaration.
2064         * printcmd.c (x_command): Remove unused declaration.
2065         * symfile.c (symbol_file_command): Remove unused declaration.
2066
2067 2017-10-03  Tom Tromey  <tom@tromey.com>
2068
2069         * utils.c (internal_vproblem): Use std::string.
2070         (defaulted_query): Likewise.
2071
2072 2017-10-03  Tom Tromey  <tom@tromey.com>
2073
2074         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
2075         * top.c (execute_command_to_string): Update.
2076         * utils.c (make_cleanup_restore_page_info): Remove.
2077         (do_restore_page_info_cleanup): Remove.
2078         (set_batch_flag_and_restore_page_info):
2079         New.
2080         (make_cleanup_restore_page_info): Remove.
2081         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2082         (~set_batch_flag_and_restore_page_info): New
2083         (make_cleanup_restore_uinteger): Remove.
2084         (make_cleanup_restore_integer): Remove.
2085         (struct restore_integer_closure): Remove.
2086         (restore_integer): Remove.
2087         * utils.h (struct set_batch_flag_and_restore_page_info): New
2088         class.
2089         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2090         (make_cleanup_restore_page_info): Remove.
2091         (make_cleanup_restore_uinteger) Remove.
2092         (make_cleanup_restore_integer) Remove.
2093
2094 2017-10-03  Tom Tromey  <tom@tromey.com>
2095
2096         * record-full.h (record_full_gdb_operation_disable_set): Return
2097         scoped_restore_tmpl<int>.
2098         * infrun.c (adjust_pc_after_break): Update.
2099         (handle_signal_stop): Update.
2100         * record-full.c (record_full_gdb_operation_disable_set): Return
2101         scoped_restore_tmpl<int>.
2102         (record_full_wait_1, record_full_insert_breakpoint)
2103         (record_full_remove_breakpoint, record_full_save)
2104         (record_full_goto_insn): Update.
2105
2106 2017-10-02  Tom Tromey  <tom@tromey.com>
2107
2108         PR rust/22236:
2109         * rust-lang.c (rust_val_print_str): New function.
2110         (val_print_struct): Call it.
2111         (rust_subscript): Preserve name of slice type.
2112
2113 2017-10-02  Tom Tromey  <tom@tromey.com>
2114
2115         * rust-lang.c (rust_subscript): Handle slices in
2116         EVAL_AVOID_SIDE_EFFECTS case.
2117
2118 2017-10-02  Tom Tromey  <tom@tromey.com>
2119
2120         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
2121
2122 2017-10-02  Tom Tromey  <tom@tromey.com>
2123
2124         * rust-lang.h (rust_slice_type): Add "extern".
2125
2126 2017-10-02  Tom Tromey  <tom@tromey.com>
2127             Pedro Alves  <palves@redhat.com>
2128
2129         * ada-lang.h (ada_exc_info::operator<): Make const.
2130         (ada_exc_info::operator==): Make const.
2131         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
2132         Make const.
2133
2134 2017-09-29  Tom Tromey  <tom@tromey.com>
2135
2136         * target.c (read_whatever_is_readable): Change type of "result".
2137         Update.
2138         (free_memory_read_result_vector): Remove.
2139         (read_memory_robust): Change return type.  Update.
2140         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
2141         bin2hex, std::string.
2142         * target.h (memory_read_result_s): Remove typedef.
2143         (free_memory_read_result_vector): Remove.
2144         (read_memory_robust): Return std::vector.
2145
2146 2017-09-29  Tom Tromey  <tom@tromey.com>
2147
2148         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
2149
2150 2017-09-29  Tom Tromey  <tom@tromey.com>
2151
2152         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
2153         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
2154         operator< and operator==.
2155         (ada_exceptions_list): Return a std::vector.
2156         * ada-lang.c (ada_exc_info::operator<): Rename from
2157         compare_ada_exception_info.
2158         (ada_exc_info::operator==): New.
2159         (sort_remove_dups_ada_exceptions_list): Change type of
2160         "exceptions".
2161         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
2162         (ada_add_global_exceptions): Likewise.
2163         (ada_exceptions_list_1): Return a std::vector.
2164         (ada_exceptions_list): Likewise.
2165
2166 2017-09-29  Tom Tromey  <tom@tromey.com>
2167
2168         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
2169         'std::set *'.
2170         (print_one_inferior): Update.
2171         (free_vector_of_ints): Remove.
2172         (list_available_thread_groups): Change "ids" to std::set.
2173         (mi_cmd_list_thread_groups): Update.
2174         (struct collect_cores_data) <core>: Now a std::set.
2175         (collect_cores): Update.
2176         (unique): Remove.
2177         (print_one_inferior): Update.
2178
2179 2017-09-29  Tom Tromey  <tom@tromey.com>
2180
2181         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
2182         (mi_execute_async_cli_command): Likewise.
2183         (mi_cmd_trace_frame_collected): Use field_fmt.
2184
2185 2017-09-29  Tom Tromey  <tom@tromey.com>
2186
2187         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
2188         gdb::byte_vector.
2189
2190 2017-09-29  Tom Tromey  <tom@tromey.com>
2191
2192         * mi/mi-parse.c (mi_parse): Remove unused declaration.
2193
2194 2017-09-29  Tom Tromey  <tom@tromey.com>
2195
2196         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
2197
2198 2017-09-29  Tom Tromey  <tom@tromey.com>
2199
2200         * varobj.h (varobj_gen_name): Return std::string.
2201         * varobj.c (varobj_gen_name): Return std::string.
2202         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
2203         (mi_cmd_var_delete): Don't copy "name".
2204
2205 2017-09-29  Tom Tromey  <tom@tromey.com>
2206
2207         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
2208         (mi_cmd_break_insert_1): Update.
2209
2210 2017-09-29  Tom Tromey  <tom@tromey.com>
2211
2212         * target.h (make_scoped_defer_target_commit_resume): Update.
2213         * target.c (make_scoped_defer_target_commit_resume): Rename from
2214         make_cleanup_defer_target_commit_resume.  Return a
2215         scoped_restore.
2216         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
2217
2218 2017-09-29  Tom Tromey  <tom@tromey.com>
2219
2220         * main.c (captured_main_1): Remove unused declaration.
2221         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
2222
2223 2017-09-29  Tom Tromey  <tom@tromey.com>
2224
2225         * symtab.c (search_symbols): Remove unused outer cleanup.
2226         (make_source_files_completion_list): Remove unused declaration.
2227
2228 2017-09-29  Tom Tromey  <tom@tromey.com>
2229
2230         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
2231
2232 2017-09-29  Tom Tromey  <tom@tromey.com>
2233
2234         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
2235         gdb::byte_vector.
2236
2237 2017-09-29  Tom Tromey  <tom@tromey.com>
2238
2239         * complaints.c (vcomplaint): Use std::string.
2240
2241 2017-09-29  Tom Tromey  <tom@tromey.com>
2242
2243         * tracepoint.c (trace_variable_command): Use std::string.
2244         (encode_actions_1): Remove unused declarations.
2245         (create_tsv_from_upload): Use std::string.
2246
2247 2017-09-29  Tom Tromey  <tom@tromey.com>
2248
2249         * cp-support.c (gdb_demangle): Use std::string.
2250
2251 2017-09-29  Tom Tromey  <tom@tromey.com>
2252
2253         * stack.c (parse_frame_specification): Use std::string
2254         (info_frame_command): Use gdb::unique_xmalloc_ptr.
2255
2256 2017-09-29  Tom Tromey  <tom@tromey.com>
2257
2258         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
2259
2260 2017-09-29  Tom Tromey  <tom@tromey.com>
2261
2262         * utils.c (vfprintf_maybe_filtered): Use std::string.
2263         (vfprintf_unfiltered): Likewise.
2264
2265 2017-09-29  Tom Tromey  <tom@tromey.com>
2266
2267         * event-top.c (top_level_prompt): Return std::string.
2268         (display_gdb_prompt): Update.
2269
2270 2017-09-29  Tom Tromey  <tom@tromey.com>
2271
2272         * unittests/common-utils-selftests.c (format): New function.
2273         (string_vprintf_tests): New function.
2274         (_initialize_common_utils_selftests): Register new tests.
2275         * common/common-utils.c (string_vprintf): New function.
2276         * common/common-utils.h (string_vprintf): Declare.
2277
2278 2017-09-29  Pedro Alves  <palves@redhat.com>
2279
2280         * common/rsp-low.c (unpack_varlen_hex): Constify.
2281         * common/rsp-low.h (unpack_varlen_hex): Constify.
2282         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
2283         Constify.
2284         * remote.c (remote_set_permissions, read_ptid)
2285         (remote_current_thread, remote_get_threads_with_qthreadinfo)
2286         (remote_static_tracepoint_marker_at)
2287         (remote_static_tracepoint_markers_by_strid)
2288         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
2289         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
2290         (parse_tracepoint_definition, parse_tsv_definition)
2291         (parse_static_tracepoint_marker_definition): Constify.
2292         * tracepoint.h (parse_static_tracepoint_marker_definition)
2293         (parse_trace_status, parse_tracepoint_status)
2294         (parse_tracepoint_definition, parse_tsv_definition): Constify.
2295
2296 2017-09-29  Pedro Alves  <palves@redhat.com>
2297
2298         * remote.c (target_buf, target_buf_size): Delete.
2299         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
2300         Use the connection's packet buffer instead.
2301         All callers adjusted.
2302         (_initialize_remote): Remove references to target_buf and
2303         target_buf_size.
2304
2305 2017-09-28  Pedro Alves  <palves@redhat.com>
2306
2307         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2308         unittests/common-utils-selftests.c.
2309         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
2310         (COMMON_OBS): Remove utils-selftests.o.
2311         * utils-selftests.c: Move to ...
2312         * unittests/common-utils-selftests.c: ... here and rename self
2313         test to "string_printf".
2314
2315 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
2316
2317         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
2318         having NULL cus or tus.
2319
2320 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2321
2322         * arm-tdep.c: (convert_from_extended): Remove.
2323         (convert_to_extended): Likewise.
2324         (arm_extract_return_value): Use convert_typed_floating.
2325         (arm_store_return_value): Likewise.
2326
2327         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2328         * sh-tdep.c: Do not include "floatformat.h".
2329         (sh_littlebyte_bigword_type): New function.
2330         (sh_register_convert_to_virtual): Use convert_typed_floating.
2331         (sh_register_convert_to_raw): Likewise.
2332         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2333         (sh64_littlebyte_bigword_type): New function.
2334         (sh64_extract_return_value): Use convert_typed_floating.
2335         (sh64_register_convert_to_virtual): Likewise.
2336         (sh64_register_convert_to_raw): Likewise.
2337
2338 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2339
2340         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
2341         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
2342
2343         * gdbtypes.h (union type_specific): Make field floatformat hold
2344         just a single struct floatformat, not an array.
2345         (floatformat_from_type): Move here.
2346         * gdbtypes.c (floatformat_from_type): Move here.  Update to
2347         changed TYPE_FLOATFORMAT definition.
2348         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
2349         (recursive_dump_type): Likewise.
2350         (init_float_type): Install correct floatformat for byte order.
2351         (arch_float_type): Likewise.
2352
2353 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2354
2355         * gdbtypes.c (init_type): Change incoming argument from
2356         length-in-bytes to length-in-bits.  Assert length is a
2357         multiple of TARGET_CHAR_BITS.
2358         (arch_type, arch_flags_type): Likewise.
2359         (init_integer_type): Update call to init_type.
2360         (init_character_type): Likewise.
2361         (init_boolean_type): Likewise.
2362         (init_float_type): Likewise.
2363         (init_decfloat_type): Likewise.
2364         (init_complex_type): Likewise.
2365         (init_pointer_type): Likewise.
2366         (objfile_type): Likewise.
2367         (arch_integer_type): Update call to arch_type.
2368         (arch_character_type): Likewise.
2369         (arch_boolean_type): Likewise.
2370         (arch_float_type): Likewise.
2371         (arch_decfloat_type): Likewise.
2372         (arch_complex_type): Likewise.
2373         (arch_pointer_type): Likewise.
2374         (gdbtypes_post_init): Likewise.
2375
2376         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
2377         (read_base_type): Likewise.
2378         * mdebugread.c (basic_type): Likewise.
2379         * stabsread.c (dbx_init_float_type): Likewise.
2380         (rs6000_builtin_type): Likewise.
2381         (read_range_type): Likewise.  Also, fix call to init_integer_type
2382         with erroneous length argument.
2383
2384         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
2385         * d-lang.c (build_d_types): Likewise.
2386         * f-lang.c (build_fortran_types): Likewise.
2387         * go-lang.c (build_go_types): Likewise.
2388         * opencl-lang.c (build_opencl_types): Likewise.
2389         * jit.c (finalize_symtab): Likewise.
2390         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2391         (build_std_type_info_type): Likewise.
2392         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
2393         update call to arch_flags_type.
2394
2395         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
2396         arch_type.
2397         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
2398         * windows-tdep.c (windows_get_tlb_type): Likewise.
2399
2400         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
2401         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
2402         * m32c-tdep.c (make_types): Likewise.
2403         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
2404         (rl78_psw_type): Update call to arch_flags_type.
2405         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
2406         * rx-tdep.c (rx_psw_type): Likewise.
2407         (rx_fpsw_type): Likewise.
2408         * sparc-tdep.c (sparc_psr_type): Likewise.
2409         (sparc_fsr_type): Likewise.
2410         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
2411         (sparc64_ccr_type): Likewise.
2412         (sparc64_fsr_type): Likewise.
2413         (sparc64_fprs_type): Likewise.
2414
2415 2017-09-27  Tom Tromey  <tom@tromey.com>
2416
2417         * findcmd.c (find_command): Constify.
2418
2419 2017-09-27  Tom Tromey  <tom@tromey.com>
2420
2421         * ada-tasks.c (task_command_1, task_command): Constify.
2422
2423 2017-09-27  Tom Tromey  <tom@tromey.com>
2424
2425         * symtab.c (maintenance_print_symbol_cache)
2426         (maintenance_flush_symbol_cache)
2427         (maintenance_print_symbol_cache_statistics): Constify.
2428
2429 2017-09-27  Tom Tromey  <tom@tromey.com>
2430
2431         * inferior.c (detach_inferior_command, kill_inferior_command)
2432         (inferior_command): Constify.
2433
2434 2017-09-27  Tom Tromey  <tom@tromey.com>
2435
2436         * regcache.c (regcache_print, maintenance_print_registers)
2437         (maintenance_print_raw_registers)
2438         (maintenance_print_cooked_registers)
2439         (maintenance_print_register_groups)
2440         (maintenance_print_remote_registers): Constify.
2441
2442 2017-09-27  Tom Tromey  <tom@tromey.com>
2443
2444         * printcmd.c (map_display_numbers, undisplay_command)
2445         (enable_disable_display_command, enable_display_command)
2446         (disable_display_command): Constify.
2447
2448 2017-09-27  Tom Tromey  <tom@tromey.com>
2449
2450         * breakpoint.h (delete_command): Don't declare.
2451         * breakpoint.c (delete_command, enable_once_command)
2452         (enable_count_command, enable_delete_command, breakpoint_1)
2453         (maintenance_info_breakpoints, stopin_command, stopat_command)
2454         (delete_command, delete_trace_command, save_breakpoints)
2455         (save_breakpoints_command, save_tracepoints_command): Constify.
2456
2457 2017-09-27  Tom Tromey  <tom@tromey.com>
2458
2459         * macrocmd.c (macro_expand_command, macro_expand_once_command)
2460         (skip_ws, extract_identifier, macro_define_command)
2461         (macro_undef_command, macro_list_command): Constify.
2462
2463 2017-09-27  Tom Tromey  <tom@tromey.com>
2464
2465         * infcmd.c (environment_info, set_environment_command)
2466         (unset_environment_command, path_info, info_proc_cmd_1)
2467         (info_proc_cmd_mappings, info_proc_cmd_stat)
2468         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
2469         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
2470
2471 2017-09-27  Tom Tromey  <tom@tromey.com>
2472
2473         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
2474         Constify.
2475
2476 2017-09-27  Tom Tromey  <tom@tromey.com>
2477
2478         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
2479
2480 2017-09-27  Tom Tromey  <tom@tromey.com>
2481
2482         * demangle.c (demangle_command): Constify.
2483
2484 2017-09-27  Tom Tromey  <tom@tromey.com>
2485
2486         * progspace.c (maintenance_info_program_spaces_command):
2487         Constify.
2488
2489 2017-09-27  Tom Tromey  <tom@tromey.com>
2490
2491         * compile/compile.c (check_raw_argument, compile_file_command)
2492         (compile_code_command, compile_print_command): Constify.
2493
2494 2017-09-27  Tom Tromey  <tom@tromey.com>
2495
2496         * reggroups.c (maintenance_print_reggroups): Constify.
2497
2498 2017-09-27  Tom Tromey  <tom@tromey.com>
2499
2500         * dwarf2read.c (save_gdb_index_command): Constify.
2501
2502 2017-09-27  Tom Tromey  <tom@tromey.com>
2503
2504         * stap-probe.c (info_probes_stap_command): Constify.
2505
2506 2017-09-27  Tom Tromey  <tom@tromey.com>
2507
2508         * fork-child.c (unset_exec_wrapper_command): Constify.
2509
2510 2017-09-27  Tom Tromey  <tom@tromey.com>
2511
2512         * btrace.c (get_uint, get_context_size, no_chunk)
2513         (maint_btrace_packet_history_cmd)
2514         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
2515         (maint_info_btrace_cmd): Constify.
2516
2517 2017-09-27  Tom Tromey  <tom@tromey.com>
2518
2519         * reverse.c (delete_bookmark_command): Constify.
2520
2521 2017-09-27  Tom Tromey  <tom@tromey.com>
2522
2523         * remote.c (set_memory_packet_size)
2524         (set_memory_write_packet_size, show_memory_write_packet_size)
2525         (set_memory_read_packet_size, show_memory_read_packet_size)
2526         (compare_sections_command, packet_command, remote_put_command)
2527         (remote_get_command, remote_delete_command): Constify.
2528
2529 2017-09-27  Tom Tromey  <tom@tromey.com>
2530
2531         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
2532         (set_mipsfpu_double_command, set_mipsfpu_none_command)
2533         (set_mipsfpu_auto_command): Constify.
2534
2535 2017-09-27  Tom Tromey  <tom@tromey.com>
2536
2537         * cli/cli-cmds.h (cd_command): Constify.
2538         * cli/cli-cmds.c (cd_command): Constify.
2539
2540 2017-09-27  Tom Tromey  <tom@tromey.com>
2541
2542         * thread.c (thread_name_command, thread_find_command): Constify.
2543
2544 2017-09-27  Tom Tromey  <tom@tromey.com>
2545
2546         * probe.c (enable_probes_command, disable_probes_command):
2547         Constify.
2548
2549 2017-09-27  Tom Tromey  <tom@tromey.com>
2550
2551         * symfile.c (symbol_file_command): Constify.
2552         * gdbcore.h (deprecated_file_changed_hook): Constify.
2553         * exec.c (deprecated_file_changed_hook, exec_file_command)
2554         (file_command): Constify.
2555         * defs.h (symbol_file_command): Constify.
2556
2557 2017-09-27  Tom Tromey  <tom@tromey.com>
2558
2559         * remote-fileio.c (set_system_call_allowed)
2560         (show_system_call_allowed): Constify.
2561
2562 2017-09-27  Tom Tromey  <tom@tromey.com>
2563
2564         * tracepoint.c (delete_trace_variable_command)
2565         (tfind_end_command, tfind_start_command, tfind_pc_command)
2566         (tfind_tracepoint_command, tfind_line_command)
2567         (tfind_range_command, tfind_outside_command): Constify.
2568
2569 2017-09-27  Tom Tromey  <tom@tromey.com>
2570
2571         * ax-gdb.c (maint_agent_printf_command, agent_command)
2572         (agent_eval_command): Constify.
2573
2574 2017-09-27  Tom Tromey  <tom@tromey.com>
2575
2576         * tracepoint.c (info_scope_command): Constify.
2577         * python/python.c (gdbpy_decode_line): Constify.
2578         * python/py-breakpoint.c (bppy_init): Constify.
2579         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
2580         * location.h: (new_linespec_location)
2581         (string_to_event_location_basic, string_to_event_location):
2582         Constify.
2583         * location.c (new_linespec_location)
2584         (string_to_event_location_basic, string_to_event_location):
2585         Constify.
2586         * linespec.h (decode_line_with_current_source)
2587         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
2588         * linespec.c (linespec_lex_to_end)
2589         (decode_line_with_current_source)
2590         (decode_line_with_last_displayed): Constify.
2591         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
2592         Constify.
2593         * cli/cli-cmds.c (edit_command, list_command): Constify.
2594         * breakpoint.h (until_break_command, watch_command_wrapper)
2595         (awatch_command_wrapper, rwatch_command_wrapper)
2596         (init_ada_exception_breakpoint): Constify.
2597         * breakpoint.c (break_command_1, dprintf_command)
2598         (break_range_command, watch_command_wrapper)
2599         (rwatch_command_wrapper, awatch_command_wrapper)
2600         (until_break_command, init_ada_exception_breakpoint)
2601         (strace_marker_create_sals_from_location, trace_command)
2602         (ftrace_command, strace_command, struct tracepoint): Constify.
2603         * ax-gdb.c (agent_command_1): Constify.
2604         * ada-lang.c (ada_exception_sal): Constify.
2605
2606 2017-09-27  Tom Tromey  <tom@tromey.com>
2607
2608         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
2609         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
2610         (get_context_size, no_chunk, get_insn_history_modifiers)
2611         (cmd_record_insn_history, get_call_history_modifiers)
2612         (cmd_record_call_history): Constify.
2613
2614 2017-09-27  Tom Tromey  <tom@tromey.com>
2615
2616         * source.c (show_substitute_path_command)
2617         (unset_substitute_path_command, set_substitute_path_command):
2618         Constify.
2619
2620 2017-09-27  Tom Tromey  <tom@tromey.com>
2621
2622         * typeprint.c (maintenance_print_type): Constify.
2623         * maint.c (maintenance_dump_me, maintenance_demangle)
2624         (maintenance_time_display, maintenance_info_sections)
2625         (maintenance_print_statistics, maintenance_deprecate)
2626         (maintenance_undeprecate): Constify.
2627         (maintenance_do_deprecate): Constify.  Use std::string.
2628         (maintenance_selftest): Constify.
2629         * gdbtypes.h (maintenance_print_type): Constify.
2630
2631 2017-09-27  Tom Tromey  <tom@tromey.com>
2632
2633         * hppa-tdep.c (unwind_command): Constify.
2634
2635 2017-09-27  Tom Tromey  <tom@tromey.com>
2636
2637         * target-descriptions.c (unset_tdesc_filename_cmd)
2638         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
2639         Constify.
2640
2641 2017-09-27  Tom Tromey  <tom@tromey.com>
2642
2643         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
2644
2645 2017-09-27  Tom Tromey  <tom@tromey.com>
2646
2647         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
2648
2649 2017-09-27  Tom Tromey  <tom@tromey.com>
2650
2651         * tui/tui-regs.c (tui_reg_command): Constify.
2652
2653 2017-09-27  Tom Tromey  <tom@tromey.com>
2654
2655         * skip.c (skip_file_command, skip_function_command)
2656         (skip_enable_command, skip_disable_command, skip_delete_command):
2657         Constify.
2658
2659 2017-09-27  Tom Tromey  <tom@tromey.com>
2660
2661         * record-btrace.c (cmd_record_btrace_bts_start)
2662         (cmd_record_btrace_pt_start): Constify.
2663
2664 2017-09-27  Tom Tromey  <tom@tromey.com>
2665
2666         * symmisc.c (maintenance_print_symbols)
2667         (maintenance_print_msymbols, maintenance_print_objfiles)
2668         (maintenance_info_symtabs, maintenance_check_symtabs)
2669         (maintenance_expand_symtabs, maintenance_info_line_tables):
2670         Constify.
2671
2672 2017-09-27  Tom Tromey  <tom@tromey.com>
2673
2674         * top.c (new_ui_command): Constify.
2675
2676 2017-09-27  Tom Tromey  <tom@tromey.com>
2677
2678         * symfile.c (add_symbol_file_command)
2679         (remove_symbol_file_command, list_overlays_command)
2680         (map_overlay_command, unmap_overlay_command)
2681         (overlay_auto_command, overlay_manual_command)
2682         (overlay_off_command, overlay_load_command): Constify.
2683
2684 2017-09-27  Tom Tromey  <tom@tromey.com>
2685
2686         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
2687         (info_spu_mailbox_command, info_spu_dma_command)
2688         (info_spu_proxydma_command): Constify.
2689
2690 2017-09-27  Tom Tromey  <tom@tromey.com>
2691
2692         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
2693
2694 2017-09-27  Tom Tromey  <tom@tromey.com>
2695
2696         * cli/cli-script.c (user_defined_command): Constify.
2697
2698 2017-09-27  Tom Tromey  <tom@tromey.com>
2699
2700         * cli/cli-dump.c (dump_memory_command, dump_value_command)
2701         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
2702         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
2703         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
2704         (dump_binary_value, append_binary_memory, append_binary_value):
2705         Constify.
2706         (struct dump_context) <func>: Constify.
2707         (add_dump_command): Update.
2708
2709 2017-09-27  Tom Tromey  <tom@tromey.com>
2710
2711         * cli/cli-cmds.c (show_version, show_configuration)
2712         (source_command, show_user): Constify.
2713
2714 2017-09-27  Tom Tromey  <tom@tromey.com>
2715
2716         * target.c (maintenance_print_target_stack): Constify.
2717
2718 2017-09-27  Tom Tromey  <tom@tromey.com>
2719
2720         * interps.c (interpreter_exec_cmd): Constify.
2721
2722 2017-09-27  Tom Tromey  <tom@tromey.com>
2723
2724         * record-full.c (cmd_record_full_restore): Constify.
2725
2726 2017-09-27  Tom Tromey  <tom@tromey.com>
2727
2728         * memattr.c (enable_mem_command, disable_mem_command)
2729         (delete_mem_command): Constify.
2730
2731 2017-09-27  Tom Tromey  <tom@tromey.com>
2732
2733         * value.c (show_convenience): Constify.
2734
2735 2017-09-27  Tom Tromey  <tom@tromey.com>
2736
2737         * gdbcore.h (core_file_command): Update.
2738         * corefile.c (core_file_command): Constify.
2739
2740 2017-09-27  Tom Tromey  <tom@tromey.com>
2741
2742         * user-regs.c (maintenance_print_user_registers): Constify.
2743
2744 2017-09-27  Tom Tromey  <tom@tromey.com>
2745
2746         * cp-namespace.c (maintenance_cplus_namespace): Constify.
2747
2748 2017-09-27  Tom Tromey  <tom@tromey.com>
2749
2750         * cp-support.c (first_component_command): Constify.
2751
2752 2017-09-27  Tom Tromey  <tom@tromey.com>
2753
2754         * psymtab.c (maintenance_print_psymbols)
2755         (maintenance_info_psymtabs, maintenance_check_psymtabs):
2756         Constify.
2757
2758 2017-09-27  Tom Tromey  <tom@tromey.com>
2759
2760         * windows-tdep.c (display_tib): Constify.
2761
2762 2017-09-27  Tom Tromey  <tom@tromey.com>
2763
2764         * linux-fork.c (delete_checkpoint_command)
2765         (detach_checkpoint_command): Constify.
2766
2767 2017-09-27  Tom Tromey  <tom@tromey.com>
2768
2769         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
2770
2771 2017-09-27  Tom Tromey  <tom@tromey.com>
2772
2773         * arc-tdep.c (dump_arc_instruction_command): Constify.
2774
2775 2017-09-27  Tom Tromey  <tom@tromey.com>
2776
2777         * valprint.c (set_radix, show_radix): Constify.
2778
2779 2017-09-27  Tom Tromey  <tom@tromey.com>
2780
2781         * dtrace-probe.c (info_probes_dtrace_command): Constify.
2782
2783 2017-09-27  Tom Tromey  <tom@tromey.com>
2784
2785         * command.h (not_just_help_class_command): Update.
2786         * cli/cli-decode.h (not_just_help_class_command): Update.
2787         * cli/cli-decode.c (not_just_help_class_command): Constify.
2788
2789 2017-09-27  Tom Tromey  <tom@tromey.com>
2790
2791         * gdb_bfd.c (maintenance_info_bfds): Constify.
2792
2793 2017-09-27  Tom Tromey  <tom@tromey.com>
2794
2795         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
2796         overloads.
2797         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
2798         (do_const_cfunc): New function.
2799         (cmd_cfunc_eq): New overload.
2800         (cli_user_command_p): Check do_const_cfunc.
2801         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
2802         const_cfunc.
2803         * command.h (add_cmd): Add const overload and no-function
2804         overload.
2805         (set_cmd_cfunc): Add const overload.
2806         (cmd_const_cfunc_ftype): Declare.
2807         (cmd_cfunc_eq): Add const overload.
2808         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
2809         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
2810         overload.
2811
2812 2017-09-27  Tom Tromey  <tom@tromey.com>
2813
2814         * macroexp.c (get_next_token_for_substitution): New function.
2815         (substitute_args): Call it.  Check for __VA_OPT__.
2816
2817 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2818             Pedro Alves <palves@redhat.com>
2819
2820         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
2821         producer_is_icc_lt_14.
2822         (producer_is_icc_lt_14): New function.
2823         (check_producer): Add code for checking version of ICC.
2824         (producer_is_icc): Move to producer.c.
2825         (read_structure_type): Restrict ICC workaround to ICC<14.
2826         * producer.c: Include selftest.h.
2827         (producer_is_icc, producer_parsing_tests, _initialize_producer):
2828         New functions.
2829         * producer.h (producer_is_icc): New declaration.
2830
2831 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2832
2833         * Makefile.in (SFILES): Add producer.c.
2834         (COMMON_OBS): Add producer.o
2835         * amd64-tdep.c (producer.h): Add new include.
2836         * dwarf2read.c (producer.h): Add new include.
2837         * producer.c: New file.
2838         * producer.h: New file.
2839         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
2840         producer.c.
2841         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
2842         producer.h.
2843
2844 2017-09-26  Matthias Klose  <doko@ubuntu.com>
2845
2846         * configure.ac: Search ncursesw before ncurses.
2847         Check ncursesw/ncurses.h before ncurses/ncurses.h.
2848         * gdb_curses.h: Include <ncursesw/ncurses.h>
2849         * config.in, configure: Regenerate.
2850
2851 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2852
2853         PR gdb/22185
2854         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
2855         obsolete.
2856         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
2857         Remove i386sol2 support.
2858         * configure.nat <i386sol2>: Remove.
2859         <sol2-64>: Fold into ...
2860         <sol2>: ... this.
2861         Move common settings to default section.
2862         Add sol-thread.o.
2863         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
2864         x86_64-*-solaris2.1[0-9]*>: Rename to ...
2865         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
2866         <i[34567]86-*-solaris*>: Remove.
2867         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
2868
2869         * configure.ac: Remove wctype in libw check.
2870         (_MSE_INT_H): Don't define on Solaris 7-9.
2871         <solaris*>: Remove libthread_db.so.1 check.
2872         * configure: Regenerate.
2873         * config.in: Regenerate.
2874
2875         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
2876         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
2877         (gdb_ps_size_t): Remove.
2878         Use base types in users.
2879         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
2880
2881         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
2882
2883 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2884
2885         PR build/22206
2886         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
2887         (adi_is_addr_mapped): Likewise.
2888         (PSR_ICC): Don't redefine.
2889         (PSR_IMPL): Likewise.
2890
2891 2017-09-25  Tom Tromey  <tom@tromey.com>
2892
2893         * regcache.c (regcache::dump): Use string_printf.
2894
2895 2017-09-25  Tom Tromey  <tom@tromey.com>
2896
2897         * regcache.c (class regcache_invalidator): New.
2898         (struct register_to_invalidate): Remove.
2899         (make_cleanup_regcache_invalidate): Remove.
2900         (regcache::raw_write): Use regcache_invalidator.
2901
2902 2017-09-25  Tom Tromey  <tom@tromey.com>
2903
2904         * spu-tdep.c (spu2ppu_sniffer): Update.
2905         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
2906         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
2907         Remove.
2908         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
2909         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
2910         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
2911         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
2912         (frame_pop): Update.
2913
2914 2017-09-25  Tom Tromey  <tom@tromey.com>
2915
2916         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
2917         * regcache.h (regcache_xfree): Don't declare.
2918         * regcache.c (regcache_xfree): Remove.
2919         (do_regcache_xfree): Use delete.
2920         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
2921         * linux-fork.c (free_fork): Use delete.
2922         (fork_save_infrun_state): Likewise.
2923         * jit.c (jit_dealloc_cache): Use delete.
2924         * infrun.c (discard_infcall_suspend_state): Use delete.
2925
2926 2017-09-25  Tom Tromey  <tom@tromey.com>
2927
2928         * regcache.h (regcache_xmalloc): Don't declare.
2929         (regcache_raw_set_cached_value): Update comment.
2930         * regcache.c (regcache_xmalloc): Remove.
2931         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
2932         * jit.c (jit_frame_sniffer): Use new.
2933         * frame.c (frame_save_as_regcache): Use new.
2934
2935 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2936
2937         * NEWS: Advertise support for guarded-storage registers on IBM z.
2938
2939 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2940
2941         * s390-linux-nat.c (have_regset_gs): New static variable.
2942         (s390_linux_fetch_inferior_registers): Handle guarded-storage
2943         control block and guarded-storage broadcast control regsets.
2944         (s390_read_description): Detect whether the target has
2945         guarded-storage support, return appropriate tdesc.
2946         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
2947         (features/s390x-gs-linux64.c): Likewise.
2948         (struct gdbarch_tdep) <have_gs>: New field.
2949         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
2950         (s390_gsbc_regset): New variables.
2951         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
2952         and s390_gsbc_regset, if applicable.
2953         (s390_core_read_description): Check whether core file was from a
2954         target with guarded-storage support; include appropriate regsets.
2955         (s390_gdbarch_init): Add registers for guarded-storage support.
2956         (_initialize_s390_tdep): Initialize new target descriptions that
2957         include registers for guarded-storage support.
2958         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
2959         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
2960         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
2961         (S390_NUM_REGS): Adjust macro definition.
2962         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
2963         (tdesc_s390x_gs_linux64): New declarations.
2964
2965 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2966
2967         * features/s390-gs-linux64.xml: New file.
2968         * features/s390-gs.xml: New file.
2969         * features/s390-gsbc.xml: New file.
2970         * features/s390x-gs-linux64.xml: New file.
2971         * features/Makefile (WHICH): Add s390-gs-linux64 and
2972         s390x-gs-linux64.
2973         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
2974         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
2975         * features/s390-gs-linux64.c: New generated file.
2976         * features/s390x-gs-linux64.c: New file.
2977         * regformats/s390-gs-linux64.dat: New file.
2978         * regformats/s390x-gs-linux64.dat: New file.
2979
2980 2017-09-23  Tom Tromey  <tom@tromey.com>
2981
2982         * defs.h (make_cleanup_override_quit_handler): Don't declare.
2983
2984 2017-09-22  Tom Tromey  <tom@tromey.com>
2985
2986         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
2987         type to scoped_restore_tmpl.
2988         <scoped_input_handler>: Initialize m_quit_handler directly.
2989
2990 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
2991
2992         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
2993         (cd_command): Likewise.  Free "current_directory" before
2994         assigning to it.
2995         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
2996         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
2997         * top.c (gdb_dirbuf): Remove global declaration.
2998         * top.h (gdb_dirbuf): Likewise.
2999
3000 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
3001
3002         * gnulib/aclocal.m4: Regenerate.
3003         * gnulib/config.in: Regenerate.
3004         * gnulib/configure: Regenerate.
3005         * gnulib/import/Makefile.am: Regenerate.
3006         * gnulib/import/Makefile.in: Regenerate.
3007         * gnulib/import/assure.h: New file.
3008         * gnulib/import/at-func.c: Likewise
3009         * gnulib/import/chdir-long.c: New file.
3010         * gnulib/import/chdir-long.h: New file.
3011         * gnulib/import/cloexec.c: New file.
3012         * gnulib/import/cloexec.h: New file.
3013         * gnulib/import/close.c: New file.
3014         * gnulib/import/closedir.c: New file.
3015         * gnulib/import/dirent-private.h: New file.
3016         * gnulib/import/dup-safer.c: New file.
3017         * gnulib/import/dup.c: New file.
3018         * gnulib/import/dup2.c: New file.
3019         * gnulib/import/error.c: New file.
3020         * gnulib/import/error.h: New file.
3021         * gnulib/import/exitfail.c: New file.
3022         * gnulib/import/exitfail.h: New file.
3023         * gnulib/import/fchdir.c: New file.
3024         * gnulib/import/fcntl.c: New file.
3025         * gnulib/import/fcntl.in.h: New file.
3026         * gnulib/import/fd-hook.c: New file.
3027         * gnulib/import/fd-hook.h: New file.
3028         * gnulib/import/fd-safer.c: New file.
3029         * gnulib/import/fdopendir.c: New file.
3030         * gnulib/import/filename.h: New file.
3031         * gnulib/import/filenamecat-lgpl.c: New file.
3032         * gnulib/import/filenamecat.h: New file.
3033         * gnulib/import/fstat.c: New file.
3034         * gnulib/import/fstatat.c: New file.
3035         * gnulib/import/getcwd-lgpl.c: New file.
3036         * gnulib/import/getcwd.c: New file.
3037         * gnulib/import/getdtablesize.c: New file.
3038         * gnulib/import/getlogin_r.c: New file.
3039         * gnulib/import/getprogname.c: New file.
3040         * gnulib/import/getprogname.h: New file.
3041         * gnulib/import/gettext.h: New file.
3042         * gnulib/import/glob-libc.h: New file.
3043         * gnulib/import/glob.c: New file.
3044         * gnulib/import/glob.in.h: New file.
3045         * gnulib/import/intprops.h: New file.
3046         * gnulib/import/m4/chdir-long.m4: New file.
3047         * gnulib/import/m4/close.m4: New file.
3048         * gnulib/import/m4/closedir.m4: New file.
3049         * gnulib/import/m4/d-ino.m4: New file.
3050         * gnulib/import/m4/d-type.m4: New file.
3051         * gnulib/import/m4/dup.m4: New file.
3052         * gnulib/import/m4/dup2.m4: New file.
3053         * gnulib/import/m4/error.m4: New file.
3054         * gnulib/import/m4/fchdir.m4: New file.
3055         * gnulib/import/m4/fcntl.m4: New file.
3056         * gnulib/import/m4/fcntl_h.m4: New file.
3057         * gnulib/import/m4/fdopendir.m4: New file.
3058         * gnulib/import/m4/filenamecat.m4: New file.
3059         * gnulib/import/m4/fstat.m4: New file.
3060         * gnulib/import/m4/fstatat.m4: New file.
3061         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
3062         * gnulib/import/m4/getcwd-path-max.m4: New file.
3063         * gnulib/import/m4/getcwd.m4: New file.
3064         * gnulib/import/m4/getdtablesize.m4: New file.
3065         * gnulib/import/m4/getlogin_r.m4: New file.
3066         * gnulib/import/m4/getprogname.m4: New file.
3067         * gnulib/import/m4/glob.m4: New file.
3068         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
3069         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
3070         * gnulib/import/m4/mempcpy.m4: New file.
3071         * gnulib/import/m4/memrchr.m4: New file.
3072         * gnulib/import/m4/mode_t.m4: New file.
3073         * gnulib/import/m4/msvc-inval.m4: New file.
3074         * gnulib/import/m4/msvc-nothrow.m4: New file.
3075         * gnulib/import/m4/open.m4: New file.
3076         * gnulib/import/m4/openat.m4: New file.
3077         * gnulib/import/m4/opendir.m4: New file.
3078         * gnulib/import/m4/readdir.m4: New file.
3079         * gnulib/import/m4/realloc.m4: New file.
3080         * gnulib/import/m4/rewinddir.m4: New file.
3081         * gnulib/import/m4/save-cwd.m4: New file.
3082         * gnulib/import/m4/strdup.m4: New file.
3083         * gnulib/import/m4/strerror.m4: New file.
3084         * gnulib/import/m4/unistd-safer.m4: New file.
3085         * gnulib/import/mempcpy.c: New file.
3086         * gnulib/import/memrchr.c: New file.
3087         * gnulib/import/msvc-inval.c: New file.
3088         * gnulib/import/msvc-inval.h: New file.
3089         * gnulib/import/msvc-nothrow.c: New file.
3090         * gnulib/import/msvc-nothrow.h: New file.
3091         * gnulib/import/open.c: New file.
3092         * gnulib/import/openat-die.c: New file.
3093         * gnulib/import/openat-priv.h: New file.
3094         * gnulib/import/openat-proc.c: New file.
3095         * gnulib/import/openat.c: New file.
3096         * gnulib/import/openat.h: New file.
3097         * gnulib/import/opendir.c: New file.
3098         * gnulib/import/pipe-safer.c: New file.
3099         * gnulib/import/readdir.c: New file.
3100         * gnulib/import/realloc.c: New file.
3101         * gnulib/import/rewinddir.c: New file.
3102         * gnulib/import/save-cwd.c: New file.
3103         * gnulib/import/save-cwd.h: New file.
3104         * gnulib/import/strdup.c: New file.
3105         * gnulib/import/strerror-override.c: New file.
3106         * gnulib/import/strerror-override.h: New file.
3107         * gnulib/import/strerror.c: New file.
3108         * gnulib/import/unistd--.h: New file.
3109         * gnulib/import/unistd-safer.h: New file.
3110         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
3111         "getcwd" and "glob".
3112         * ser-tcp.c: Undefine "close" before redefining it.
3113
3114 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3115
3116         * guile/scm-value.c (gdbscm_value_address): Initialize address,
3117         get rid of res_val.
3118
3119 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3120
3121         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
3122         <sol2,sparc>: Likewise.
3123         <sol2-64,i386>: Likewise.
3124
3125         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
3126         -Wdeprecated-declarations on *-*-solaris*.
3127         * configure: Regenerate.
3128
3129         * procfs.c: Include "nat/inferior.h".
3130         (procfs_info_proc): Fix typo.
3131
3132 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3133
3134         * remote.c (vector): Include.
3135         (struct private_thread_info): Add field, thread_handle.
3136         (free_private_thread_info): Deallocate storage associated with
3137         thread handle.
3138         (get_private_info_thread): Initialize `thread_handle' field.
3139         (struct thread_item): Add field, thread_handle.
3140         (clear_threads_listing_context): Deallocate storage associated
3141         with thread handle.
3142         (start_thread): Add support for "handle" attribute.
3143         (thread_attributes): Add "handle".
3144         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
3145         field.
3146         (remote_update_thread_list): Update thread_handle.
3147         (remote_thread_handle_to_thread_info): New function.
3148         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
3149
3150 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3151
3152         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
3153         function.
3154         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
3155         * python/python-internal.h (thread_object_type): Declare.
3156
3157 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3158
3159         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
3160         (target_thread_handle_to_thread_info): Declare.
3161         * target.c (target_thread_handle_to_thread_info): New function.
3162         * target-delegates.c: Regenerate.
3163         * gdbthread.h (find_thread_by_handle): Declare.
3164         * thread.c (find_thread_by_handle): New function.
3165         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
3166         function.
3167         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
3168
3169 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3170
3171         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
3172
3173 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3174
3175         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
3176
3177 2017-09-21  Yao Qi  <yao.qi@linaro.org>
3178
3179         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
3180         to gdb_target_obs.
3181
3182 2017-09-20  Tom Tromey  <tom@tromey.com>
3183
3184         * breakpoint.c (struct counted_command_line): Remove.
3185         (breakpoint_commands): Update.
3186         (alloc_counted_command_line, incref_counted_command_line)
3187         (decref_counted_command_line, do_cleanup_counted_command_line)
3188         (make_cleanup_decref_counted_command_line): Remove.
3189         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
3190         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
3191         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
3192         (save_breakpoints): Update.
3193         * breakpoint.h (counted_command_line): Now a typedef to
3194         shared_ptr.
3195         (struct breakpoint) <commands>: Now a counted_command_line.
3196         (struct bpstats) <command>: Likewise.
3197
3198 2017-09-20  Tom Tromey  <tom@tromey.com>
3199
3200         * breakpoint.c (struct commands_info, do_map_commands_command):
3201         Remove.
3202         (commands_command_1): Update.
3203         (iterate_over_related_breakpoints): Take a function_view.
3204         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
3205         (delete_command): Update.
3206         (map_breakpoint_numbers): Take a function_view.
3207         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
3208         (disable_command): Update.
3209         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
3210         (enable_command): Update.
3211         (struct disp_data, do_enable_breakpoint_disp)
3212         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
3213         (do_map_enable_delete_breakpoint): Remove.
3214         (enable_once_command, enable_count_command, enable_delete_command)
3215         (delete_trace_variable_command): Update.
3216
3217 2017-09-20  Tom Tromey  <tom@tromey.com>
3218
3219         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
3220         (bpstat_clear): Use delete.
3221         (bpstats): New constructors.
3222         (bpstat_copy, bpstat_stop_status): Use new.
3223         (dprintf_after_condition_true): Update.
3224         * breakpoint.h (bpstats::bpstats): Add constructors.
3225         (bpstats::~bpstats): Add destructor.
3226
3227 2017-09-20  Pedro Alves  <palves@redhat.com>
3228
3229         * eval.c (make_params): Delete, refactored as ...
3230         (class fake_method): ... this new type's ctor.
3231         (fake_method::~fake_method): New.
3232         (evaluate_subexp_standard): Use 'fake_method'.
3233
3234 2017-09-20  Tom Tromey  <tom@tromey.com>
3235
3236         * windows-nat.c (get_windows_debug_event, windows_wait)
3237         (do_initial_windows_stuff, windows_attach): Update.
3238         * utils.c (vwarning, internal_vproblem): Update.
3239         (ui_unregister_input_event_handler_cleanup)
3240         (prepare_to_handle_input): Remove.
3241         (class scoped_input_handler): New.
3242         (defaulted_query, prompt_for_continue): Update.
3243         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
3244         Update.
3245         * top.c (undo_terminal_modifications_before_exit): Update.
3246         * target/target.h (target_terminal_init, target_terminal_inferior)
3247         (target_terminal_ours): Don't declare.
3248         (class target_terminal): New.
3249         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
3250         (target_terminal_ours_for_output)
3251         (make_cleanup_restore_target_terminal): Don't declare.
3252         (target_terminal_info): Remove.
3253         * target.c (enum terminal_state, terminal_state): Remove.
3254         (target_terminal::terminal_state): Define.
3255         (target_terminal::init): Rename from target_terminal_init.
3256         (target_terminal::inferior): Rename from
3257         target_terminal_inferior.
3258         (target_terminal::ours): Rename from target_terminal_ours.
3259         (target_terminal::ours_for_output): Rename from
3260         target_terminal_ours_for_output.
3261         (target_terminal::info): New method.
3262         (cleanup_restore_target_terminal)
3263         (make_cleanup_restore_target_terminal): Remove.
3264         * solib.c (handle_solib_event): Update.
3265         * remote.c (remote_serial_quit_handler): Update.
3266         (remote_terminal_inferior, remote_wait_as): Update.
3267         * record-full.c (record_full_wait_1): Update.
3268         * nto-procfs.c (procfs_create_inferior): Update.
3269         * nat/fork-inferior.c (startup_inferior): Update.
3270         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
3271         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
3272         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
3273         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
3274         (mi_breakpoint_created, mi_breakpoint_deleted)
3275         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
3276         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3277         (mi_user_selected_context_changed, report_initial_inferior):
3278         Update.
3279         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
3280         (linux_nat_terminal_inferior): Update.
3281         * infrun.c (follow_fork_inferior)
3282         (handle_vfork_child_exec_or_exit, do_target_resume)
3283         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
3284         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
3285         Update.
3286         * inflow.c (child_terminal_init, info_terminal_command): Update.
3287         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
3288         (attach_command): Update.
3289         * infcall.c (call_thread_fsm_should_stop): Update.
3290         * gnu-nat.c (gnu_attach): Update.
3291         * extension.c (struct active_ext_lang_state)
3292         (restore_active_ext_lang): Update.
3293         * exceptions.c (print_flush): Update.
3294         * event-top.c (async_enable_stdin, default_quit_handler): Update.
3295         (struct quit_handler_cleanup_data, restore_quit_handler)
3296         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
3297         Remove.
3298         * cp-support.c (gdb_demangle): Update.
3299         * breakpoint.c (update_inserted_breakpoint_locations)
3300         (insert_breakpoint_locations, handle_jit_event)
3301         (disable_breakpoints_in_unloaded_shlib): Update.
3302         * annotate.c (annotate_breakpoints_invalid)
3303         (annotate_frames_invalid): Update.
3304
3305 2017-09-20  Tom Tromey  <tom@tromey.com>
3306
3307         * main.c (catch_command_errors): Rename from
3308         catch_command_errors_const.
3309         (captured_main_1): Update.
3310
3311 2017-09-20  Pedro Alves  <palves@redhat.com>
3312
3313         * cli/cli-cmds.c (list_command): Use print_sal_location.
3314         (print_sal_location): New function.
3315         (ambiguous_line_spec): Use print_sal_location.
3316         * linespec.c (symbol_to_sal): Record the symbol in the sal.
3317         * symtab.c (find_function_start_sal): Likewise.
3318         * symtab.h (symtab_and_line::symbol): New field.
3319
3320 2017-09-20  Pedro Alves  <palves@redhat.com>
3321
3322         * linespec.c (minsym_found): Handle non-text minsyms.
3323         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
3324
3325 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3326
3327         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
3328         backslash.
3329
3330 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3331
3332         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
3333         vmovups instead vmovaps.
3334         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
3335
3336 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
3337
3338         * NEWS (Changes since GDB 8.0): Add starti.
3339         * infcmd.c (enum run_break): New.
3340         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
3341         case.
3342         (run_command): Use enum run_how.
3343         (start_command): Likewise.
3344         (starti_command): New function.
3345         (RUN_ARGS_HELP): New macro.
3346         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
3347         commands.  Add starti command.
3348
3349 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3350
3351         * Makefile.in (monitor.o): Remove the rule.
3352
3353 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3354
3355         * annotate.h (struct annotate_arg_emitter): Use
3356         DISABLE_COPY_AND_ASSIGN.
3357         * common/refcounted-object.h (refcounted_object): Likewise.
3358         * completer.h (struct completion_result): Likewise.
3359         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
3360         * filename-seen-cache.h (filename_seen_cache): Likewise.
3361         * gdbcore.h (thread_section_name): Likewise.
3362         * gdb_regex.h (compiled_regex): Likewise.
3363         * gdbthread.h (scoped_restore_current_thread): Likewise.
3364         * inferior.h (scoped_restore_current_inferior): Likewise.
3365         * jit.c (jit_reader): Likewise.
3366         * linespec.h (struct linespec_result): Likewise.
3367         * mi/mi-parse.h (struct mi_parse): Likewise.
3368         * nat/fork-inferior.c (execv_argv): Likewise.
3369         * progspace.h (scoped_restore_current_program_space): Likewise.
3370         * python/python-internal.h (class gdbpy_enter): Likewise.
3371         * regcache.h (regcache): Likewise.
3372         * target-descriptions.c (struct tdesc_reg): Likewise.
3373         (struct tdesc_type): Likewise.
3374         (struct tdesc_feature): Likewise.
3375         * ui-out.h (ui_out_emit_type): Likewise.
3376
3377 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
3378
3379         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
3380         label abort_expression.
3381
3382 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3383
3384         * common/buffer.c (buffer_xml_printf): Adjust.
3385         * common/xml-utils.c (xml_escape_text): Change return type to
3386         std::string, update code accordingly.
3387         * common/xml-utils.h (xml_escape_text): Change return type to
3388         std::string.
3389         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
3390         * windows-tdep.c (windows_xfer_shared_library): Adjust.
3391         * unittests/xml-utils-selftests.c (test_xml_escape_text):
3392         Adjust.
3393
3394 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3395
3396         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
3397         (SUBDIR_UNITTESTS_OBS): Add new object file.
3398         * unittests/xml-utils-selftests.c: New file.
3399
3400 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3401
3402         * common/selftest.h (selftest): New struct/interface.
3403         (register_test): Add name parameter, add new overload.
3404         (run_tests): Add filter parameter.
3405         (for_each_selftest_ftype): New typedef.
3406         (for_each_selftest): New declaration.
3407         * common/selftest.c (tests): Change type to
3408         map<string, unique_ptr<selftest>>.
3409         (simple_selftest): New struct.
3410         (register_test): New function.
3411         (register_test): Add name parameter and use it.
3412         (run_tests): Add filter parameter and use it.  Add prints.
3413         Adjust to vector -> map change.
3414         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
3415         registering selftests.
3416         * arm-tdep.c (_initialize_arm_tdep): Likewise.
3417         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
3418         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
3419         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
3420         * findvar.c (_initialize_findvar): Likewise.
3421         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
3422         * maint.c (maintenance_selftest): Update call to run_tests.
3423         (maintenance_info_selftests): New function.
3424         (_initialize_maint_cmds): Register "maintenance info selftests"
3425         command.  Update "maintenance selftest" doc.
3426         * regcache.c (_initialize_regcache): Add names when registering
3427         selftests.
3428         * rust-exp.y (_initialize_rust_exp): Likewise.
3429         * selftest-arch.c (gdbarch_selftest): New struct.
3430         (gdbarch_tests): Remove.
3431         (register_test_foreach_arch): Add name parameter.  Call
3432         register_test.
3433         (tests_with_arch): Remove, move most content to
3434         gdbarch_selftest::operator().
3435         (_initialize_selftests_foreach_arch): Remove.
3436         * selftest-arch.h (register_test_foreach_arch): Add name
3437         parameter.
3438         (run_tests_with_arch): New declaration.
3439         * utils-selftests.c (_initialize_utils_selftests): Add names
3440         when registering selftests.
3441         * utils.c (_initialize_utils): Likewise.
3442         * unittests/array-view-selftests.c
3443         (_initialize_array_view_selftests): Likewise.
3444         * unittests/environ-selftests.c (_initialize_environ_selftests):
3445         Likewise.
3446         * unittests/function-view-selftests.c
3447         (_initialize_function_view_selftests): Likewise.
3448         * unittests/offset-type-selftests.c
3449         (_initialize_offset_type_selftests): Likewise.
3450         * unittests/optional-selftests.c
3451         (_initialize_optional_selftests): Likewise.
3452         * unittests/scoped_restore-selftests.c
3453         (_initialize_scoped_restore_selftests): Likewise.
3454         * NEWS: Document "maintenance selftest" and "maint info
3455         selftests".
3456
3457 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3458
3459         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
3460         scoped_restore.
3461
3462 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3463
3464         * mi/mi-main.c (mi_load_progress): Make uiout variable
3465         a unique_ptr.
3466
3467 2017-09-15  Pedro Alves  <palves@redhat.com>
3468
3469         * compile/compile-c-types.c (convert_enum, convert_int)
3470         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
3471
3472 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
3473
3474         * dwarf2read.c (copy_string): Remove.
3475         (parse_macro_definition): Replace copy_string with savestring.
3476
3477 2017-09-15  Yao Qi  <yao.qi@linaro.org>
3478
3479         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
3480         gdb_target_obs.
3481         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
3482         Likewise.
3483         (i[34567]86-*-linux*): Likewise.
3484
3485 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3486
3487         * dwarf2expr.h (dwarf_stack_value): Add constructor.
3488         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
3489         <stack>: Change type to std::vector.
3490         <stack_len, stack_allocated>: Remove.
3491         <grow_stack>: Remove.
3492         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3493         (dwarf_expr_context::~dwarf_expr_context): Remove.
3494         (dwarf_expr_context::grow_stack): Remove.
3495         (dwarf_expr_context::push): Adjust.
3496         (dwarf_expr_context::pop): Adjust.
3497         (dwarf_expr_context::fetch): Adjust.
3498         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
3499         (dwarf_expr_context::stack_empty_p): Adjust.
3500         (dwarf_expr_context::execute_stack_op): Adjust.
3501
3502 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3503
3504         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
3505         return type to bool.
3506         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
3507
3508 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3509
3510         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
3511         Change type to bool.
3512         (dwarf_stack_value) <in_stack_memory>: Likewise.
3513         (dwarf_expr_context) <push_address>: Change parameter type to
3514         bool.
3515         <fetch_in_stack_memory>: Change return type to bool.
3516         <push>: Change parameter type to bool.
3517         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
3518         to bool.
3519         (dwarf_expr_context::push_address): Likewise.
3520         (dwarf_expr_context::fetch_in_stack_memory): Change return type
3521         to bool.
3522         (dwarf_expr_context::execute_stack_op): Adjust.
3523         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
3524
3525 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3526
3527         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
3528         (struct dwarf_expr_context) <n_pieces>: Remove.
3529         <pieces>: Change type to std::vector.
3530         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3531         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
3532         pieces.
3533         (dwarf_expr_context::add_piece): Adjust.
3534         * dwarf2loc.c (struct piece_closure): Initialize fields.
3535         <n_pieces>: Remove.
3536         <pieces>: Change type to std::vector.
3537         (allocate_piece_closure): Adjust, change parameter to
3538         std::vector rvalue and std::move it to piece_closure.
3539         (rw_pieced_value): Adjust.
3540         (check_pieced_synthetic_pointer): Adjust.
3541         (indirect_synthetic_pointer): Adjust.
3542         (coerce_pieced_ref): Adjust.
3543         (free_pieced_value_closure):  Adjust.  Use delete to free
3544         piece_closure.
3545         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
3546         to allocate_piece_closure.
3547         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
3548
3549 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3550
3551         * probe.h (probe_ops_cp): Remove typedef.
3552         (DEF_VEC_P (probe_ops_cp)): Remove.
3553         (all_probe_ops): Change type to std::vector.
3554         * probe.c (info_probes_for_ops): Adjust to vector change.
3555         (probe_linespec_to_ops): Likewise.
3556         (all_probe_ops): Change type to std::vector.
3557         (_initialize_probe): Adjust to vector change.
3558         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
3559         * elfread.c (elf_get_probes): Likewise.
3560         * stap-probe.c (_initialize_stap_probe): Likewise.
3561
3562 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3563
3564         * probe.h (struct bound_probe): Define constructors.
3565         * probe.c (bound_probe_s): Remove typedef.
3566         (DEF_VEC_O (bound_probe_s)): Remove VEC.
3567         (collect_probes): Change return type to std::vector, remove
3568         cleanup.
3569         (compare_probes): Return bool, change parameter type.  Change
3570         semantic to "less than".
3571         (gen_ui_out_table_header_info): Change parameter to std::vector
3572         and update.
3573         (exists_probe_with_pops): Likewise.
3574         (info_probes_for_ops): Update to std::vector change.
3575         (enable_probes_command): Likewise.
3576         (disable_probes_command): Likewise.
3577
3578 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3579
3580         * probe.h (struct probe_ops) <get_probes>: Change parameter from
3581         vec to std::vector.
3582         * probe.c (parse_probes_in_pspace): Update.
3583         (find_probes_in_objfile): Update.
3584         (find_probe_by_pc): Update.
3585         (collect_probes): Update.
3586         (probe_any_get_probes): Update.
3587         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
3588         return type to reference to std::vector.
3589         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
3590         std::vector and update.
3591         (dtrace_process_dof): Likewise.
3592         (dtrace_get_probes): Likewise.
3593         * elfread.c (elf_get_probes): Change return type to std::vector,
3594         store an std::vector in bfd_data.
3595         (probe_key_free): Update to std::vector.
3596         * stap-probe.c (handle_stap_probe): Change parameter to
3597         std::vector and update.
3598         (stap_get_probes): Likewise.
3599         * symfile-debug.c (debug_sym_get_probes): Change return type to
3600         std::vector and update.
3601
3602 2017-09-11  Tom Tromey  <tom@tromey.com>
3603
3604         * breakpoint.c (program_breakpoint_here_p): Update.
3605         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
3606         from make_show_memory_breakpoints_cleanup.  Return a
3607         scoped_restore_tmpl<int>.
3608         (restore_show_memory_breakpoints): Remove.
3609         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
3610         * mem-break.c (memory_validate_breakpoint): Update.
3611         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
3612         (ia64_memory_remove_breakpoint): Update.
3613         (ia64_breakpoint_from_pc): Update.
3614         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
3615         from make_show_memory_breakpoints_cleanup.
3616
3617 2017-09-11  Tom Tromey  <tom@tromey.com>
3618
3619         * d-namespace.c (d_lookup_symbol): Use std::string.
3620         (find_symbol_in_baseclass): Likewise.
3621
3622 2017-09-11  Tom Tromey  <tom@tromey.com>
3623
3624         * ctf.c (ctf_start): Use std::string.
3625
3626 2017-09-11  Tom Tromey  <tom@tromey.com>
3627
3628         * ada-lang.c (is_known_support_routine): Update.
3629         (ada_unhandled_exception_name_addr_from_raise): Update.
3630         * guile/scm-frame.c (gdbscm_frame_name): Update.
3631         * python/py-frame.c (frapy_name): Update.
3632         (frapy_function): Update.
3633         * stack.h (find_frame_funname): Update.
3634         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
3635         (print_frame): Update.
3636
3637 2017-09-11  Tom Tromey  <tom@tromey.com>
3638
3639         * findcmd.c (put_bits): Take a gdb::byte_vector.
3640         (parse_find_args): Return gdb::byte_vector.  "args" now const.
3641         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
3642         cleanups.
3643         (find_command): Update.
3644
3645 2017-09-11  Tom Tromey  <tom@tromey.com>
3646
3647         * cli/cli-script.c (class scoped_restore_hook_in): New.
3648         (clear_hook_in_cleanup): Remove.
3649         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
3650         scoped_restore_hook_in.
3651
3652 2017-09-11  Tom Tromey  <tom@tromey.com>
3653
3654         * cli/cli-script.c (restore_interp): Remove.
3655         (read_command_lines): Use scoped_restore_interp.
3656         * interps.c (scoped_restore_interp::set_temp): Rename from
3657         interp_set_temp.
3658         * interps.h (class scoped_restore_interp): New.
3659         (interp_set_temp): Remove.
3660
3661 2017-09-11  Tom Tromey  <tom@tromey.com>
3662
3663         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3664         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
3665         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
3666         scoped_restore.
3667         (mi_cmd_break_insert_1): Update.
3668         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
3669         scoped_restore.
3670
3671 2017-09-11  Tom Tromey  <tom@tromey.com>
3672
3673         * demangle.c (demangle_command): Update.
3674         * breakpoint.c (disable_command): Update.
3675         (enable_command): Update.
3676         (find_location_by_number): Make "number" const.  Use
3677         get_number_trailer.
3678         * cli/cli-utils.c (extract_arg): Return std::string.
3679         * probe.c (parse_probe_linespec): Update.  Change types.
3680         (collect_probes): Take string arguments.
3681         (parse_probe_linespec): Likewise.
3682         (info_probes_for_ops): Update.
3683         (enable_probes_command): Update.
3684         (disable_probes_command): Update.
3685         * break-catch-sig.c (catch_signal_split_args): Update.
3686         * mi/mi-parse.c (mi_parse): Update.
3687
3688 2017-09-11  Tom Tromey  <tom@tromey.com>
3689
3690         * language.h (language_enum): Make argument const.
3691         * language.c (language_enum): Make argument const.
3692
3693 2017-09-11  Tom Tromey  <tom@tromey.com>
3694
3695         * common/common-utils.h (skip_to_space): Remove macro, redeclare
3696         as function.
3697         (skip_to_space): Rename from skip_to_space_const.
3698         * common/common-utils.c (skip_to_space): New function.
3699         (skip_to_space): Rename from skip_to_space_const.
3700         * cli/cli-utils.h (get_number): Rename from get_number_const.
3701         (extract_arg): Rename from extract_arg_const.
3702         * cli/cli-utils.c (get_number): Rename from get_number_const.
3703         (extract_arg): Rename from extract_arg_const.
3704         (number_or_range_parser::get_number): Use ::get_number.
3705         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
3706         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
3707         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
3708         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
3709         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
3710         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
3711         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
3712         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
3713
3714 2017-09-11  Tom Tromey  <tom@tromey.com>
3715
3716         * python/python.c (do_start_initialization): Use
3717         py-event-types.def to initialize types.
3718         Define all object type structures.
3719         * python/python-internal.h: Don't declare event initialization
3720         functions.
3721         * python/py-threadevent.c (thread_event_object_type): Don't
3722         define.
3723         * python/py-stopevent.c (stop_event_object_type): Don't define.
3724         * python/py-signalevent.c (signal_event_object_type): Don't
3725         declare or define.
3726         * python/py-newobjfileevent.c (new_objfile_event_object_type)
3727         (clear_objfiles_event_object_type): Don't declare or define.
3728         * python/py-infevents.c (inferior_call_pre_event_object_type)
3729         (inferior_call_post_event_object_type)
3730         (register_changed_event_object_type)
3731         (memory_changed_event_object_type): Don't declare or define.
3732         * python/py-inferior.c (new_thread_event_object_type)
3733         (new_inferior_event_object_type)
3734         (inferior_deleted_event_object_type): Don't declare or define.
3735         * python/py-exitedevent.c (exited_event_object_type): Don't
3736         declare or define.
3737         * python/py-evts.c (gdbpy_initialize_py_events): Use
3738         py-all-events.def.
3739         * python/py-events.h (thread_event_object_type): Don't declare.
3740         (events_object): Use py-all-events.def.
3741         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
3742         py-event-types.def.
3743         * python/py-event-types.def: New file.
3744         * python/py-continueevent.c (create_continue_event_object): Don't
3745         declare or define.
3746         * python/py-bpevent.c (breakpoint_event_object_type): Don't
3747         declare or define.
3748         * python/py-all-events.def: New file.
3749
3750 2017-09-11  Tom Tromey  <tom@tromey.com>
3751
3752         * python/py-threadevent.c (create_thread_event_object): Return
3753         gdbpy_ref.
3754         * python/py-stopevent.h (create_stop_event_object)
3755         (create_breakpoint_event_object, create_signal_event_object):
3756         Update.
3757         * python/py-stopevent.c (create_stop_event_object): Return
3758         gdbpy_ref.
3759         (emit_stop_event): Update.
3760         * python/py-signalevent.c (create_signal_event_object): Return
3761         gdbpy_ref.
3762         * python/py-infevents.c (create_inferior_call_event_object):
3763         Update.
3764         * python/py-event.h (create_event_object)
3765         (create_thread_event_object): Update.
3766         * python/py-event.c (create_event_object): Return gdbpy_ref.
3767         * python/py-continueevent.c: Return gdbpy_ref.
3768         * python/py-bpevent.c (create_breakpoint_event_object): Return
3769         gdbpy_ref.
3770
3771 2017-09-11  Tom Tromey  <tom@tromey.com>
3772
3773         PR python/15622:
3774         * NEWS: Add entry.
3775         * python/python.c (do_start_initialization): Initialize new event
3776         types.
3777         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
3778         (gdbpy_initialize_inferior_deleted_event)
3779         (gdbpy_initialize_new_thread_event): Declare.
3780         * python/py-threadevent.c (create_thread_event_object): Add option
3781         "thread" parameter.
3782         * python/py-inferior.c (new_thread_event_object_type)
3783         (new_inferior_event_object_type)
3784         (inferior_deleted_event_object_type): Declare.
3785         (python_new_inferior, python_inferior_deleted): New functions.
3786         (add_thread_object): Emit new_thread event.
3787         (gdbpy_initialize_inferior): Attach new functions to corresponding
3788         observers.
3789         (new_thread, new_inferior, inferior_deleted): Define new event
3790         types.
3791         * python/py-evts.c (gdbpy_initialize_py_events): Add new
3792         registries.
3793         * python/py-events.h (events_object) <new_inferior,
3794         inferior_deleted, new_thread>: New fields.
3795         * python/py-event.h (create_thread_event_breakpoint): Add optional
3796         "thread" parameter.
3797
3798 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3799
3800         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
3801         check current_ui instead.
3802         (internal_vproblem): Likewise.
3803
3804 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
3805
3806         * thread.c (print_thread_info_1): Remove unnecessary calls to
3807         uiout->is_mi_like_p.
3808
3809 2017-09-09  Tom Tromey  <tom@tromey.com>
3810
3811         * namespace.h (add_using_directive): Update.
3812         * namespace.c (add_using_directive): Change type of excludes to
3813         std::vector.
3814         * dwarf2read.c (read_import_statement): Use std::vector.
3815         (read_namespace): Update.
3816         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3817
3818 2017-09-09  Tom Tromey  <tom@tromey.com>
3819
3820         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
3821
3822 2017-09-09  Tom Tromey  <tom@tromey.com>
3823
3824         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
3825
3826 2017-09-09  Tom Tromey  <tom@tromey.com>
3827
3828         * stack.c (func_command): Use gdb::def_vector.
3829
3830 2017-09-09  Tom Tromey  <tom@tromey.com>
3831
3832         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
3833         ui_out_emit_list, ui_out_emit_tuple.
3834         (mi_cmd_var_update): Likewise.
3835
3836 2017-09-09  Tom Tromey  <tom@tromey.com>
3837
3838         * mi/mi-interp.c (mi_user_selected_context_changed): Use
3839         ui_out_redirect_pop.
3840         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
3841         ui_out_redirect_pop.
3842         * utils.c (do_ui_out_redirect_pop)
3843         (make_cleanup_ui_out_redirect_pop): Remove.
3844         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
3845         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
3846         * ui-out.h (ui_out_redirect_pop): New class.
3847
3848 2017-09-09  Tom Tromey  <tom@tromey.com>
3849
3850         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
3851         (list_available_thread_groups, mi_cmd_list_thread_groups)
3852         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
3853         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
3854         Likewise.
3855
3856 2017-09-09  Tom Tromey  <tom@tromey.com>
3857
3858         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
3859         ui_out_emit_tuple.
3860
3861 2017-09-09  Tom Tromey  <tom@tromey.com>
3862
3863         * target.c (flash_erase_command): Use ui_out_emit_tuple.
3864         * stack.c (print_frame): Use ui_out_emit_tuple.
3865         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
3866         (info_spu_mailbox_command, info_spu_dma_command)
3867         (info_spu_proxydma_command): Likewise.
3868         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
3869         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
3870         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
3871         ui_out_emit_tuple.
3872         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
3873
3874 2017-09-09  Tom Tromey  <tom@tromey.com>
3875
3876         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
3877         (class ui_out_emit_table): Update comment.
3878         * ui-out.c (do_cleanup_table_end)
3879         (make_cleanup_ui_out_table_begin_end): Remove.
3880         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
3881         (info_spu_dma_cmdlist): Likewise.
3882         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
3883         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
3884         ui_out_emit_table.
3885
3886 2017-09-09  Tom Tromey  <tom@tromey.com>
3887
3888         * thread.c (print_thread_info_1): Use ui_out_emit_table,
3889         ui_out_emit_list, gdb::optional.
3890
3891 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
3892
3893         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
3894         prototype.
3895         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
3896         prototype.
3897         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
3898         prototype.
3899         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
3900         * ada-exp.y: Remove _initialize_ada_exp prototype.
3901         * ada-lang.c: Remove _initialize_ada_language prototype.
3902         * ada-tasks.c: Remove _initialize_tasks prototype.
3903         * addrmap.c: Remove _initialize_addrmap prototype.
3904         * agent.c: Remove _initialize_agent prototype.
3905         * aix-thread.c: Remove _initialize_aix_thread prototype.
3906         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
3907         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
3908         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
3909         prototype.
3910         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
3911         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
3912         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
3913         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
3914         prototype.
3915         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
3916         prototype.
3917         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
3918         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
3919         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
3920         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
3921         prototype.
3922         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
3923         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
3924         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
3925         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
3926         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
3927         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
3928         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
3929         prototype.
3930         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
3931         prototype.
3932         * annotate.c: Remove _initialize_annotate prototype.
3933         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
3934         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
3935         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
3936         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
3937         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
3938         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
3939         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
3940         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
3941         prototype.
3942         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
3943         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
3944         * auto-load.c: Remove _initialize_auto_load prototype.
3945         * auxv.c: Remove _initialize_auxv prototype.
3946         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
3947         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
3948         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
3949         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
3950         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
3951         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
3952         prototype.
3953         * break-catch-throw.c: Remove _initialize_break_catch_throw
3954         prototype.
3955         * breakpoint.c: Remove _initialize_breakpoint prototype.
3956         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
3957         * btrace.c: Remove _initialize_btrace prototype.
3958         * charset.c: Remove _initialize_charset prototype.
3959         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
3960         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
3961         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
3962         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
3963         * cli/cli-script.c: Remove _initialize_cli_script prototype.
3964         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
3965         * coffread.c: Remove _initialize_coffread prototype.
3966         * compile/compile.c: Remove _initialize_compile prototype.
3967         * complaints.c: Remove _initialize_complaints prototype.
3968         * completer.c: Remove _initialize_completer prototype.
3969         * copying.awk: Remove _initialize_copying prototype.
3970         * copying.c: Regenerate.
3971         * core-regset.c: Remove _initialize_core_regset prototype.
3972         * corefile.c: Remove _initialize_core prototype.
3973         * corelow.c: Remove _initialize_corelow prototype.
3974         * cp-abi.c: Remove _initialize_cp_abi prototype.
3975         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
3976         * cp-support.c: Remove _initialize_cp_support prototype.
3977         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
3978         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
3979         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
3980         * ctf.c: Remove _initialize_ctf prototype.
3981         * d-lang.c: Remove _initialize_d_language prototype.
3982         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
3983         prototype.
3984         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
3985         * dbxread.c: Remove _initialize_dbxread prototype.
3986         * dcache.c: Remove _initialize_dcache prototype.
3987         * demangle.c: Remove _initialize_demangler prototype.
3988         * disasm-selftests.c: Remove _initialize_disasm_selftests
3989         prototype.
3990         * disasm.c: Remove _initialize_disasm prototype.
3991         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
3992         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
3993         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
3994         prototype.
3995         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
3996         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
3997         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
3998         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
3999         * elfread.c: Remove _initialize_elfread prototype.
4000         * exec.c: Remove _initialize_exec prototype.
4001         * extension.c: Remove _initialize_extension prototype.
4002         * f-lang.c: Remove _initialize_f_language prototype.
4003         * f-valprint.c: Remove _initialize_f_valprint prototype.
4004         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
4005         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
4006         * filesystem.c: Remove _initialize_filesystem prototype.
4007         * findcmd.c: Remove _initialize_mem_search prototype.
4008         * fork-child.c: Remove _initialize_fork_child prototype.
4009         * frame-base.c: Remove _initialize_frame_base prototype.
4010         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
4011         * frame.c: Remove _initialize_frame prototype.
4012         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
4013         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
4014         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
4015         * gcore.c: Remove _initialize_gcore prototype.
4016         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
4017         * gdbarch.c: Regenerate.
4018         * gdbarch.sh: Remove _initialize_gdbarch prototype.
4019         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
4020         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
4021         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
4022         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
4023         * go-lang.c: Remove _initialize_go_language prototype.
4024         * go32-nat.c: Remove _initialize_go32_nat prototype.
4025         * guile/guile.c: Remove _initialize_guile prototype.
4026         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
4027         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
4028         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
4029         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
4030         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
4031         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
4032         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
4033         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
4034         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
4035         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
4036         prototype.
4037         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
4038         prototype.
4039         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
4040         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
4041         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
4042         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
4043         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
4044         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
4045         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
4046         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
4047         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
4048         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
4049         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
4050         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
4051         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
4052         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4053         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
4054         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
4055         prototype.
4056         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
4057         prototype.
4058         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
4059         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
4060         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
4061         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
4062         * infcall.c: Remove _initialize_infcall prototype.
4063         * infcmd.c: Remove _initialize_infcmd prototype.
4064         * inferior.c: Remove _initialize_inferiors prototype.
4065         * inflow.c: Remove _initialize_inflow prototype.
4066         * infrun.c: Remove _initialize_infrun prototype.
4067         * interps.c: Remove _initialize_interpreter prototype.
4068         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
4069         * jit.c: Remove _initialize_jit prototype.
4070         * language.c: Remove _initialize_language prototype.
4071         * linux-fork.c: Remove _initialize_linux_fork prototype.
4072         * linux-nat.c: Remove _initialize_linux_nat prototype.
4073         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
4074         * linux-thread-db.c: Remove _initialize_thread_db prototype.
4075         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
4076         * m2-lang.c: Remove _initialize_m2_language prototype.
4077         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
4078         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
4079         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
4080         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
4081         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
4082         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4083         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4084         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
4085         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
4086         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
4087         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4088         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4089         * machoread.c: Remove _initialize_machoread prototype.
4090         * macrocmd.c: Remove _initialize_macrocmd prototype.
4091         * macroscope.c: Remove _initialize_macroscope prototype.
4092         * maint.c: Remove _initialize_maint_cmds prototype.
4093         * mdebugread.c: Remove _initialize_mdebugread prototype.
4094         * memattr.c: Remove _initialize_mem prototype.
4095         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
4096         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
4097         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
4098         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
4099         * mi/mi-main.c: Remove _initialize_mi_main prototype.
4100         * microblaze-linux-tdep.c: Remove
4101         _initialize_microblaze_linux_tdep prototype.
4102         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
4103         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
4104         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
4105         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
4106         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
4107         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
4108         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
4109         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
4110         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
4111         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
4112         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
4113         prototype.
4114         * mipsread.c: Remove _initialize_mipsread prototype.
4115         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
4116         prototype.
4117         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
4118         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
4119         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
4120         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
4121         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
4122         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
4123         prototype.
4124         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
4125         * nto-procfs.c: Remove _initialize_procfs prototype.
4126         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
4127         * objc-lang.c: Remove _initialize_objc_language prototype.
4128         * objfiles.c: Remove _initialize_objfiles prototype.
4129         * observer.c: Remove observer_test_first_notification_function,
4130         observer_test_second_notification_function,
4131         observer_test_third_notification_function, and
4132         _initialize_observer prototypes.
4133         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
4134         * osabi.c: Remove _initialize_gdb_osabi prototype.
4135         * osdata.c: Remove _initialize_osdata prototype.
4136         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
4137         * parse.c: Remove _initialize_parse prototype.
4138         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
4139         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
4140         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
4141         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
4142         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
4143         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
4144         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
4145         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
4146         * printcmd.c: Remove _initialize_printcmd prototype.
4147         * probe.c: Remove _initialize_probe prototype.
4148         * proc-api.c: Remove _initialize_proc_api prototype.
4149         * proc-events.c: Remove _initialize_proc_events prototype.
4150         * proc-service.c: Remove _initialize_proc_service prototype.
4151         * procfs.c: Remove _initialize_procfs prototype.
4152         * psymtab.c: Remove _initialize_psymtab prototype.
4153         * python/python.c: Remove _initialize_python prototype.
4154         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
4155         * record-btrace.c: Remove _initialize_record_btrace prototype.
4156         * record-full.c: Remove _initialize_record_full prototype.
4157         * record.c: Remove _initialize_record prototype.
4158         * regcache.c: Remove _initialize_regcache prototype.
4159         * reggroups.c: Remove _initialize_reggroup prototype.
4160         * remote-notif.c: Remove _initialize_notif prototype.
4161         * remote-sim.c: Remove _initialize_remote_sim prototype.
4162         * remote.c: Remove _initialize_remote prototype.
4163         * reverse.c: Remove _initialize_reverse prototype.
4164         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
4165         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
4166         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
4167         prototype.
4168         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
4169         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
4170         * rust-exp.y: Remove _initialize_rust_exp prototype.
4171         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
4172         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
4173         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
4174         * score-tdep.c: Remove _initialize_score_tdep prototype.
4175         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
4176         prototype.
4177         * ser-go32.c: Remove _initialize_ser_dos prototype.
4178         * ser-mingw.c: Remove _initialize_ser_windows prototype.
4179         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
4180         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
4181         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
4182         * serial.c: Remove _initialize_serial prototype.
4183         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
4184         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
4185         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
4186         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
4187         * skip.c: Remove _initialize_step_skip prototype.
4188         * sol-thread.c: Remove _initialize_sol_thread prototype.
4189         * solib-aix.c: Remove _initialize_solib_aix prototype.
4190         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
4191         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
4192         * solib-frv.c: Remove _initialize_frv_solib prototype.
4193         * solib-spu.c: Remove _initialize_spu_solib prototype.
4194         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
4195         * solib-target.c: Remove _initialize_solib_target prototype.
4196         * solib.c: Remove _initialize_solib prototype.
4197         * source.c: Remove _initialize_source prototype.
4198         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
4199         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
4200         prototype.
4201         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
4202         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
4203         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
4204         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
4205         prototype.
4206         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
4207         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
4208         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
4209         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
4210         prototype.
4211         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
4212         prototype.
4213         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
4214         prototype.
4215         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
4216         prototype.
4217         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
4218         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
4219         prototype.
4220         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
4221         prototype.
4222         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
4223         prototype.
4224         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
4225         prototype.
4226         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
4227         prototype.
4228         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
4229         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
4230         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
4231         * stabsread.c: Remove _initialize_stabsread prototype.
4232         * stack.c: Remove _initialize_stack prototype.
4233         * stap-probe.c: Remove _initialize_stap_probe prototype.
4234         * std-regs.c: Remove _initialize_frame_reg prototype.
4235         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
4236         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
4237         * symfile.c: Remove _initialize_symfile prototype.
4238         * symmisc.c: Remove _initialize_symmisc prototype.
4239         * symtab.c: Remove _initialize_symtab prototype.
4240         * target-dcache.c: Remove _initialize_target_dcache prototype.
4241         * target-descriptions.c: Remove _initialize_target_descriptions
4242         prototype.
4243         * thread.c: Remove _initialize_thread prototype.
4244         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
4245         prototype.
4246         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
4247         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
4248         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
4249         prototype.
4250         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
4251         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
4252         * tracefile.c: Remove _initialize_tracefile prototype.
4253         * tracepoint.c: Remove _initialize_tracepoint prototype.
4254         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
4255         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
4256         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
4257         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
4258         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
4259         * tui/tui-win.c: Remove _initialize_tui_win prototype.
4260         * tui/tui.c: Remove _initialize_tui prototype.
4261         * typeprint.c: Remove _initialize_typeprint prototype.
4262         * user-regs.c: Remove _initialize_user_regs prototype.
4263         * utils.c: Remove _initialize_utils prototype.
4264         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
4265         * valarith.c: Remove _initialize_valarith prototype.
4266         * valops.c: Remove _initialize_valops prototype.
4267         * valprint.c: Remove _initialize_valprint prototype.
4268         * value.c: Remove _initialize_values prototype.
4269         * varobj.c: Remove _initialize_varobj prototype.
4270         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
4271         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
4272         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
4273         * windows-nat.c: Remove _initialize_windows_nat,
4274         _initialize_check_for_gdb_ini, and _initialize_loadable
4275         prototypes.
4276         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
4277         * xcoffread.c: Remove _initialize_xcoffread prototype.
4278         * xml-support.c: Remove _initialize_xml_support prototype.
4279         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
4280         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
4281         prototype.
4282         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
4283         prototype.
4284         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
4285
4286 2017-09-08  Keith Seitz  <keiths@redhat.com>
4287
4288         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
4289         field.
4290
4291 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
4292
4293         * f-valprint.c (f_val_print): Remove check for one byte
4294         sized integers. Remove printing of character type.
4295
4296 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
4297             Christoph Weinmann  <christoph.t.weinmann@intel.com>
4298             Bernhard Heckel  <bernhard.heckel@intel.com>
4299
4300         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
4301         to maintain proper indentation when printing pointers/refs.
4302
4303 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4304
4305         GDB 8.0.1 released.
4306
4307 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4308
4309         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
4310
4311 2017-09-05  Tom Tromey  <tom@tromey.com>
4312
4313         * parse.c (funcall_chain): Now a std::vector.
4314         (start_arglist, end_arglist): Simplify.
4315         (free_funcalls): Remove.
4316         (parse_exp_in_context_1): Remove cleanup.
4317
4318 2017-09-05  Tom Tromey  <tom@tromey.com>
4319
4320         * go-exp.y (go_parse): Don't create a cleanup.
4321
4322 2017-09-05  Tom Tromey  <tom@tromey.com>
4323
4324         * d-exp.y (PrimaryExpression): Use std::string.
4325         (d_parse): Don't create a cleanup.
4326
4327 2017-09-05  Tom Tromey  <tom@tromey.com>
4328
4329         * utils.c (do_clear_parser_state): Remove.
4330         (make_cleanup_clear_parser_state): Remove.
4331         * p-exp.y (pascal_parse): Use scoped_restore.
4332         * m2-exp.y (m2_parse): Use scoped_restore.
4333         * f-exp.y (f_parse): Use scoped_restore.
4334         * d-exp.y (d_parse): Use scoped_restore.
4335         * c-exp.y (c_parse): Use scoped_restore.
4336         * ada-exp.y (ada_parse): Use scoped_restore.
4337         * utils.h (make_cleanup_clear_parser_state): Remove.
4338
4339 2017-09-06  Keith Seitz  <keiths@redhat.com>
4340
4341         * dwarf2read.c (dw2_linkage_name_attr): New function.
4342         (dw2_linkage_name): New function.
4343         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
4344         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
4345         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
4346
4347 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4348
4349         * config/djgpp/djconfig.sh: Correct shell portability issue.
4350
4351 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4352
4353         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
4354
4355 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4356
4357         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
4358         * NEWS: Mention new FreeBSD/mips native configuration.
4359         * configure.host: Add aarch64*-*-freebsd*.
4360         * configure.nat: Likewise.
4361         * aarch64-fbsd-nat.c: New file.
4362
4363 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4364
4365         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
4366         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
4367         * NEWS: Mention new FreeBSD/aarch64 target.
4368         * configure.tgt: Add aarch64*-*-freebsd*.
4369         * aarch64-fbsd-tdep.c: New file.
4370         * aarch64-fbsd-tdep.h: New file.
4371
4372 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4373
4374         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
4375
4376 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
4377
4378         * parse.c (find_minsym_type_and_address): Don't relocate addresses
4379         of TLS symbols.
4380
4381 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4382
4383         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
4384         call.
4385
4386 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4387
4388         * infrun.c (follow_exec): Call add_thread after
4389         target_find_description.
4390
4391 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4392
4393         * infrun.c (handle_inferior_event_1): When exec'ing, read
4394         stop_pc after follow_exec.
4395
4396 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4397
4398         * remote.c (process_g_packet): Update error message.
4399
4400 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4401
4402         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
4403         targets.
4404
4405 2017-09-05  Pedro Alves  <palves@redhat.com>
4406
4407         * eval.c (eval_call, evaluate_funcall): New functions, factored
4408         out from ...
4409         (evaluate_subexp_standard): ... this.
4410
4411 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4412
4413         * amd64-tdep.c (amd64_target_description): Create target
4414         descriptions.
4415         (_initialize_amd64_tdep): Don't call functions
4416         initialize_tdesc_amd64_*.  Add self tests.
4417         * arch/amd64.c (amd64_create_target_description): Add parameter
4418         is_linux.  Call set_tdesc_osabi if is_linux is true.
4419         * arch/amd64.h (amd64_create_target_description): Update the
4420         declaration.
4421         * arch/i386.c (i386_create_target_description): Add parameter
4422         is_linux.  Call set_tdesc_osabi if is_linux is true.
4423         * arch/i386.h (i386_create_target_description): Update
4424         declaration.
4425         * configure.tgt: Add i386.o to gdb_target_obs.
4426         * features/Makefile (XMLTOC): Remove i386/*.xml.
4427         * features/i386/amd64-avx-avx512.c: Remove.
4428         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
4429         * features/i386/amd64-avx-mpx.c: Remove.
4430         * features/i386/amd64-avx.c: Remove.
4431         * features/i386/amd64-mpx.c: Remove.
4432         * features/i386/amd64.c: Remove.
4433         * features/i386/i386-avx-avx512.c: Remove.
4434         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
4435         * features/i386/i386-avx-mpx.c: Remove.
4436         * features/i386/i386-avx.c: Remove.
4437         * features/i386/i386-mmx.c: Remove.
4438         * features/i386/i386-mpx.c: Remove.
4439         * features/i386/i386.c: Remove.
4440         * i386-tdep.c: Don't include features/i386/i386*.c., include
4441         target-descriptions.h and arch/i386.h.
4442         (i386_target_description): Create target descriptions.
4443         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
4444         functions.  Do self tests.
4445
4446 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4447
4448         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
4449         * features/i386/amd64-avx-avx512-linux.c: Removed.
4450         * features/i386/amd64-avx-linux.c: Removed.
4451         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
4452         * features/i386/amd64-avx-mpx-linux.c: Removed.
4453         * features/i386/amd64-linux.c: Removed.
4454         * features/i386/amd64-mpx-linux.c: Removed.
4455         * features/i386/x32-avx-avx512-linux.c: Removed.
4456         * features/i386/x32-avx-linux.c: Removed.
4457         * features/i386/x32-linux.c: Removed.
4458
4459 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4460
4461         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
4462         features/i386/*.c.
4463         (amd64_linux_read_description): Call
4464         amd64_create_target_description.
4465         * arch/amd64.c: New file.
4466         * arch/amd64.h: New file.
4467         * configure.tgt (x86_64-*-linux*): Append amd64.o.
4468         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
4469
4470 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4471
4472         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
4473         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
4474         (amd64_linux_read_description): Create target descriptions.
4475         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
4476         functions.  Add unit tests.
4477         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
4478         x32-core.xml.
4479         * features/i386/64bit-avx.c: Generated.
4480         * features/i386/64bit-avx512.c: Generated.
4481         * features/i386/64bit-core.c: Generated.
4482         * features/i386/64bit-linux.c: Generated.
4483         * features/i386/64bit-mpx.c: Generated.
4484         * features/i386/64bit-pkeys.c: Generated.
4485         * features/i386/64bit-segments.c: Generated.
4486         * features/i386/64bit-sse.c: Generated.
4487         * features/i386/x32-core.c: Generated.
4488         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
4489         c files for amd64-linux and x32-linux.
4490
4491 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4492
4493         * amd64-linux-tdep.c (amd64_linux_read_description): New
4494         function.
4495         (amd64_linux_core_read_description): Call
4496         amd64_linux_read_description.
4497         (amd64_linux_init_abi): Likewise.
4498         (amd64_x32_linux_init_abi): Likewise.
4499         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
4500         * x86-linux-nat.c (x86_linux_read_description): Call
4501         amd64_linux_read_description.
4502
4503 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4504
4505         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
4506         comments.
4507
4508 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4509
4510         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
4511         * features/i386/i386-avx-avx512-linux.c: Remove.
4512         * features/i386/i386-avx-linux.c: Remove.
4513         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
4514         * features/i386/i386-avx-mpx-linux.c: Remove.
4515         * features/i386/i386-linux.c: Remove.
4516         * features/i386/i386-mmx-linux.c: Remove.
4517         * features/i386/i386-mpx-linux.c: Remove.
4518
4519 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4520
4521         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
4522         (SFILES): Add arch/i386.c.
4523         (HFILES_NO_SRCDIR): Add arch/i386.h.
4524         * arch/i386.c: New file.
4525         * arch/i386.h: New file.
4526         * arch/tdesc.h (allocate_target_description): Declare.
4527         (set_tdesc_architecture): Declare.
4528         (set_tdesc_osabi): Declare.
4529         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
4530         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
4531         include arch/i386.h.
4532         (i386_linux_read_description): Remove code and call
4533         i386_create_target_description.
4534         (set_tdesc_architecture): New function.
4535         (set_tdesc_osabi): New function.
4536         * target-descriptions.h (allocate_target_description): Remove.
4537
4538 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4539
4540         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
4541         * target-descriptions.c (tdesc_create_feature): Likewise, and
4542         adjust code.
4543         * features/i386/32bit-avx.c: Re-generated.
4544         * features/i386/32bit-avx512.c: Re-generated.
4545         * features/i386/32bit-core.c: Re-generated.
4546         * features/i386/32bit-linux.c: Re-generated.
4547         * features/i386/32bit-mpx.c: Re-generated.
4548         * features/i386/32bit-pkeys.c: Re-generated.
4549         * features/i386/32bit-sse.c: Re-generated.
4550
4551 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4552
4553         * regformats/regdef.h (struct reg): Override operator == and !=.
4554
4555 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4556
4557         * arch/tdesc.h: New file.
4558         * regformats/regdat.sh: Generate code using tdesc_create_reg.
4559         * target-descriptions.c: Update comments.
4560         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
4561         declarations.
4562         * features/i386/32bit-avx.c: Re-generated.
4563         * features/i386/32bit-avx512.c: Re-generated.
4564         * features/i386/32bit-core.c: Re-generated.
4565         * features/i386/32bit-linux.c: Re-generated.
4566         * features/i386/32bit-mpx.c: Re-generated.
4567         * features/i386/32bit-pkeys.c: Re-generated.
4568         * features/i386/32bit-sse.c: Re-generated.
4569
4570 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4571
4572         * regformats/regdat.sh: Update generated code.
4573
4574 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4575
4576         * regformats/regdat.sh: Adjust code order.
4577
4578 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4579
4580         * expprint.c (dump_subexp_body_standard): Use constant format
4581         string in fprintf_filtered call.
4582
4583 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4584
4585         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
4586         NetBSD/i386.
4587         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
4588
4589 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4590
4591         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
4592
4593 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4594
4595         * bsd-kvm.o: Define _KMEMUSER.
4596         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
4597         * configure: Regenerate.
4598
4599 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4600
4601         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
4602         * i386-fbsd-nat.c: Likewise.
4603
4604 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4605
4606         * unittests/array-view-selftests.c: Add include of <array>.
4607
4608 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4609
4610         * spu-tdep.c (flush_ea_cache): Add missing argument to
4611         call_function_by_hand.
4612
4613 2017-09-04  Pedro Alves  <palves@redhat.com>
4614
4615         * NEWS (Safer support for debugging with no debug info): New.
4616
4617 2017-09-04  Pedro Alves  <palves@redhat.com>
4618
4619         * c-exp.y (function_method, function_method_void): Add current
4620         instance flags to TYPE_INSTANCE.
4621         * dwarf2read.c (check_modifier): New.
4622         (compute_delayed_physnames): Assert that only C++ adds delayed
4623         physnames.  Mark fn_fields as const/volatile depending on
4624         physname.
4625         * eval.c (make_params): New type_instance_flags parameter.  Use
4626         it as the new type's instance flags.
4627         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
4628         flags element and pass it to make_params.
4629         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
4630         instance flags element.
4631         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
4632         * gdbtypes.h: Include "enum-flags.h".
4633         (type_instance_flags): New enum-flags type.
4634         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
4635         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
4636         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
4637         (follow_type_instance_flags): New function.
4638         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
4639         * parser-defs.h (follow_type_instance_flags): Declare.
4640         * valops.c (value_struct_elt_for_reference): const/volatile must
4641         match too.
4642
4643 2017-09-04  Pedro Alves  <palves@redhat.com>
4644
4645         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
4646         function/method scopes; lookup the nested name as a function local
4647         static variable.
4648
4649 2017-09-04  Pedro Alves  <palves@redhat.com>
4650
4651         (%type <voidval>): Add function_method.
4652         * c-exp.y (exp): New production for calls with no arguments.
4653         (function_method, function_method_void_or_typelist): New
4654         productions.
4655         (exp): New production for "method()::static_var".
4656         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
4657         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4658         Handle OP_FUNC_STATIC_VAR.
4659         * parse.c (operator_length_standard):
4660         Handle OP_FUNC_STATIC_VAR.
4661
4662 2017-09-04  Pedro Alves  <palves@redhat.com>
4663
4664         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
4665         handling.
4666         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4667         Ditto.
4668         * parse.c (operator_length_standard, operator_check_standard):
4669         Ditto.
4670         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
4671
4672 2017-09-04  Pedro Alves  <palves@redhat.com>
4673
4674         * ax-gdb.c: Include "typeprint.h".
4675         (gen_expr_for_cast): New function.
4676         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
4677         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
4678         type is unknown.
4679         * dwarf2read.c (new_symbol_full): Fallback to int instead of
4680         nodebug_data_symbol.
4681         * eval.c: Include "typeprint.h".
4682         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
4683         Error out if symbol has unknown type.
4684         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
4685         evaluate_subexp_for_cast.
4686         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
4687         OP_VAR_MSYM_VALUE.
4688         (evaluate_subexp_for_cast): New function.
4689         * gdbtypes.c (init_nodebug_var_type): New function.
4690         (objfile_type): Use it to initialize types of variables with no
4691         debug info.
4692         * typeprint.c (error_unknown_type): New.
4693         * typeprint.h (error_unknown_type): New declaration.
4694         * compile/compile-c-types.c (convert_type_basic): Handle
4695         TYPE_CODE_ERROR; warn and fallback to int for variables with
4696         unknown type.
4697
4698 2017-09-04  Pedro Alves  <palves@redhat.com>
4699
4700         * eval.c (evaluate_var_value): New function, factored out from ...
4701         (evaluate_subexp_standard): ... here.
4702
4703 2017-09-04  Pedro Alves  <palves@redhat.com>
4704
4705         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
4706         Remove useless assignments to 'op'.
4707
4708 2017-09-04  Pedro Alves  <palves@redhat.com>
4709
4710         * eval.c (eval_skip_value): New function.
4711         (evaluate_subexp_standard): Use it.
4712
4713 2017-09-04  Pedro Alves  <palves@redhat.com>
4714
4715         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
4716         function name from symbol/minsym and pass it to
4717         error_call_unknown_return_type.
4718
4719 2017-09-04  Pedro Alves  <palves@redhat.com>
4720
4721         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
4722         * ax-gdb.c (gen_msym_var_ref): New function.
4723         (gen_expr): Handle OP_VAR_MSYM_VALUE.
4724         * eval.c (evaluate_var_msym_value): New function.
4725         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
4726         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
4727         to call_function_by_hand.
4728         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4729         Handle OP_VAR_MSYM_VALUE.
4730         (union exp_element) <msymbol>: New field.
4731         * minsyms.h (struct type): Forward declare.
4732         (find_minsym_type_and_address): Declare.
4733         * parse.c (write_exp_elt_msym): New function.
4734         (write_exp_msymbol): Delete, refactored as ...
4735         (find_minsym_type_and_address): ... this new function.
4736         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
4737         (operator_length_standard, operator_check_standard): Handle
4738         OP_VAR_MSYM_VALUE.
4739         * std-operator.def (OP_VAR_MSYM_VALUE): New.
4740
4741 2017-09-04  Pedro Alves  <palves@redhat.com>
4742
4743         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
4744         TYPE_GNU_IFUNC specially here.  Throw error if return type is
4745         unknown.
4746         * ada-typeprint.c (print_func_type): Handle functions with unknown
4747         return type.
4748         * c-typeprint.c (c_type_print_base): Handle functions and methods
4749         with unknown return type.
4750         * compile/compile-c-symbols.c (convert_symbol_bmsym)
4751         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
4752         * compile/compile-c-types.c: Include "objfiles.h".
4753         (convert_func): For functions with unknown return type, warn and
4754         default to int.
4755         * compile/compile-object-run.c (compile_object_run): Adjust call
4756         to call_function_by_hand_dummy.
4757         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
4758         call_function_by_hand.
4759         * eval.c (evaluate_subexp_standard): Adjust calls to
4760         call_function_by_hand.  Handle functions and methods with unknown
4761         return type.  Pass expect_type to call_function_by_hand.
4762         * f-typeprint.c (f_type_print_base): Handle functions with unknown
4763         return type.
4764         * gcore.c (call_target_sbrk): Adjust call to
4765         call_function_by_hand.
4766         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
4767         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
4768         an integer address type instead of nodebug.
4769         * guile/scm-value.c (gdbscm_value_call): Adjust call to
4770         call_function_by_hand.
4771         * infcall.c (error_call_unknown_return_type): New function.
4772         (call_function_by_hand): New "default_return_type" parameter.
4773         Pass it down.
4774         (call_function_by_hand_dummy): New "default_return_type"
4775         parameter.  Use it instead of defaulting to int.  If there's no
4776         default and the return type is unknown, throw an error.  If
4777         there's a default return type, and the called function has no
4778         debug info, then assume the function is prototyped.
4779         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
4780         New "default_return_type" parameter.
4781         (error_call_unknown_return_type): New declaration.
4782         * linux-fork.c (call_lseek): Cast return type of lseek.
4783         (inferior_call_waitpid, checkpoint_command): Adjust calls to
4784         call_function_by_hand.
4785         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
4786         calls to call_function_by_hand.
4787         * m2-typeprint.c (m2_procedure): Handle functions with unknown
4788         return type.
4789         * objc-lang.c (lookup_objc_class, lookup_child_selector)
4790         (value_nsstring, print_object_command): Adjust calls to
4791         call_function_by_hand.
4792         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
4793         functions with unknown return type.
4794         (pascal_type_print_func_varspec_suffix): New function.
4795         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
4796         TYPE_CODE_METHOD>: Use it.
4797         * python/py-value.c (valpy_call): Adjust call to
4798         call_function_by_hand.
4799         * rust-lang.c (rust_evaluate_funcall): Adjust call to
4800         call_function_by_hand.
4801         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
4802         call_function_by_hand.
4803         * valops.c (value_allocate_space_in_inferior): Adjust call to
4804         call_function_by_hand.
4805         * typeprint.c (type_print_unknown_return_type): New function.
4806         * typeprint.h (type_print_unknown_return_type): New declaration.
4807
4808 2017-09-04  Pedro Alves  <palves@redhat.com>
4809
4810         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
4811         types with more than one parameter as prototyped.
4812
4813 2017-09-04  Pedro Alves  <palves@redhat.com>
4814
4815         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
4816         (disassemble_command): Use gdb_disassembly_flags instead of bare
4817         int.
4818         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
4819         (dump_insns, do_mixed_source_and_assembly_deprecated)
4820         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
4821         Use gdb_disassembly_flags instead of bare int.
4822         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
4823         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
4824         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
4825         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
4826         (enum gdb_disassembly_flag): ... values of this new enumeration.
4827         (gdb_disassembly_flags): Define.
4828         (gdb_disassembly)
4829         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
4830         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
4831         gdb_disassembly_flags instead of bare int.
4832         * record-btrace.c (btrace_insn_history)
4833         (record_btrace_insn_history, record_btrace_insn_history_range)
4834         (record_btrace_insn_history_from): Use gdb_disassembly_flags
4835         instead of bare int.
4836         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
4837         Use gdb_disassembly_flags instead of bare int.
4838         * target-debug.h (target_debug_print_gdb_disassembly_flags):
4839         Define.
4840         * target-delegates.c: Regenerate.
4841         * target.c (target_insn_history, target_insn_history_from)
4842         (target_insn_history_range): Use gdb_disassembly_flags instead of
4843         bare int.
4844         * target.h: Include "disasm.h".
4845         (struct target_ops) <to_insn_history, to_insn_history_from,
4846         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
4847         int.
4848         (target_insn_history, target_insn_history_from)
4849         (target_insn_history_range): Use gdb_disassembly_flags instead of
4850         bare int.
4851
4852 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
4853
4854         * cli/cli-script.c (build_command_line): For if/while commands,
4855         check whether args is empty.
4856
4857 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
4858
4859         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
4860         (enum command_control_type): Likewise.
4861         (struct command_line): Likewise.
4862         (free_command_lines): Likewise.
4863         (struct command_lines_deleter): Likewise.
4864         (command_line_up): Likewise.
4865         (read_command_lines): Likewise.
4866         (read_command_lines_1): Likewise.
4867         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
4868         (enum command_control_type): Likewise.
4869         (struct command_line): Likewise.
4870         (free_command_lines): Likewise.
4871         (struct command_lines_deleter): Likewise.
4872         (command_line_up): Likewise.
4873         (read_command_lines): Likewise.
4874         (read_command_lines_1): Likewise.
4875         * breakpoint.h: Include cli/cli-script.h.
4876         * extension-priv.h: Likewise.
4877         * gdbcmd.h: Likewise.
4878
4879 2017-09-04  Pedro Alves  <palves@redhat.com>
4880
4881         * ada-lang.c (is_known_support_routine): Move sal declaration to
4882         where it is initialized.
4883         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
4884         (parse_breakpoint_sals, decode_static_tracepoint_spec)
4885         (clear_command, update_static_tracepoint): Remove init_sal
4886         references.  Move declarations closer to initializations.
4887         * cli/cli-cmds.c (list_command): Move sal declarations closer to
4888         initializations.
4889         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
4890         references.  Move sal declarations closer to initializations.
4891         * frame.c (find_frame_sal): Return a symtab_and_line via function
4892         return instead of output parameter.  Remove init_sal references.
4893         * frame.h (find_frame_sal): Return a symtab_and_line via function
4894         return instead of output parameter.
4895         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
4896         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
4897         instead of memset.
4898         (gdbscm_find_pc_line): Remove init_sal reference.
4899         * infcall.c (call_function_by_hand_dummy): Remove init_sal
4900         references.  Move declarations closer to initializations.
4901         * infcmd.c (set_step_frame): Update.  Move declarations closer to
4902         initializations.
4903         (finish_backward): Remove init_sal references.  Move declarations
4904         closer to initializations.
4905         * infrun.c (process_event_stop_test, handle_step_into_function)
4906         (insert_hp_step_resume_breakpoint_at_frame)
4907         (insert_step_resume_breakpoint_at_caller): Likewise.
4908         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
4909         (symbol_to_sal): Likewise.
4910         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
4911         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
4912         to its initialization.
4913         * reverse.c (save_bookmark_command): Use new/delete.  Remove
4914         init_sal references.  Move declarations closer to initializations.
4915         * source.c (get_current_source_symtab_and_line): Remove brace
4916         initialization.
4917         (set_current_source_symtab_and_line): Now takes the sal by const
4918         reference.  Remove brace initialization.
4919         (line_info): Remove init_sal reference.
4920         * source.h (set_current_source_symtab_and_line): Now takes a
4921         symtab_and_line via const reference.
4922         * stack.c (set_current_sal_from_frame): Adjust.
4923         (print_frame_info): Adjust.
4924         (get_last_displayed_sal): Return the sal via function return
4925         instead of via output parameter.  Simplify.
4926         (frame_info): Adjust.
4927         * stack.h (get_last_displayed_sal): Return the sal via function
4928         return instead of via output parameter.
4929         * symtab.c (init_sal): Delete.
4930         (find_pc_sect_line): Remove init_sal references.  Move
4931         declarations closer to initializations.
4932         (find_function_start_sal): Remove init_sal references.  Move
4933         declarations closer to initializations.
4934         * symtab.h (struct symtab_and_line): In-class initialize all
4935         fields.
4936         * tracepoint.c (set_traceframe_context)
4937         (print_one_static_tracepoint_marker): Remove init_sal references.
4938         Move declarations closer to initializations.
4939         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
4940         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
4941         declarations closer to initializations.
4942         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
4943         init_sal references.  Adjust.
4944
4945 2017-09-04  Pedro Alves  <palves@redhat.com>
4946
4947         * ax-gdb.c (agent_command_1): Use range-for.
4948         * break-catch-throw.c (re_set_exception_catchpoint): Update.
4949         * breakpoint.c: Include "common/array-view.h".
4950         (init_breakpoint_sal, create_breakpoint_sal): Change sals
4951         parameter from struct symtabs_and_lines to
4952         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
4953         (breakpoint_sals_to_pc): Change sals parameter from struct
4954         symtabs_and_lines to std::vector reference.
4955         (check_fast_tracepoint_sals): Change sals parameter from struct
4956         symtabs_and_lines to std::array_view.  Use range-for.
4957         (decode_static_tracepoint_spec): Return a std::vector instead of
4958         symtabs_and_lines.  Update.
4959         (create_breakpoint): Update.
4960         (break_range_command, until_break_command, clear_command): Update.
4961         (base_breakpoint_decode_location, bkpt_decode_location)
4962         (bkpt_probe_create_sals_from_location)
4963         (bkpt_probe_decode_location, tracepoint_decode_location)
4964         (tracepoint_probe_decode_location)
4965         (strace_marker_create_sals_from_location): Return a std::vector
4966         instead of symtabs_and_lines.
4967         (strace_marker_create_breakpoints_sal): Update.
4968         (strace_marker_decode_location): Return a std::vector instead of
4969         symtabs_and_lines.  Update.
4970         (update_breakpoint_locations): Change struct symtabs_and_lines
4971         parameters to gdb::array_view.  Adjust.
4972         (location_to_sals): Return a std::vector instead of
4973         symtabs_and_lines.  Update.
4974         (breakpoint_re_set_default): Use std::vector instead of struct
4975         symtabs_and_lines.
4976         (decode_location_default): Return a std::vector instead of
4977         symtabs_and_lines.  Update.
4978         * breakpoint.h: Include "common/array-view.h".
4979         (struct breakpoint_ops) <decode_location>: Now returns a
4980         std::vector instead of returning a symtabs_and_lines via output
4981         parameter.
4982         (update_breakpoint_locations): Change sals parameters to use
4983         gdb::array_view.
4984         * cli/cli-cmds.c (edit_command, list_command): Update to use
4985         std::vector and gdb::array_view.
4986         (ambiguous_line_spec): Adjust to use gdb::array_view and
4987         range-for.
4988         (compare_symtabs): Rename to ...
4989         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
4990         const reference and adjust.
4991         (filter_sals): Rewrite using std::vector and standard algorithms.
4992         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
4993         (jump_command): Update to use std::vector.
4994         * linespec.c (struct linespec_state) <canonical_names>: Update
4995         comment.
4996         (add_sal_to_sals_basic): Delete.
4997         (add_sal_to_sals, filter_results, convert_results_to_lsals)
4998         (decode_line_2, create_sals_line_offset)
4999         (convert_address_location_to_sals, convert_linespec_to_sals)
5000         (convert_explicit_location_to_sals, parse_linespec)
5001         (event_location_to_sals, decode_line_full, decode_line_1)
5002         (decode_line_with_current_source)
5003         (decode_line_with_last_displayed, decode_objc)
5004         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
5005         (linespec_result::~linespec_result): Adjust to use std::vector
5006         instead of symtabs_and_lines.
5007         * linespec.h (linespec_sals::sals): Now a std::vector.
5008         (struct linespec_result): Use std::vector, bool, and in-class
5009         initialization.
5010         (decode_line_1, decode_line_with_current_source)
5011         (decode_line_with_last_displayed): Return std::vector.
5012         * macrocmd.c (info_macros_command): Use std::vector.
5013         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
5014         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
5015         std::vector.
5016         * probe.h (parse_probes): Return a std::vector.
5017         * python/python.c (gdbpy_decode_line): Use std::vector and
5018         gdb::array_view.
5019         * source.c (select_source_symtab, line_info): Use std::vector.
5020         * stack.c (func_command): Use std::vector.
5021         * symtab.h (struct symtabs_and_lines): Delete.
5022         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
5023
5024 2017-09-04  Pedro Alves  <palves@redhat.com>
5025
5026         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5027         unittests/array-view-selftests.c.
5028         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
5029         * common/array-view.h: New file.
5030         * unittests/array-view-selftests.c: New file.
5031
5032 2017-09-04  Pedro Alves  <palves@redhat.com>
5033
5034         * cli/cli-cmds.c (edit_command): Pass message to
5035         ambiguous_line_spec.
5036         (list_command): Pass message to ambiguous_line_spec.  Say
5037         "first"/"last" instead of "start" and "end" to be consistent with
5038         the manual.
5039         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
5040         them to print formatted message.
5041
5042 2017-09-04  Pedro Alves  <palves@redhat.com>
5043
5044         * btrace.c (ftrace_add_pt): Pass btrace_insn to
5045         ftrace_update_insns by reference instead of pointer.
5046
5047 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5048
5049         * i386-go32-tdep.c: Include x86-xstate.h.
5050         (i386_go32_init_abi): Call i386_target_description.
5051         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
5052         if xcr0 is X86_XSTATE_X87_MASK.
5053         * i386-tdep.h (tdesc_i386): Remove the declaration.
5054         (tdesc_i386_mmx): Likewise.
5055
5056 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5057
5058         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
5059         X86_XSTATE_SSE_MASK instead of 0.
5060
5061 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5062
5063         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
5064         i386_target_description.
5065         * i386-fbsd-nat.c (i386fbsd_read_description): Call
5066         i386_target_description.
5067         * i386-tdep.c (i386_gdbarch_init): Likewise.
5068
5069 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5070
5071         * amd64-darwin-tdep.c: Include "x86-xstate.h".
5072         (x86_darwin_init_abi_64): Call amd64_target_description.
5073         * amd64-dicos-tdep.c: Likewise.
5074         * amd64-fbsd-nat.c: Likewise.
5075         * amd64-fbsd-tdep.c: Likewise.
5076         * amd64-nbsd-tdep.c: Likewise.
5077         * amd64-obsd-tdep.c: Likewise.
5078         * amd64-sol2-tdep.c: Likewise.
5079         * amd64-windows-tdep.c: Likewise.
5080         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
5081
5082 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5083
5084         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
5085         (btrace_function) <insn>: Change type to use std::vector.
5086         * btrace.c (ftrace_debug, ftrace_call_num_insn,
5087         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
5088         ftrace_update_insns, ftrace_compute_global_level_offset,
5089         btrace_stitch_bts, btrace_clear, btrace_insn_get,
5090         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
5091         change to std::vector.
5092         (ftrace_update_insns): Adjust to change to std::vector, change
5093         type of INSN parameter.
5094         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
5095         * record-btrace.c (btrace_call_history_insn_range,
5096         btrace_compute_src_line_range,
5097         record_btrace_frame_prev_register): Adjust to change to
5098         std::vector.
5099         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
5100         to change to std::vector.
5101
5102 2017-09-03  Tom Tromey  <tom@tromey.com>
5103
5104         * corefile.c (reopen_exec_file): Use std::string.
5105
5106 2017-09-03  Tom Tromey  <tom@tromey.com>
5107
5108         * compile/compile.c (compile_register_name_mangled): Return
5109         std::string.
5110         * compile/compile-loc2c.c (pushf_register_address): Update.
5111         (pushf_register): Update.
5112         * compile/compile-c-types.c (convert_array): Update.
5113         * compile/compile-c-symbols.c (generate_vla_size): Update.
5114         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
5115         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
5116         (convert_one_symbol): Update.
5117         (generate_c_for_for_one_variable): Update.
5118         * compile/compile-c-support.c (c_get_range_decl_name): Return a
5119         std::string.
5120         (generate_register_struct): Update.
5121         * compile/compile-internal.h (c_get_range_decl_name): Return a
5122         std::string.
5123         (compile_register_name_mangled): Return std::string.
5124
5125 2017-09-03  Tom Tromey  <tom@tromey.com>
5126
5127         * utils.c (perror_string): Return a std::string.
5128         (throw_perror_with_name, perror_warning_with_name): Update.
5129
5130 2017-09-03  Tom Tromey  <tom@tromey.com>
5131
5132         * demangle.c (demangle_command): Use std::string,
5133         unique_xmalloc_ptr.
5134
5135 2017-09-03  Tom Tromey  <tom@tromey.com>
5136
5137         * cli/cli-setshow.c (do_set_command): Use std::string.
5138
5139 2017-09-03  Tom Tromey  <tom@tromey.com>
5140
5141         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
5142
5143 2017-09-03  Tom Tromey  <tom@tromey.com>
5144
5145         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
5146
5147 2017-09-03  Tom Tromey  <tom@tromey.com>
5148
5149         * mi/mi-cmd-env.c (env_execute_cli_command): Use
5150         gdb::unique_xmalloc_ptr.
5151
5152 2017-09-03  Tom Tromey  <tom@tromey.com>
5153
5154         * thread.c (print_thread_info_1): Use string_printf.
5155         (thread_apply_command, thread_apply_all_command): Use
5156         std::string.
5157
5158 2017-09-03  Tom Tromey  <tom@tromey.com>
5159
5160         * valprint.c (val_print_string): Update.
5161         * gdbcore.h (memory_error_message): Return std::string.
5162         * corefile.c (memory_error_message): Return std::string.
5163         (memory_error): Update.
5164         * breakpoint.c (insert_bp_location): Update.
5165
5166 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
5167
5168         * target/waitstatus.h (target_waitstatus_to_string): Change
5169         return type to std::string.
5170         * target/waitstatus.c (target_waitstatus_to_string): Return
5171         std::string.
5172         * target.h (target_waitstatus_to_string): Remove declaration.
5173         * infrun.c (resume, clear_proceed_status_thread,
5174         print_target_wait_results, do_target_wait, save_waitstatus,
5175         stop_all_threads): Adjust.
5176         * record-btrace.c (record_btrace_wait): Adjust.
5177         * target-debug.h
5178         (target_debug_print_struct_target_waitstatus_p): Adjust.
5179
5180 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
5181
5182         PR gdb/22046
5183         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
5184         detection.
5185
5186 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
5187
5188         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
5189         for setting/unsetting environment variables on the remote target.
5190         (New remote packets): Add entries for QEnvironmentHexEncoded,
5191         QEnvironmentUnset and QEnvironmentReset.
5192         * common/environ.c (gdb_environ::operator=): Extend method to
5193         handle m_user_set_env_list and m_user_unset_env_list.
5194         (gdb_environ::clear): Likewise.
5195         (match_var_in_string): Change type of first parameter from 'char
5196         *' to 'const char *'.
5197         (gdb_environ::set): Extend method to handle
5198         m_user_set_env_list and m_user_unset_env_list.
5199         (gdb_environ::unset): Likewise.
5200         (gdb_environ::clear_user_set_env): New method.
5201         (gdb_environ::user_set_envp): Likewise.
5202         (gdb_environ::user_unset_envp): Likewise.
5203         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
5204         m_user_unset_env_list on move constructor/assignment.
5205         (unset): Add new default parameter 'update_unset_list = true'.
5206         (clear_user_set_env): New method.
5207         (user_set_envp): Likewise.
5208         (user_unset_envp): Likewise.
5209         (m_user_set_env_list): New std::set.
5210         (m_user_unset_env_list): Likewise.
5211         * common/rsp-low.c (hex2str): New function.
5212         (bin2hex): New overload for bin2hex function.
5213         * common/rsp-low.c (hex2str): New prototype.
5214         (str2hex): New overload prototype.
5215         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
5216         QEnvironmentUnset and QEnvironmentReset.
5217         (remote_protocol_features): Add QEnvironmentHexEncoded,
5218         QEnvironmentUnset and QEnvironmentReset packets.
5219         (send_environment_packet): New function.
5220         (extended_remote_environment_support): Likewise.
5221         (extended_remote_create_inferior): Call
5222         extended_remote_environment_support.
5223         (_initialize_remote): Add QEnvironmentHexEncoded,
5224         QEnvironmentUnset and QEnvironmentReset packet configs.
5225         * unittests/environ-selftests.c (gdb_selftest_env_var):
5226         New variable.
5227         (test_vector_initialization): New function.
5228         (test_init_from_host_environ): Likewise.
5229         (test_reinit_from_host_environ): Likewise.
5230         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
5231         Likewise.
5232         (test_unset_set_empty_vector): Likewise.
5233         (test_vector_clear): Likewise.
5234         (test_std_move): Likewise.
5235         (test_move_constructor):
5236         (test_self_move): Likewise.
5237         (test_set_unset_reset): Likewise.
5238         (run_tests): Rewrite in terms of the functions above.
5239
5240 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
5241
5242         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
5243         (adi_available): Use a temp variable of type CORE_ADDR as argument
5244         3 when calling target_auxv_search.
5245         (adi_normalize_address): Use masks and xor operators to calculate
5246         normalized address.
5247         (adi_read_versions, adi_write_versions, adi_print_versions)
5248         (do_examine, do_assign): Use paddress.
5249
5250 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
5251
5252         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
5253         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
5254         out of loop and add supply of FIR.
5255         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
5256         add collect of FIR.
5257
5258 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
5259
5260         PR gdb/21827
5261         * cli/cli-script.c (define_command): Don't convert command name
5262         to lower case.
5263
5264 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
5265
5266         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
5267         Update all callers accordingly. Remove all code blocks handling
5268         the case where DISPP is not NULL.
5269
5270 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5271
5272         PR symtab/22003
5273         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
5274         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5275         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
5276
5277 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5278
5279         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
5280         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
5281         (read_comp_units_from_section): New parameter abbrev_section, use
5282         read_and_check_comp_unit_head, allocate signatured_type if needed.
5283         (create_all_comp_units): Update read_comp_units_from_section caller.
5284
5285 2017-08-23  Pedro Alves  <palves@redhat.com>
5286
5287         PR remote/21852
5288         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
5289         to null_ptid and switch to thread without reading the registers
5290         after adding the inferior.
5291
5292 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5293
5294         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
5295         compile-gcc.
5296         * compile/compile.c (compile_gcc, show_compile_gcc): New.
5297         (compile_to_object): Implement compile_gcc.
5298         (_initialize_compile): Install "set compile-gcc".  Initialize
5299         compile_gcc.
5300
5301 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5302
5303         * compile/compile.c (compile_to_object): Conditionally call
5304         set_verbose.  Conditionally call compile or compile_v0.
5305
5306 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
5307
5308         * sparc64-tdep.h: (adi_normalize_address): New export.
5309         * sparc-nat.h: (open_adi_tag_fd): New export.
5310         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
5311         * sparc64-linux-tdep.c:
5312         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
5313         (sparc64_linux_handle_segmentation_fault): New function.
5314         (sparc64_linux_init_abi): Register
5315         sparc64_linux_handle_segmentation_fault
5316         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
5317         (sparc64_addr_bits_remove): New function.
5318         (sparc64_init_abi): Register sparc64_addr_bits_remove.
5319         (MAX_PROC_NAME_SIZE): New macro.
5320         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
5321         (sparc64adilist): New variable.
5322         (adi_proc_list): New variable.
5323         (find_adi_info): New function.
5324         (add_adi_info): New function.
5325         (get_adi_info_proc): New function.
5326         (get_adi_info): New function.
5327         (info_adi_command): New function.
5328         (read_maps_entry): New function.
5329         (adi_available): New function.
5330         (adi_normalize_address): New function.
5331         (adi_align_address): New function.
5332         (adi_convert_byte_count): New function.
5333         (adi_tag_fd): New function.
5334         (adi_is_addr_mapped): New function.
5335         (adi_read_versions): New function.
5336         (adi_write_versions): New function.
5337         (adi_print_versions): New function.
5338         (do_examine): New function.
5339         (do_assign): New function.
5340         (adi_examine_command): New function.
5341         (adi_assign_command): New function.
5342         (_initialize_sparc64_adi_tdep): New function.
5343
5344 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
5345
5346         * breakpoint.c (breakpoints_info): Rename to ...
5347         (info_breakpoints_command): ... this.
5348         (watchpoints_info): Rename to ...
5349         (info_watchpoints_command): ... this.
5350         (tracepoints_info): Rename to ...
5351         (info_tracepoints_command): ... this.
5352         (_initialize_breakpoint): Adjust.
5353         * dcache.c (dcache_info): Rename to ...
5354         (info_display_command): ... this.
5355         (_initialize_dcache): Adjust.
5356         * frame.h (args_info): Rename to ...
5357         (info_args_command): ... this.
5358         (locals_info): Rename to ...
5359         (info_locals_command): ... this.
5360         * infcmd.c (nofp_registers_info): Rename to ...
5361         (info_registers_command): ... this.
5362         (float_info): Rename to ...
5363         (info_float_command): ... this.
5364         (program_info): Rename to ...
5365         (info_program_command): ... this.
5366         (all_registers_info): Rename to ...
5367         (info_all_registers_command): ... this.
5368         (vector_info): Rename to ...
5369         (info_vector_command): ... this.
5370         (float_info): Rename to ...
5371         (info_float_command): ... this.
5372         (_initialize_infcmd): Adjust.
5373         * inferior.h (term_info): Rename to ...
5374         (info_terminal_command): ... this.
5375         * inflow.c (term_info): Rename to ...
5376         (info_terminal_command): ... this.
5377         (_initialize_inflow): Adjust.
5378         * infrun.c (signals_info): Rename to ...
5379         (info_signals_command): ... this.
5380         (_initialize_infrun): Adjust.
5381         * objc-lang.c (classes_info): Rename to ...
5382         (info_classes_command): ... this.
5383         (selectors_info): Rename to ...
5384         (info_selectors_command): ... this.
5385         (_initialize_objc_language): Adjust.
5386         * printcmd.c (sym_info): Rename to ...
5387         (info_symbol_command): ... this.
5388         (address_info): Rename to ...
5389         (info_address_command): ... this.
5390         (display_info): Rename to ...
5391         (info_display_command): ... this.
5392         (_initialize_printcmd): Adjust.
5393         * reverse.c (bookmarks_info): Rename to ...
5394         (info_breakpoints_command): ... this.
5395         (_initialize_reverse): Adjust.
5396         * ser-go32.c (dos_info): Rename to ...
5397         (info_serial_command): ... this.
5398         (_initialize_ser_dos): Adjust.
5399         * skip.c (skip_info): Rename to ...
5400         (info_skip_command): ... this.
5401         (_initialize_step_skip): Adjust.
5402         * source.c (line_info): Rename to ...
5403         (info_line_command): ... this.
5404         (source_info): Rename to ...
5405         (info_source_command)
5406         * stack.c (frame_info): Rename to ...
5407         (info_frame_command): ... this.
5408         (locals_info): Rename to ...
5409         (info_locals_command): ... this.
5410         (args_info): Rename to ...
5411         (info_args_command): ... this.
5412         (_initialize_stack): Adjust.
5413         * symtab.c (sources_info): Rename to ...
5414         (info_sources_command): ... this.
5415         (variables_info): Rename to ...
5416         (info_variables_command): ... this.
5417         (functions_info): Rename to ...
5418         (info_functions_command): ... this.
5419         (types_info): Rename to ...
5420         (info_types_command): ... this.
5421         (_initialize_symtab): Adjust.
5422         * target.c (target_info): Rename to ...
5423         (info_target_command): ... this.
5424         (initialize_targets): Adjust.
5425         * tracepoint.c (tvariables_info): Rename to ...
5426         (info_tvariables_command): ... this.
5427         (scope_info): Rename to ...
5428         (info_scope_command): ... this.
5429         (trace_dump_actions): Adjust.
5430         (_initialize_tracepoint): Adjust.
5431
5432 2017-08-22  Tom Tromey  <tom@tromey.com>
5433
5434         * breakpoint.h (install_breakpoint): Update.
5435         * breakpoint.c (add_solib_catchpoint): Update.
5436         (install_breakpoint): Change argument to a std::unique_ptr.
5437         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
5438         (create_breakpoint_sal, create_breakpoint): Update.
5439         (watch_command_1, catch_exec_command_1)
5440         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
5441         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
5442         Return the breakpoint.
5443         (set_raw_breakpoint_without_location, set_raw_breakpoint)
5444         (new_single_step_breakpoint): Update.
5445         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
5446         std::unique_ptr.
5447         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5448         std::unique_ptr.
5449         * break-catch-sig.c (create_signal_catchpoint): Use
5450         std::unique_ptr.
5451         * ada-lang.c (create_ada_exception_catchpoint): Use
5452         std::unique_ptr.
5453
5454 2017-08-22  Tom Tromey  <tom@tromey.com>
5455
5456         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
5457
5458 2017-08-22  Tom Tromey  <tom@tromey.com>
5459
5460         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
5461         (lookup_partial_symbol): Update.
5462
5463 2017-08-22  Tom Tromey  <tom@tromey.com>
5464
5465         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
5466         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
5467         (find_and_open_source, symtab_to_fullname): Update.
5468         * psymtab.c (psymtab_to_fullname): Update.
5469
5470 2017-08-22  Tom Tromey  <tom@tromey.com>
5471
5472         * exec.c (exec_file_attach): Update.
5473         * linux-thread-db.c (try_thread_db_load): Update.
5474         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
5475         * utils.c (gdb_realpath): Change return type.
5476         (gdb_realpath_keepfile): Update.
5477         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
5478         (_initialize_utils): Register the new self test.
5479         * source.c (openp): Update.
5480         (find_and_open_source): Update.
5481         * nto-tdep.c (nto_find_and_open_solib): Update.
5482         * main.c (set_gdb_data_directory): Update.
5483         (captured_main_1): Update.
5484         * dwarf2read.c (dwarf2_get_dwz_file): Update
5485         (dw2_map_symbol_filenames): Update.
5486         * auto-load.c (auto_load_safe_path_vec_update): Update.
5487         (filename_is_in_auto_load_safe_path_vec): Change type of
5488         "filename_realp".
5489         (auto_load_objfile_script): Update.
5490         (file_is_auto_load_safe): Update.  Use std::string.
5491         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
5492
5493 2017-08-22  Tom Tromey  <tom@tromey.com>
5494
5495         * utils.c (gdb_realpath_keepfile): Return a
5496         gdb::unique_xmalloc_ptr.
5497         * exec.c (exec_file_attach): Update.
5498         * utils.h (gdb_realpath_keepfile): Return a
5499         gdb::unique_xmalloc_ptr.
5500
5501 2017-08-22  Tom Tromey  <tom@tromey.com>
5502
5503         * compile/compile.c (compile_file_command): Use
5504         gdb::unique_xmalloc_ptr, std::string.
5505         * utils.c (gdb_abspath): Change return type.
5506         * source.c (openp): Update.
5507         * objfiles.c (allocate_objfile): Update.
5508         * main.c (set_gdb_data_directory): Update.
5509         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
5510
5511 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
5512
5513         * cli-cmds.c (list_commands): List actual code around more than
5514         one location.
5515
5516 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
5517
5518         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
5519
5520 2017-08-21  Pedro Alves  <palves@redhat.com>
5521
5522         PR gdb/19487
5523         * c-exp.y (variable production): Handle function aliases.
5524         * minsyms.c (msymbol_is_text): New function.
5525         * minsyms.h (msymbol_is_text): Declare.
5526         * symtab.c (find_function_alias_target): New function.
5527         * symtab.h (find_function_alias_target): Declare.
5528
5529 2017-08-21  Pedro Alves  <palves@redhat.com>
5530
5531         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
5532         typedefs.
5533         * typeprint.c (whatis_exp): If handling "whatis", and expression
5534         is OP_TYPE, strip one typedef level.  Otherwise don't strip
5535         typedefs here.
5536         * valops.c (value_cast): Save "to" type before resolving
5537         stubs/typedefs.  Use that type as resulting value's type.
5538
5539 2017-08-18  Tom Tromey  <tom@tromey.com>
5540             Pedro Alves  <palves@redhat.com>
5541
5542         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
5543         * sol-thread.c (sol_thread_resume, sol_thread_wait)
5544         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
5545         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
5546         * proc-service.c (ps_xfer_memory): Use scoped_restore.
5547         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
5548         (linux_get_siginfo_data): Add "thread" argument.  Use
5549         scoped_restore.
5550         * linux-nat.c (linux_child_follow_fork)
5551         (check_stopped_by_watchpoint): Use scoped_restore.
5552         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
5553         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
5554         (restore_inferior_ptid, save_inferior_ptid): Remove.
5555         * btrace.c (btrace_fetch): Use scoped_restore.
5556         * bsd-uthread.c (bsd_uthread_fetch_registers)
5557         (bsd_uthread_store_registers): Use scoped_restore.
5558         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
5559         scoped_restore.
5560         * aix-thread.c (aix_thread_resume, aix_thread_wait)
5561         (aix_thread_xfer_partial): Use scoped_restore.
5562         * inferior.h (save_inferior_ptid): Remove.
5563
5564 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5565
5566         PR tdep/21818
5567         * arm-tdep.c (gdb_print_insn_arm): Mark
5568         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
5569
5570 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5571
5572         * NEWS: Mention GDBserver's new option "--selftest".
5573         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
5574         * selftest.c: Move it to common/selftest.c.
5575         * selftest.h: Move it to common/selftest.h.
5576         * selftest-arch.c (reset): New function.
5577         (tests_with_arch): Call reset.
5578
5579 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5580
5581         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
5582         instead of exception_fprintf and printf_filtered.
5583
5584 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5585
5586         * selftest.c (register_self_test): Rename it to
5587         selftests::register_test.
5588         (run_self_tests): selftest::run_tests.
5589         * selftest.h: Update declarations.
5590         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
5591         selftests::register_test_foreach_arch.
5592         * selftest-arch.h: Update declaration.
5593         * aarch64-tdep.c: Update.
5594         * arm-tdep.c: Likewise.
5595         * disasm-selftests.c: Likewise.
5596         * dwarf2loc.c: Likewise.
5597         * dwarf2-frame.c: Likewise.
5598         * findvar.c: Likewise.
5599         * gdbarch-selftests.c: Likewise.
5600         * maint.c (maintenance_selftest): Likewise.
5601         * regcache.c: Likewise.
5602         * rust-exp.y: Likewise.
5603         * selftest-arch.c: Likewise.
5604         * unittests/environ-selftests.c: Likewise.
5605         * unittests/function-view-selftests.c: Likewise.
5606         * unittests/offset-type-selftests.c: Likewise.
5607         * unittests/optional-selftests.c: Likewise.
5608         * unittests/scoped_restore-selftests.c: Likewise.
5609         * utils-selftests.c: Likewise.
5610
5611 2017-08-17  Pedro Alves  <palves@redhat.com>
5612
5613         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
5614         local.
5615
5616 2017-08-17  Pedro Alves  <palves@redhat.com>
5617
5618         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
5619         field.
5620         (reset_die_in_process): Delete, replaced by ...
5621         (process_die_scope): ... this new class.  Make it responsible for
5622         freeing cu->line_header too.
5623         (process_die): Use process_die_scope.
5624         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
5625         cu->line_header_die_owner.  Don't release the line header if it's
5626         owned by the CU.
5627         (setup_type_unit_groups): Make the CU/DIE own the line header.
5628         Don't release the line header here.
5629
5630 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
5631
5632         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
5633
5634 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5635
5636         * NEWS: Mention new shortcuts for nexti and stepi in TUI
5637         Single-Key mode
5638
5639 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5640
5641         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
5642         mode command list.
5643
5644 2017-08-15  Stafford Horne  <shorne@gmail.com>
5645
5646         * MAINTAINERS (Write After Approval): Add Stafford Horne.
5647
5648 2017-08-15  Stafford Horne  <shorne@gmail.com>
5649
5650         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
5651
5652 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
5653
5654         PR gdb/21954
5655         * infcmd.c (unset_environment_command): Use the 'clear' method on
5656         the environment instead of resetting it.
5657
5658 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
5659
5660         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
5661         platforms.
5662
5663 2017-08-14  Tom Tromey  <tom@tromey.com>
5664
5665         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
5666         (print_binary_chars): Likewise.
5667         (BITS_IN_BYTES): Remove.
5668
5669 2017-08-14  Tom Tromey  <tom@tromey.com>
5670
5671         PR gdb/21675
5672         * valprint.c (LOW_ZERO): Change value to 034.
5673         (print_octal_chars): Add static_asserts for octal constants.
5674         * printcmd.c (print_scalar_formatted): Add 'd' case.
5675
5676 2017-08-11  Tom Tromey  <tom@tromey.com>
5677
5678         * symfile.c (add_symbol_file_command): Use std::vector.
5679
5680 2017-08-14  Tom Tromey  <tom@tromey.com>
5681
5682         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
5683         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5684         std::move.
5685         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
5686
5687 2017-08-11  Pedro Alves  <palves@redhat.com>
5688
5689         * infrun.c (process_event_stop_test): Adjust
5690         function_name_is_marked_for_skip call.
5691         * skip.c: Include <list>.
5692         (skiplist_entry): Make it a class with private fields, and
5693         getters/setters.
5694         (skiplist_entry_chain): Delete.
5695         (skiplist_entries): New.
5696         (skiplist_entry_count): Delete.
5697         (highest_skiplist_entry_num): New.
5698         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
5699         (add_skiplist_entry): Delete.
5700         (skiplist_entry::skiplist_entry): New.
5701         (skiplist_entry::add_entry): New.
5702         (skip_file_command, skip_function): Adjust.
5703         (compile_skip_regexp): Delete.
5704         (skip_command): Don't compile regexp here.  Adjust to use
5705         skiplist_entry::add_entry.
5706         (skip_info): Adjust to use range-for and getters.
5707         (skip_enable_command, skip_disable_command): Adjust to use
5708         range-for and setters.
5709         (skip_delete_command): Adjust to use std::list.
5710         (add_skiplist_entry): Delete.
5711         (skip_file_p): Delete, refactored as ...
5712         (skiplist_entry::do_skip_file_p): ... this new method.
5713         (skip_gfile_p): Delete, refactored as ...
5714         (skiplist_entry::do_gskip_file_p): ... this new method.
5715         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
5716         (skiplist_entry::skip_function_p): ... this new method.
5717         (function_name_is_marked_for_skip): Now returns bool, and takes
5718         the function sal by const reference.  Adjust to use range-for and
5719         skiplist_entry methods.
5720         (_initialize_step_skip): Remove references to
5721         skiplist_entry_chain, skiplist_entry_count.
5722         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
5723         takes the function sal by const reference.
5724
5725 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5726
5727         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
5728         (dwarf2_frame_cache): Remove reset_cache_cleanup.
5729         (dwarf2_frame_cache):
5730         * frame-unwind.c (frame_unwind_try_unwinder): Catch
5731         RETURN_MASK_ALL and set *this_case to NULL.
5732         * frame-unwind.h: Update comments.
5733
5734 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5735
5736         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
5737         (dwarf2_frame_state_copy_regs): Remove.
5738         (dwarf2_frame_state_free_regs): Remove.
5739         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
5740         (dwarf2_restore_rule): Call method .alloc_regs instead of
5741         dwarf2_frame_state_alloc_regs.
5742         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
5743         constructor.  Call std::move.
5744         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
5745         (dwarf2_frame_cache): Likewise.
5746
5747         [GDB_SELF_TEST]: Include selftest.h and
5748         selftest-arch.h.
5749         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
5750         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
5751         execute_cfa_program_test.
5752
5753         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
5754         copy ctor, assignment operator, move assignment.
5755         <alloc_regs>: New method.
5756         <swap>: New method.
5757         (struct dwarf2_frame_state): Delete dtor.
5758         (dwarf2_frame_state_alloc_regs): Remove declaration.
5759         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
5760         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
5761
5762 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5763
5764         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
5765         (dwarf2_frame_state::dwarf2_frame_state): New.
5766         (dwarf2_frame_state::~dwarf2_frame_state): New.
5767         (dwarf2_fetch_cfa_info): Update.
5768         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
5769         rather than a pointer.  Update code.
5770         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
5771         dtor.
5772         <data_align, code_align, retaddr_column>: Change them to const.
5773         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
5774         to bool.
5775
5776 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5777
5778         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
5779         <loc.exp>: New field.
5780         * dwarf2-frame.c (execute_cfa_program): Update.
5781         (dwarf2_frame_prev_register): Update.
5782
5783 2017-08-10  Pedro Alves  <palves@redhat.com>
5784
5785         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
5786
5787 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
5788
5789         * fbsd-nat.c (struct fbsd_fork_info): Remove.
5790         (fbsd_pending_children): Use std::list.
5791         (fbsd_remember_child): Likewise.
5792         (fbsd_is_child_pending): Likewise.
5793         (fbsd_pending_vfork_done): Use std::forward_list.
5794         (fbsd_add_vfork_done): Likewise.
5795         (fbsd_is_vfork_done_pending): Likewise.
5796         (fbsd_next_vfork_done): Likewise.
5797
5798 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
5799
5800         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
5801         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
5802         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
5803         for `mapfilename'.
5804         (fbsd_xfer_partial): Use gdb::byte_vector.
5805         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
5806
5807 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
5808
5809         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
5810         "filestuff.h".
5811         (fbsd_find_memory_regions): Fix `mapfile' initialization.
5812
5813 2017-08-09  Tom Tromey  <tom@tromey.com>
5814
5815         * skip.c (skiplist_entry): New constructor.
5816         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
5817         (skiplist_entry::file_is_glob): Now bool.
5818         (skiplist_entry::file, skiplist_entry::function): Now
5819         std::string.
5820         (make_skip_entry): Return a unique_ptr.  Use new.
5821         (free_skiplist_entry, free_skiplist_entry_cleanup)
5822         (make_free_skiplist_entry_cleanup): Remove.
5823         (skip_command, skip_disable_command, add_skiplist_entry)
5824         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
5825         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
5826         (function_name_is_marked_for_skip): Update.
5827         (skip_delete_command): Update.  Use delete.
5828
5829 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
5830
5831         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
5832         (aarch64_linux_core_read_description): New function.
5833         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
5834
5835 2017-08-09  Pedro Alves  <palves@redhat.com>
5836
5837         * cp-name-parser.y (cp_comp_to_string): Return a
5838         gdb::unique_xmalloc_ptr<char>.
5839         * cp-support.c (replace_typedefs_qualified_name)
5840         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
5841         (cp_canonicalize_string_full): Use op= instead of explicit
5842         convertion.
5843         (cp_class_name_from_physname, method_name_from_physname)
5844         (cp_func_name, cp_remove_params): Adjust to use
5845         gdb::unique_xmalloc_ptr<char>.
5846         * cp-support.h (cp_comp_to_string): Return a
5847         gdb::unique_xmalloc_ptr<char>.
5848         * python/py-type.c (typy_lookup_type): Adjust to use
5849         gdb::unique_xmalloc_ptr<char>.
5850
5851 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
5852
5853         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
5854
5855 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
5856             Yao Qi  <yao.qi@linaro.org>
5857
5858         * cp-support.c (cp_canonicalize_string_full): Use
5859         gdb::unique_xmalloc_ptr<char>.
5860         (cp_canonicalize_string): Likewise.
5861
5862 2017-08-09  Yao Qi  <yao.qi@linaro.org>
5863
5864         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
5865         * regformats/i386/amd64-avx-avx512.dat: Remove.
5866         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
5867         * regformats/i386/amd64-avx-mpx.dat:Remove.
5868         * regformats/i386/amd64-avx.dat: Remove.
5869         * regformats/i386/amd64-mpx.dat: Remove.
5870         * regformats/i386/i386-avx-avx512.dat: Remove.
5871         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
5872         * regformats/i386/i386-avx-mpx.dat: Remove.
5873         * regformats/i386/i386-mmx.dat: Remove.
5874         * regformats/i386/i386-mpx.dat: Remove.
5875
5876 2017-08-09  Yao Qi  <yao.qi@linaro.org>
5877
5878         * amd64-tdep.h (tdesc_x32): Remove the declaration.
5879         * amd64-tdep.c: Don't include features/i386/x32*.c.
5880         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
5881         functions.
5882         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
5883         and i386/x32-avx-avx512.
5884         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
5885         and i386/x32.xml.
5886         * features/i386/x32-avx-avx512.c: Removed.
5887         * features/i386/x32-avx-avx512.xml: Removed.
5888         * features/i386/x32-avx.c: Removed.
5889         * features/i386/x32-avx.xml: Removed.
5890         * features/i386/x32.c: Removed.
5891         * features/i386/x32.xml: Removed.
5892         * regformats/i386/x32-avx-avx512.dat: Removed.
5893         * regformats/i386/x32-avx.dat: Removed.
5894         * regformats/i386/x32.dat: Removed.
5895
5896 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
5897
5898         PR breakpoints/21886
5899         * mem-break.c (default_memory_insert_breakpoint): Use
5900         `->placed_address' rather than `->reqstd_address' for the
5901         breakpoint location.
5902
5903 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
5904
5905         * arch-utils.c (default_print_insn): Remove arch/mach/endian
5906         assertions.
5907
5908 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
5909
5910         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
5911         a union of `tdep_info', `tdesc_data' and `id'.
5912         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
5913         rather than `info.tdep_info'.
5914         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
5915         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5916         * i386-tdep.c (i386_gdbarch_init): Likewise.
5917         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
5918         * mips-tdep.c (mips_gdbarch_init): Likewise.
5919         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5920         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5921         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
5922         `info.tdep_info'.
5923         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
5924         `info.tdep_info'.
5925         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5926         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
5927         `info.tdep_info'.
5928         * spu-tdep.c (spu_gdbarch_init): Likewise.
5929         * gdbarch.h: Regenerate.
5930
5931 2017-08-07  Leszek Swirski  <leszeks@google.com>
5932
5933         PR symtab/20899
5934         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
5935
5936 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5937
5938         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
5939         (gdbsim_open): Rename gdb_argv args object to argv.
5940
5941 2017-08-05  Tom Tromey  <tom@tromey.com>
5942
5943         * compile/compile-object-load.c (compile_object_load): Use
5944         gdb::unique_xmalloc_ptr.
5945         * cli/cli-dump.c (scan_filename): Rename from
5946         scan_filename_with_cleanup.  Change return type.
5947         (scan_expression): Rename from scan_expression_with_cleanup.
5948         Change return type.
5949         (dump_memory_to_file, dump_value_to_file, restore_command):
5950         Use gdb::unique_xmalloc_ptr.  Update.
5951         * cli/cli-cmds.c (find_and_open_script): Use
5952         gdb::unique_xmalloc_ptr.
5953         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
5954         * symmisc.c (maintenance_print_symbols)
5955         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
5956         * symfile.c (symfile_bfd_open, generic_load)
5957         (add_symbol_file_command, remove_symbol_file_command): Use
5958         gdb::unique_xmalloc_ptr.
5959         * source.c (openp): Use gdb::unique_xmalloc_ptr.
5960         * psymtab.c (maintenance_print_psymbols): Use
5961         gdb::unique_xmalloc_ptr.
5962         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
5963         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
5964         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
5965         (reload_shared_libraries_1): Likewise.
5966
5967 2017-08-05  Tom Tromey  <tom@tromey.com>
5968
5969         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
5970         (rust_op_vector, rust_set_vector): New typedefs.
5971         (current_parser): New global.
5972         (work_obstack): Change to pointer type.  Update all users.
5973         (rust_ast, pstate): Remove globals.
5974         (struct rust_parser): New.
5975         (%union) <params, field_inits>: Change type.
5976         (start, tuple_expr, unit_expr, struct_expr_list, literal)
5977         (field_expr, expr_list, maybe_expr_list, type_list): Update.
5978         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
5979         (convert_params_to_types, convert_params_to_expression): Change
5980         type of "params".
5981         (ast_string): Change type of "fields".
5982         (rust_parse): Make a rust_parser.  Remove cleanups.
5983         (rust_lex_tests): Make and install an auto_obstack.
5984
5985 2017-08-04  Yao Qi  <yao.qi@linaro.org>
5986
5987         * configure.srv (ipa_x32_linux_regobj): New.
5988         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
5989         instead of X86_TDESC_AVX512.
5990         (initialize_low_tracepoint): Call
5991         init_registers_x32_avx_avx512_linux.
5992
5993 2017-08-04  Yao Qi  <yao.qi@linaro.org>
5994
5995         * utils.h (gdb_argv): Add namespace std for nullptr_t.
5996
5997 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5998
5999         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
6000
6001 2017-08-03  Tom Tromey  <tom@tromey.com>
6002
6003         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
6004         Remove.
6005         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
6006
6007 2017-08-03  Tom Tromey  <tom@tromey.com>
6008
6009         * python/py-param.c (compute_enum_values): Use gdb_argv.
6010
6011 2017-08-03  Tom Tromey  <tom@tromey.com>
6012
6013         * utils.h (struct gdb_argv_deleter): New.
6014         (gdb_argv): New class.
6015         * utils.c (gdb_argv::reset): New method.
6016         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
6017         * tracefile.c (tsave_command): Use gdb_argv.
6018         * top.c (new_ui_command): Use gdb_argv.
6019         * symmisc.c (maintenance_print_symbols)
6020         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
6021         * symfile.c (symbol_file_command, generic_load)
6022         (remove_symbol_file_command): Use gdb_argv.
6023         * stack.c (backtrace_command): Use gdb_argv.
6024         * source.c (add_path, show_substitute_path_command)
6025         (unset_substitute_path_command, set_substitute_path_command):
6026         Use gdb_argv.
6027         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
6028         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
6029         * remote.c (extended_remote_run, remote_put_command)
6030         (remote_get_command, remote_delete_command): Use gdb_argv.
6031         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
6032         (gdbsim_open): Use gdb_argv.
6033         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
6034         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
6035         * procfs.c (procfs_info_proc): Use gdb_argv.
6036         * interps.c (interpreter_exec_cmd): Use gdb_argv.
6037         * infrun.c (handle_command): Use gdb_argv.
6038         * inferior.c (add_inferior_command, clone_inferior_command):
6039         Use gdb_argv.
6040         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
6041         * exec.c (exec_file_command): Use gdb_argv.
6042         * cli/cli-cmds.c (alias_command): Use gdb_argv.
6043         * compile/compile.c (build_argc_argv): Use gdb_argv.
6044
6045 2017-08-03  Tom Tromey  <tom@tromey.com>
6046
6047         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
6048
6049 2017-08-03  Tom Tromey  <tom@tromey.com>
6050
6051         * python/python.c (compute_python_string): Return std::string.
6052         (gdbpy_eval_from_control_command): Update.
6053         (do_start_initialization): Use std::string.
6054         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
6055         xstrprintf.
6056         * python/py-breakpoint.c (local_setattro): Use string_printf, not
6057         xstrprintf.
6058
6059 2017-08-03  Tom Tromey  <tom@tromey.com>
6060
6061         * top.h (do_restore_instream_cleanup): Remove.
6062         * top.c (do_restore_instream_cleanup): Remove.
6063         (read_command_file): Use scoped_restore.
6064         * cli/cli-script.c (execute_user_command): Use scoped_restore.
6065
6066 2017-08-03  Tom Tromey  <tom@tromey.com>
6067
6068         * cli/cli-script.c (execute_user_command)
6069         (execute_control_command): Use scoped_restore.
6070
6071 2017-08-03  Tom Tromey  <tom@tromey.com>
6072
6073         * cli/cli-script.c (do_restore_user_call_depth): Remove.
6074         (execute_user_command): Remove user_call_depth; use
6075         user_args_stack's size instead.
6076
6077 2017-08-03  Tom Tromey  <tom@tromey.com>
6078
6079         * top.h (in_user_command): Remove.
6080         * top.c (in_user_command): Remove.
6081         * cli/cli-script.c (do_restore_user_call_depth)
6082         (execute_user_command): Update.
6083
6084 2017-08-03  Tom Tromey  <tom@tromey.com>
6085
6086         * valops.c (search_struct_method): Use gdb::byte_vector.
6087         * valarith.c (value_concat): Use std::vector.
6088         * target.c (memory_xfer_partial): Use gdb::byte_vector.
6089         (simple_search_memory): Likewise.
6090         * printcmd.c (find_string_backward): Use gdb::byte_vector.
6091         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
6092         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
6093         * elfread.c (elf_rel_plt_read): Use std::string.
6094         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
6095         * cli/cli-dump.c (restore_section_callback): Use
6096         gdb::byte_vector.
6097
6098 2017-08-03  Tom Tromey  <tom@tromey.com>
6099
6100         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
6101
6102 2017-08-03  Tom Tromey  <tom@tromey.com>
6103
6104         * tui/tui-regs.c (tui_restore_gdbout): Remove.
6105         (tui_register_format): Use scoped_restore.
6106
6107 2017-08-03  Tom Tromey  <tom@tromey.com>
6108
6109         * reverse.c (exec_direction_default): Remove.
6110         (exec_reverse_once): Use scoped_restore.
6111         * remote.c (restore_remote_timeout): Remove.
6112         (remote_flash_erase, remote_flash_write, remote_flash_done)
6113         (readchar, remote_serial_write): Use scoped_restore.
6114         * cli/cli-script.c (struct source_cleanup_lines_args)
6115         (source_cleanup_lines): Remove.
6116         (script_from_file): Use scoped_restore.
6117         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
6118         (source_command): Use scoped_restore.
6119
6120 2017-08-03  Tom Tromey  <tom@tromey.com>
6121
6122         * utils.h (make_cleanup_free_so): Remove.
6123         * utils.c (do_free_so, make_cleanup_free_so): Remove.
6124         * solist.h (struct so_deleter): New.
6125         (so_list_up): New typedef.
6126         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
6127
6128 2017-08-03  Tom Tromey  <tom@tromey.com>
6129
6130         * utils.h (make_cleanup_restore_current_language): Remove.
6131         * utils.c (do_restore_current_language)
6132         (make_cleanup_restore_current_language): Remove.
6133         * parse.c (parse_exp_in_context_1)
6134         (parse_expression_with_language): Use
6135         scoped_restore_current_language.
6136         * mi/mi-main.c (mi_cmd_execute): Use
6137         scoped_restore_current_language.
6138         * language.h (scoped_restore_current_language): New class.
6139
6140 2017-08-03  Tom Tromey  <tom@tromey.com>
6141
6142         * compile/compile.c (cleanup_unlink_file): Remove.
6143         (compile_to_object): Use gdb::unlinker.
6144         (eval_compile_command): Likewise.
6145
6146 2017-08-03  Tom Tromey  <tom@tromey.com>
6147
6148         * utils.h (make_cleanup_fclose): Remove.
6149         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
6150
6151 2017-08-03  Tom Tromey  <tom@tromey.com>
6152
6153         * top.c (open_terminal_stream): Return gdb_file_up.
6154         (new_ui_command): Update.
6155
6156 2017-08-03  Tom Tromey  <tom@tromey.com>
6157
6158         * source.c (print_source_lines_base, forward_search_command)
6159         (reverse_search_command): Use gdb_file_up.
6160
6161 2017-08-03  Tom Tromey  <tom@tromey.com>
6162
6163         * fbsd-nat.c (fbsd_find_memory_regions): Update.
6164
6165 2017-08-03  Tom Tromey  <tom@tromey.com>
6166
6167         * cli/cli-cmds.c (find_and_open_script): Change return type.
6168         Remove "streamp" and "full_path" parameters.
6169         (source_script_with_search): Update.
6170         * auto-load.c (source_script_file): Update.
6171         * cli/cli-cmds.h (find_and_open_script): Change type.
6172         (open_script): New struct.
6173
6174 2017-08-03  Tom Tromey  <tom@tromey.com>
6175
6176         * xml-support.c (xml_fetch_content_from_file): Update.
6177         * ui-file.c (stdio_file::open): Update.
6178         * tracefile-tfile.c (tfile_start): Update.
6179         * remote.c (remote_file_put, remote_file_get): Update.
6180         * nat/linux-procfs.c (linux_proc_get_int)
6181         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
6182         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
6183         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
6184         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
6185         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
6186         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
6187         * linux-nat.c (linux_proc_pending_signals): Update.
6188         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
6189         (file_closer): Remove.
6190         * compile/compile.c (compile_to_object): Update.
6191         * common/filestuff.h (struct gdb_file_deleter): New.
6192         (gdb_file_up): New typedef.
6193         (gdb_fopen_cloexec): Change return type.
6194         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
6195         * cli/cli-dump.c (fopen_with_cleanup): Remove.
6196         (dump_binary_file, restore_binary_file): Update.
6197         * auto-load.c (auto_load_objfile_script_1): Update.
6198
6199 2017-08-03  Tom Tromey  <tom@tromey.com>
6200
6201         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
6202         (info_static_tracepoint_markers_command): Likewise.
6203         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
6204         * skip.c (skip_info): Use ui_out_emit_table.
6205         * progspace.c (print_program_space): Use ui_out_emit_table.
6206         * osdata.c (info_osdata): Use ui_out_emit_table.
6207         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
6208         ui_out_emit_table.
6209         * linux-thread-db.c (info_auto_load_libthread_db): Use
6210         ui_out_emit_table.
6211         * inferior.c (print_inferior): Use ui_out_emit_table.
6212         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
6213         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
6214         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
6215         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
6216         * ui-out.h (class ui_out_emit_table): New.
6217
6218 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
6219
6220         * mips-tdep.c (mips_fpu_type_str): New function.
6221         (mips_dump_tdep): Call it.
6222
6223 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
6224
6225         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
6226         `->mips_fpu_type'.
6227
6228 2017-07-31  Xavier Roirand  <roirand@adacore.com>
6229
6230         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
6231
6232 2017-07-27  Xavier Roirand  <roirand@adacore.com>
6233
6234         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
6235
6236 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6237
6238         * cli/cli-cmds.c (maintenancechecklist): New variable.
6239         * gdbcmd.h (maintenancechecklist): Declare it.
6240         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
6241         Call i386_linux_read_description with different masks.
6242         * maint.c (maintenance_check_command): New function.
6243         (_initialize_maint_cmds): Call add_prefix_cmd.
6244         * target-descriptions.c (tdesc_reg): override operator != and ==.
6245         (tdesc_type): Likewise.
6246         (tdesc_feature): Likewise.
6247         (target_desc): Likewise.
6248         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
6249         (maintenance_check_xml_descriptions): New function.
6250         (_initialize_target_descriptions) Add command "xml-descriptions".
6251         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
6252
6253 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6254
6255         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
6256         Include features/i386/32bit-*.c.
6257         (i386_linux_read_description): Generate target description if it
6258         doesn't exist.
6259         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
6260         functions.
6261         * features/i386/32bit-linux.c: Re-generated.
6262         * features/i386/32bit-sse.c: Likewise.
6263         * target-descriptions.c (print_c_feature::visit): Print code to
6264         set register number if needed.
6265         (print_c_feature) <m_next_regnum>: New field.
6266
6267 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6268
6269         * features/Makefile (CFILES): Rename with TDESC_CFILES.
6270         (FEATURE_XMLFILES): New.
6271         (FEATURE_CFILES): New.
6272         New rules.
6273         (clean-cfiles): Remove generated c files.
6274         * features/i386/32bit-avx.c: Generated.
6275         * features/i386/32bit-avx512.c: Generated.
6276         * features/i386/32bit-core.c: Generated.
6277         * features/i386/32bit-linux.c: Generated.
6278         * features/i386/32bit-mpx.c: Generated.
6279         * features/i386/32bit-pkeys.c: Generated.
6280         * features/i386/32bit-sse.c: Generated.
6281         * target-descriptions.c: Include algorithm.
6282         (tdesc_element_visitor): Add method visit_end.
6283         (print_c_tdesc): Implement visit_end.
6284         (print_c_tdesc:: m_filename_after_features): Move it to
6285         protected.
6286         (print_c_feature): New class.
6287         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
6288         name starts with "i386/32bit-".
6289
6290 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6291
6292         * target-descriptions.c (tdesc_element_visitor): New class.
6293         (tdesc_element): New class.
6294         (tdesc_reg): Inherit from tdesc_element.
6295         (tdesc_reg::accept): New function.
6296         (tdesc_type): Inherit from tdesc_element.
6297         (tdesc_type::accept): New function.
6298         (tdesc_feature): Inherit from tdesc_element.
6299         (tdesc_feature::accept): New function.
6300         (target_desc): Inherit from tdesc_element.
6301         (target_desc::target_desc): New.
6302         (target_desc::~target_desc): New.
6303         (target_desc::accept): New.
6304         (allocate_target_description): Use new.
6305         (free_target_description): Use delete.
6306         (print_c_tdesc): New class.
6307         (maint_print_c_tdesc_cmd): Adjust.
6308
6309         * features/aarch64.c: Re-generated.
6310         * features/arc-arcompact.c: Re-generated.
6311         * features/arc-v2.c: Re-generated.
6312         * features/arm/arm-with-iwmmxt.c: Re-generated.
6313         * features/arm/arm-with-m.c: Re-generated.
6314         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
6315         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
6316         * features/arm/arm-with-neon.c: Re-generated.
6317         * features/arm/arm-with-vfpv2.c: Re-generated.
6318         * features/arm/arm-with-vfpv3.c: Re-generated.
6319         * features/i386/amd64-avx-avx512.c: Re-generated.
6320         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6321         * features/i386/amd64-avx.c: Re-generated.
6322         * features/i386/amd64-avx-linux.c: Re-generated.
6323         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
6324         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6325         * features/i386/amd64-avx-mpx.c: Re-generated.
6326         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
6327         * features/i386/amd64.c: Re-generated.
6328         * features/i386/amd64-linux.c: Re-generated.
6329         * features/i386/amd64-mpx.c: Re-generated.
6330         * features/i386/amd64-mpx-linux.c: Re-generated.
6331         * features/i386/i386-avx-avx512.c: Re-generated.
6332         * features/i386/i386-avx-avx512-linux.c: Re-generated.
6333         * features/i386/i386-avx.c: Re-generated.
6334         * features/i386/i386-avx-linux.c: Re-generated.
6335         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
6336         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
6337         * features/i386/i386-avx-mpx.c: Re-generated.
6338         * features/i386/i386-avx-mpx-linux.c: Re-generated.
6339         * features/i386/i386.c: Re-generated.
6340         * features/i386/i386-linux.c: Re-generated.
6341         * features/i386/i386-mmx.c: Re-generated.
6342         * features/i386/i386-mmx-linux.c: Re-generated.
6343         * features/i386/i386-mpx.c: Re-generated.
6344         * features/i386/i386-mpx-linux.c: Re-generated.
6345         * features/i386/x32-avx-avx512.c: Re-generated.
6346         * features/i386/x32-avx-avx512-linux.c: Re-generated.
6347         * features/i386/x32-avx.c: Re-generated.
6348         * features/i386/x32-avx-linux.c: Re-generated.
6349         * features/i386/x32.c: Re-generated.
6350         * features/i386/x32-linux.c: Re-generated.
6351         * features/microblaze.c: Re-generated.
6352         * features/microblaze-with-stack-protect.c: Re-generated.
6353         * features/mips64-dsp-linux.c: Re-generated.
6354         * features/mips64-linux.c: Re-generated.
6355         * features/mips-dsp-linux.c: Re-generated.
6356         * features/mips-linux.c: Re-generated.
6357         * features/nds32.c: Re-generated.
6358         * features/nios2.c: Re-generated.
6359         * features/nios2-linux.c: Re-generated.
6360         * features/rs6000/powerpc-32.c: Re-generated.
6361         * features/rs6000/powerpc-32l.c: Re-generated.
6362         * features/rs6000/powerpc-403.c: Re-generated.
6363         * features/rs6000/powerpc-403gc.c : Re-generated.
6364         * features/rs6000/powerpc-405.c: Re-generated.
6365         * features/rs6000/powerpc-505.c: Re-generated.
6366         * features/rs6000/powerpc-601.c: Re-generated.
6367         * features/rs6000/powerpc-602.c: Re-generated.
6368         * features/rs6000/powerpc-603.c: Re-generated.
6369         * features/rs6000/powerpc-604.c: Re-generated.
6370         * features/rs6000/powerpc-64.c: Re-generated.
6371         * features/rs6000/powerpc-64l.c: Re-generated.
6372         * features/rs6000/powerpc-7400.c: Re-generated.
6373         * features/rs6000/powerpc-750.c: Re-generated.
6374         * features/rs6000/powerpc-860.c: Re-generated.
6375         * features/rs6000/powerpc-altivec32.c: Re-generated.
6376         * features/rs6000/powerpc-altivec32l.c: Re-generated.
6377         * features/rs6000/powerpc-altivec64.c: Re-generated.
6378         * features/rs6000/powerpc-altivec64l.c: Re-generated.
6379         * features/rs6000/powerpc-cell32l.c: Re-generated.
6380         * features/rs6000/powerpc-cell64l.c: Re-generated.
6381         * features/rs6000/powerpc-e500.c: Re-generated.
6382         * features/rs6000/powerpc-e500l.c: Re-generated.
6383         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
6384         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
6385         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
6386         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
6387         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
6388         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
6389         * features/rs6000/powerpc-vsx32.c: Re-generated.
6390         * features/rs6000/powerpc-vsx32l.c: Re-generated.
6391         * features/rs6000/powerpc-vsx64.c: Re-generated.
6392         * features/rs6000/powerpc-vsx64l.c: Re-generated.
6393         * features/rs6000/rs6000.c: Re-generated.
6394         * features/s390-linux32.c: Re-generated.
6395         * features/s390-linux32v1.c: Re-generated.
6396         * features/s390-linux32v2.c: Re-generated.
6397         * features/s390-linux64.c: Re-generated.
6398         * features/s390-linux64v1.c: Re-generated.
6399         * features/s390-linux64v2.c: Re-generated.
6400         * features/s390-te-linux64.c: Re-generated.
6401         * features/s390-tevx-linux64.c: Re-generated.
6402         * features/s390-vx-linux64.c: Re-generated.
6403         * features/s390x-linux64.c: Re-generated.
6404         * features/s390x-linux64v1.c: Re-generated.
6405         * features/s390x-linux64v2.c: Re-generated.
6406         * features/s390x-te-linux64.c: Re-generated.
6407         * features/s390x-tevx-linux64.c: Re-generated.
6408         * features/s390x-vx-linux64.c: Re-generated.
6409         * features/sparc/sparc32-solaris.c: Re-generated.
6410         * features/sparc/sparc64-solaris.c: Re-generated.
6411         * features/tic6x-c62x.c: Re-generated.
6412         * features/tic6x-c62x-linux.c: Re-generated.
6413         * features/tic6x-c64x.c: Re-generated.
6414         * features/tic6x-c64x-linux.c: Re-generated.
6415         * features/tic6x-c64xp.c: Re-generated.
6416         * features/tic6x-c64xp-linux.c: Re-generated.
6417
6418 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6419
6420         * i386-linux-tdep.c (i386_linux_read_description): New function.
6421         (i386_linux_core_read_description): Call
6422         i386_linux_read_description.
6423         * i386-linux-tdep.h (i386_linux_read_description): Declare.
6424         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
6425         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
6426         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
6427         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
6428         * x86-linux-nat.c (x86_linux_read_description): Call
6429         i386_linux_read_description.
6430
6431 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6432
6433         * NEWS: Mention it.
6434         * features/Makefile (%.c: %.xml): Pass the xml file name to
6435         command "maint print c-tdesc".
6436         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
6437         name from 'arg'.
6438
6439 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6440
6441         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
6442         in-class initialization.
6443         (tdesc_create_feature): Call new instead of XCNEW.
6444         (free_target_description): Ue delete.
6445
6446 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
6447
6448         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
6449
6450 2017-07-25  Yao Qi  <yao.qi@linaro.org>
6451
6452         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
6453         constant.
6454         (amd64_x32_init_abi): Likewise.
6455         * amd64-tdep.h (amd64_init_abi): Update declaration.
6456         (amd64_x32_init_abi): Likewise.
6457
6458 2017-07-25  Yao Qi  <yao.qi@linaro.org>
6459
6460         PR tdep/21717
6461         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
6462         condition for FPSCR.
6463         (arm_linux_store_inferior_registers): Likewise.
6464
6465 2017-07-22  Tom Tromey  <tom@tromey.com>
6466
6467         * break-catch-syscall.c (struct catch_syscall_inferior_data)
6468         <syscalls_counts>: Now a std::vector.
6469         (get_catch_syscall_inferior_data): Use "new".
6470         (catch_syscall_inferior_data_cleanup): Use "delete".
6471         (insert_catch_syscall, remove_catch_syscall)
6472         (clear_syscall_counts): Update.
6473
6474 2017-07-22  Tom Tromey  <tom@tromey.com>
6475
6476         * break-catch-syscall.c (syscall_catchpoint)
6477         <syscalls_to_be_caught>: Now a std::vector<int>
6478         (~syscall_catchpoint): Remove.
6479         (insert_catch_syscall, remove_catch_syscall)
6480         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
6481         (print_mention_catch_syscall, print_recreate_catch_syscall):
6482         Update.
6483         (create_syscall_event_catchpoint): Change type of "filter"
6484         parameter.
6485         (catch_syscall_split_args): Return a std::vector.
6486         (catch_syscall_command_1, catching_syscall_number_1): Update.
6487
6488 2017-07-22  Tom Tromey  <tom@tromey.com>
6489
6490         * break-catch-throw.c (struct exception_catchpoint)
6491         <exception_rx>: Now a std::string.
6492         (~exception_catchpoint): Remove.
6493         (print_one_detail_exception_catchpoint): Update.
6494         (handle_gnu_v3_exceptions): Change type of except_rx.
6495         (extract_exception_regexp): Return a std::string.
6496         (catch_exception_command_1): Update.
6497
6498 2017-07-22  Tom Tromey  <tom@tromey.com>
6499
6500         * break-catch-sig.c (gdb_signal_type): Remove typedef.
6501         (struct signal_catchpoint) <signals_to_be_caught>: Now a
6502         std::vector.
6503         <catch_all>: Now a bool.
6504         (~signal_catchpoint): Remove.
6505         (signal_catchpoint_insert_location)
6506         (signal_catchpoint_remove_location)
6507         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
6508         (signal_catchpoint_print_mention)
6509         (signal_catchpoint_print_recreate)
6510         (signal_catchpoint_explains_signal): Update.
6511         (create_signal_catchpoint): Change type of "filter" and
6512         "catch_all".
6513         (catch_signal_split_args): Return a std::vector.  Change type of
6514         "catch_all".
6515         (catch_signal_command): Update.
6516
6517 2017-07-20  Pedro Alves  <palves@redhat.com>
6518
6519         * ada-lang.c (ada_language_defn): Make extern.
6520         (_initialize_ada_language): Remove add_language call.
6521         * c-lang.c (c_language_defn, cplus_language_defn)
6522         (asm_language_defn, minimal_language_defn): Make extern.
6523         (_initialize_c_language): Delete.
6524         * completer.c (compare_cstrings): Delete, moved to utils.h.
6525         * d-lang.c (d_language_defn): Make extern.
6526         (_initialize_d_language): Remove add_language calls.
6527         * defs.h (enum language): Add comment.
6528         * f-lang.c (f_language_defn): Make extern.
6529         (_initialize_f_language): Remove add_language call.
6530         * go-lang.c (go_language_defn): Make extern.
6531         (_initialize_go_language): Remove add_language call.
6532         * language.c: Include <algorithm>.
6533         (languages): Redefine as const array.
6534         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
6535         (set_language_command): Handle "local".  Use for-range loop.
6536         (set_language): Remove loop.
6537         (language_enum): Rewrite.
6538         (language_def, language_str): Remove loops.
6539         (add_language): Delete.
6540         (add_set_language_command): New, based on add_languages.
6541         (skip_language_trampoline): Adjust.
6542         (local_language_defn): Delete.
6543         (language_gdbarch_post_init): Adjust.
6544         (_initialize_language): Remove add_language calls.  Call
6545         add_set_language_command.
6546         * language.h (add_language): Delete.
6547         (auto_language_defn)
6548         (unknown_language_defn, minimal_language_defn, ada_language_defn)
6549         (asm_language_defn, c_language_defn, cplus_language_defn)
6550         (d_language_defn, f_language_defn, go_language_defn)
6551         (m2_language_defn, objc_language_defn, opencl_language_defn)
6552         (pascal_language_defn, rust_language_defn): Declare.
6553         * m2-lang.c (m2_language_defn): Make extern.
6554         (_initialize_m2_language): Remove add_language call.
6555         * objc-lang.c (objc_language_defn): Make extern.
6556         (_initialize_objc_language): Remove add_language call.
6557         * opencl-lang.c (opencl_language_defn): Make extern.
6558         (_initialize_opencl_language): Remove add_language call.
6559         * p-lang.c (pascal_language_defn): Make extern.
6560         (_initialize_pascal_language): Delete.
6561         * rust-lang.c (rust_language_defn): Make extern.
6562         (_initialize_rust_language): Delete.
6563         * utils.h (compare_cstrings): New static inline function.
6564
6565 2017-07-20  Pedro Alves  <palves@redhat.com>
6566
6567         * ada-lang.c (ada_to_fixed_type_1): Adjust.
6568         (get_var_value): Constify parameters.
6569         (get_int_var_value): Change prototype.
6570         (to_fixed_range_type): Adjust.
6571         * ada-lang.h (get_int_var_value): Change prototype.
6572
6573 2017-07-20  Pedro Alves  <palves@redhat.com>
6574
6575         * dwarf2read.c (dw2_lookup_symbol): Use
6576         SYMBOL_MATCHES_SEARCH_NAME.
6577         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
6578
6579 2017-07-20  Pedro Alves  <palves@redhat.com>
6580
6581         * block.c (block_iter_name_step, block_iter_name_first)
6582         (block_iter_name_next): Delete.
6583         (block_lookup_symbol_primary): Adjust to use
6584         dict_iter_match_first/dict_iter_match_next.
6585         * block.h (block_iter_name_first, block_iter_name_next): Delete
6586         declarations.
6587         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
6588         dict_iter_match_first/dict_iter_match_next.
6589
6590 2017-07-20  Pedro Alves  <palves@redhat.com>
6591
6592         * cp-support.c (cp_find_first_component_aux): Add missing case for
6593         end of string.
6594
6595 2017-07-18  David Blaikie  <dblaikie@gmail.com>
6596
6597         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
6598         of dwo_cu's dwo_file.
6599
6600 2017-07-18  Yao Qi  <yao.qi@linaro.org>
6601
6602         * remote.c (store_registers_using_G): Remove one line comment.
6603
6604 2017-07-18  Yao Qi  <yao.qi@linaro.org>
6605
6606         * regcache.c (regcache_cpy): Simplify it.
6607         (regcache::cpy_no_passthrough): Remove it.
6608         * regcache.h (cpy_no_passthrough): Remove it.
6609         (regcache_dup, regcache_cpy): Update comments.
6610
6611 2017-07-18  Pedro Alves  <palves@redhat.com>
6612
6613         * remote-sim.c (sim_command_completer): Adjust to work with a
6614         completion_tracker instead of a VEC.
6615
6616 2017-07-17  Pedro Alves  <palves@redhat.com>
6617
6618         * completer.c (complete_source_filenames): New function.
6619         (complete_address_and_linespec_locations): New function.
6620         (location_completer): Use complete_address_and_linespec_locations.
6621         (completion_tracker::build_completion_result): Honor the tracker's
6622         request to suppress append.
6623         * completer.h (completion_tracker::suppress_append_ws)
6624         (completion_tracker::set_suppress_append_ws): New methods.
6625         (completion_tracker::m_suppress_append_ws): New field.
6626         (complete_source_filenames): New declaration.
6627         * linespec.c (linespec_complete_what): New.
6628         (struct ls_parser) <complete_what, completion_word,
6629         completion_quote_char, completion_quote_end, completion_tracker>:
6630         New fields.
6631         (string_find_incomplete_keyword_at_end): New.
6632         (linespec_lexer_lex_string): Record quote char.  If in completion
6633         mode, don't throw.
6634         (linespec_lexer_consume_token): Advance the completion word point.
6635         (linespec_lexer_peek_token): Save/restore completion info.
6636         (save_stream_and_consume_token): New.
6637         (set_completion_after_number): New.
6638         (linespec_parse_basic): Set what to complete next depending on
6639         token.  Handle function and label completions specially.
6640         (parse_linespec): Disable objc shortcut in completion mode.  Set
6641         what to complete next depending on token type.  Skip keyword if in
6642         completion mode.
6643         (complete_linespec_component, linespec_complete): New.
6644         * linespec.h (linespec_complete): Declare.
6645
6646 2017-07-17  Pedro Alves  <palves@redhat.com>
6647
6648         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
6649         Handle 'operator<' / 'operator<<'.
6650
6651 2017-07-17  Pedro Alves  <palves@redhat.com>
6652
6653         * completer.c (collect_explicit_location_matches): Handle
6654         MATCH_LABEL.
6655         (convert_explicit_location_to_linespec): New, factored out from
6656         ...
6657         (convert_explicit_location_to_sals): ... this.
6658         (complete_label): New.
6659         (linespec_complete_label, find_label_symbols_in_block): New.
6660         (find_label_symbols): Add completion_mode parameter and adjust to
6661         call find_label_symbols_in_block.
6662         * linespec.h (linespec_complete_label): Declare.
6663
6664 2017-07-17  Pedro Alves  <palves@redhat.com>
6665
6666         * ada-lang.c (ada_collect_symbol_completion_matches): Add
6667         complete_symbol_mode parameter.
6668         * cli/cli-cmds.c (complete_command): Get the completion result out
6669         of the handle_brkchars tracker if used a custom word point.
6670         * completer.c: Include "linespec.h".
6671         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
6672         (advance_to_expression_complete_word_point): New.
6673         (completion_tracker::completes_to_completion_word): New.
6674         (complete_files_symbols): Pass down
6675         complete_symbol_mode::EXPRESSION.
6676         (explicit_options, probe_options): New.
6677         (collect_explicit_location_matches): Complete on the
6678         explictit_loc->foo instead of word.  Use
6679         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
6680         keyword and options completions.
6681         (backup_text_ptr): Delete.
6682         (skip_keyword): New.
6683         (complete_explicit_location): Remove 'word' parameter.  Add
6684         language, quoted_arg_start and quoted_arg_end parameters.
6685         Rewrite, parsing left to right.
6686         (location_completer): Rewrite.
6687         (location_completer_handle_brkchars): New function.
6688         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
6689         (enum complete_line_internal_reason): Adjust comments.
6690         (completion_tracker::discard_completions): New.
6691         (completer_handle_brkchars_func_for_completer): Handle
6692         location_completer.
6693         (gdb_custom_word_point_brkchars)
6694         (gdb_org_rl_basic_quote_characters): New.
6695         (gdb_completion_word_break_characters_throw)
6696         (completion_find_completion_word): Handle trackers that use a
6697         custom word point.
6698         (completion_tracker::advance_custom_word_point_by): New.
6699         (completion_tracker::build_completion_result): Don't rely on
6700         readline appending the quote char.
6701         (gdb_rl_attempted_completion_function_throw): Handle trackers that
6702         use a custom word point.
6703         (gdb_rl_attempted_completion_function): Restore
6704         rl_basic_quote_characters.
6705         * completer.h (class completion_tracker): Extend intro comment.
6706         (completion_tracker::set_quote_char)
6707         (completion_tracker::quote_char)
6708         (completion_tracker::set_use_custom_word_point)
6709         (completion_tracker::use_custom_word_point)
6710         (completion_tracker::custom_word_point)
6711         (completion_tracker::set_custom_word_point)
6712         (completion_tracker::advance_custom_word_point_by)
6713         (completion_tracker::completes_to_completion_word)
6714         (completion_tracker::discard_completions): New methods.
6715         (completion_tracker::m_quote_char)
6716         (completion_tracker::m_use_custom_word_point)
6717         (completion_tracker::m_custom_word_point): New fields.
6718         (advance_to_expression_complete_word_point): Declare.
6719         * f-lang.c (f_collect_symbol_completion_matches): Add
6720         complete_symbol_mode parameter.
6721         * language.h (struct language_defn)
6722         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
6723         parameter.
6724         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
6725         (linespec_complete_function): New function.
6726         (linespec_lexer_lex_keyword): Adjust.
6727         * linespec.h (linespec_keywords, linespec_complete_function): New
6728         declarations.
6729         * location.c (find_end_quote): New function.
6730         (explicit_location_lex_one): Add explicit_completion_info
6731         parameter.  Save quoting info.  Don't throw if being called for
6732         completion.  Don't handle Ada operators here.
6733         (is_cp_operator, skip_op_false_positives, first_of)
6734         (explicit_location_lex_one_function): New function.
6735         (string_to_explicit_location): Replace 'dont_throw' parameter with
6736         an explicit_completion_info pointer parameter.  Handle it.  Don't
6737         use explicit_location_lex_one to lex function names.  Use
6738         explicit_location_lex_one_function instead.
6739         * location.h (struct explicit_completion_info): New.
6740         (string_to_explicit_location): Replace 'dont_throw' parameter with
6741         an explicit_completion_info pointer parameter.
6742         * symtab.c (default_collect_symbol_completion_matches_break_on):
6743         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
6744         (default_collect_symbol_completion_matches)
6745         (collect_symbol_completion_matches): Add complete_symbol_mode
6746         parameter.
6747         (collect_symbol_completion_matches_type): Pass down
6748         complete_symbol_mode::EXPRESSION.
6749         (collect_file_symbol_completion_matches): Add complete_symbol_mode
6750         parameter.  Handle LINESPEC mode.
6751         * symtab.h (complete_symbol_mode): New.
6752         (default_collect_symbol_completion_matches_break_on)
6753         (default_collect_symbol_completion_matches)
6754         (collect_symbol_completion_matches)
6755         (collect_file_symbol_completion_matches): Add complete_symbol_mode
6756         parameter.
6757
6758 2017-07-17  Pedro Alves  <palves@redhat.com>
6759
6760         * utils.c (enum class strncmp_iw_mode): New.
6761         (strcmp_iw): Rename to ...
6762         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
6763         parameters.  Handle them.
6764         (strncmp_iw): New.
6765         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
6766         * utils.h (strncmp_iw): Declare.
6767         (strcmp_iw): Move describing comments here.
6768
6769 2017-07-17  Pedro Alves  <palves@redhat.com>
6770
6771         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
6772         CP_OPERATOR_STR.
6773         * c-typeprint.c (is_type_conversion_operator): Use
6774         CP_OPERATOR_STR.
6775         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
6776         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
6777         CP_OPERATOR_LEN.
6778         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
6779         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
6780         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
6781         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
6782         CP_OPERATOR_STR.
6783         * location.c: Include "cp-support.h".
6784         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
6785         CP_OPERATOR_STR.
6786         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
6787         CP_OPERATOR_LEN.
6788
6789 2017-07-17  Pedro Alves  <palves@redhat.com>
6790
6791         * cli/cli-cmds.c (complete_command): Use a completion tracker
6792         along with completion_find_completion_word for handle_brkchars
6793         phase.
6794         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
6795         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
6796         (struct gdb_rl_completion_word_info): New.
6797         (gdb_rl_find_completion_word): New.
6798         (completion_find_completion_word): New.
6799         * completer.h (completion_find_completion_word): Declare.
6800
6801 2017-07-17  Pedro Alves  <palves@redhat.com>
6802
6803         * ada-lang.c (symbol_completion_match): Adjust comments.
6804         (symbol_completion_add): Replace vector parameter with
6805         completion_tracker parameter.  Use it.
6806         (ada_make_symbol_completion_list): Rename to...
6807         (ada_collect_symbol_completion_matches): ... this.  Add
6808         completion_tracker parameter and use it.
6809         (ada_language_defn): Adjust.
6810         * break-catch-syscall.c (catch_syscall_completer): Adjust
6811         prototype and work with completion_tracker instead of VEC.
6812         * breakpoint.c (condition_completer): Adjust prototype and work
6813         with completion_tracker instead of VEC.
6814         * c-lang.c (c_language_defn, cplus_language_defn)
6815         (asm_language_defn, minimal_language_defn): Adjust to renames.
6816         * cli/cli-cmds.c (complete_command): Rework using
6817         completion_tracker.  Catch exceptions when completing.
6818         * cli/cli-decode.c (integer_unlimited_completer)
6819         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
6820         with completion_tracker instead of VEC.
6821         * command.h (struct completion_tracker): Forward declare.
6822         (completer_ftype, completer_handle_brkchars_ftype): Change
6823         types.
6824         (complete_on_cmdlist, complete_on_enum): Adjust.
6825         * completer.c: Include <algorithm>.
6826         (struct gdb_completer_state): New.
6827         (current_completion): New global.
6828         (readline_line_completion_function): Delete.
6829         (noop_completer, filename_completer)
6830         (filename_completer_handle_brkchars, complete_files_symbols)
6831         (linespec_location_completer): Adjust to work with a
6832         completion_tracker instead of a VEC.
6833         (string_or_empty): New.
6834         (collect_explicit_location_matches): Adjust to work with a
6835         completion_tracker instead of a VEC.
6836         (explicit_location_completer): Rename to ...
6837         (complete_explicit_location): ... this and adjust to work with a
6838         completion_tracker instead of a VEC.
6839         (location_completer): Adjust to work with a completion_tracker
6840         instead of a VEC.
6841         (add_struct_fields): Adjust to work with a completion_list instead
6842         of VEC.
6843         (expression_completer): Rename to ...
6844         (complete_expression): ... this and adjust to work with a
6845         completion_tracker instead of a VEC.  Use complete_files_symbols.
6846         (expression_completer): Reimplement on top of complete_expression.
6847         (symbol_completer): Adjust to work with a completion_tracker
6848         instead of a VEC.
6849         (enum complete_line_internal_reason): Add describing comments.
6850         (complete_line_internal_normal_command): Adjust to work with a
6851         completion_tracker instead of a VEC.
6852         (complete_line_internal): Rename to ...
6853         (complete_line_internal_1): ... this and adjust to work with a
6854         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
6855         handle_brkchars phase.
6856         (new_completion_tracker): Delete.
6857         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
6858         complete_line_internal_1.
6859         (free_completion_tracker): Delete.
6860         (INITIAL_COMPLETION_HTAB_SIZE): New.
6861         (completion_tracker::completion_tracker)
6862         (completion_tracker::~completion_tracker): New.
6863         (maybe_add_completion): Delete.
6864         (completion_tracker::maybe_add_completion)
6865         (completion_tracker::add_completion)
6866         (completion_tracker::add_completions): New.
6867         (throw_max_completions_reached_error): Delete.
6868         (complete_line): Adjust to work with a completion_tracker instead
6869         of a VEC.  Don't create a completion_tracker_t or check for max
6870         completions here.
6871         (command_completer, command_completer_handle_brkchars)
6872         (signal_completer, reg_or_group_completer_1)
6873         (reg_or_group_completer, default_completer_handle_brkchars):
6874         Adjust to work with a completion_tracker.
6875         (gdb_completion_word_break_characters_throw): New.
6876         (gdb_completion_word_break_characters): Reimplement.
6877         (line_completion_function): Delete.
6878         (completion_tracker::recompute_lowest_common_denominator)
6879         (expand_preserving_ws)
6880         (completion_tracker::build_completion_result)
6881         (completion_result::completion_result)
6882         (completion_result::completion_result)
6883         (completion_result::~completion_result)
6884         (completion_result::completion_result)
6885         (completion_result::release_match_list, compare_cstrings)
6886         (completion_result::sort_match_list)
6887         (completion_result::reset_match_list)
6888         (gdb_rl_attempted_completion_function_throw)
6889         (gdb_rl_attempted_completion_function): New.
6890         * completer.h (completion_list, struct completion_result)
6891         (class completion_tracker): New.
6892         (complete_line): Add completion_tracker parameter.
6893         (readline_line_completion_function): Delete.
6894         (gdb_rl_attempted_completion_function): New.
6895         (noop_completer, filename_completer, expression_completer)
6896         (location_completer, symbol_completer, command_completer)
6897         (signal_completer, reg_or_group_completer): Update prototypes.
6898         (completion_tracker_t, new_completion_tracker)
6899         (make_cleanup_free_completion_tracker): Delete.
6900         (enum maybe_add_completion_enum): Delete.
6901         (maybe_add_completion): Delete.
6902         (throw_max_completions_reached_error): Delete.
6903         * corefile.c (complete_set_gnutarget): Adjust to work with a
6904         completion_tracker instead of a VEC.
6905         * cp-abi.c (cp_abi_completer): Adjust to work with a
6906         completion_tracker instead of a VEC.
6907         * d-lang.c (d_language_defn): Adjust.
6908         * disasm.c (disassembler_options_completer): Adjust to work with a
6909         completion_tracker instead of a VEC.
6910         * f-lang.c (f_make_symbol_completion_list): Rename to ...
6911         (f_collect_symbol_completion_matches): ... this.  Adjust to work
6912         with a completion_tracker instead of a VEC.
6913         (f_language_defn): Adjust.
6914         * go-lang.c (go_language_defn): Adjust.
6915         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
6916         Adjust to work with a completion_tracker instead of a VEC.
6917         * infrun.c (handle_completer): Likewise.
6918         * interps.c (interpreter_completer): Likewise.
6919         * interps.h (interpreter_completer): Likewise.
6920         * language.c (unknown_language_defn, auto_language_defn)
6921         (local_language_defn): Adjust.
6922         * language.h (language_defn::la_make_symbol_completion_list):
6923         Rename to ...
6924         (language_defn::la_collect_symbol_completion_matches): ... this
6925         and adjust to work with a completion_tracker instead of a VEC.
6926         * m2-lang.c (m2_language_defn): Adjust.
6927         * objc-lang.c (objc_language_defn): Adjust.
6928         * opencl-lang.c (opencl_language_defn): Adjust.
6929         * p-lang.c (pascal_language_defn): Adjust.
6930         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
6931         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
6932         with a completion_tracker.
6933         * rust-lang.c (rust_language_defn): Adjust.
6934         * symtab.c (free_completion_list, do_free_completion_list)
6935         (return_val, completion_tracker): Delete.
6936         (completion_list_add_name, completion_list_add_symbol)
6937         (completion_list_add_msymbol, completion_list_objc_symbol)
6938         (completion_list_add_fields, add_symtab_completions): Add
6939         completion_tracker parameter and use it.
6940         (default_make_symbol_completion_list_break_on_1): Rename to...
6941         (default_collect_symbol_completion_matches_break_on): ... this.
6942         Add completion_tracker parameter and use it instead of allocating
6943         a completion tracker here.
6944         (default_make_symbol_completion_list_break_on): Delete old
6945         implementation.
6946         (default_make_symbol_completion_list): Delete.
6947         (default_collect_symbol_completion_matches): New.
6948         (make_symbol_completion_list): Delete.
6949         (collect_symbol_completion_matches): New.
6950         (make_symbol_completion_type): Rename to ...
6951         (collect_symbol_completion_matches_type): ... this.  Add
6952         completion_tracker parameter and use it instead of VEC.
6953         (make_file_symbol_completion_list_1): Rename to...
6954         (collect_file_symbol_completion_matches): ... this.  Add
6955         completion_tracker parameter and use it instead of VEC.
6956         (make_file_symbol_completion_list): Delete.
6957         (add_filename_to_list): Use completion_list instead of a VEC.
6958         (add_partial_filename_data::list): Now a completion_list.
6959         (make_source_files_completion_list): Work with a completion_list
6960         instead of a VEC.
6961         * symtab.h: Include "completer.h".
6962         (default_make_symbol_completion_list_break_on)
6963         (default_make_symbol_completion_list, make_symbol_completion_list)
6964         (make_symbol_completion_type, make_file_symbol_completion_list)
6965         (make_source_files_completion_list): Delete.
6966         (default_collect_symbol_completion_matches_break_on)
6967         (default_collect_symbol_completion_matches)
6968         (collect_symbol_completion_matches)
6969         (collect_symbol_completion_matches_type)
6970         (collect_file_symbol_completion_matches)
6971         (make_source_files_completion_list): New.
6972         * top.c (init_main): Don't install a rl_completion_entry_function
6973         hook.  Install a rl_attempted_completion_function hook instead.
6974         * tui/tui-layout.c (layout_completer): Adjust to work with a
6975         completion_tracker.
6976         * tui/tui-regs.c (tui_reggroup_completer):
6977         * tui/tui-win.c (window_name_completer, focus_completer)
6978         (winheight_completer): Adjust to work with a completion_tracker.
6979         * value.c: Include "completer.h".
6980         (complete_internalvar): Adjust to work with a completion_tracker.
6981         * value.h (complete_internalvar): Likewise.
6982
6983 2017-07-17  Pedro Alves  <palves@redhat.com>
6984
6985         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
6986         renames.
6987         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
6988         comments to completer_ftype's declaration.
6989         <completer_handle_brkchars>: Change type to
6990         completer_handle_brkchars_ftype.
6991         * command.h (completer_ftype): Add describing comment and give
6992         names to parameters.
6993         (completer_ftype_void): Rename to ...
6994         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
6995         (set_cmd_completer_handle_brkchars): Adjust.
6996         * completer.c (filename_completer_handle_brkchars): New function.
6997         (complete_line_internal_normal_command): New function, factored
6998         out from ...
6999         (complete_line_internal): ... here.
7000         (command_completer_handle_brkchars)
7001         (default_completer_handle_brkchars)
7002         (completer_handle_brkchars_func_for_completer): New functions.
7003         * completer.h (set_gdb_completion_word_break_characters): Delete
7004         declaration.
7005         (completer_handle_brkchars_func_for_completer): New declaration.
7006         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
7007         completer_handle_brkchars_func_for_completer.
7008
7009 2017-07-17  Pedro Alves  <palves@redhat.com>
7010
7011         * completer.c (symbol_completer): New function, based on
7012         make_symbol_completion_list_fn.
7013         * completer.h (symbol_completer): New declaration.
7014         * guile/scm-cmd.c (cmdscm_completers): Adjust.
7015         * python/py-cmd.c (completers): Adjust.
7016         * symtab.c (make_symbol_completion_list_fn): Delete.
7017         * symtab.h (make_symbol_completion_list_fn): Delete.
7018         * cli/cli-decode.c (add_cmd): Adjust.
7019
7020 2017-07-17  Pedro Alves  <palves@redhat.com>
7021
7022         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
7023         * dwarf2read.c: Include "filename-seen-cache.h".
7024         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
7025         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
7026         * filename-seen-cache.c: New file.
7027         * filename-seen-cache.h: New file.
7028         * symtab.c: Include "filename-seen-cache.h".
7029         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
7030         (create_filename_seen_cache, clear_filename_seen_cache)
7031         (delete_filename_seen_cache, filename_seen): Delete, parts moved
7032         to filename-seen-cache.h/filename-seen-cache.c.
7033         (output_source_filename, sources_info)
7034         (maybe_add_partial_symtab_filename)
7035         (make_source_files_completion_list): Adjust to use
7036         filename_seen_cache.
7037
7038 2017-07-17  Pedro Alves  <palves@redhat.com>
7039
7040         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
7041         fields.
7042         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
7043         dwarf2_debug_sections*)): New.
7044         (dwarf2_per_objfile::dwarf2_per_objfile(const
7045         dwarf2_per_objfile&)): Declare as deleted.
7046         (dwarf2_per_objfile::operator=): Declare as deleted.
7047         (dwarf2_per_objfile::dwarf2_per_objfile)
7048         (dwarf2_per_objfile::~dwarf2_per_objfile)
7049         (dwarf2_per_objfile::free_cached_comp_units): New.
7050         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
7051         ctor.  Call dwarf2_per_objfile's ctor manually.
7052         (dwarf2_locate_sections): Deleted/refactored as ...
7053         (dwarf2_per_objfile::locate_sections): ... this new method.
7054         (free_cached_comp_units): Defer to
7055         dwarf2_per_objfile::free_cached_comp_units.
7056         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
7057
7058 2017-07-14  Tom Tromey  <tom@tromey.com>
7059
7060         PR rust/21764:
7061         * rust-exp.y (convert_ast_to_expression): Add "want_type"
7062         parameter.
7063         <UNOP_SIZEOF>: Split into separate case.
7064         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
7065
7066 2017-07-14  Tom Tromey  <tom@tromey.com>
7067
7068         PR rust/21763:
7069         * symtab.c (symbol_matches_domain): Add language_rust to special
7070         case.
7071         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
7072         treat LOC_TYPEDEF symbols as variables.
7073
7074 2017-07-14  Pedro Alves  <palves@redhat.com>
7075
7076         * symtab.c (make_file_symbol_completion_list_1): Iterate over
7077         symtabs matching all symtabs with SRCFILE as file name instead of
7078         only considering the first hit, with lookup_symtab.
7079
7080 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7081
7082         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
7083         operator_name parameters.
7084         (gen_expr): Update function call.
7085
7086 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7087
7088         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
7089         parameter.
7090         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
7091         Likewise.
7092         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
7093         parameter, use agent_expr::gdbarch instead, update function
7094         calls.
7095         (locexpr_tracepoint_var_ref): Likewise.
7096         (loclist_tracepoint_var_ref): Likewise.
7097         * ax-gdb.c (gen_trace_static_fields): Likewise.
7098         (gen_traced_pop): Likewise.
7099         (gen_frame_args_address): Likewise.
7100         (gen_frame_locals_address): Likewise.
7101         (gen_var_ref): Likewise.
7102         (gen_struct_ref_recursive): Likewise.
7103         (gen_static_field): Likewise.
7104         (gen_maybe_namespace_elt): Likewise.
7105         (gen_expr): Likewise.
7106         (gen_trace_for_var): Likewise.
7107         (gen_trace_for_expr): Likewise.
7108         (gen_trace_for_return_address): Likewise.
7109
7110 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7111
7112         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
7113         parameter.
7114         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
7115
7116 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7117
7118         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
7119         from ax, update calls.
7120         (gen_usual_arithmetic): Likewise.
7121         (gen_integral_promotions): Likewise.
7122         (gen_bitfield_ref): Likewise.
7123         (gen_primitive_field): Likewise.
7124         (gen_struct_ref_recursive): Likewise.
7125         (gen_struct_ref): Likewise.
7126         (gen_maybe_namespace_elt): Likewise.
7127         (gen_struct_elt_for_reference): Likewise.
7128         (gen_namespace_elt): Likewise.
7129         (gen_aggregate_elt_ref): Likewise.
7130         (gen_expr): Get gdbarch from ax, update calls.
7131         (gen_expr_binop_rest): Likewise.
7132
7133 2017-07-13  Pedro Alves  <palves@redhat.com>
7134
7135         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
7136         as default tdesc.
7137         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
7138         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
7139         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
7140         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
7141         tdep.
7142         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
7143         Get final tdesc from the tdep.
7144         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
7145         default tdesc.
7146         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7147         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7148         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
7149         Use it as default tdesc.
7150         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
7151         down to amd_init_abi.  No longer handle fallback tdesc here.
7152         * amd64-tdep.h (tdesc_x32): Declare.
7153         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
7154         parameter.
7155         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
7156         as default tdesc.
7157
7158 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7159
7160         * s390-linux-tdep.c (s390_process_record): Add support for
7161         instructions new in arch12.
7162
7163 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7164
7165         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
7166         PT_GETFSBASE and PT_GETGSBASE.
7167         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
7168         PT_SETGSBASE.
7169
7170 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7171
7172         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
7173         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
7174         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
7175         those rules.
7176         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
7177         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
7178         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
7179         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
7180         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
7181         * features/i386/amd64.xml: Add 64bit-segments.xml.
7182         * features/i386/amd64-avx-avx512.c: Regenerated.
7183         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
7184         * features/i386/amd64-avx-mpx.c: Regenerated.
7185         * features/i386/amd64-avx.c: Regenerated.
7186         * features/i386/amd64-mpx.c: Regenerated.
7187         * features/i386/amd64.c: Regenerated.
7188         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
7189         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7190         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
7191         * regformats/i386/amd64-avx.dat: Regenerated.
7192         * regformats/i386/amd64-mpx.dat: Regenerated.
7193         * regformats/i386/amd64.dat: Regenerated.
7194
7195 2017-07-10  Yao Qi  <yao.qi@linaro.org>
7196
7197         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7198         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7199
7200 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
7201
7202         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
7203         unsetenv.
7204         * gnulib/aclocal.m4: Regenerate.
7205         * gnulib/config.in: Regenerate.
7206         * gnulib/configure: Regenerate.
7207         * gnulib/import/Makefile.am: Regenerate.
7208         * gnulib/import/Makefile.in: Regenerate.
7209         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7210         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7211         * gnulib/import/m4/environ.m4: New file.
7212         * gnulib/import/m4/setenv.m4: New file.
7213         * gnulib/import/setenv.c: New file.
7214         * gnulib/import/unsetenv.c: New file.
7215
7216 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
7217
7218         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
7219         address when op is DW_OP_addr.
7220
7221 2017-07-09  Tom Tromey  <tom@tromey.com>
7222
7223         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
7224         check and apply to outer type.
7225
7226 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7227
7228         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
7229         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
7230         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
7231         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
7232
7233 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7234
7235         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
7236
7237 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7238
7239         * corelow.c (get_core_siginfo): Remove.
7240         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
7241         instead of get_core_siginfo.
7242         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
7243         * gdbarch.h: Re-generate.
7244         * gdbarch.c: Re-generate.
7245         * linux-tdep.c (linux_core_xfer_siginfo): New.
7246         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
7247
7248 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7249
7250         * corelow.c (thread_section_name): Move to ...
7251         * gdbcore.h (thread_section_name): ... here.
7252
7253 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7254
7255         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
7256         (struct siginfo32): New.
7257         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
7258         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
7259         via ptrace(PT_LWPINFO).
7260
7261 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7262
7263         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
7264         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
7265         (fbsd_get_siginfo_type): New.
7266         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
7267         (_initialize_fbsd_tdep): New.
7268
7269 2017-07-06  David Blaikie  <dblaikie@gmail.com>
7270
7271         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
7272         a singular dwo_unit*) to support multiple CUs in the same way that
7273         multiple TUs are supported.
7274         (create_cus_hash_table): Replace create_dwo_cu with a function for
7275         parsing multiple CUs from a DWO file.
7276         (open_and_init_dwo_file): Use create_cus_hash_table rather than
7277         create_dwo_cu.
7278         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
7279         htab_find, rather than comparing the signature to a singleton CU in
7280         the dwo_file.
7281
7282 2017-07-06  Pedro Alves  <palves@redhat.com>
7283
7284         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
7285
7286 2017-07-04  Pedro Alves  <palves@redhat.com>
7287
7288         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
7289         * gdbtypes.h (TYPE_STATIC): Delete.
7290         (struct fn_field) <is_public, is_abstract, is_static, is_final,
7291         is_synchronized, is_native>: Delete.
7292         <dummy>: Bump.
7293         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
7294         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
7295         (TYPE_FN_FIELD_ABSTRACT): Delete.
7296
7297 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
7298
7299         * buffer.h (buffer_finish): Fix spelling mistakes.
7300
7301 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
7302
7303         * .dir-locals.el: Automatically switch to C-style comments in
7304         versions of Emacs that support the feature.
7305
7306 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7307             Pedro Alves  <palves@redhat.com>
7308
7309         PR cli/21688
7310         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
7311         (process_next_line): New variable 'inline_cmd'.
7312         Adjust 'if' clauses for "python", "compile" and "guile" to use
7313         'command_name_equals' and check for '!inline_cmd'.
7314
7315 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7316
7317         PR cli/21688
7318         * cli/cli-script.c (command_name_equals_not_inline): New function.
7319         (process_next_line): Adjust 'if' clauses for "python", "compile"
7320         and "guile" to use command_name_equals_not_inline.
7321
7322 2017-06-29  Pedro Alves  <palves@redhat.com>
7323
7324         * completer.c (expression_completer): Call
7325         linespec_location_completer instead of location_completer.
7326
7327 2017-06-29  Pedro Alves  <palves@redhat.com>
7328
7329         * completer.c (expression_completer): Remove code that recomputes
7330         'text' from 'word'.
7331
7332 2017-06-29  Yao Qi  <yao.qi@linaro.org>
7333
7334         * regformats/regdat.sh: Generate code with
7335         "ifndef IN_PROCESS_AGENT".
7336
7337 2017-06-28  Pedro Alves  <palves@redhat.com>
7338
7339         * command.h: Include "common/scoped_restore.h".
7340
7341 2017-06-28  Yao Qi  <yao.qi@linaro.org>
7342
7343         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
7344         instead of obstack_grow.
7345
7346 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
7347
7348         PR gdb/21337
7349         * symfile.c (reread_symbols): Call objfiles_changed just before
7350         read_symbols.
7351
7352 2017-06-27  Pedro Alves  <palves@redhat.com>
7353
7354         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
7355         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
7356         (completion_list_add_symbol, completion_list_add_msymbol):
7357         ... these new functions.
7358         (add_symtab_completions)
7359         (default_make_symbol_completion_list_break_on_1): Adjust.
7360
7361 2017-06-27  Pedro Alves  <palves@redhat.com>
7362
7363         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
7364         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
7365         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
7366         dtor.
7367         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
7368         'storage_obstack' field an auto_obstack.  In-class initialize all
7369         non-bitfield fields.  Make minsyms_read bool.
7370         * symfile.c (read_symbols): Adjust.
7371
7372 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
7373
7374         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
7375         (gdbsim_store_register): Likewise.
7376
7377 2017-06-27  Pedro Alves  <palves@redhat.com>
7378
7379         * c-exp.y (name_obstack): Now an auto_obstack.
7380         (yylex): Use auto_obstack::clear.
7381         (c_parse): Use auto_obstack::clear instead of reinitializing and
7382         freeing the obstack.
7383         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
7384         * d-exp.y (name_obstack): Now an auto_obstack.
7385         (yylex): Use auto_obstack::clear.
7386         (d_parse): Use auto_obstack::clear instead of reinitializing and
7387         freeing the obstack.
7388         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
7389         auto_obstack.
7390         * dwarf2read.c (create_addrmap_from_index)
7391         (dwarf2_build_psymtabs_hard)
7392         (update_enumeration_type_from_children): Likewise.
7393         * gdb_obstack.h (auto_obstack): New type.
7394         * go-exp.y (name_obstack): Now an auto_obstack.
7395         (build_packaged_name): Use auto_obstack::clear.
7396         (go_parse): Use auto_obstack::clear instead of reinitializing and
7397         freeing the obstack.
7398         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
7399         auto_obstack.
7400         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
7401         * rust-exp.y (work_obstack): Now an auto_obstack.
7402         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
7403         reinitializing and freeing the obstack.
7404         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
7405         (host_char_to_target): Use auto_obstack.
7406         * utils.h (make_cleanup_obstack_free): Delete declaration.
7407         * valprint.c (generic_emit_char, generic_printstr): Use
7408         auto_obstack.
7409
7410 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7411
7412         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
7413         thread.
7414         (darwin_init_thread_list): Don't update dummy thread.
7415         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
7416
7417 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7418
7419         * record-full.c (netorder16): Remove.
7420
7421 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7422
7423         * common/diagnostics.h: Define macros for GCC.
7424         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
7425         * common/vec.h: Include diagnostics.h.
7426         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
7427         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
7428         warning.
7429
7430 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7431
7432         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
7433         New macro.
7434         * ada-lex.l: Ignore deprecated register warnings.
7435
7436 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7437
7438         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
7439         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
7440
7441 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7442
7443         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
7444         its own line.
7445
7446 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7447
7448         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
7449
7450 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
7451
7452         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
7453         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
7454         (xtensa_register_read_masked): Likewise.
7455
7456 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
7457
7458         * common/environ.c (gdb_environ::unset): Update comment.
7459
7460 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7461
7462         * python/py-unwind.c (pyuw_sniffer): Allocate space for
7463         registers.
7464
7465 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7466
7467         * record-full.c (record_full_exec_insn): Use byte_vector.
7468
7469 2017-06-22  Yao Qi  <yao.qi@linaro.org>
7470
7471         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
7472         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7473
7474 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7475
7476         * remote.c (cached_reg): Move from here...
7477         * regcache.h (cached_reg): ...to here.
7478         * python/py-unwind.c (struct reg_info): Remove.
7479         (cached_frame_info): Use cached_reg_t.
7480         (pyuw_prev_register): Likewise.
7481         (pyuw_sniffer): Use cached_reg_t and allocate registers.
7482         (pyuw_dealloc_cache): Free all registers.
7483
7484 2017-06-22  Pedro Alves  <palves@redhat.com>
7485             Simon Marchi  <simon.marchi@ericsson.com>
7486
7487         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
7488         warning.
7489         * common/diagnostics.h: New file.
7490
7491 2017-06-22  Pedro Alves  <palves@redhat.com>
7492
7493         * common/agent.h: Add include guards.
7494
7495 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
7496
7497         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
7498         talk about addressable units instead of bytes.
7499
7500 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
7501
7502         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
7503         of '::const_iterator'.
7504
7505 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
7506
7507         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7508         'unittests/environ-selftests.c'.
7509         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
7510         * charset.c (find_charset_names): Declare object 'iconv_env'.
7511         Update code to use 'iconv_env' object.  Remove call to
7512         'free_environ'.
7513         * common/environ.c: Include <utility>.
7514         (make_environ): Delete function.
7515         (free_environ): Delete function.
7516         (gdb_environ::clear): New function.
7517         (gdb_environ::operator=): New function.
7518         (gdb_environ::get): Likewise.
7519         (environ_vector): Delete function.
7520         (set_in_environ): Delete function.
7521         (gdb_environ::set): New function.
7522         (unset_in_environ): Delete function.
7523         (gdb_environ::unset): New function.
7524         (gdb_environ::envp): Likewise.
7525         * common/environ.h: Include <vector>.
7526         (struct gdb_environ): Delete; transform into...
7527         (class gdb_environ): ... this class.
7528         (free_environ): Delete prototype.
7529         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
7530         environ_vector): Likewise.
7531         * infcmd.c (run_command_1): Update code to call
7532         'envp' from 'gdb_environ' class.
7533         (environment_info): Update code to call methods from 'gdb_environ'
7534         class.
7535         (unset_environment_command): Likewise.
7536         (path_info): Likewise.
7537         (path_command): Likewise.
7538         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
7539         (inferior::inferior): Initialize 'environment' using the host's
7540         information.
7541         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
7542         Include "environ.h".
7543         (class inferior) <environment>: Change type from 'struct
7544         gdb_environ' to 'gdb_environ'.
7545         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
7546         methods from 'gdb_environ' class.
7547         * solib.c (solib_find_1): Likewise
7548         * unittests/environ-selftests.c: New file.
7549
7550 2017-06-20  Yao Qi  <yao.qi@linaro.org>
7551
7552         * features/i386/i386-linux.xml: Exchange the order of including
7553         32bit-linux.xml and 32bit-sse.xml.
7554         * features/i386/i386-linux.c: Regenerated.
7555
7556 2017-06-20  Yao Qi  <yao.qi@linaro.org>
7557
7558         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
7559         Delete copy ctor and assignment operator.
7560         (tdesc_type): Likewise.
7561         (tdesc_feature): Likewise.
7562         (tdesc_free_reg): Remove.
7563         (tdesc_create_reg): Use new.
7564         (tdesc_free_type): Remove.
7565         (tdesc_create_vector): Use new.
7566         (tdesc_create_union): Likewise.
7567         (tdesc_create_flags): Likewise.
7568         (tdesc_create_enum): Likewise.
7569         (tdesc_free_feature): Delete.
7570         (free_target_description): Use delete.
7571
7572 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
7573
7574         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
7575         registers.
7576
7577 2017-06-19  Pedro Alves  <palves@redhat.com>
7578
7579         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
7580         after gdb::unlinker.
7581
7582 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
7583
7584         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
7585         gdb_environ to access an environment variable.
7586
7587 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
7588
7589         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
7590         gdb_byte*.
7591
7592 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7593
7594         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
7595
7596 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7597
7598         * configure: Re-generate.
7599         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
7600
7601 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7602
7603         * configure: Re-generate.
7604         * warning.m4: Pass -Werror to compiler when checking for
7605         supported warning flags.
7606
7607 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7608
7609         * Makefile.in (COMPILE.pre): Add "-x c++".
7610
7611 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
7612             Pedro Alves  <palves@redhat.com>
7613             Yao Qi  <yao.qi@linaro.org>
7614
7615         * defs.h (RequireLongest): New.
7616         (extract_integer): Declare function template.
7617         (extract_signed_integer): Remove the declaration, but define it
7618         static inline.
7619         (extract_unsigned_integer): Likewise.
7620         (store_integer): Declare function template.
7621         (store_signed_integer): Remove the declaration, but define it
7622         static inline.
7623         (store_unsigned_integer): Likewise.
7624         * findvar.c (extract_integer): New function template.
7625         (extract_signed_integer): Remove.
7626         (extract_unsigned_integer): Remove.
7627         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
7628         instantiations.
7629         (store_integer): New function template.
7630         (store_signed_integer): Remove.
7631         (store_unsigned_integer): Remove.
7632         (store_integer): Explicit instantiations.
7633         * regcache.c (regcache_raw_read_signed): Update.
7634         (regcache::raw_read): New function.
7635         (regcache::raw_read_signed): Remove.
7636         (regcache::raw_read_unsigned): Remove.
7637         (regcache_raw_read_unsigned): Update.
7638         (regcache_raw_write_unsigned): Update.
7639         (regcache::raw_write_signed): Remove.
7640         (regcache::raw_write): New function.
7641         (regcache_cooked_read_signed): Update.
7642         (regcache::raw_write_unsigned): Remove.
7643         (regcache::cooked_read_signed): Remove.
7644         (regcache_cooked_read_unsigned): Update.
7645         (regcache::cooked_read_unsigned): Remove.
7646         (regcache_cooked_write_signed): Update.
7647         (regcache_cooked_write_unsigned): Update.
7648         * regcache.h (regcache) <raw_read_signed>: Remove.
7649         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
7650         <raw_read, raw_write>: New.
7651         <cooked_read_signed, cooked_write_signed>: Remove.
7652         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
7653         <cooked_read, cooked_write>: New.
7654         * sh64-tdep.c (sh64_pseudo_register_read): Update.
7655         (sh64_pseudo_register_write): Update.
7656
7657 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
7658
7659         * arc-tdep.c (arc_disassembler_options): New variable.
7660         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
7661         of default_print_insn.
7662         (arc_delayed_print_insn): Set info->section when needed,
7663         use default_print_insn to retrieve a disassembler.
7664
7665 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
7666
7667         PR gdb/21574
7668         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
7669         to mention $SHELL and startup-with-shell.
7670
7671 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
7672
7673         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
7674
7675 2017-06-14  Yao Qi  <yao.qi@linaro.org>
7676
7677         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
7678         default_print_insn instead of print_insn_aarch64.
7679         * arm-tdep.c (gdb_print_insn_arm): Call
7680         default_print_insn instead of print_insn_big_arm
7681         and print_insn_little_arm.
7682         * i386-tdep.c (i386_print_insn): Call default_print_insn
7683         instead of print_insn_i386.
7684         * ia64-tdep.c (ia64_print_insn): Call
7685         default_print_insn instead of print_insn_ia64.
7686         * mips-tdep.c (gdb_print_insn_mips): Call
7687         default_print_insn instead of print_insn_big_mips
7688         and print_insn_little_mips.
7689         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
7690         instead of print_insn_spu.
7691
7692 2017-06-14  Pedro Alves  <palves@redhat.com>
7693
7694         * ada-lang.c: Include "common/byte-vector.h".
7695         (ada_value_primitive_packed_val): Use gdb::byte_vector.
7696         * charset.c (wchar_iterator::iterate): Resize the vector instead
7697         of reserving it.
7698         * common/byte-vector.h: Include "common/def-vector.h".
7699         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
7700         * cli/cli-dump.c: Include "common/byte-vector.h".
7701         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
7702         * common/byte-vector.h: New file.
7703         * common/def-vector.h: New file.
7704         * common/default-init-alloc.h: New file.
7705         * dwarf2loc.c: Include "common/byte-vector.h".
7706         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
7707         instead of reserving it.
7708         * dwarf2read.c: Include "common/byte-vector.h".
7709         (data_buf::m_vec): Now a gdb::byte_vector.
7710         * gdb_regex.c: Include "common/def-vector.h".
7711         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
7712         * mi/mi-main.c: Include "common/byte-vector.h".
7713         (mi_cmd_data_read_memory): Use gdb::byte_vector.
7714         * printcmd.c: Include "common/byte-vector.h".
7715         (print_scalar_formatted): Use gdb::byte_vector.
7716         * valprint.c: Include "common/byte-vector.h".
7717         (maybe_negate_by_bytes, print_decimal_chars): Use
7718         gdb::byte_vector.
7719
7720 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7721
7722         * darwin-nat.c: Include "nat/fork-inferior.h".
7723
7724 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7725
7726         * configure.nat: Factor out Darwin bits that are not
7727         architecture-specific.  Add fork-inferior.o.
7728
7729 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7730
7731         * configure.nat: Factor out AIX bits that are not
7732         architecture-specific.  Add fork-inferior.o.
7733
7734 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7735
7736         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
7737         (read_pieced_value, write_pieced_value): ...here.  Reduce to
7738         wrappers that just call rw_pieced_value.
7739
7740 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7741
7742         * dwarf2loc.c (write_pieced_value): When writing the data for a
7743         memory piece, use write_memory_with_notification instead of
7744         write_memory.
7745
7746 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7747
7748         * valops.c (read_value_memory): Change embedded_offset to
7749         represent a bit offset instead of a byte offset.
7750         * value.h (read_value_memory): Adjust comment.
7751
7752 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7753
7754         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
7755         dest_offset_bits and source_offset_bits.
7756         (write_pieced_value): Likewise.
7757
7758 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7759
7760         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
7761         given by DW_OP_bit_piece.
7762         (write_pieced_value): Likewise.
7763
7764 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7765
7766         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
7767         some other preparations to the places where sufficient information
7768         is available.
7769         (write_pieced_value): Likewise.
7770
7771 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7772
7773         * dwarf2loc.c (bits_to_bytes): New function.
7774         (read_pieced_value): Fix offset calculations for register pieces
7775         on big-endian targets.
7776         (write_pieced_value): Likewise.
7777
7778 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7779
7780         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
7781         (write_pieced_value): Likewise.
7782
7783 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7784
7785         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
7786         transfer the source value's least significant bits, instead of its
7787         lowest-addressed ones.  Rename type_len to max_offset.
7788         (read_pieced_value): Mirror above changes to write_pieced_value as
7789         applicable.
7790
7791 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7792
7793         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
7794         truncate full bytes from dest_offset_bits before using it as an
7795         offset into the buffer.
7796
7797 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7798
7799         * dwarf2loc.c (write_pieced_value): Include transfer size in
7800         byte-wise check.
7801
7802 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7803
7804         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
7805         calculation of this_size.
7806
7807 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7808
7809         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
7810         when targeting a bit-field.
7811         (write_pieced_value): Likewise.
7812
7813 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7814
7815         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
7816         (allocate_piece_closure): Drop addr_size parameter.
7817         (dwarf2_evaluate_loc_desc_full): Adjust call to
7818         allocate_piece_closure.
7819
7820 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7821
7822         PR gdb/21226
7823         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
7824         the LSB end, independent of endianness.
7825
7826 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7827
7828         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
7829         size capping.
7830
7831 2017-06-13  Yao Qi  <yao.qi@linaro.org>
7832
7833         * mips-linux-nat.c: Move include features/mips*-linux.c to
7834         mips-linux-tdep.c.
7835         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
7836         to mips-linux-tdep.c.
7837         * mips-linux-tdep.c: Include features/mips*-linux.c
7838         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
7839         functions.
7840         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
7841         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
7842         (tdesc_mips64_dsp_linux): Declare.
7843
7844 2017-06-12  Tom Tromey  <tom@tromey.com>
7845
7846         * valprint.h (val_print_type_code_int): Remove.
7847         * valprint.c (generic_val_print_int): Always call
7848         val_print_scalar_formatted.
7849         (val_print_type_code_int): Remove.
7850         * printcmd.c (print_scalar_formatted): Handle options->format==0.
7851         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
7852         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
7853         * ada-valprint.c (ada_val_print_num): Use
7854         val_print_scalar_formatted.
7855
7856 2017-06-12  Tom Tromey  <tom@tromey.com>
7857
7858         * printcmd.c (print_scalar_formatted): Unify the two switches.
7859         Don't convert scalars to LONGEST.
7860
7861 2017-06-12  Tom Tromey  <tom@tromey.com>
7862
7863         PR exp/16225:
7864         * valprint.h (print_decimal_chars): Update.
7865         * valprint.c (maybe_negate_by_bytes): New function.
7866         (print_decimal_chars): Add "is_signed" argument.
7867         * printcmd.c (print_scalar_formatted): Update.
7868
7869 2017-06-12  Tom Tromey  <tom@tromey.com>
7870
7871         PR exp/16225:
7872         * valprint.h (print_binary_chars, print_hex_chars): Update.
7873         * valprint.c (val_print_type_code_int): Update.
7874         (print_binary_chars): Add "zero_pad" argument.
7875         (emit_octal_digit): New function.
7876         (print_octal_chars): Don't zero-pad.
7877         (print_decimal_chars): Likewise.
7878         (print_hex_chars): Add "zero_pad" argument.
7879         * sh64-tdep.c (sh64_do_fp_register): Update.
7880         * regcache.c (regcache::dump): Update.
7881         * printcmd.c (print_scalar_formatted): Update.
7882         * infcmd.c (default_print_one_register_info): Update.
7883
7884 2017-06-12  Pedro Alves  <palves@redhat.com>
7885             Alan Hayward  <alan.hayward@arm.com>
7886
7887         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
7888         (mips_eabi_push_dummy_call): Rename local 'regsize' to
7889         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
7890         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
7891         Assert that abi_regsize bytes fit in 'ref_valbuf'.
7892
7893 2017-06-12  Pedro Alves  <palves@redhat.com>
7894
7895         * dwarf2read.c (mapped_symtab::data): Now a vector of
7896         symtab_index_entry instead of vector of
7897         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
7898         whether an element's name is NULL instead of checking whether the
7899         element itself is NULL.
7900         (find_slot): Change return type.  Adjust.
7901         (hash_expand, , add_index_entry, uniquify_cu_indices)
7902         (write_hash_table): Adjust.
7903
7904 2017-06-12  Pedro Alves  <palves@redhat.com>
7905
7906         * dwarf2read.c (recursively_count_psymbols): New function.
7907         (write_psymtabs_to_index): Call it to compute number of psyms and
7908         pass estimate size of psyms_seen to unordered_set's ctor.
7909
7910 2017-06-12  Pedro Alves  <palves@redhat.com>
7911
7912         * dwarf2read.c (write_hash_table): Check if key already exists
7913         before emplacing.
7914
7915 2017-06-12  Pedro Alves  <palves@redhat.com>
7916
7917         * dwarf2read.c (data_buf::append_space): Rename to...
7918         (data_buf::grow): ... this, and make private.  Adjust all callers.
7919         (data_buf::append_uint): New method.
7920         (add_address_entry, write_one_signatured_type)
7921         (write_psymtabs_to_index): Use it.
7922
7923 2017-06-12  Pedro Alves  <palves@redhat.com>
7924
7925         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
7926         (file_write (FILE *, const std::vector<Elem>&)): Delete.
7927         (data_buf::file_write): Call ::fwrite directly.
7928
7929 2017-06-12  Pedro Alves  <palves@redhat.com>
7930
7931         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
7932         std::vector::erase.
7933
7934 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
7935
7936         Code cleanup: C++ify .gdb_index producer.
7937         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
7938         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
7939         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
7940         (create_strtab, add_string): Remove.
7941         (file_write, data_buf): New.
7942         (struct symtab_index_entry): Use std::vector for cu_indices.
7943         (struct mapped_symtab): Use std::vector for data.
7944         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
7945         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
7946         Remove.
7947         (find_slot): Change return type.  Update it to the new data structures.
7948         (hash_expand, add_index_entry): Update it to the new data structures.
7949         (offset_type_compare): Remove.
7950         (uniquify_cu_indices): Update it to the new data structures.
7951         (c_str_view, c_str_view_hasher, vector_hasher): New.
7952         (add_indices_to_cpool): Remove.
7953         (write_hash_table): Update it to the new data structures.
7954         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
7955         (eq_psymtab_cu_index): Remove.
7956         (psym_index_map): New typedef.
7957         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
7958         reference and std::unordered_map for cu_index_htab.
7959         (add_address_entry, add_address_entry_worker, write_address_map)
7960         (write_psymbols): Update it to the new data structures.
7961         (write_obstack): Remove.
7962         (struct signatured_type_index_data): Change types_list to a data_buf
7963         reference and psyms_seen to a std::unordered_set reference.
7964         (write_one_signatured_type, recursively_write_psymbols)
7965         (write_psymtabs_to_index): Update it to the new data structures.
7966
7967 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
7968
7969         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
7970         separate-debug-file commands.
7971         * symfile.h (separate_debug_file_debug): New global.
7972         * symfile.c (separate_debug_file_debug): New global.
7973         (separate_debug_file_exists, find_separate_debug_file): Add
7974         debug output.
7975         (_initialize_symfile): Add "set debug separate-debug-file"
7976         command.
7977         * build-id.c (build_id_to_debug_bfd,
7978         find_separate_debug_file_by_buildid): Add debug output.
7979
7980 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
7981
7982         * gdbarch.sh (displaced_step_free_closure): Remove.
7983         * gdbarch.h, gdbarch.c: Re-generate.
7984         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
7985         displaced_step_free_closure.
7986         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
7987         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
7988         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7989         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
7990         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7991         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7992         * arch-utils.h (simple_displaced_step_free_closure): Remove.
7993         * arch-utils.c (simple_displaced_step_free_closure): Remove.
7994         * infrun.c (displaced_step_clear): Call xfree instead of
7995         gdbarch_displaced_step_free_closure.
7996
7997 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
7998
7999         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
8000         NULL".
8001
8002 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
8003
8004         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
8005         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
8006         (mn10300_push_dummy_call): Likewise.
8007
8008 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
8009
8010         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
8011
8012 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
8013
8014         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
8015
8016 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8017
8018         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
8019         able to start inferiors using a shell.
8020         (New remote packets): Announce new packet "QStartupWithShell".
8021         * remote.c: Add PACKET_QStartupWithShell.
8022         (extended_remote_create_inferior): Handle new
8023         PACKET_QStartupWithShell.
8024         (remote_protocol_features) <QStartupWithShell>: New entry for
8025         PACKET_QStartupWithShell.
8026         (_initialize_remote): Call "add_packet_config_cmd" for
8027         QStartupShell.
8028
8029 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8030             Pedro Alves  <palves@redhat.com>
8031
8032         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
8033         and "nat/fork-inferior.h".
8034         * common/common-inferior.h: New file, with contents from
8035         "gdb/inferior.h".
8036         * commom/common-utils.c: Include "common-utils.h".
8037         (stringify_argv): New function.
8038         * common/common-utils.h (stringify_argv): New prototype.
8039         * configure.nat: Add "fork-inferior.o" as a dependency for
8040         "*linux*", "fbsd*" and "nbsd*" hosts.
8041         * corefile.c (get_exec_file): Update comment.
8042         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
8043         instead of "startup_inferior".
8044         (darwin_create_inferior): Call "add_thread_silent" after
8045         "fork_inferior".
8046         * fork-child.c: Cleanup unnecessary includes.
8047         (SHELL_FILE): Move to "common/common-fork-child.c".
8048         (environ): Likewise.
8049         (exec_wrapper): Initialize.
8050         (get_exec_wrapper): New function.
8051         (breakup_args): Move to "common/common-fork-child.c"; rename to
8052         "breakup_args_for_exec".
8053         (escape_bang_in_quoted_argument): Move to
8054         "common/common-fork-child.c".
8055         (saved_ui): New variable.
8056         (prefork_hook): New function.
8057         (postfork_hook): Likewise.
8058         (postfork_child_hook): Likewise.
8059         (gdb_startup_inferior): Likewise.
8060         (fork_inferior): Move to "common/common-fork-child.c".  Update
8061         function to support gdbserver.
8062         (startup_inferior): Likewise.
8063         * gdbcore.h (get_exec_file): Remove declaration.
8064         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
8065         instead of "startup_inferior".  Call "add_thread_silent" after
8066         "fork_inferior".
8067         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
8068         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
8069         instead of "startup_inferior".  Call "add_thread_silent" after
8070         "fork_inferior".
8071         * inferior.h: Include "common-inferior.h".
8072         (trace_start_error): Move to "common/common-utils.h".
8073         (trace_start_error_with_name): Likewise.
8074         (fork_inferior): Move prototype to "nat/fork-inferior.h".
8075         (startup_inferior): Likewise.
8076         (gdb_startup_inferior): New prototype.
8077         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
8078         * nat/fork-inferior.h: New file.
8079         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
8080         instead of "startup_inferior".  Call "add_thread_silent" after
8081         "fork_inferior".
8082         * target.h (target_terminal_init): Move prototype to
8083         "target/target.h".
8084         (target_terminal_inferior): Likewise.
8085         (target_terminal_ours): Likewise.
8086         * target/target.h (target_terminal_init): New prototype, moved
8087         from "target.h".
8088         (target_terminal_inferior): Likewise.
8089         (target_terminal_ours): Likewise.
8090         * utils.c (gdb_flush_out_err): New function.
8091
8092 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8093
8094         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
8095         * common/common-gdbthread.h: New file, with parts from
8096         "gdb/gdbthread.h".
8097         * gdbthread.h: Include "common-gdbthread.h".
8098         (switch_to_thread): Moved to "common/common-gdbthread.h".
8099
8100 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8101
8102         * Makefile.in (SFILES): Add "common/job-control.c".
8103         (HFILES_NO_SRCDIR): Add "common/job-control.h".
8104         (COMMON_OBS): Add "job-control.o".
8105         * common/job-control.c: New file, with contents from
8106         "gdb/inflow.c".
8107         * common/job-control.h: New file, with contents from "terminal.h".
8108         * fork-child.c: Include "job-control.h".
8109         * inflow.c: Include "job-control.h".
8110         (gdb_setpgid): Move to "common/common-inflow.c".
8111         (_initialize_inflow): Move setting of "job_control" to
8112         "handle_job_control".
8113         * terminal.h (job_control): Moved to "common/common-terminal.h".
8114         (gdb_setpgid): Likewise.
8115         * top.c: Include "job_control.h".
8116         * utils.c: Likewise.
8117         (job_control): Moved to "job-control.c".
8118
8119 2017-06-07  Pedro Alves  <palves@redhat.com>
8120
8121         * Makefile.in (SFILES): Add gdb_regex.c.
8122         (COMMON_OBS): Add gdb_regex.o.
8123         * ada-lang.c (ada_add_standard_exceptions)
8124         (ada_add_exceptions_from_frame, name_matches_regex)
8125         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
8126         parameter type to compiled_regex.  Adjust.
8127         (ada_exceptions_list): Use compiled_regex.
8128         * break-catch-throw.c (exception_catchpoint::pattern): Now a
8129         std::unique_ptr<compiled_regex>.
8130         (exception_catchpoint::~exception_catchpoint): Remove regfree
8131         call.
8132         (check_status_exception_catchpoint): Adjust to use compiled_regex.
8133         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
8134         * breakpoint.c (solib_catchpoint::compiled): Now a
8135         std::unique_ptr<compiled_regex>.
8136         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
8137         (check_status_catch_solib): Adjust to use compiled_regex.
8138         (add_solib_catchpoint): Adjust to use compiled_regex.
8139         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
8140         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
8141         compiled_regex reference.  Adjust to use it.
8142         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
8143         declaration.  Include "gdb_regex.h".
8144         (apropos_cmd): Change regex parameter to compiled_regex reference.
8145         * gdb_regex.c: New file.
8146         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
8147         declarations.
8148         (class compiled_regex): New.
8149         * linux-tdep.c: Include "common/gdb_optional.h".
8150         (struct mapping_regexes): New, factored out from
8151         mapping_is_anonymous_p, and adjusted to use compiled_regex.
8152         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
8153         gdb::optional and remove cleanups.  Adjust to compiled_regex.
8154         * probe.c: Include "common/gdb_optional.h".
8155         (collect_probes): Use compiled_regex and gdb::optional and remove
8156         cleanups.
8157         * skip.c: Include "common/gdb_optional.h".
8158         (skiplist_entry::compiled_function_regexp): Now a
8159         gdb::optional<compiled_regex>.
8160         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
8161         (free_skiplist_entry): Remove regfree call.
8162         (compile_skip_regexp, skip_rfunction_p): Adjust to use
8163         compiled_regex and gdb::optional.
8164         * symtab.c: Include "common/gdb_optional.h".
8165         (search_symbols): Use compiled_regex and gdb::optional.
8166         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
8167         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
8168         to gdb_regex.c.
8169
8170 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8171
8172         * regcache.c (regcache::save): Avoid buffer use.
8173         (regcache::dump): Likewise.
8174
8175 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8176
8177         * sh-tdep.c (sh_pseudo_register_read): Remove
8178         MAX_REGISTER_SIZE.
8179         (sh_pseudo_register_write): Likewise.
8180         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
8181         (sh64_pseudo_register_write): Likewise
8182
8183 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8184
8185         * aarch64-tdep.c (aarch64_store_return_value): Use
8186         V_REGISTER_SIZE.
8187         (aarch64_pseudo_read_value): Likewise.
8188         (aarch64_pseudo_write): Likewise.
8189
8190 2017-06-06  Yao Qi  <yao.qi@linaro.org>
8191
8192         * regformats/regdef.h (set_register_cache): Remove the
8193         declaration.
8194
8195 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
8196
8197         * frame.c (frame_unwind_register_signed): Use
8198         frame_unwind_register_value.
8199
8200 2017-06-06  Pedro Alves  <palves@redhat.com>
8201
8202         PR breakpoints/21553
8203         * breakpoint.c (create_breakpoints_sal_default)
8204         (init_breakpoint_sal, create_breakpoint_sal): Use
8205         gdb::unique_xmalloc_ptr for string parameters.
8206         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8207         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
8208         (base_breakpoint_create_breakpoints_sal)
8209         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
8210         (strace_marker_create_breakpoints_sal)
8211         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
8212         string parameters.
8213         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
8214         gdb::unique_xmalloc_ptr for string parameters.
8215         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8216         parameters.
8217
8218 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8219
8220         * alpha-tdep.c (alpha_register_to_value): Use
8221         get_frame_register_value.
8222         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
8223
8224 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8225
8226         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
8227         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
8228         (ia64_value_to_register): Likewise.
8229         (ia64_extract_return_value): Likewise.
8230         (ia64_store_return_value): Likewise.
8231         (ia64_push_dummy_call): Likewise.
8232
8233 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
8234
8235         GDB 8.0 released.
8236
8237 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
8238
8239         * x86-linux-nat.c (struct arch_lwp_info): Remove.
8240
8241 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
8242
8243         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
8244         parameter.
8245         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
8246
8247 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
8248
8249         * event-loop.c (poll_timers): Unallocate timer using delete
8250         instead of xfree.
8251
8252 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8253
8254         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
8255         (struct breakpoint) <~breakpoint>: New.
8256         (struct watchpoint): Inherit from breakpoint.
8257         <~watchpoint>: New.
8258         <base>: Remove.
8259         (struct tracepoint): Inherit from breakpoint.
8260         <base>: Remove.
8261         * breakpoint.c (longjmp_breakpoint_ops): Remove.
8262         (struct longjmp_breakpoint): Inherit from breakpoint.
8263         <~longjmp_breakpoint>: New.
8264         <base>: Remove.
8265         (new_breakpoint_from_type): Remove casts.
8266         (watchpoint_in_thread_scope): Remove reference to base field.
8267         (watchpoint_del_at_next_stop): Likewise.
8268         (update_watchpoint): Likewise.
8269         (watchpoint_check): Likewise.
8270         (bpstat_check_watchpoint): Likewise.
8271         (set_longjmp_breakpoint): Likewise.
8272         (struct fork_catchpoint): Inherit from breakpoint.
8273         <base>: Remove.
8274         (struct solib_catchpoint): Inherit from breakpoint.
8275         <~solib_catchpoint>: New.
8276         <base>: Remove.
8277         (dtor_catch_solib): Change to ...
8278         (solib_catchpoint::~solib_catchpoint): ... this.
8279         (breakpoint_hit_catch_solib): Remove reference to base field.
8280         (add_solib_catchpoint): Likewise.
8281         (create_fork_vfork_event_catchpoint): Likewise.
8282         (struct exec_catchpoint): Inherit from breakpoint.
8283         <~exec_catchpoint>: New.
8284         <base>: Remove.
8285         (dtor_catch_exec): Change to ...
8286         (exec_catchpoint::~exec_catchpoint): ... this.
8287         (dtor_watchpoint): Change to ...
8288         (watchpoint::~watchpoint): ... this.
8289         (watch_command_1): Remove reference to base field.
8290         (catch_exec_command_1): Likewise.
8291         (base_breakpoint_dtor): Change to ...
8292         (breakpoint::~breakpoint): ... this.
8293         (base_breakpoint_ops): Remove dtor field value.
8294         (longjmp_bkpt_dtor): Change to ...
8295         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
8296         (strace_marker_create_breakpoints_sal): Remove reference to base
8297         field.
8298         (delete_breakpoint): Don't manually call breakpoint destructor.
8299         (create_tracepoint_from_upload): Remove reference to base field.
8300         (trace_pass_set_count): Likewise.
8301         (initialize_breakpoint_ops): Don't initialize
8302         momentary_breakpoint_ops, don't set dtors.
8303         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
8304         <~ada_catchpoint>: New.
8305         <base>: Remove.
8306         (create_excep_cond_exprs): Remove reference to base field.
8307         (dtor_exception): Change to ...
8308         (ada_catchpoint::~ada_catchpoint): ... this.
8309         (dtor_catch_exception): Remove.
8310         (dtor_catch_exception_unhandled): Remove.
8311         (dtor_catch_assert): Remove.
8312         (create_ada_exception_catchpoint): Remove reference to base
8313         field.
8314         (initialize_ada_catchpoint_ops): Don't set dtors.
8315         * break-catch-sig.c (struct signal_catchpoint): Inherit from
8316         breakpoint.
8317         <~signal_catchpoint>: New.
8318         <base>: Remove.
8319         (signal_catchpoint_dtor): Change to ...
8320         (signal_catchpoint::~signal_catchpoint): ... this.
8321         (create_signal_catchpoint): Remove reference to base field.
8322         (initialize_signal_catchpoint_ops): Don't set dtor.
8323         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
8324         from breakpoint.
8325         <~syscall_catchpoint>: New.
8326         <base>: Remove.
8327         (dtor_catch_syscall): Change to ...
8328         (syscall_catchpoint::~syscall_catchpoint): ... this.
8329         (create_syscall_event_catchpoint): Remove reference to base
8330         field.
8331         (initialize_syscall_catchpoint_ops): Don't set dtor.
8332         * break-catch-throw.c (struct exception_catchpoint): Inherit
8333         from breakpoint.
8334         <~exception_catchpoint>: New.
8335         <base>: Remove.
8336         (dtor_exception_catchpoint): Change to ...
8337         (exception_catchpoint::~exception_catchpoint): ... this.
8338         (handle_gnu_v3_exceptions): Remove reference to base field.
8339         (initialize_throw_catchpoint_ops): Don't set dtor.
8340         * ctf.c (ctf_get_traceframe_address): Remove reference to base
8341         field.
8342         * remote.c (remote_get_tracepoint_status): Likewise.
8343         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
8344         * tracefile.c (tracefile_fetch_registers): Likewise.
8345         * tracepoint.c (actions_command): Likewise.
8346         (validate_actionline): Likewise.
8347         (tfind_1): Likewise.
8348         (get_traceframe_location): Likewise.
8349         (find_matching_tracepoint_location): Likewise.
8350         (parse_tracepoint_status): Likewise.
8351         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
8352
8353 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8354
8355         * breakpoint.c (struct longjmp_breakpoint): New struct.
8356         (is_tracepoint_type): Change return type to bool.
8357         (is_longjmp_type): New function.
8358         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
8359         (set_raw_breakpoint_without_location): Use
8360         new_breakpoint_from_type.
8361         (set_raw_breakpoint): Likewise.
8362
8363 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8364
8365         * breakpoint.c (new_breakpoint_from_type): New function.
8366         (create_breakpoint_sal): Use new_breakpoint_from_type and
8367         unique_ptr.
8368         (create_breakpoint): Likewise.
8369
8370 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
8371
8372         * memattr.c (mem_info_command): Rename to ...
8373         (info_mem_command): ... this.
8374         (mem_enable_command): Rename to ...
8375         (enable_mem_command): ... this.
8376         (mem_disable_command): Rename to ...
8377         (disable_mem_command): ... this.
8378         (mem_delete_command): Rename to ...
8379         (delete_mem_command): ... this.
8380         (_initialize_mem): Adjust function names.
8381
8382 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8383
8384         * btrace.c (handle_pt_insn_events): New.
8385         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
8386         STATUS.  Split into this and ...
8387         (handle_pt_insn_event_flags): ... this.
8388
8389 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8390
8391         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
8392         and struct pt_insn.resynced.
8393         * configure: Regenerated.
8394         * config.in: Regenerated.
8395
8396 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8397
8398         * btrace.c (ftrace_find_call_by_number): New function.
8399         (ftrace_new_function): Store objects, not pointers.
8400         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
8401         ftrace_new_gap, ftrace_update_function,
8402         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
8403         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
8404         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
8405         btrace_ends_with_single_insn, btrace_call_get): Account for
8406         btrace_thread_info::functions now storing objects.
8407         * btrace.h (struct btrace_thread_info): Add constructor.
8408         (struct btrace_thread_info) <functions>: Make std::vector.
8409         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
8410         Initialize with default values.
8411         * record-btrace.c (record_btrace_frame_sniffer): Account for
8412         btrace_thread_info::functions now storing objects.
8413
8414 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8415
8416         * btrace.c: Remove typedef bfun_s.
8417         (ftrace_new_gap): Directly add gaps to the list of gaps.
8418         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
8419         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
8420         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
8421         instead of gdb VEC.
8422
8423 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8424
8425         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
8426         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
8427         with btrace_thread_info::next_segment and
8428         btrace_thread_info::prev_segment.
8429         * btrace.h: Remove struct btrace_func_link.
8430         (struct btrace_function): Replace pair of function segment pointers
8431         with pair of indices.
8432         * python/py-record-btrace.c (btpy_call_prev_sibling,
8433         btpy_call_next_sibling): Replace references to
8434         btrace_thread_info::segment with btrace_thread_info::next_segment and
8435         btrace_thread_info::prev_segment.
8436         * record-btrace.c (record_btrace_frame_this_id): Use
8437         btrace_find_call_by_number.
8438
8439 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8440
8441         * btrace.c (ftrace_new_function, ftrace_fixup_level,
8442         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
8443         btrace_insn_next, btrace_insn_prev): Remove references to
8444         btrace_thread_info::flow.
8445         * btrace.h (struct btrace_function): Remove FLOW.
8446
8447 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8448
8449         * btrace.c (ftrace_find_call_by_number): New function.
8450         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
8451         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
8452         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
8453         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
8454         index.
8455         * btrace.h (struct btrace_function): Turn UP into an index.
8456         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
8457         as an index.
8458         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
8459         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
8460         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
8461
8462 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8463
8464         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8465         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8466         ftrace_update_function, ftrace_compute_global_level_offset,
8467         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
8468         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
8469         btrace_insn_end, btrace_is_empty): Remove references to
8470         btrace_thread_info::begin and btrace_thread_info::end.
8471         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
8472         (struct btrace_thread_info) <functions>: Adjust comment.
8473         * record-btrace.c (record_btrace_start_replaying): Remove reference to
8474         btrace_thread_info::begin.
8475
8476 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8477
8478         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8479         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8480         ftrace_update_function): Remove arguments that implicitly were always
8481         BTINFO->END.
8482         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
8483         Don't pass BTINFO->END.
8484
8485 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8486
8487         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
8488         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
8489         btrace_find_insn_by_number): Replace function segment pointer with
8490         index.
8491         (btrace_insn_cmp): Simplify.
8492         * btrace.h: (struct btrace_insn_iterator) Rename index to
8493         insn_index.  Replace function segment pointer with index into function
8494         segment vector.
8495         * record-btrace.c (record_btrace_call_history): Replace function
8496         segment pointer use with index.
8497         (record_btrace_frame_sniffer): Retrieve function call segment through
8498         vector.
8499         (record_btrace_set_replay): Remove defunc't safety check.
8500
8501 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8502
8503         * btrace.c (btrace_ends_with_single_insn): New function.
8504         (btrace_call_get, btrace_call_number, btrace_call_begin,
8505         btrace_call_end, btrace_call_next, btrace_call_prev,
8506         btrace_find_call_by_number): Use index into call segment vector
8507         instead of pointer.
8508         (btrace_call_cmp): Simplify.
8509         * btrace.h (struct btrace_call_iterator): Replace function call segment
8510         pointer with index into vector.
8511         * record-btrace.c (record_btrace_call_history): Use index instead of
8512         pointer.
8513
8514 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8515
8516         * btrace.c (btrace_insn_begin, btrace_insn_end,
8517         btrace_find_insn_by_number): Add btinfo to iterator.
8518         * btrace.h (struct btrace_insn_iterator): Add btinfo.
8519
8520 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8521
8522         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
8523         and save pointers directly.
8524         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
8525         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
8526         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
8527         changed signature of functions.
8528         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
8529         (btrace_fetch): Remove code that adds btrace_function pointers to
8530         vector of btrace_functions.
8531         (btrace_clear): Simplify freeing vector of btrace_functions.
8532
8533 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8534
8535         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
8536         Replace VEC_* with std::vector functions.
8537         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
8538         (struct btrace_thread_info)<functions>: Change type to std::vector.
8539
8540 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8541
8542         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
8543         "Removed targets and native configurations" up.  Merge duplicate
8544         "New commands" sub-sections.  Add "New options" sub-sections.
8545
8546 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
8547
8548         * defs.h (copy_integer_to_size): New declaration.
8549         * findvar.c (copy_integer_to_size): New function.
8550         (do_cint_test): New selftest function.
8551         (copy_integer_to_size_test): Likewise.
8552         (_initialize_findvar): Likewise.
8553         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
8554         (mips_fbsd_collect_reg): Use raw_collect_integer.
8555         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
8556         (mips64_fill_gregset): Use raw_collect_integer
8557         (mips64_fill_fpregset): Use raw_supply_integer.
8558         * regcache.c (regcache::raw_supply_integer): New function.
8559         (regcache::raw_collect_integer): Likewise.
8560         * regcache.h: (regcache::raw_supply_integer): New declaration.
8561         (regcache::raw_collect_integer): Likewise.
8562
8563 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8564
8565         * Makefile.in (SFILES): Add gdbarch-selftests.c.
8566         (COMMON_OBS): Add gdbarch-selftests.o.
8567         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
8568         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
8569         * gdbarch-selftests.c: New file.
8570         * regcache.h (regcache) <~regcache>: Mark it virtual if
8571         GDB_SELF_TEST.
8572         <raw_write>: Likewise.
8573
8574 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8575
8576         * regcache.c (current_regcache): Change it to
8577         regcache::current_regcache.
8578         (regcache_observer_target_changed): Update.
8579         (regcache_thread_ptid_changed): Make it a regcache static
8580         method.
8581         (regcache_thread_ptid_changed): Update.
8582         (class regcache_access): New.
8583         (current_regcache_test): Update.
8584         (_initialize_regcache): Update.
8585         * regcache.h: Include forward_list.
8586         (regcache): Declare regcache_thread_ptid_changed and declare
8587         registers_changed_ptid as friend.
8588
8589 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8590
8591         * i387-tdep.c (i387_register_to_value): Use register_size
8592         instead of TYPE_LENGTH.
8593         * m68k-tdep.c (m68k_register_to_value): Likewise.
8594
8595 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8596
8597         * i387-tdep.c (i387_convert_register_p): Return false if type
8598         code isn't TYPE_CODE_FLT.
8599
8600 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8601
8602         * alpha-tdep.c (alpha_convert_register_p): Return true if type
8603         length is 4.
8604         (alpha_register_to_value): Remove type length check.
8605         (alpha_value_to_register): Likewise.
8606
8607 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8608
8609         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
8610         TYPE_CODE_FLT.
8611
8612 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8613
8614         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
8615         TYPE_CODE_FLT or not.
8616
8617 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8618
8619         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
8620         * avr-tdep.c (avr_gdbarch_init): Likewise.
8621         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8622         * cris-tdep.c (cris_gdbarch_init): Likewise.
8623         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8624         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8625         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8626         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
8627         * mep-tdep.c (mep_gdbarch_init): Likewise.
8628         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8629         * mips-tdep.c (mips_gdbarch_init): Likewise.
8630         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8631         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8632         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8633         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8634         * v850-tdep.c (v850_gdbarch_init): Likewise.
8635
8636 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8637
8638         * selftest-arch.c (tests_with_arch): Call registers_changed
8639         and reinit_frame_cache.
8640         * selftest.c (run_self_tests): Likewise.
8641
8642 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8643
8644         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
8645         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
8646
8647 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8648
8649         * rl78-tdep.c (rl78_gdbarch_init): Don't call
8650         set_gdbarch_print_insn.
8651
8652 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8653
8654         * h8300-tdep.c (h8300_gdbarch_init): Don't call
8655         set_gdbarch_print_insn.
8656
8657 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8658
8659         * alpha-tdep.c (alpha_gdbarch_init): Don't call
8660         set_gdbarch_print_insn.
8661         * arc-tdep.c (arc_gdbarch_init): Likewise.
8662         * arch-utils.c: include dis-asm.h.
8663         (default_print_insn): New function.
8664         * arch-utils.h (default_print_insn): Declare.
8665         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
8666         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8667         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
8668         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
8669         * frv-tdep.c (frv_gdbarch_init): Likewise.
8670         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8671         * gdbarch.sh (print_insn): Use default_print_insn.
8672         * gdbarch.c: Regenerated.
8673         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
8674         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
8675         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8676         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
8677         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8678         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
8679         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
8680         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
8681         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
8682         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8683         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8684         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8685         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8686         * mt-tdep.c (mt_gdbarch_init): Likewise.
8687         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8688         * nios2-tdep.c (nios2_print_insn): Remove.
8689         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
8690         * rx-tdep.c (rx_gdbarch_init): Likewise.
8691         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8692         * score-tdep.c (score_print_insn): Remove.
8693         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
8694         * sh-tdep.c (sh_gdbarch_init): Likewise.
8695         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8696         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8697         * tic6x-tdep.c (tic6x_print_insn): Remove.
8698         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
8699         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
8700         * v850-tdep.c (v850_gdbarch_init): Likewise.
8701         * vax-tdep.c (vax_gdbarch_init): Likewise.
8702         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8703         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
8704
8705 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
8706
8707         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
8708         (MIPS_FP0_REGNUM): Remove.
8709         (MIPS_FSR_REGNUM): Remove.
8710         (mips_fbsd_supply_fpregs): Use mips_regnum.
8711         (mips_fbsd_supply_gregs): Likewise.
8712         (mips_fbsd_collect_fpregs): Likewise.
8713         (mips_fbsd_collect_gregs): Likewise.
8714
8715 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
8716
8717         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
8718         (getpfpregs_supplies): New function.
8719         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
8720         getfpregs_supplies.
8721         (mips_fbsd_store_inferior_registers): Likewise.
8722
8723 2017-05-22  Pedro Alves <palves@redhat.com>
8724
8725         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
8726         maintainer.
8727
8728 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
8729
8730         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
8731         (store_register): Likewise.
8732         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
8733         (get_decimal_float_return_value): Likewise.
8734         (do_ppc_sysv_return_value): Likewise.
8735         (ppc64_sysv_abi_push_integer): Likewise.
8736         (ppc64_sysv_abi_push_freg): Likewise.
8737         (ppc64_sysv_abi_return_value_base): Likewise.
8738         (ppc64_sysv_abi_return_value): Likewise.
8739         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
8740         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
8741         * rs6000-nat.c: Likewise.
8742         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
8743         (rs6000_value_to_register): Likewise.
8744         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
8745
8746 2017-05-21  Tom Tromey  <tom@tromey.com>
8747
8748         PR rust/21466:
8749         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
8750         arrays as "[T]", not "[T; ]".
8751
8752 2017-05-19  Tom Tromey  <tom@tromey.com>
8753
8754         PR rust/21484:
8755         * rust-lang.c (exp_descriptor_rust): New function.
8756         (rust_language_defn): Use it.
8757         * p-lang.c (pascal_language_defn): Update.
8758         * opencl-lang.c (opencl_language_defn): Update.
8759         * objc-lang.c (objc_language_defn): Update.
8760         * m2-lang.c (m2_language_defn): Update.
8761         * language.h (struct language_defn)
8762         <la_watch_location_expression>: New member.
8763         * language.c (unknown_language_defn, auto_language_defn)
8764         (local_language_defn): Update.
8765         * go-lang.c (go_language_defn): Update.
8766         * f-lang.c (f_language_defn): Update.
8767         * d-lang.c (d_language_defn): Update.
8768         * c-lang.h (c_watch_location_expression): Declare.
8769         * c-lang.c (c_watch_location_expression): New function.
8770         (c_language_defn, cplus_language_defn, asm_language_defn)
8771         (minimal_language_defn): Use it.
8772         * breakpoint.c (watch_command_1): Call
8773         la_watch_location_expression.
8774         * ada-lang.c (ada_language_defn): Update.
8775
8776 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8777
8778         PR tui/21482
8779         * gdb_curses.h (NOMACROS): Define.
8780         (NCURSES_NOMACROS): Define.
8781
8782 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8783
8784         PR tui/21482
8785         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
8786         arg to char *.
8787         * tui/tui-wingeneral.c (box_win): Likewise.
8788         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
8789         (tui_show_source_line): Likewise.
8790         (tui_show_exec_info_content): Likewise.
8791
8792 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
8793
8794         * sparc-tdep.c (sparc_structure_return_p)
8795         (sparc_arg_on_registers_p): New functions.
8796         (sparc32_store_arguments): Use them.
8797         * sparc64-tdep.c (sparc64_16_byte_align_p)
8798         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
8799         Handle TYPE_CODE_ARRAY.
8800
8801 2017-05-17  Yao Qi  <yao.qi@linaro.org>
8802
8803         * cli/cli-decode.c (add_alias_cmd): New function.
8804         * command.h (add_alias_cmd): Declare.
8805         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
8806         instead call add_alias_cmd.
8807
8808 2017-05-17  Pedro Alves  <palves@redhat.com>
8809
8810         * Makefile.in (nat_extra_makefile_frag): Rename to ...
8811         (nat_makefile_frag): ... this.  All references updated.
8812         * configure.ac: Likewise.
8813         * configure.nat: Likewise.  Enhance comments.
8814         * configure: Regenerate.
8815
8816 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8817
8818         * procfs.c (procfs_create_inferior): Change prototype to match
8819         definition.
8820
8821 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
8822
8823         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
8824         C++ compiler warning.
8825
8826 2017-05-12  Tom Tromey  <tom@tromey.com>
8827
8828         PR rust/21483:
8829         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
8830         recurse, just call value_struct_elt directly.
8831
8832 2017-05-12  Tom Tromey  <tom@tromey.com>
8833
8834         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
8835         OP_RUST_ARRAY>: Fix.
8836
8837 2017-05-12  Tom Tromey  <tom@tromey.com>
8838
8839         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
8840
8841 2017-05-09  Yao Qi  <yao.qi@linaro.org>
8842
8843         * regcache.c: Include <forward_list>.
8844         (struct regcache_list): Remove.
8845         (current_regcache): Update.
8846         (get_thread_arch_aspace_regcache): Update for std::forward_list.
8847         (regcache_thread_ptid_changed): Likewise.
8848         (registers_changed_ptid): Likewise.
8849         (current_regcache_size): Likewise.
8850
8851 2017-05-09  Yao Qi  <yao.qi@linaro.org>
8852
8853         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
8854         (current_regcache_size): New function.
8855         (current_regcache_test): New function.
8856         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
8857
8858 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
8859
8860         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
8861         (print_gp_register_row): Use get_frame_register_value.
8862
8863 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
8864
8865         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
8866         (mips_supply_fpregset): Likewise.
8867         (mips64_supply_gregset): Likewise.
8868
8869 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
8870
8871         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
8872         regcache->raw_supply_zeroed.
8873
8874 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8875
8876         * configure.nat: Rearrange 'case' statements to match
8877         host before cpu.
8878
8879 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8880
8881         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
8882         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
8883         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
8884         "@nat_extra_makefile_frag@".
8885         (Makefile): Remove dependency on "@frags@".
8886         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
8887         (data-directory/Makefile): Likewise.
8888         * config/aarch64/linux.mh: Deleted; moved contents to
8889         "gdb/configure.nat".
8890         * config/alpha/alpha-linux.mh: Likewise.
8891         * config/alpha/nbsd.mh: Likewise.
8892         * config/arm/linux.mh: Likewise.
8893         * config/arm/nbsdelf.mh: Likewise.
8894         * config/i386/cygwin.mh: Likewise.
8895         * config/i386/cygwin64.mh: Likewise.
8896         * config/i386/darwin.mh: Likewise.
8897         * config/i386/fbsd.mh: Likewise.
8898         * config/i386/fbsd64.mh: Likewise.
8899         * config/i386/go32.mh: Likewise.
8900         * config/i386/i386gnu.mh: Likewise.
8901         * config/i386/i386sol2.mh: Likewise.
8902         * config/i386/linux.mh: Likewise.
8903         * config/i386/linux64.mh: Likewise.
8904         * config/i386/mingw.mh: Likewise.
8905         * config/i386/mingw64.mh: Likewise.
8906         * config/i386/nbsd64.mh: Likewise.
8907         * config/i386/nbsdelf.mh: Likewise.
8908         * config/i386/nto.mh: Likewise.
8909         * config/i386/obsd.mh: Likewise.
8910         * config/i386/obsd64.mh: Likewise.
8911         * config/i386/sol2-64.mh: Likewise.
8912         * config/ia64/linux.mh: Likewise.
8913         * config/m32r/linux.mh: Likewise.
8914         * config/m68k/linux.mh: Likewise.
8915         * config/m68k/nbsdelf.mh: Likewise.
8916         * config/m68k/obsd.mh: Likewise.
8917         * config/m88k/obsd.mh: Likewise.
8918         * config/mips/fbsd.mh: Likewise.
8919         * config/mips/linux.mh: Likewise.
8920         * config/mips/nbsd.mh: Likewise.
8921         * config/mips/obsd64.mh: Likewise.
8922         * config/pa/linux.mh: Likewise.
8923         * config/pa/nbsd.mh: Likewise.
8924         * config/pa/obsd.mh: Likewise.
8925         * config/powerpc/aix.mh: Likewise.
8926         * config/powerpc/fbsd.mh: Likewise.
8927         * config/powerpc/linux.mh: Likewise.
8928         * config/powerpc/nbsd.mh: Likewise.
8929         * config/powerpc/obsd.mh: Likewise.
8930         * config/powerpc/ppc64-linux.mh: Likewise.
8931         * config/powerpc/spu-linux.mh: Likewise.
8932         * config/s390/linux.mh: Likewise.
8933         * config/sh/nbsd.mh: Likewise.
8934         * config/sparc/fbsd.mh: Likewise.
8935         * config/sparc/linux.mh: Likewise.
8936         * config/sparc/linux64.mh: Likewise.
8937         * config/sparc/nbsd64.mh: Likewise.
8938         * config/sparc/nbsdelf.mh: Likewise.
8939         * config/sparc/obsd64.mh: Likewise.
8940         * config/sparc/sol2.mh: Likewise.
8941         * config/tilegx/linux.mh: Likewise.
8942         * config/vax/nbsdelf.mh: Likewise.
8943         * config/vax/obsd.mh: Likewise.
8944         * config/xtensa/linux.mh: Likewise.
8945         * config/i386/i386gnu.mn: New file, with excerpts from
8946         "config/i386/i386gnu.mh".
8947         * configure: Regenerate.
8948         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
8949         *.mh files under "gdb/config".
8950         * configure.nat: New file, with contents from the
8951         "gdb/config/*/*.mh" files.
8952
8953 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
8954
8955         * btrace.c (btrace_clear): Free insn vector.
8956
8957 2017-05-05  Pedro Alves  <palves@redhat.com>
8958
8959         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
8960         * configure: Regenerate.
8961
8962 2017-05-04  Pedro Alves  <palves@redhat.com>
8963
8964         * Makefile.in (SFILES): Add progspace-and-thread.c.
8965         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
8966         (COMMON_OBS): Add progspace-and-thread.o.
8967         * breakpoint.c: Include "progspace-and-thread.h".
8968         (update_inserted_breakpoint_locations)
8969         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
8970         Use scoped_restore_current_pspace_and_thread.
8971         (create_std_terminate_master_breakpoint): Use
8972         scoped_restore_current_program_space.
8973         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
8974         (print_breakpoint_location): Use
8975         scoped_restore_current_program_space.
8976         (bp_loc_is_permanent): Use
8977         scoped_restore_current_pspace_and_thread.
8978         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
8979         (download_tracepoint_locations): Use
8980         scoped_restore_current_pspace_and_thread.
8981         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
8982         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
8983         (enum step_over_calls_kind): Moved from inferior.h.
8984         (class scoped_restore_current_thread): New class.
8985         * gdbthread.h (make_cleanup_restore_current_thread): Delete
8986         declaration.
8987         (scoped_restore_current_thread): New class.
8988         * infcmd.c: Include "common/gdb_optional.h".
8989         (continue_1, proceed_after_attach): Use
8990         scoped_restore_current_thread.
8991         (notice_new_inferior): Use scoped_restore_current_thread.
8992         * inferior.c: Include "progspace-and-thread.h".
8993         (restore_inferior, save_current_inferior): Delete.
8994         (add_inferior_command, clone_inferior_command): Use
8995         scoped_restore_current_pspace_and_thread.
8996         * inferior.h (scoped_restore_current_inferior): New class.
8997         * infrun.c: Include "progspace-and-thread.h" and
8998         "common/gdb_optional.h".
8999         (follow_fork_inferior): Use
9000         scoped_restore_current_pspace_and_thread.
9001         (scoped_restore_exited_inferior): New class.
9002         (handle_vfork_child_exec_or_exit): Use
9003         scoped_restore_exited_inferior,
9004         scoped_restore_current_pspace_and_thread,
9005         scoped_restore_current_thread and scoped_restore.
9006         (fetch_inferior_event): Use scoped_restore_current_thread.
9007         * linespec.c (decode_line_full, decode_line_1): Use
9008         scoped_restore_current_program_space.
9009         * mi/mi-main.c: Include "progspace-and-thread.h".
9010         (exec_continue): Use scoped_restore_current_thread.
9011         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
9012         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
9013         * proc-service.c (ps_pglobal_lookup): Use
9014         scoped_restore_current_program_space.
9015         * progspace-and-thread.c: New file.
9016         * progspace-and-thread.h: New file.
9017         * progspace.c (release_program_space, clone_program_space): Use
9018         scoped_restore_current_program_space.
9019         (restore_program_space, save_current_program_space)
9020         (save_current_space_and_thread): Delete.
9021         (switch_to_program_space_and_thread): Moved to
9022         progspace-and-thread.c.
9023         * progspace.h (save_current_program_space)
9024         (save_current_space_and_thread): Delete declarations.
9025         (scoped_restore_current_program_space): New class.
9026         * remote.c (remote_btrace_maybe_reopen): Use
9027         scoped_restore_current_thread.
9028         * symtab.c: Include "progspace-and-thread.h".
9029         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
9030         * thread.c (print_thread_info_1): Use
9031         scoped_restore_current_thread.
9032         (struct current_thread_cleanup): Delete.
9033         (do_restore_current_thread_cleanup)
9034         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
9035         (scoped_restore_current_thread::~scoped_restore_current_thread):
9036         ... this new dtor.
9037         (make_cleanup_restore_current_thread): Rename/convert to ...
9038         (scoped_restore_current_thread::scoped_restore_current_thread):
9039         ... this new ctor.
9040         (thread_apply_all_command): Use scoped_restore_current_thread.
9041         (thread_apply_command): Use scoped_restore_current_thread.
9042         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
9043         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
9044
9045 2017-05-04  Pedro Alves  <palves@redhat.com>
9046
9047         * thread.c (make_cleanup_restore_current_thread): Move
9048         find_thread_ptid call before the is_stopped call.  Assert that the
9049         thread is found.  Replace is_stopped call by checking the thread's
9050         state directly.  Remove unnecessary NULL-thread check.
9051
9052 2017-05-04  Pedro Alves  <palves@redhat.com>
9053
9054         * corelow.c (thread_section_name): New class.
9055         (get_core_register_section, get_core_siginfo): Use it.
9056
9057 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9058
9059         * corelow.c (sniff_core_bfd): Remove extra semicolon.
9060         (get_core_register_section): Remove xfree of NULL pointer.
9061
9062 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
9063
9064         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
9065         * regcache.c (regcache::raw_supply_zeroed): New function.
9066         * regcache.h (regcache::raw_supply_zeroed): New declaration.
9067
9068 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
9069
9070         * gdbarch.sh: Remove commented out definition of
9071         TARGET_CHAR_BIT.
9072         * gdbarch.h: Re-generate.
9073
9074 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
9075
9076         * configure: Regenerate.
9077
9078 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
9079
9080         * solib-target.c (solib_target_relocate_section_addresses):
9081         Remove num_section_bases, num_bases, segment_bases variables.
9082
9083 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9084
9085         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
9086
9087 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9088
9089         * solib-target.c: Include <vector>
9090         (struct lm_info_target) <~lm_info_target>: Remove.
9091         <segment_bases, section_bases>: Change type to
9092         std::vector<CORE_ADDR>.
9093         (library_list_start_segment, library_list_start_section,
9094         library_list_end_library,
9095         solib_target_relocate_section_addresses): Adjust.
9096
9097 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9098
9099         * gdbarch.sh (software_single_step): Change return type to
9100         std::vector<CORE_ADDR>.
9101         * gdbarch.c, gdbarch.h: Re-generate.
9102         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
9103         Adjust.
9104         (arm_deal_with_atomic_sequence_raw): Adjust.
9105         (thumb_get_next_pcs_raw): Adjust.
9106         (arm_get_next_pcs_raw): Adjust.
9107         (arm_get_next_pcs): Adjust.
9108         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
9109         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
9110         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
9111         (alpha_software_single_step): Adjust.
9112         * alpha-tdep.h (alpha_software_single_step): Adjust.
9113         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
9114         * arm-tdep.c (arm_software_single_step): Adjust.
9115         (arm_breakpoint_kind_from_current_state): Adjust.
9116         * arm-tdep.h (arm_software_single_step): Adjust.
9117         * breakpoint.c (insert_single_step_breakpoint): Adjust.
9118         * cris-tdep.c (cris_software_single_step): Adjust.
9119         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
9120         (micromips_deal_with_atomic_sequence): Adjust.
9121         (deal_with_atomic_sequence): Adjust.
9122         (mips_software_single_step): Adjust.
9123         * mips-tdep.h (mips_software_single_step): Adjust.
9124         * moxie-tdep.c (moxie_software_single_step): Adjust.
9125         * nios2-tdep.c (nios2_software_single_step): Adjust.
9126         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
9127         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
9128         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
9129         * s390-linux-tdep.c (s390_software_single_step): Adjust.
9130         * sparc-tdep.c (sparc_software_single_step): Adjust.
9131         * spu-tdep.c (spu_software_single_step): Adjust.
9132         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
9133
9134 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9135
9136         * gdbarch.sh: Use semi-colon as field separator instead of colon.
9137         * gdbarch.h: Re-generate.
9138
9139 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9140
9141         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
9142         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
9143         * python/py-instruction.c, python/py-instruction.h: New file.
9144         * python/py-record.c: Add py-instruction.h include.
9145         (gdbpy_initialize_record): Make gdb.Instruction a super class of
9146         gdb.RecordInstruction.
9147         * python/python-internal.h: Add gdbpy_initialize_instruction
9148         declaration.
9149         * python/python.c (do_start_initialization): Add
9150         gdbpy_initialize_instruction.
9151
9152 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9153
9154         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
9155         Remove.
9156         (btrace_func_from_recpy_func): New function.
9157         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
9158         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
9159         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
9160         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
9161         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
9162         Also, use new helper functions.
9163         (btpy_list_item): Use new helper functions.
9164         (recpy_bt_function_call_history): Use new type name.
9165         (btpy_call_getset): Remove.
9166         (gdbpy_initialize_btrace): Remove code to initialize
9167         gdb.BtraceFunctionCall.
9168         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
9169         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
9170         recpy_bt_func_prev, recpy_bt_func_next): New export.
9171         * python/py-record.c (recpy_func_type): New static object.
9172         (recpy_func_new, recpy_func_level, recpy_func_symbol,
9173         recpy_func_instructions, recpy_func_up, recpy_func_prev,
9174         recpy_func_next): New function.
9175         (recpy_element_hash, recpy_element_richcompare): Updated comment.
9176         (recpy_func_getset): New static object.
9177         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
9178         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
9179
9180 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9181
9182         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
9183         (btpy_object, btpy_insn_type, btpy_new): Remove.
9184         (btpy_list_object): Use gdb.RecordInstruction type instead of
9185         gdb.BtraceInstruction type.
9186         (btrace_insn_from_recpy_insn): New function.
9187         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
9188         btpy_new.
9189         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
9190         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
9191         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
9192         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
9193         instead of btpy_object.
9194         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9195         btpy_insn_data, btpy_insn_decode): Rename to ...
9196         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
9197         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
9198         recpy_bt_insn_decode): This.  Also, use new helper functions.
9199         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
9200         recpy_insn_type.
9201         (btpy_insn_getset): Remove.
9202         (gdbpy_initialize_btrace): Remove code to initialize
9203         gdb.BtraceInstruction.  Use recpy_element_object.
9204         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
9205         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
9206         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
9207         * python/py-record.c (recpy_insn_type): New static object.
9208         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
9209         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
9210         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
9211         New function.
9212         (recpy_insn_getset): New static object.
9213         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
9214         * python/py-record.h (recpy_element_object): New typedef.
9215         (recpy_insn_type, recpy_insn_new): New export.
9216
9217 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9218
9219         * py-record-btrace.c (btpy_insn_new): Removed.
9220         (btpy_insn_or_gap_new): New function.
9221         (btpy_insn_error): Removed.
9222         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9223         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
9224         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
9225         btpy_insn_or_gap_new instead of btpy_insn_new.
9226         (btpy_insn_getset): Remove btpy_insn_error.
9227         * py-record.c (recpy_gap_type): New static object.
9228         (recpy_gap_object): New typedef.
9229         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
9230         recpy_gap_reason_string): New function.
9231         (recpy_gap_getset): New static object.
9232         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
9233         * py-record.h (recpy_gap_new): New export.
9234
9235 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9236
9237         * python/py-record.c (recpy_ptid): Remove.
9238         (recpy_record_getset): Remove recpy_ptid.
9239
9240 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9241
9242         * btrace.c (btrace_fetch): Set inferior_ptid.
9243         * python/py-record-btrace.c: Add "py-record.h" include.
9244         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
9245         recpy_bt_end, recpy_bt_instruction_history,
9246         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
9247         in gdb.Record object instead of current ptid.
9248         * python/py-record.c: Include new "py-record.h" file.
9249         (recpy_record_object): Moved to py-record.h.
9250         * python/py-record.h: New file.
9251
9252 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9253
9254         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
9255         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
9256         indentation.
9257
9258 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
9259
9260         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
9261         the past maintainers section.
9262
9263 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9264
9265         * infcmd.c (get_return_value): Use regcache ctor, and remove
9266         cleanup.
9267
9268 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9269             Pedro Alves  <palves@redhat.com>
9270
9271         * regcache.c (regcache::regcache): New tag dispatch ctor.
9272         (do_cooked_read): Moved above.
9273         (regcache_dup): Use the tag dispatch ctor..
9274         * regcache.h (regcache): Declare ctor, delete copy ctor and
9275         assignment operator, remove friend regcache_dup.
9276
9277 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9278
9279         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
9280         call method save instead of regcache_cpy.
9281         * regcache.h (struct regcache): Make regcache_dup a friend.
9282
9283 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9284
9285         * regcache.c (struct regcache): Move to regcache.h
9286         (regcache::arch): New method.
9287         (regcache_get_ptid): Update.
9288         (get_regcache_arch): Call arch method.
9289         (get_regcache_aspace): Call method aspace.
9290         (register_buffer): Change it to method.
9291         (regcache_save): Change it to regcache::save.
9292         (regcache_restore): Likewise.
9293         (regcache_cpy_no_passthrough): Remove the declaration.
9294         (regcache_cpy): Call methods restore and cpy_no_passthrough.
9295         (regcache_cpy_no_passthrough): Change it to method
9296         cpy_no_passthrough.
9297         (regcache_register_status): Change it to method
9298         get_register_status.
9299         (regcache_invalidate): Change it to method invalidate.
9300         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
9301         (regcache_raw_update): Change it to method raw_update.
9302         (regcache_raw_read): Likewise.
9303         (regcache_raw_read_signed): Likewise.
9304         (regcache_raw_read_unsigned): Likewise.
9305         (regcache_raw_write_signed): Likewise.
9306         (regcache_raw_write_unsigned): Likewise.
9307         (regcache_cooked_read): Likewise.
9308         (regcache_cooked_read_value): Likewise.
9309         (regcache_cooked_read_signed): Likewise.
9310         (regcache_cooked_read_unsigned): Likewise.
9311         (regcache_cooked_write_signed): Likewise.
9312         (regcache_cooked_write_unsigned): Likewise.
9313         (regcache_raw_set_cached_value): Likewise.
9314         (regcache_raw_write): Likewise.
9315         (regcache_cooked_write): Likewise.
9316         (regcache_xfer_part): Likewise.
9317         (regcache_raw_read_part): Likewise.
9318         (regcache_raw_write_part): Likewise.
9319         (regcache_cooked_read_part): Likewise.
9320         (regcache_cooked_write_part): Likewise.
9321         (regcache_raw_supply): Likewise.
9322         (regcache_raw_collect): Likewise.
9323         (regcache_transfer_regset): Likewise.
9324         (regcache_supply_regset): Likewise.
9325         (regcache_collect_regset): Likewise.
9326         (regcache_debug_print_register): Likewise.
9327         (enum regcache_dump_what): Move it to regcache.h.
9328         (regcache_dump): Change it to method dump.
9329         * regcache.h (enum regcache_dump_what): New.
9330         (class regcache): New.
9331         * target.c (target_fetch_registers): Call method
9332         debug_print_register.
9333         (target_store_registers): Likewise.
9334
9335 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9336
9337         * windows-nat.c (struct lm_info_windows): Initialize field.
9338         (windows_make_so): Allocate lm_info_windows with new.
9339         (windows_free_so): Free lm_info_windows with delete.
9340
9341 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9342
9343         * solib-darwin.c (struct lm_info_darwin): Initialize field.
9344         (darwin_current_sos): Allocate lm_info_darwin with new, remove
9345         cleanup.
9346         (darwin_free_so): Free lm_info_darwin with delete.
9347
9348 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9349
9350         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
9351         <l_addr_p>: Change type to bool.
9352         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
9353         (svr4_free_so): Free lm_info_svr4 with delete.
9354         (svr4_copy_library_list): Replace memcpy with call to copy
9355         constructor.
9356         (library_list_start_library, svr4_default_sos): Allocate
9357         lm_info_svr4 with new.
9358
9359 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9360
9361         * solib-target.c (struct lm_info_target): Add destructor,
9362         initialize fields.
9363         <name>: Change type to std::string.
9364         (library_list_start_library): Allocate lm_info_target with new.
9365         (solib_target_free_library_list): Free lm_info_target with
9366         delete.
9367         (solib_target_current_sos): Adapt to std::string.
9368         (solib_target_free_so): Free lm_info_target with delete.
9369
9370 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9371
9372         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
9373         fields.
9374         (frv_current_sos): Allocate lm_info_frv with new.
9375         (frv_relocate_main_executable): Free lm_info_frv with delete,
9376         allocate with new.
9377         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
9378
9379 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9380
9381         * solib-frv.c (struct lm_info_frv): Fix indentation.
9382
9383 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9384
9385         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
9386         map field.
9387         (dsbt_current_sos): Allocate lm_info_dsbt with new.
9388         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
9389         and allocate with new.
9390         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
9391
9392 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9393
9394         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
9395         <filename, member_name>: Change type to std::string.
9396         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
9397         (library_list_start_library): Allocate lm_info_aix with new.
9398         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
9399         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
9400         with copy constructor.
9401
9402 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9403
9404         * solist.h (struct lm_info): Remove.
9405         (struct lm_info_base): New class.
9406         (struct so_list) <lm_info>: Change type to lm_info_base *.
9407         * nto-tdep.c (struct lm_info): Remove.
9408         (lm_addr): Adjust.
9409         * solib-aix.c (struct lm_info): Rename to ...
9410         (struct lm_info_aix): ... this.  Extend lm_info_base.
9411         (lm_info_p): Rename to ...
9412         (lm_info_aix_p): ... this, and adjust.
9413         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
9414         solib_aix_parse_libraries, library_list_start_library,
9415         solib_aix_free_library_list, solib_aix_parse_libraries,
9416         solib_aix_get_library_list,
9417         solib_aix_relocate_section_addresses, solib_aix_free_so,
9418         solib_aix_get_section_offsets,
9419         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
9420         Adjust.
9421         (struct solib_aix_inferior_data) <library_list>: Adjust.
9422         * solib-darwin.c (struct lm_info): Rename to ...
9423         (struct lm_info_darwin): ... this.  Extend lm_info_base.
9424         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
9425         * solib-dsbt.c (struct lm_info): Rename to ...
9426         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
9427         (struct dsbt_info) <main_executable_lm_info): Adjust.
9428         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
9429         dsbt_relocate_section_addresses): Adjust.
9430         * solib-frv.c (struct lm_info): Rename to ...
9431         (struct lm_info_frv): ... this.  Extend lm_info_base.
9432         (main_executable_lm_info): Adjust.
9433         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
9434         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
9435         find_canonical_descriptor_in_load_object,
9436         frv_fdpic_find_canonical_descriptor): Adjust.
9437         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
9438         to lm_info_svr4.
9439         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
9440         svr4_clear_so, svr4_copy_library_list,
9441         library_list_start_library, svr4_default_sos, svr4_read_so_list,
9442         svr4_current_sos, svr4_fetch_objfile_link_map,
9443         solist_update_incremental): Adjust.
9444         * solib-svr4.h (struct lm_info_svr4): Move here from
9445         solib-svr4.c.
9446         * solib-target.c (struct lm_info): Rename to ...
9447         (struct lm_info_target): ... this.  Extend lm_info_base.
9448         (lm_info_p): Rename to ...
9449         (lm_info_target_p): ... this.
9450         (solib_target_parse_libraries, library_list_start_segment,
9451         library_list_start_section, library_list_start_library,
9452         library_list_end_library, solib_target_free_library_list,
9453         solib_target_current_sos, solib_target_free_so,
9454         solib_target_relocate_section_addresses): Adjust.
9455         * windows-nat.c (struct lm_info): Rename to ...
9456         (struct lm_info_windows): ... this.  Extend lm_info_base.
9457         (windows_make_so, handle_load_dll, handle_unload_dll,
9458         windows_xfer_shared_libraries): Adjust.
9459
9460 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9461
9462         * solib-darwin.c (struct darwin_so_list): Remove.
9463         (darwin_current_sos): Allocate an so_list object instead of a
9464         darwin_so_list, separately allocate an lm_info object.
9465         (darwin_free_so): Free lm_info.
9466
9467 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
9468
9469         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
9470         with fprintf_filtered.
9471
9472 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9473
9474         * regcache.c (regcache::regcache): New function.
9475         (regcache::~regcache): New function.
9476         (regcache_xmalloc_1): Remove.
9477         (regcache_xmalloc): Call new regcache.
9478         (regcache_xfree): Call delete regcache.
9479         (get_thread_arch_aspace_regcache): Call new regcache.
9480
9481 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9482
9483         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
9484         lwp instead of ptid_get_lwp.
9485
9486 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9487
9488         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
9489         lwp_info instead of getting from inferior_ptid.
9490
9491 2017-04-27  Keith Seitz  <keiths@redhat.com>
9492
9493         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
9494         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
9495         (CV_CONVERSION_BADNESS): Define.
9496         (rank_one_type): Remove overly restrictive rvalue reference
9497         rank checks.
9498         Add cv-qualifier checks and subranks for type equality.
9499         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
9500         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
9501         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
9502
9503 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
9504
9505         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
9506         count when creating the object.
9507
9508 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
9509             Ulrich Weigand  <uweigand@de.ibm.com>
9510
9511         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
9512         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
9513         is used in AIX.
9514         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
9515         (process_xcoff_symbol): Likewise.
9516         (scan_xcoff_symtab): Likewise.
9517
9518 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9519
9520         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
9521         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
9522         (ia64_access_reg): Use get_frame_register_unsigned.
9523         (ia64_access_rse_reg): Likewise.
9524         (ia64_libunwind_frame_prev_register): Likewise.
9525
9526 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
9527
9528         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
9529         * gdbarch.c: Regenerated.
9530         * gdbarch.h: Regenerated.
9531         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
9532         visibility external.
9533         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
9534         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
9535         (enum cfa_how_kind): Move to ...
9536         (struct dwarf2_frame_state_reg_info): Likewise.
9537         (struct dwarf2_frame_state): Likewise.
9538         * dwarf2-frame.h: ... here.
9539         (dwarf2_frame_state_alloc_regs): New declaration.
9540         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
9541         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
9542
9543 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9544
9545         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
9546         regcache_raw_read_unsigned.
9547         (xtensa_pseudo_register_write): Likewise.
9548
9549 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9550
9551         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
9552         (nds32_pseudo_register_write): Likewise.
9553
9554 2017-04-25  Yao Qi  <yao.qi@linaro.org>
9555
9556         * regcache.c (struct regcache) <readonly_p>: Change its type
9557         to bool.
9558         (regcache_xmalloc_1): Update parameter type and callers update.
9559
9560 2017-04-25  Yao Qi  <yao.qi@linaro.org>
9561
9562         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
9563         set_gdbarch_wchar_bit.
9564         * arm-tdep.c (arm_gdbarch_init): Likewise.
9565
9566 2017-04-25  Pedro Alves  <palves@redhat.com>
9567
9568         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
9569         (BothAreRelocatable, memcopy, memmove): Don't define.
9570         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
9571         macros.
9572
9573 2017-04-25  Pedro Alves  <palves@redhat.com>
9574
9575         * common/common-defs.h: Include "common/poison.h".
9576         * common/function-view.h: (Not, Or, Requires): Move to traits.h
9577         and adjust.
9578         * common/poison.h: New file.
9579         * common/traits.h: Include <type_traits>.
9580         (Not, Or, Requires): New, moved from common/function-view.h.
9581
9582 2017-04-25  Pedro Alves  <palves@redhat.com>
9583
9584         * breakpoint.h (struct breakpoint): In-class initialize all
9585         fields.  Make boolean fields "bool".
9586         * breakpoint.c (init_raw_breakpoint_without_location): Remove
9587         memset call and initializations no longer necessary.
9588
9589 2017-04-25  Pedro Alves  <palves@redhat.com>
9590
9591         * btrace.c (pt_btrace_insn_flags): Change parameter type to
9592         reference.
9593         (pt_btrace_insn): New function.
9594         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
9595
9596 2017-04-25  Pedro Alves  <palves@redhat.com>
9597
9598         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
9599         "base" field and inherit from "bp_location" instead.  Add
9600         non-default ctor.
9601         (allocate_location_exception): Use new non-default ctor.
9602         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
9603         (init_bp_location): Convert to ...
9604         (bp_location::bp_location): ... this new ctor, and remove memset
9605         call.
9606         (base_breakpoint_allocate_location): Use the new non-default ctor.
9607         * breakpoint.h (bp_location): Now a class.  Declare default and
9608         non-default ctors.  In-class initialize all members.
9609         (init_bp_location): Remove declaration.
9610
9611 2017-04-25  Pedro Alves  <palves@redhat.com>
9612
9613         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
9614         assignment operator.
9615
9616 2017-04-24  Yao Qi  <yao.qi@linaro.org>
9617
9618         * doublest.c (convert_doublest_to_floatformat): Call
9619         floatformat_totalsize_bytes.
9620
9621 2017-04-22  Tom Tromey  <tom@tromey.com>
9622
9623         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
9624         ui_out_emit_list.
9625         * stack.c (print_frame): Use ui_out_emit_list.
9626         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9627         ui_out_emit_list.
9628         * mi/mi-main.c (print_one_inferior)
9629         (mi_cmd_data_list_register_names)
9630         (mi_cmd_data_list_register_values, mi_cmd_list_features)
9631         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
9632         ui_out_emit_list.
9633         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
9634         (mi_output_solib_attribs): Use ui_out_emit_list,
9635         ui_out_emit_tuple.
9636         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
9637         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
9638         (mi_cmd_stack_list_args, list_args_or_locals): Use
9639         ui_out_emit_list.
9640         * disasm.c (do_assembly_only): Use ui_out_emit_list.
9641         * breakpoint.c (print_solib_event, output_thread_groups): Use
9642         ui_out_emit_list.
9643
9644 2017-04-22  Tom Tromey  <tom@tromey.com>
9645
9646         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
9647         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
9648         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
9649
9650 2017-04-22  Tom Tromey  <tom@tromey.com>
9651
9652         * tracepoint.c (tvariables_info_1)
9653         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
9654
9655 2017-04-22  Tom Tromey  <tom@tromey.com>
9656
9657         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
9658         annotate_arg_emitter.
9659         * breakpoint.c (print_mention_watchpoint)
9660         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
9661         * annotate.h (struct annotate_arg_emitter): New.
9662
9663 2017-04-22  Tom Tromey  <tom@tromey.com>
9664
9665         * record-btrace.c (record_btrace_insn_history)
9666         (record_btrace_insn_history_range, record_btrace_call_history)
9667         (record_btrace_call_history_range): Use ui_out_emit_tuple.
9668         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
9669         ui_out_emit_tuple.
9670         * stack.c (print_frame_info): Use ui_out_emit_tuple.
9671         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
9672         * skip.c (skip_info): Use ui_out_emit_tuple.
9673         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
9674         * progspace.c (print_program_space): Use ui_out_emit_tuple.
9675         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
9676         * osdata.c (info_osdata): Use ui_out_emit_tuple.
9677         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9678         ui_out_emit_tuple.
9679         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
9680         (output_register, mi_cmd_data_read_memory)
9681         (mi_cmd_data_read_memory_bytes, mi_load_progress)
9682         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
9683         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
9684         Use ui_out_emit_tuple.
9685         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
9686         ui_out_emit_tuple.
9687         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9688         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
9689         * linux-thread-db.c (info_auto_load_libthread_db): Use
9690         ui_out_emit_tuple.
9691         * inferior.c (print_inferior): Use ui_out_emit_tuple.
9692         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
9693         * disasm.c (do_mixed_source_and_assembly_deprecated)
9694         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
9695         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
9696         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
9697         * breakpoint.c (print_one_breakpoint_location)
9698         (print_one_breakpoint): Use ui_out_emit_tuple.
9699         * auto-load.c (print_script, info_auto_load_cmd): Use
9700         ui_out_emit_tuple.
9701         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
9702
9703 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
9704
9705         * thread.c (print_thread_info_1): Remove dead code.
9706
9707 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
9708
9709         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
9710         GDB_SELF_TEST.
9711         * arm-tdep.c (selftests::arm_record_test): Likewise.
9712
9713 2017-04-21  Yao Qi  <yao.qi@linaro.org>
9714
9715         * regcache.c (regcache_restore): Remove argument 2.  Replace
9716         argument 3 with regcache.  Get register status from
9717         src->register_status and get register contents from
9718         register_buffer (src, regnum).
9719         (regcache_cpy): Update.
9720
9721 2017-04-19  Pedro Alves  <palves@redhat.com>
9722
9723         * gdbthread.h (thread): Add missing closing parenthesis in
9724         comment.
9725
9726 2017-04-19  Pedro Alves  <palves@redhat.com>
9727
9728         * common/refcounted-object.h: New file.
9729         * gdbthread.h: Include "common/refcounted-object.h".
9730         (thread_info): Inherit from refcounted_object and add comments.
9731         (thread_info::incref, thread_info::decref)
9732         (thread_info::m_refcount): Delete.
9733         (thread_info::deletable): Use the refcounted_object::refcount()
9734         method.
9735         * inferior.c (current_inferior_): Add comment.
9736         (set_current_inferior): Increment/decrement refcounts.
9737         (prune_inferiors, remove_inferior_command): Skip inferiors marked
9738         not-deletable instead of comparing with the current inferior.
9739         (initialize_inferiors): Increment the initial inferior's refcount.
9740         * inferior.h (struct inferior): Forward declare.
9741         Include "common/refcounted-object.h".
9742         (current_inferior, set_current_inferior): Move declaration to
9743         before struct inferior's definition, and fix comment.
9744         (inferior): Inherit from refcounted_object.  Add comments.
9745         * thread.c (switch_to_thread_no_regs): Reference the thread's
9746         inferior pointer directly instead of doing a ptid lookup.
9747         (switch_to_no_thread): New function.
9748         (switch_to_thread(thread_info *)): New function, factored out
9749         from ...
9750         (switch_to_thread(ptid_t)): ... this.
9751         (restore_current_thread): Delete.
9752         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
9753         fields, and add 'inf' field.
9754         (do_restore_current_thread_cleanup): Check whether old->inf is
9755         alive instead of looking up an inferior by ptid.  Use
9756         switch_to_thread and switch_to_no_thread.
9757         (restore_current_thread_cleanup_dtor): Use old->inf directly
9758         instead of lookup up an inferior by id.  Decref the inferior.
9759         Don't restore 'removable'.
9760         (make_cleanup_restore_current_thread): Same the inferior pointer
9761         in old, instead of the inferior number.  Incref the inferior.
9762         Don't save/clear 'removable'.
9763
9764 2017-04-19  Pedro Alves  <palves@redhat.com>
9765
9766         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9767         unittests/scoped_restore-selftests.c.
9768         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
9769         * common/scoped_restore.h (scoped_restore_base): Make "class".
9770         (scoped_restore_base::release): New public method.
9771         (scoped_restore_base::scoped_restore_base): New protected ctor.
9772         (scoped_restore_base::m_saved_var): New protected field.
9773         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
9774         scoped_restore_base base class instead of m_saved_var directly.
9775         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
9776         (scoped_restore_tmpl::scoped_restore_tmpl(const
9777         scoped_restore_tmpl<T>&)): Likewise.
9778         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
9779         method.
9780         (scoped_restore_tmpl::saved_var): New method.
9781         (scoped_restore_tmpl::m_saved_var): Delete.
9782         * inferior.h (inferior::detaching): Now a bool.
9783         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
9784         cleanup.
9785         * unittests/scoped_restore-selftests.c: New file.
9786
9787 2017-04-19  Pedro Alves  <palves@redhat.com>
9788
9789         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
9790         Re-sort in alphabetic order.
9791
9792 2017-04-18  Pedro Alves  <palves@redhat.com>
9793
9794         * xml-support.c (obstack_xml_printf): Delete.
9795         * xml-support.h (obstack_xml_printf): Delete.
9796
9797 2017-04-18  Pedro Alves  <palves@redhat.com>
9798
9799         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
9800         vdebug, verror, body_text, start_element, end_element, name,
9801         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
9802         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
9803         is_xinclude>: Make private and add m_ prefix.
9804         (gdb_xml_parser::body_text): New method, based on ...
9805         (gdb_xml_body_text): ... this.  Adjust.
9806         (gdb_xml_parser::vdebug): New method, based on ...
9807         (gdb_xml_debug): ... this.  Adjust.
9808         (gdb_xml_parser::verror): New method, based on ...
9809         (gdb_xml_error): ... this.  Adjust.
9810         (gdb_xml_parser::start_element): New method, based on ...
9811         (gdb_xml_start_element): ... this.  Adjust.
9812         (gdb_xml_start_element_wrapper): Defer to
9813         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
9814         (gdb_xml_parser::end_element): New method, based on ...
9815         (gdb_xml_end_element_wrapper): ... this.  Adjust.
9816         (gdb_xml_parser::~gdb_xml_parser): Adjust.
9817         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
9818         (gdb_xml_parser::use_dtd): New method, based on ...
9819         (gdb_xml_use_dtd): ... this.  Adjust.
9820         (gdb_xml_parser::parse): New method, based on ...
9821         (gdb_xml_parse): ... this.  Adjust.
9822         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
9823         (xinclude_start_include): Adjust to call the parser's name method.
9824         (xml_xinclude_default, xml_xinclude_start_doctype)
9825         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
9826         method.
9827         (xml_process_xincludes): Adjust to call parser methods.
9828         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
9829         declarations.
9830
9831 2017-04-18  Pedro Alves  <palves@redhat.com>
9832
9833         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
9834         gdb::optional<std::string>.
9835         * xml-support.c: Include <string>.
9836         (scope_level::scope_level(scope_level &&))
9837         (scope_level::~scope_level): Delete.
9838         (scope_level::body): Now a std::string.
9839         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
9840         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
9841         parameter.
9842         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
9843         (xinclude_parsing_data::output): Now a std::string reference.
9844         (xinclude_start_include): Adjust.
9845         (xml_xinclude_default): Adjust.
9846         (xml_process_xincludes): Add 'output' parameter, and return bool.
9847         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
9848         and return bool.
9849         * xml-tdesc.c: Include <unordered_map> and <string>.
9850         (tdesc_xml_cache): Delete.
9851         (tdesc_xml_cache_s): Delete.
9852         (xml_cache): Now an std::unordered_map.
9853         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
9854         (target_fetch_description_xml): Change return type to
9855         gdb::optional<std::string>, and adjust.
9856         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
9857         (target_fetch_description_xml): Change return type to
9858         gdb::optional<std::string>.
9859
9860 2017-04-18  Pedro Alves  <palves@redhat.com>
9861
9862         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9863         unittests/optional-selftests.c.
9864         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
9865         * unittests/optional-selftests.c: New file.
9866         * unittests/optional/assignment/1.cc: New file.
9867         * unittests/optional/assignment/2.cc: New file.
9868         * unittests/optional/assignment/3.cc: New file.
9869         * unittests/optional/assignment/4.cc: New file.
9870         * unittests/optional/assignment/5.cc: New file.
9871         * unittests/optional/assignment/6.cc: New file.
9872         * unittests/optional/assignment/7.cc: New file.
9873         * unittests/optional/cons/copy.cc: New file.
9874         * unittests/optional/cons/default.cc: New file.
9875         * unittests/optional/cons/move.cc: New file.
9876         * unittests/optional/cons/value.cc: New file.
9877         * unittests/optional/in_place.cc: New file.
9878         * unittests/optional/observers/1.cc: New file.
9879         * unittests/optional/observers/2.cc: New file.
9880
9881 2017-04-18  Pedro Alves  <palves@redhat.com>
9882
9883         * common/gdb_optional.h: Include common/traits.h.
9884         (in_place_t): New type.
9885         (in_place): New constexpr variable.
9886         (optional::optional): Remove member initialization of
9887         m_instantiated.
9888         (optional::optional(in_place_t...)): New constructor.
9889         (optional::~optional): Use reset.
9890         (optional::optional(const optional&)): New.
9891         (optional::optional(const optional&&)): New.
9892         (optional::optional(T &)): New.
9893         (optional::optional(T &&)): New.
9894         (operator::operator=(const optional &)): New.
9895         (operator::operator=(optional &&)): New.
9896         (operator::operator= (const T &))
9897         (operator::operator= (T &&))
9898         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
9899         (operator::reset): New.
9900         (operator::m_instantiated):: Add in-class initializer.
9901         * common/traits.h: Include <type_traits>.
9902         (struct And): New types.
9903
9904 2017-04-18  Pedro Alves  <palves@redhat.com>
9905
9906         * xml-support.c: Include <vector>.
9907         (scope_level::scope_level(const gdb_xml_element *))
9908         (scope_level::scope_level(scope_level&&)): New.
9909         (scope_level::~scope_level): New.
9910         (scope_level_s): Delete.
9911         (gdb_xml_parser::scopes): Now a std::vector.
9912         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
9913         Use std::vector.
9914         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
9915         scope cleanup code.
9916         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
9917         of the scopes member.  Use std::vector::emplace_back.
9918
9919 2017-04-18  Pedro Alves  <palves@redhat.com>
9920
9921         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
9922         a bool.
9923         (gdb_xml_end_element): Change type of first parameter.
9924         (gdb_xml_cleanup): Rename to ...
9925         (gdb_xml_parser::~gdb_xml_parser): ... this.
9926         (gdb_xml_create_parser_and_cleanup): Delete with ...
9927         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
9928         to this new ctor.
9929         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
9930         using gdb_xml_create_parser_and_cleanup.
9931         (xinclude_parsing_data): Add ctor/dtor.
9932         (xml_xinclude_cleanup): Delete.
9933         (xml_process_xincludes): Create a local xinclude_parsing_data
9934         instead of heap-allocating one.  Create a local gdb_xml_parser
9935         instead of heap-allocating one with
9936         gdb_xml_create_parser_and_cleanup.
9937
9938 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
9939
9940         PR threads/20743
9941         * fbsd-nat.c (resume_one_thread_cb): Remove.
9942         (resume_all_threads_cb): Remove.
9943         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
9944         iterate_over_threads.
9945
9946 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
9947
9948         * NEWS: Create a new section for the next release branch.
9949         Rename the section of the current branch, now that it has
9950         been cut.
9951
9952 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
9953
9954         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
9955         * version.in: Bump version to 8.0.50.DATE-git.
9956
9957 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
9958
9959         PR gdb/21385
9960         * windows-nat.c (windows_create_inferior): Declare 'allargs'
9961         independently of the host, and fix build breakage on Cygwin.
9962
9963 2017-04-13  Pedro Alves  <palves@redhat.com>
9964
9965         * inferior.c (free_inferior): Convert to ...
9966         (inferior::~inferior): ... this dtor.
9967         (inferior::inferior): New ctor, factored out from ...
9968         (add_inferior_silent): ... here.  Allocate the inferior with a new
9969         expression.
9970         (delete_inferior): Call delete instead of free_inferior.
9971         * inferior.h (gdb_environ, continuation): Forward declare.
9972         (inferior): Now a class.  Add in-class initialization to all
9973         members.  Make boolean fields bool, except 'detaching'.
9974         (inferior::inferior): New explicit ctor.
9975         (inferior::~inferior): New.
9976
9977 2017-04-13  Pedro Alves  <palves@redhat.com>
9978
9979         * inferior.c (init_inferior_list): Delete.
9980         * inferior.h (init_inferior_list): Delete.
9981
9982 2017-04-13  Pedro Alves  <palves@redhat.com>
9983
9984         PR threads/13217
9985         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
9986         (top level): Call it twice, with different thread sets.
9987
9988 2017-04-13  Pedro Alves  <palves@redhat.com>
9989
9990         * thread.c: Include <algorithm>.
9991         (thread_array_cleanup): Delete.
9992         (scoped_inc_dec_ref): New class.
9993         (live_threads_count): New function.
9994         (set_thread_refcount): Delete.
9995         (tp_array_compar_ascending): Now a bool.
9996         (tp_array_compar): Convert to a std::sort comparison function.
9997         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
9998         and live_threads_count.
9999
10000 2017-04-13  Pedro Alves  <palves@redhat.com>
10001
10002         * infrun.c (follow_fork_inferior): Also switch the current
10003         inferior.
10004
10005 2017-04-13  Pedro Alves  <palves@redhat.com>
10006
10007         * breakpoint.c (watch_command_1): Save watchpoint-frame info
10008         before calling create_internal_breakpoint.
10009
10010 2017-04-13  Pedro Alves  <palves@redhat.com>
10011
10012         * fork-child.c (execv_argv): New class.
10013         (breakup_args): Refactored as ...
10014         (execv_argv::init_for_no_shell): .. this method of execv_argv.
10015         Copy arguments to storage and replace separators with NULL
10016         terminators in place.
10017         (escape_bang_in_quoted_argument): Adjust to return bool.
10018         (execv_argv::execv_argv): New ctor.
10019         (execv_argv::init_for_shell): New method, factored out from
10020         fork_inferior.  Don't strdup strings into the vector.
10021         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
10022         Remove free_vector_argv call.
10023
10024 2017-04-13  Yao Qi  <yao.qi@linaro.org>
10025
10026         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
10027         tdep->rx_psw_type.
10028
10029 2017-04-13  Yao Qi  <yao.qi@linaro.org>
10030
10031         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
10032         * rx-tdep.c (rx_gdbarch_init): Likewise.
10033
10034 2017-04-13  Pedro Alves  <palves@redhat.com>
10035
10036         * breakpoint.h (struct breakpoint): Reindent.
10037
10038 2017-04-13  Pedro Alves  <palves@redhat.com>
10039
10040         * breakpoint.c (bp_location): Rename to ...
10041         (bp_locations): ... this.  All references updated.
10042         (bp_location_count): Rename to ...
10043         (bp_locations_count): ... this.  All references updated.
10044         (bp_location_placed_address_before_address_max): Rename to ...
10045         (bp_locations_placed_address_before_address_max): ... this.  All
10046         references updated.
10047         (bp_location_shadow_len_after_address_max): Rename to ...
10048         (bp_locations_shadow_len_after_address_max): ... this.  All
10049         references updated.
10050         (bp_location_compare_addrs): Rename to ...
10051         (bp_locations_compare_addrs): ... this.  All references updated.
10052         (bp_location_compare):Rename to ...
10053         (bp_locations_compare): ... this.  All references updated.
10054         (bp_location_target_extensions_update): Rename to ...
10055         (bp_locations_target_extensions_update): ... this.  All references
10056         updated.
10057
10058 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10059
10060         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
10061         * common/common.m4: Check headers 'termios.h', 'termio.h' and
10062         'sgtty.h'.
10063         * common/gdb_termios.h: New file, with parts of "terminal.h".
10064         * inflow.c: Include "gdb_termios.h".
10065         * ser-unix.c: Include "gdb_termios.h".
10066         * terminal.h: Move terminal-related defines to
10067         "common/gdb_termios.h".
10068
10069 2017-04-12  Tom Tromey  <tom@tromey.com>
10070
10071         * probe.c (parse_probes): Update.
10072         * location.h (delete_event_location): Don't declare.
10073         (event_location_deleter::operator()): Update.
10074         * location.c (event_location_deleter::operator()): Rename from
10075         delete_event_location.
10076         * linespec.h (linespec_result) <location>: Change type to
10077         event_location_up.
10078         * linespec.c (canonicalize_linespec, event_location_to_sals)
10079         (decode_objc): Update.
10080         (linespec_result): Don't call delete_event_location.
10081         * breakpoint.c (create_breakpoints_sal)
10082         (bkpt_probe_create_sals_from_location)
10083         (strace_marker_create_sals_from_location): Update.
10084
10085 2017-04-12  Tom Tromey  <tom@tromey.com>
10086
10087         * linespec.h (struct linespec_result): Add constructor and
10088         destructor.
10089         (init_linespec_result, destroy_linespec_result)
10090         (make_cleanup_destroy_linespec_result): Don't declare.
10091         * linespec.c (init_linespec_result): Remove.
10092         (linespec_result::~linespec_result): Rename from
10093         destroy_linespec_result.  Update.
10094         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
10095         Remove.
10096         * breakpoint.c (create_breakpoint, break_range_command)
10097         (decode_location_default): Update.
10098         * ax-gdb.c (agent_command_1): Update.
10099
10100 2017-04-12  Tom Tromey  <tom@tromey.com>
10101
10102         * remote.c (remote_download_tracepoint): Update.
10103         * python/py-breakpoint.c (bppy_get_location): Update.
10104         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
10105         (gdbscm_breakpoint_location): Update.
10106         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
10107         * breakpoint.h (struct breakpoint) <location, location_range_end>:
10108         Change type to event_location_up.
10109         * breakpoint.c (create_overlay_event_breakpoint)
10110         (create_longjmp_master_breakpoint)
10111         (create_std_terminate_master_breakpoint)
10112         (create_exception_master_breakpoint)
10113         (breakpoint_event_location_empty_p, print_breakpoint_location)
10114         (print_one_breakpoint_location, create_thread_event_breakpoint)
10115         (init_breakpoint_sal, create_breakpoint)
10116         (print_recreate_ranged_breakpoint, break_range_command)
10117         (init_ada_exception_breakpoint, say_where): Update.
10118         (base_breakpoint_dtor): Don't call delete_event_location.
10119         (bkpt_print_recreate, tracepoint_print_recreate)
10120         (dprintf_print_recreate, update_static_tracepoint)
10121         (breakpoint_re_set_default): Update.
10122
10123 2017-04-12  Tom Tromey  <tom@tromey.com>
10124
10125         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
10126         type of "to_do".  Update.
10127         (compute_stack_depth): Use std::vector.
10128
10129 2017-04-12  Tom Tromey  <tom@tromey.com>
10130
10131         * printcmd.c (find_instruction_backward): Use std::vector.
10132
10133 2017-04-12  Tom Tromey  <tom@tromey.com>
10134
10135         * symfile.c (objfilep): Remove typedef.
10136         (reread_symbols): Use a std::vector.
10137
10138 2017-04-12  Tom Tromey  <tom@tromey.com>
10139
10140         * mi/mi-main.c (exec_direction_forward): Remove.
10141         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
10142         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
10143         scoped_restore.
10144         * guile/guile.c (guile_repl_command, guile_command)
10145         (gdbscm_execute_gdb_command): Use scoped_restore.
10146         * go-exp.y (go_parse): Use scoped_restore.
10147         * d-exp.y (d_parse): Use scoped_restore.
10148         * cli/cli-decode.c (cmd_func): Use scoped_restore.
10149         * c-exp.y (c_parse): Use scoped_restore.
10150
10151 2017-04-12  Tom Tromey  <tom@tromey.com>
10152
10153         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
10154         (mi_parse): Update return type.
10155         (mi_parse_free): Remove.
10156         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
10157         (mi_parse::~mi_parse): Rename from mi_parse_free.
10158         (mi_parse_cleanup): Remove.
10159         (mi_parse): Return a unique_ptr.  Use new.
10160         * mi/mi-main.c (mi_execute_command): Update.
10161
10162 2017-04-12  Tom Tromey  <tom@tromey.com>
10163
10164         * location.c (explicit_location_lex_one): Return a
10165         unique_xmalloc_ptr.
10166         (string_to_explicit_location): Update.  Remove cleanups.
10167
10168 2017-04-12  Tom Tromey  <tom@tromey.com>
10169
10170         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
10171         (compare_value_and_voffset): Change type.  Update.
10172         (compute_vtable_size): Change type of "offset_vec".
10173         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
10174         (gnuv3_get_typeid): Remove extraneous declaration.
10175
10176 2017-04-12  Tom Tromey  <tom@tromey.com>
10177
10178         * charset.h (wchar_iterator): Fix comment.
10179
10180 2017-04-12  Tom Tromey  <tom@tromey.com>
10181
10182         * charset.c (iconv_wrapper): New class.
10183         (cleanup_iconv): Remove.
10184         (convert_between_encodings): Use it.
10185
10186 2017-04-12  Tom Tromey  <tom@tromey.com>
10187
10188         * symfile.h (increment_reading_symtab): Update type.
10189         * symfile.c (decrement_reading_symtab): Remove.
10190         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
10191         * psymtab.c (psymtab_to_symtab): Update.
10192         * dwarf2read.c (dw2_instantiate_symtab): Update.
10193
10194 2017-04-12  Tom Tromey  <tom@tromey.com>
10195
10196         * jit.c (struct jit_reader): Declare separately.  Add constructor
10197         and destructor.  Change type of "handle".
10198         (loaded_jit_reader): Define separately.
10199         (jit_reader_load): Update.  New "new".
10200         (jit_reader_unload_command): Use "delete".
10201         * gdb-dlfcn.h (struct dlclose_deleter): New.
10202         (gdb_dlhandle_up): New typedef.
10203         (gdb_dlopen, gdb_dlsym): Update types.
10204         (gdb_dlclose): Remove.
10205         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
10206         (gdb_dlsym): Change type of "handle".
10207         (make_cleanup_dlclose): Remove.
10208         (dlclose_deleter::operator()): Rename from gdb_dlclose.
10209         * compile/compile-c-support.c (load_libcc): Update.
10210
10211 2017-04-12  Tom Tromey  <tom@tromey.com>
10212
10213         * symtab.h (find_pcs_for_symtab_line): Change return type.
10214         * symtab.c (find_pcs_for_symtab_line): Change return type.
10215         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
10216         type of "vec".  Update.
10217         (ltpy_get_pcs_for_line): Update.
10218         * linespec.c (decode_digits_ordinary): Update.
10219
10220 2017-04-12  Tom Tromey  <tom@tromey.com>
10221
10222         * tracepoint.c (actions_command): Update.
10223         * python/python.c (python_command, python_interactive_command):
10224         Update.
10225         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10226         * guile/guile.c (guile_command): Update.
10227         * defs.h (read_command_lines, read_command_lines_1): Return
10228         command_line_up.
10229         (command_lines_deleter): New struct.
10230         (command_line_up): New typedef.
10231         * compile/compile.c (compile_code_command)
10232         (compile_print_command): Update.
10233         * cli/cli-script.h (get_command_line, copy_command_lines): Return
10234         command_line_up.
10235         (make_cleanup_free_command_lines): Remove.
10236         * cli/cli-script.c (get_command_line, read_command_lines_1)
10237         (copy_command_lines): Return command_line_up.
10238         (while_command, if_command, read_command_lines, define_command)
10239         (document_command): Update.
10240         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
10241         Remove.
10242         * breakpoint.h (breakpoint_set_commands): Change type of
10243         "commands".
10244         * breakpoint.c (breakpoint_set_commands): Change type of
10245         "commands".  Update.
10246         (do_map_commands_command, update_dprintf_command_list)
10247         (create_tracepoint_from_upload): Update.
10248
10249 2017-04-12  Tom Tromey  <tom@tromey.com>
10250
10251         * tracepoint.c (scope_info): Update.
10252         * spu-tdep.c (spu_catch_start): Update.
10253         * python/python.c (gdbpy_decode_line): Update.
10254         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
10255         * python/py-breakpoint.c (bppy_init): Update.
10256         * probe.c (parse_probes): Update.
10257         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
10258         * location.h (event_location_deleter): New struct.
10259         (event_location_up): New typedef.
10260         (new_linespec_location, new_address_location, new_probe_location)
10261         (new_explicit_location, copy_event_location)
10262         (string_to_event_location, string_to_event_location_basic)
10263         (string_to_explicit_location): Update return type.
10264         (make_cleanup_delete_event_location): Remove.
10265         * location.c (new_linespec_location, new_address_location)
10266         (new_probe_location, new_explicit_location, copy_event_location):
10267         Return event_location_up.
10268         (delete_event_location_cleanup)
10269         (make_cleanup_delete_event_location): Remove.
10270         (string_to_explicit_location, string_to_event_location_basic)
10271         (string_to_event_location): Return event_location_up.
10272         * linespec.c (canonicalize_linespec, event_location_to_sals)
10273         (decode_line_with_current_source)
10274         (decode_line_with_last_displayed, decode_objc): Update.
10275         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
10276         * completer.c (location_completer): Update.
10277         * cli/cli-cmds.c (edit_command, list_command): Update.
10278         * breakpoint.c (create_overlay_event_breakpoint)
10279         (create_longjmp_master_breakpoint)
10280         (create_std_terminate_master_breakpoint)
10281         (create_exception_master_breakpoint)
10282         (create_thread_event_breakpoint): Update.
10283         (init_breakpoint_sal): Update.  Remove some dead code.
10284         (create_breakpoint_sal): Change type of "location".  Update.
10285         (create_breakpoints_sal, create_breakpoint, break_command_1)
10286         (dprintf_command, break_range_command, until_break_command)
10287         (init_ada_exception_breakpoint)
10288         (strace_marker_create_sals_from_location)
10289         (update_static_tracepoint, trace_command, ftrace_command)
10290         (strace_command, create_tracepoint_from_upload): Update.
10291         * break-catch-throw.c (re_set_exception_catchpoint): Update.
10292         * ax-gdb.c (agent_command_1): Update.
10293
10294 2017-04-12  Pedro Alves  <palves@redhat.com>
10295
10296         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
10297         * configure.tgt: Handle i[34567]86-*-go32* and
10298         i[34567]86-*-msdosdjgpp*.
10299         * i386-tdep.c (i386_svr4_reg_to_regnum):
10300         Make extern.
10301         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
10302         i386-go32-tdep.c.
10303         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
10304         * i386-go32-tdep.c: New file.
10305         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
10306         declarations.
10307
10308 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
10309
10310         * aix-thread.c (pd_status2str): Change return type to const char *.
10311
10312 2017-04-12  Pedro Alves  <palves@redhat.com>
10313
10314         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
10315         calls to set_gdbarch_gnu_triplet_regexp.
10316
10317 2017-04-12  Pedro Alves  <palves@redhat.com>
10318
10319         PR gdb/21323
10320         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
10321         New enum value.
10322         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
10323         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
10324         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
10325         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
10326         * gdbarch.h, gdbarch.c: Regenerate.
10327         * aarch64-tdep.c (aarch64_gdbarch_init): Override
10328         gdbarch_wchar_bit and gdbarch_wchar_signed.
10329         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
10330         * arm-tdep.c (arm_gdbarch_init): Likewise.
10331         * avr-tdep.c (avr_gdbarch_init): Likewise.
10332         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
10333         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
10334         * i386-tdep.c (i386_go32_init_abi): Likewise.
10335         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10336         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10337         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10338         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10339         * sh-tdep.c (sh_gdbarch_init): Likewise.
10340         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10341         * sparc64-tdep.c (sparc64_init_abi): Likewise.
10342         * windows-tdep.c (windows_init_abi): Likewise.
10343         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10344
10345 2017-04-12  Pedro Alves  <palves@redhat.com>
10346
10347         PR c++/21323
10348         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
10349         cplus_primitive_type_char32_t>: New enum values.
10350         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
10351         and cplus_primitive_type_char32_t.
10352         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
10353         32, use the archtecture's built-in type for char16_t and char32_t,
10354         respectively.  Otherwise, fallback to init_integer_type as before,
10355         but make the type unsigned, and issue a complaint.
10356         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
10357
10358 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
10359
10360         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
10361         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
10362
10363 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10364
10365         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
10366         'const char *'.
10367
10368 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10369
10370         * common/common-utils.c (free_vector_argv): New function.
10371         * common/common-utils.h: Include <vector>.
10372         (free_vector_argv): New prototype.
10373         * darwin-nat.c (darwin_create_inferior): Rewrite function
10374         prototype in order to constify "exec_file" and accept a
10375         "std::string" for "allargs".
10376         * fork-child.c: Include <vector>.
10377         (breakup_args): Rewrite function, using C++.
10378         (fork_inferior): Rewrite function header, constify "exec_file_arg"
10379         and accept "std::string" for "allargs".  Update the code to
10380         calculate "argv" based on "allargs".  Update calls to "exec_fun"
10381         and "execvp".
10382         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
10383         order to constify "exec_file" and accept a "std::string" for
10384         "allargs".
10385         * go32-nat.c (go32_create_inferior): Likewise.
10386         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
10387         * infcmd.c (run_command_1): Constify "exec_file".  Use
10388         "std::string" for inferior arguments.
10389         * inferior.h (fork_inferior): Update prototype.
10390         * linux-nat.c (linux_nat_create_inferior): Rewrite function
10391         prototype in order to constify "exec_file" and accept a
10392         "std::string" for "allargs".
10393         * nto-procfs.c (procfs_create_inferior): Likewise.
10394         * procfs.c (procfs_create_inferior): Likewise.
10395         * remote-sim.c (gdbsim_create_inferior): Likewise.
10396         * remote.c (extended_remote_run): Update code to accept
10397         "std::string" as argument.
10398         (extended_remote_create_inferior): Rewrite function prototype in
10399         order to constify "exec_file" and accept a "std::string" for
10400         "allargs".
10401         * rs6000-nat.c (super_create_inferior): Likewise.
10402         (rs6000_create_inferior): Likewise.
10403         * target.h (struct target_ops) <to_create_inferior>: Likewise.
10404         * windows-nat.c (windows_create_inferior): Likewise.
10405
10406 2017-04-11  Pedro Alves  <palves@redhat.com>
10407
10408         * thread.c: Fix whitespace throughout.
10409
10410 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10411
10412         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
10413
10414 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
10415
10416         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
10417
10418 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
10419
10420         PR gdb/21364
10421         * osdata.c (info_osdata): Check if 'type' is an empty string
10422         instead of NULL.
10423
10424 2017-04-10  Pedro Alves  <palves@redhat.com>
10425
10426         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
10427         (ptid_to_global_thread_id, in_thread_list)
10428         (do_captured_list_thread_ids, set_resumed, set_running)
10429         (set_executing, set_stop_requested, finish_thread_state)
10430         (validate_registers_access, can_access_registers_ptid)
10431         (print_thread_info_1, switch_to_thread)
10432         (do_restore_current_thread_cleanup)
10433         (make_cleanup_restore_current_thread, thread_command)
10434         (thread_name_command): Use operator== instead of ptid_equal.
10435
10436 2017-04-10  Pedro Alves  <palves@redhat.com>
10437
10438         * thread.c (struct current_thread_cleanup) <next>: Delete field.
10439         (current_thread_cleanup_chain): Delete.
10440         (restore_current_thread_cleanup_dtor)
10441         (make_cleanup_restore_current_thread): Remove references to
10442         current_thread_cleanup_chain.
10443
10444 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
10445
10446         * msp430-tdep.c (msp430_pseudo_register_read): Never return
10447         REG_UNKNOWN.
10448
10449 2017-04-10  Yao Qi  <yao.qi@linaro.org>
10450
10451         PR gdb/19942
10452         * gdbthread.h (thread_info::deletable): New method.
10453         (thread_info::incref): New method.
10454         (thread_info::decref): New method.
10455         (thread_info::refcount): Move it to private.
10456         * infrun.c (save_stop_context): Call inc_refcount.
10457         (release_stop_context_cleanup): Likewise.
10458         * thread.c (set_thread_exited): New function.
10459         (init_thread_list): Delete "tp" only it is deletable, otherwise
10460         call set_thread_exited.
10461         (delete_thread_1): Call set_thread_exited.
10462         (current_thread_cleanup) <inferior_pid>: Remove.
10463         <thread>: New field.
10464         (restore_current_thread_ptid_changed): Removed.
10465         (do_restore_current_thread_cleanup): Adjust.
10466         (restore_current_thread_cleanup_dtor): Don't call
10467         find_thread_ptid.
10468         (set_thread_refcount): Use dec_refcount.
10469         (make_cleanup_restore_current_thread): Adjust.
10470         (thread_apply_all_command): Call inc_refcount.
10471         (_initialize_thread): Don't call
10472         observer_attach_thread_ptid_changed.
10473
10474 2017-04-10  Yao Qi  <yao.qi@linaro.org>
10475
10476         * thread.c (delete_thread_1): Hoist code on marking thread as
10477         exited.
10478
10479 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10480
10481         * windows-nat.c (windows_detach): Initialize ptid with
10482         minus_one_ptid.
10483
10484 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10485
10486         * unittests/ptid-selftests.c: Fix erroneous assert messages.
10487
10488 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
10489
10490         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
10491         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
10492         (bfin_pseudo_register_write): Likewise
10493
10494 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
10495
10496         * common/ptid.h (struct ptid): Change to...
10497         (class ptid_t): ... this.
10498         <ptid_t>: New constructors.
10499         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
10500         matches>: New methods.
10501         <make_null, make_minus_one>: New static methods.
10502         <pid>: Rename to...
10503         <m_pid>: ...this.
10504         <lwp>: Rename to...
10505         <m_lwp>: ...this.
10506         <tid>: Rename to...
10507         <m_tid>: ...this.
10508         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
10509         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
10510         as references, move comment to class ptid_t.
10511         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
10512         ptid_t static methods.
10513         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
10514         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
10515         Take ptid arguments as references, implement using ptid_t methods.
10516         * unittests/ptid-selftests.c: New file.
10517         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10518         unittests/ptid-selftests.c.
10519         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
10520
10521 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
10522
10523         * python/python.c (python_run_simple_file): Cast mode literal to
10524         non-const char pointer as expected by PyFile_FromString.
10525
10526 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
10527
10528         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
10529         minus_one_ptid and null_ptid.
10530
10531 2017-04-05  Pedro Alves  <palves@redhat.com>
10532
10533         * warning.m4 (build_warnings): Remove -Wno-write-strings.
10534         * configure: Regenerate.
10535
10536 2017-04-05  Pedro Alves  <palves@redhat.com>
10537
10538         * ada-exp.y (yyerror): Constify.
10539         * ada-lang.c (bound_name, get_selections)
10540         (ada_variant_discrim_type)
10541         (ada_variant_discrim_name, ada_value_struct_elt)
10542         (ada_lookup_struct_elt_type, is_unchecked_variant)
10543         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
10544         (catch_ada_exception_command_split)
10545         (catch_ada_assert_command_split, catch_assert_command)
10546         (ada_op_name): Constify.
10547         * ada-lang.h (ada_yyerror, get_selections)
10548         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
10549         * arc-tdep.c (arc_print_frame_cache): Constify.
10550         * arm-tdep.c (arm_skip_stub): Constify.
10551         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
10552         (gen_aggregate_elt_ref): Constify.
10553         * bcache.c (print_bcache_statistics): Constify.
10554         * bcache.h (print_bcache_statistics): Constify.
10555         * break-catch-throw.c (catch_exception_command_1):
10556         * breakpoint.c (struct ep_type_description::description):
10557         Constify.
10558         (add_solib_catchpoint): Constify.
10559         (catch_fork_command_1): Add cast.
10560         (add_catch_command): Constify.
10561         * breakpoint.h (add_catch_command, add_solib_catchpoint):
10562         Constify.
10563         * bsd-uthread.c (bsd_uthread_state): Constify.
10564         * buildsym.c (patch_subfile_names): Constify.
10565         * buildsym.h (next_symbol_text_func, patch_subfile_names):
10566         Constify.
10567         * c-exp.y (yyerror): Constify.
10568         (token::oper): Constify.
10569         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
10570         * c-varobj.c (cplus_describe_child): Constify.
10571         * charset.c (find_charset_names): Add cast.
10572         (find_charset_names): Constify array and add const_cast.
10573         * cli/cli-cmds.c (complete_command, cd_command): Constify.
10574         (edit_command): Constify.
10575         * cli/cli-decode.c (lookup_cmd): Constify.
10576         * cli/cli-dump.c (dump_memory_command, dump_value_command):
10577         Constify.
10578         (struct dump_context): Constify.
10579         (add_dump_command, restore_command): Constify.
10580         * cli/cli-script.c (get_command_line): Constify.
10581         * cli/cli-script.h (get_command_line): Constify.
10582         * cli/cli-utils.c (check_for_argument): Constify.
10583         * cli/cli-utils.h (check_for_argument): Constify.
10584         * coff-pe-read.c (struct read_pe_section_data): Constify.
10585         * command.h (lookup_cmd): Constify.
10586         * common/print-utils.c (decimal2str): Constify.
10587         * completer.c (gdb_print_filename): Constify.
10588         * corefile.c (set_gnutarget): Constify.
10589         * cp-name-parser.y (yyerror): Constify.
10590         * cp-valprint.c (cp_print_class_member): Constify.
10591         * cris-tdep.c (cris_register_name, crisv32_register_name):
10592         Constify.
10593         * d-exp.y (yyerror): Constify.
10594         (struct token::oper): Constify.
10595         * d-lang.h (d_yyerror): Constify.
10596         * dbxread.c (struct header_file_location::name): Constify.
10597         (add_old_header_file, add_new_header_file, last_function_name)
10598         (dbx_next_symbol_text, add_bincl_to_list)
10599         (find_corresponding_bincl_psymtab, set_namestring)
10600         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
10601         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
10602         * defs.h (command_line_input, print_address_symbolic)
10603         (deprecated_readline_begin_hook): Constify.
10604         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
10605         Constify.
10606         * event-top.c (handle_line_of_input): Constify and add cast.
10607         * exceptions.c (catch_errors): Constify.
10608         * exceptions.h (catch_errors): Constify.
10609         * expprint.c (print_subexp_standard, op_string, op_name)
10610         (op_name_standard, dump_raw_expression, dump_raw_expression):
10611         * expression.h (op_name, op_string, dump_raw_expression):
10612         Constify.
10613         * f-exp.y (yyerror): Constify.
10614         (struct token::oper): Constify.
10615         (struct f77_boolean_val::name): Constify.
10616         * f-lang.c (f_word_break_characters): Constify.
10617         * f-lang.h (f_yyerror): Constify.
10618         * fork-child.c (fork_inferior): Add cast.
10619         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
10620         (new_variant): Constify.
10621         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
10622         * gdbarch.c: Regenerate.
10623         * gdbcore.h (set_gnutarget): Constify.
10624         * go-exp.y (yyerror): Constify.
10625         (token::oper): Constify.
10626         * go-lang.h (go_yyerror): Constify.
10627         * go32-nat.c (go32_sysinfo): Constify.
10628         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
10629         * guile/scm-cmd.c (cmdscm_function): Constify.
10630         * guile/scm-param.c (pascm_param_value): Constify.
10631         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
10632         (h8300sx_register_name): Constify.
10633         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
10634         Constify.
10635         * ia64-tdep.c (ia64_register_names): Constify.
10636         * infcmd.c (construct_inferior_arguments): Constify.
10637         (path_command, attach_post_wait): Constify.
10638         * language.c (show_range_command, show_case_command)
10639         (unk_lang_error): Constify.
10640         * language.h (language_defn::la_error)
10641         (language_defn::la_name_of_this): Constify.
10642         * linespec.c (decode_line_2): Constify.
10643         * linux-thread-db.c (thread_db_err_str): Constify.
10644         * lm32-tdep.c (lm32_register_name): Constify.
10645         * m2-exp.y (yyerror): Constify.
10646         * m2-lang.h (m2_yyerror): Constify.
10647         * m32r-tdep.c (m32r_register_names): Constify and make static.
10648         * m68hc11-tdep.c (m68hc11_register_names): Constify.
10649         * m88k-tdep.c (m88k_register_name): Constify.
10650         * macroexp.c (appendmem): Constify.
10651         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
10652         (upgrade_type, parse_external, parse_partial_symbols)
10653         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
10654         (new_symbol): Constify.
10655         * memattr.c (mem_info_command): Constify.
10656         * mep-tdep.c (register_name_from_keyword): Constify.
10657         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
10658         Constify.
10659         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
10660         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
10661         * mi/mi-main.c (captured_mi_execute_command): Constify and add
10662         cast.
10663         (mi_execute_async_cli_command): Constify.
10664         * mips-tdep.c (mips_register_name): Constify.
10665         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
10666         (am33_register_name, am33_2_register_name)
10667         * moxie-tdep.c (moxie_register_names): Constify.
10668         * nat/linux-osdata.c (osdata_type): Constify fields.
10669         * nto-tdep.c (nto_parse_redirection): Constify.
10670         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
10671         (lookup_child_selector): Constify.
10672         (objc_methcall::name): Constify.
10673         * objc-lang.h (lookup_objc_class, lookup_child_selector)
10674         (lookup_struct_typedef): Constify.
10675         * objfiles.c (pc_in_section): Constify.
10676         * objfiles.h (pc_in_section): Constify.
10677         * p-exp.y (struct token::oper): Constify.
10678         (yyerror): Constify.
10679         * p-lang.h (pascal_yyerror): Constify.
10680         * parser-defs.h (op_name_standard): Constify.
10681         (op_print::string): Constify.
10682         (exp_descriptor::op_name): Constify.
10683         * printcmd.c (print_address_symbolic): Constify.
10684         * psymtab.c (print_partial_symbols): Constify.
10685         * python/py-breakpoint.c (stop_func): Constify.
10686         (bppy_get_expression): Constify.
10687         * python/py-cmd.c (cmdpy_completer::name): Constify.
10688         (cmdpy_function): Constify.
10689         * python/py-event.c (evpy_add_attribute)
10690         (gdbpy_initialize_event_generic): Constify.
10691         * python/py-event.h (evpy_add_attribute)
10692         (gdbpy_initialize_event_generic): Constify.
10693         * python/py-evts.c (add_new_registry): Constify.
10694         * python/py-finishbreakpoint.c (outofscope_func): Constify.
10695         * python/py-framefilter.c (get_py_iter_from_func): Constify.
10696         * python/py-inferior.c (get_buffer): Add cast.
10697         * python/py-param.c (parm_constant::name): Constify.
10698         * python/py-unwind.c (fprint_frame_id): Constify.
10699         * python/python.c (gdbpy_parameter_value): Constify.
10700         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
10701         * remote.c (memory_packet_config::name): Constify.
10702         (show_packet_config_cmd, remote_write_bytes)
10703         (remote_buffer_add_string):
10704         * reverse.c (exec_reverse_once): Constify.
10705         * rs6000-tdep.c (variant::name, variant::description): Constify.
10706         * rust-exp.y (rustyyerror): Constify.
10707         * rust-lang.c (rust_op_name): Constify.
10708         * rust-lang.h (rustyyerror): Constify.
10709         * serial.h (serial_ops::name): Constify.
10710         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
10711         (sh_sh3e_register_name, sh_sh2e_register_name)
10712         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
10713         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
10714         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
10715         (sh_sh4al_dsp_register_name): Constify.
10716         * sh64-tdep.c (sh64_register_name): Constify.
10717         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
10718         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
10719         * stabsread.c (patch_block_stabs, read_type_number)
10720         (ref_map::stabs, ref_add, process_reference)
10721         (symbol_reference_defined, define_symbol, define_symbol)
10722         (error_type, read_type, read_member_functions, read_cpp_abbrev)
10723         (read_one_struct_field, read_struct_fields, read_baseclasses)
10724         (read_tilde_fields, read_struct_type, read_array_type)
10725         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
10726         (read_huge_number, read_range_type, read_args, common_block_start)
10727         (find_name_end): Constify.
10728         * stabsread.h (common_block_start, define_symbol)
10729         (process_one_symbol, symbol_reference_defined, ref_add):
10730         * symfile.c (get_section_index, add_symbol_file_command):
10731         * symfile.h (get_section_index): Constify.
10732         * target-descriptions.c (tdesc_type::name): Constify.
10733         (tdesc_free_type): Add cast.
10734         * target.c (find_default_run_target):
10735         (add_deprecated_target_alias, find_default_run_target)
10736         (target_announce_detach): Constify.
10737         (do_option): Constify.
10738         * target.h (add_deprecated_target_alias): Constify.
10739         * thread.c (print_thread_info_1): Constify.
10740         * top.c (deprecated_readline_begin_hook, command_line_input):
10741         Constify.
10742         (init_main): Add casts.
10743         * top.h (handle_line_of_input): Constify.
10744         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
10745         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
10746         (tfind_command): Rename to ...
10747         (tfind_command_1): ... this and constify.
10748         (tfind_command): New function.
10749         (tfind_end_command, tfind_start_command): Adjust.
10750         (encode_source_string): Constify.
10751         * tracepoint.h (encode_source_string): Constify.
10752         * tui/tui-data.c (tui_partial_win_by_name): Constify.
10753         * tui/tui-data.h (tui_partial_win_by_name): Constify.
10754         * tui/tui-source.c (tui_set_source_content_nil): Constify.
10755         * tui/tui-source.h (tui_set_source_content_nil): Constify.
10756         * tui/tui-win.c (parse_scrolling_args): Constify.
10757         * tui/tui-windata.c (tui_erase_data_content): Constify.
10758         * tui/tui-windata.h (tui_erase_data_content): Constify.
10759         * tui/tui-winsource.c (tui_erase_source_content): Constify.
10760         * tui/tui.c (tui_enable): Add cast.
10761         * utils.c (defaulted_query): Constify.
10762         (init_page_info): Add cast.
10763         (puts_debug, subset_compare): Constify.
10764         * utils.h (subset_compare): Constify.
10765         * varobj.c (varobj_format_string): Constify.
10766         * varobj.h (varobj_format_string): Constify.
10767         * vax-tdep.c (vax_register_name): Constify.
10768         * windows-nat.c (windows_detach): Constify.
10769         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
10770         * xml-support.c (gdb_xml_end_element): Constify.
10771         * xml-tdesc.c (tdesc_start_reg): Constify.
10772         * xstormy16-tdep.c (xstormy16_register_name): Constify.
10773         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
10774         * xtensa-tdep.h (xtensa_register_t::name): Constify.
10775
10776 2017-04-05  Pedro Alves  <palves@redhat.com>
10777
10778         * proc-api.c (struct trans): Constify.
10779         (procfs_note): Constify.
10780         * proc-events.c (struct trans, syscall_table):
10781         * proc-flags.c (struct trans): Constify.
10782         * proc-utils.h (procfs_note): Constify.
10783         * proc-why.c (struct trans): Constify.
10784         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
10785         (procfs_detach): Constify.
10786         * sol-thread.c (struct string_map): Constify.
10787         (td_err_string, td_state_string): Constify.
10788
10789 2017-04-05  Pedro Alves  <palves@redhat.com>
10790
10791         * proc-api.c (procfs_filename): Don't initialize
10792         procfs_filename.
10793         (prepare_to_trace): Assume procfs_filename is non-NULL.
10794         (_initialize_proc_api): Give procfs_filename a default value here.
10795
10796 2017-04-05  Pedro Alves  <palves@redhat.com>
10797
10798         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
10799         'cond_string' parameter.
10800         (extract_exception_regexp): Constify 'string' parameter.
10801         (catch_exception_command_1): Constify.
10802         * breakpoint.c (init_catchpoint)
10803         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
10804         parameter.
10805         (ep_parse_optional_if_clause, catch_fork_command_1)
10806         (catch_exec_command_1): Constify.
10807         * breakpoint.h (init_catchpoint): Constify 'cond_string'
10808         parameter.
10809         (ep_parse_optional_if_clause): Constify.
10810         * cli/cli-utils.c (remove_trailing_whitespace)
10811         (check_for_argument): Constify.
10812         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
10813         non-const overload.
10814         (check_for_argument): Likewise.
10815
10816 2017-04-05  Pedro Alves  <palves@redhat.com>
10817
10818         * event-top.c (command_line_handler): Add cast to execute_command
10819         call.
10820         * record-btrace.c (cmd_record_btrace_bts_start)
10821         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
10822         (cmd_record_btrace_start): Add cast to execute_command call.
10823         * record-full.c (record_full_goto_insn):
10824         * record.c (record_start, record_stop): Add cast to
10825         execute_command_to_string calls.
10826         (cmd_record_start): Add cast to execute_command calls.
10827
10828 2017-04-05  Pedro Alves  <palves@redhat.com>
10829
10830         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
10831         static inline function.
10832         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
10833         array and use gdb_PyArg_ParseTupleAndKeywords.
10834         * python/py-cmd.c (cmdpy_init): Likewise.
10835         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
10836         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
10837         (infpy_search_memory): Likewise.
10838         * python/py-objfile.c (objfpy_add_separate_debug_file)
10839         (gdbpy_lookup_objfile): Likewise.
10840         * python/py-symbol.c (gdbpy_lookup_symbol)
10841         (gdbpy_lookup_global_symbol): Likewise.
10842         * python/py-type.c (gdbpy_lookup_type): Likewise.
10843         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
10844         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
10845         Likewise.
10846
10847 2017-04-05  Pedro Alves  <palves@redhat.com>
10848
10849         * python/python-internal.h (gdb_PyGetSetDef): New type.
10850         * python/py-block.c (block_object_getset)
10851         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
10852         * python/py-event.c (event_object_getset)
10853         (finish_breakpoint_object_getset): Likewise.
10854         * python/py-inferior.c (inferior_object_getset): Likewise.
10855         * python/py-infthread.c (thread_object_getset): Likewise.
10856         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
10857         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
10858         * python/py-objfile.c (objfile_getset): Likewise.
10859         * python/py-progspace.c (pspace_getset): Likewise.
10860         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
10861         Likewise.
10862         * python/py-record.c (recpy_record_getset): Likewise.
10863         * python/py-symbol.c (symbol_object_getset): Likewise.
10864         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
10865         Likewise.
10866         * python/py-type.c (type_object_getset, field_object_getset):
10867         Likewise.
10868         * python/py-value.c (value_object_getset): Likewise.
10869
10870 2017-04-05  Pedro Alves  <palves@redhat.com>
10871
10872         * python/python-internal.h (gdb_PyObject_CallMethod)
10873         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
10874         New functions.
10875         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
10876         (PySys_GetObject, PySys_SetPath): New macros.
10877
10878 2017-04-05  Pedro Alves  <palves@redhat.com>
10879
10880         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
10881         info_osdata_command.
10882         * osdata.c (info_osdata_command): Rename to ...
10883         (info_osdata): ... this.  Constify 'type' parameter, and remove
10884         the 'from_tty' parameter.  Accept NULL TYPE.
10885         (info_osdata_command): New function.
10886         * osdata.h (info_osdata_command): Remove declaration.
10887         (info_osdata): New declaration.
10888
10889 2017-04-05  Pedro Alves  <palves@redhat.com>
10890
10891         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
10892         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
10893         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
10894         parameter.
10895         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
10896         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
10897         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
10898         parameter.
10899         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
10900         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
10901         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
10902         (mi_cmd_file_list_exec_source_files)
10903         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
10904         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
10905         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
10906         parameter.
10907         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
10908         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
10909         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
10910         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
10911         (mi_cmd_stack_info_frame): Constify 'command' parameter.
10912         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
10913         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
10914         'command' parameter.
10915         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
10916         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
10917         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
10918         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
10919         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
10920         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
10921         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
10922         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
10923         (mi_cmd_var_set_update_range): Constify 'command' parameter.
10924         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
10925         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
10926         parameter.
10927         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
10928         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
10929         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
10930         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
10931         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
10932         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
10933         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
10934         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
10935         (mi_cmd_data_list_changed_registers)
10936         (mi_cmd_data_write_register_values)
10937         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
10938         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
10939         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
10940         (mi_cmd_list_features, mi_cmd_list_target_features)
10941         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
10942         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
10943         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
10944         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
10945         (mi_cmd_trace_frame_collected): Constify 'command'
10946         parameter.
10947         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
10948         'command' parameter.
10949
10950 2017-04-05  Pedro Alves  <palves@redhat.com>
10951
10952         * ada-lang.c (ada_completer_word_break_characters): Now a const
10953         array.
10954         (ada_get_gdb_completer_word_break_characters): Constify.
10955         * completer.c (gdb_completer_command_word_break_characters)
10956         (gdb_completer_file_name_break_characters)
10957         (gdb_completer_quote_characters): Now const arrays.
10958         (get_gdb_completer_quote_characters): Constify.
10959         (set_rl_completer_word_break_characters): New function.
10960         (set_gdb_completion_word_break_characters)
10961         (complete_line_internal): Use it.
10962         * completer.h (get_gdb_completer_quote_characters): Constify.
10963         (set_rl_completer_word_break_characters): Declare.
10964         * f-lang.c (f_word_break_characters): Constify.
10965         * language.c (default_word_break_characters): Constify.
10966         * language.h (language_defn::la_word_break_characters): Constify.
10967         (default_word_break_characters): Constify.
10968         * top.c (init_main): Use set_rl_completer_word_break_characters.
10969
10970 2017-04-05  Pedro Alves  <palves@redhat.com>
10971
10972         * aix-thread.c (aix_thread_pid_to_str)
10973         (aix_thread_extra_thread_info): Constify.
10974         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
10975         * bsd-uthread.c (bsd_uthread_extra_thread_info)
10976         (bsd_uthread_pid_to_str): Constify.
10977         * corelow.c (core_pid_to_str): Constify.
10978         * darwin-nat.c (darwin_pid_to_str): Constify.
10979         * fbsd-nat.c (fbsd_pid_to_str): Constify.
10980         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
10981         Constify.
10982         * gnu-nat.c (gnu_pid_to_str): Constify.
10983         * go32-nat.c (go32_pid_to_str): Constify.
10984         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
10985         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
10986         * inferior.c (inferior_pid_to_str): Constify.
10987         * linux-nat.c (linux_nat_pid_to_str): Constify.
10988         * linux-tdep.c (linux_core_pid_to_str): Constify.
10989         * linux-thread-db.c (thread_db_pid_to_str)
10990         (thread_db_extra_thread_info): Constify.
10991         * nto-tdep.c (nto_extra_thread_info): Constify.
10992         * nto-tdep.h (nto_extra_thread_info): Constify.
10993         * obsd-nat.c (obsd_pid_to_str): Constify.
10994         * procfs.c (procfs_pid_to_str): Constify.
10995         * ravenscar-thread.c (ravenscar_extra_thread_info)
10996         (ravenscar_pid_to_str): Constify.
10997         * remote-sim.c (gdbsim_pid_to_str): Constify.
10998         * remote.c (remote_threads_extra_info, remote_pid_to_str):
10999         Constify.
11000         * sol-thread.c (solaris_pid_to_str): Constify.
11001         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
11002         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
11003         * target.c (default_pid_to_str, target_pid_to_str)
11004         (normal_pid_to_str, default_pid_to_str): Constify.
11005         * target.h (target_ops::to_pid_to_str)
11006         (target_ops::to_extra_thread_info): Constify.
11007         (target_pid_to_str, normal_pid_to_str): Constify.
11008         * windows-nat.c (windows_pid_to_str): Constify.
11009         * gdbarch.sh (core_pid_to_str): Constify.
11010         * target-delegates.c: Regenerate.
11011         * gdbarch.h, gdbarch.c: Regenerate.
11012
11013 2017-04-05  Pedro Alves  <palves@redhat.com>
11014
11015         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
11016         the memory of the temporary warning_pre_print override.
11017         * utils.c (warning_pre_print): Constify.
11018         * utils.h (warning_pre_print): Constify.
11019
11020 2017-04-05  Pedro Alves  <palves@redhat.com>
11021
11022         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
11023         (shell_command): New function.
11024         (make_command): Use std::string.
11025         (init_cli_cmds): Register shell_command instead of shell_escape.
11026
11027 2017-04-05  Pedro Alves  <palves@redhat.com>
11028
11029         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
11030         * tracepoint.c (default_collect): Don't initialize.
11031
11032 2017-04-05  Pedro Alves  <palves@redhat.com>
11033
11034         * macroexp.c (macro_buffer::shared): Now a bool.
11035         (init_buffer): Update.
11036         (init_shared_buffer): Constify 'addr' parameter.
11037         (substitute_args, expand, macro_expand, macro_expand_next): Remove
11038         casts.
11039
11040 2017-04-05  Pedro Alves  <palves@redhat.com>
11041
11042         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
11043         * disasm.c (set_disassembler_options): Constify local.
11044         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
11045
11046 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
11047
11048         PR gdb/21352
11049         * tracefile.c (tsave_command): Fix argument parsing for '-r'
11050         option.
11051
11052 2017-04-05  Yao Qi  <yao.qi@linaro.org>
11053
11054         * frame.c (frame_unwind_register_unsigned): Call
11055         frame_unwind_register_value.
11056
11057 2017-04-05  Yao Qi  <yao.qi@linaro.org>
11058
11059         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
11060         Use gdb_test_multiple, and don't match anchor.
11061
11062 2017-04-05  Pedro Alves  <palves@redhat.com>
11063
11064         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
11065         (Write After Approval): Remove Simon Marchi.
11066
11067 2017-04-05  Pedro Alves  <palves@redhat.com>
11068
11069         * common/gdb_optional.h (optional::optional): Make constexpr and
11070         initialize m_dummy.
11071
11072 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11073
11074         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11075         (amd64fbsd_jmp_buf_reg_offset): Remove.
11076         (amd64fbsd_supply_uthread): Remove function.
11077         (amd64fbsd_collect_uthread): Remove function.
11078         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
11079         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
11080         (x86_64-*-freebsd*): Remove bsd-uthread.o.
11081         (fbsd-nat.c): Update comment.
11082         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11083         (i386fbsd_jmp_buf_reg_offset): Remove.
11084         (i386fbsd_supply_uthread): Remove function.
11085         (i386fbsd_collect_uthread): Remove function.
11086         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
11087
11088 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11089
11090         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
11091         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
11092         * NEWS: Mention that support for FreeBSD/alpha was removed.
11093         * alpha-fbsd-tdep.c: Delete file.
11094         * config/alpha/fbsd.mh: Delete file.
11095         * configure.host: Delete alpha*-*-freebsd* and
11096         alpha*-*-kfreebsd*-gnu.
11097         * configure.tgt: Delete alpha*-*-freebsd* and
11098         alpha*-*-kfreebsd*-gnu.
11099
11100 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11101
11102         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
11103         amd64bsd_store_inferior_registers): Use ptid from regcache.
11104
11105 2017-04-04  Pedro Alves  <palves@redhat.com>
11106
11107         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
11108         data fields, make them private and add "m_" prefixes.
11109         (lnp_state_machine::lnp_state_machine): New ctor.
11110         (record_line, check_line_address, handle_set_discriminator)
11111         (handle_set_address, handle_advance_pc, handle_special_opcode)
11112         (handle_advance_line, handle_set_file, handle_negate_stmt)
11113         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
11114         (end_sequence, advance_line): New methods.
11115         (m_gdbarch, m_record_lines_p): New fields.
11116         (lnp_reader_state): Delete.
11117         (dwarf_record_line): Rename to ...
11118         (lnp_state_machine::record_line): ... adjust.
11119         (init_lnp_state_machine): Delete.
11120         (lnp_state_machine::lnp_state_machine): New.
11121         (check_line_address): Rename to ...
11122         (lnp_state_machine::check_line_address): This.
11123         (dwarf_decode_lines_1): Remove reference to "reader_state".
11124         Adjust lnp_state_machine having a non-default ctor.  Use bool.
11125         State machine internal state manipulation moved to
11126         lnp_state_machine methods.
11127
11128 2017-04-04  Pedro Alves  <palves@redhat.com>
11129
11130         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11131         unittests/offset-type-selftests.c.
11132         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
11133         * common/offset-type.h: New file.
11134         * common/preprocessor.h: New file.
11135         * common/traits.h: New file.
11136         * common/valid-expr.h: New file.
11137         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
11138         sect_offset and cu_offset strong typedefs throughout.
11139         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
11140         typedefs throughout.
11141         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
11142         sect_offset and cu_offset strong typedefs throughout.
11143         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
11144         typedefs throughout.
11145         * gdbtypes.h: Include "common/offset-type.h".
11146         (cu_offset): Now an offset type (strong typedef) instead of a
11147         struct.
11148         (sect_offset): Likewise.
11149         (union call_site_parameter_u): Rename "param_offset" field to
11150         "param_cu_off".
11151         * unittests/offset-type-selftests.c: New file.
11152
11153 2017-04-04  Pedro Alves  <palves@redhat.com>
11154
11155         * common/underlying.h: New file.
11156         * dwarf2read.c: Include "common/gdb_optional.h" and
11157         "common/underlying.h".
11158         (dir_index, file_name_index): New types.
11159         (file_entry): Use them.
11160         (file_entry::include): Use to_underlying.
11161         (line_header::add_file_name): Use dir_index.
11162         (read_formatted_entries): Use gdb::optional.  Read form before
11163         writting to file_entry.
11164         (dwarf_decode_line_header): Use dir_index.
11165         (lnp_state_machine::current_file): Use to_underlying.
11166         (lnp_state_machine::file): Change type to file_name_index.
11167         (dwarf_record_line): Use to_underlying.
11168         (init_lnp_state_machine): Use file_name_index.
11169         (dwarf_decode_lines_1): Use dir_index and file_name_index.
11170
11171 2017-04-04  Pedro Alves  <palves@redhat.com>
11172
11173         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
11174         operator bool, has_value and get methods.
11175
11176 2017-04-04  Pedro Alves  <palves@redhat.com>
11177
11178         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
11179         fields.
11180         (line_header): Initialize all data fields.  Change type of
11181         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
11182         Change type of include_dirs to std::vector<const char *>.  Remove
11183         num_include_dirs, include_dirs_size.  Change type of file_names to
11184         std::vector<file_entry>.  Remove num_file_names, file_names_size.
11185         (line_header::line_header): New.
11186         (line_header::add_include_dir, line_header::add_file_name): New
11187         methods.
11188         (line_header::include_dir_at): Remove NULL check.
11189         (line_header::file_name_at): Add const overload.
11190         (line_header_up): New unique_ptr typedef.
11191         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
11192         std::vector.  Remove free_line_header call.
11193         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
11194         free_line_header call.
11195         (free_cu_line_header): Delete.
11196         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
11197         (setup_type_unit_groups): Use line_header_up instead of cleanups.
11198         Adjust to use std::vector.
11199         (free_line_header): Delete.
11200         (free_line_header_voidp): Use delete.
11201         (add_include_dir): Replace with ...
11202         (line_header::add_include_dir): ... this method.  Use std::vector.
11203         (add_file_name): Replace with ...
11204         (line_header::add_file_name): ... this method.  Use std::vector.
11205         (add_include_dir_stub): Delete.
11206         (read_formatted_entries): Remove memset.
11207         (dwarf_decode_line_header): Return a line_header_up instead of a
11208         raw pointer.  Remove cleanup handling.  Pass lambdas to
11209         read_formatted_entries.  Adjust to use line_header methods.
11210         (dwarf_decode_lines_1): Adjust to use line_header methods.
11211         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
11212         use std::vector.
11213
11214 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
11215
11216         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
11217         instead of struct ptid.
11218
11219 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
11220
11221         * frame.c (get_frame_register_bytes): Unwind using value.
11222         (put_frame_register_bytes): Likewise.
11223
11224 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
11225
11226         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
11227         aggregate-like.
11228
11229 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
11230
11231         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
11232
11233 2017-03-29  Yao Qi  <yao.qi@linaro.org>
11234
11235         * gdbthread.h (struct thread_info): Declare constructor and
11236         destructor.  Add some in-class member initializers.
11237         * thread.c (free_thread): Remove.
11238         (init_thread_list): Call delete instead of free_thread.
11239         (new_thread): Call thread_info constructor.
11240         (thread_info::thread_info): New function.
11241         (thread_info::~thread_info): New function.
11242         (delete_thread_1): Call delete instead of free_thread.
11243         (make_cleanup_restore_current_thread): Move tp and frame to
11244         inner block.
11245
11246 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11247
11248         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
11249         (arc_skip_prologue): Likewise.
11250         (arc_make_frame_cache): Likewise.
11251         (arc_pv_get_operand): New function.
11252         (arc_is_in_prologue): Likewise.
11253         (arc_analyze_prologue): Likewise.
11254         (arc_print_frame_cache): Likewise.
11255         (MAX_PROLOGUE_LENGTH): New constant.
11256
11257 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11258
11259         * configure.tgt: Add arc-insn.o.
11260         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
11261         (dump_arc_instruction_command): New function.
11262         (arc_fprintf_disasm): Likewise.
11263         (arc_disassemble_info): Likewise.
11264         (arc_insn_get_operand_value): Likewise.
11265         (arc_insn_get_operand_value_signed): Likewise.
11266         (arc_insn_get_memory_base_reg): Likewise.
11267         (arc_insn_get_memory_offset): Likewise.
11268         (arc_insn_get_branch_target): Likewise.
11269         (arc_insn_dump): Likewise.
11270         (arc_insn_get_linear_next_pc): Likewise.
11271         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
11272         (arc_disassemble_info): Likewise.
11273         (arc_insn_get_branch_target): Likewise.
11274         (arc_insn_get_linear_next_pc): Likewise.
11275         * NEWS: Mention new "maint print arc arc-instruction".
11276
11277 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11278
11279         * arc-tdep (maintenance_print_arc_list): New variable.
11280         (maintenance_print_arc_command): New function.
11281
11282 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11283
11284         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
11285         Add "limm" and "reserved".
11286         (arc_cannot_fetch_register, arc_cannot_store_register): Add
11287         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
11288         * arc-tdep.h (arc_regnum): Likewise.
11289
11290 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11291
11292         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11293         for THREADPTR register.
11294         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
11295         register.
11296         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
11297         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
11298         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
11299
11300 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11301
11302         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
11303         registers above gdbarch_num_regs (gdbarch) as privileged in
11304         call0 ABI.
11305
11306 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11307
11308         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11309         for a single specified register or for all registers in
11310         a0_base..a0_base + C0_NREGS range.
11311         (supply_gregset_reg): Call regcache_raw_supply for a single
11312         specified register or for all registers in a0_base..a0_base +
11313         C0_NREGS range.
11314
11315 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11316
11317         * arch/xtensa.h (C0_NREGS): Add definition.
11318         * xtensa-tdep.c (C0_NREGS): Remove definition.
11319
11320 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11321
11322         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
11323         Drop xtensa_default_isa initialization.
11324         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
11325
11326 2017-03-27  Pedro Alves  <palves@redhat.com>
11327
11328         * dwarf2read.c (file_entry) <dir_index>: Add comment.
11329         (file_entry::include_dir): New method.
11330         (line_header::include_dir_at, line_header::file_name_at): New
11331         methods.
11332         (setup_type_unit_groups, setup_type_unit_groups)
11333         (psymtab_include_file_name): Simplify using the new methods.
11334         (lnp_state_machine) <the_line_header>: New field.
11335         <file>: Add comment.
11336         (lnp_state_machine::current_file): New method.
11337         (dwarf_record_line): Simplify using the new methods.
11338         (init_lnp_state_machine): Initialize the "the_line_header" field.
11339         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
11340         Simplify using the new methods.
11341
11342 2017-03-27  Pedro Alves  <palves@redhat.com>
11343
11344         * cp-name-parser.y (make_empty): Delete.
11345         (demangler_special, nested_name, ptr_operator, array_indicator)
11346         (direct_declarator, declarator_1): Use fill_comp instead of
11347         make_empty.
11348
11349 2017-03-27  Pedro Alves  <palves@redhat.com>
11350
11351         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
11352         to ATTRIBUTE_PRINTF.
11353         * solib-target.c (library_list_start_list): Print "string" not
11354         "version".
11355         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
11356         gdb_xml_error call.
11357
11358 2017-03-27  Pedro Alves  <palves@redhat.com>
11359
11360         * dwarf2read.c (struct file_and_directory): New.
11361         (dwarf2_get_dwz_file): Adjust to use std::string.
11362         (dw2_get_file_names_reader): Adjust to use file_and_directory.
11363         (find_file_and_directory): Adjust to return a file_and_directory
11364         object.
11365         (read_file_scope): Adjust to use file_and_directory.  Remove
11366         make_cleanup/do_cleanups calls.
11367         (open_and_init_dwp_file): Adjust to use std::string.  Remove
11368         make_cleanup/do_cleanups calls.
11369         * python/python.c (do_start_initialization): Adjust to ldirname
11370         returning a std::string.
11371         * utils.c (ldirname): Now returns a std::string.
11372         * utils.h (ldirname): Change return type to std::string.
11373         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
11374         returning a std::string.
11375         * xml-tdesc.c (file_read_description_xml): Likewise.
11376
11377 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
11378
11379         * regcache.c (regcache_debug_print_register): New function.
11380         * regcache.h (regcache_debug_print_register): New declaration.
11381         * target.c (debug_print_register): Remove.
11382         (target_fetch_registers): Call regcache_debug_print_register.
11383         (target_store_registers): Likewise.
11384
11385 2017-03-24  Pádraig Brady  <pbrady@fb.com>
11386
11387         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
11388         reference beyond the 'lh->include_dirs' array before accessing to
11389         it.
11390         (psymtab_include_file_name): Likewise.
11391         (dwarf_decode_lines_1): Likewise.
11392         (dwarf_decode_lines): Likewise.
11393         (file_file_name): Likewise.
11394
11395 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
11396
11397         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
11398         inferior_ptid.
11399         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11400         ps_lsetfpregs): Likewise.
11401         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
11402         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11403         ps_lsetfpregs): Likewise.
11404         * target.c (target_fetch_registers, target_store_registers):
11405         Remove asserts.
11406
11407 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
11408
11409         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
11410
11411 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11412
11413         * aarch64-tdep.c (aarch64_process_record_test): Declare.
11414         (_initialize_aarch64_tdep): Register it.
11415         (aarch64_record_load_store): Handle PRFM instruction.
11416         (aarch64_process_record_test): New function.
11417
11418 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11419
11420         * aarch64-tdep.c (aarch64_record_load_store): Fix code
11421         indentation.
11422
11423 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11424
11425         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
11426
11427 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11428
11429         python/python.c (do_start_initialization): Fix memory leak.
11430
11431 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11432
11433         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
11434         using get_ptrace_pid.
11435         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
11436         inferior_ptid.
11437         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
11438         inferior_ptid instead of pid.
11439
11440 2017-03-22  Yao Qi  <yao.qi@linaro.org>
11441
11442         * aarch64-tdep.c: Wrap locally used classes in anonymous
11443         namespace.
11444         * arm-tdep.c: Likewise.
11445         * linespec.c: Likewise.
11446         * ui-out.c: Likewise.
11447
11448 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
11449
11450         PR gdb/19637
11451         * python/lib/gdb/printer/bound_registers.py: Import sys.
11452
11453 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
11454
11455         * windows-nat.c (do_windows_fetch_inferior_registers): Add
11456         windows_thread_info parameter and use it instead of
11457         current_thread.
11458         (windows_fetch_inferior_registers): Don't set current_thread,
11459         pass the thread to do_windows_fetch_inferior_registers.  Use
11460         ptid from regcache instead of inferior_ptid.
11461         (do_windows_store_inferior_registers): Add windows_thread_info
11462         parameter and use it instead of current_thread.
11463         (windows_store_inferior_registers): Don't set current_thread,
11464         pass the thread to do_windows_store_inferior_registers.  Use
11465         ptid from regcache instead of inferior_ptid.
11466
11467 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
11468
11469         * ser-mingw.c (ser_windows_raw): Remove reference to
11470         struct serial::current_timeout.
11471
11472 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
11473
11474         PR tdep/20928
11475         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
11476         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
11477         (sparc64_fsr_type): Fix %fsr decoding.
11478
11479 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
11480
11481         * python/py-record-btrace.c (btpy_insn_data): Change return type
11482         for Python 2.
11483
11484 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
11485
11486         * spu-linux-nat.c (spu_fetch_inferior_registers,
11487         spu_store_inferior_registers): Use ptid from regcache, set and
11488         restore inferior_ptid.
11489         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
11490         Likewise.
11491
11492 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
11493
11494         * i386-linux-nat.c (fetch_register, store_register,
11495         i386_linux_fetch_inferior_registers,
11496         i386_linux_store_inferior_registers): Use ptid from regcache.
11497         * ia64-linux-nat.c (ia64_linux_fetch_register,
11498         ia64_linux_store_register): Likewise.
11499         * inf-ptrace.c (inf_ptrace_fetch_register,
11500         inf_ptrace_store_register): Likewise.
11501         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
11502         m32r_linux_store_inferior_registers): Likewise.
11503         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
11504         m68kbsd_store_inferior_registers): Likewise.
11505         * m68k-linux-nat.c (fetch_register, store_register,
11506         m68k_linux_fetch_inferior_registers,
11507         m68k_linux_store_inferior_registers): Likewise.
11508         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
11509         m88kbsd_store_inferior_registers): Likewise.
11510         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
11511         mips_fbsd_store_inferior_registers): Likewise.
11512         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
11513         mips64_linux_regsets_store_registers): Likewise.
11514         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
11515         mipsnbsd_store_inferior_registers): Likewise.
11516         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
11517         mips64obsd_store_inferior_registers): Likewise.
11518         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
11519         Likewise.
11520         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
11521         ppcfbsd_store_inferior_registers): Likewise.
11522         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
11523         ppc_linux_store_inferior_registers): Likewise.
11524         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
11525         ppcnbsd_store_inferior_registers): Likewise.
11526         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
11527         ppcobsd_store_registers): Likewise.
11528         * procfs.c (procfs_fetch_registers, procfs_store_registers):
11529         Likewise.
11530         * ravenscar-thread.c (ravenscar_fetch_registers,
11531         ravenscar_store_registers, ravenscar_prepare_to_store):
11532         Likewise.
11533         * record-btrace.c (record_btrace_fetch_registers,
11534         record_btrace_store_registers, record_btrace_prepare_to_store):
11535         Likewise.
11536         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
11537         Lookup inferior using ptid from regcache, instead of
11538         current_inferior.
11539         * remote.c (remote_fetch_registers, remote_store_registers): Use
11540         ptid from regcache.
11541         * rs6000-nat.c (fetch_register, store_register): Likewise.
11542         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
11543         s390_linux_store_inferior_registers): Likewise.
11544         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
11545         shnbsd_store_inferior_registers): Likewise.
11546         * sol-thread.c (sol_thread_fetch_registers,
11547         sol_thread_store_registers): Likewise.
11548         * sparc-nat.c (sparc_fetch_inferior_registers,
11549         sparc_store_inferior_registers): Likewise.
11550         * tilegx-linux-nat.c (fetch_inferior_registers,
11551         store_inferior_registers): Likewise.
11552         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
11553         vaxbsd_store_inferior_registers): Likewise.
11554         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
11555         store_xtregs): Likewise.
11556
11557 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11558
11559         PR gdb/14441
11560         * NEWS: Mention support for rvalue references in GDB and python.
11561         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
11562         supports both lvalue and rvalue references.
11563
11564 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11565
11566         PR gdb/14441
11567         * gdbtypes.c (rank_one_type): Implement overloading
11568         resolution rules regarding rvalue references.
11569
11570 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11571
11572         PR gdb/14441
11573         * aarch64-tdep.c (aarch64_type_align)
11574         (aarch64_extract_return_value, aarch64_store_return_value): Change
11575         lvalue reference type checks to general reference type checks.
11576         * amd64-tdep.c (amd64_classify): Likewise.
11577         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
11578         Likewise.
11579         * arm-tdep.c (arm_type_align, arm_extract_return_value)
11580         (arm_store_return_value): Likewise.
11581         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
11582         * c-typeprint.c (c_print_type): Likewise.
11583         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
11584         (cplus_number_of_children, cplus_describe_child): Likewise.
11585         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
11586         * completer.c (expression_completer): Likewise.
11587         * cp-support.c (make_symbol_overload_list_adl_namespace):
11588         Likewise.
11589         * darwin-nat-info.c (info_mach_region_command): Likewise.
11590         * dwarf2loc.c (entry_data_value_coerce_ref)
11591         (value_of_dwarf_reg_entry): Likewise.
11592         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
11593         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
11594         Likewise.
11595         * findvar.c (extract_typed_address, store_typed_address):
11596         Likewise.
11597         * gdbtypes.c (rank_one_type): Likewise.
11598         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
11599         * infcall.c (value_arg_coerce): Likewise.
11600         * language.c (pointer_type): Likewise.
11601         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
11602         Likewise.
11603         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
11604         * mn10300-tdep.c (mn10300_type_align): Likewise.
11605         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
11606         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
11607         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
11608         Likewise.
11609         * printcmd.c (print_formatted, x_command): Likewise.
11610         * python/py-type.c (typy_get_composite, typy_template_argument):
11611         Likewise.
11612         * python/py-value.c (valpy_referenced_value)
11613         (valpy_get_dynamic_type, value_has_field): Likewise.
11614         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
11615         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
11616         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
11617         * spu-tdep.c (spu_scalar_value_p): Likewise.
11618         * symtab.c (lookup_symbol_aux): Likewise.
11619         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
11620         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
11621         Likewise.
11622         * valops.c (value_cast_pointers, value_cast)
11623         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
11624         (value_struct_elt, value_struct_elt_bitpos)
11625         (value_find_oload_method_list, find_overload_match)
11626         (value_rtti_indirect_type): Likewise.
11627         * valprint.c (val_print_scalar_type_p, generic_val_print):
11628         Likewise.
11629         * value.c (value_actual_type, value_as_address, unpack_long)
11630         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
11631         (coerce_ref): Likewise.
11632         * varobj.c (varobj_get_value_type): Likewise.
11633
11634 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11635
11636         PR gdb/14441
11637         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
11638         table of constants.
11639         * python/lib/gdb/command/explore.py: Support exploring values
11640         of rvalue reference types.
11641         * python/lib/gdb/types.py: Implement get_basic_type() for
11642         rvalue reference types.
11643         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
11644         constant.
11645         * python/py-value.c (valpy_getitem): Add an rvalue reference
11646         check.
11647         (valpy_reference_value): Add new parameter "refcode".
11648         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
11649         New wrappers for valpy_reference_value().
11650         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11651         (gdbpy_invoke_xmethod): Likewise.
11652
11653 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11654
11655         PR gdb/14441
11656         * dwarf2read.c (process_die, read_type_die_1): Handle the
11657         DW_TAG_rvalue_reference_type DIE.
11658         (read_tag_reference_type): Add new parameter "refcode".
11659
11660 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11661
11662         PR gdb/14441
11663         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
11664         (c_type_print_modifier, c_type_print_varspec_suffix)
11665         (c_type_print_base): Support printing rvalue reference types.
11666         * c-valprint.c (c_val_print, c_value_print): Support printing
11667         rvalue reference values.
11668
11669 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11670
11671         PR gdb/14441
11672         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
11673         typename.
11674         * cp-support.c (replace_typedefs): Handle
11675         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
11676         * python/py-type.c (typy_lookup_type): Likewise.
11677
11678 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11679
11680         PR gdb/14441
11681         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
11682         * parse.c (insert_type): Change assert statement.
11683         (follow_types): Handle rvalue reference types.
11684         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
11685         constant.
11686
11687 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11688
11689         PR gdb/14441
11690         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
11691         value_ref() interface.
11692         * c-valprint.c (c_value_print): Likewise.
11693         * infcall.c (value_arg_coerce): Likewise.
11694         * python/py-value.c (valpy_reference_value): Likewise.
11695         * valops.c (value_cast, value_reinterpret_cast)
11696         (value_dynamic_cast, typecmp): Likewise.
11697         (value_ref): Parameterize by kind of return value reference type.
11698         * value.h (value_ref): Add new parameter "refcode".
11699
11700 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11701
11702         PR gdb/14441
11703         * dwarf2read.c (read_tag_reference_type): Use
11704         lookup_lvalue_reference_type() instead of lookup_reference_type().
11705         * eval.c (evaluate_subexp_standard): Likewise.
11706         * f-exp.y: Likewise.
11707         * gdbtypes.c (make_reference_type, lookup_reference_type):
11708         Generalize with rvalue reference types.
11709         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
11710         convenience wrappers for lookup_reference_type().
11711         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
11712         reference kind parameter.
11713         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
11714         wrappers for lookup_reference_type().
11715         * guile/scm-type.c (gdbscm_type_reference): Use
11716         lookup_lvalue_reference_type() instead of lookup_reference_type().
11717         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
11718         * parse.c (follow_types): Likewise.
11719         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
11720         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
11721         Likewise.
11722         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11723         (gdbpy_invoke_xmethod): Likewise.
11724         * stabsread.c: Provide extra argument to make_reference_type()
11725         call.
11726         * valops.c (value_ref, value_rtti_indirect_type): Use
11727         lookup_lvalue_reference_type() instead of lookup_reference_type().
11728
11729 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11730
11731         PR gdb/14441
11732         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
11733         (TYPE_IS_REFERENCE): New macro.
11734         (struct type): Add rvalue_reference_type field.
11735         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
11736
11737 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
11738
11739         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
11740         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
11741         New function definition.
11742         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
11743         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
11744         New function declaration.
11745         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
11746         * mi/mi-interp.h: New file.
11747         * solib.c (info_sharedlibrary_command): Replace for loop with
11748         ALL_SO_LIBS macro
11749         * solib.h (update_solib_list): New function declaration.
11750         (so_list_head): Move macro.
11751         * solist.h (ALL_SO_LIBS): New macro.
11752
11753 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
11754
11755         * infcmd.c (post_create_inferior): Remove unused argument in
11756         call to solib_add.
11757         * remote.c (remote_start_remote): Likewise.
11758         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
11759         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
11760         (enable_break): Likewise.
11761         * solib.c (update_solib_list): Remove unused target argument
11762         and its documentation.
11763         (solib_add): Remove unused target argument.  Remove unused
11764         argument in call to update_solib_list.
11765         (info_sharedlibrary_command): Remove unused argument in call
11766         to update_solib_list.
11767         (sharedlibrary_command): Remove unused argument in call to
11768         solib_add.
11769         (handle_solib_event): Likewise.
11770         (reload_shared_libraries): Likewise.
11771         * solib.h (solib_add): Remove unused target argument.
11772
11773 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11774
11775         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
11776         (s390_displaced_step_fixup): Cover relative branches with the
11777         default fixup handling.  This fixes lack of support for some
11778         relative branch instructions.
11779
11780 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11781
11782         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
11783         ptid from regcache.
11784
11785 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11786
11787         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
11788         i386_darwin_store_inferior_registers): Use ptid from regcache.
11789
11790 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11791
11792         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
11793         i386bsd_store_inferior_registers): Use ptid from regcache.
11794
11795 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11796
11797         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
11798         hppaobsd_store_registers): Use ptid from regcache.
11799
11800 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11801
11802         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
11803         hppanbsd_store_registers): Use ptid from regcache.
11804
11805 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11806
11807         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
11808         from regcache.  Use get_ptrace_pid.
11809
11810 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11811
11812         * corelow.c (get_core_register_section): Use ptid from regcache,
11813         update doc.
11814
11815 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11816
11817         * bsd-uthread.c (bsd_uthread_fetch_registers,
11818         bsd_uthread_store_registers): Use ptid from regcache, set and
11819         restore inferior_ptid.
11820
11821 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11822
11823         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
11824         fetch_fp_regs, store_register, store_regs, store_fp_register,
11825         store_fp_regs): Use ptid from regcache.
11826
11827 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11828
11829         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
11830         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
11831         store_vfp_regs): Use ptid from regcache.
11832
11833 2017-03-17  Pedro Alves  <palves@redhat.com>
11834
11835         PR remote/21188
11836         * ser-base.c (ser_base_wait_for): Add comment.
11837         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
11838         version.
11839         * ser-unix.c (hardwire_raw): Remove reference to
11840         scb->current_timeout.
11841         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
11842         (hardwire_ops): Install ser_base_readchar instead of
11843         hardwire_readchar.
11844         * serial.h (struct serial) <current_timeout, timeout_remaining>:
11845         Remove fields.
11846
11847 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
11848
11849         PR gdb/19637
11850         * python/lib/gdb/printer/bound_registers.py: Add support for
11851         Python 3.
11852
11853 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11854
11855         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
11856         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
11857         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
11858         byte_offset to subobj_byte_offset.  Fix the handling of
11859         DWARF_VALUE_STACK on big-endian targets when coming via an
11860         implicit pointer.
11861         (dwarf2_evaluate_loc_desc): Adjust call to
11862         dwarf2_evaluate_loc_desc_full.
11863         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
11864         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
11865
11866 2017-03-16  Yao Qi  <yao.qi@linaro.org>
11867
11868         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
11869         and REVSH instructions.
11870
11871 2017-03-16  Yao Qi  <yao.qi@linaro.org>
11872
11873         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
11874         (arm_record_test): Declare.
11875         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
11876         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
11877         align with the manual.
11878         (thumb_record_misc): Adjust the code order to align with the
11879         manual.
11880         (thumb2_record_decode_insn_handler): Fix instruction matching.
11881         (instruction_reader_thumb): New class.
11882         (arm_record_test): New function.
11883
11884 2017-03-16  Yao Qi  <yao.qi@linaro.org>
11885
11886         * arm-tdep.c (abstract_memory_reader): New class.
11887         (instruction_reader): New class.
11888         (extract_arm_insn): Add argument 'reader'.  Callers updated.
11889         (decode_insn): Likewise.
11890
11891 2017-03-16  Doug Evans  <dje@google.com>
11892
11893         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
11894         member.  Change type of TYPE member to SCM.  All uses updated.
11895         (lsscm_make_lazy_string_smob): Add assert.
11896         (lsscm_make_lazy_string): Flag bad length values.
11897         (lsscm_elt_type): New function.
11898         (gdbscm_lazy_string_to_value): Rewrite to use
11899         lsscm_safe_lazy_string_to_value.
11900         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
11901         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
11902         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
11903         in incoming type.
11904         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
11905         * guile/scm-type.c (tyscm_scm_to_type): New function.
11906
11907 2017-03-15  Doug Evans  <dje@google.com>
11908
11909         PR python/17728, python/18439, python/18779
11910         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
11911         member.  Change type of TYPE member to PyObject *.  All uses updated.
11912         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
11913         (gdbpy_create_lazy_string_object): Flag bad length values.
11914         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
11915         Handle typedefs in incoming type.
11916         (stpy_lazy_string_elt_type): New function.
11917         (gdbpy_extract_lazy_string): Call it.
11918         * python/py-value.c (valpy_lazy_string): Flag bad length values.
11919         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
11920         typedefs in incoming type.
11921
11922 2017-03-16  Doug Evans  <dje@google.com>
11923
11924         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
11925         * guile/scm-type.c (tyscm_scm_to_type): New function.
11926
11927 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
11928
11929         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
11930         "ULONGEST" for "skip".
11931
11932 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11933
11934         PR gdb/21220
11935         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
11936         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
11937         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
11938         over ptrace peek/poke until end of buffer or error.
11939
11940 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
11941
11942         * parse.c (length_of_subexp): Make static.
11943         * parser-defs.h (length_of_subexp): Remove.
11944
11945 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11946
11947         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
11948         as well.
11949
11950 2017-03-14  Pedro Alves  <palves@redhat.com>
11951
11952         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
11953         (main): Use std::unique_ptr.  Remove calls to
11954         cp_demangled_name_parse_free.
11955
11956 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11957
11958         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
11959         alphabsd_store_inferior_registers): Use regcache->ptid instead
11960         of inferior_ptid.
11961
11962 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11963
11964         * aix-thread.c (aix_thread_fetch_registers,
11965         aix_thread_store_registers): Use regcache->ptid instead of
11966         inferior_ptid.
11967
11968 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11969
11970         * aarch64-linux-nat.c (fetch_gregs_from_thread,
11971         store_gregs_to_thread, fetch_fpregs_from_thread,
11972         store_fpregs_to_thread): Use regcache->ptid instead of
11973         inferior_ptid.
11974
11975 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11976
11977         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
11978         amd64_linux_fetch_inferior_registers): Use regcache->ptid
11979         instead of inferior_ptid.
11980
11981 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11982
11983         * target.c (target_fetch_registers, target_store_registers): Add
11984         assert.
11985
11986 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11987
11988         * regcache.h (regcache_get_ptid): New function.
11989         * regcache.c (regcache_get_ptid): New function.
11990
11991 2017-03-13  Mark Wielaard  <mark@klomp.org>
11992
11993         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
11994
11995 2017-03-10  Keith Seitz  <keiths@redhat.com>
11996
11997         PR c++/8218
11998         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
11999
12000 2017-03-08  Pedro Alves  <palves@redhat.com>
12001
12002         PR gdb/18360
12003         * infrun.c (start_step_over, do_target_resume, resume)
12004         (restart_threads): Assert we're not resuming a thread that is
12005         meant to be stopped.
12006         (infrun_thread_stop_requested_callback): Delete.
12007         (infrun_thread_stop_requested): If the thread is internally
12008         stopped, queue a pending stop event and clear the thread's
12009         inline-frame state.
12010         (handle_stop_requested): New function.
12011         (handle_syscall_event, handle_inferior_event_1): Use
12012         handle_stop_requested.
12013         (handle_stop_requested): New function.
12014         (handle_signal_stop): Set the thread's stop_signal here instead of
12015         at caller.
12016         (finish_step_over): Clear step over info unconditionally.
12017         (handle_signal_stop): If the user had interrupted the event
12018         thread, consider the stop a random signal.
12019         (handle_signal_stop) <signal arrived while stepping over
12020         breakpoint>: Don't restart threads here.
12021         (stop_waiting): Don't clear step-over info here.
12022
12023 2017-03-08  Pedro Alves  <palves@redhat.com>
12024
12025         PR 21206
12026         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
12027         goes to argument 2, not 1.
12028
12029 2017-03-08  Pedro Alves  <palves@redhat.com>
12030
12031         PR cli/21218
12032         * top.c (gdb_readline_wrapper): Avoid passing NULL to
12033         display_gdb_prompt.
12034         (command_line_input): Add comment.
12035
12036 2017-03-08  Pedro Alves  <palves@redhat.com>
12037
12038         PR tui/21216
12039         * tui/tui-file.c (tui_file::write): New.
12040         * tui/tui-file.h (tui_file): Override "write".
12041         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
12042         factored out from ...
12043         (tui_puts): ... here.
12044         (tui_putc): Use them.
12045         (tui_write): New function.
12046         * tui/tui-io.h (tui_write): Declare.
12047
12048 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
12049
12050         * Makefile.in (SFILES): Replace "environ.c" with
12051         "common/environ.c".
12052         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
12053         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
12054         to...
12055         * common/environ.c: ... here.
12056         * environ.h: Moved to...
12057         * common/environ.h: ... here.
12058
12059 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
12060
12061         * gdbarch.sh (pstring_ptr): New static function.
12062         (gdbarch_disassembler_options): Use it.
12063         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
12064         not valid_disassembler_option->name.
12065         * gdbarch.c: Regenerate.
12066
12067 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
12068
12069         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
12070
12071 2017-03-07  Pedro Alves  <palves@redhat.com>
12072
12073         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
12074
12075 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12076
12077         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
12078         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
12079         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
12080         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
12081
12082 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
12083
12084         * xtensa-linux-nat.c (fetch_gregs): Remove const.
12085
12086 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
12087
12088         * remote.c (remote_add_target_side_commands): Use range-based
12089         for loop.
12090
12091 2017-03-03  Yao Qi  <yao.qi@linaro.org>
12092
12093         PR gdb/21165
12094         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
12095         value is lazy.
12096         * valprint.c (common_val_print): Likewise.
12097
12098 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
12099
12100         * NEWS: Mention new set/show disassembler-options commands.
12101         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
12102         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
12103         (prospective_options): New static variable.
12104         (gdb_disassembler::gdb_disassembler): Initialize
12105         m_di.disassembler_options.
12106         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
12107         (get_disassembler_options): New function.
12108         (set_disassembler_options): Likewise.
12109         (set_disassembler_options_sfunc): Likewise.
12110         (show_disassembler_options_sfunc): Likewise.
12111         (disassembler_options_completer): Likewise.
12112         (_initialize_disasm): Likewise.
12113         * disasm.h (get_disassembler_options): New prototype.
12114         (set_disassembler_options): Likewise.
12115         * gdbarch.sh (gdbarch_disassembler_options): New variable.
12116         (gdbarch_verify_disassembler_options): Likewise.
12117         * gdbarch.c: Regenerate.
12118         * gdbarch.h: Likewise.
12119         * arm-tdep.c (num_disassembly_options): Delete.
12120         (set_disassembly_style): Likewise.
12121         (arm_disassembler_options): New static variable.
12122         (set_disassembly_style_sfunc): Convert short style name into long
12123         option name.  Call set_disassembler_options.
12124         (show_disassembly_style_sfunc): New function.
12125         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
12126         set_gdbarch_verify_disassembler_options.
12127         (_initialize_arm_tdep): Delete regnames variable and update callers.
12128         (arm_disassembler_options): Initialize.
12129         (disasm_options): New variable.
12130         (num_disassembly_options): Rename from this...
12131         (num_disassembly_styles): ...to this.  Compute by scanning through
12132         disasm_options.
12133         (valid_disassembly_styles): Initialize using disasm_options.
12134         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
12135         set_arm_regname_option.
12136         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
12137         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
12138         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
12139         set_gdbarch_verify_disassembler_options.
12140         * s390-tdep.c (s390_disassembler_options): New static variable.
12141         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
12142         set_gdbarch_verify_disassembler_options.
12143
12144 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12145
12146         * remote.c (remote_add_target_side_condition): Remove "struct"
12147         keyword from range-based for loop.
12148
12149 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12150
12151         * remote.c (remote_add_target_side_condition): Use range-based
12152         for loop.  Update comment.
12153
12154 2017-02-27  Yao Qi  <yao.qi@linaro.org>
12155
12156         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
12157
12158 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
12159
12160         * regcache.c (regcache_raw_update): New function.
12161         (regcache_raw_read): Move code to regcache_raw_update.
12162         * regcache.h (regcache_raw_update): New declaration.
12163         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
12164
12165 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
12166
12167         * dwarf2read.c (create_debug_type_hash_table): Initialize
12168         header.signature and header.type_offset_in_tu.
12169
12170 2017-02-24  Pedro Alves  <palves@redhat.com>
12171
12172         * symtab.c (make_file_symbol_completion_list_1): Use
12173         add_symtab_completions.
12174
12175 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12176
12177         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
12178
12179 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12180
12181         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
12182         I386_MAX_REGISTER_SIZE.
12183         (i386_pseudo_register_write): Likewise.
12184         (i386_process_record): Likewise.
12185         * i387-tdep.c (i387_supply_xsave): Likewise.
12186         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
12187         (store_register): Likewise.
12188
12189 2017-02-23  Pedro Alves  <palves@redhat.com>
12190
12191         * ada-lang.c: Include "common/function-view.h".
12192         (ada_iterate_over_symbols): Adjust to use function_view as
12193         callback type.
12194         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
12195         (ada_make_symbol_completion_list): Use a lambda.
12196         (ada_exc_search_name_matches): Delete.
12197         (name_matches_regex): New.
12198         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
12199         * compile/compile-c-support.c: Include "common/function-view.h".
12200         (print_one_macro): Change prototype to accept a ui_file pointer.
12201         (write_macro_definitions): Use a lambda.
12202         * dwarf2read.c: Include "common/function-view.h".
12203         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
12204         (dw2_expand_symtabs_matching): Adjust to use function_view as
12205         callback type.
12206         * language.h: Include "common/function-view.h".
12207         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
12208         function_view as callback type.
12209         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
12210         * linespec.c: Include "common/function-view.h".
12211         (collect_info::add_symbol): New method.
12212         (struct symbol_and_data_callback, iterate_inline_only, struct
12213         symbol_matcher_data, iterate_name_matcher): Delete.
12214         (iterate_over_all_matching_symtabs): Adjust to use function_view
12215         as callback type and lambdas.
12216         (iterate_over_file_blocks): Adjust to use function_view as
12217         callback type.
12218         (decode_compound_collector): Now a class with private fields.
12219         (decode_compound_collector::release_symbols): New method.
12220         (collect_one_symbol): Rename to...
12221         (decode_compound_collector::operator()): ... this and adjust.
12222         (lookup_prefix_sym): decode_compound_collector construction bits
12223         move to decode_compound_collector ctor.  Pass the
12224         decode_compound_collector object directly as callback.  Remove
12225         cleanups and use decode_compound_collector::release_symbols
12226         instead.
12227         (symtab_collector): Now a class with private fields.
12228         (symtab_collector::release_symtabs): New method.
12229         (add_symtabs_to_list): Rename to...
12230         (symtab_collector::operator()): ... this and adjust.
12231         (collect_symtabs_from_filename): symtab_collector construction
12232         bits move to symtab_collector ctor.  Pass the symtab_collector
12233         object directly as callback.  Remove cleanups and use
12234         symtab_collector::release_symtabs instead.
12235         (collect_symbols): Delete.
12236         (add_matching_symbols_to_info): Use lambdas.
12237         * macrocmd.c (print_macro_callback): Delete.
12238         (info_macro_command): Use a lambda.
12239         (info_macros_command): Pass print_macro_definition as callable
12240         directly.
12241         (print_one_macro): Remove 'ignore' parameter.
12242         (macro_list_command): Adjust.
12243         * macrotab.c (macro_for_each_data::fn): Now a function_view.
12244         (macro_for_each_data::user_data): Delete field.
12245         (foreach_macro): Adjust to call the function_view.
12246         (macro_for_each): Adjust to use function_view as callback type.
12247         (foreach_macro_in_scope): Adjust to call the function_view.
12248         (macro_for_each_in_scope): Adjust to use function_view as callback
12249         type.
12250         * macrotab.h: Include "common/function-view.h".
12251         (macro_callback_fn): Declare a prototype instead of a pointer.
12252         Remove "user_data" parameter.
12253         (macro_for_each, macro_for_each_in_scope): Adjust to use
12254         function_view as callback type.
12255         * psymtab.c (partial_map_expand_apply)
12256         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
12257         Adjust to use function_view as callback type and to return bool.
12258         (psym_expand_symtabs_matching): Adjust to use function_view as
12259         callback types.
12260         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
12261         to use function_view as callback type and to return bool.
12262         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
12263         callback types.
12264         * symfile.c (expand_symtabs_matching): Adjust to use function_view
12265         as callback types.
12266         * symfile.h: Include "common/function-view.h".
12267         (expand_symtabs_file_matcher_ftype)
12268         (expand_symtabs_symbol_matcher_ftype)
12269         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
12270         return bool.
12271         (quick_symbol_functions::map_symtabs_matching_filename)
12272         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
12273         function_view as callback type and return bool.
12274         (expand_symtabs_matching): Adjust to use function_view as callback
12275         type.
12276         (maintenance_expand_name_matcher)
12277         (maintenance_expand_file_matcher): Delete.
12278         (maintenance_expand_symtabs): Use lambdas.
12279         * symtab.c (iterate_over_some_symtabs): Adjust to use
12280         function_view as callback types and return bool.
12281         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
12282         of a cleanup.
12283         (lookup_symtab_callback): Delete.
12284         (lookup_symtab): Use a lambda.
12285         (iterate_over_symbols): Adjust to use function_view as callback
12286         type.
12287         (struct search_symbols_data, search_symbols_file_matches)
12288         (search_symbols_name_matches): Delete.
12289         (search_symbols): Use a pair of lambdas.
12290         (struct add_name_data, add_macro_name, symbol_completion_matcher)
12291         (symtab_expansion_callback): Delete.
12292         (default_make_symbol_completion_list_break_on_1): Use lambdas.
12293         * symtab.h: Include "common/function-view.h".
12294         (iterate_over_some_symtabs): Adjust to use function_view as
12295         callback type and return bool.
12296         (iterate_over_symtabs): Adjust to use function_view as callback
12297         type.
12298         (symbol_found_callback_ftype): Remove 'data' parameter and return
12299         bool.
12300         (iterate_over_symbols): Adjust to use function_view as callback
12301         type.
12302
12303 2017-02-23  Pedro Alves  <palves@redhat.com>
12304
12305         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
12306         (%.o) <unittests/%.c>: New pattern.
12307         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
12308         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
12309         * common/function-view.h: New file.
12310         * unittests/function-view-selftests.c: New file.
12311         * configure: Regenerate.
12312
12313 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
12314
12315         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
12316         inferior_ptid.
12317         * go32-nat.c (go32_thread_alive): Likewise.
12318
12319 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12320
12321         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
12322         delete.
12323
12324 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12325
12326         * varobj.c (varobj_clear_saved_item): Use delete instead of
12327         xfree.
12328         (update_dynamic_varobj_children): Likewise.
12329
12330 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12331
12332         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
12333
12334 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
12335
12336         * common/enum-flags.h (enum_flags::enum_flags): Initialize
12337         m_enum_value to 0 in default constructor.
12338
12339 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
12340
12341         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
12342         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
12343         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
12344         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
12345         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
12346         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
12347         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
12348         IS_STORE_CONDITIONAL_INSN.
12349
12350 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12351
12352         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
12353
12354 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12355
12356         * NEWS (Changes since GDB 7.12): Add DWARF-5.
12357
12358 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12359
12360         * dwarf2read.c (skip_one_die, read_attribute_value)
12361         (dwarf2_const_value_attr, dump_die_shallow)
12362         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
12363         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
12364
12365 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12366
12367         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
12368         (dwarf_parse_macro_header): Accept DWARF version 5.
12369         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
12370
12371 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12372
12373         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
12374         DW_AT_GNU_*.
12375         * common/common-exceptions.h (enum errors): Likewise.
12376         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
12377         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
12378         (dwarf_expr_context::execute_stack_op): Likewise.
12379         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
12380         Likewise.
12381         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
12382         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
12383         (show_entry_values_debug, call_site_to_target_addr)
12384         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
12385         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
12386         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
12387         (value_of_dwarf_block_entry, indirect_pieced_value)
12388         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
12389         (disassemble_dwarf_expression): Likewise.
12390         * dwarf2read.c (process_die, inherit_abstract_dies)
12391         (read_call_site_scope): Likewise.
12392         * gdbtypes.h (struct func_type, struct call_site_parameter)
12393         (struct call_site): Likewise.
12394         * stack.c (read_frame_arg): Likewise.
12395         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
12396
12397 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12398
12399         * defs.h (read_unsigned_leb128): New declaration.
12400         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
12401         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
12402         (dwarf2_find_location_expression): Call also
12403         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
12404         * dwarf2loc.h (dwarf2_version): New declaration.
12405         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
12406         rnglists.
12407         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
12408         .debug_rnglists.
12409         (struct dwop_section_names): Add loclists_dwo.
12410         (dwop_section_names): Add .debug_loclists.dwo.
12411         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
12412         (struct dwarf2_per_cu_data): Add dwarf_version.
12413         (struct dwo_sections): Add loclists.
12414         (struct attr_abbrev): Add implicit_const.
12415         (read_indirect_line_string): New declaration.
12416         (read_unsigned_leb128): Delete declaration.
12417         (rcuh_kind): New definition.
12418         (read_and_check_comp_unit_head): Change parameter
12419         is_debug_types_section to section_kind.
12420         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
12421         (read_comp_unit_head): Change parameter abfd to section, add parameter
12422         section_kind.  Handle DWARF-5.
12423         (error_check_comp_unit_head): Accept also DWARF version 5.
12424         (read_and_check_comp_unit_head): Change parameter
12425         is_debug_types_section to section_kind.
12426         (read_and_check_type_unit_head): Delete function.
12427         (read_abbrev_offset): Handle DWARF-5.
12428         (create_debug_type_hash_table): Add parameter section_kind.  Process
12429         only DW_UT_type.  Use signature and type_offset_in_tu from struct
12430         comp_unit_head.
12431         (create_debug_types_hash_table): Update create_debug_type_hash_table
12432         caller.
12433         (create_all_type_units): Call create_debug_type_hash_table.
12434         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
12435         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
12436         caller.
12437         (skip_one_die): Handle DW_FORM_implicit_const.
12438         (dwarf2_rnglists_process): New function.
12439         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
12440         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
12441         (read_attribute_value): Handle DW_FORM_implicit_const,
12442         DW_FORM_line_strp.
12443         (read_attribute): Handle DW_FORM_implicit_const.
12444         (read_indirect_string_at_offset_from): New function from
12445         read_indirect_string_at_offset.
12446         (read_indirect_string_at_offset): Call
12447         read_indirect_string_at_offset_from.
12448         (read_indirect_line_string_at_offset): New function.
12449         (read_indirect_string): New function comment.
12450         (read_indirect_line_string): New function.
12451         (read_unsigned_leb128): Make it global.
12452         (dwarf2_string_attr): Handle DWARF-5.
12453         (add_include_dir_stub, read_formatted_entries): New functions.
12454         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
12455         Handle DWARF-5.
12456         (per_cu_header_read_in): Update read_comp_unit_head caller.
12457         (dwarf2_version): New function.
12458         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
12459         rnglists.
12460         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
12461         fields.
12462
12463 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12464
12465         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
12466
12467 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12468
12469         * dwarf2read.c (dwarf2_ranges_process): New function from
12470         dwarf2_ranges_read.
12471         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
12472         dwarf2_ranges_process.
12473
12474 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12475
12476         * dwarf2read.c (create_debug_type_hash_table): New function from
12477         create_debug_types_hash_table.
12478         (create_debug_types_hash_table): Call create_debug_type_hash_table.
12479         (create_all_type_units, open_and_init_dwo_file): Update
12480         create_debug_types_hash_table callers.
12481
12482 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
12483
12484         PR gdb/16188
12485         * fork-child.c (trace_start_error): Fix thinko.  va_end should
12486         refer to 'ap', not 'args'.
12487
12488 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
12489             Pedro Alves  <palves@redhat.com>
12490
12491         PR gdb/16188
12492         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
12493         calls succeeded.
12494         * fork-child.c (trace_start_error): New function.
12495         (trace_start_error_with_name): Likewise.
12496         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
12497         * inf-ptrace.c (inf_ptrace_me): Likewise.
12498         * inferior.h (trace_start_error): New prototype.
12499         (trace_start_error_with_name): Likewise.
12500
12501 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
12502
12503         PR gdb/21164
12504         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
12505         NULL before using it.
12506         * symmisc.c (maintenance_print_symbols): Likewise.
12507         (maintenance_print_msymbols): Likewise.
12508
12509 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12510
12511         * NEWS: Add record Python bindings entry.
12512
12513 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12514
12515         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
12516         py-record-full.o.
12517         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
12518         * python/py-record-btrace.c, python/py-record-btrace.h,
12519         python/py-record-full.c, python/py-record-full.h: New file.
12520         * python/py-record.c: Add include for py-record-btrace.h and
12521         py-record-full.h.
12522         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
12523         recpy_instruction_history, recpy_function_call_history, recpy_begin,
12524         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
12525         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
12526         New definition.
12527         (gdbpy_initialize_btrace): New export.
12528         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
12529
12530 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12531
12532         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
12533         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
12534         * python/py-record.c: New file.
12535         * python/python-internal.h (gdbpy_start_recording,
12536         gdbpy_current_recording, gdpy_stop_recording,
12537         gdbpy_initialize_record): New export.
12538         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
12539         (python_GdbMethods): Add gdbpy_start_recording,
12540         gdbpy_current_recording and gdbpy_stop_recording.
12541
12542 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12543
12544         * record-btrace.c (record_btrace_record_method): New function.
12545         (init_record_btrace_ops): Initialize to_record_method.
12546         * record-full.c (record_full_record_method): New function.
12547         (init_record_full_ops, init_record_full_core_ops): Add
12548         record_full_record_method.
12549         * record.h (enum record_method): New enum.
12550         * target-debug.h (target_debug_print_enum_record_method: New define.
12551         * target-delegates.c: Regenerate.
12552         * target.c (target_record_method): New function.
12553         * target.h: Include record.h.
12554         (struct target_ops) <to_record_method>: New field.
12555         (target_record_method): New export.
12556
12557 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12558
12559         * record.h (record_start, record_stop): New export.
12560         * record.c (record_start, record_stop): New function.
12561
12562 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12563
12564         * btrace.c (btrace_fetch): Copy function call segments pointer
12565         into a vector.
12566         (btrace_clear): Clear the vector.
12567         (btrace_find_insn_by_number): Use binary search to find the correct
12568         function call segment.
12569         * btrace.h (brace_fun_p): New typedef.
12570         (struct btrace_thread_info) <functions>: New field.
12571
12572 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12573
12574         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
12575         * btrace.c (btrace_decode_error): ... here.  New function.
12576         * btrace.h (btrace_decode_error): New export.
12577
12578 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12579
12580         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
12581         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
12582         btrace_find_insn_by_number): Remove special case for gaps.
12583         * btrace.h (btrace_insn_get_error): New export.
12584         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
12585         * record-btrace.c (btrace_insn_history): Print number for gaps.
12586         (record_btrace_info, record_btrace_goto): Handle gaps.
12587
12588 2017-02-14  Tom Tromey  <tom@tromey.com>
12589
12590         PR python/13598:
12591         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
12592         event.
12593         * python/py-evts.c (gdbpy_initialize_py_events): Add
12594         before_prompt registry.
12595         * python/py-events.h (events_object) <before_prompt>: New field.
12596
12597 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
12598
12599         * btrace.c (ftrace_new_switch): Preserve up link and flags.
12600
12601 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
12602
12603         * symfile (_initialize_symfile): Add usage text to the load command's
12604         help text.
12605
12606 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
12607
12608         * utils.c (defaulted_query): Don't query on secondary UIs.
12609
12610 2017-02-10  Tom Tromey  <tom@tromey.com>
12611
12612         * rust-lang.c (rust_get_disr_info): Remove unused variable.
12613
12614 2017-02-10  Tom Tromey  <tom@tromey.com>
12615
12616         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
12617         "cleanup" local.
12618         * python/py-type.c (typy_legacy_template_argument): Remove
12619         unnecessary "cleanup" local.
12620
12621 2017-02-10  Tom Tromey  <tom@tromey.com>
12622
12623         * python/python.c (do_start_initialization): New function, from
12624         _initialize_python.
12625         (_initialize_python): Call do_start_initialization.
12626         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
12627         goto.
12628
12629 2017-02-10  Tom Tromey  <tom@tromey.com>
12630
12631         * python/py-prettyprint.c (pretty_print_one_value): Use
12632         gdbpy_ref.
12633
12634 2017-02-10  Tom Tromey  <tom@tromey.com>
12635
12636         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
12637         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
12638         gdbpy_ref.
12639         * python/py-type.c (field_new): Use gdbpy_ref.
12640         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
12641         gdbpy_ref.
12642         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
12643         (py_free_pspace): Likewise.
12644         (pspace_to_pspace_object): Likewise.
12645         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
12646         (py_free_objfile): Likewise.
12647         (objfile_to_objfile_object): Likewise.
12648         * python/py-inferior.c (delete_thread_object): Use
12649         gdbpy_ref.
12650         (infpy_read_memory): Likewise.
12651         (py_free_inferior): Likewise.
12652         * python/py-evtregistry.c (create_eventregistry_object): Use
12653         gdbpy_ref.
12654         * python/py-event.c (create_event_object): Use gdbpy_ref.
12655
12656 2017-02-10  Tom Tromey  <tom@tromey.com>
12657
12658         * python/py-ref.h (gdbpy_ref_policy): Now a template.
12659         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
12660         used.
12661         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
12662         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
12663         python/py-exitedevent.c, python/py-finishbreakpoint.c,
12664         python/py-framefilter.c, python/py-function.c,
12665         python/py-inferior.c, python/py-infevents.c,
12666         python/py-linetable.c, python/py-newobjfileevent.c,
12667         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
12668         python/py-signalevent.c, python/py-stopevent.c,
12669         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
12670         python/py-unwind.c, python/py-utils.c, python/py-value.c,
12671         python/py-varobj.c, python/py-xmethods.c, python/python.c,
12672         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
12673
12674 2017-02-10  Tom Tromey  <tom@tromey.com>
12675
12676         * ui-out.h (ui_out_emit_type): New class.
12677         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
12678         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
12679         and ui_out_emit_tuple.
12680         (enumerate_locals): Likewise.
12681         (py_mi_print_variables, py_print_locals, py_print_args): Use
12682         ui_out_emit_list.
12683         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
12684         ui_out_emit_list.
12685         * common/gdb_optional.h: New file.
12686
12687 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
12688
12689         * MAINTAINERS (Write After Approval): Update my e-mail address.
12690
12691 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
12692
12693         PR gdb/21122
12694         * breakpoint.c (_initialize_breakpoint): Update the help description
12695         of the 'commands' command to indicate that it takes a list argument.
12696
12697 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
12698
12699         * interps.c (current_interp_set_logging): Remove "return".
12700
12701 2017-02-09  Gary Benson  <gbenson@redhat.com>
12702
12703         * symtab.c (add_symtab_completions): Prevent NULL pointer
12704         dereference.
12705
12706 2017-02-08  Pedro Alves  <palves@redhat.com>
12707
12708         * interps.c (interp::interp): Remove reference to quiet_p.
12709         (interp_set): Make static.  Remove dead "Switching to" output
12710         code.
12711         (interp_quiet_p, interp_set_quiet): Delete.
12712         (interpreter_exec_cmd): Don't set the interpreter quiet.
12713         * interps.h (interp_quiet_p): Make static.
12714         (class interp) <quiet_p>: Remove field
12715
12716 2017-02-08  Jerome Guitton  <guitton@adacore.com>
12717
12718         * cli/cli-decode.c (find_command_name_length): Make it extern.
12719         * cli/cli-decode.h (find_command_name_length): Declare.
12720         * cli/cli-script.c (command_name_equals, line_first_arg):
12721         New functions.
12722         (process_next_line): Use cli-decode to parse command names.
12723         (build_command_line): Make args a constant pointer.
12724
12725 2017-02-08  Jerome Guitton  <guitton@adacore.com>
12726
12727         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
12728         Remove case-insensitive search.
12729
12730 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
12731
12732         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
12733         at the end of the line.  Avoids an ARI warning.
12734
12735 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
12736
12737         * NEWS: Mention support for record/replay of Intel 64 rdrand and
12738         rdseed instructions.
12739         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
12740
12741 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
12742
12743         PR tdep/20936
12744         Provide and use sparc32 and sparc64 target description XML files.
12745         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
12746         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
12747         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
12748         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
12749         * features/sparc/sparc32-solaris.xml: New file.
12750         * features/sparc/sparc64-solaris.xml: New file.
12751         * features/sparc/sparc32-solaris.c: Generated.
12752         * features/sparc/sparc64-solaris.c: Generated.
12753         * sparc-tdep.h: Account for differences in target descriptions.
12754         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
12755         (sparc32_register_type): Use target provided registers.
12756         (validate_tdesc_registers): New function.
12757         (sparc32_gdbarch_init): Use tdesc_has_registers.
12758         Set pseudoregister functions.
12759         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
12760         (sparc64_register_type): Use target provided registers.
12761         (sparc64_init_abi): Set pseudoregister functions.
12762
12763 2017-02-03  Tom Tromey  <tom@tromey.com>
12764
12765         PR rust/21097:
12766         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
12767         with a single member.
12768
12769 2017-02-03  Pedro Alves  <palves@redhat.com>
12770
12771         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
12772         (cli_interp_base::~cli_interp_base): New.
12773         (cli_interp): New struct.
12774         (as_cli_interp): Cast the interp itself to cli_interp.
12775         (cli_interpreter_pre_command_loop): Rename to ...
12776         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
12777         parameter.
12778         (cli_interpreter_init): Rename to ...
12779         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
12780         boolean.  Make extern.
12781         (cli_interpreter_resume): Rename to ...
12782         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
12783         extern.
12784         (cli_interpreter_suspend): Rename to ...
12785         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
12786         extern.
12787         (cli_interpreter_exec): Rename to ...
12788         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
12789         extern.
12790         (cli_interpreter_supports_command_editing): Rename to ...
12791         (cli_interp_base::supports_command_editing): ... this.  Remove
12792         'interp' parameter.  Make extern.
12793         (cli_ui_out): Rename to ...
12794         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
12795         Make extern.
12796         (cli_set_logging): Rename to ...
12797         (cli_interp_base::set_logging): ... this.  Remove 'interp'
12798         parameter.  Make extern.
12799         (cli_interp_procs): Delete.
12800         (cli_interp_factory): Adjust to use "new".
12801         * cli/cli-interp.h: Include "interps.h".
12802         (struct cli_interp_base): New struct.
12803         * interps.c (struct interp): Delete.  Fields moved to interps.h.
12804         (interp_new): Delete.
12805         (interp::interp, interp::~interp): New.
12806         (interp_set): Use bool, and return void.  Assume the interpreter
12807         has suspend, init and resume methods, and that the all return
12808         void.
12809         (set_top_level_interpreter): interp_set returns void.
12810         (interp_ui_out): Adapt.
12811         (current_interp_set_logging): Adapt.
12812         (interp_data): Delete.
12813         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
12814         (interp_exec): Adapt.
12815         (top_level_interpreter_data): Delete.
12816         * interps.h (interp_init_ftype, interp_resume_ftype)
12817         (interp_suspend_ftype, interp_exec_ftype)
12818         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
12819         (class interp): New.
12820         (interp_new): Delete.
12821         (interp_set): Now returns void.  Use bool.
12822         (interp_data, top_level_interpreter_data): Delete.
12823         * mi/mi-common.h: Include interps.h.
12824         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
12825         init, resume, suspect, exec, interp_ui_out, set_logging and
12826         pre_command_loop methods.
12827         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
12828         (mi_interpreter_init): Rename to ...
12829         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
12830         bool, return void and make extern.  Adjust.
12831         (mi_interpreter_resume): ... Rename to ...
12832         (mi_interp::resume): ... this.  Remove the 'data' parameter,
12833         return void and make extern.  Adjust.
12834         (mi_interpreter_suspend): ... Rename to ...
12835         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
12836         return void and make extern.  Adjust.
12837         (mi_interpreter_exec): ... Rename to ...
12838         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
12839         extern.  Adjust.
12840         (mi_interpreter_pre_command_loop): ... Rename to ...
12841         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
12842         parameter and make extern.
12843         (mi_on_normal_stop_1): Adjust.
12844         (mi_ui_out): Rename to ...
12845         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
12846         parameter and make extern.  Adjust.
12847         (mi_set_logging): Rename to ...
12848         (mi_interp::set_logging): ... this.  Remove the 'interp'
12849         parameter and make extern.  Adjust.
12850         (mi_interp_procs): Delete.
12851         (mi_interp_factory): Adjust to use 'new'.
12852         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
12853         (mi_print_exception, mi_execute_command, mi_load_progress):
12854         Adjust.
12855         * tui/tui-interp.c (tui_interp): New class.
12856         (as_tui_interp): Return a tui_interp pointer.
12857         (tui_on_normal_stop, tui_on_signal_received)
12858         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
12859         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
12860         to use interp::interp_ui_out.
12861         (tui_init): Rename to ...
12862         (tui_interp::init): ... this.  Remove the 'self' parameter, use
12863         bool, return void and make extern.  Adjust.
12864         (tui_resume): Rename to ...
12865         (tui_interp::resume): ... this.  Remove the 'data' parameter,
12866         return void and make extern.  Adjust.
12867         (tui_suspend): Rename to ...
12868         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
12869         return void and make extern.  Adjust.
12870         (tui_ui_out): Rename to ...
12871         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
12872         parameter, and make extern.  Adjust.
12873         (tui_exec): Rename to ...
12874         (tui_interp::exec): ... this.  Remove the 'data' parameter and
12875         make extern.
12876         (tui_interp_procs): Delete.
12877         (tui_interp_factory): Use "new".
12878
12879 2017-02-02  Tom Tromey  <tom@tromey.com>
12880
12881         * rust-exp.y (ends_raw_string, space_then_number)
12882         (rust_identifier_start_p): Return bool.
12883         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
12884         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
12885         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
12886         (rust_chartype_p): Return bool.
12887         (val_print_struct, rust_print_struct_def, rust_print_type):
12888         Update.
12889         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
12890         Return bool.
12891
12892 2017-02-02  Tom Tromey  <tom@tromey.com>
12893
12894         * rust-lang.c: Reindent.
12895
12896 2017-02-02  Tom Tromey  <tom@tromey.com>
12897
12898         * rust-lang.h (rust_crate_for_block): Update.
12899         * rust-lang.c (rust_crate_for_block): Return std::string.
12900         (rust_get_disr_info): Use std:;string, not
12901         gdb::unique_xmalloc_ptr.
12902         * rust-exp.y (crate_name): Update.
12903
12904 2017-02-02  Pedro Alves  <palves@redhat.com>
12905
12906         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
12907         field out of gdb_disassembler_test and make it static.
12908
12909 2017-02-02  Pedro Alves  <palves@redhat.com>
12910
12911         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
12912         mi1_interp and mi_interp fields.
12913
12914 2017-02-02  Pedro Alves  <palves@redhat.com>
12915
12916         * cli/cli-interp.c (struct saved_output_files, saved_output):
12917         Moved from cli/cli-logging.c.
12918         (cli_set_logging): New function.
12919         (cli_interp_procs): Install cli_set_logging.
12920         * cli/cli-interp.h (make_logging_output, cli_set_logging):
12921         Declare.
12922         * cli/cli-logging.c (struct saved_output_files, saved_output):
12923         Moved to cli/cli-interp.c.
12924         (pop_output_files): Don't save outputs here.
12925         (make_logging_output): New function.
12926         (handle_redirections): Don't build tee nor save previous outputs
12927         here.
12928         * interps.c (current_interp_set_logging): Change prototype.
12929         Assume there's always a set_logging_proc method installed.
12930         * interps.h (interp_set_logging_ftype): Change prototype.
12931         (current_interp_set_logging): Change prototype and adjust comment.
12932         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
12933         use make_logging_output.
12934         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
12935 2017-02-02  Pedro Alves  <palves@redhat.com>
12936
12937         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
12938         from ...
12939         (set_logging_overwrite): ... here.
12940         (logging_no_redirect_file): Delete.
12941         (set_logging_redirect): Don't handle redirection on the fly.
12942         Instead warn that "logging off" / "logging on" is necessary.
12943         (pop_output_files): Delete references to logging_no_redirect_file.
12944         (show_logging_command): Always speak in terms of what will happen
12945         once logging is reenabled.
12946
12947 2017-02-02  Pedro Alves  <palves@redhat.com>
12948
12949         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
12950
12951 2017-02-02  Pedro Alves  <palves@redhat.com>
12952
12953         * disasm.c (gdb_pretty_print_insn): Rename to ...
12954         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
12955         Remove gdbarch parameter.  Adapt to clear the object's buffers
12956         instead of allocating new buffers, and to print using the object's
12957         gdb_disassembler instead of calling gdb_print_insn.
12958         (dump_insns): Use gdb_pretty_print_disassembler.
12959         * disasm.h (gdb_pretty_print_insn): Delete declaration.
12960         (gdb_pretty_print_disassembler): New class.
12961         * record-btrace.c (btrace_insn_history): Use
12962         gdb_pretty_print_disassembler.
12963
12964 2017-02-02  Pedro Alves  <palves@redhat.com>
12965
12966         * ada-lang.c (type_as_string): Use string_file.
12967         * ada-valprint.c (ada_print_floating): Use string_file.
12968         * ada-varobj.c (ada_varobj_scalar_image)
12969         (ada_varobj_get_value_image): Use string_file.
12970         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
12971         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
12972         * breakpoint.c (update_inserted_breakpoint_locations)
12973         (insert_breakpoint_locations, reattach_breakpoints)
12974         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
12975         (print_it_watchpoint): Use string_file.
12976         (save_breakpoints): Use stdio_file.
12977         * c-exp.y (oper): Use string_file.
12978         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
12979         tee_file.
12980         (pop_output_files): Use delete.
12981         (handle_redirections): Use stdio_file and tee_file.
12982         * cli/cli-setshow.c (do_show_command): Use string_file.
12983         * compile/compile-c-support.c (c_compute_program): Use
12984         string_file.
12985         * compile/compile-c-symbols.c (generate_vla_size): Take a
12986         'string_file &' instead of a 'ui_file *'.
12987         (generate_c_for_for_one_variable): Take a 'string_file &' instead
12988         of a 'ui_file *'.  Use string_file.
12989         (generate_c_for_variable_locations): Take a 'string_file &'
12990         instead of a 'ui_file *'.
12991         * compile/compile-internal.h (generate_c_for_for_one_variable):
12992         Take a 'string_file &' instead of a 'ui_file *'.
12993         * compile/compile-loc2c.c (push, pushf, unary, binary)
12994         (print_label, pushf_register_address, pushf_register)
12995         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
12996         'ui_file *'.  Adjust.
12997         * compile/compile.c (compile_to_object): Use string_file.
12998         * compile/compile.h (compile_dwarf_expr_to_c)
12999         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
13000         'ui_file *'.
13001         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
13002         (replace_typedefs_qualified_name): Use string_file and
13003         obstack_copy0.
13004         * disasm.c (gdb_pretty_print_insn): Use string_file.
13005         (gdb_disassembly): Adjust reference the null_stream global.
13006         (do_ui_file_delete): Delete.
13007         (gdb_insn_length): Use null_stream.
13008         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
13009         * dwarf2loc.c (dwarf2_compile_property_to_c)
13010         (locexpr_generate_c_location, loclist_generate_c_location): Take a
13011         'string_file &' instead of a 'ui_file *'.
13012         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
13013         * dwarf2read.c (do_ui_file_peek_last): Delete.
13014         (dwarf2_compute_name): Use string_file.
13015         * event-top.c (gdb_setup_readline): Use stdio_file.
13016         * gdbarch.sh (verify_gdbarch): Use string_file.
13017         * gdbtypes.c (safe_parse_type): Use null_stream.
13018         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
13019         string_file.
13020         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
13021         'string_file *' instead of a 'ui_file *'.
13022         (gdbscm_arch_disassemble): Use string_file.
13023         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
13024         * guile/scm-ports.c (class ioscm_file_port): Now a class that
13025         inherits from ui_file.
13026         (ioscm_file_port_delete, ioscm_file_port_rewind)
13027         (ioscm_file_port_put): Delete.
13028         (ioscm_file_port_write): Rename to ...
13029         (ioscm_file_port::write): ... this.  Remove file_port_magic
13030         checks.
13031         (ioscm_file_port_new): Delete.
13032         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
13033         ui_file_up.
13034         * guile/scm-type.c (tyscm_type_name): Use string_file.
13035         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
13036         Use string_file.
13037         * infcmd.c (print_return_value_1): Use string_file.
13038         * infrun.c (print_target_wait_results): Use string_file.
13039         * language.c (add_language): Use string_file.
13040         * location.c (explicit_to_string_internal): Use string_file.
13041         * main.c (captured_main_1): Use null_file.
13042         * maint.c (maintenance_print_architecture): Use stdio_file.
13043         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
13044         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
13045         event_channel>: Change type to mi_console_file pointer.
13046         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
13047         (mi_console_file_delete): Delete.
13048         (struct mi_console_file): Delete.
13049         (mi_console_file_magic): Delete.
13050         (mi_console_file_new): Delete.
13051         (mi_console_file::mi_console_file): New.
13052         (mi_console_file_delete): Delete.
13053         (mi_console_file_fputs): Delete.
13054         (mi_console_file::write): New.
13055         (mi_console_raw_packet): Delete.
13056         (mi_console_file::flush): New.
13057         (mi_console_file_flush): Delete.
13058         (mi_console_set_raw): Rename to ...
13059         (mi_console_file::set_raw): ... this.
13060         * mi/mi-console.h (class mi_console_file): New class.
13061         (mi_console_file_new, mi_console_set_raw): Delete.
13062         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
13063         (mi_set_logging): Use delete and tee_file.  Adjust.
13064         * mi/mi-main.c (output_register): Use string_file.
13065         (mi_cmd_data_evaluate_expression): Use string_file.
13066         (mi_cmd_data_read_memory): Use string_file.
13067         (mi_cmd_execute, print_variable_or_computed): Use string_file.
13068         * mi/mi-out.c (mi_ui_out::main_stream): New.
13069         (mi_ui_out::rewind): Use main_stream and
13070         string_file.
13071         (mi_ui_out::put): Use main_stream and string_file.
13072         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13073         Allocate a 'string_file' instead.
13074         (mi_out_new): Don't allocate a mem_fileopen stream here.
13075         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13076         (mi_ui_out::main_stream): Declare method.
13077         * printcmd.c (eval_command): Use string_file.
13078         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
13079         * python/py-arch.c (archpy_disassemble): Use string_file.
13080         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
13081         * python/py-frame.c (frapy_str): Use string_file.
13082         * python/py-framefilter.c (py_print_type, py_print_single_arg):
13083         Use string_file.
13084         * python/py-type.c (typy_str): Use string_file.
13085         * python/py-unwind.c (unwind_infopy_str): Use string_file.
13086         * python/py-value.c (valpy_str): Use string_file.
13087         * record-btrace.c (btrace_insn_history): Use string_file.
13088         * regcache.c (regcache_print): Use stdio_file.
13089         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
13090         * remote.c (escape_buffer): Use string_file.
13091         * rust-lang.c (rust_get_disr_info): Use string_file.
13092         * serial.c (serial_open_ops_1): Use stdio_file.
13093         (do_serial_close): Use delete.
13094         * stack.c (print_frame_arg): Use string_file.
13095         (print_frame_args): Remove local mem_fileopen stream, not used.
13096         (print_frame): Use string_file.
13097         * symmisc.c (maintenance_print_symbols): Use stdio_file.
13098         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
13099         Take a 'string_file *' instead of a 'ui_file *'.
13100         * top.c (new_ui): Use stdio_file and stderr_file.
13101         (free_ui): Use delete.
13102         (execute_command_to_string): Use string_file.
13103         (quit_confirm): Use string_file.
13104         * tracepoint.c (collection_list::append_exp): Use string_file.
13105         * tui/tui-disasm.c (tui_disassemble): Use string_file.
13106         * tui/tui-file.c: Don't include "ui-file.h".
13107         (enum streamtype, struct tui_stream): Delete.
13108         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
13109         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
13110         (tui_file::tui_file): New method.
13111         (tui_file_fputs): Delete.
13112         (tui_file_get_strbuf): Delete.
13113         (tui_file::puts): New method.
13114         (tui_file_adjust_strbuf): Delete.
13115         (tui_file_flush): Delete.
13116         (tui_file::flush): New method.
13117         * tui/tui-file.h: Tweak intro comment.
13118         Include ui-file.h.
13119         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
13120         (tui_file_adjust_strbuf): Delete declarations.
13121         (class tui_file): New class.
13122         * tui/tui-io.c (tui_initialize_io): Use tui_file.
13123         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
13124         (tui_register_format): Use string_stream.
13125         * tui/tui-stack.c (tui_make_status_line): Use string_file.
13126         (tui_get_function_from_frame): Use string_file.
13127         * typeprint.c (type_to_string): Use string_file.
13128         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
13129         (null_stream): New global.
13130         (ui_file_delete): Delete.
13131         (ui_file::ui_file): New.
13132         (null_file_isatty): Delete.
13133         (ui_file::~ui_file): New.
13134         (null_file_rewind): Delete.
13135         (ui_file::printf): New.
13136         (null_file_put): Delete.
13137         (null_file_flush): Delete.
13138         (ui_file::putstr): New.
13139         (null_file_write): Delete.
13140         (ui_file::putstrn): New.
13141         (null_file_read): Delete.
13142         (ui_file::putc): New.
13143         (null_file_fputs): Delete.
13144         (null_file_write_async_safe): Delete.
13145         (ui_file::vprintf): New.
13146         (null_file_delete): Delete.
13147         (null_file::write): New.
13148         (null_file_fseek): Delete.
13149         (null_file::puts): New.
13150         (ui_file_data): Delete.
13151         (null_file::write_async_safe): New.
13152         (gdb_flush, ui_file_isatty): Adjust.
13153         (ui_file_put, ui_file_rewind): Delete.
13154         (ui_file_write): Adjust.
13155         (ui_file_write_for_put): Delete.
13156         (ui_file_write_async_safe, ui_file_read): Adjust.
13157         (ui_file_fseek): Delete.
13158         (fputs_unfiltered): Adjust.
13159         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
13160         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
13161         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
13162         (set_ui_file_data): Delete.
13163         (string_file::~string_file, string_file::write)
13164         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
13165         (do_ui_file_as_string, ui_file_as_string): Delete.
13166         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
13167         (struct mem_file): Delete.
13168         (mem_file_new): Delete.
13169         (stdio_file::stdio_file): New.
13170         (mem_file_delete): Delete.
13171         (stdio_file::stdio_file): New.
13172         (mem_fileopen): Delete.
13173         (stdio_file::~stdio_file): New.
13174         (mem_file_rewind): Delete.
13175         (stdio_file::set_stream): New.
13176         (mem_file_put): Delete.
13177         (stdio_file::open): New.
13178         (mem_file_write): Delete.
13179         (stdio_file_magic, struct stdio_file): Delete.
13180         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
13181         (stdio_file::flush): New.
13182         (stdio_file_read): Rename to ...
13183         (stdio_file::read): ... this.  Adjust.
13184         (stdio_file_write): Rename to ...
13185         (stdio_file::write): ... this.  Adjust.
13186         (stdio_file_write_async_safe): Rename to ...
13187         (stdio_file::write_async_safe) ... this.  Adjust.
13188         (stdio_file_fputs): Rename to ...
13189         (stdio_file::puts) ... this.  Adjust.
13190         (stdio_file_isatty): Delete.
13191         (stdio_file_fseek): Delete.
13192         (stdio_file::isatty): New.
13193         (stderr_file_write): Rename to ...
13194         (stderr_file::write) ... this.  Adjust.
13195         (stderr_file_fputs): Rename to ...
13196         (stderr_file::puts) ... this.  Adjust.
13197         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
13198         (stderr_file::stderr_file): New.
13199         (tee_file_magic): Delete.
13200         (struct tee_file): Delete.
13201         (tee_file::tee_file): New.
13202         (tee_file_new): Delete.
13203         (tee_file::~tee_file): New.
13204         (tee_file_delete): Delete.
13205         (tee_file_flush): Rename to ...
13206         (tee_file::flush): ... this.  Adjust.
13207         (tee_file_write): Rename to ...
13208         (tee_file::write): ... this.  Adjust.
13209         (tee_file::write_async_safe): New.
13210         (tee_file_fputs): Rename to ...
13211         (tee_file::puts): ... this.  Adjust.
13212         (tee_file_isatty): Rename to ...
13213         (tee_file::isatty): ... this.  Adjust.
13214         * ui-file.h (struct obstack, struct ui_file): Don't
13215         forward-declare.
13216         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
13217         (ui_file_write_ftype)
13218         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
13219         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
13220         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
13221         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
13222         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
13223         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
13224         (set_ui_file_fseek): Delete.
13225         (ui_file_data, ui_file_delete, ui_file_rewind)
13226         (struct ui_file): New.
13227         (ui_file_up): New.
13228         (class null_file): New.
13229         (null_stream): Declare.
13230         (ui_file_write_for_put, ui_file_put): Delete.
13231         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
13232         Delete.
13233         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
13234         (gdb_fopen, tee_file_new): Delete.
13235         (struct string_file): New.
13236         (struct stdio_file): New.
13237         (stdio_file_up): New.
13238         (struct stderr_file): New.
13239         (class tee_file): New.
13240         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
13241         of a 'ui_file *'.  Adjust.
13242         * ui-out.h (class ui_out) <field_stream>: Likewise.
13243         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
13244         (null_stream): Delete.
13245         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
13246         Adjust.
13247         * utils.h (struct ui_file): Delete forward declaration..
13248         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
13249         (error_stream): Take a 'string_file &' instead of a
13250         'ui_file *'.
13251         * varobj.c (varobj_value_get_print_value): Use string_file.
13252         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
13253         * gdbarch.c: Regenerate.
13254
13255 2017-02-02  Pedro Alves  <palves@redhat.com>
13256
13257         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
13258         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
13259         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
13260         Adjust to call gdb_print_insn instead of
13261         gdb_disassembler::print_insn.
13262         (dump_insns, do_mixed_source_and_assembly_deprecated)
13263         (do_mixed_source_and_assembly, do_assembly_only): Add back a
13264         'gdbarch' parameter.  Remove gdb_disassembler parameter.
13265         (gdb_disassembly): Don't allocate a gdb_disassembler here.
13266         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
13267         declaration.
13268         (gdb_pretty_print_insn): Re-add declaration.
13269         * record-btrace.c (btrace_insn_history): Don't allocate a
13270         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
13271
13272 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
13273
13274         * disasm.h (gdb_disassembly): Remove file_string parameter.
13275         * disasm.c (gdb_disassembly): Likewise.
13276         * cli/cli-cmds.c (print_disassembly): Adapt.
13277         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
13278         * stack.c (do_gdb_disassembly): Likewise.
13279
13280 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13281
13282         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
13283         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
13284         targets.  And if the implicit value is longer than needed, extract
13285         the first bytes instead of the "least significant" ones.
13286
13287 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13288
13289         * btrace.c (btrace_enable): Do not call btrace_add_pc for
13290         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
13291         (btrace_fetch): Assert can_access_registers_ptid.
13292         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
13293         validate_registers_access.
13294
13295 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13296
13297         * gdbthread.h (can_access_registers_ptid): New.
13298         * thread.c (can_access_registers_ptid): New.
13299
13300 2017-02-01  Pedro Alves  <palves@redhat.com>
13301
13302         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
13303
13304 2017-01-31  Pedro Alves  <palves@redhat.com>
13305
13306         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
13307         Fix typos.
13308
13309 2017-01-31  Pedro Alves  <palves@redhat.com>
13310
13311         * stack.c (print_frame_args): Remove local mem_fileopen stream,
13312         not used.
13313
13314 2017-01-31  Pedro Alves  <palves@redhat.com>
13315
13316         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
13317
13318 2017-01-31  Pedro Alves  <palves@redhat.com>
13319
13320         * common/scoped_restore.h
13321         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
13322         change the value's parameter type to T2.
13323         (make_scoped_restore): Likewise.
13324
13325 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13326             Richard Henderson  <rth@redhat.com>
13327
13328         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
13329         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
13330         GS_BASE for older kernels.
13331         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
13332         GS_BASE for older kernels.
13333         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
13334         and GS_BASE to the offset table.
13335         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
13336         system register group.
13337         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
13338         for older kernels.
13339         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
13340         amd64 ABI.
13341         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
13342         AMD64_GSBASE_REGNUM.
13343         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
13344         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
13345         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
13346         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
13347         i386/64bit-segments.xml in those rules.
13348         * features/i386/64bit-segments.xml: New file.
13349         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
13350         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
13351         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
13352         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
13353         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
13354         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
13355         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
13356         * features/i386/amd64-avx-linux.c: Regenerated.
13357         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
13358         * features/i386/amd64-avx-mpx.c: Regenerated.
13359         * features/i386/amd64-avx512-linux.c: Regenerated.
13360         * features/i386/amd64-linux.c: Regenerated.
13361         * features/i386/amd64-mpx-linux.c: Regenerated.
13362         * features/i386/i386-avx-mpx-linux.c: Regenerated.
13363         * features/i386/i386-avx-mpx.c: Regenerated.
13364         * features/i386/x32-avx-linux.c: Regenerated.
13365         * features/i386/x32-avx512-linux.c: Regenerated.
13366         * regformats/i386/amd64-avx-linux.dat: Regenerated.
13367         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
13368         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
13369         * regformats/i386/amd64-linux.dat: Regenerated.
13370         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
13371         * regformats/i386/x32-avx-linux.dat: Regenerated.
13372         * regformats/i386/x32-avx512-linux.dat: Regenerated.
13373         * regformats/i386/x32-linux.dat: Regenerated.
13374
13375 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13376
13377         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
13378         Set to AMD64_NUM_REGS.
13379
13380 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13381
13382         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
13383         that checks validity of a register number.
13384
13385 2017-01-27  Kees Cook  <keescook@google.com>
13386
13387         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
13388         fetch_fpregs if target has fpa registers.
13389         (arm_linux_store_inferior_registers): Call store_fpregs if target
13390         has fpa registers.
13391
13392 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13393
13394         * cris-tdep.c (cris_gdbarch_init): Remove check for
13395         info.byte_order and force it to BFD_ENDIAN_LITTLE.
13396
13397 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
13398
13399         * corelow.c (get_core_register_section): Check for regset
13400         existence before checking for REGSET_VARIABLE_SIZE.
13401
13402 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13403             Pedro Alves  <palves@redhat.com>
13404
13405         PR gdb/20939
13406         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
13407         call memory_error, save memaddr instead.
13408         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
13409         negative, cal memory_error.
13410         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
13411
13412 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13413
13414         * disasm-selftests.c (memory_error_test): New function.
13415         (_initialize_disasm_selftests): Register memory_error_test.
13416
13417 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13418
13419         * Makefile.in (SFILES): Add disasm-selftests.c and
13420         selftest-arch.c.
13421         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
13422         * disasm-selftests.c: New file.
13423         * selftest-arch.c: New file.
13424         * selftest-arch.h: New file.
13425
13426 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13427
13428         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
13429         to bfd_arch_mep.  Don't return 0 if section is not
13430         found.  Call print_insn_mep.
13431
13432 2017-01-26  Pedro Alves  <palves@redhat.com>
13433             Yao Qi  <yao.qi@linaro.org>
13434
13435         * arm-tdep.c: Include "disasm.h".
13436         (gdb_print_insn_arm): Update code to get gdbarch.
13437         * disasm.c (dis_asm_read_memory): Change it to
13438         gdb_disassembler::dis_asm_read_memory.
13439         (dis_asm_memory_error): Likewise.
13440         (dis_asm_print_address): Likewise.
13441         (gdb_pretty_print_insn): Change it to
13442         gdb_disassembler::pretty_print_insn.
13443         (dump_insns): Add one argument gdb_disassemlber.  All
13444         callers updated.
13445         (do_mixed_source_and_assembly_deprecated): Likewise.
13446         (do_mixed_source_and_assembly): Likewise.
13447         (do_assembly_only): Likewise.
13448         (gdb_disassembler::gdb_disassembler): New.
13449         (gdb_disassembler::print_insn): New.
13450         * disasm.h (class gdb_disassembler): New.
13451         (gdb_pretty_print_insn): Remove declaration.
13452         (gdb_disassemble_info): Likewise.
13453         * guile/scm-disasm.c (class gdbscm_disassembler): New.
13454         (gdbscm_disasm_read_memory_worker): Update.
13455         (gdbscm_disasm_read_memory): Update.
13456         (gdbscm_disasm_memory_error): Remove.
13457         (gdbscm_disasm_print_address): Remove.
13458         (gdbscm_disassembler::gdbscm_disassembler): New.
13459         (gdbscm_print_insn_from_port): Update.
13460         * mips-tdep.c: Include disasm.h.
13461         (gdb_print_insn_mips): Update code to get gdbarch.
13462         * record-btrace.c (btrace_insn_history): Update.
13463         * spu-tdep.c: Include disasm.h.
13464         (struct spu_dis_asm_data): Remove.
13465         (struct spu_dis_asm_info): New.
13466         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
13467         SPU id.
13468         (gdb_print_insn_spu): Cast disassemble_info to
13469         spu_dis_asm_info.
13470
13471 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13472
13473         * disasm.c (do_ui_file_delete): Delete.
13474         (gdb_insn_length): Move code creating stream to ...
13475         * utils.c (null_stream): ... here.  New function.
13476         * utils.h (null_stream): Declare.
13477
13478 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
13479
13480         * python/py-inferior.c (find_thread_object): Return directly
13481         from the loop.  Remove "found" variable.
13482
13483 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
13484
13485         GDB 7.12.1 released.
13486
13487 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
13488
13489         * python/py-function.c (fnpy_call): Reorder declarations to have
13490         the gdbpy_enter object declared first.
13491         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
13492
13493 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
13494
13495         PR python/21068
13496         * python/python-internal.h (PyMem_RawMalloc): Define for
13497         Python < 3.4.
13498         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
13499         PyMem_RawMalloc instead of PyMem_Malloc.
13500
13501 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
13502             Luis Machado  <lgustavo@codesourcery.com>
13503
13504         * NEWS (New commands): Mention flash-erase.
13505         (New MI commands): Mention target-flash-erase.
13506         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
13507         command.
13508         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
13509         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
13510         * target.c (flash_erase_command): New function.
13511         (initialize_targets): Add new flash-erase command.
13512         * target.h (flash_erase_command): New declaration.
13513
13514 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
13515
13516         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
13517         HAVE_SYS_PROCFS_H is defined.
13518
13519 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
13520
13521         * remote.c (struct cached_reg): Change data into a pointer.
13522         * (stop_reply_dtr): Free data pointers before deleting vector.
13523         (process_stop_reply): Likewise.
13524         (remote_parse_stop_reply): Allocate space for data
13525
13526 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
13527
13528         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
13529         MAX_REGISTER_SIZE.
13530         (amd64_pseudo_register_read_value): Likewise.
13531         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
13532         (store_register_using_P): Likewise.
13533         * regcache.c (regcache_xfer_part): Likewise.
13534
13535 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
13536
13537         Split real and pseudo registers.
13538         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
13539         (sparc32_pseudo_regnum): New enum.
13540         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
13541         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
13542         (SPARC32_CP0_REGISTERS): New macro.
13543         (sparc32_pseudo_register_name): New function.
13544         (sparc32_register_name): Use sparc32_pseudo_register_name.
13545         (sparc32_pseudo_register_type): New function.
13546         (sparc32_register_type): Use sparc32_pseudo_register_type.
13547         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
13548         pseudo register numbers.
13549         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
13550         (SPARC64_CP0_REGISTERS): New macro.
13551         (sparc64_pseudo_register_name): New function.
13552         (sparc64_register_name): Use sparc64_pseudo_register_name.
13553         (sparc64_pseudo_register_type): New function.
13554         (sparc64_register_type): Use sparc64_pseudo_register_type.
13555         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
13556         pseudo register numbers.
13557         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
13558         sparc64_store_arguments): Handle pseudo register numbers.
13559
13560 2017-01-13  Yao Qi  <yao.qi@linaro.org>
13561
13562         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
13563         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
13564         output.
13565         (getpkt_or_notif_sane_1): Likewise.
13566
13567 2017-01-13  Yao Qi  <yao.qi@linaro.org>
13568
13569         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
13570         of CC.  Pass "-x c++-header" instead of "-x c".
13571
13572 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13573
13574         * remote.c (remote_can_async_p): Update comment.
13575
13576 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13577
13578         * linux-nat.c (linux_nat_can_async_p): Update comment.
13579
13580 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13581
13582         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
13583
13584 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
13585
13586         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
13587
13588 2017-01-10  Tom Tromey  <tom@tromey.com>
13589
13590         * python/py-type.c (typy_legacy_template_argument): Update.
13591         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
13592         ~demangle_parse_info): Declare new members.
13593         (cp_demangled_name_to_comp): Return unique_ptr.
13594         (cp_demangled_name_parse_free)
13595         (make_cleanup_cp_demangled_name_parse_free)
13596         (cp_new_demangle_parse_info): Remove.
13597         * cp-support.c (do_demangled_name_parse_free_cleanup)
13598         (make_cleanup_cp_demangled_name_parse_free): Remove.
13599         (inspect_type, cp_canonicalize_string_full)
13600         (cp_canonicalize_string): Update.
13601         (mangled_name_to_comp): Change return type.
13602         (cp_class_name_from_physname, method_name_from_physname)
13603         (cp_func_name, cp_remove_params): Update.
13604         * cp-name-parser.y (demangle_parse_info): New constructor, from
13605         cp_new_demangle_parse_info.
13606         (~demangle_parse_info): New destructor, from
13607         cp_demangled_name_parse_free.
13608         (cp_merge_demangle_parse_infos): Update.
13609         (cp_demangled_name_to_comp): Change return type.
13610
13611 2017-01-10  Tom Tromey  <tom@tromey.com>
13612
13613         * top.c (prevent_dont_repeat): Change return type.
13614         * python/python.c (execute_gdb_command): Use std::string.
13615         Update.
13616         * guile/guile.c (gdbscm_execute_gdb_command): Update.
13617         * command.h (prevent_dont_repeat): Change return type.
13618         * breakpoint.c (bpstat_do_actions_1): Update.
13619
13620 2017-01-10  Tom Tromey  <tom@tromey.com>
13621
13622         * value.h (scoped_value_mark::~scoped_value_mark): Call
13623         free_to_mark.
13624         (scoped_value_mark::free_to_mark): New method.
13625         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
13626         scoped_value_mark.
13627
13628 2017-01-10  Tom Tromey  <tom@tromey.com>
13629
13630         * python/py-value.c (valpy_dereference, valpy_referenced_value)
13631         (valpy_reference_value, valpy_const_value, valpy_get_address)
13632         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
13633         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
13634         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
13635         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
13636         scoped_value_mark.
13637         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
13638         * value.h (scoped_value_mark): New class.
13639
13640 2017-01-10  Tom Tromey  <tom@tromey.com>
13641
13642         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
13643         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
13644         * psymtab.c (discard_psymtabs_upto): Remove.
13645         (make_cleanup_discard_psymtabs): Remove.
13646         (struct psymtab_state): Remove.
13647
13648 2017-01-10  Tom Tromey  <tom@tromey.com>
13649
13650         * record-full.c (record_full_save_cleanups): Remove.
13651         (record_full_save): Use gdb::unlinker.
13652         * gcore.c (do_bfd_delete_cleanup): Remove.
13653         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
13654         cleanups.
13655         * dwarf2read.c (unlink_if_set): Remove.
13656         (write_psymtabs_to_index): Use gdb::unlinker.
13657         * common/gdb_unlinker.h: New file.
13658
13659 2017-01-10  Tom Tromey  <tom@tromey.com>
13660
13661         * windows-tdep.c (windows_xfer_shared_library): Update.
13662         * windows-nat.c (windows_make_so): Update.
13663         * utils.h (make_cleanup_bfd_unref): Remove.
13664         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
13665         * symfile.h (symfile_bfd_open)
13666         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
13667         * symfile.c (read_symbols, symbol_file_add)
13668         (separate_debug_file_exists): Update.
13669         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
13670         (generic_load, reread_symbols): Update.
13671         * symfile-mem.c (symbol_file_add_from_memory): Update.
13672         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
13673         (spu_symbol_file_add_from_memory): Update.
13674         * solist.h (struct target_so_ops) <bfd_open>: Return
13675         gdb_bfd_ref_ptr.
13676         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
13677         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
13678         gdb_bfd_ref_ptr.
13679         (solib_map_sections, reload_shared_libraries_1): Update.
13680         * solib-svr4.c (enable_break): Update.
13681         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
13682         * solib-frv.c (enable_break2): Update.
13683         * solib-dsbt.c (enable_break): Update.
13684         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
13685         gdb_bfd_ref_ptr.
13686         (darwin_solib_get_all_image_info_addr_at_init): Update.
13687         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
13688         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
13689         * record-full.c (record_full_save): Update.
13690         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
13691         * procfs.c (insert_dbx_link_bpt_in_file): Update.
13692         * minidebug.c (find_separate_debug_file_in_section): Return
13693         gdb_bfd_ref_ptr.
13694         * machoread.c (macho_add_oso_symfile): Change abfd to
13695         gdb_bfd_ref_ptr.
13696         (macho_symfile_read_all_oso): Update.
13697         (macho_check_dsym): Return gdb_bfd_ref_ptr.
13698         (macho_symfile_read): Update.
13699         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
13700         (jit_bfd_try_read_symtab): Update.
13701         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13702         (gdb_bfd_openw, gdb_bfd_openr_iovec)
13703         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13704         gdb_bfd_ref_ptr.
13705         (gdb_bfd_ref_policy): New struct.
13706         (gdb_bfd_ref_ptr): New typedef.
13707         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13708         (gdb_bfd_openw, gdb_bfd_openr_iovec)
13709         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13710         gdb_bfd_ref_ptr.
13711         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13712         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13713         (gcore_command): Update.
13714         * exec.c (exec_file_attach): Update.
13715         * elfread.c (elf_symfile_read): Update.
13716         * dwarf2read.c (dwarf2_get_dwz_file): Update.
13717         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
13718         (open_and_init_dwo_file): Update.
13719         (open_dwp_file): Return gdb_bfd_ref_ptr.
13720         (open_and_init_dwp_file): Update.
13721         * corelow.c (core_open): Update.
13722         * compile/compile-object-load.c (compile_object_load): Update.
13723         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
13724         * coffread.c (coff_symfile_read): Update.
13725         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
13726         gdb_bfd_ref_ptr.  Rename.
13727         (dump_bfd_file, restore_command): Update.
13728         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13729         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13730         (find_separate_debug_file_by_buildid): Update.
13731
13732 2017-01-10  Tom Tromey  <tom@tromey.com>
13733
13734         * common/gdb_ref_ptr.h: New file.
13735         * python/py-ref.h (struct gdbpy_ref_policy): New.
13736         (gdbpy_ref): Now a typedef.
13737
13738 2017-01-10  Tom Tromey  <tom@tromey.com>
13739
13740         * utils.h (make_cleanup_htab_delete): Don't declare.
13741         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
13742         Remove.
13743         * linespec.c (decode_compound_collector): Add constructor,
13744         destructor.
13745         (lookup_prefix_sym): Remove cleanup.
13746         (symtab_collector): Add constructor, destructor.
13747         (collect_symtabs_from_filename): Remove cleanup.
13748         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
13749         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
13750         Use htab_up.
13751         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
13752         * dwarf2read.c (dw2_expand_symtabs_matching)
13753         (dw2_map_symbol_filenames, dwarf_decode_macros)
13754         (write_psymtabs_to_index): Use htab_up.
13755         * dwarf2loc.c (func_verify_no_selftailcall)
13756         (call_site_find_chain_1, func_verify_no_selftailcall)
13757         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
13758         std::vector, gdb::unique_xmalloc_ptr.
13759         (call_sitep): Remove typedef.
13760         (dwarf2_locexpr_baton_eval): Remove unused variable.
13761
13762 2017-01-10  Tom Tromey  <tom@tromey.com>
13763
13764         * python/python-internal.h (make_cleanup_py_decref)
13765         (make_cleanup_py_xdecref): Don't declare.
13766         * python/py-utils.c (py_decref, make_cleanup_py_decref)
13767         (py_xdecref, make_cleanup_py_xdecref): Remove.
13768
13769 2017-01-10  Tom Tromey  <tom@tromey.com>
13770
13771         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
13772         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
13773
13774 2017-01-10  Tom Tromey  <tom@tromey.com>
13775
13776         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
13777
13778 2017-01-10  Tom Tromey  <tom@tromey.com>
13779
13780         * python/py-utils.c (unicode_to_encoded_string)
13781         (python_string_to_target_string)
13782         (python_string_to_target_python_string)
13783         (python_string_to_host_string, gdbpy_obj_to_string)
13784         (get_addr_from_python): Use gdbpy_ref.
13785
13786 2017-01-10  Tom Tromey  <tom@tromey.com>
13787
13788         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
13789         gdbpy_ref.
13790
13791 2017-01-10  Tom Tromey  <tom@tromey.com>
13792
13793         * python/python.c (eval_python_command, gdbpy_decode_line)
13794         (gdbpy_run_events, gdbpy_start_type_printers)
13795         (gdbpy_apply_type_printers): Use gdbpy_ref.
13796
13797 2017-01-10  Tom Tromey  <tom@tromey.com>
13798
13799         * python/py-param.c (get_doc_string, compute_enum_values): Use
13800         gdbpy_ref.
13801
13802 2017-01-10  Tom Tromey  <tom@tromey.com>
13803
13804         * python/py-inferior.c (find_thread_object, build_inferior_list):
13805         Use gdbpy_ref.
13806
13807 2017-01-10  Tom Tromey  <tom@tromey.com>
13808
13809         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13810
13811 2017-01-10  Tom Tromey  <tom@tromey.com>
13812
13813         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
13814         gdbpy_ref.
13815
13816 2017-01-10  Tom Tromey  <tom@tromey.com>
13817
13818         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
13819         extra incref.
13820         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
13821         Use gdbpy_ref.
13822
13823 2017-01-10  Tom Tromey  <tom@tromey.com>
13824
13825         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
13826         gdbpy_ref.
13827
13828 2017-01-10  Tom Tromey  <tom@tromey.com>
13829
13830         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
13831         decref results of PyArg_ParseTupleAndKeywords.
13832
13833 2017-01-10  Tom Tromey  <tom@tromey.com>
13834
13835         * python/python.c (python_run_simple_file): Use
13836         unique_xmalloc_ptr, gdbpy_ref.
13837
13838 2017-01-10  Tom Tromey  <tom@tromey.com>
13839
13840         * python/py-prettyprint.c (print_stack_unless_memory_error)
13841         (print_string_repr, print_children): Use gdbpy_ref.
13842         (dummy_python_frame): New class.
13843         (dummy_python_frame::dummy_python_frame): Rename from
13844         push_dummy_python_frame.
13845         (py_restore_tstate): Remove.
13846
13847 2017-01-10  Tom Tromey  <tom@tromey.com>
13848
13849         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13850
13851 2017-01-10  Tom Tromey  <tom@tromey.com>
13852
13853         * python/python.c (ensure_python_env, restore_python_env):
13854         Remove.
13855         * python/python-internal.h (ensure_python_env): Don't declare.
13856         * varobj.h (varobj_ensure_python_env): Don't declare.
13857         * varobj.c (varobj_ensure_python_env): Remove.
13858
13859 2017-01-10  Tom Tromey  <tom@tromey.com>
13860
13861         * varobj.c (varobj_value_get_print_value): Use
13862         gdbpy_enter_varobj.
13863
13864 2017-01-10  Tom Tromey  <tom@tromey.com>
13865
13866         * python/py-prettyprint.c (print_string_repr, print_children):
13867         Update.
13868         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
13869         of "encoding".
13870         * varobj.c (varobj_value_get_print_value): Update.
13871         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
13872
13873 2017-01-10  Tom Tromey  <tom@tromey.com>
13874
13875         * varobj.c (varobj_get_display_hint)
13876         (dynamic_varobj_has_child_method, install_new_value_visualizer)
13877         (varobj_set_visualizer, free_variable): Use
13878         gdbpy_enter_varobj.
13879
13880 2017-01-10  Tom Tromey  <tom@tromey.com>
13881
13882         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
13883         (do_finish_initialization): New function.  Use gdbpy_ref.
13884         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
13885         do_finish_initialization.
13886
13887 2017-01-10  Tom Tromey  <tom@tromey.com>
13888
13889         * python/py-param.c (get_set_value, get_show_value): Use
13890         gdbpy_enter, gdbpy_ref.
13891
13892 2017-01-10  Tom Tromey  <tom@tromey.com>
13893
13894         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
13895
13896 2017-01-10  Tom Tromey  <tom@tromey.com>
13897
13898         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
13899
13900 2017-01-10  Tom Tromey  <tom@tromey.com>
13901
13902         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
13903         Use gdbpy_enter_varobj.
13904
13905 2017-01-10  Tom Tromey  <tom@tromey.com>
13906
13907         * varobj.c (gdbpy_enter_varobj): New constructor.
13908         * python/python-internal.h (gdbpy_enter_varobj): New class.
13909         * python/py-varobj.c (py_varobj_get_iterator): Use
13910         gdbpy_enter_varobj.
13911
13912 2017-01-10  Tom Tromey  <tom@tromey.com>
13913
13914         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
13915         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
13916         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
13917         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
13918         unique_xmalloc_ptr.
13919         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
13920
13921 2017-01-10  Tom Tromey  <tom@tromey.com>
13922
13923         * python/py-xmethods.c (invoke_match_method): Use
13924         gdbpy_ref.
13925
13926 2017-01-10  Tom Tromey  <tom@tromey.com>
13927
13928         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
13929         gdbpy_enter, gdbpy_ref.
13930
13931 2017-01-10  Tom Tromey  <tom@tromey.com>
13932
13933         * python/python.c (python_interactive_command): Use gdbpy_enter.
13934
13935 2017-01-10  Tom Tromey  <tom@tromey.com>
13936
13937         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
13938         gdbpy_ref.
13939
13940 2017-01-10  Tom Tromey  <tom@tromey.com>
13941
13942         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
13943         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
13944
13945 2017-01-10  Tom Tromey  <tom@tromey.com>
13946
13947         * utils.h (htab_deleter): New struct.
13948         (htab_up): New typedef.
13949         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
13950         gdbpy_enter, gdbpy_ref, htab_up.
13951
13952 2017-01-10  Tom Tromey  <tom@tromey.com>
13953
13954         * python/py-unwind.c (pending_frame_invalidate): Remove.
13955         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
13956
13957 2017-01-10  Tom Tromey  <tom@tromey.com>
13958
13959         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
13960         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
13961
13962 2017-01-10  Tom Tromey  <tom@tromey.com>
13963
13964         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
13965
13966 2017-01-10  Tom Tromey  <tom@tromey.com>
13967
13968         * python/python.c (gdbpy_eval_from_control_command)
13969         (gdbpy_source_script, gdbpy_run_events)
13970         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
13971         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
13972         gdbpy_enter.
13973
13974 2017-01-10  Tom Tromey  <tom@tromey.com>
13975
13976         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
13977
13978 2017-01-10  Tom Tromey  <tom@tromey.com>
13979
13980         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
13981
13982 2017-01-10  Tom Tromey  <tom@tromey.com>
13983
13984         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
13985         (python_on_inferior_call_pre, python_on_inferior_call_post)
13986         (python_on_memory_change, python_on_register_change)
13987         (python_inferior_exit, python_new_objfile, add_thread_object)
13988         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
13989
13990 2017-01-10  Tom Tromey  <tom@tromey.com>
13991
13992         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
13993         (bpfinishpy_handle_exit): Use gdbpy_enter.
13994
13995 2017-01-10  Tom Tromey  <tom@tromey.com>
13996
13997         * python/py-cmd.c (cmdpy_destroyer)
13998         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
13999         gdbpy_enter.
14000
14001 2017-01-10  Tom Tromey  <tom@tromey.com>
14002
14003         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14004         gdbpy_enter.
14005         (gdbpy_breakpoint_has_cond): Likewise.
14006
14007 2017-01-10  Tom Tromey  <tom@tromey.com>
14008
14009         * python/python.c (gdbpy_enter): New constructor.
14010         (~gdbpy_enter): New destructor.
14011         (restore_python_env, ensure_python_env): Rewrite.
14012         * python/python-internal.h (gdbpy_enter): New class.
14013
14014 2017-01-10  Tom Tromey  <tom@tromey.com>
14015
14016         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
14017
14018 2017-01-10  Tom Tromey  <tom@tromey.com>
14019
14020         * python/py-value.c (value_has_field, get_field_flag)
14021         (get_field_type, valpy_getitem, convert_value_from_python): Use
14022         gdbpy_ref.
14023
14024 2017-01-10  Tom Tromey  <tom@tromey.com>
14025
14026         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
14027         gdbpy_ref.
14028
14029 2017-01-10  Tom Tromey  <tom@tromey.com>
14030
14031         * python/py-prettyprint.c (search_pp_list)
14032         (find_pretty_printer_from_objfiles)
14033         (find_pretty_printer_from_progspace)
14034         (find_pretty_printer_from_gdb, find_pretty_printer)
14035         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
14036         gdbpy_ref.
14037
14038 2017-01-10  Tom Tromey  <tom@tromey.com>
14039
14040         * python/py-param.c (call_doc_function): Use gdbpy_ref.
14041
14042 2017-01-10  Tom Tromey  <tom@tromey.com>
14043
14044         * python/py-linetable.c (build_line_table_tuple_from_pcs)
14045         (ltpy_get_all_source_lines): Use gdbpy_ref.
14046
14047 2017-01-10  Tom Tromey  <tom@tromey.com>
14048
14049         * python/py-framefilter.c (extract_sym, extract_value)
14050         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
14051         gdbpy_ref.
14052
14053 2017-01-10  Tom Tromey  <tom@tromey.com>
14054
14055         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
14056
14057 2017-01-10  Tom Tromey  <tom@tromey.com>
14058
14059         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
14060
14061 2017-01-10  Tom Tromey  <tom@tromey.com>
14062
14063         * python/py-function.c (convert_values_to_python, fnpy_init): Use
14064         gdbpy_ref.
14065
14066 2017-01-10  Tom Tromey  <tom@tromey.com>
14067
14068         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
14069
14070 2017-01-10  Tom Tromey  <tom@tromey.com>
14071
14072         * python/py-type.c (convert_field, make_fielditem, typy_fields)
14073         (typy_range): Use gdbpy_ref.
14074
14075 2017-01-10  Tom Tromey  <tom@tromey.com>
14076
14077         * python/py-threadevent.c (create_thread_event_object): Use
14078         gdbpy_ref.
14079         * python/py-stopevent.c (create_stop_event_object): Simplify.
14080         (emit_stop_event): Use gdbpy_ref.
14081         * python/py-signalevent.c (create_signal_event_object): Use
14082         gdbpy_ref.
14083         * python/py-newobjfileevent.c (create_new_objfile_event_object)
14084         (emit_new_objfile_event, create_clear_objfiles_event_object)
14085         (emit_clear_objfiles_event): Use gdbpy_ref.
14086         * python/py-infevents.c (create_inferior_call_event_object)
14087         (create_register_changed_event_object)
14088         (create_memory_changed_event_object, emit_inferior_call_event)
14089         (emit_memory_changed_event, emit_register_changed_event): Use
14090         gdbpy_ref.
14091         * python/py-exitedevent.c (create_exited_event_object)
14092         (emit_exited_event): Use gdbpy_ref.
14093         * python/py-event.h (evpy_emit_event): Remove
14094         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
14095         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
14096         * python/py-continueevent.c (emit_continue_event): Use
14097         gdbpy_ref.
14098         * python/py-breakpoint.c (gdbpy_breakpoint_created)
14099         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
14100         gdbpy_ref.
14101         * python/py-bpevent.c (create_breakpoint_event_object): Use
14102         gdbpy_ref.
14103
14104 2017-01-10  Tom Tromey  <tom@tromey.com>
14105
14106         * python/py-ref.h: New file.
14107
14108 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
14109
14110         * cli-out.c (cli_ui_out::do_redirect): Change return type to
14111         void.
14112         * cli-out.h (cli_ui_out::do_redirect): Likewise.
14113         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
14114         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
14115         * ui-out.c (ui_out::redirect): Likewise.
14116         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
14117         * cli/cli-logging.c (set_logging_redirect): Update call site of
14118         ui_out::redirect.
14119         (handle_redirections): Likewise.
14120         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
14121         * top.c (execute_command_to_string): Likewise.
14122         * utils.c (do_ui_out_redirect_pop): Likewise.
14123
14124 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
14125
14126         * stack.c (_initialize_stack): Update "frame" command help message.
14127
14128 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
14129
14130         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
14131
14132 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14133
14134         * x86-linux-nat.h: Include gdb_proc_service.h.
14135
14136 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14137
14138         * ser-base.h: Include serial.h.
14139
14140 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14141
14142         * ppc-linux-tdep.h: Include ppc-tdep.h.
14143
14144 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14145
14146         * nat/amd64-linux-siginfo.h: Include signal.h.
14147
14148 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14149
14150         * nat/aarch64-linux-hw-point.h: Include break-common.h.
14151
14152 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14153
14154         * mi/mi-parse.h: Include mi-cmds.h.
14155
14156 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14157
14158         * inf-loop.c: Don't include "target.h".
14159         * inf-loop.h: Include it here.
14160
14161 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14162
14163         * dfp.h: Include "dboulest.h" and "expression.h".
14164
14165 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14166
14167         * ax-gdb.h: Include "ax.h".
14168
14169 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14170
14171         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
14172         with nat/gdb_ptrace.h.
14173
14174 2017-01-05  Yao Qi  <yao.qi@linaro.org>
14175
14176         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
14177         new line.
14178         (mips64_fbsd_sigframe_init): Likewise.
14179
14180 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14181
14182         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
14183         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
14184
14185 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14186
14187         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
14188         * NEWS: Mention new FreeBSD/mips native configuration.
14189         * config/mips/fbsd.mh: New file.
14190         * configure.host: Add mips*-*-freebsd*.
14191         * mips-fbsd-nat.c: New file.
14192
14193 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14194
14195         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
14196         (ALLDEPFILES): Add mips-fbsd-tdep.c.
14197         * NEWS: Mention new FreeBSD/mips target.
14198         * configure.tgt: Add mips*-*-freebsd*.
14199         * mips-fbsd-tdep.c: New file.
14200         * mips-fbsd-tdep.h: New file.
14201
14202 2017-01-04  Yao Qi  <yao.qi@linaro.org>
14203
14204         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
14205         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
14206
14207 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14208
14209         Update copyright year range in all GDB files.
14210
14211 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14212
14213         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
14214
14215 For older changes see ChangeLog-2016.
14216 \f
14217 Local Variables:
14218 mode: change-log
14219 left-margin: 8
14220 fill-column: 74
14221 version-control: never
14222 coding: utf-8
14223 End: