remote.c, QCatchSyscalls: Build std::string instead of unique_xmalloc_ptr
[external/binutils.git] / gdb / ChangeLog
1 2017-10-30  Pedro Alves  <palves@redhat.com>
2             Simon Marchi <simon.marchi@ericsson.com>
3
4         * remote.c (remote_set_syscall_catchpoint): Build a std::string
5         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
6
7 2017-10-30  Pedro Alves  <palves@redhat.com>
8
9         * common/common-utils.c (string_appendf, string_vappendf): New
10         functions.
11         * common/common-utils.h (string_appendf, string_vappendf): New
12         declarations.
13         * unittests/common-utils-selftests.c (string_appendf_func)
14         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
15         (string_vappendf_tests): New functions.
16         (_initialize_common_utils_selftests): Register "string_appendf" and
17         "string_vappendf tests".
18
19 2017-10-30  Pedro Alves  <palves@redhat.com>
20
21         * unittests/common-utils-selftests.c (format_func): New typedef.
22         (string_printf_tests, string_vprintf_tests): Tests factored out
23         and merged to ...
24         (test_format_func): ... this new function.
25         (string_printf_tests, string_vprintf_tests): Reimplement on top of
26         test_format_func.
27
28 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
29
30         * darwin-nat.c: Remove include of gdb.h.
31
32 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
33
34         * xtensa-xtregs.c: Fix formatting issues.
35
36 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
37
38         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
39
40 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
41
42         PR python/21213
43         * python/py-infthread.c (thpy_get_inferior): Increment reference
44         of inferior before returning it.
45
46 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
47
48         * unittests/common-utils-selftests.c (format): Add
49         ATTRIBUTE_PRINTF.
50
51 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
52
53         * xml-syscall.c (struct syscall_desc): Add constructor.
54         <name>: Change type to std::string.
55         (syscall_desc_up): New typedef.
56         (syscall_desc_p): Remove typeder.
57         (DEF_VEC_P(syscall_desc_p)): Remove.
58         (struct syscall_group_desc): Add constructor.
59         <name>: Change type to std::string.
60         <syscalls>: Change type to std::vector.
61         (syscall_group_desc_up): New typedef.
62         (syscall_group_desc_p): Remove typedef.
63         (DEF_VEC_P(syscall_group_desc_p)): Remove.
64         (struct syscalls_info) <syscalls>: Change type to std::vector of
65         unique_ptr.
66         <groups>: Likewise.
67         <my_gdb_datadir>: Change type to std::string.
68         (syscalls_info_up): New typedef.
69         (allocate_syscalls_info): Remove.
70         (syscalls_info_free_syscalls_desc): Remove.
71         (syscalls_info_free_syscall_group_desc): Remove.
72         (free_syscalls_info): Remove.
73         (make_cleanup_free_syscalls_info): Remove.
74         (syscall_group_create_syscall_group_desc): Adjust.
75         (syscall_group_add_syscall): Adjust.
76         (syscall_create_syscall_desc): Adjust.
77         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
78         (init_syscalls_info): Adjust.
79         (syscall_group_get_group_by_name): Adjust.
80         (xml_get_syscall_number): Adjust.
81         (xml_get_syscall_name): Adjust.
82         (xml_list_of_syscalls): Adjust.
83         (xml_list_syscalls_by_group): Adjust.
84         (xml_list_of_groups): Adjust.
85
86 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
87
88         * probe.h: Don't include gdb_vecs.h.
89         (DEF_VEC_P (probe_p)): Remove.
90         (find_probes_in_objfile): Return an std::vector.
91         * probe.c (find_probes_in_objfile): Likewise.
92         * breakpoint.c (breakpoint_objfile_data)
93         <longjmp_probes>: Change type to std::vector.
94         <exception_probes>: Likewise.
95         (free_breakpoint_probes): Don't manually free vectors.
96         (create_longjmp_master_breakpoint): Adjust.
97         (create_exception_master_breakpoint): Adjust.
98         * solib-svr4.c (svr4_create_probe_breakpoints): Change
99         parameter type, adjust.
100         (svr4_create_solib_event_breakpoints): Adjust.
101
102 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
103
104         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
105         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
106         with new.
107         (free_breakpoint_probes): Rename to ...
108         (free_breakpoint_objfile_data): ... this, and call delete on
109         bp_objfile_data..
110
111 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
112
113         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
114         (loaded_script_ptr): Remove typedef.
115         (DEF_VEC_P (loaded_script_ptr)): Remove.
116         (struct collect_matching_scripts_data): Add constructor.
117         <scripts_p>: Change type to (pointer to) std::vector.
118         (collect_matching_scripts_data): Adjust.
119         (sort_scripts_by_name): Make suitable for std::sort.
120         (print_scripts): Don't sort vector, adjust to std::vector.
121         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
122
123 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
124
125         * symfile.c (filename_language): Make struct, not typedef.  Add
126         constructor.
127         <ext>: Change type to std::string.
128         (DEF_VEC_O (filename_language)): Remove.
129         (filename_language_table): Change type to std::vector.
130         (add_filename_language): Adjust.
131         (set_ext_lang_command): Adjust.
132         (info_ext_lang_command): Adjust.
133         (deduce_language_from_filename): Adjust.
134         (class scoped_restore_filename_language_table): Remove.
135         (test_filename_language): Use scoped_restore.
136         (test_set_ext_lang_command): Use scoped_restore, adjust to
137         std::vector change.
138
139 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
140
141         * symfile.c: Include selftest.h.
142         (class scoped_restore_filename_language_table): New.
143         (test_filename_language): New test.
144         (test_set_ext_lang_command): New test.
145         (_initialize_symfile): Register tests.
146
147 2017-10-27  Keith Seitz  <keiths@redhat.com>
148
149         * breakpoint.c (print_breakpoint_location): Use the symbol saved
150         in the bp_location, falling back to find_pc_sect_function when
151         needed.
152         (add_location_to_breakpoint): Save sal->symbol.
153         * breakpoint.h (struct bp_location) <symbol>: New field.
154         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
155         * symtab.h (struct symtab_and_line) <symbol>: New field.
156
157 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
158
159         PR gdb/13669
160         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
161         to rewind obstack.
162
163 2017-10-26  Pedro Alves  <palves@redhat.com>
164
165         * remote.c (remote_async_terminal_ours_p): Delete.
166         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
167         Remove references to 'remote_async_terminal_ours_p'.
168
169 2017-10-26  Yao Qi  <yao.qi@linaro.org>
170
171         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
172
173 2017-10-26  Yao Qi  <yao.qi@linaro.org>
174
175         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
176         aspace const.
177         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
178         Likewise.
179         * breakpoint.c (bpstat_check_location): Remove cast.
180         (breakpoint_hit_catch_fork): Make aspce const.
181         (breakpoint_hit_catch_solib): Likewise.
182         (breakpoint_hit_catch_exec): Likewise.
183         (breakpoint_hit_ranged_breakpoint): Likewise.
184         (breakpoint_hit_watchpoint): Likewise.
185         (base_breakpoint_breakpoint_hit): Likewise.
186         (bkpt_breakpoint_hit): Likewise.
187         (dprintf_breakpoint_hit): Likewise.
188         (tracepoint_breakpoint_hit): Likewise.
189         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
190
191 2017-10-26  Yao Qi  <yao.qi@linaro.org>
192
193         * breakpoint.c (breakpoint_location_address_match): Change
194         "struct address_space *" to "const address_space".
195         (breakpoint_location_address_range_overlap): Likewise.
196         (breakpoint_here_p): Likewise.
197         (breakpoint_in_range_p): Likewise.
198         (moribund_breakpoint_here_p): Likewise.
199         (bp_location_inserted_here_p): Likewise.
200         (software_breakpoint_inserted_here_p): Likewise.
201         (hardware_breakpoint_inserted_here_p): Likewise.
202         (hardware_watchpoint_inserted_in_range): Likewise.
203         (bpstat_check_location): Likewise.
204         (bpstat_stop_status): Likewise.
205         (breakpoint_address_match): Likewise.
206         (breakpoint_address_match_range): Likewise.
207         (breakpoint_location_address_match): Likewise.
208         (breakpoint_location_address_range_overlap): Likewise.
209         (insert_single_step_breakpoint): Likewise.
210         (breakpoint_has_location_inserted_here): Likewise.
211         (single_step_breakpoint_inserted_here_p): Likewise.
212         (pc_at_non_inline_function): Likewise.
213         * breakpoint.h (bpstat_stop_status): Update declaration.
214         (breakpoint_here_p): Likewise.
215         (breakpoint_in_range_p): Likewise.
216         (moribund_breakpoint_here_p): Likewise.
217         (breakpoint_inserted_here_p): Likewise.
218         (software_breakpoint_inserted_here_p): Likewise.
219         (hardware_breakpoint_inserted_here_p): Likewise.
220         (breakpoint_has_location_inserted_here): Likewise.
221         (single_step_breakpoint_inserted_here_p): Likewise.
222         (hardware_watchpoint_inserted_in_range): Likewise.
223         (breakpoint_address_match): Likewise.
224         (insert_single_step_breakpoint): Likewise.
225         (pc_at_non_inline_function): Likewise.
226         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
227         * record.c (record_check_stopped_by_breakpoint): Likewise.
228         * record.h (record_check_stopped_by_breakpoint): Likewise.
229         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
230
231 2017-10-25  Yao Qi  <yao.qi@linaro.org>
232
233         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
234         regcache->arch () instead get_regcache_arch.
235         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
236         Likewise.
237         (aarch64_fbsd_store_inferior_registers): Likewise.
238         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
239         (store_gregs_to_thread): Likewise.
240         (fetch_fpregs_from_thread): Likewise.
241         (store_fpregs_to_thread): Likewise.
242         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
243         (aarch64_store_return_value): Likewise.
244         (aarch64_software_single_step): Likewise.
245         * aix-thread.c (aix_thread_wait): Likewise.
246         (supply_reg32): Likewise.
247         (supply_sprs64): Likewise.
248         (supply_sprs32): Likewise.
249         (fill_gprs64): Likewise.
250         (fill_gprs32): Likewise.
251         (fill_sprs64): Likewise.
252         (fill_sprs32): Likewise.
253         (store_regs_user_thread): Likewise.
254         (store_regs_kernel_thread): Likewise.
255         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
256         (alphabsd_store_inferior_registers): Likewise.
257         * alpha-tdep.c (alpha_extract_return_value): Likewise.
258         (alpha_store_return_value): Likewise.
259         (alpha_deal_with_atomic_sequence): Likewise.
260         (alpha_next_pc): Likewise.
261         (alpha_software_single_step): Likewise.
262         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
263         (amd64bsd_store_inferior_registers): Likewise.
264         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
265         Likewise.
266         (amd64_linux_store_inferior_registers): Likewise.
267         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
268         (amd64_collect_native_gregset): Likewise.
269         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
270         (amd64obsd_collect_uthread): Likewise.
271         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
272         (amd64_collect_fpregset): Likewise.
273         (amd64_supply_fxsave): Likewise.
274         (amd64_supply_xsave): Likewise.
275         (amd64_collect_fxsave): Likewise.
276         (amd64_collect_xsave): Likewise.
277         * arc-tdep.c (arc_write_pc): Likewise.
278         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
279         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
280         (arm_fbsd_store_inferior_registers): Likewise.
281         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
282         (store_vfp_regs): Likewise.
283         (arm_linux_fetch_inferior_registers): Likewise.
284         (arm_linux_store_inferior_registers): Likewise.
285         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
286         (arm_linux_sigreturn_next_pc): Likewise.
287         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
288         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
289         (fetch_register): Likewise.
290         (store_register): Likewise.
291         * arm-tdep.c (arm_is_thumb): Likewise.
292         (displaced_in_arm_mode): Likewise.
293         (bx_write_pc): Likewise.
294         (arm_get_next_pcs_addr_bits_remove): Likewise.
295         (arm_software_single_step): Likewise.
296         (arm_extract_return_value): Likewise.
297         (arm_store_return_value): Likewise.
298         (arm_write_pc): Likewise.
299         * bfin-tdep.c (bfin_extract_return_value): Likewise.
300         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
301         (bsd_uthread_store_registers): Likewise.
302         * core-regset.c (fetch_core_registers): Likewise.
303         * corelow.c (get_core_registers): Likewise.
304         * cris-tdep.c (cris_store_return_value): Likewise.
305         (cris_extract_return_value): Likewise.
306         (find_step_target): Likewise.
307         (find_step_target): Likewise.
308         (cris_software_single_step): Likewise.
309         * ctf.c (ctf_fetch_registers): Likewise.
310         * darwin-nat.c (cancel_breakpoint): Likewise.
311         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
312         * frv-tdep.c (frv_extract_return_value): Likewise.
313         * ft32-tdep.c (ft32_store_return_value): Likewise.
314         (ft32_extract_return_value): Likewise.
315         * go32-nat.c (fetch_register): Likewise.
316         (go32_fetch_registers): Likewise.
317         (go32_store_registers): Likewise.
318         (store_register): Likewise.
319         * h8300-tdep.c (h8300_extract_return_value): Likewise.
320         (h8300_store_return_value): Likewise.
321         * hppa-linux-nat.c (fetch_register): Likewise.
322         (store_register): Likewise.
323         (hppa_linux_fetch_inferior_registers): Likewise.
324         (hppa_linux_store_inferior_registers): Likewise.
325         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
326         (i386_darwin_store_inferior_registers): Likewise.
327         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
328         (gnu_store_registers): Likewise.
329         * i386-linux-nat.c (fetch_register): Likewise.
330         (store_register): Likewise.
331         (supply_gregset): Likewise.
332         (fill_gregset): Likewise.
333         (i386_linux_fetch_inferior_registers): Likewise.
334         (i386_linux_store_inferior_registers): Likewise.
335         (i386_linux_resume): Likewise.
336         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
337         Likewise.
338         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
339         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
340         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
341         (i386obsd_collect_uthread): Likewise.
342         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
343         (i386_supply_gregset): Likewise.
344         (i386_collect_gregset): Likewise.
345         (i386_supply_fpregset): Likewise.
346         (i386_collect_fpregset): Likewise.
347         (i386_mpx_bd_base): Likewise.
348         * i386-v4-nat.c (supply_fpregset): Likewise.
349         (fill_fpregset): Likewise.
350         * i387-tdep.c (i387_supply_fsave): Likewise.
351         (i387_collect_fsave): Likewise.
352         (i387_supply_fxsave): Likewise.
353         (i387_collect_fxsave): Likewise.
354         (i387_supply_xsave): Likewise.
355         (i387_collect_xsave): Likewise.
356         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
357         (ia64_linux_store_registers): Likewise.
358         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
359         (ia64_extract_return_value): Likewise.
360         (ia64_store_return_value): Likewise.
361         (find_func_descr): Likewise.
362         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
363         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
364         (inf_ptrace_store_registers): Likewise.
365         * infrun.c (use_displaced_stepping): Likewise.
366         (displaced_step_prepare_throw): Likewise.
367         (resume): Likewise.
368         (proceed): Likewise.
369         (do_target_wait): Likewise.
370         (adjust_pc_after_break): Likewise.
371         (handle_inferior_event_1): Likewise.
372         (handle_signal_stop): Likewise.
373         (save_infcall_suspend_state): Likewise.
374         (restore_infcall_suspend_state): Likewise.
375         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
376         * jit.c (jit_frame_prev_register): Likewise.
377         * linux-nat.c (save_stop_reason): Likewise.
378         (linux_nat_wait_1): Likewise.
379         (resume_stopped_resumed_lwps): Likewise.
380         * linux-record.c (record_linux_sockaddr): Likewise.
381         (record_linux_msghdr): Likewise.
382         (record_linux_system_call): Likewise.
383         * linux-tdep.c (linux_collect_thread_registers): Likewise.
384         * lm32-tdep.c (lm32_extract_return_value): Likewise.
385         (lm32_store_return_value): Likewise.
386         * m32c-tdep.c (m32c_read_flg): Likewise.
387         (m32c_pseudo_register_read): Likewise.
388         (m32c_pseudo_register_write): Likewise.
389         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
390         (m32r_linux_collect_gregset): Likewise.
391         * m32r-tdep.c (m32r_store_return_value): Likewise.
392         (m32r_extract_return_value): Likewise.
393         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
394         (m68kbsd_collect_fpregset): Likewise.
395         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
396         * m68k-linux-nat.c (fetch_register): Likewise.
397         (old_fetch_inferior_registers): Likewise.
398         (old_store_inferior_registers): Likewise.
399         (store_regs): Likewise.
400         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
401         (m68k_svr4_store_return_value): Likewise.
402         * m88k-tdep.c (m88k_store_arguments): Likewise.
403         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
404         (mi_cmd_data_write_register_values): Likewise.
405         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
406         (mips_fbsd_store_inferior_registers): Likewise.
407         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
408         (mips_fbsd_supply_gregs): Likewise.
409         (mips_fbsd_collect_fpregs): Likewise.
410         (mips_fbsd_collect_gregs): Likewise.
411         (mips_fbsd_supply_fpregset): Likewise.
412         (mips_fbsd_collect_fpregset): Likewise.
413         (mips_fbsd_supply_gregset): Likewise.
414         (mips_fbsd_collect_gregset): Likewise.
415         * mips-linux-nat.c (supply_gregset): Likewise.
416         (fill_gregset): Likewise.
417         (supply_fpregset): Likewise.
418         (fill_fpregset): Likewise.
419         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
420         (mips_fill_gregset): Likewise.
421         (mips_supply_fpregset): Likewise.
422         (mips_fill_fpregset): Likewise.
423         (mips64_supply_gregset): Likewise.
424         (micromips_linux_sigframe_validate): Likewise.
425         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
426         (mipsnbsd_fetch_inferior_registers): Likewise.
427         (mipsnbsd_store_inferior_registers): Likewise.
428         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
429         (mipsnbsd_supply_gregset): Likewise.
430         (mipsnbsd_iterate_over_regset_sections): Likewise.
431         (mipsnbsd_supply_reg): Likewise.
432         (mipsnbsd_supply_fpreg): Likewise.
433         * mips-tdep.c (mips_in_frame_stub): Likewise.
434         (mips_dummy_id): Likewise.
435         (is_octeon_bbit_op): Likewise.
436         (micromips_bc1_pc): Likewise.
437         (extended_mips16_next_pc): Likewise.
438         (mips16_next_pc): Likewise.
439         (deal_with_atomic_sequence): Likewise.
440         * moxie-tdep.c (moxie_process_readu): Likewise.
441         * nios2-tdep.c (nios2_get_next_pc): Likewise.
442         * nto-procfs.c (procfs_store_registers): Likewise.
443         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
444         (ppcfbsd_store_inferior_registers): Likewise.
445         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
446         (fetch_altivec_register): Likewise.
447         (get_spe_registers): Likewise.
448         (fetch_spe_register): Likewise.
449         (fetch_altivec_registers): Likewise.
450         (fetch_all_gp_regs): Likewise.
451         (fetch_all_fp_regs): Likewise.
452         (store_vsx_register): Likewise.
453         (store_altivec_register): Likewise.
454         (set_spe_registers): Likewise.
455         (store_spe_register): Likewise.
456         (store_altivec_registers): Likewise.
457         (store_all_gp_regs): Likewise.
458         (store_all_fp_regs): Likewise.
459         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
460         (ppc_linux_collect_gregset): Likewise.
461         (ppc_canonicalize_syscall): Likewise.
462         (ppc_linux_record_signal): Likewise.
463         (ppu2spu_prev_register): Likewise.
464         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
465         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
466         (ppcobsd_store_registers): Likewise.
467         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
468         Likewise.
469         (ppc_ravenscar_generic_store_registers): Likewise.
470         * procfs.c (procfs_fetch_registers): Likewise.
471         (procfs_store_registers): Likewise.
472         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
473         (ravenscar_store_registers): Likewise.
474         (ravenscar_prepare_to_store): Likewise.
475         * record-btrace.c (record_btrace_fetch_registers): Likewise.
476         * record-full.c (record_full_wait_1): Likewise.
477         (record_full_registers_change): Likewise.
478         (record_full_store_registers): Likewise.
479         (record_full_core_fetch_registers): Likewise.
480         (record_full_save): Likewise.
481         (record_full_goto_insn): Likewise.
482         * regcache.c (regcache_register_size): Likewise.
483         (get_regcache_arch): Remove.
484         (regcache_read_pc): Likewise.
485         * regcache.h (get_regcache_arch): Remove.
486         * remote-sim.c (gdbsim_fetch_register): Likewise.
487         (gdbsim_store_register): Likewise.
488         * remote.c (fetch_register_using_p): Likewise.
489         (send_g_packet): Likewise.
490         (remote_prepare_to_store): Likewise.
491         (store_registers_using_G): Likewise.
492         * reverse.c (save_bookmark_command): Likewise.
493         (goto_bookmark_command): Likewise.
494         * rs6000-aix-tdep.c (branch_dest): Likewise.
495         * rs6000-nat.c (rs6000_ptrace64): Likewise.
496         (fetch_register): Likewise.
497         * rs6000-tdep.c (ppc_supply_reg): Likewise.
498         (ppc_collect_reg): Likewise.
499         (ppc_collect_gregset): Likewise.
500         (ppc_collect_fpregset): Likewise.
501         (ppc_collect_vsxregset): Likewise.
502         (ppc_collect_vrregset): Likewise.
503         (ppc_displaced_step_hw_singlestep): Likewise.
504         (rs6000_pseudo_register_read): Likewise.
505         (rs6000_pseudo_register_write): Likewise.
506         * s390-linux-nat.c (supply_gregset): Likewise.
507         (fill_gregset): Likewise.
508         (s390_linux_fetch_inferior_registers): Likewise.
509         * s390-linux-tdep.c (s390_write_pc): Likewise.
510         (s390_software_single_step): Likewise.
511         (s390_all_but_pc_registers_record): Likewise.
512         (s390_linux_syscall_record): Likewise.
513         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
514         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
515         (shnbsd_store_inferior_registers): Likewise.
516         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
517         (sh_extract_return_value_fpu): Likewise.
518         (sh_store_return_value_nofpu): Likewise.
519         (sh_corefile_supply_regset): Likewise.
520         (sh_corefile_collect_regset): Likewise.
521         * sh64-tdep.c (sh64_extract_return_value): Likewise.
522         (sh64_store_return_value): Likewise.
523         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
524         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
525         (sparc_store_inferior_registers): Likewise.
526         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
527         (sparc_ravenscar_prepare_to_store): Likewise.
528         * sparc-tdep.c (sparc32_store_arguments): Likewise.
529         (sparc_analyze_control_transfer): Likewise.
530         (sparc_step_trap): Likewise.
531         (sparc_software_single_step): Likewise.
532         (sparc32_gdbarch_init): Likewise.
533         (sparc_supply_rwindow): Likewise.
534         (sparc_collect_rwindow): Likewise.
535         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
536         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
537         (sparc64nbsd_collect_gregset): Likewise.
538         (sparc64nbsd_supply_fpregset): Likewise.
539         (sparc64nbsd_collect_fpregset): Likewise.
540         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
541         (sparc64_supply_gregset): Likewise.
542         (sparc64_collect_gregset): Likewise.
543         (sparc64_supply_fpregset): Likewise.
544         (sparc64_collect_fpregset): Likewise.
545         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
546         * spu-tdep.c (spu_unwind_sp): Likewise.
547         (spu2ppu_prev_register): Likewise.
548         (spu_memory_remove_breakpoint): Likewise.
549         * stack.c (return_command): Likewise.
550         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
551         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
552         * tracefile.c (trace_save_ctf): Likewise.
553         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
554         (do_windows_store_inferior_registers): Likewise.
555         (windows_resume): Likewise.
556         * xtensa-linux-nat.c (fill_gregset): Likewise.
557         (supply_gregset_reg): Likewise.
558         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
559         (xtensa_register_read_masked): Likewise.
560         (xtensa_supply_gregset): Likewise.
561         (xtensa_extract_return_value): Likewise.
562         (xtensa_store_return_value): Likewise.
563
564 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
565
566         * doublest.c (floatformat_from_string): New function.
567         * doublest.h (floatformat_from_string): Add prototype.
568
569         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
570         (OP_FLOAT): ... this.
571         * expression.h: Do not include "doublest.h".
572         (union exp_element): Replace doubleconst and decfloatconst by
573         new element floatconst.
574         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
575         (ada_evaluate_subexp): Likewise.
576         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
577         OP_DOUBLE and OP_DECFLOAT.
578         * expprint.c (print_subexp_standard): Likewise.
579         (dump_subexp_body_standard): Likewise.
580         * breakpoint.c (watchpoint_exp_is_const): Likewise.
581
582         * parse.c: Include "dfp.h".
583         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
584         (write_exp_elt_floatcst): New function.
585         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
586         and OP_DECFLOAT.
587         (operator_check_standard): Likewise.
588         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
589         Return target format buffer instead of host DOUBLEST.
590         Use floatformat_from_string and decimal_from_string to parse
591         either binary or decimal floating-point types.
592         (parse_c_float): Remove.
593         * parser-defs.h: Do not include "doublest.h".
594         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
595         (write_exp_elt_floatcst): Add prototype.
596         (parse_float): Update prototype.
597         (parse_c_float): Remove.
598
599         * c-exp.y: Do not include "dfp.h".
600         (typed_val_float): Use byte buffer instead of DOUBLEST.
601         (typed_val_decfloat): Remove.
602         (DECFLOAT): Remove.
603         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
604         (parse_number): Update to new parse_float interface.
605         Parse suffixes and determine type before calling parse_float.
606         Handle decimal and binary FP types the same way.
607
608         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
609         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
610         (parse_number): Update to new parse_float interface.
611         Parse suffixes and determine type before calling parse_float.
612
613         * f-exp.y: Replace dval by typed_val_float.
614         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
615         (parse_number): Use parse_float instead of atof.
616
617         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
618         (parse_go_float): Remove.
619         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
620         (parse_number): Call parse_float instead of parse_go_float.
621         Parse suffixes and determine type before calling parse_float.
622
623         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
624         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
625         (parse_number): Update to new parse_float interface.
626         Parse suffixes and determine type before calling parse_float.
627
628         * m2-exp.y: Replace dval by byte buffer val.
629         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
630         (parse_number): Call parse_float instead of atof.
631
632         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
633         (lex_number): Call parse_float instead of strtod.
634         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
635         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
636         Use write_exp_elt_floatcst.
637         (unit_testing): Remove static variable.
638         (rust_type): Do not check unit_testing.
639         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
640
641         * ada-exp.y (type_float, type_double): Remove.
642         (typed_val_float): Use byte buffer instead of DOUBLEST.
643         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
644         * ada-lex.l (processReal): Use parse_float instead of sscanf.
645
646 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
647
648         * aarch64-tdep.h (enum aarch64_regnum): Remove.
649         * arch/aarch64.h: New file.
650
651 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
652
653         * dfp.h (decimal_from_string): Use const reference for argument.
654         * dfp.c (decimal_from_string): Likewise.
655
656 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
657
658         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
659         * sh64-tdep.c (sh64_do_fp_register): Likewise.
660         * mips-tdep.c (mips_print_fp_register): Likewise.
661
662 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
663
664         * common/format.h (enum argclass): Replace decfloat_arg by
665         dec32float_arg, dec64float_arg, and dec128float_arg.
666         * common/format.c (parse_format_string): Update to return
667         new decimal float argument classes.
668
669         * printcmd.c (printf_decfloat): Rename to ...
670         (printf_floating): ... this.  Add argclass argument, and use it
671         instead of parsing the format string again.  Add support for
672         binary floating-point values, using floatformat_to_string.
673         Convert value to the target format if it doesn't already match.
674         (ui_printf): Call printf_floating instead of printf_decfloat,
675         also for double_arg / long_double_arg.  Pass argclass.
676
677         * dfp.c (decimal_to_string): Add format string argument.
678         * dfp.h (decimal_to_string): Likewise.
679
680         * doublest.c (floatformat_to_string): Add format string argument.
681         * doublest.h (floatformat_to_string): Likewise.
682
683 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
684
685         * doublest.c (floatformat_precision): New routine.
686         (floatformat_to_string): Likewise.
687         * doublest.c (floatformat_to_string): Add prototype.
688
689         * printcmd.c (print_scalar_formatted): Only call print_floating
690         on floating-point types.
691         * valprint.c: Do not include "floatformat.h".
692         (generic_val_print_decfloat): Remove.
693         (generic_val_print): Call generic_val_print_float for both
694         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
695         (print_floating): Use floatformat_to_string.  Handle decimal float.
696         (print_decimal_floating): Remove, merge into floatformat_to_string.
697         * value.h (print_decimal_floating): Remove.
698
699         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
700
701 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
702
703         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
704
705 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
706
707         * memattr.h: Don't include vec.h.
708         (struct mem_attrib): Initialize fields.
709         <unknown>: New static method.
710         (struct mem_region): Add constructors, operator<, initialize
711         fields.
712         * memattr.c: Include algorithm.
713         (default_mem_attrib, unknown_mem_attrib): Remove.
714         (user_mem_region_list): New global.
715         (target_mem_region_list, mem_region_list): Change type to
716         std::vector<mem_region>.
717         (mem_use_target): Now a function.
718         (target_mem_regions_valid): Change type to bool.
719         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
720         (require_user_regions): Adjust.
721         (require_target_regions): Adjust.
722         (create_mem_region): Adjust.
723         (lookup_mem_region): Adjust.
724         (invalidate_target_mem_regions): Adjust.
725         (mem_clear): Rename to...
726         (user_mem_clear): ... this, and adjust.
727         (mem_command): Adjust.
728         (info_mem_command): Adjust.
729         (mem_enable, enable_mem_command, mem_disable,
730         disable_mem_command): Adjust.
731         (mem_delete): Adjust.
732         (delete_mem_command): Adjust.
733         * memory-map.h (parse_memory_map): Return an std::vector.
734         * memory-map.c (parse_memory_map): Likewise.
735         (struct memory_map_parsing_data): Add constructor.
736         <memory_map>: Point to std::vector.
737         (memory_map_start_memory): Adjust.
738         (memory_map_end_memory): Adjust.
739         (memory_map_end_property): Adjust.
740         (clear_result): Remove.
741         * remote.c (remote_memory_map): Return an std::vector.
742         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
743         Remove.
744         (target_debug_print_mem_region_vector): New.
745         * target-delegates.c: Regenerate.
746         * target.h (mem_region_vector): New typedef.
747         (to_memory_map): Return mem_region_vector.
748         (target_memory_map): Return an std::vector.
749         * target.c (target_memory_map): Return an std::vector.
750         (flash_erase_command): Adjust.
751
752 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
753
754         * memory-map.c (struct memory_map_parsing_data) <property_name>:
755         Change type to std::string.
756         (memory_map_start_property): Adjust.
757         (memory_map_end_property): Adjust.
758
759 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
760
761         * infrun.h: Include common/byte-vector.h.
762         (struct displaced_step_closure): New struct.
763         (struct buf_displaced_step_closure): New struct.
764         * infrun.c (displaced_step_closure::~displaced_step_closure):
765         Provide default implementation.
766         (displaced_step_clear): Deallocate step closure with delete.
767         * aarch64-tdep.c (displaced_step_closure): Rename to ...
768         (aarch64_displaced_step_closure): ... this, extend
769         displaced_step_closure.
770         (aarch64_displaced_step_data) <dsc>: Change type to
771         aarch64_displaced_step_closure.
772         (aarch64_displaced_step_copy_insn): Adjust to type change, use
773         unique_ptr.
774         (aarch64_displaced_step_fixup): Add cast for displaced step
775         closure.
776         * amd64-tdep.c (displaced_step_closure): Rename to ...
777         (amd64_displaced_step_closure): ... this, extend
778         displaced_step_closure.
779         <insn_buf>: Change type to std::vector<gdb_byte>.
780         <max_len>: Remove.
781         (fixup_riprel): Change type of DSC parameter, adjust to type
782         change of insn_buf.
783         (fixup_displaced_copy): Change type of DSC parameter.
784         (amd64_displaced_step_copy_insn): Instantiate
785         amd64_displaced_step_closure.
786         (amd64_displaced_step_fixup): Add cast for closure type, adjust
787         to type change of insn_buf.
788         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
789         parameter DSC.
790         (arm_linux_copy_svc): Likewise.
791         (cleanup_kernel_helper_return): Likewise.
792         (arm_catch_kernel_helper_return): Likewise.
793         (arm_linux_displaced_step_copy_insn): Instantiate
794         arm_displaced_step_closure.
795         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
796         (displaced_read_reg): Change type of parameter DSC.
797         (branch_write_pc): Likewise.
798         (load_write_pc): Likewise.
799         (alu_write_pc): Likewise.
800         (displaced_write_reg): Likewise.
801         (arm_copy_unmodified): Likewise.
802         (thumb_copy_unmodified_32bit): Likewise.
803         (thumb_copy_unmodified_16bit): Likewise.
804         (cleanup_preload): Likewise.
805         (install_preload): Likewise.
806         (arm_copy_preload): Likewise.
807         (thumb2_copy_preload): Likewise.
808         (install_preload_reg): Likewise.
809         (arm_copy_preload_reg): Likewise.
810         (cleanup_copro_load_store): Likewise.
811         (install_copro_load_store): Likewise.
812         (arm_copy_copro_load_store) Likewise.
813         (thumb2_copy_copro_load_store): Likewise.
814         (cleanup_branch): Likewise.
815         (install_b_bl_blx): Likewise.
816         (arm_copy_b_bl_blx): Likewise.
817         (thumb2_copy_b_bl_blx): Likewise.
818         (thumb_copy_b): Likewise.
819         (install_bx_blx_reg): Likewise.
820         (arm_copy_bx_blx_reg): Likewise.
821         (thumb_copy_bx_blx_reg): Likewise.
822         (cleanup_alu_imm): Likewise.
823         (arm_copy_alu_imm): Likewise.
824         (thumb2_copy_alu_imm): Likewise.
825         (cleanup_alu_reg): Likewise.
826         (install_alu_reg): Likewise.
827         (arm_copy_alu_reg): Likewise.
828         (thumb_copy_alu_reg): Likewise.
829         (cleanup_alu_shifted_reg): Likewise.
830         (install_alu_shifted_reg): Likewise.
831         (arm_copy_alu_shifted_reg): Likewise.
832         (cleanup_load): Likewise.
833         (cleanup_store): Likewise.
834         (arm_copy_extra_ld_st): Likewise.
835         (install_load_store): Likewise.
836         (thumb2_copy_load_literal): Likewise.
837         (thumb2_copy_load_reg_imm): Likewise.
838         (arm_copy_ldr_str_ldrb_strb): Likewise.
839         (cleanup_block_load_all): Likewise.
840         (cleanup_block_store_pc): Likewise.
841         (cleanup_block_load_pc): Likewise.
842         (arm_copy_block_xfer): Likewise.
843         (thumb2_copy_block_xfer): Likewise.
844         (cleanup_svc): Likewise.
845         (install_svc): Likewise.
846         (arm_copy_svc): Likewise.
847         (thumb_copy_svc): Likewise.
848         (arm_copy_undef): Likewise.
849         (thumb_32bit_copy_undef): Likewise.
850         (arm_copy_unpred): Likewise.
851         (arm_decode_misc_memhint_neon): Likewise.
852         (arm_decode_unconditional): Likewise.
853         (arm_decode_miscellaneous): Likewise.
854         (arm_decode_dp_misc): Likewise.
855         (arm_decode_ld_st_word_ubyte): Likewise.
856         (arm_decode_media): Likewise.
857         (arm_decode_b_bl_ldmstm): Likewise.
858         (arm_decode_ext_reg_ld_st): Likewise.
859         (thumb2_decode_dp_shift_reg): Likewise.
860         (thumb2_decode_ext_reg_ld_st): Likewise.
861         (arm_decode_svc_copro): Likewise.
862         (thumb2_decode_svc_copro): Likewise.
863         (install_pc_relative): Likewise.
864         (thumb_copy_pc_relative_16bit): Likewise.
865         (thumb_decode_pc_relative_16bit): Likewise.
866         (thumb_copy_pc_relative_32bit): Likewise.
867         (thumb_copy_16bit_ldr_literal): Likewise.
868         (thumb_copy_cbnz_cbz): Likewise.
869         (thumb2_copy_table_branch): Likewise.
870         (cleanup_pop_pc_16bit_all): Likewise.
871         (thumb_copy_pop_pc_16bit): Likewise.
872         (thumb_process_displaced_16bit_insn): Likewise.
873         (decode_thumb_32bit_ld_mem_hints): Likewise.
874         (thumb_process_displaced_32bit_insn): Likewise.
875         (thumb_process_displaced_insn): Likewise.
876         (arm_process_displaced_insn): Likewise.
877         (arm_displaced_init_closure): Likewise.
878         (arm_displaced_step_fixup): Add cast for closure.
879         * arm-tdep.h: Include infrun.h.
880         (displaced_step_closure): Rename to ...
881         (arm_displaced_step_closure): ... this, extend
882         displaced_step_closure.
883         <u::svc::copy_svc_os>: Change type of parameter DSC.
884         <cleanup>: Likewise.
885         (arm_process_displaced_insn): Likewise.
886         (arm_displaced_init_closure): Likewise.
887         (displaced_read_reg): Likewise.
888         (displaced_write_reg): Likewise.
889         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
890         Adjust.
891         * i386-tdep.h: Include infrun.h.
892         (i386_displaced_step_closure): New typedef.
893         * i386-tdep.c (i386_displaced_step_copy_insn): Use
894         i386_displaced_step_closure.
895         (i386_displaced_step_fixup): Adjust.
896         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
897         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
898         and unique_ptr.
899         (ppc_displaced_step_fixup): Adjust.
900         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
901         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
902         and unique_ptr.
903         (s390_displaced_step_fixup): Adjust.
904
905 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
906
907         * interps.h (interp_resume, interp_suspend, interp_set_temp):
908         Remove declarations.
909
910 2017-10-20  Tom Tromey  <tom@tromey.com>
911
912         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
913         std::vector.
914         (gdb_bfd_record_inclusion): Update.
915         (bfdp): Remove typedef.
916
917 2017-10-20  Tom Tromey  <tom@tromey.com>
918
919         * gdb_bfd.c (gdb_bfd_ref): Use new.
920         (struct gdb_bfd_data): Add constructor, destructor, and member
921         initializers.
922         (gdb_bfd_unref): Use delete.
923
924 2017-10-20  Tom Tromey  <tom@tromey.com>
925
926         * exec.c (exec_file_attach): Use new_bfd_ref.
927         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
928         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
929         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
930         new_bfd_ref.
931         * gdb_bfd.h (new_bfd_ref): New function.
932
933 2017-10-20  Pedro Alves  <palves@redhat.com>
934
935         * main.c (captured_command_loop): Add attribute noinline.
936
937 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
938
939         * interps.c (struct interp_factory): Add constructor.
940         (interp_factory_p): Remove typedef.
941         (DEF_VEC_P(interp_factory_p)): Remove.
942         (interpreter_factories): Change type to std::vector.
943         (interp_factory_register): Adjust.
944         (interp_lookup): Adjust.
945         (interpreter_completer): Adjust.
946
947 2017-10-19  Tom Tromey  <tom@tromey.com>
948
949         * break-catch-syscall.c (catch_syscall_completer): Use
950         std::string, gdb::unique_xmalloc_ptr.
951
952 2017-10-19  Tom Tromey  <tom@tromey.com>
953
954         * infcall.c (call_function_by_hand_dummy): Use std::string.
955
956 2017-10-19  Tom Tromey  <tom@tromey.com>
957
958         * mi/mi-main.c (mi_cmd_execute): Update.
959         * top.h (prepare_execute_command): Return scoped_value_mark.
960         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
961         Add move constructor.
962         * top.c (prepare_execute_command): Return scoped_value_mark.
963         (execute_command): Update.
964
965 2017-10-19  Pedro Alves  <palves@redhat.com>
966
967         * xml-support.c (xml_fetch_content_from_file): Check fread's
968         return.
969
970 2017-10-19  Pedro Alves  <palves@redhat.com>
971
972         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
973         async.
974         (handle_error_fd): New function.
975         (ser_base_async): Add/delete an event loop file handler for
976         error_fd.
977
978 2017-10-19  Pedro Alves  <palves@redhat.com>
979
980         * xml-support.c (xml_fetch_content_from_file): Don't read in
981         chunks.  Instead use fseek to determine the file's size, and read
982         it in one go.
983
984 2017-11-18  Keith Seitz  <keiths@redhat.com>
985
986         * c-exp.y (oper): Canonicalize conversion operators of user-defined
987         types.
988         Add whitespace to front of type name.
989
990 2017-10-18  Keith Seitz  <keiths@redhat.com>
991
992         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
993         DW_AT_accessibility.
994
995 2017-10-18  Yao Qi  <yao.qi@linaro.org>
996
997         * features/tic6x-c62x-linux.c: Remove.
998
999 2017-10-17  Tom Tromey  <tom@tromey.com>
1000
1001         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
1002         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
1003         (do_mixed_source_and_assembly): Likewise.
1004
1005 2017-10-17  Tom Tromey  <tom@tromey.com>
1006
1007         * regcache.c (regcache::xfer_part): Remove assertion.
1008
1009 2017-10-17  Pedro Alves  <palves@redhat.com>
1010
1011         * xml-support.c (xml_fetch_content_from_file): Call
1012         unique_ptr::release() instead unique_ptr::get() when passing
1013         through xrealloc.
1014
1015 2017-10-17  Yao Qi  <yao.qi@linaro.org>
1016
1017         * regcache.c (regcache::xfer_part): Remove parameters read and
1018         write, add parameter is_raw.  All callers are updated.
1019
1020 2017-10-16  Keith Seitz  <keiths@redhat.com>
1021
1022         * c-typeprint.c (enum access_specifier): Moved here from
1023         c_type_print_base.
1024         (output_access_specifier): New function.
1025         (c_type_print_base): Consider typedefs when assessing
1026         whether access labels are needed.
1027         Use output_access_specifier as needed.
1028         Output access specifier for typedefs, if needed.
1029         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
1030         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
1031         fields.
1032         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
1033         accessor macros.
1034
1035 2017-10-16  Tom Tromey  <tom@tromey.com>
1036
1037         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
1038         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
1039         * target.c (target_fileio_read_stralloc): Update.
1040         * sparc64-tdep.c (adi_is_addr_mapped): Update.
1041         * target.h (target_fileio_read_stralloc): Return
1042         unique_xmalloc_ptr.
1043
1044 2017-10-16  Tom Tromey  <tom@tromey.com>
1045
1046         * xml-syscall.c (xml_init_syscalls_info): Update.
1047         * xml-support.c (xinclude_start_include): Update.
1048         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
1049         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
1050         (xml_fetch_content_from_file): Likewise.
1051         * osdata.c (get_osdata): Update.
1052         * target.h (target_read_stralloc, target_get_osdata): Return
1053         unique_xmalloc_ptr.
1054         * solib-aix.c (solib_aix_get_library_list): Update.
1055         * solib-target.c (solib_target_current_sos): Update.
1056         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
1057         * xml-tdesc.c (fetch_available_features_from_target): Update.
1058         (target_fetch_description_xml): Update.
1059         (file_read_description_xml): Update.
1060         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
1061         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
1062         (remote_pid_to_exec_file): Update.
1063         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
1064         (target_get_osdata): Likewise.
1065
1066 2017-10-16  Tom Tromey  <tom@tromey.com>
1067
1068         * remote.c (remote_register_number_and_offset): Use std::vector.
1069         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
1070         (putpkt_binary): Use gdb::def_vector.
1071         (compare_sections_command): Use gdb::byte_vector.
1072
1073 2017-10-16  Tom Tromey  <tom@tromey.com>
1074
1075         * ppc-linux-nat.c (hwdebug_insert_point): Use
1076         gdb::unique_xmalloc_ptr, XDUP.
1077
1078 2017-10-16  Tom Tromey  <tom@tromey.com>
1079
1080         * probe.c (parse_probes): Use std::string.
1081         (info_probes_for_ops, enable_probes_command)
1082         (disable_probes_command): Remove cleanups.
1083
1084 2017-10-16  Tom Tromey  <tom@tromey.com>
1085
1086         * buildsym.c (block_compar): Remove.
1087         (end_symtab_get_static_block): Use std::vector.
1088
1089 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
1090
1091         * memrange.h (struct mem_range): Define operator< and operator==.
1092         (mem_range_s): Remove.
1093         (DEF_VEC_O (mem_range_s)): Remove.
1094         (normalize_mem_ranges): Change parameter type to std::vector.
1095         * memrange.c (compare_mem_ranges): Remove.
1096         (normalize_mem_ranges): Change parameter type to std::vector,
1097         adjust to vector change.
1098         * exec.c (section_table_available_memory): Return vector, remove
1099         parameter.
1100         (section_table_read_available_memory): Adjust to std::vector
1101         change.
1102         * remote.c (remote_read_bytes): Adjust to std::vector
1103         change.
1104         * tracepoint.h (traceframe_available_memory): Change parameter
1105         type to std::vector.
1106         * tracepoint.c (traceframe_available_memory): Change parameter
1107         type to std::vector, adjust.
1108         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
1109         std::vector change.
1110         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1111         unittests/memrange-selftests.c.
1112         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
1113         * gdb/unittests/memrange-selftests.c: New file.
1114
1115 2017-10-16  Pedro Alves  <palves@redhat.com>
1116
1117         * elfread.c (probe_key_free): Rename range-for variable.
1118         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
1119         (find_probe_by_pc, collect_probes): Rename range-for variable.
1120
1121 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1122
1123         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
1124         * features/tic6x-c62x.c: Remove.
1125         * features/tic6x-c64x-linux.c: Remove.
1126         * features/tic6x-c64x.c: Remove.
1127         * features/tic6x-c64xp-linux.c: Remove.
1128         * features/tic6x-c64xp.c: Remove.
1129         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
1130         initialize_tdesc_tic6x_*_linux functions.
1131         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
1132         initialize_tdesc_tic6x_* functions.
1133
1134 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1135
1136         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
1137         tic6x-c62x.
1138         * regformats/tic6x-c62x.dat: Remove.
1139         * regformats/tic6x-c64x.dat: Remove.
1140         * regformats/tic6x-c64xp.dat: Remove.
1141
1142 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
1143
1144         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
1145         (the !HAVE_LIBEXPAT version).
1146
1147 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1148
1149         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
1150         const.
1151
1152 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1153
1154         * target.h: Include tracepoint.h.
1155         (enum trace_find_type): Move to tracepoint.h.
1156         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
1157         * tracepoint.h: Don't include target.h
1158         (enum trace_find_type): Move from target.h.
1159         (parse_traceframe_info): Return a unique ptr.
1160         * tracepoint.c (current_traceframe_info): Change type to unique
1161         ptr.
1162         (free_traceframe_info): Remove.
1163         (clear_traceframe_info): Don't manually free
1164         current_traceframe_info.
1165         (free_result): Remove.
1166         (parse_traceframe_info): Return a unique ptr.
1167         (get_traceframe_info): Adjust to unique ptr.
1168         * ctf.c (ctf_traceframe_info): Return a unique ptr.
1169         * remote.c (remote_traceframe_info): Return a unique ptr.
1170         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
1171         ptr.
1172         * target-debug.h (target_debug_print_traceframe_info_up): New
1173         macro.
1174         * target-delegates.c: Regenerate.
1175
1176 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1177
1178         * memrange.h (struct mem_range): Add constructors.
1179         * tracepoint.h (struct traceframe_info) <memory>: Change type to
1180         std::vector<mem_range>.
1181         * tracepoint.c (free_traceframe_info): Don't manually free
1182         vector.
1183         (traceframe_info_start_memory): Adjust to vector change.
1184         (traceframe_available_memory): Likewise.
1185         * tracefile-tfile.c (build_traceframe_info): Likewise.
1186         * ctf.c (ctf_traceframe_info): Likewise.
1187
1188 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1189
1190         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
1191         std::vector<int>.
1192         * tracepoint.c (free_traceframe_info): Deallocate with delete.
1193         (traceframe_info_start_tvar): Adjust to vector change.
1194         (parse_traceframe_info): Allocate with new.
1195         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
1196         vector change.
1197         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
1198         change.
1199         tfile_traceframe_info): Allocate with new.
1200         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
1201         change.
1202
1203 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1204
1205         * tracepoint.c (traceframe_info): Rename to...
1206         (current_traceframe_info): ...this.
1207         (clear_traceframe_info): Adjust.
1208         (get_traceframe_info): Adjust.
1209
1210 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1211
1212         * nat/linux-osdata.c: Include algorithm.
1213         (compare_processes): Remove.
1214         (struct pid_pgid_entry): New struct.
1215         (linux_xfer_osdata_processgroups): Use std::vector instead of
1216         XNEWVEC.
1217
1218 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1219
1220         * objfiles.h: Don't include symfile.h.
1221         (struct partial_symbol): Remove forward-declaration.
1222         (struct objfile) <global_psymbols, static_psymbols>: Change type
1223         to std::vector<partial_symbol *>.
1224         * objfiles.c (objfile::objfile): Don't memset those fields.
1225         (objfile::~objfile): Don't free those fields.
1226         * psympriv.h (struct psymbol_allocation_list): Remove
1227         forward-declaration.
1228         (add_psymbol_to_list): Change psymbol_allocation_list parameter
1229         to std::vector.
1230         (start_psymtab_common): Change parameters to std::vector.
1231         * psymtab.c: Include algorithm.
1232         (require_partial_symbols): Call shrink_to_fit.
1233         (find_pc_sect_psymbol): Adjust to vector change.
1234         (match_partial_symbol): Likewise.
1235         (lookup_partial_symbol): Likewise.
1236         (psym_relocate): Likewise.
1237         (dump_psymtab): Likewise.
1238         (recursively_search_psymtabs): Likewise.
1239         (compare_psymbols): Remove.
1240         (sort_pst_symbols): Adjust to vector change.
1241         (start_psymtab_common): Likewise.
1242         (end_psymtab_common): Likewise.
1243         (psymbol_bcache_full): De-constify return value.
1244         (add_psymbol_to_bcache): Likewise.
1245         (extend_psymbol_list): Remove.
1246         (append_psymbol_to_list): Adjust to vector change.
1247         (add_psymbol_to_list): Likewise.
1248         (init_psymbol_list): Likewise.
1249         (maintenance_info_psymtabs): Likewise.
1250         (maintenance_check_psymtabs): Likewise.
1251         * symfile.h (struct psymbol_allocation_list): Remove.
1252         * symfile.c (reread_symbols): Adjust to vector change.
1253         * dbxread.c (start_psymtab): Change type of parameters.
1254         (dbx_symfile_read): Adjust to vector change.
1255         (read_dbx_symtab): Likewise.
1256         (start_psymtab): Change type of parameters.
1257         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
1258         (create_partial_symtab): Likewise.
1259         (add_partial_symbol): Likewise.
1260         (write_one_signatured_type): Likewise.
1261         (recursively_write_psymbols): Likewise.
1262         * mdebugread.c (parse_partial_symbols): Likewise.
1263         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
1264         (scan_xcoff_symtab): Adjust to vector change.
1265         (xcoff_initial_scan): Likewise.
1266
1267 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
1268
1269         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
1270
1271 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1272
1273         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
1274         Remove s390x-*-expedite, add s390x-expedite.
1275
1276 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1277
1278         * features/s390-gs-linux64.c: Regenerated.
1279         * features/s390x-gs-linux64.c: Regenerated.
1280
1281 2017-10-13  Tom Tromey  <tom@tromey.com>
1282
1283         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1284         * solib.c (update_solib_list, reload_shared_libraries_1): Use
1285         delete.
1286         * symfile.c (symbol_file_add_with_addrs): Use new.
1287         (symbol_file_add_separate): Update comment.
1288         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
1289         * jit.c (jit_object_close_impl): Use new.
1290         (jit_unregister_code): Use delete.
1291         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
1292         (~objfile): Rename from free_objfile.
1293         (free_objfile_separate_debug, do_free_objfile_cleanup)
1294         (free_all_objfiles, objfile_purge_solibs): Use delete.
1295         * objfiles.h (struct objfile): Add constructor and destructor.
1296         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
1297         (allocate_objfile, free_objfile): Don't declare.
1298         (struct objstats): Add initializers.
1299
1300 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1301
1302         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
1303         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
1304         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
1305         * gdbarch.h: Regenerate.
1306         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1307         Adjust comment.
1308         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
1309         (i386_displaced_step_fixup): Adjust comment.
1310         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
1311
1312 2017-10-12  Tom Tromey  <tom@tromey.com>
1313
1314         * prologue-value.h (pv_area::store_would_trash): Return bool.
1315         (pv_area::find_reg): Likewise.
1316         * prologue-value.c (pv_area::store_would_trash): Return bool.
1317         (pv_area::find_reg): Likewise.
1318
1319 2017-10-12  Tom Tromey  <tom@tromey.com>
1320
1321         * s390-linux-tdep.c (s390_store, s390_load)
1322         (s390_check_for_saved, s390_analyze_prologue): Update.
1323         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
1324         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
1325         * prologue-value.h (class pv_area): Move from prologue-value.c.
1326         Change names of members.  Add constructor, destructor, member
1327         functions.
1328         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
1329         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
1330         (pv_area_fetch, pv_area_scan): Don't declare.
1331         * prologue-value.c (struct pv_area::area_entry): Now member of
1332         pv_area.
1333         (struct pv_area): Move to prologue-value.h.
1334         (pv_area::pv_area): Rename from make_pv_area.
1335         (pv_area::~pv_area): Rename from free_pv_area.
1336         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
1337         (clear_entries, find_entry, overlaps, store_would_trash, store)
1338         (fetch, find_reg, scan): Now member of pv_area.
1339         Remove "area" argument.  Update.
1340         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
1341         Update.
1342         * mn10300-tdep.c (push_reg, check_for_saved)
1343         (mn10300_analyze_prologue): Update.
1344         * mep-tdep.c (is_arg_spill, check_for_saved)
1345         (mep_analyze_prologue): Update.
1346         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
1347         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
1348         (m32c_is_struct_return, m32c_analyze_prologue): Update.
1349         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
1350         Update.
1351         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
1352         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
1353
1354 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1355
1356         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
1357         * linux-nat.c (linux_nat_delete_thread): New variable.
1358         (lwp_free): Invoke linux_nat_delete_thread if set.
1359         (linux_nat_set_delete_thread): New function.
1360         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
1361         thread delete callback.
1362         * arm-linux-nat.c (arm_linux_delete_thread): New function.
1363         (_initialize_arm_linux_nat): Assign thread delete callback.
1364         * s390-linux-nat.c (s390_delete_thread): New function.
1365         (_initialize_s390_nat): Assign thread delete callback.
1366         * x86-linux-nat.c (x86_linux_add_target): Likewise.
1367         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
1368         function.
1369         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
1370         declaration.
1371         * nat/x86-linux.c (x86_linux_delete_thread): New function.
1372         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
1373
1374 2017-10-09  Tom Tromey  <tom@tromey.com>
1375
1376         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
1377         std::string.
1378         * tui/tui-layout.c (enum tui_status): Use std::string.
1379
1380 2017-10-11  Tom Tromey  <tom@tromey.com>
1381
1382         * gdbthread.h (thread_command): Constify.
1383         * inferior.h (detach_command): Constify.
1384         * top.h (set_history, show_history): Constify.
1385         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
1386         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
1387         * bsd-kvm.c (bsd_kvm_cmd): Constify.
1388         * printcmd.c (set_command): Constify.
1389         (non_const_set_command): New function.
1390         * dcache.c (set_dcache_command, show_dcache_command): Constify.
1391         * breakpoint.c (enable_command, disable_command, delete_command)
1392         (catch_command, tcatch_command, set_breakpoint_cmd)
1393         (show_breakpoint_cmd): Constify.
1394         * macrocmd.c (macro_command): Constify.
1395         * infcmd.c (unset_command, kill_command, detach_command)
1396         (info_proc_cmd): Constify.
1397         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
1398         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
1399         (info_auto_load_cmd): Constify.
1400         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
1401         (unset_tdesc_cmd): Constify.
1402         * ada-lang.c (set_ada_command, show_ada_command)
1403         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
1404         * guile/guile.c (set_guile_command, show_guile_command)
1405         (info_guile_command): Constify.
1406         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
1407         Constify.
1408         * skip.c (skip_command): Constify.
1409         * compile/compile.c (_initialize_compile): Constify.
1410         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
1411         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
1412         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
1413         (maint_btrace_pt_show_cmd): Constify.
1414         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
1415         Constify.
1416         * python/python.c (user_show_python, user_set_python): Constify.
1417         * mips-tdep.c (set_mips_command, show_mips_command)
1418         (set_mipsfpu_command): Constify.
1419         * record-btrace.c (cmd_record_btrace_start)
1420         (cmd_set_record_btrace, cmd_show_record_btrace)
1421         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
1422         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
1423         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
1424         Constify.
1425         * symfile.c (overlay_command): Constify.
1426         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
1427         * cli/cli-logging.c (set_logging_command, show_logging_command):
1428         Constify.
1429         * cli/cli-dump.c (dump_command, append_command)
1430         (srec_dump_command, ihex_dump_command, verilog_dump_command)
1431         (tekhex_dump_command, binary_dump_command)
1432         (binary_append_command): Constify.
1433         * cli/cli-decode.c (struct cmd_list_element): Change type of
1434         "fun".
1435         * cli/cli-cmds.c (info_command, show_command, set_debug)
1436         (show_debug): Constify.
1437         (show_command): Add non-const overload.
1438         * top.c (set_history, show_history): Constify.
1439         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
1440         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
1441         * target.c (target_command): Constify.
1442         * sparc64-tdep.c (info_adi_command): Constify.
1443         * record-full.c (cmd_record_full_start): Constify.
1444         (set_record_full_command): Constify.  Fix typo.
1445         (show_record_full_command): Constify.
1446         * thread.c (thread_command, thread_apply_command): Constify.
1447         * memattr.c (dummy_cmd): Constify.
1448         * value.c (function_command): Constify.
1449         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
1450         * probe.c (info_probes_command): Constify.
1451         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
1452         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
1453         (show_thread_cmd, set_thread_default_cmd)
1454         (show_thread_default_cmd): Constify.
1455         (check_empty): Constify.
1456         * tracepoint.c (tfind_command): Constify.
1457         * cp-support.c (maint_cplus_command): Constify.
1458         * windows-tdep.c (info_w32_command): Constify.
1459         * record.c (cmd_record_start, set_record_command)
1460         (show_record_command, info_record_command, cmd_record_goto):
1461         Constify.
1462         * ravenscar-thread.c (set_ravenscar_command)
1463         (show_ravenscar_command): Constify.
1464         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
1465         Constify.
1466         (add_internal_problem_command): Remove casts.
1467         * arc-tdep.c (maintenance_print_arc_command): Constify.
1468         * valprint.c (set_print, show_print, set_print_raw)
1469         (show_print_raw): Constify.
1470         * maint.c (maintenance_command, maintenance_info_command)
1471         (maintenance_print_command, maintenance_set_cmd)
1472         (maintenance_show_cmd, set_per_command_cmd)
1473         (show_per_command_cmd, maintenance_check_command): Constify.
1474         * language.c (set_check, show_check): Constify.
1475         * typeprint.c (show_print_type, set_print_type): Constify.
1476         * go32-nat.c (go32_info_dos_command): Constify.
1477
1478 2017-10-11  Tom Tromey  <tom@tromey.com>
1479
1480         * breakpoint.c (prepare_re_set_context): Remove.
1481         (breakpoint_re_set_one): Update.  Don't use cleanups.
1482         (breakpoint_re_set): Use scoped_restore, std::string, and
1483         scoped_restore_current_language.
1484
1485 2017-10-11  Tom Tromey  <tom@tromey.com>
1486
1487         * breakpoint.c (commands_command_1): Use std::string.
1488         (cleanup_executing_breakpoints): Remove.
1489         (bpstat_do_actions_1): Use scoped_restore.
1490         (bpstat_check_watchpoint): Use std::string.
1491         (decode_static_tracepoint_spec): Likewise.
1492         (break_range_command): Likewise.
1493         (watch_command_1): Likewise.
1494         (compare_breakpoints): Change argument types.
1495         (clear_command): Use std::vector.
1496         (cleanup_executing_breakpoints): Remove.
1497         (update_global_location_list): Use unique_xmalloc_ptr.
1498         (strace_command): Remove unused declaration.
1499
1500 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
1501
1502         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
1503         * NEWS: Mention new FreeBSD/arm native configuration.
1504         * configure.host: Add arm*-*-freebsd*.
1505         * configure.nat: Likewise.
1506         * arm-fbsd-nat.c: New file.
1507
1508 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
1509
1510         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
1511         (ALLDEPFILES): Add arm-fbsd-tdep.c.
1512         * NEWS: Mention new FreeBSD/arm target.
1513         * configure.tgt: Add arm*-*-freebsd*.
1514         * arm-fbsd-tdep.c: New file.
1515         * arm-fbsd-tdep.h: New file.
1516
1517 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
1518
1519         * linux-tdep.c (linux_make_corefile_notes): Remove call to
1520         `gdbarch_elfcore_write_linux_prpsinfo'.
1521         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
1522         method.
1523         (elf_internal_linux_prpsinfo): Remove declaration.
1524         * gdbarch.h: Regenerate.
1525         * gdbarch.c: Regenerate.
1526
1527 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
1528
1529         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
1530         `set_gdbarch_elfcore_write_linux_prpsinfo'.
1531
1532 2017-10-11  Pedro Alves  <palves@redhat.com>
1533
1534         * breakpoint.c (reattach_breakpoints): Delete.
1535         * breakpoint.h (reattach_breakpoints): Delete.
1536
1537 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
1538
1539         * symfile.c (registered_sym_fns): Make struct, not typedef.
1540         (DEF_VEC_O (registered_sym_fns)): Remove.
1541         (symtab_fns): Change type to std::vector.
1542         (add_symtab_fns): Adjust.
1543         (find_sym_fns): Adjust.
1544
1545 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
1546
1547         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
1548         * arc-tdep.h (arc_arch_is_em): New function.
1549         (arc_arch_is_hs): Likewise.
1550
1551 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
1552
1553         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
1554         parentheses in the declaration.
1555         (macro_lookup_inclusion): Likewise.
1556         (macro_lookup_definition): Likewise.
1557         * p-lang.h (pascal_builtin_types): Likewise.
1558         * tui/tui-data.c (tui_win_list): Likewise.
1559         * tui/tui-data.h (tui_win_list): Likewise.
1560         * utils.h (make_cleanup_free_section_addr_info): Likewise.
1561
1562 2017-10-11  Mark Rages  <markrages@gmail.com>
1563
1564         * target-memory.c (block_boundaries): Fix for block address not
1565         aligned on block size.
1566
1567 2017-10-10  Pedro Alves <palves@redhat.com>
1568             Tom Tromey  <tom@tromey.com>
1569
1570         * breakpoint.c (struct captured_breakpoint_query_args)
1571         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
1572         (print_breakpoint): New.
1573         * breakpoint.h (print_breakpoint): Declare.
1574         * common/common-exceptions.h (enum return_reason): Remove
1575         references to catch_exceptions.
1576         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
1577         Delete.
1578         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
1579         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
1580         * gdb.h: Delete.
1581         * gdbthread.h (thread_select): Declare.
1582         * mi/mi-cmd-break.c: Don't include gdb.h.
1583         (breakpoint_notify): Use print_breakpoint.
1584         * mi/mi-cmd-catch.c: Don't include gdb.h.
1585         * mi/mi-interp.c: Don't include gdb.h.
1586         (mi_print_breakpoint_for_event): New.
1587         (mi_breakpoint_created, mi_breakpoint_modified): Use
1588         mi_print_breakpoint_for_event.
1589         * mi/mi-main.c: Don't include gdb.h.
1590         (mi_cmd_thread_select): Parse the global thread ID here.  Use
1591         thread_select instead of gdb_thread_select.
1592         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
1593         of using gdb_list_thread_ids.
1594         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
1595         FILEIO_ENOSYS here.
1596         (remote_fileio_request): Use TRY/CATCH instead of
1597         catch_exceptions.
1598         * symfile-mem.c (struct symbol_file_add_from_memory_args)
1599         (symbol_file_add_from_memory_wrapper): Delete.
1600         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
1601         * thread.c: Don't include gdb.h.
1602         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
1603         (thread_alive): Use thread_select.
1604         (do_captured_thread_select): Delete, parts salvaged as ...
1605         (thread_select): ... this new function.
1606         (gdb_thread_select): Delete.
1607
1608 2017-10-10  Pedro Alves  <palves@redhat.com>
1609             Tom Tromey  <tom@tromey.com>
1610
1611         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
1612         and reverse logic.
1613         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
1614         No longer macros.  Instead ...
1615         (enum wp_check_result): They're now values of this new
1616         enumeration.
1617         (watchpoint_check): Change return type to wp_check_result and
1618         parameter type to bpstat.
1619         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
1620         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
1621         catch_errors.  Reverse logic of watchpoint_check call.
1622         (breakpoint_re_set_one): Now returns void and takes a breakpoint
1623         pointer as parameter.
1624         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
1625         * common/common-exceptions.c (throw_exception_sjlj): Update
1626         comments to avoid mentioning catch_errors.
1627         * exceptions.c (catch_errors): Delete.
1628         * exceptions.h: Update comments to avoid mentioning catch_errors.
1629         (catch_errors_ftype, catch_errors): Delete.
1630         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
1631         (hook_stop_stub): Delete.
1632         (restore_selected_frame): Change return type to void, and
1633         parameter type to const frame_id &.
1634         (restore_infcall_control_state): Use TRY/CATCH instead of
1635         catch_errors.
1636         * main.c (captured_command_loop): Return void and remove
1637         parameter.  Remove references to catch_errors.
1638         (captured_main): Use TRY/CATCH instead of catch_errors.
1639         * objc-lang.c (objc_submethod_helper_data)
1640         (find_objc_msgcall_submethod_helper): Delete.
1641         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
1642         catch_errors.
1643         * record-full.c (record_full_message): Return void.
1644         (record_full_message_args, record_full_message_wrapper): Delete.
1645         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
1646         instead of catch_errors.
1647         * solib-aix.c (solib_aix_open_symbol_file_object): Change
1648         parameter type to int.
1649         * solib-darwin.c (open_symbol_file_object): Ditto.
1650         * solib-dsbt.c (open_symbol_file_object): Ditto.
1651         * solib-frv.c (open_symbol_file_object): Ditto.
1652         * solib-svr4.c (open_symbol_file_object): Ditto.
1653         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
1654         * solib.c (update_solib_list): Use TRY/CATCH instead of
1655         catch_errors.
1656         * solist.h (struct target_so_ops) <open_symbol_file_object>:
1657         Change type.
1658         * symmisc.c (struct print_symbol_args): Remove.
1659         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
1660         (print_symbol): Change type.
1661         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
1662         and remove parameters.
1663         (catch_errors): New.
1664         (get_windows_debug_event): Adjust.
1665
1666 2017-10-09  Tom Tromey  <tom@tromey.com>
1667
1668         * mi/mi-main.c (free_splay_tree): Remove.
1669         (list_available_thread_groups): Use splay_tree_up.
1670         * common/gdb_splay_tree.h: New file.
1671
1672 2017-10-09  Tom Tromey  <tom@tromey.com>
1673
1674         * mi/mi-main.c (do_nothing): Remove.
1675         (list_available_thread_groups): Update.
1676
1677 2017-10-09  Pedro Alves  <palves@redhat.com>
1678
1679         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
1680         reading registers when switching context.
1681
1682 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
1683
1684         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
1685         (fbsd_convert_siginfo): Likewise.
1686         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
1687
1688 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
1689
1690         * configure.ac (try_guile_versions): Remove guile-2.2.
1691         * configure: Regenerate.
1692
1693 2017-10-09  Tom Tromey  <tom@tromey.com>
1694
1695         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
1696         (COMPILE.pre): Use $(CXX).
1697
1698 2017-10-09  Pedro Alves  <palves@redhat.com>
1699
1700         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
1701         Use bool.
1702         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1703         * cp-support.h (cp_remove_params): Now returns a
1704         gdb::unique_xmalloc_ptr.
1705         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
1706         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
1707         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
1708         returning a gdb::unique_xmalloc_ptr.
1709         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1710         * stack.c (find_frame_funname): Adjust to cp_remove_params
1711         returning a gdb::unique_xmalloc_ptr.
1712
1713 2017-10-08  Tom Tromey  <tom@tromey.com>
1714
1715         * dwarf2read.c (dwarf2_get_dwz_file): Use
1716         gdb::unique_xmalloc_ptr.
1717         (find_slot_in_mapped_hash): Likewise.
1718         (dwarf2_physname): Likewise.
1719         (create_dwo_unit_in_dwp_v1): Use std::string.
1720         (create_dwo_unit_in_dwp_v2): Likewise.
1721         (lookup_dwo_cutu): Likewise.
1722         (inherit_abstract_dies): Use std::vector.
1723         (read_array_type): Likewise.
1724         (dwarf_decode_macros): Remove unused declaration.
1725         (unsigned_int_compar): Remove.
1726         (dwarf2_build_psymtabs_hard): Use scoped_restore.
1727         (psymtabs_addrmap_cleanup): Remove.
1728
1729 2017-10-08  Tom Tromey  <tom@tromey.com>
1730
1731         * frame-unwind.c (frame_unwind_try_unwinder): Update.
1732         * frame.h (frame_cleanup_after_sniffer): Declare.
1733         (frame_prepare_for_sniffer): Return void.
1734         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
1735         type of argument.
1736         (frame_prepare_for_sniffer): Return void.
1737
1738 2017-10-08  Tom Tromey  <tom@tromey.com>
1739
1740         * utils.h (make_cleanup_value_free): Remove.
1741         * utils.c (do_value_free, struct cleanup): Remove.
1742         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
1743         Use gdb_value_up.
1744         * value.h (struct value_deleter): New.
1745         (gdb_value_up): New typedef.
1746
1747 2017-10-08  Tom Tromey  <tom@tromey.com>
1748
1749         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
1750         (make_cleanup_free_search_symbols): Remove.
1751         (search_symbols): Return std::vector.
1752         (symbol_search::compare_search_syms): Now member of
1753         symbol_search.  Change arguments.
1754         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
1755         (symtab_symbol_info, rbreak_command): Update.
1756         * symtab.h (struct symbol_search) <next>: Remove.
1757         Add constructors.
1758         (symbol_search::operator<): New function.
1759         (symbol_search::operator==): New function.
1760         (search_symbols): Remove std::vector.
1761         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
1762         (symbol_search::compare_search_syms): Declare.
1763
1764 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1765
1766         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
1767         arch/aarch64-insn.o.
1768         Remove one rule.
1769         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
1770
1771 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1772
1773         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
1774         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
1775         arch/arm-linux.o respectively.
1776         * configure.tgt: Likewise.
1777
1778 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1779
1780         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
1781         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
1782
1783 2017-10-06  Pedro Alves  <palves@redhat.com>
1784
1785         * windows-nat.c: Include <algorithm>.
1786
1787 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1788
1789         * configure.tgt (i386_tobjs): New variable.
1790         (amd64_tobjs): New variable.
1791         Set $cpu_obs and $os_obs.
1792
1793 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1794
1795         * Makefile.in (CONFIG_SRC_SUBDIR): New.
1796         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
1797         (clean): Remove object files and dependency files.
1798         (distclean): Remove the directory.
1799         * configure.ac: Invoke AC_CONFIG_COMMANDS.
1800         * configure: Re-generated.
1801         * configure.tgt: Replace amd64.o with arch/amd64.o.
1802
1803 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
1804
1805         PR build/22188
1806         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
1807         and SETEND.
1808
1809 2017-10-05  Pedro Alves  <palves@redhat.com>
1810
1811         * linux-nat.c (linux_child_follow_fork): When following the parent
1812         and detaching the child, consult the parent thread's architecture
1813         instead of the child's.
1814
1815 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
1816
1817         * ax.h: Do not include "doublest.h".
1818         (union agent_val): Remove.
1819
1820 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
1821
1822         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
1823         (decimal_to_string): Return std::string object.
1824         (decimal_from_string): Accept std::string object.  Return bool.
1825         (decimal_from_integral, decimal_from_doublest): Remove.
1826         (decimal_from_longest): Add prototype.
1827         (decimal_from_ulongest): Likewise.
1828         (decimal_to_longest): Likewise.
1829         (decimal_from_doublest): Likewise.
1830         * dfp.c: Do not include "gdbtypes.h" or "value.h".
1831         (MAX_DECIMAL_STRING): Move here.
1832         (decimal_to_string): Return std::string object.
1833         (decimal_from_string): Accept std::string object.  Return bool.
1834         (decimal_from_integral): Remove, replace by ...
1835         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
1836         (decimal_to_longest): New function.
1837         (decimal_from_floating): Remove, replace by ...
1838         (decimal_from_doublest): ... this new function.
1839         (decimal_to_doublest): Update to new decimal_to_string interface.
1840
1841         * value.c (unpack_long): Use decimal_to_longest.
1842         * valops.c (value_cast): Use decimal_from_doublest instead of
1843         decimal_from_floating.  Use decimal_from_[u]longest isntead of
1844         decimal_from_integral.
1845         * valarith.c (value_args_as_decimal): Likewise.
1846         * valprint.c (print_decimal_floating): Update to new
1847         decimal_to_string interface.
1848         * printcmd.c (printf_decfloat): Likewise.
1849         * c-exp.y (parse_number): Update to new decimal_from_string interface.
1850
1851 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
1852
1853         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
1854         * gdbtypes.c: Include "floatformat.h".
1855         * value.c: Likewise.
1856         * m68k-tdep.c: Likewise.
1857
1858         * findvar.c: Do not include "floatformat.h".
1859         * amd64-darwin-tdep.c: Likewise.
1860         * arm-linux-tdep.c: Likewise.
1861         * i386-darwin-tdep.c: Likewise.
1862         * i387-tdep.c: Likewise.
1863         * m68k-linux-tdep.c: Likewise.
1864         * mep-tdep.c: Likewise.
1865         * mips-tdep.c: Likewise.
1866         * nios2-tdep.c: Likewise.
1867         * s390-linux-tdep.c: Likewise.
1868         * sparc-obsd-tdep.c: Likewise.
1869         * sparc-tdep.c: Likewise.
1870         * sparc64-tdep.c: Likewise.
1871         * spu-tdep.c: Likewise.
1872         * tic6x-tdep.c: Likewise.
1873         * tilegx-tdep.c: Likewise.
1874         * vax-tdep.c: Likewise.
1875         * xstormy16-tdep.c: Likewise.
1876         * xtensa-tdep.c: Likewise.
1877
1878         * top.c: Do not include "doublest.h".
1879         * aarch64-tdep.c: Likewise.
1880         * alpha-tdep.c: Likewise.
1881         * arm-linux-tdep.c: Likewise.
1882         * m68k-linux-tdep.c: Likewise.
1883         * tilegx-tdep.c: Likewise.
1884         * xstormy16-tdep.c: Likewise.
1885
1886 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
1887
1888         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
1889         (mipsn32_fbsd_sigframe): Define.
1890         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
1891         for FreeBSD/mipsn32.
1892
1893 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
1894
1895         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
1896         AT_HWCAP.
1897
1898 2017-10-05  Tristan Gingold  <tgingold@free.fr>
1899
1900         * MAINTAINERS (Misc): Update my email address.
1901
1902 2017-10-04  Pedro Alves  <palves@redhat.com>
1903
1904         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
1905         it instead of target_gdbarch.
1906         (get_remote_state, get_remote_packet_size): Adjust
1907         get_remote_arch_state calls, passing down target_gdbarch
1908         explicitly.
1909         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
1910         'gdbarch' and use it instead of target_gdbarch.
1911         (get_memory_packet_size): Adjust get_remote_arch_state calls,
1912         passing down target_gdbarch explicitly.
1913         (struct stop_reply) <arch>: New field.
1914         (remote_parse_stop_reply): Use the stopped thread's architecture,
1915         not the current inferior's.  Save the architecture in the
1916         stop_reply.
1917         (process_stop_reply): Use the stop reply's architecture.
1918         (process_g_packet, remote_fetch_registers)
1919         (remote_prepare_to_store, store_registers_using_G)
1920         (remote_store_registers): Adjust get_remote_arch_state calls,
1921         using the regcache's architecture.
1922         (remote_get_trace_status): Adjust get_remote_arch_state calls,
1923         passing down target_gdbarch explicitly.
1924         * spu-multiarch.c (spu_thread_architecture): Defer to the target
1925         beneath instead of calling target_gdbarch.
1926         * target.c (default_thread_architecture): Use the specified
1927         inferior's architecture, instead of the current inferior's
1928         architecture (via target_gdbarch).
1929
1930 2017-10-04  Pedro Alves  <palves@redhat.com>
1931
1932         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
1933         case.
1934         (regcache_print): Handle !target_has_registers here instead.
1935
1936 2017-10-04  Pedro Alves  <palves@redhat.com>
1937
1938         * frame.c (create_test_frame): Delete.
1939         * frame.h (create_test_frame): Delete.
1940         * gdbarch-selftests.c: Include gdbthread.h and target.h.
1941         (class regcache_test): Delete.
1942         (test_target_has_registers, test_target_has_stack)
1943         (test_target_has_memory, test_target_prepare_to_store)
1944         (test_target_store_registers): New functions.
1945         (test_target_ops): New class.
1946         (register_to_value_test): Error out if there's already a
1947         process_stratum (or higher) target pushed.  Create a fuller mock
1948         environment, with mock target_ops, inferior, address space, thread
1949         and inferior_ptid.
1950         * progspace.c (struct address_space): Move to ...
1951         * progspace.h (struct address_space): ... here.
1952         * regcache.h (regcache::~regcache, regcache::raw_write)
1953         [GDB_SELF_TEST]: No longer virtual.
1954
1955 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
1956
1957         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
1958
1959 2017-10-04  Pedro Alves  <palves@redhat.com>
1960
1961         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
1962         out of 'between TRY and CATCH'.
1963
1964 2017-10-04  Pedro Alves  <palves@redhat.com>
1965
1966         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
1967         * common/common-exceptions.h (TRY): Open an outermost scope.
1968         Expand intro comment.
1969         (CATCH): Reindent.
1970         (END_CATCH): Close the outermost scope.
1971         * completer.c (complete_line_internal): Add missing END_CATCH.
1972
1973 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1974
1975         * NEWS (Changes since GDB 8.0): Add entry about new
1976         'set-cwd-on-gdbserver' feature.
1977         (New remote packets): Add entry for QSetWorkingDir.
1978         * common/common-inferior.h (set_inferior_cwd): New prototype.
1979         * infcmd.c (set_inferior_cwd): Remove "static".
1980         (show_cwd_command): Expand text to include remote debugging.
1981         * remote.c: Add PACKET_QSetWorkingDir.
1982         (remote_protocol_features) <QSetWorkingDir>: New entry for
1983         PACKET_QSetWorkingDir.
1984         (extended_remote_set_inferior_cwd): New function.
1985         (extended_remote_create_inferior): Call
1986         "extended_remote_set_inferior_cwd".
1987         (_initialize_remote): Call "add_packet_config_cmd" for
1988         QSetWorkingDir.
1989
1990 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1991
1992         * NEWS (New commands): Mention "set/show cwd".
1993         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
1994         "cd" command's help text.
1995         * common/common-inferior.h (get_inferior_cwd): New prototype.
1996         * infcmd.c (inferior_cwd_scratch): New global variable.
1997         (set_inferior_cwd): New function.
1998         (get_inferior_cwd): Likewise.
1999         (set_cwd_command): Likewise.
2000         (show_cwd_command): Likewise.
2001         (_initialize_infcmd): Add "set/show cwd" commands.
2002         * inferior.h (class inferior) <cwd>: New field.
2003         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
2004         (fork_inferior): Change inferior's cwd before its execution.
2005         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
2006         to CreateProcess.
2007
2008 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2009
2010         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
2011         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
2012         (COMMON_OBS): Add gdb_tilde_expand.o.
2013         * common/gdb_tilde_expand.c: New file.
2014         * common/gdb_tilde_expand.h: Likewise.
2015
2016 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
2017
2018         * gdbarch.sh (objfile): Remove duplicate declaration.
2019         * gdbarch.h: Regenerate.
2020
2021 2017-10-03  Tom Tromey  <tom@tromey.com>
2022
2023         * utils.c (internal_vproblem): Use string_vprintf.
2024
2025 2017-10-03  Tom Tromey  <tom@tromey.com>
2026
2027         * printcmd.c (info_symbol_command): Use std::string.
2028
2029 2017-10-03  Tom Tromey  <tom@tromey.com>
2030
2031         * top.c (gdb_safe_append_history): Use std::string.
2032
2033 2017-10-03  Tom Tromey  <tom@tromey.com>
2034
2035         * event-top.c (stdin_event_handler): Update.
2036         * main.c (captured_main_1): Update.
2037         * top.h (make_delete_ui_cleanup): Remove.
2038         (struct ui): Add constructor and destructor.
2039         (new_ui, delete_ui): Remove.
2040         * top.c (make_delete_ui_cleanup): Remove.
2041         (new_ui_command): Use std::unique_ptr.
2042         (delete_ui_cleanup): Remove.
2043         (ui::ui): Rename from new_ui.  Update.
2044         (free_ui): Remove.
2045         (ui::~ui): Rename from delete_ui.  Update.
2046
2047 2017-10-03  Tom Tromey  <tom@tromey.com>
2048
2049         * symfile.c (load_progress): Use gdb::byte_vector.
2050
2051 2017-10-03  Tom Tromey  <tom@tromey.com>
2052
2053         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
2054         declaration.
2055         * printcmd.c (x_command): Remove unused declaration.
2056         * symfile.c (symbol_file_command): Remove unused declaration.
2057
2058 2017-10-03  Tom Tromey  <tom@tromey.com>
2059
2060         * utils.c (internal_vproblem): Use std::string.
2061         (defaulted_query): Likewise.
2062
2063 2017-10-03  Tom Tromey  <tom@tromey.com>
2064
2065         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
2066         * top.c (execute_command_to_string): Update.
2067         * utils.c (make_cleanup_restore_page_info): Remove.
2068         (do_restore_page_info_cleanup): Remove.
2069         (set_batch_flag_and_restore_page_info):
2070         New.
2071         (make_cleanup_restore_page_info): Remove.
2072         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2073         (~set_batch_flag_and_restore_page_info): New
2074         (make_cleanup_restore_uinteger): Remove.
2075         (make_cleanup_restore_integer): Remove.
2076         (struct restore_integer_closure): Remove.
2077         (restore_integer): Remove.
2078         * utils.h (struct set_batch_flag_and_restore_page_info): New
2079         class.
2080         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2081         (make_cleanup_restore_page_info): Remove.
2082         (make_cleanup_restore_uinteger) Remove.
2083         (make_cleanup_restore_integer) Remove.
2084
2085 2017-10-03  Tom Tromey  <tom@tromey.com>
2086
2087         * record-full.h (record_full_gdb_operation_disable_set): Return
2088         scoped_restore_tmpl<int>.
2089         * infrun.c (adjust_pc_after_break): Update.
2090         (handle_signal_stop): Update.
2091         * record-full.c (record_full_gdb_operation_disable_set): Return
2092         scoped_restore_tmpl<int>.
2093         (record_full_wait_1, record_full_insert_breakpoint)
2094         (record_full_remove_breakpoint, record_full_save)
2095         (record_full_goto_insn): Update.
2096
2097 2017-10-02  Tom Tromey  <tom@tromey.com>
2098
2099         PR rust/22236:
2100         * rust-lang.c (rust_val_print_str): New function.
2101         (val_print_struct): Call it.
2102         (rust_subscript): Preserve name of slice type.
2103
2104 2017-10-02  Tom Tromey  <tom@tromey.com>
2105
2106         * rust-lang.c (rust_subscript): Handle slices in
2107         EVAL_AVOID_SIDE_EFFECTS case.
2108
2109 2017-10-02  Tom Tromey  <tom@tromey.com>
2110
2111         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
2112
2113 2017-10-02  Tom Tromey  <tom@tromey.com>
2114
2115         * rust-lang.h (rust_slice_type): Add "extern".
2116
2117 2017-10-02  Tom Tromey  <tom@tromey.com>
2118             Pedro Alves  <palves@redhat.com>
2119
2120         * ada-lang.h (ada_exc_info::operator<): Make const.
2121         (ada_exc_info::operator==): Make const.
2122         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
2123         Make const.
2124
2125 2017-09-29  Tom Tromey  <tom@tromey.com>
2126
2127         * target.c (read_whatever_is_readable): Change type of "result".
2128         Update.
2129         (free_memory_read_result_vector): Remove.
2130         (read_memory_robust): Change return type.  Update.
2131         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
2132         bin2hex, std::string.
2133         * target.h (memory_read_result_s): Remove typedef.
2134         (free_memory_read_result_vector): Remove.
2135         (read_memory_robust): Return std::vector.
2136
2137 2017-09-29  Tom Tromey  <tom@tromey.com>
2138
2139         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
2140
2141 2017-09-29  Tom Tromey  <tom@tromey.com>
2142
2143         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
2144         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
2145         operator< and operator==.
2146         (ada_exceptions_list): Return a std::vector.
2147         * ada-lang.c (ada_exc_info::operator<): Rename from
2148         compare_ada_exception_info.
2149         (ada_exc_info::operator==): New.
2150         (sort_remove_dups_ada_exceptions_list): Change type of
2151         "exceptions".
2152         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
2153         (ada_add_global_exceptions): Likewise.
2154         (ada_exceptions_list_1): Return a std::vector.
2155         (ada_exceptions_list): Likewise.
2156
2157 2017-09-29  Tom Tromey  <tom@tromey.com>
2158
2159         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
2160         'std::set *'.
2161         (print_one_inferior): Update.
2162         (free_vector_of_ints): Remove.
2163         (list_available_thread_groups): Change "ids" to std::set.
2164         (mi_cmd_list_thread_groups): Update.
2165         (struct collect_cores_data) <core>: Now a std::set.
2166         (collect_cores): Update.
2167         (unique): Remove.
2168         (print_one_inferior): Update.
2169
2170 2017-09-29  Tom Tromey  <tom@tromey.com>
2171
2172         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
2173         (mi_execute_async_cli_command): Likewise.
2174         (mi_cmd_trace_frame_collected): Use field_fmt.
2175
2176 2017-09-29  Tom Tromey  <tom@tromey.com>
2177
2178         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
2179         gdb::byte_vector.
2180
2181 2017-09-29  Tom Tromey  <tom@tromey.com>
2182
2183         * mi/mi-parse.c (mi_parse): Remove unused declaration.
2184
2185 2017-09-29  Tom Tromey  <tom@tromey.com>
2186
2187         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
2188
2189 2017-09-29  Tom Tromey  <tom@tromey.com>
2190
2191         * varobj.h (varobj_gen_name): Return std::string.
2192         * varobj.c (varobj_gen_name): Return std::string.
2193         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
2194         (mi_cmd_var_delete): Don't copy "name".
2195
2196 2017-09-29  Tom Tromey  <tom@tromey.com>
2197
2198         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
2199         (mi_cmd_break_insert_1): Update.
2200
2201 2017-09-29  Tom Tromey  <tom@tromey.com>
2202
2203         * target.h (make_scoped_defer_target_commit_resume): Update.
2204         * target.c (make_scoped_defer_target_commit_resume): Rename from
2205         make_cleanup_defer_target_commit_resume.  Return a
2206         scoped_restore.
2207         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
2208
2209 2017-09-29  Tom Tromey  <tom@tromey.com>
2210
2211         * main.c (captured_main_1): Remove unused declaration.
2212         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
2213
2214 2017-09-29  Tom Tromey  <tom@tromey.com>
2215
2216         * symtab.c (search_symbols): Remove unused outer cleanup.
2217         (make_source_files_completion_list): Remove unused declaration.
2218
2219 2017-09-29  Tom Tromey  <tom@tromey.com>
2220
2221         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
2222
2223 2017-09-29  Tom Tromey  <tom@tromey.com>
2224
2225         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
2226         gdb::byte_vector.
2227
2228 2017-09-29  Tom Tromey  <tom@tromey.com>
2229
2230         * complaints.c (vcomplaint): Use std::string.
2231
2232 2017-09-29  Tom Tromey  <tom@tromey.com>
2233
2234         * tracepoint.c (trace_variable_command): Use std::string.
2235         (encode_actions_1): Remove unused declarations.
2236         (create_tsv_from_upload): Use std::string.
2237
2238 2017-09-29  Tom Tromey  <tom@tromey.com>
2239
2240         * cp-support.c (gdb_demangle): Use std::string.
2241
2242 2017-09-29  Tom Tromey  <tom@tromey.com>
2243
2244         * stack.c (parse_frame_specification): Use std::string
2245         (info_frame_command): Use gdb::unique_xmalloc_ptr.
2246
2247 2017-09-29  Tom Tromey  <tom@tromey.com>
2248
2249         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
2250
2251 2017-09-29  Tom Tromey  <tom@tromey.com>
2252
2253         * utils.c (vfprintf_maybe_filtered): Use std::string.
2254         (vfprintf_unfiltered): Likewise.
2255
2256 2017-09-29  Tom Tromey  <tom@tromey.com>
2257
2258         * event-top.c (top_level_prompt): Return std::string.
2259         (display_gdb_prompt): Update.
2260
2261 2017-09-29  Tom Tromey  <tom@tromey.com>
2262
2263         * unittests/common-utils-selftests.c (format): New function.
2264         (string_vprintf_tests): New function.
2265         (_initialize_common_utils_selftests): Register new tests.
2266         * common/common-utils.c (string_vprintf): New function.
2267         * common/common-utils.h (string_vprintf): Declare.
2268
2269 2017-09-29  Pedro Alves  <palves@redhat.com>
2270
2271         * common/rsp-low.c (unpack_varlen_hex): Constify.
2272         * common/rsp-low.h (unpack_varlen_hex): Constify.
2273         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
2274         Constify.
2275         * remote.c (remote_set_permissions, read_ptid)
2276         (remote_current_thread, remote_get_threads_with_qthreadinfo)
2277         (remote_static_tracepoint_marker_at)
2278         (remote_static_tracepoint_markers_by_strid)
2279         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
2280         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
2281         (parse_tracepoint_definition, parse_tsv_definition)
2282         (parse_static_tracepoint_marker_definition): Constify.
2283         * tracepoint.h (parse_static_tracepoint_marker_definition)
2284         (parse_trace_status, parse_tracepoint_status)
2285         (parse_tracepoint_definition, parse_tsv_definition): Constify.
2286
2287 2017-09-29  Pedro Alves  <palves@redhat.com>
2288
2289         * remote.c (target_buf, target_buf_size): Delete.
2290         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
2291         Use the connection's packet buffer instead.
2292         All callers adjusted.
2293         (_initialize_remote): Remove references to target_buf and
2294         target_buf_size.
2295
2296 2017-09-28  Pedro Alves  <palves@redhat.com>
2297
2298         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2299         unittests/common-utils-selftests.c.
2300         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
2301         (COMMON_OBS): Remove utils-selftests.o.
2302         * utils-selftests.c: Move to ...
2303         * unittests/common-utils-selftests.c: ... here and rename self
2304         test to "string_printf".
2305
2306 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
2307
2308         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
2309         having NULL cus or tus.
2310
2311 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2312
2313         * arm-tdep.c: (convert_from_extended): Remove.
2314         (convert_to_extended): Likewise.
2315         (arm_extract_return_value): Use convert_typed_floating.
2316         (arm_store_return_value): Likewise.
2317
2318         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2319         * sh-tdep.c: Do not include "floatformat.h".
2320         (sh_littlebyte_bigword_type): New function.
2321         (sh_register_convert_to_virtual): Use convert_typed_floating.
2322         (sh_register_convert_to_raw): Likewise.
2323         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2324         (sh64_littlebyte_bigword_type): New function.
2325         (sh64_extract_return_value): Use convert_typed_floating.
2326         (sh64_register_convert_to_virtual): Likewise.
2327         (sh64_register_convert_to_raw): Likewise.
2328
2329 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2330
2331         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
2332         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
2333
2334         * gdbtypes.h (union type_specific): Make field floatformat hold
2335         just a single struct floatformat, not an array.
2336         (floatformat_from_type): Move here.
2337         * gdbtypes.c (floatformat_from_type): Move here.  Update to
2338         changed TYPE_FLOATFORMAT definition.
2339         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
2340         (recursive_dump_type): Likewise.
2341         (init_float_type): Install correct floatformat for byte order.
2342         (arch_float_type): Likewise.
2343
2344 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2345
2346         * gdbtypes.c (init_type): Change incoming argument from
2347         length-in-bytes to length-in-bits.  Assert length is a
2348         multiple of TARGET_CHAR_BITS.
2349         (arch_type, arch_flags_type): Likewise.
2350         (init_integer_type): Update call to init_type.
2351         (init_character_type): Likewise.
2352         (init_boolean_type): Likewise.
2353         (init_float_type): Likewise.
2354         (init_decfloat_type): Likewise.
2355         (init_complex_type): Likewise.
2356         (init_pointer_type): Likewise.
2357         (objfile_type): Likewise.
2358         (arch_integer_type): Update call to arch_type.
2359         (arch_character_type): Likewise.
2360         (arch_boolean_type): Likewise.
2361         (arch_float_type): Likewise.
2362         (arch_decfloat_type): Likewise.
2363         (arch_complex_type): Likewise.
2364         (arch_pointer_type): Likewise.
2365         (gdbtypes_post_init): Likewise.
2366
2367         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
2368         (read_base_type): Likewise.
2369         * mdebugread.c (basic_type): Likewise.
2370         * stabsread.c (dbx_init_float_type): Likewise.
2371         (rs6000_builtin_type): Likewise.
2372         (read_range_type): Likewise.  Also, fix call to init_integer_type
2373         with erroneous length argument.
2374
2375         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
2376         * d-lang.c (build_d_types): Likewise.
2377         * f-lang.c (build_fortran_types): Likewise.
2378         * go-lang.c (build_go_types): Likewise.
2379         * opencl-lang.c (build_opencl_types): Likewise.
2380         * jit.c (finalize_symtab): Likewise.
2381         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2382         (build_std_type_info_type): Likewise.
2383         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
2384         update call to arch_flags_type.
2385
2386         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
2387         arch_type.
2388         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
2389         * windows-tdep.c (windows_get_tlb_type): Likewise.
2390
2391         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
2392         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
2393         * m32c-tdep.c (make_types): Likewise.
2394         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
2395         (rl78_psw_type): Update call to arch_flags_type.
2396         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
2397         * rx-tdep.c (rx_psw_type): Likewise.
2398         (rx_fpsw_type): Likewise.
2399         * sparc-tdep.c (sparc_psr_type): Likewise.
2400         (sparc_fsr_type): Likewise.
2401         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
2402         (sparc64_ccr_type): Likewise.
2403         (sparc64_fsr_type): Likewise.
2404         (sparc64_fprs_type): Likewise.
2405
2406 2017-09-27  Tom Tromey  <tom@tromey.com>
2407
2408         * findcmd.c (find_command): Constify.
2409
2410 2017-09-27  Tom Tromey  <tom@tromey.com>
2411
2412         * ada-tasks.c (task_command_1, task_command): Constify.
2413
2414 2017-09-27  Tom Tromey  <tom@tromey.com>
2415
2416         * symtab.c (maintenance_print_symbol_cache)
2417         (maintenance_flush_symbol_cache)
2418         (maintenance_print_symbol_cache_statistics): Constify.
2419
2420 2017-09-27  Tom Tromey  <tom@tromey.com>
2421
2422         * inferior.c (detach_inferior_command, kill_inferior_command)
2423         (inferior_command): Constify.
2424
2425 2017-09-27  Tom Tromey  <tom@tromey.com>
2426
2427         * regcache.c (regcache_print, maintenance_print_registers)
2428         (maintenance_print_raw_registers)
2429         (maintenance_print_cooked_registers)
2430         (maintenance_print_register_groups)
2431         (maintenance_print_remote_registers): Constify.
2432
2433 2017-09-27  Tom Tromey  <tom@tromey.com>
2434
2435         * printcmd.c (map_display_numbers, undisplay_command)
2436         (enable_disable_display_command, enable_display_command)
2437         (disable_display_command): Constify.
2438
2439 2017-09-27  Tom Tromey  <tom@tromey.com>
2440
2441         * breakpoint.h (delete_command): Don't declare.
2442         * breakpoint.c (delete_command, enable_once_command)
2443         (enable_count_command, enable_delete_command, breakpoint_1)
2444         (maintenance_info_breakpoints, stopin_command, stopat_command)
2445         (delete_command, delete_trace_command, save_breakpoints)
2446         (save_breakpoints_command, save_tracepoints_command): Constify.
2447
2448 2017-09-27  Tom Tromey  <tom@tromey.com>
2449
2450         * macrocmd.c (macro_expand_command, macro_expand_once_command)
2451         (skip_ws, extract_identifier, macro_define_command)
2452         (macro_undef_command, macro_list_command): Constify.
2453
2454 2017-09-27  Tom Tromey  <tom@tromey.com>
2455
2456         * infcmd.c (environment_info, set_environment_command)
2457         (unset_environment_command, path_info, info_proc_cmd_1)
2458         (info_proc_cmd_mappings, info_proc_cmd_stat)
2459         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
2460         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
2461
2462 2017-09-27  Tom Tromey  <tom@tromey.com>
2463
2464         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
2465         Constify.
2466
2467 2017-09-27  Tom Tromey  <tom@tromey.com>
2468
2469         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
2470
2471 2017-09-27  Tom Tromey  <tom@tromey.com>
2472
2473         * demangle.c (demangle_command): Constify.
2474
2475 2017-09-27  Tom Tromey  <tom@tromey.com>
2476
2477         * progspace.c (maintenance_info_program_spaces_command):
2478         Constify.
2479
2480 2017-09-27  Tom Tromey  <tom@tromey.com>
2481
2482         * compile/compile.c (check_raw_argument, compile_file_command)
2483         (compile_code_command, compile_print_command): Constify.
2484
2485 2017-09-27  Tom Tromey  <tom@tromey.com>
2486
2487         * reggroups.c (maintenance_print_reggroups): Constify.
2488
2489 2017-09-27  Tom Tromey  <tom@tromey.com>
2490
2491         * dwarf2read.c (save_gdb_index_command): Constify.
2492
2493 2017-09-27  Tom Tromey  <tom@tromey.com>
2494
2495         * stap-probe.c (info_probes_stap_command): Constify.
2496
2497 2017-09-27  Tom Tromey  <tom@tromey.com>
2498
2499         * fork-child.c (unset_exec_wrapper_command): Constify.
2500
2501 2017-09-27  Tom Tromey  <tom@tromey.com>
2502
2503         * btrace.c (get_uint, get_context_size, no_chunk)
2504         (maint_btrace_packet_history_cmd)
2505         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
2506         (maint_info_btrace_cmd): Constify.
2507
2508 2017-09-27  Tom Tromey  <tom@tromey.com>
2509
2510         * reverse.c (delete_bookmark_command): Constify.
2511
2512 2017-09-27  Tom Tromey  <tom@tromey.com>
2513
2514         * remote.c (set_memory_packet_size)
2515         (set_memory_write_packet_size, show_memory_write_packet_size)
2516         (set_memory_read_packet_size, show_memory_read_packet_size)
2517         (compare_sections_command, packet_command, remote_put_command)
2518         (remote_get_command, remote_delete_command): Constify.
2519
2520 2017-09-27  Tom Tromey  <tom@tromey.com>
2521
2522         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
2523         (set_mipsfpu_double_command, set_mipsfpu_none_command)
2524         (set_mipsfpu_auto_command): Constify.
2525
2526 2017-09-27  Tom Tromey  <tom@tromey.com>
2527
2528         * cli/cli-cmds.h (cd_command): Constify.
2529         * cli/cli-cmds.c (cd_command): Constify.
2530
2531 2017-09-27  Tom Tromey  <tom@tromey.com>
2532
2533         * thread.c (thread_name_command, thread_find_command): Constify.
2534
2535 2017-09-27  Tom Tromey  <tom@tromey.com>
2536
2537         * probe.c (enable_probes_command, disable_probes_command):
2538         Constify.
2539
2540 2017-09-27  Tom Tromey  <tom@tromey.com>
2541
2542         * symfile.c (symbol_file_command): Constify.
2543         * gdbcore.h (deprecated_file_changed_hook): Constify.
2544         * exec.c (deprecated_file_changed_hook, exec_file_command)
2545         (file_command): Constify.
2546         * defs.h (symbol_file_command): Constify.
2547
2548 2017-09-27  Tom Tromey  <tom@tromey.com>
2549
2550         * remote-fileio.c (set_system_call_allowed)
2551         (show_system_call_allowed): Constify.
2552
2553 2017-09-27  Tom Tromey  <tom@tromey.com>
2554
2555         * tracepoint.c (delete_trace_variable_command)
2556         (tfind_end_command, tfind_start_command, tfind_pc_command)
2557         (tfind_tracepoint_command, tfind_line_command)
2558         (tfind_range_command, tfind_outside_command): Constify.
2559
2560 2017-09-27  Tom Tromey  <tom@tromey.com>
2561
2562         * ax-gdb.c (maint_agent_printf_command, agent_command)
2563         (agent_eval_command): Constify.
2564
2565 2017-09-27  Tom Tromey  <tom@tromey.com>
2566
2567         * tracepoint.c (info_scope_command): Constify.
2568         * python/python.c (gdbpy_decode_line): Constify.
2569         * python/py-breakpoint.c (bppy_init): Constify.
2570         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
2571         * location.h: (new_linespec_location)
2572         (string_to_event_location_basic, string_to_event_location):
2573         Constify.
2574         * location.c (new_linespec_location)
2575         (string_to_event_location_basic, string_to_event_location):
2576         Constify.
2577         * linespec.h (decode_line_with_current_source)
2578         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
2579         * linespec.c (linespec_lex_to_end)
2580         (decode_line_with_current_source)
2581         (decode_line_with_last_displayed): Constify.
2582         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
2583         Constify.
2584         * cli/cli-cmds.c (edit_command, list_command): Constify.
2585         * breakpoint.h (until_break_command, watch_command_wrapper)
2586         (awatch_command_wrapper, rwatch_command_wrapper)
2587         (init_ada_exception_breakpoint): Constify.
2588         * breakpoint.c (break_command_1, dprintf_command)
2589         (break_range_command, watch_command_wrapper)
2590         (rwatch_command_wrapper, awatch_command_wrapper)
2591         (until_break_command, init_ada_exception_breakpoint)
2592         (strace_marker_create_sals_from_location, trace_command)
2593         (ftrace_command, strace_command, struct tracepoint): Constify.
2594         * ax-gdb.c (agent_command_1): Constify.
2595         * ada-lang.c (ada_exception_sal): Constify.
2596
2597 2017-09-27  Tom Tromey  <tom@tromey.com>
2598
2599         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
2600         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
2601         (get_context_size, no_chunk, get_insn_history_modifiers)
2602         (cmd_record_insn_history, get_call_history_modifiers)
2603         (cmd_record_call_history): Constify.
2604
2605 2017-09-27  Tom Tromey  <tom@tromey.com>
2606
2607         * source.c (show_substitute_path_command)
2608         (unset_substitute_path_command, set_substitute_path_command):
2609         Constify.
2610
2611 2017-09-27  Tom Tromey  <tom@tromey.com>
2612
2613         * typeprint.c (maintenance_print_type): Constify.
2614         * maint.c (maintenance_dump_me, maintenance_demangle)
2615         (maintenance_time_display, maintenance_info_sections)
2616         (maintenance_print_statistics, maintenance_deprecate)
2617         (maintenance_undeprecate): Constify.
2618         (maintenance_do_deprecate): Constify.  Use std::string.
2619         (maintenance_selftest): Constify.
2620         * gdbtypes.h (maintenance_print_type): Constify.
2621
2622 2017-09-27  Tom Tromey  <tom@tromey.com>
2623
2624         * hppa-tdep.c (unwind_command): Constify.
2625
2626 2017-09-27  Tom Tromey  <tom@tromey.com>
2627
2628         * target-descriptions.c (unset_tdesc_filename_cmd)
2629         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
2630         Constify.
2631
2632 2017-09-27  Tom Tromey  <tom@tromey.com>
2633
2634         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
2635
2636 2017-09-27  Tom Tromey  <tom@tromey.com>
2637
2638         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
2639
2640 2017-09-27  Tom Tromey  <tom@tromey.com>
2641
2642         * tui/tui-regs.c (tui_reg_command): Constify.
2643
2644 2017-09-27  Tom Tromey  <tom@tromey.com>
2645
2646         * skip.c (skip_file_command, skip_function_command)
2647         (skip_enable_command, skip_disable_command, skip_delete_command):
2648         Constify.
2649
2650 2017-09-27  Tom Tromey  <tom@tromey.com>
2651
2652         * record-btrace.c (cmd_record_btrace_bts_start)
2653         (cmd_record_btrace_pt_start): Constify.
2654
2655 2017-09-27  Tom Tromey  <tom@tromey.com>
2656
2657         * symmisc.c (maintenance_print_symbols)
2658         (maintenance_print_msymbols, maintenance_print_objfiles)
2659         (maintenance_info_symtabs, maintenance_check_symtabs)
2660         (maintenance_expand_symtabs, maintenance_info_line_tables):
2661         Constify.
2662
2663 2017-09-27  Tom Tromey  <tom@tromey.com>
2664
2665         * top.c (new_ui_command): Constify.
2666
2667 2017-09-27  Tom Tromey  <tom@tromey.com>
2668
2669         * symfile.c (add_symbol_file_command)
2670         (remove_symbol_file_command, list_overlays_command)
2671         (map_overlay_command, unmap_overlay_command)
2672         (overlay_auto_command, overlay_manual_command)
2673         (overlay_off_command, overlay_load_command): Constify.
2674
2675 2017-09-27  Tom Tromey  <tom@tromey.com>
2676
2677         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
2678         (info_spu_mailbox_command, info_spu_dma_command)
2679         (info_spu_proxydma_command): Constify.
2680
2681 2017-09-27  Tom Tromey  <tom@tromey.com>
2682
2683         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
2684
2685 2017-09-27  Tom Tromey  <tom@tromey.com>
2686
2687         * cli/cli-script.c (user_defined_command): Constify.
2688
2689 2017-09-27  Tom Tromey  <tom@tromey.com>
2690
2691         * cli/cli-dump.c (dump_memory_command, dump_value_command)
2692         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
2693         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
2694         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
2695         (dump_binary_value, append_binary_memory, append_binary_value):
2696         Constify.
2697         (struct dump_context) <func>: Constify.
2698         (add_dump_command): Update.
2699
2700 2017-09-27  Tom Tromey  <tom@tromey.com>
2701
2702         * cli/cli-cmds.c (show_version, show_configuration)
2703         (source_command, show_user): Constify.
2704
2705 2017-09-27  Tom Tromey  <tom@tromey.com>
2706
2707         * target.c (maintenance_print_target_stack): Constify.
2708
2709 2017-09-27  Tom Tromey  <tom@tromey.com>
2710
2711         * interps.c (interpreter_exec_cmd): Constify.
2712
2713 2017-09-27  Tom Tromey  <tom@tromey.com>
2714
2715         * record-full.c (cmd_record_full_restore): Constify.
2716
2717 2017-09-27  Tom Tromey  <tom@tromey.com>
2718
2719         * memattr.c (enable_mem_command, disable_mem_command)
2720         (delete_mem_command): Constify.
2721
2722 2017-09-27  Tom Tromey  <tom@tromey.com>
2723
2724         * value.c (show_convenience): Constify.
2725
2726 2017-09-27  Tom Tromey  <tom@tromey.com>
2727
2728         * gdbcore.h (core_file_command): Update.
2729         * corefile.c (core_file_command): Constify.
2730
2731 2017-09-27  Tom Tromey  <tom@tromey.com>
2732
2733         * user-regs.c (maintenance_print_user_registers): Constify.
2734
2735 2017-09-27  Tom Tromey  <tom@tromey.com>
2736
2737         * cp-namespace.c (maintenance_cplus_namespace): Constify.
2738
2739 2017-09-27  Tom Tromey  <tom@tromey.com>
2740
2741         * cp-support.c (first_component_command): Constify.
2742
2743 2017-09-27  Tom Tromey  <tom@tromey.com>
2744
2745         * psymtab.c (maintenance_print_psymbols)
2746         (maintenance_info_psymtabs, maintenance_check_psymtabs):
2747         Constify.
2748
2749 2017-09-27  Tom Tromey  <tom@tromey.com>
2750
2751         * windows-tdep.c (display_tib): Constify.
2752
2753 2017-09-27  Tom Tromey  <tom@tromey.com>
2754
2755         * linux-fork.c (delete_checkpoint_command)
2756         (detach_checkpoint_command): Constify.
2757
2758 2017-09-27  Tom Tromey  <tom@tromey.com>
2759
2760         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
2761
2762 2017-09-27  Tom Tromey  <tom@tromey.com>
2763
2764         * arc-tdep.c (dump_arc_instruction_command): Constify.
2765
2766 2017-09-27  Tom Tromey  <tom@tromey.com>
2767
2768         * valprint.c (set_radix, show_radix): Constify.
2769
2770 2017-09-27  Tom Tromey  <tom@tromey.com>
2771
2772         * dtrace-probe.c (info_probes_dtrace_command): Constify.
2773
2774 2017-09-27  Tom Tromey  <tom@tromey.com>
2775
2776         * command.h (not_just_help_class_command): Update.
2777         * cli/cli-decode.h (not_just_help_class_command): Update.
2778         * cli/cli-decode.c (not_just_help_class_command): Constify.
2779
2780 2017-09-27  Tom Tromey  <tom@tromey.com>
2781
2782         * gdb_bfd.c (maintenance_info_bfds): Constify.
2783
2784 2017-09-27  Tom Tromey  <tom@tromey.com>
2785
2786         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
2787         overloads.
2788         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
2789         (do_const_cfunc): New function.
2790         (cmd_cfunc_eq): New overload.
2791         (cli_user_command_p): Check do_const_cfunc.
2792         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
2793         const_cfunc.
2794         * command.h (add_cmd): Add const overload and no-function
2795         overload.
2796         (set_cmd_cfunc): Add const overload.
2797         (cmd_const_cfunc_ftype): Declare.
2798         (cmd_cfunc_eq): Add const overload.
2799         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
2800         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
2801         overload.
2802
2803 2017-09-27  Tom Tromey  <tom@tromey.com>
2804
2805         * macroexp.c (get_next_token_for_substitution): New function.
2806         (substitute_args): Call it.  Check for __VA_OPT__.
2807
2808 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2809             Pedro Alves <palves@redhat.com>
2810
2811         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
2812         producer_is_icc_lt_14.
2813         (producer_is_icc_lt_14): New function.
2814         (check_producer): Add code for checking version of ICC.
2815         (producer_is_icc): Move to producer.c.
2816         (read_structure_type): Restrict ICC workaround to ICC<14.
2817         * producer.c: Include selftest.h.
2818         (producer_is_icc, producer_parsing_tests, _initialize_producer):
2819         New functions.
2820         * producer.h (producer_is_icc): New declaration.
2821
2822 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2823
2824         * Makefile.in (SFILES): Add producer.c.
2825         (COMMON_OBS): Add producer.o
2826         * amd64-tdep.c (producer.h): Add new include.
2827         * dwarf2read.c (producer.h): Add new include.
2828         * producer.c: New file.
2829         * producer.h: New file.
2830         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
2831         producer.c.
2832         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
2833         producer.h.
2834
2835 2017-09-26  Matthias Klose  <doko@ubuntu.com>
2836
2837         * configure.ac: Search ncursesw before ncurses.
2838         Check ncursesw/ncurses.h before ncurses/ncurses.h.
2839         * gdb_curses.h: Include <ncursesw/ncurses.h>
2840         * config.in, configure: Regenerate.
2841
2842 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2843
2844         PR gdb/22185
2845         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
2846         obsolete.
2847         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
2848         Remove i386sol2 support.
2849         * configure.nat <i386sol2>: Remove.
2850         <sol2-64>: Fold into ...
2851         <sol2>: ... this.
2852         Move common settings to default section.
2853         Add sol-thread.o.
2854         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
2855         x86_64-*-solaris2.1[0-9]*>: Rename to ...
2856         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
2857         <i[34567]86-*-solaris*>: Remove.
2858         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
2859
2860         * configure.ac: Remove wctype in libw check.
2861         (_MSE_INT_H): Don't define on Solaris 7-9.
2862         <solaris*>: Remove libthread_db.so.1 check.
2863         * configure: Regenerate.
2864         * config.in: Regenerate.
2865
2866         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
2867         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
2868         (gdb_ps_size_t): Remove.
2869         Use base types in users.
2870         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
2871
2872         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
2873
2874 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2875
2876         PR build/22206
2877         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
2878         (adi_is_addr_mapped): Likewise.
2879         (PSR_ICC): Don't redefine.
2880         (PSR_IMPL): Likewise.
2881
2882 2017-09-25  Tom Tromey  <tom@tromey.com>
2883
2884         * regcache.c (regcache::dump): Use string_printf.
2885
2886 2017-09-25  Tom Tromey  <tom@tromey.com>
2887
2888         * regcache.c (class regcache_invalidator): New.
2889         (struct register_to_invalidate): Remove.
2890         (make_cleanup_regcache_invalidate): Remove.
2891         (regcache::raw_write): Use regcache_invalidator.
2892
2893 2017-09-25  Tom Tromey  <tom@tromey.com>
2894
2895         * spu-tdep.c (spu2ppu_sniffer): Update.
2896         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
2897         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
2898         Remove.
2899         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
2900         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
2901         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
2902         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
2903         (frame_pop): Update.
2904
2905 2017-09-25  Tom Tromey  <tom@tromey.com>
2906
2907         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
2908         * regcache.h (regcache_xfree): Don't declare.
2909         * regcache.c (regcache_xfree): Remove.
2910         (do_regcache_xfree): Use delete.
2911         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
2912         * linux-fork.c (free_fork): Use delete.
2913         (fork_save_infrun_state): Likewise.
2914         * jit.c (jit_dealloc_cache): Use delete.
2915         * infrun.c (discard_infcall_suspend_state): Use delete.
2916
2917 2017-09-25  Tom Tromey  <tom@tromey.com>
2918
2919         * regcache.h (regcache_xmalloc): Don't declare.
2920         (regcache_raw_set_cached_value): Update comment.
2921         * regcache.c (regcache_xmalloc): Remove.
2922         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
2923         * jit.c (jit_frame_sniffer): Use new.
2924         * frame.c (frame_save_as_regcache): Use new.
2925
2926 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2927
2928         * NEWS: Advertise support for guarded-storage registers on IBM z.
2929
2930 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2931
2932         * s390-linux-nat.c (have_regset_gs): New static variable.
2933         (s390_linux_fetch_inferior_registers): Handle guarded-storage
2934         control block and guarded-storage broadcast control regsets.
2935         (s390_read_description): Detect whether the target has
2936         guarded-storage support, return appropriate tdesc.
2937         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
2938         (features/s390x-gs-linux64.c): Likewise.
2939         (struct gdbarch_tdep) <have_gs>: New field.
2940         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
2941         (s390_gsbc_regset): New variables.
2942         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
2943         and s390_gsbc_regset, if applicable.
2944         (s390_core_read_description): Check whether core file was from a
2945         target with guarded-storage support; include appropriate regsets.
2946         (s390_gdbarch_init): Add registers for guarded-storage support.
2947         (_initialize_s390_tdep): Initialize new target descriptions that
2948         include registers for guarded-storage support.
2949         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
2950         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
2951         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
2952         (S390_NUM_REGS): Adjust macro definition.
2953         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
2954         (tdesc_s390x_gs_linux64): New declarations.
2955
2956 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2957
2958         * features/s390-gs-linux64.xml: New file.
2959         * features/s390-gs.xml: New file.
2960         * features/s390-gsbc.xml: New file.
2961         * features/s390x-gs-linux64.xml: New file.
2962         * features/Makefile (WHICH): Add s390-gs-linux64 and
2963         s390x-gs-linux64.
2964         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
2965         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
2966         * features/s390-gs-linux64.c: New generated file.
2967         * features/s390x-gs-linux64.c: New file.
2968         * regformats/s390-gs-linux64.dat: New file.
2969         * regformats/s390x-gs-linux64.dat: New file.
2970
2971 2017-09-23  Tom Tromey  <tom@tromey.com>
2972
2973         * defs.h (make_cleanup_override_quit_handler): Don't declare.
2974
2975 2017-09-22  Tom Tromey  <tom@tromey.com>
2976
2977         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
2978         type to scoped_restore_tmpl.
2979         <scoped_input_handler>: Initialize m_quit_handler directly.
2980
2981 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
2982
2983         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
2984         (cd_command): Likewise.  Free "current_directory" before
2985         assigning to it.
2986         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
2987         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
2988         * top.c (gdb_dirbuf): Remove global declaration.
2989         * top.h (gdb_dirbuf): Likewise.
2990
2991 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
2992
2993         * gnulib/aclocal.m4: Regenerate.
2994         * gnulib/config.in: Regenerate.
2995         * gnulib/configure: Regenerate.
2996         * gnulib/import/Makefile.am: Regenerate.
2997         * gnulib/import/Makefile.in: Regenerate.
2998         * gnulib/import/assure.h: New file.
2999         * gnulib/import/at-func.c: Likewise
3000         * gnulib/import/chdir-long.c: New file.
3001         * gnulib/import/chdir-long.h: New file.
3002         * gnulib/import/cloexec.c: New file.
3003         * gnulib/import/cloexec.h: New file.
3004         * gnulib/import/close.c: New file.
3005         * gnulib/import/closedir.c: New file.
3006         * gnulib/import/dirent-private.h: New file.
3007         * gnulib/import/dup-safer.c: New file.
3008         * gnulib/import/dup.c: New file.
3009         * gnulib/import/dup2.c: New file.
3010         * gnulib/import/error.c: New file.
3011         * gnulib/import/error.h: New file.
3012         * gnulib/import/exitfail.c: New file.
3013         * gnulib/import/exitfail.h: New file.
3014         * gnulib/import/fchdir.c: New file.
3015         * gnulib/import/fcntl.c: New file.
3016         * gnulib/import/fcntl.in.h: New file.
3017         * gnulib/import/fd-hook.c: New file.
3018         * gnulib/import/fd-hook.h: New file.
3019         * gnulib/import/fd-safer.c: New file.
3020         * gnulib/import/fdopendir.c: New file.
3021         * gnulib/import/filename.h: New file.
3022         * gnulib/import/filenamecat-lgpl.c: New file.
3023         * gnulib/import/filenamecat.h: New file.
3024         * gnulib/import/fstat.c: New file.
3025         * gnulib/import/fstatat.c: New file.
3026         * gnulib/import/getcwd-lgpl.c: New file.
3027         * gnulib/import/getcwd.c: New file.
3028         * gnulib/import/getdtablesize.c: New file.
3029         * gnulib/import/getlogin_r.c: New file.
3030         * gnulib/import/getprogname.c: New file.
3031         * gnulib/import/getprogname.h: New file.
3032         * gnulib/import/gettext.h: New file.
3033         * gnulib/import/glob-libc.h: New file.
3034         * gnulib/import/glob.c: New file.
3035         * gnulib/import/glob.in.h: New file.
3036         * gnulib/import/intprops.h: New file.
3037         * gnulib/import/m4/chdir-long.m4: New file.
3038         * gnulib/import/m4/close.m4: New file.
3039         * gnulib/import/m4/closedir.m4: New file.
3040         * gnulib/import/m4/d-ino.m4: New file.
3041         * gnulib/import/m4/d-type.m4: New file.
3042         * gnulib/import/m4/dup.m4: New file.
3043         * gnulib/import/m4/dup2.m4: New file.
3044         * gnulib/import/m4/error.m4: New file.
3045         * gnulib/import/m4/fchdir.m4: New file.
3046         * gnulib/import/m4/fcntl.m4: New file.
3047         * gnulib/import/m4/fcntl_h.m4: New file.
3048         * gnulib/import/m4/fdopendir.m4: New file.
3049         * gnulib/import/m4/filenamecat.m4: New file.
3050         * gnulib/import/m4/fstat.m4: New file.
3051         * gnulib/import/m4/fstatat.m4: New file.
3052         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
3053         * gnulib/import/m4/getcwd-path-max.m4: New file.
3054         * gnulib/import/m4/getcwd.m4: New file.
3055         * gnulib/import/m4/getdtablesize.m4: New file.
3056         * gnulib/import/m4/getlogin_r.m4: New file.
3057         * gnulib/import/m4/getprogname.m4: New file.
3058         * gnulib/import/m4/glob.m4: New file.
3059         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
3060         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
3061         * gnulib/import/m4/mempcpy.m4: New file.
3062         * gnulib/import/m4/memrchr.m4: New file.
3063         * gnulib/import/m4/mode_t.m4: New file.
3064         * gnulib/import/m4/msvc-inval.m4: New file.
3065         * gnulib/import/m4/msvc-nothrow.m4: New file.
3066         * gnulib/import/m4/open.m4: New file.
3067         * gnulib/import/m4/openat.m4: New file.
3068         * gnulib/import/m4/opendir.m4: New file.
3069         * gnulib/import/m4/readdir.m4: New file.
3070         * gnulib/import/m4/realloc.m4: New file.
3071         * gnulib/import/m4/rewinddir.m4: New file.
3072         * gnulib/import/m4/save-cwd.m4: New file.
3073         * gnulib/import/m4/strdup.m4: New file.
3074         * gnulib/import/m4/strerror.m4: New file.
3075         * gnulib/import/m4/unistd-safer.m4: New file.
3076         * gnulib/import/mempcpy.c: New file.
3077         * gnulib/import/memrchr.c: New file.
3078         * gnulib/import/msvc-inval.c: New file.
3079         * gnulib/import/msvc-inval.h: New file.
3080         * gnulib/import/msvc-nothrow.c: New file.
3081         * gnulib/import/msvc-nothrow.h: New file.
3082         * gnulib/import/open.c: New file.
3083         * gnulib/import/openat-die.c: New file.
3084         * gnulib/import/openat-priv.h: New file.
3085         * gnulib/import/openat-proc.c: New file.
3086         * gnulib/import/openat.c: New file.
3087         * gnulib/import/openat.h: New file.
3088         * gnulib/import/opendir.c: New file.
3089         * gnulib/import/pipe-safer.c: New file.
3090         * gnulib/import/readdir.c: New file.
3091         * gnulib/import/realloc.c: New file.
3092         * gnulib/import/rewinddir.c: New file.
3093         * gnulib/import/save-cwd.c: New file.
3094         * gnulib/import/save-cwd.h: New file.
3095         * gnulib/import/strdup.c: New file.
3096         * gnulib/import/strerror-override.c: New file.
3097         * gnulib/import/strerror-override.h: New file.
3098         * gnulib/import/strerror.c: New file.
3099         * gnulib/import/unistd--.h: New file.
3100         * gnulib/import/unistd-safer.h: New file.
3101         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
3102         "getcwd" and "glob".
3103         * ser-tcp.c: Undefine "close" before redefining it.
3104
3105 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3106
3107         * guile/scm-value.c (gdbscm_value_address): Initialize address,
3108         get rid of res_val.
3109
3110 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3111
3112         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
3113         <sol2,sparc>: Likewise.
3114         <sol2-64,i386>: Likewise.
3115
3116         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
3117         -Wdeprecated-declarations on *-*-solaris*.
3118         * configure: Regenerate.
3119
3120         * procfs.c: Include "nat/inferior.h".
3121         (procfs_info_proc): Fix typo.
3122
3123 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3124
3125         * remote.c (vector): Include.
3126         (struct private_thread_info): Add field, thread_handle.
3127         (free_private_thread_info): Deallocate storage associated with
3128         thread handle.
3129         (get_private_info_thread): Initialize `thread_handle' field.
3130         (struct thread_item): Add field, thread_handle.
3131         (clear_threads_listing_context): Deallocate storage associated
3132         with thread handle.
3133         (start_thread): Add support for "handle" attribute.
3134         (thread_attributes): Add "handle".
3135         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
3136         field.
3137         (remote_update_thread_list): Update thread_handle.
3138         (remote_thread_handle_to_thread_info): New function.
3139         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
3140
3141 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3142
3143         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
3144         function.
3145         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
3146         * python/python-internal.h (thread_object_type): Declare.
3147
3148 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3149
3150         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
3151         (target_thread_handle_to_thread_info): Declare.
3152         * target.c (target_thread_handle_to_thread_info): New function.
3153         * target-delegates.c: Regenerate.
3154         * gdbthread.h (find_thread_by_handle): Declare.
3155         * thread.c (find_thread_by_handle): New function.
3156         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
3157         function.
3158         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
3159
3160 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3161
3162         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
3163
3164 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3165
3166         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
3167
3168 2017-09-21  Yao Qi  <yao.qi@linaro.org>
3169
3170         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
3171         to gdb_target_obs.
3172
3173 2017-09-20  Tom Tromey  <tom@tromey.com>
3174
3175         * breakpoint.c (struct counted_command_line): Remove.
3176         (breakpoint_commands): Update.
3177         (alloc_counted_command_line, incref_counted_command_line)
3178         (decref_counted_command_line, do_cleanup_counted_command_line)
3179         (make_cleanup_decref_counted_command_line): Remove.
3180         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
3181         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
3182         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
3183         (save_breakpoints): Update.
3184         * breakpoint.h (counted_command_line): Now a typedef to
3185         shared_ptr.
3186         (struct breakpoint) <commands>: Now a counted_command_line.
3187         (struct bpstats) <command>: Likewise.
3188
3189 2017-09-20  Tom Tromey  <tom@tromey.com>
3190
3191         * breakpoint.c (struct commands_info, do_map_commands_command):
3192         Remove.
3193         (commands_command_1): Update.
3194         (iterate_over_related_breakpoints): Take a function_view.
3195         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
3196         (delete_command): Update.
3197         (map_breakpoint_numbers): Take a function_view.
3198         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
3199         (disable_command): Update.
3200         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
3201         (enable_command): Update.
3202         (struct disp_data, do_enable_breakpoint_disp)
3203         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
3204         (do_map_enable_delete_breakpoint): Remove.
3205         (enable_once_command, enable_count_command, enable_delete_command)
3206         (delete_trace_variable_command): Update.
3207
3208 2017-09-20  Tom Tromey  <tom@tromey.com>
3209
3210         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
3211         (bpstat_clear): Use delete.
3212         (bpstats): New constructors.
3213         (bpstat_copy, bpstat_stop_status): Use new.
3214         (dprintf_after_condition_true): Update.
3215         * breakpoint.h (bpstats::bpstats): Add constructors.
3216         (bpstats::~bpstats): Add destructor.
3217
3218 2017-09-20  Pedro Alves  <palves@redhat.com>
3219
3220         * eval.c (make_params): Delete, refactored as ...
3221         (class fake_method): ... this new type's ctor.
3222         (fake_method::~fake_method): New.
3223         (evaluate_subexp_standard): Use 'fake_method'.
3224
3225 2017-09-20  Tom Tromey  <tom@tromey.com>
3226
3227         * windows-nat.c (get_windows_debug_event, windows_wait)
3228         (do_initial_windows_stuff, windows_attach): Update.
3229         * utils.c (vwarning, internal_vproblem): Update.
3230         (ui_unregister_input_event_handler_cleanup)
3231         (prepare_to_handle_input): Remove.
3232         (class scoped_input_handler): New.
3233         (defaulted_query, prompt_for_continue): Update.
3234         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
3235         Update.
3236         * top.c (undo_terminal_modifications_before_exit): Update.
3237         * target/target.h (target_terminal_init, target_terminal_inferior)
3238         (target_terminal_ours): Don't declare.
3239         (class target_terminal): New.
3240         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
3241         (target_terminal_ours_for_output)
3242         (make_cleanup_restore_target_terminal): Don't declare.
3243         (target_terminal_info): Remove.
3244         * target.c (enum terminal_state, terminal_state): Remove.
3245         (target_terminal::terminal_state): Define.
3246         (target_terminal::init): Rename from target_terminal_init.
3247         (target_terminal::inferior): Rename from
3248         target_terminal_inferior.
3249         (target_terminal::ours): Rename from target_terminal_ours.
3250         (target_terminal::ours_for_output): Rename from
3251         target_terminal_ours_for_output.
3252         (target_terminal::info): New method.
3253         (cleanup_restore_target_terminal)
3254         (make_cleanup_restore_target_terminal): Remove.
3255         * solib.c (handle_solib_event): Update.
3256         * remote.c (remote_serial_quit_handler): Update.
3257         (remote_terminal_inferior, remote_wait_as): Update.
3258         * record-full.c (record_full_wait_1): Update.
3259         * nto-procfs.c (procfs_create_inferior): Update.
3260         * nat/fork-inferior.c (startup_inferior): Update.
3261         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
3262         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
3263         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
3264         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
3265         (mi_breakpoint_created, mi_breakpoint_deleted)
3266         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
3267         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3268         (mi_user_selected_context_changed, report_initial_inferior):
3269         Update.
3270         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
3271         (linux_nat_terminal_inferior): Update.
3272         * infrun.c (follow_fork_inferior)
3273         (handle_vfork_child_exec_or_exit, do_target_resume)
3274         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
3275         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
3276         Update.
3277         * inflow.c (child_terminal_init, info_terminal_command): Update.
3278         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
3279         (attach_command): Update.
3280         * infcall.c (call_thread_fsm_should_stop): Update.
3281         * gnu-nat.c (gnu_attach): Update.
3282         * extension.c (struct active_ext_lang_state)
3283         (restore_active_ext_lang): Update.
3284         * exceptions.c (print_flush): Update.
3285         * event-top.c (async_enable_stdin, default_quit_handler): Update.
3286         (struct quit_handler_cleanup_data, restore_quit_handler)
3287         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
3288         Remove.
3289         * cp-support.c (gdb_demangle): Update.
3290         * breakpoint.c (update_inserted_breakpoint_locations)
3291         (insert_breakpoint_locations, handle_jit_event)
3292         (disable_breakpoints_in_unloaded_shlib): Update.
3293         * annotate.c (annotate_breakpoints_invalid)
3294         (annotate_frames_invalid): Update.
3295
3296 2017-09-20  Tom Tromey  <tom@tromey.com>
3297
3298         * main.c (catch_command_errors): Rename from
3299         catch_command_errors_const.
3300         (captured_main_1): Update.
3301
3302 2017-09-20  Pedro Alves  <palves@redhat.com>
3303
3304         * cli/cli-cmds.c (list_command): Use print_sal_location.
3305         (print_sal_location): New function.
3306         (ambiguous_line_spec): Use print_sal_location.
3307         * linespec.c (symbol_to_sal): Record the symbol in the sal.
3308         * symtab.c (find_function_start_sal): Likewise.
3309         * symtab.h (symtab_and_line::symbol): New field.
3310
3311 2017-09-20  Pedro Alves  <palves@redhat.com>
3312
3313         * linespec.c (minsym_found): Handle non-text minsyms.
3314         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
3315
3316 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3317
3318         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
3319         backslash.
3320
3321 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3322
3323         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
3324         vmovups instead vmovaps.
3325         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
3326
3327 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
3328
3329         * NEWS (Changes since GDB 8.0): Add starti.
3330         * infcmd.c (enum run_break): New.
3331         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
3332         case.
3333         (run_command): Use enum run_how.
3334         (start_command): Likewise.
3335         (starti_command): New function.
3336         (RUN_ARGS_HELP): New macro.
3337         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
3338         commands.  Add starti command.
3339
3340 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3341
3342         * Makefile.in (monitor.o): Remove the rule.
3343
3344 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3345
3346         * annotate.h (struct annotate_arg_emitter): Use
3347         DISABLE_COPY_AND_ASSIGN.
3348         * common/refcounted-object.h (refcounted_object): Likewise.
3349         * completer.h (struct completion_result): Likewise.
3350         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
3351         * filename-seen-cache.h (filename_seen_cache): Likewise.
3352         * gdbcore.h (thread_section_name): Likewise.
3353         * gdb_regex.h (compiled_regex): Likewise.
3354         * gdbthread.h (scoped_restore_current_thread): Likewise.
3355         * inferior.h (scoped_restore_current_inferior): Likewise.
3356         * jit.c (jit_reader): Likewise.
3357         * linespec.h (struct linespec_result): Likewise.
3358         * mi/mi-parse.h (struct mi_parse): Likewise.
3359         * nat/fork-inferior.c (execv_argv): Likewise.
3360         * progspace.h (scoped_restore_current_program_space): Likewise.
3361         * python/python-internal.h (class gdbpy_enter): Likewise.
3362         * regcache.h (regcache): Likewise.
3363         * target-descriptions.c (struct tdesc_reg): Likewise.
3364         (struct tdesc_type): Likewise.
3365         (struct tdesc_feature): Likewise.
3366         * ui-out.h (ui_out_emit_type): Likewise.
3367
3368 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
3369
3370         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
3371         label abort_expression.
3372
3373 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3374
3375         * common/buffer.c (buffer_xml_printf): Adjust.
3376         * common/xml-utils.c (xml_escape_text): Change return type to
3377         std::string, update code accordingly.
3378         * common/xml-utils.h (xml_escape_text): Change return type to
3379         std::string.
3380         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
3381         * windows-tdep.c (windows_xfer_shared_library): Adjust.
3382         * unittests/xml-utils-selftests.c (test_xml_escape_text):
3383         Adjust.
3384
3385 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3386
3387         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
3388         (SUBDIR_UNITTESTS_OBS): Add new object file.
3389         * unittests/xml-utils-selftests.c: New file.
3390
3391 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3392
3393         * common/selftest.h (selftest): New struct/interface.
3394         (register_test): Add name parameter, add new overload.
3395         (run_tests): Add filter parameter.
3396         (for_each_selftest_ftype): New typedef.
3397         (for_each_selftest): New declaration.
3398         * common/selftest.c (tests): Change type to
3399         map<string, unique_ptr<selftest>>.
3400         (simple_selftest): New struct.
3401         (register_test): New function.
3402         (register_test): Add name parameter and use it.
3403         (run_tests): Add filter parameter and use it.  Add prints.
3404         Adjust to vector -> map change.
3405         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
3406         registering selftests.
3407         * arm-tdep.c (_initialize_arm_tdep): Likewise.
3408         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
3409         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
3410         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
3411         * findvar.c (_initialize_findvar): Likewise.
3412         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
3413         * maint.c (maintenance_selftest): Update call to run_tests.
3414         (maintenance_info_selftests): New function.
3415         (_initialize_maint_cmds): Register "maintenance info selftests"
3416         command.  Update "maintenance selftest" doc.
3417         * regcache.c (_initialize_regcache): Add names when registering
3418         selftests.
3419         * rust-exp.y (_initialize_rust_exp): Likewise.
3420         * selftest-arch.c (gdbarch_selftest): New struct.
3421         (gdbarch_tests): Remove.
3422         (register_test_foreach_arch): Add name parameter.  Call
3423         register_test.
3424         (tests_with_arch): Remove, move most content to
3425         gdbarch_selftest::operator().
3426         (_initialize_selftests_foreach_arch): Remove.
3427         * selftest-arch.h (register_test_foreach_arch): Add name
3428         parameter.
3429         (run_tests_with_arch): New declaration.
3430         * utils-selftests.c (_initialize_utils_selftests): Add names
3431         when registering selftests.
3432         * utils.c (_initialize_utils): Likewise.
3433         * unittests/array-view-selftests.c
3434         (_initialize_array_view_selftests): Likewise.
3435         * unittests/environ-selftests.c (_initialize_environ_selftests):
3436         Likewise.
3437         * unittests/function-view-selftests.c
3438         (_initialize_function_view_selftests): Likewise.
3439         * unittests/offset-type-selftests.c
3440         (_initialize_offset_type_selftests): Likewise.
3441         * unittests/optional-selftests.c
3442         (_initialize_optional_selftests): Likewise.
3443         * unittests/scoped_restore-selftests.c
3444         (_initialize_scoped_restore_selftests): Likewise.
3445         * NEWS: Document "maintenance selftest" and "maint info
3446         selftests".
3447
3448 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3449
3450         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
3451         scoped_restore.
3452
3453 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3454
3455         * mi/mi-main.c (mi_load_progress): Make uiout variable
3456         a unique_ptr.
3457
3458 2017-09-15  Pedro Alves  <palves@redhat.com>
3459
3460         * compile/compile-c-types.c (convert_enum, convert_int)
3461         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
3462
3463 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
3464
3465         * dwarf2read.c (copy_string): Remove.
3466         (parse_macro_definition): Replace copy_string with savestring.
3467
3468 2017-09-15  Yao Qi  <yao.qi@linaro.org>
3469
3470         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
3471         gdb_target_obs.
3472         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
3473         Likewise.
3474         (i[34567]86-*-linux*): Likewise.
3475
3476 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3477
3478         * dwarf2expr.h (dwarf_stack_value): Add constructor.
3479         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
3480         <stack>: Change type to std::vector.
3481         <stack_len, stack_allocated>: Remove.
3482         <grow_stack>: Remove.
3483         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3484         (dwarf_expr_context::~dwarf_expr_context): Remove.
3485         (dwarf_expr_context::grow_stack): Remove.
3486         (dwarf_expr_context::push): Adjust.
3487         (dwarf_expr_context::pop): Adjust.
3488         (dwarf_expr_context::fetch): Adjust.
3489         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
3490         (dwarf_expr_context::stack_empty_p): Adjust.
3491         (dwarf_expr_context::execute_stack_op): Adjust.
3492
3493 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3494
3495         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
3496         return type to bool.
3497         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
3498
3499 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3500
3501         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
3502         Change type to bool.
3503         (dwarf_stack_value) <in_stack_memory>: Likewise.
3504         (dwarf_expr_context) <push_address>: Change parameter type to
3505         bool.
3506         <fetch_in_stack_memory>: Change return type to bool.
3507         <push>: Change parameter type to bool.
3508         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
3509         to bool.
3510         (dwarf_expr_context::push_address): Likewise.
3511         (dwarf_expr_context::fetch_in_stack_memory): Change return type
3512         to bool.
3513         (dwarf_expr_context::execute_stack_op): Adjust.
3514         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
3515
3516 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3517
3518         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
3519         (struct dwarf_expr_context) <n_pieces>: Remove.
3520         <pieces>: Change type to std::vector.
3521         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3522         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
3523         pieces.
3524         (dwarf_expr_context::add_piece): Adjust.
3525         * dwarf2loc.c (struct piece_closure): Initialize fields.
3526         <n_pieces>: Remove.
3527         <pieces>: Change type to std::vector.
3528         (allocate_piece_closure): Adjust, change parameter to
3529         std::vector rvalue and std::move it to piece_closure.
3530         (rw_pieced_value): Adjust.
3531         (check_pieced_synthetic_pointer): Adjust.
3532         (indirect_synthetic_pointer): Adjust.
3533         (coerce_pieced_ref): Adjust.
3534         (free_pieced_value_closure):  Adjust.  Use delete to free
3535         piece_closure.
3536         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
3537         to allocate_piece_closure.
3538         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
3539
3540 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3541
3542         * probe.h (probe_ops_cp): Remove typedef.
3543         (DEF_VEC_P (probe_ops_cp)): Remove.
3544         (all_probe_ops): Change type to std::vector.
3545         * probe.c (info_probes_for_ops): Adjust to vector change.
3546         (probe_linespec_to_ops): Likewise.
3547         (all_probe_ops): Change type to std::vector.
3548         (_initialize_probe): Adjust to vector change.
3549         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
3550         * elfread.c (elf_get_probes): Likewise.
3551         * stap-probe.c (_initialize_stap_probe): Likewise.
3552
3553 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3554
3555         * probe.h (struct bound_probe): Define constructors.
3556         * probe.c (bound_probe_s): Remove typedef.
3557         (DEF_VEC_O (bound_probe_s)): Remove VEC.
3558         (collect_probes): Change return type to std::vector, remove
3559         cleanup.
3560         (compare_probes): Return bool, change parameter type.  Change
3561         semantic to "less than".
3562         (gen_ui_out_table_header_info): Change parameter to std::vector
3563         and update.
3564         (exists_probe_with_pops): Likewise.
3565         (info_probes_for_ops): Update to std::vector change.
3566         (enable_probes_command): Likewise.
3567         (disable_probes_command): Likewise.
3568
3569 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3570
3571         * probe.h (struct probe_ops) <get_probes>: Change parameter from
3572         vec to std::vector.
3573         * probe.c (parse_probes_in_pspace): Update.
3574         (find_probes_in_objfile): Update.
3575         (find_probe_by_pc): Update.
3576         (collect_probes): Update.
3577         (probe_any_get_probes): Update.
3578         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
3579         return type to reference to std::vector.
3580         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
3581         std::vector and update.
3582         (dtrace_process_dof): Likewise.
3583         (dtrace_get_probes): Likewise.
3584         * elfread.c (elf_get_probes): Change return type to std::vector,
3585         store an std::vector in bfd_data.
3586         (probe_key_free): Update to std::vector.
3587         * stap-probe.c (handle_stap_probe): Change parameter to
3588         std::vector and update.
3589         (stap_get_probes): Likewise.
3590         * symfile-debug.c (debug_sym_get_probes): Change return type to
3591         std::vector and update.
3592
3593 2017-09-11  Tom Tromey  <tom@tromey.com>
3594
3595         * breakpoint.c (program_breakpoint_here_p): Update.
3596         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
3597         from make_show_memory_breakpoints_cleanup.  Return a
3598         scoped_restore_tmpl<int>.
3599         (restore_show_memory_breakpoints): Remove.
3600         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
3601         * mem-break.c (memory_validate_breakpoint): Update.
3602         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
3603         (ia64_memory_remove_breakpoint): Update.
3604         (ia64_breakpoint_from_pc): Update.
3605         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
3606         from make_show_memory_breakpoints_cleanup.
3607
3608 2017-09-11  Tom Tromey  <tom@tromey.com>
3609
3610         * d-namespace.c (d_lookup_symbol): Use std::string.
3611         (find_symbol_in_baseclass): Likewise.
3612
3613 2017-09-11  Tom Tromey  <tom@tromey.com>
3614
3615         * ctf.c (ctf_start): Use std::string.
3616
3617 2017-09-11  Tom Tromey  <tom@tromey.com>
3618
3619         * ada-lang.c (is_known_support_routine): Update.
3620         (ada_unhandled_exception_name_addr_from_raise): Update.
3621         * guile/scm-frame.c (gdbscm_frame_name): Update.
3622         * python/py-frame.c (frapy_name): Update.
3623         (frapy_function): Update.
3624         * stack.h (find_frame_funname): Update.
3625         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
3626         (print_frame): Update.
3627
3628 2017-09-11  Tom Tromey  <tom@tromey.com>
3629
3630         * findcmd.c (put_bits): Take a gdb::byte_vector.
3631         (parse_find_args): Return gdb::byte_vector.  "args" now const.
3632         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
3633         cleanups.
3634         (find_command): Update.
3635
3636 2017-09-11  Tom Tromey  <tom@tromey.com>
3637
3638         * cli/cli-script.c (class scoped_restore_hook_in): New.
3639         (clear_hook_in_cleanup): Remove.
3640         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
3641         scoped_restore_hook_in.
3642
3643 2017-09-11  Tom Tromey  <tom@tromey.com>
3644
3645         * cli/cli-script.c (restore_interp): Remove.
3646         (read_command_lines): Use scoped_restore_interp.
3647         * interps.c (scoped_restore_interp::set_temp): Rename from
3648         interp_set_temp.
3649         * interps.h (class scoped_restore_interp): New.
3650         (interp_set_temp): Remove.
3651
3652 2017-09-11  Tom Tromey  <tom@tromey.com>
3653
3654         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3655         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
3656         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
3657         scoped_restore.
3658         (mi_cmd_break_insert_1): Update.
3659         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
3660         scoped_restore.
3661
3662 2017-09-11  Tom Tromey  <tom@tromey.com>
3663
3664         * demangle.c (demangle_command): Update.
3665         * breakpoint.c (disable_command): Update.
3666         (enable_command): Update.
3667         (find_location_by_number): Make "number" const.  Use
3668         get_number_trailer.
3669         * cli/cli-utils.c (extract_arg): Return std::string.
3670         * probe.c (parse_probe_linespec): Update.  Change types.
3671         (collect_probes): Take string arguments.
3672         (parse_probe_linespec): Likewise.
3673         (info_probes_for_ops): Update.
3674         (enable_probes_command): Update.
3675         (disable_probes_command): Update.
3676         * break-catch-sig.c (catch_signal_split_args): Update.
3677         * mi/mi-parse.c (mi_parse): Update.
3678
3679 2017-09-11  Tom Tromey  <tom@tromey.com>
3680
3681         * language.h (language_enum): Make argument const.
3682         * language.c (language_enum): Make argument const.
3683
3684 2017-09-11  Tom Tromey  <tom@tromey.com>
3685
3686         * common/common-utils.h (skip_to_space): Remove macro, redeclare
3687         as function.
3688         (skip_to_space): Rename from skip_to_space_const.
3689         * common/common-utils.c (skip_to_space): New function.
3690         (skip_to_space): Rename from skip_to_space_const.
3691         * cli/cli-utils.h (get_number): Rename from get_number_const.
3692         (extract_arg): Rename from extract_arg_const.
3693         * cli/cli-utils.c (get_number): Rename from get_number_const.
3694         (extract_arg): Rename from extract_arg_const.
3695         (number_or_range_parser::get_number): Use ::get_number.
3696         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
3697         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
3698         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
3699         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
3700         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
3701         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
3702         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
3703         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
3704
3705 2017-09-11  Tom Tromey  <tom@tromey.com>
3706
3707         * python/python.c (do_start_initialization): Use
3708         py-event-types.def to initialize types.
3709         Define all object type structures.
3710         * python/python-internal.h: Don't declare event initialization
3711         functions.
3712         * python/py-threadevent.c (thread_event_object_type): Don't
3713         define.
3714         * python/py-stopevent.c (stop_event_object_type): Don't define.
3715         * python/py-signalevent.c (signal_event_object_type): Don't
3716         declare or define.
3717         * python/py-newobjfileevent.c (new_objfile_event_object_type)
3718         (clear_objfiles_event_object_type): Don't declare or define.
3719         * python/py-infevents.c (inferior_call_pre_event_object_type)
3720         (inferior_call_post_event_object_type)
3721         (register_changed_event_object_type)
3722         (memory_changed_event_object_type): Don't declare or define.
3723         * python/py-inferior.c (new_thread_event_object_type)
3724         (new_inferior_event_object_type)
3725         (inferior_deleted_event_object_type): Don't declare or define.
3726         * python/py-exitedevent.c (exited_event_object_type): Don't
3727         declare or define.
3728         * python/py-evts.c (gdbpy_initialize_py_events): Use
3729         py-all-events.def.
3730         * python/py-events.h (thread_event_object_type): Don't declare.
3731         (events_object): Use py-all-events.def.
3732         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
3733         py-event-types.def.
3734         * python/py-event-types.def: New file.
3735         * python/py-continueevent.c (create_continue_event_object): Don't
3736         declare or define.
3737         * python/py-bpevent.c (breakpoint_event_object_type): Don't
3738         declare or define.
3739         * python/py-all-events.def: New file.
3740
3741 2017-09-11  Tom Tromey  <tom@tromey.com>
3742
3743         * python/py-threadevent.c (create_thread_event_object): Return
3744         gdbpy_ref.
3745         * python/py-stopevent.h (create_stop_event_object)
3746         (create_breakpoint_event_object, create_signal_event_object):
3747         Update.
3748         * python/py-stopevent.c (create_stop_event_object): Return
3749         gdbpy_ref.
3750         (emit_stop_event): Update.
3751         * python/py-signalevent.c (create_signal_event_object): Return
3752         gdbpy_ref.
3753         * python/py-infevents.c (create_inferior_call_event_object):
3754         Update.
3755         * python/py-event.h (create_event_object)
3756         (create_thread_event_object): Update.
3757         * python/py-event.c (create_event_object): Return gdbpy_ref.
3758         * python/py-continueevent.c: Return gdbpy_ref.
3759         * python/py-bpevent.c (create_breakpoint_event_object): Return
3760         gdbpy_ref.
3761
3762 2017-09-11  Tom Tromey  <tom@tromey.com>
3763
3764         PR python/15622:
3765         * NEWS: Add entry.
3766         * python/python.c (do_start_initialization): Initialize new event
3767         types.
3768         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
3769         (gdbpy_initialize_inferior_deleted_event)
3770         (gdbpy_initialize_new_thread_event): Declare.
3771         * python/py-threadevent.c (create_thread_event_object): Add option
3772         "thread" parameter.
3773         * python/py-inferior.c (new_thread_event_object_type)
3774         (new_inferior_event_object_type)
3775         (inferior_deleted_event_object_type): Declare.
3776         (python_new_inferior, python_inferior_deleted): New functions.
3777         (add_thread_object): Emit new_thread event.
3778         (gdbpy_initialize_inferior): Attach new functions to corresponding
3779         observers.
3780         (new_thread, new_inferior, inferior_deleted): Define new event
3781         types.
3782         * python/py-evts.c (gdbpy_initialize_py_events): Add new
3783         registries.
3784         * python/py-events.h (events_object) <new_inferior,
3785         inferior_deleted, new_thread>: New fields.
3786         * python/py-event.h (create_thread_event_breakpoint): Add optional
3787         "thread" parameter.
3788
3789 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3790
3791         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
3792         check current_ui instead.
3793         (internal_vproblem): Likewise.
3794
3795 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
3796
3797         * thread.c (print_thread_info_1): Remove unnecessary calls to
3798         uiout->is_mi_like_p.
3799
3800 2017-09-09  Tom Tromey  <tom@tromey.com>
3801
3802         * namespace.h (add_using_directive): Update.
3803         * namespace.c (add_using_directive): Change type of excludes to
3804         std::vector.
3805         * dwarf2read.c (read_import_statement): Use std::vector.
3806         (read_namespace): Update.
3807         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3808
3809 2017-09-09  Tom Tromey  <tom@tromey.com>
3810
3811         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
3812
3813 2017-09-09  Tom Tromey  <tom@tromey.com>
3814
3815         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
3816
3817 2017-09-09  Tom Tromey  <tom@tromey.com>
3818
3819         * stack.c (func_command): Use gdb::def_vector.
3820
3821 2017-09-09  Tom Tromey  <tom@tromey.com>
3822
3823         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
3824         ui_out_emit_list, ui_out_emit_tuple.
3825         (mi_cmd_var_update): Likewise.
3826
3827 2017-09-09  Tom Tromey  <tom@tromey.com>
3828
3829         * mi/mi-interp.c (mi_user_selected_context_changed): Use
3830         ui_out_redirect_pop.
3831         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
3832         ui_out_redirect_pop.
3833         * utils.c (do_ui_out_redirect_pop)
3834         (make_cleanup_ui_out_redirect_pop): Remove.
3835         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
3836         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
3837         * ui-out.h (ui_out_redirect_pop): New class.
3838
3839 2017-09-09  Tom Tromey  <tom@tromey.com>
3840
3841         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
3842         (list_available_thread_groups, mi_cmd_list_thread_groups)
3843         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
3844         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
3845         Likewise.
3846
3847 2017-09-09  Tom Tromey  <tom@tromey.com>
3848
3849         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
3850         ui_out_emit_tuple.
3851
3852 2017-09-09  Tom Tromey  <tom@tromey.com>
3853
3854         * target.c (flash_erase_command): Use ui_out_emit_tuple.
3855         * stack.c (print_frame): Use ui_out_emit_tuple.
3856         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
3857         (info_spu_mailbox_command, info_spu_dma_command)
3858         (info_spu_proxydma_command): Likewise.
3859         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
3860         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
3861         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
3862         ui_out_emit_tuple.
3863         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
3864
3865 2017-09-09  Tom Tromey  <tom@tromey.com>
3866
3867         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
3868         (class ui_out_emit_table): Update comment.
3869         * ui-out.c (do_cleanup_table_end)
3870         (make_cleanup_ui_out_table_begin_end): Remove.
3871         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
3872         (info_spu_dma_cmdlist): Likewise.
3873         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
3874         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
3875         ui_out_emit_table.
3876
3877 2017-09-09  Tom Tromey  <tom@tromey.com>
3878
3879         * thread.c (print_thread_info_1): Use ui_out_emit_table,
3880         ui_out_emit_list, gdb::optional.
3881
3882 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
3883
3884         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
3885         prototype.
3886         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
3887         prototype.
3888         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
3889         prototype.
3890         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
3891         * ada-exp.y: Remove _initialize_ada_exp prototype.
3892         * ada-lang.c: Remove _initialize_ada_language prototype.
3893         * ada-tasks.c: Remove _initialize_tasks prototype.
3894         * addrmap.c: Remove _initialize_addrmap prototype.
3895         * agent.c: Remove _initialize_agent prototype.
3896         * aix-thread.c: Remove _initialize_aix_thread prototype.
3897         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
3898         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
3899         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
3900         prototype.
3901         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
3902         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
3903         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
3904         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
3905         prototype.
3906         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
3907         prototype.
3908         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
3909         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
3910         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
3911         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
3912         prototype.
3913         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
3914         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
3915         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
3916         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
3917         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
3918         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
3919         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
3920         prototype.
3921         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
3922         prototype.
3923         * annotate.c: Remove _initialize_annotate prototype.
3924         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
3925         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
3926         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
3927         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
3928         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
3929         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
3930         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
3931         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
3932         prototype.
3933         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
3934         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
3935         * auto-load.c: Remove _initialize_auto_load prototype.
3936         * auxv.c: Remove _initialize_auxv prototype.
3937         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
3938         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
3939         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
3940         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
3941         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
3942         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
3943         prototype.
3944         * break-catch-throw.c: Remove _initialize_break_catch_throw
3945         prototype.
3946         * breakpoint.c: Remove _initialize_breakpoint prototype.
3947         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
3948         * btrace.c: Remove _initialize_btrace prototype.
3949         * charset.c: Remove _initialize_charset prototype.
3950         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
3951         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
3952         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
3953         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
3954         * cli/cli-script.c: Remove _initialize_cli_script prototype.
3955         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
3956         * coffread.c: Remove _initialize_coffread prototype.
3957         * compile/compile.c: Remove _initialize_compile prototype.
3958         * complaints.c: Remove _initialize_complaints prototype.
3959         * completer.c: Remove _initialize_completer prototype.
3960         * copying.awk: Remove _initialize_copying prototype.
3961         * copying.c: Regenerate.
3962         * core-regset.c: Remove _initialize_core_regset prototype.
3963         * corefile.c: Remove _initialize_core prototype.
3964         * corelow.c: Remove _initialize_corelow prototype.
3965         * cp-abi.c: Remove _initialize_cp_abi prototype.
3966         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
3967         * cp-support.c: Remove _initialize_cp_support prototype.
3968         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
3969         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
3970         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
3971         * ctf.c: Remove _initialize_ctf prototype.
3972         * d-lang.c: Remove _initialize_d_language prototype.
3973         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
3974         prototype.
3975         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
3976         * dbxread.c: Remove _initialize_dbxread prototype.
3977         * dcache.c: Remove _initialize_dcache prototype.
3978         * demangle.c: Remove _initialize_demangler prototype.
3979         * disasm-selftests.c: Remove _initialize_disasm_selftests
3980         prototype.
3981         * disasm.c: Remove _initialize_disasm prototype.
3982         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
3983         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
3984         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
3985         prototype.
3986         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
3987         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
3988         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
3989         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
3990         * elfread.c: Remove _initialize_elfread prototype.
3991         * exec.c: Remove _initialize_exec prototype.
3992         * extension.c: Remove _initialize_extension prototype.
3993         * f-lang.c: Remove _initialize_f_language prototype.
3994         * f-valprint.c: Remove _initialize_f_valprint prototype.
3995         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
3996         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
3997         * filesystem.c: Remove _initialize_filesystem prototype.
3998         * findcmd.c: Remove _initialize_mem_search prototype.
3999         * fork-child.c: Remove _initialize_fork_child prototype.
4000         * frame-base.c: Remove _initialize_frame_base prototype.
4001         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
4002         * frame.c: Remove _initialize_frame prototype.
4003         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
4004         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
4005         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
4006         * gcore.c: Remove _initialize_gcore prototype.
4007         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
4008         * gdbarch.c: Regenerate.
4009         * gdbarch.sh: Remove _initialize_gdbarch prototype.
4010         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
4011         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
4012         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
4013         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
4014         * go-lang.c: Remove _initialize_go_language prototype.
4015         * go32-nat.c: Remove _initialize_go32_nat prototype.
4016         * guile/guile.c: Remove _initialize_guile prototype.
4017         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
4018         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
4019         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
4020         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
4021         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
4022         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
4023         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
4024         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
4025         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
4026         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
4027         prototype.
4028         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
4029         prototype.
4030         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
4031         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
4032         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
4033         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
4034         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
4035         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
4036         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
4037         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
4038         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
4039         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
4040         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
4041         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
4042         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
4043         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4044         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
4045         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
4046         prototype.
4047         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
4048         prototype.
4049         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
4050         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
4051         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
4052         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
4053         * infcall.c: Remove _initialize_infcall prototype.
4054         * infcmd.c: Remove _initialize_infcmd prototype.
4055         * inferior.c: Remove _initialize_inferiors prototype.
4056         * inflow.c: Remove _initialize_inflow prototype.
4057         * infrun.c: Remove _initialize_infrun prototype.
4058         * interps.c: Remove _initialize_interpreter prototype.
4059         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
4060         * jit.c: Remove _initialize_jit prototype.
4061         * language.c: Remove _initialize_language prototype.
4062         * linux-fork.c: Remove _initialize_linux_fork prototype.
4063         * linux-nat.c: Remove _initialize_linux_nat prototype.
4064         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
4065         * linux-thread-db.c: Remove _initialize_thread_db prototype.
4066         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
4067         * m2-lang.c: Remove _initialize_m2_language prototype.
4068         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
4069         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
4070         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
4071         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
4072         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
4073         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4074         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4075         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
4076         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
4077         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
4078         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4079         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4080         * machoread.c: Remove _initialize_machoread prototype.
4081         * macrocmd.c: Remove _initialize_macrocmd prototype.
4082         * macroscope.c: Remove _initialize_macroscope prototype.
4083         * maint.c: Remove _initialize_maint_cmds prototype.
4084         * mdebugread.c: Remove _initialize_mdebugread prototype.
4085         * memattr.c: Remove _initialize_mem prototype.
4086         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
4087         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
4088         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
4089         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
4090         * mi/mi-main.c: Remove _initialize_mi_main prototype.
4091         * microblaze-linux-tdep.c: Remove
4092         _initialize_microblaze_linux_tdep prototype.
4093         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
4094         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
4095         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
4096         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
4097         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
4098         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
4099         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
4100         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
4101         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
4102         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
4103         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
4104         prototype.
4105         * mipsread.c: Remove _initialize_mipsread prototype.
4106         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
4107         prototype.
4108         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
4109         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
4110         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
4111         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
4112         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
4113         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
4114         prototype.
4115         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
4116         * nto-procfs.c: Remove _initialize_procfs prototype.
4117         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
4118         * objc-lang.c: Remove _initialize_objc_language prototype.
4119         * objfiles.c: Remove _initialize_objfiles prototype.
4120         * observer.c: Remove observer_test_first_notification_function,
4121         observer_test_second_notification_function,
4122         observer_test_third_notification_function, and
4123         _initialize_observer prototypes.
4124         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
4125         * osabi.c: Remove _initialize_gdb_osabi prototype.
4126         * osdata.c: Remove _initialize_osdata prototype.
4127         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
4128         * parse.c: Remove _initialize_parse prototype.
4129         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
4130         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
4131         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
4132         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
4133         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
4134         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
4135         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
4136         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
4137         * printcmd.c: Remove _initialize_printcmd prototype.
4138         * probe.c: Remove _initialize_probe prototype.
4139         * proc-api.c: Remove _initialize_proc_api prototype.
4140         * proc-events.c: Remove _initialize_proc_events prototype.
4141         * proc-service.c: Remove _initialize_proc_service prototype.
4142         * procfs.c: Remove _initialize_procfs prototype.
4143         * psymtab.c: Remove _initialize_psymtab prototype.
4144         * python/python.c: Remove _initialize_python prototype.
4145         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
4146         * record-btrace.c: Remove _initialize_record_btrace prototype.
4147         * record-full.c: Remove _initialize_record_full prototype.
4148         * record.c: Remove _initialize_record prototype.
4149         * regcache.c: Remove _initialize_regcache prototype.
4150         * reggroups.c: Remove _initialize_reggroup prototype.
4151         * remote-notif.c: Remove _initialize_notif prototype.
4152         * remote-sim.c: Remove _initialize_remote_sim prototype.
4153         * remote.c: Remove _initialize_remote prototype.
4154         * reverse.c: Remove _initialize_reverse prototype.
4155         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
4156         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
4157         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
4158         prototype.
4159         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
4160         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
4161         * rust-exp.y: Remove _initialize_rust_exp prototype.
4162         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
4163         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
4164         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
4165         * score-tdep.c: Remove _initialize_score_tdep prototype.
4166         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
4167         prototype.
4168         * ser-go32.c: Remove _initialize_ser_dos prototype.
4169         * ser-mingw.c: Remove _initialize_ser_windows prototype.
4170         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
4171         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
4172         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
4173         * serial.c: Remove _initialize_serial prototype.
4174         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
4175         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
4176         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
4177         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
4178         * skip.c: Remove _initialize_step_skip prototype.
4179         * sol-thread.c: Remove _initialize_sol_thread prototype.
4180         * solib-aix.c: Remove _initialize_solib_aix prototype.
4181         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
4182         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
4183         * solib-frv.c: Remove _initialize_frv_solib prototype.
4184         * solib-spu.c: Remove _initialize_spu_solib prototype.
4185         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
4186         * solib-target.c: Remove _initialize_solib_target prototype.
4187         * solib.c: Remove _initialize_solib prototype.
4188         * source.c: Remove _initialize_source prototype.
4189         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
4190         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
4191         prototype.
4192         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
4193         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
4194         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
4195         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
4196         prototype.
4197         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
4198         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
4199         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
4200         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
4201         prototype.
4202         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
4203         prototype.
4204         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
4205         prototype.
4206         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
4207         prototype.
4208         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
4209         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
4210         prototype.
4211         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
4212         prototype.
4213         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
4214         prototype.
4215         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
4216         prototype.
4217         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
4218         prototype.
4219         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
4220         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
4221         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
4222         * stabsread.c: Remove _initialize_stabsread prototype.
4223         * stack.c: Remove _initialize_stack prototype.
4224         * stap-probe.c: Remove _initialize_stap_probe prototype.
4225         * std-regs.c: Remove _initialize_frame_reg prototype.
4226         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
4227         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
4228         * symfile.c: Remove _initialize_symfile prototype.
4229         * symmisc.c: Remove _initialize_symmisc prototype.
4230         * symtab.c: Remove _initialize_symtab prototype.
4231         * target-dcache.c: Remove _initialize_target_dcache prototype.
4232         * target-descriptions.c: Remove _initialize_target_descriptions
4233         prototype.
4234         * thread.c: Remove _initialize_thread prototype.
4235         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
4236         prototype.
4237         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
4238         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
4239         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
4240         prototype.
4241         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
4242         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
4243         * tracefile.c: Remove _initialize_tracefile prototype.
4244         * tracepoint.c: Remove _initialize_tracepoint prototype.
4245         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
4246         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
4247         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
4248         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
4249         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
4250         * tui/tui-win.c: Remove _initialize_tui_win prototype.
4251         * tui/tui.c: Remove _initialize_tui prototype.
4252         * typeprint.c: Remove _initialize_typeprint prototype.
4253         * user-regs.c: Remove _initialize_user_regs prototype.
4254         * utils.c: Remove _initialize_utils prototype.
4255         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
4256         * valarith.c: Remove _initialize_valarith prototype.
4257         * valops.c: Remove _initialize_valops prototype.
4258         * valprint.c: Remove _initialize_valprint prototype.
4259         * value.c: Remove _initialize_values prototype.
4260         * varobj.c: Remove _initialize_varobj prototype.
4261         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
4262         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
4263         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
4264         * windows-nat.c: Remove _initialize_windows_nat,
4265         _initialize_check_for_gdb_ini, and _initialize_loadable
4266         prototypes.
4267         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
4268         * xcoffread.c: Remove _initialize_xcoffread prototype.
4269         * xml-support.c: Remove _initialize_xml_support prototype.
4270         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
4271         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
4272         prototype.
4273         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
4274         prototype.
4275         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
4276
4277 2017-09-08  Keith Seitz  <keiths@redhat.com>
4278
4279         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
4280         field.
4281
4282 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
4283
4284         * f-valprint.c (f_val_print): Remove check for one byte
4285         sized integers. Remove printing of character type.
4286
4287 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
4288             Christoph Weinmann  <christoph.t.weinmann@intel.com>
4289             Bernhard Heckel  <bernhard.heckel@intel.com>
4290
4291         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
4292         to maintain proper indentation when printing pointers/refs.
4293
4294 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4295
4296         GDB 8.0.1 released.
4297
4298 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4299
4300         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
4301
4302 2017-09-05  Tom Tromey  <tom@tromey.com>
4303
4304         * parse.c (funcall_chain): Now a std::vector.
4305         (start_arglist, end_arglist): Simplify.
4306         (free_funcalls): Remove.
4307         (parse_exp_in_context_1): Remove cleanup.
4308
4309 2017-09-05  Tom Tromey  <tom@tromey.com>
4310
4311         * go-exp.y (go_parse): Don't create a cleanup.
4312
4313 2017-09-05  Tom Tromey  <tom@tromey.com>
4314
4315         * d-exp.y (PrimaryExpression): Use std::string.
4316         (d_parse): Don't create a cleanup.
4317
4318 2017-09-05  Tom Tromey  <tom@tromey.com>
4319
4320         * utils.c (do_clear_parser_state): Remove.
4321         (make_cleanup_clear_parser_state): Remove.
4322         * p-exp.y (pascal_parse): Use scoped_restore.
4323         * m2-exp.y (m2_parse): Use scoped_restore.
4324         * f-exp.y (f_parse): Use scoped_restore.
4325         * d-exp.y (d_parse): Use scoped_restore.
4326         * c-exp.y (c_parse): Use scoped_restore.
4327         * ada-exp.y (ada_parse): Use scoped_restore.
4328         * utils.h (make_cleanup_clear_parser_state): Remove.
4329
4330 2017-09-06  Keith Seitz  <keiths@redhat.com>
4331
4332         * dwarf2read.c (dw2_linkage_name_attr): New function.
4333         (dw2_linkage_name): New function.
4334         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
4335         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
4336         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
4337
4338 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4339
4340         * config/djgpp/djconfig.sh: Correct shell portability issue.
4341
4342 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4343
4344         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
4345
4346 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4347
4348         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
4349         * NEWS: Mention new FreeBSD/mips native configuration.
4350         * configure.host: Add aarch64*-*-freebsd*.
4351         * configure.nat: Likewise.
4352         * aarch64-fbsd-nat.c: New file.
4353
4354 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4355
4356         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
4357         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
4358         * NEWS: Mention new FreeBSD/aarch64 target.
4359         * configure.tgt: Add aarch64*-*-freebsd*.
4360         * aarch64-fbsd-tdep.c: New file.
4361         * aarch64-fbsd-tdep.h: New file.
4362
4363 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4364
4365         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
4366
4367 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
4368
4369         * parse.c (find_minsym_type_and_address): Don't relocate addresses
4370         of TLS symbols.
4371
4372 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4373
4374         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
4375         call.
4376
4377 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4378
4379         * infrun.c (follow_exec): Call add_thread after
4380         target_find_description.
4381
4382 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4383
4384         * infrun.c (handle_inferior_event_1): When exec'ing, read
4385         stop_pc after follow_exec.
4386
4387 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4388
4389         * remote.c (process_g_packet): Update error message.
4390
4391 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4392
4393         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
4394         targets.
4395
4396 2017-09-05  Pedro Alves  <palves@redhat.com>
4397
4398         * eval.c (eval_call, evaluate_funcall): New functions, factored
4399         out from ...
4400         (evaluate_subexp_standard): ... this.
4401
4402 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4403
4404         * amd64-tdep.c (amd64_target_description): Create target
4405         descriptions.
4406         (_initialize_amd64_tdep): Don't call functions
4407         initialize_tdesc_amd64_*.  Add self tests.
4408         * arch/amd64.c (amd64_create_target_description): Add parameter
4409         is_linux.  Call set_tdesc_osabi if is_linux is true.
4410         * arch/amd64.h (amd64_create_target_description): Update the
4411         declaration.
4412         * arch/i386.c (i386_create_target_description): Add parameter
4413         is_linux.  Call set_tdesc_osabi if is_linux is true.
4414         * arch/i386.h (i386_create_target_description): Update
4415         declaration.
4416         * configure.tgt: Add i386.o to gdb_target_obs.
4417         * features/Makefile (XMLTOC): Remove i386/*.xml.
4418         * features/i386/amd64-avx-avx512.c: Remove.
4419         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
4420         * features/i386/amd64-avx-mpx.c: Remove.
4421         * features/i386/amd64-avx.c: Remove.
4422         * features/i386/amd64-mpx.c: Remove.
4423         * features/i386/amd64.c: Remove.
4424         * features/i386/i386-avx-avx512.c: Remove.
4425         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
4426         * features/i386/i386-avx-mpx.c: Remove.
4427         * features/i386/i386-avx.c: Remove.
4428         * features/i386/i386-mmx.c: Remove.
4429         * features/i386/i386-mpx.c: Remove.
4430         * features/i386/i386.c: Remove.
4431         * i386-tdep.c: Don't include features/i386/i386*.c., include
4432         target-descriptions.h and arch/i386.h.
4433         (i386_target_description): Create target descriptions.
4434         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
4435         functions.  Do self tests.
4436
4437 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4438
4439         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
4440         * features/i386/amd64-avx-avx512-linux.c: Removed.
4441         * features/i386/amd64-avx-linux.c: Removed.
4442         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
4443         * features/i386/amd64-avx-mpx-linux.c: Removed.
4444         * features/i386/amd64-linux.c: Removed.
4445         * features/i386/amd64-mpx-linux.c: Removed.
4446         * features/i386/x32-avx-avx512-linux.c: Removed.
4447         * features/i386/x32-avx-linux.c: Removed.
4448         * features/i386/x32-linux.c: Removed.
4449
4450 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4451
4452         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
4453         features/i386/*.c.
4454         (amd64_linux_read_description): Call
4455         amd64_create_target_description.
4456         * arch/amd64.c: New file.
4457         * arch/amd64.h: New file.
4458         * configure.tgt (x86_64-*-linux*): Append amd64.o.
4459         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
4460
4461 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4462
4463         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
4464         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
4465         (amd64_linux_read_description): Create target descriptions.
4466         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
4467         functions.  Add unit tests.
4468         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
4469         x32-core.xml.
4470         * features/i386/64bit-avx.c: Generated.
4471         * features/i386/64bit-avx512.c: Generated.
4472         * features/i386/64bit-core.c: Generated.
4473         * features/i386/64bit-linux.c: Generated.
4474         * features/i386/64bit-mpx.c: Generated.
4475         * features/i386/64bit-pkeys.c: Generated.
4476         * features/i386/64bit-segments.c: Generated.
4477         * features/i386/64bit-sse.c: Generated.
4478         * features/i386/x32-core.c: Generated.
4479         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
4480         c files for amd64-linux and x32-linux.
4481
4482 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4483
4484         * amd64-linux-tdep.c (amd64_linux_read_description): New
4485         function.
4486         (amd64_linux_core_read_description): Call
4487         amd64_linux_read_description.
4488         (amd64_linux_init_abi): Likewise.
4489         (amd64_x32_linux_init_abi): Likewise.
4490         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
4491         * x86-linux-nat.c (x86_linux_read_description): Call
4492         amd64_linux_read_description.
4493
4494 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4495
4496         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
4497         comments.
4498
4499 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4500
4501         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
4502         * features/i386/i386-avx-avx512-linux.c: Remove.
4503         * features/i386/i386-avx-linux.c: Remove.
4504         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
4505         * features/i386/i386-avx-mpx-linux.c: Remove.
4506         * features/i386/i386-linux.c: Remove.
4507         * features/i386/i386-mmx-linux.c: Remove.
4508         * features/i386/i386-mpx-linux.c: Remove.
4509
4510 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4511
4512         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
4513         (SFILES): Add arch/i386.c.
4514         (HFILES_NO_SRCDIR): Add arch/i386.h.
4515         * arch/i386.c: New file.
4516         * arch/i386.h: New file.
4517         * arch/tdesc.h (allocate_target_description): Declare.
4518         (set_tdesc_architecture): Declare.
4519         (set_tdesc_osabi): Declare.
4520         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
4521         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
4522         include arch/i386.h.
4523         (i386_linux_read_description): Remove code and call
4524         i386_create_target_description.
4525         (set_tdesc_architecture): New function.
4526         (set_tdesc_osabi): New function.
4527         * target-descriptions.h (allocate_target_description): Remove.
4528
4529 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4530
4531         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
4532         * target-descriptions.c (tdesc_create_feature): Likewise, and
4533         adjust code.
4534         * features/i386/32bit-avx.c: Re-generated.
4535         * features/i386/32bit-avx512.c: Re-generated.
4536         * features/i386/32bit-core.c: Re-generated.
4537         * features/i386/32bit-linux.c: Re-generated.
4538         * features/i386/32bit-mpx.c: Re-generated.
4539         * features/i386/32bit-pkeys.c: Re-generated.
4540         * features/i386/32bit-sse.c: Re-generated.
4541
4542 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4543
4544         * regformats/regdef.h (struct reg): Override operator == and !=.
4545
4546 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4547
4548         * arch/tdesc.h: New file.
4549         * regformats/regdat.sh: Generate code using tdesc_create_reg.
4550         * target-descriptions.c: Update comments.
4551         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
4552         declarations.
4553         * features/i386/32bit-avx.c: Re-generated.
4554         * features/i386/32bit-avx512.c: Re-generated.
4555         * features/i386/32bit-core.c: Re-generated.
4556         * features/i386/32bit-linux.c: Re-generated.
4557         * features/i386/32bit-mpx.c: Re-generated.
4558         * features/i386/32bit-pkeys.c: Re-generated.
4559         * features/i386/32bit-sse.c: Re-generated.
4560
4561 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4562
4563         * regformats/regdat.sh: Update generated code.
4564
4565 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4566
4567         * regformats/regdat.sh: Adjust code order.
4568
4569 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4570
4571         * expprint.c (dump_subexp_body_standard): Use constant format
4572         string in fprintf_filtered call.
4573
4574 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4575
4576         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
4577         NetBSD/i386.
4578         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
4579
4580 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4581
4582         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
4583
4584 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4585
4586         * bsd-kvm.o: Define _KMEMUSER.
4587         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
4588         * configure: Regenerate.
4589
4590 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4591
4592         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
4593         * i386-fbsd-nat.c: Likewise.
4594
4595 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4596
4597         * unittests/array-view-selftests.c: Add include of <array>.
4598
4599 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4600
4601         * spu-tdep.c (flush_ea_cache): Add missing argument to
4602         call_function_by_hand.
4603
4604 2017-09-04  Pedro Alves  <palves@redhat.com>
4605
4606         * NEWS (Safer support for debugging with no debug info): New.
4607
4608 2017-09-04  Pedro Alves  <palves@redhat.com>
4609
4610         * c-exp.y (function_method, function_method_void): Add current
4611         instance flags to TYPE_INSTANCE.
4612         * dwarf2read.c (check_modifier): New.
4613         (compute_delayed_physnames): Assert that only C++ adds delayed
4614         physnames.  Mark fn_fields as const/volatile depending on
4615         physname.
4616         * eval.c (make_params): New type_instance_flags parameter.  Use
4617         it as the new type's instance flags.
4618         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
4619         flags element and pass it to make_params.
4620         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
4621         instance flags element.
4622         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
4623         * gdbtypes.h: Include "enum-flags.h".
4624         (type_instance_flags): New enum-flags type.
4625         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
4626         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
4627         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
4628         (follow_type_instance_flags): New function.
4629         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
4630         * parser-defs.h (follow_type_instance_flags): Declare.
4631         * valops.c (value_struct_elt_for_reference): const/volatile must
4632         match too.
4633
4634 2017-09-04  Pedro Alves  <palves@redhat.com>
4635
4636         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
4637         function/method scopes; lookup the nested name as a function local
4638         static variable.
4639
4640 2017-09-04  Pedro Alves  <palves@redhat.com>
4641
4642         (%type <voidval>): Add function_method.
4643         * c-exp.y (exp): New production for calls with no arguments.
4644         (function_method, function_method_void_or_typelist): New
4645         productions.
4646         (exp): New production for "method()::static_var".
4647         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
4648         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4649         Handle OP_FUNC_STATIC_VAR.
4650         * parse.c (operator_length_standard):
4651         Handle OP_FUNC_STATIC_VAR.
4652
4653 2017-09-04  Pedro Alves  <palves@redhat.com>
4654
4655         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
4656         handling.
4657         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4658         Ditto.
4659         * parse.c (operator_length_standard, operator_check_standard):
4660         Ditto.
4661         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
4662
4663 2017-09-04  Pedro Alves  <palves@redhat.com>
4664
4665         * ax-gdb.c: Include "typeprint.h".
4666         (gen_expr_for_cast): New function.
4667         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
4668         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
4669         type is unknown.
4670         * dwarf2read.c (new_symbol_full): Fallback to int instead of
4671         nodebug_data_symbol.
4672         * eval.c: Include "typeprint.h".
4673         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
4674         Error out if symbol has unknown type.
4675         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
4676         evaluate_subexp_for_cast.
4677         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
4678         OP_VAR_MSYM_VALUE.
4679         (evaluate_subexp_for_cast): New function.
4680         * gdbtypes.c (init_nodebug_var_type): New function.
4681         (objfile_type): Use it to initialize types of variables with no
4682         debug info.
4683         * typeprint.c (error_unknown_type): New.
4684         * typeprint.h (error_unknown_type): New declaration.
4685         * compile/compile-c-types.c (convert_type_basic): Handle
4686         TYPE_CODE_ERROR; warn and fallback to int for variables with
4687         unknown type.
4688
4689 2017-09-04  Pedro Alves  <palves@redhat.com>
4690
4691         * eval.c (evaluate_var_value): New function, factored out from ...
4692         (evaluate_subexp_standard): ... here.
4693
4694 2017-09-04  Pedro Alves  <palves@redhat.com>
4695
4696         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
4697         Remove useless assignments to 'op'.
4698
4699 2017-09-04  Pedro Alves  <palves@redhat.com>
4700
4701         * eval.c (eval_skip_value): New function.
4702         (evaluate_subexp_standard): Use it.
4703
4704 2017-09-04  Pedro Alves  <palves@redhat.com>
4705
4706         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
4707         function name from symbol/minsym and pass it to
4708         error_call_unknown_return_type.
4709
4710 2017-09-04  Pedro Alves  <palves@redhat.com>
4711
4712         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
4713         * ax-gdb.c (gen_msym_var_ref): New function.
4714         (gen_expr): Handle OP_VAR_MSYM_VALUE.
4715         * eval.c (evaluate_var_msym_value): New function.
4716         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
4717         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
4718         to call_function_by_hand.
4719         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4720         Handle OP_VAR_MSYM_VALUE.
4721         (union exp_element) <msymbol>: New field.
4722         * minsyms.h (struct type): Forward declare.
4723         (find_minsym_type_and_address): Declare.
4724         * parse.c (write_exp_elt_msym): New function.
4725         (write_exp_msymbol): Delete, refactored as ...
4726         (find_minsym_type_and_address): ... this new function.
4727         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
4728         (operator_length_standard, operator_check_standard): Handle
4729         OP_VAR_MSYM_VALUE.
4730         * std-operator.def (OP_VAR_MSYM_VALUE): New.
4731
4732 2017-09-04  Pedro Alves  <palves@redhat.com>
4733
4734         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
4735         TYPE_GNU_IFUNC specially here.  Throw error if return type is
4736         unknown.
4737         * ada-typeprint.c (print_func_type): Handle functions with unknown
4738         return type.
4739         * c-typeprint.c (c_type_print_base): Handle functions and methods
4740         with unknown return type.
4741         * compile/compile-c-symbols.c (convert_symbol_bmsym)
4742         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
4743         * compile/compile-c-types.c: Include "objfiles.h".
4744         (convert_func): For functions with unknown return type, warn and
4745         default to int.
4746         * compile/compile-object-run.c (compile_object_run): Adjust call
4747         to call_function_by_hand_dummy.
4748         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
4749         call_function_by_hand.
4750         * eval.c (evaluate_subexp_standard): Adjust calls to
4751         call_function_by_hand.  Handle functions and methods with unknown
4752         return type.  Pass expect_type to call_function_by_hand.
4753         * f-typeprint.c (f_type_print_base): Handle functions with unknown
4754         return type.
4755         * gcore.c (call_target_sbrk): Adjust call to
4756         call_function_by_hand.
4757         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
4758         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
4759         an integer address type instead of nodebug.
4760         * guile/scm-value.c (gdbscm_value_call): Adjust call to
4761         call_function_by_hand.
4762         * infcall.c (error_call_unknown_return_type): New function.
4763         (call_function_by_hand): New "default_return_type" parameter.
4764         Pass it down.
4765         (call_function_by_hand_dummy): New "default_return_type"
4766         parameter.  Use it instead of defaulting to int.  If there's no
4767         default and the return type is unknown, throw an error.  If
4768         there's a default return type, and the called function has no
4769         debug info, then assume the function is prototyped.
4770         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
4771         New "default_return_type" parameter.
4772         (error_call_unknown_return_type): New declaration.
4773         * linux-fork.c (call_lseek): Cast return type of lseek.
4774         (inferior_call_waitpid, checkpoint_command): Adjust calls to
4775         call_function_by_hand.
4776         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
4777         calls to call_function_by_hand.
4778         * m2-typeprint.c (m2_procedure): Handle functions with unknown
4779         return type.
4780         * objc-lang.c (lookup_objc_class, lookup_child_selector)
4781         (value_nsstring, print_object_command): Adjust calls to
4782         call_function_by_hand.
4783         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
4784         functions with unknown return type.
4785         (pascal_type_print_func_varspec_suffix): New function.
4786         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
4787         TYPE_CODE_METHOD>: Use it.
4788         * python/py-value.c (valpy_call): Adjust call to
4789         call_function_by_hand.
4790         * rust-lang.c (rust_evaluate_funcall): Adjust call to
4791         call_function_by_hand.
4792         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
4793         call_function_by_hand.
4794         * valops.c (value_allocate_space_in_inferior): Adjust call to
4795         call_function_by_hand.
4796         * typeprint.c (type_print_unknown_return_type): New function.
4797         * typeprint.h (type_print_unknown_return_type): New declaration.
4798
4799 2017-09-04  Pedro Alves  <palves@redhat.com>
4800
4801         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
4802         types with more than one parameter as prototyped.
4803
4804 2017-09-04  Pedro Alves  <palves@redhat.com>
4805
4806         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
4807         (disassemble_command): Use gdb_disassembly_flags instead of bare
4808         int.
4809         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
4810         (dump_insns, do_mixed_source_and_assembly_deprecated)
4811         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
4812         Use gdb_disassembly_flags instead of bare int.
4813         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
4814         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
4815         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
4816         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
4817         (enum gdb_disassembly_flag): ... values of this new enumeration.
4818         (gdb_disassembly_flags): Define.
4819         (gdb_disassembly)
4820         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
4821         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
4822         gdb_disassembly_flags instead of bare int.
4823         * record-btrace.c (btrace_insn_history)
4824         (record_btrace_insn_history, record_btrace_insn_history_range)
4825         (record_btrace_insn_history_from): Use gdb_disassembly_flags
4826         instead of bare int.
4827         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
4828         Use gdb_disassembly_flags instead of bare int.
4829         * target-debug.h (target_debug_print_gdb_disassembly_flags):
4830         Define.
4831         * target-delegates.c: Regenerate.
4832         * target.c (target_insn_history, target_insn_history_from)
4833         (target_insn_history_range): Use gdb_disassembly_flags instead of
4834         bare int.
4835         * target.h: Include "disasm.h".
4836         (struct target_ops) <to_insn_history, to_insn_history_from,
4837         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
4838         int.
4839         (target_insn_history, target_insn_history_from)
4840         (target_insn_history_range): Use gdb_disassembly_flags instead of
4841         bare int.
4842
4843 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
4844
4845         * cli/cli-script.c (build_command_line): For if/while commands,
4846         check whether args is empty.
4847
4848 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
4849
4850         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
4851         (enum command_control_type): Likewise.
4852         (struct command_line): Likewise.
4853         (free_command_lines): Likewise.
4854         (struct command_lines_deleter): Likewise.
4855         (command_line_up): Likewise.
4856         (read_command_lines): Likewise.
4857         (read_command_lines_1): Likewise.
4858         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
4859         (enum command_control_type): Likewise.
4860         (struct command_line): Likewise.
4861         (free_command_lines): Likewise.
4862         (struct command_lines_deleter): Likewise.
4863         (command_line_up): Likewise.
4864         (read_command_lines): Likewise.
4865         (read_command_lines_1): Likewise.
4866         * breakpoint.h: Include cli/cli-script.h.
4867         * extension-priv.h: Likewise.
4868         * gdbcmd.h: Likewise.
4869
4870 2017-09-04  Pedro Alves  <palves@redhat.com>
4871
4872         * ada-lang.c (is_known_support_routine): Move sal declaration to
4873         where it is initialized.
4874         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
4875         (parse_breakpoint_sals, decode_static_tracepoint_spec)
4876         (clear_command, update_static_tracepoint): Remove init_sal
4877         references.  Move declarations closer to initializations.
4878         * cli/cli-cmds.c (list_command): Move sal declarations closer to
4879         initializations.
4880         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
4881         references.  Move sal declarations closer to initializations.
4882         * frame.c (find_frame_sal): Return a symtab_and_line via function
4883         return instead of output parameter.  Remove init_sal references.
4884         * frame.h (find_frame_sal): Return a symtab_and_line via function
4885         return instead of output parameter.
4886         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
4887         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
4888         instead of memset.
4889         (gdbscm_find_pc_line): Remove init_sal reference.
4890         * infcall.c (call_function_by_hand_dummy): Remove init_sal
4891         references.  Move declarations closer to initializations.
4892         * infcmd.c (set_step_frame): Update.  Move declarations closer to
4893         initializations.
4894         (finish_backward): Remove init_sal references.  Move declarations
4895         closer to initializations.
4896         * infrun.c (process_event_stop_test, handle_step_into_function)
4897         (insert_hp_step_resume_breakpoint_at_frame)
4898         (insert_step_resume_breakpoint_at_caller): Likewise.
4899         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
4900         (symbol_to_sal): Likewise.
4901         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
4902         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
4903         to its initialization.
4904         * reverse.c (save_bookmark_command): Use new/delete.  Remove
4905         init_sal references.  Move declarations closer to initializations.
4906         * source.c (get_current_source_symtab_and_line): Remove brace
4907         initialization.
4908         (set_current_source_symtab_and_line): Now takes the sal by const
4909         reference.  Remove brace initialization.
4910         (line_info): Remove init_sal reference.
4911         * source.h (set_current_source_symtab_and_line): Now takes a
4912         symtab_and_line via const reference.
4913         * stack.c (set_current_sal_from_frame): Adjust.
4914         (print_frame_info): Adjust.
4915         (get_last_displayed_sal): Return the sal via function return
4916         instead of via output parameter.  Simplify.
4917         (frame_info): Adjust.
4918         * stack.h (get_last_displayed_sal): Return the sal via function
4919         return instead of via output parameter.
4920         * symtab.c (init_sal): Delete.
4921         (find_pc_sect_line): Remove init_sal references.  Move
4922         declarations closer to initializations.
4923         (find_function_start_sal): Remove init_sal references.  Move
4924         declarations closer to initializations.
4925         * symtab.h (struct symtab_and_line): In-class initialize all
4926         fields.
4927         * tracepoint.c (set_traceframe_context)
4928         (print_one_static_tracepoint_marker): Remove init_sal references.
4929         Move declarations closer to initializations.
4930         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
4931         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
4932         declarations closer to initializations.
4933         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
4934         init_sal references.  Adjust.
4935
4936 2017-09-04  Pedro Alves  <palves@redhat.com>
4937
4938         * ax-gdb.c (agent_command_1): Use range-for.
4939         * break-catch-throw.c (re_set_exception_catchpoint): Update.
4940         * breakpoint.c: Include "common/array-view.h".
4941         (init_breakpoint_sal, create_breakpoint_sal): Change sals
4942         parameter from struct symtabs_and_lines to
4943         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
4944         (breakpoint_sals_to_pc): Change sals parameter from struct
4945         symtabs_and_lines to std::vector reference.
4946         (check_fast_tracepoint_sals): Change sals parameter from struct
4947         symtabs_and_lines to std::array_view.  Use range-for.
4948         (decode_static_tracepoint_spec): Return a std::vector instead of
4949         symtabs_and_lines.  Update.
4950         (create_breakpoint): Update.
4951         (break_range_command, until_break_command, clear_command): Update.
4952         (base_breakpoint_decode_location, bkpt_decode_location)
4953         (bkpt_probe_create_sals_from_location)
4954         (bkpt_probe_decode_location, tracepoint_decode_location)
4955         (tracepoint_probe_decode_location)
4956         (strace_marker_create_sals_from_location): Return a std::vector
4957         instead of symtabs_and_lines.
4958         (strace_marker_create_breakpoints_sal): Update.
4959         (strace_marker_decode_location): Return a std::vector instead of
4960         symtabs_and_lines.  Update.
4961         (update_breakpoint_locations): Change struct symtabs_and_lines
4962         parameters to gdb::array_view.  Adjust.
4963         (location_to_sals): Return a std::vector instead of
4964         symtabs_and_lines.  Update.
4965         (breakpoint_re_set_default): Use std::vector instead of struct
4966         symtabs_and_lines.
4967         (decode_location_default): Return a std::vector instead of
4968         symtabs_and_lines.  Update.
4969         * breakpoint.h: Include "common/array-view.h".
4970         (struct breakpoint_ops) <decode_location>: Now returns a
4971         std::vector instead of returning a symtabs_and_lines via output
4972         parameter.
4973         (update_breakpoint_locations): Change sals parameters to use
4974         gdb::array_view.
4975         * cli/cli-cmds.c (edit_command, list_command): Update to use
4976         std::vector and gdb::array_view.
4977         (ambiguous_line_spec): Adjust to use gdb::array_view and
4978         range-for.
4979         (compare_symtabs): Rename to ...
4980         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
4981         const reference and adjust.
4982         (filter_sals): Rewrite using std::vector and standard algorithms.
4983         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
4984         (jump_command): Update to use std::vector.
4985         * linespec.c (struct linespec_state) <canonical_names>: Update
4986         comment.
4987         (add_sal_to_sals_basic): Delete.
4988         (add_sal_to_sals, filter_results, convert_results_to_lsals)
4989         (decode_line_2, create_sals_line_offset)
4990         (convert_address_location_to_sals, convert_linespec_to_sals)
4991         (convert_explicit_location_to_sals, parse_linespec)
4992         (event_location_to_sals, decode_line_full, decode_line_1)
4993         (decode_line_with_current_source)
4994         (decode_line_with_last_displayed, decode_objc)
4995         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
4996         (linespec_result::~linespec_result): Adjust to use std::vector
4997         instead of symtabs_and_lines.
4998         * linespec.h (linespec_sals::sals): Now a std::vector.
4999         (struct linespec_result): Use std::vector, bool, and in-class
5000         initialization.
5001         (decode_line_1, decode_line_with_current_source)
5002         (decode_line_with_last_displayed): Return std::vector.
5003         * macrocmd.c (info_macros_command): Use std::vector.
5004         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
5005         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
5006         std::vector.
5007         * probe.h (parse_probes): Return a std::vector.
5008         * python/python.c (gdbpy_decode_line): Use std::vector and
5009         gdb::array_view.
5010         * source.c (select_source_symtab, line_info): Use std::vector.
5011         * stack.c (func_command): Use std::vector.
5012         * symtab.h (struct symtabs_and_lines): Delete.
5013         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
5014
5015 2017-09-04  Pedro Alves  <palves@redhat.com>
5016
5017         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5018         unittests/array-view-selftests.c.
5019         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
5020         * common/array-view.h: New file.
5021         * unittests/array-view-selftests.c: New file.
5022
5023 2017-09-04  Pedro Alves  <palves@redhat.com>
5024
5025         * cli/cli-cmds.c (edit_command): Pass message to
5026         ambiguous_line_spec.
5027         (list_command): Pass message to ambiguous_line_spec.  Say
5028         "first"/"last" instead of "start" and "end" to be consistent with
5029         the manual.
5030         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
5031         them to print formatted message.
5032
5033 2017-09-04  Pedro Alves  <palves@redhat.com>
5034
5035         * btrace.c (ftrace_add_pt): Pass btrace_insn to
5036         ftrace_update_insns by reference instead of pointer.
5037
5038 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5039
5040         * i386-go32-tdep.c: Include x86-xstate.h.
5041         (i386_go32_init_abi): Call i386_target_description.
5042         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
5043         if xcr0 is X86_XSTATE_X87_MASK.
5044         * i386-tdep.h (tdesc_i386): Remove the declaration.
5045         (tdesc_i386_mmx): Likewise.
5046
5047 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5048
5049         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
5050         X86_XSTATE_SSE_MASK instead of 0.
5051
5052 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5053
5054         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
5055         i386_target_description.
5056         * i386-fbsd-nat.c (i386fbsd_read_description): Call
5057         i386_target_description.
5058         * i386-tdep.c (i386_gdbarch_init): Likewise.
5059
5060 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5061
5062         * amd64-darwin-tdep.c: Include "x86-xstate.h".
5063         (x86_darwin_init_abi_64): Call amd64_target_description.
5064         * amd64-dicos-tdep.c: Likewise.
5065         * amd64-fbsd-nat.c: Likewise.
5066         * amd64-fbsd-tdep.c: Likewise.
5067         * amd64-nbsd-tdep.c: Likewise.
5068         * amd64-obsd-tdep.c: Likewise.
5069         * amd64-sol2-tdep.c: Likewise.
5070         * amd64-windows-tdep.c: Likewise.
5071         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
5072
5073 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5074
5075         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
5076         (btrace_function) <insn>: Change type to use std::vector.
5077         * btrace.c (ftrace_debug, ftrace_call_num_insn,
5078         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
5079         ftrace_update_insns, ftrace_compute_global_level_offset,
5080         btrace_stitch_bts, btrace_clear, btrace_insn_get,
5081         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
5082         change to std::vector.
5083         (ftrace_update_insns): Adjust to change to std::vector, change
5084         type of INSN parameter.
5085         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
5086         * record-btrace.c (btrace_call_history_insn_range,
5087         btrace_compute_src_line_range,
5088         record_btrace_frame_prev_register): Adjust to change to
5089         std::vector.
5090         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
5091         to change to std::vector.
5092
5093 2017-09-03  Tom Tromey  <tom@tromey.com>
5094
5095         * corefile.c (reopen_exec_file): Use std::string.
5096
5097 2017-09-03  Tom Tromey  <tom@tromey.com>
5098
5099         * compile/compile.c (compile_register_name_mangled): Return
5100         std::string.
5101         * compile/compile-loc2c.c (pushf_register_address): Update.
5102         (pushf_register): Update.
5103         * compile/compile-c-types.c (convert_array): Update.
5104         * compile/compile-c-symbols.c (generate_vla_size): Update.
5105         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
5106         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
5107         (convert_one_symbol): Update.
5108         (generate_c_for_for_one_variable): Update.
5109         * compile/compile-c-support.c (c_get_range_decl_name): Return a
5110         std::string.
5111         (generate_register_struct): Update.
5112         * compile/compile-internal.h (c_get_range_decl_name): Return a
5113         std::string.
5114         (compile_register_name_mangled): Return std::string.
5115
5116 2017-09-03  Tom Tromey  <tom@tromey.com>
5117
5118         * utils.c (perror_string): Return a std::string.
5119         (throw_perror_with_name, perror_warning_with_name): Update.
5120
5121 2017-09-03  Tom Tromey  <tom@tromey.com>
5122
5123         * demangle.c (demangle_command): Use std::string,
5124         unique_xmalloc_ptr.
5125
5126 2017-09-03  Tom Tromey  <tom@tromey.com>
5127
5128         * cli/cli-setshow.c (do_set_command): Use std::string.
5129
5130 2017-09-03  Tom Tromey  <tom@tromey.com>
5131
5132         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
5133
5134 2017-09-03  Tom Tromey  <tom@tromey.com>
5135
5136         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
5137
5138 2017-09-03  Tom Tromey  <tom@tromey.com>
5139
5140         * mi/mi-cmd-env.c (env_execute_cli_command): Use
5141         gdb::unique_xmalloc_ptr.
5142
5143 2017-09-03  Tom Tromey  <tom@tromey.com>
5144
5145         * thread.c (print_thread_info_1): Use string_printf.
5146         (thread_apply_command, thread_apply_all_command): Use
5147         std::string.
5148
5149 2017-09-03  Tom Tromey  <tom@tromey.com>
5150
5151         * valprint.c (val_print_string): Update.
5152         * gdbcore.h (memory_error_message): Return std::string.
5153         * corefile.c (memory_error_message): Return std::string.
5154         (memory_error): Update.
5155         * breakpoint.c (insert_bp_location): Update.
5156
5157 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
5158
5159         * target/waitstatus.h (target_waitstatus_to_string): Change
5160         return type to std::string.
5161         * target/waitstatus.c (target_waitstatus_to_string): Return
5162         std::string.
5163         * target.h (target_waitstatus_to_string): Remove declaration.
5164         * infrun.c (resume, clear_proceed_status_thread,
5165         print_target_wait_results, do_target_wait, save_waitstatus,
5166         stop_all_threads): Adjust.
5167         * record-btrace.c (record_btrace_wait): Adjust.
5168         * target-debug.h
5169         (target_debug_print_struct_target_waitstatus_p): Adjust.
5170
5171 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
5172
5173         PR gdb/22046
5174         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
5175         detection.
5176
5177 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
5178
5179         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
5180         for setting/unsetting environment variables on the remote target.
5181         (New remote packets): Add entries for QEnvironmentHexEncoded,
5182         QEnvironmentUnset and QEnvironmentReset.
5183         * common/environ.c (gdb_environ::operator=): Extend method to
5184         handle m_user_set_env_list and m_user_unset_env_list.
5185         (gdb_environ::clear): Likewise.
5186         (match_var_in_string): Change type of first parameter from 'char
5187         *' to 'const char *'.
5188         (gdb_environ::set): Extend method to handle
5189         m_user_set_env_list and m_user_unset_env_list.
5190         (gdb_environ::unset): Likewise.
5191         (gdb_environ::clear_user_set_env): New method.
5192         (gdb_environ::user_set_envp): Likewise.
5193         (gdb_environ::user_unset_envp): Likewise.
5194         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
5195         m_user_unset_env_list on move constructor/assignment.
5196         (unset): Add new default parameter 'update_unset_list = true'.
5197         (clear_user_set_env): New method.
5198         (user_set_envp): Likewise.
5199         (user_unset_envp): Likewise.
5200         (m_user_set_env_list): New std::set.
5201         (m_user_unset_env_list): Likewise.
5202         * common/rsp-low.c (hex2str): New function.
5203         (bin2hex): New overload for bin2hex function.
5204         * common/rsp-low.c (hex2str): New prototype.
5205         (str2hex): New overload prototype.
5206         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
5207         QEnvironmentUnset and QEnvironmentReset.
5208         (remote_protocol_features): Add QEnvironmentHexEncoded,
5209         QEnvironmentUnset and QEnvironmentReset packets.
5210         (send_environment_packet): New function.
5211         (extended_remote_environment_support): Likewise.
5212         (extended_remote_create_inferior): Call
5213         extended_remote_environment_support.
5214         (_initialize_remote): Add QEnvironmentHexEncoded,
5215         QEnvironmentUnset and QEnvironmentReset packet configs.
5216         * unittests/environ-selftests.c (gdb_selftest_env_var):
5217         New variable.
5218         (test_vector_initialization): New function.
5219         (test_init_from_host_environ): Likewise.
5220         (test_reinit_from_host_environ): Likewise.
5221         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
5222         Likewise.
5223         (test_unset_set_empty_vector): Likewise.
5224         (test_vector_clear): Likewise.
5225         (test_std_move): Likewise.
5226         (test_move_constructor):
5227         (test_self_move): Likewise.
5228         (test_set_unset_reset): Likewise.
5229         (run_tests): Rewrite in terms of the functions above.
5230
5231 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
5232
5233         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
5234         (adi_available): Use a temp variable of type CORE_ADDR as argument
5235         3 when calling target_auxv_search.
5236         (adi_normalize_address): Use masks and xor operators to calculate
5237         normalized address.
5238         (adi_read_versions, adi_write_versions, adi_print_versions)
5239         (do_examine, do_assign): Use paddress.
5240
5241 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
5242
5243         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
5244         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
5245         out of loop and add supply of FIR.
5246         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
5247         add collect of FIR.
5248
5249 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
5250
5251         PR gdb/21827
5252         * cli/cli-script.c (define_command): Don't convert command name
5253         to lower case.
5254
5255 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
5256
5257         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
5258         Update all callers accordingly. Remove all code blocks handling
5259         the case where DISPP is not NULL.
5260
5261 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5262
5263         PR symtab/22003
5264         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
5265         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5266         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
5267
5268 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5269
5270         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
5271         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
5272         (read_comp_units_from_section): New parameter abbrev_section, use
5273         read_and_check_comp_unit_head, allocate signatured_type if needed.
5274         (create_all_comp_units): Update read_comp_units_from_section caller.
5275
5276 2017-08-23  Pedro Alves  <palves@redhat.com>
5277
5278         PR remote/21852
5279         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
5280         to null_ptid and switch to thread without reading the registers
5281         after adding the inferior.
5282
5283 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5284
5285         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
5286         compile-gcc.
5287         * compile/compile.c (compile_gcc, show_compile_gcc): New.
5288         (compile_to_object): Implement compile_gcc.
5289         (_initialize_compile): Install "set compile-gcc".  Initialize
5290         compile_gcc.
5291
5292 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5293
5294         * compile/compile.c (compile_to_object): Conditionally call
5295         set_verbose.  Conditionally call compile or compile_v0.
5296
5297 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
5298
5299         * sparc64-tdep.h: (adi_normalize_address): New export.
5300         * sparc-nat.h: (open_adi_tag_fd): New export.
5301         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
5302         * sparc64-linux-tdep.c:
5303         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
5304         (sparc64_linux_handle_segmentation_fault): New function.
5305         (sparc64_linux_init_abi): Register
5306         sparc64_linux_handle_segmentation_fault
5307         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
5308         (sparc64_addr_bits_remove): New function.
5309         (sparc64_init_abi): Register sparc64_addr_bits_remove.
5310         (MAX_PROC_NAME_SIZE): New macro.
5311         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
5312         (sparc64adilist): New variable.
5313         (adi_proc_list): New variable.
5314         (find_adi_info): New function.
5315         (add_adi_info): New function.
5316         (get_adi_info_proc): New function.
5317         (get_adi_info): New function.
5318         (info_adi_command): New function.
5319         (read_maps_entry): New function.
5320         (adi_available): New function.
5321         (adi_normalize_address): New function.
5322         (adi_align_address): New function.
5323         (adi_convert_byte_count): New function.
5324         (adi_tag_fd): New function.
5325         (adi_is_addr_mapped): New function.
5326         (adi_read_versions): New function.
5327         (adi_write_versions): New function.
5328         (adi_print_versions): New function.
5329         (do_examine): New function.
5330         (do_assign): New function.
5331         (adi_examine_command): New function.
5332         (adi_assign_command): New function.
5333         (_initialize_sparc64_adi_tdep): New function.
5334
5335 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
5336
5337         * breakpoint.c (breakpoints_info): Rename to ...
5338         (info_breakpoints_command): ... this.
5339         (watchpoints_info): Rename to ...
5340         (info_watchpoints_command): ... this.
5341         (tracepoints_info): Rename to ...
5342         (info_tracepoints_command): ... this.
5343         (_initialize_breakpoint): Adjust.
5344         * dcache.c (dcache_info): Rename to ...
5345         (info_display_command): ... this.
5346         (_initialize_dcache): Adjust.
5347         * frame.h (args_info): Rename to ...
5348         (info_args_command): ... this.
5349         (locals_info): Rename to ...
5350         (info_locals_command): ... this.
5351         * infcmd.c (nofp_registers_info): Rename to ...
5352         (info_registers_command): ... this.
5353         (float_info): Rename to ...
5354         (info_float_command): ... this.
5355         (program_info): Rename to ...
5356         (info_program_command): ... this.
5357         (all_registers_info): Rename to ...
5358         (info_all_registers_command): ... this.
5359         (vector_info): Rename to ...
5360         (info_vector_command): ... this.
5361         (float_info): Rename to ...
5362         (info_float_command): ... this.
5363         (_initialize_infcmd): Adjust.
5364         * inferior.h (term_info): Rename to ...
5365         (info_terminal_command): ... this.
5366         * inflow.c (term_info): Rename to ...
5367         (info_terminal_command): ... this.
5368         (_initialize_inflow): Adjust.
5369         * infrun.c (signals_info): Rename to ...
5370         (info_signals_command): ... this.
5371         (_initialize_infrun): Adjust.
5372         * objc-lang.c (classes_info): Rename to ...
5373         (info_classes_command): ... this.
5374         (selectors_info): Rename to ...
5375         (info_selectors_command): ... this.
5376         (_initialize_objc_language): Adjust.
5377         * printcmd.c (sym_info): Rename to ...
5378         (info_symbol_command): ... this.
5379         (address_info): Rename to ...
5380         (info_address_command): ... this.
5381         (display_info): Rename to ...
5382         (info_display_command): ... this.
5383         (_initialize_printcmd): Adjust.
5384         * reverse.c (bookmarks_info): Rename to ...
5385         (info_breakpoints_command): ... this.
5386         (_initialize_reverse): Adjust.
5387         * ser-go32.c (dos_info): Rename to ...
5388         (info_serial_command): ... this.
5389         (_initialize_ser_dos): Adjust.
5390         * skip.c (skip_info): Rename to ...
5391         (info_skip_command): ... this.
5392         (_initialize_step_skip): Adjust.
5393         * source.c (line_info): Rename to ...
5394         (info_line_command): ... this.
5395         (source_info): Rename to ...
5396         (info_source_command)
5397         * stack.c (frame_info): Rename to ...
5398         (info_frame_command): ... this.
5399         (locals_info): Rename to ...
5400         (info_locals_command): ... this.
5401         (args_info): Rename to ...
5402         (info_args_command): ... this.
5403         (_initialize_stack): Adjust.
5404         * symtab.c (sources_info): Rename to ...
5405         (info_sources_command): ... this.
5406         (variables_info): Rename to ...
5407         (info_variables_command): ... this.
5408         (functions_info): Rename to ...
5409         (info_functions_command): ... this.
5410         (types_info): Rename to ...
5411         (info_types_command): ... this.
5412         (_initialize_symtab): Adjust.
5413         * target.c (target_info): Rename to ...
5414         (info_target_command): ... this.
5415         (initialize_targets): Adjust.
5416         * tracepoint.c (tvariables_info): Rename to ...
5417         (info_tvariables_command): ... this.
5418         (scope_info): Rename to ...
5419         (info_scope_command): ... this.
5420         (trace_dump_actions): Adjust.
5421         (_initialize_tracepoint): Adjust.
5422
5423 2017-08-22  Tom Tromey  <tom@tromey.com>
5424
5425         * breakpoint.h (install_breakpoint): Update.
5426         * breakpoint.c (add_solib_catchpoint): Update.
5427         (install_breakpoint): Change argument to a std::unique_ptr.
5428         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
5429         (create_breakpoint_sal, create_breakpoint): Update.
5430         (watch_command_1, catch_exec_command_1)
5431         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
5432         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
5433         Return the breakpoint.
5434         (set_raw_breakpoint_without_location, set_raw_breakpoint)
5435         (new_single_step_breakpoint): Update.
5436         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
5437         std::unique_ptr.
5438         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5439         std::unique_ptr.
5440         * break-catch-sig.c (create_signal_catchpoint): Use
5441         std::unique_ptr.
5442         * ada-lang.c (create_ada_exception_catchpoint): Use
5443         std::unique_ptr.
5444
5445 2017-08-22  Tom Tromey  <tom@tromey.com>
5446
5447         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
5448
5449 2017-08-22  Tom Tromey  <tom@tromey.com>
5450
5451         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
5452         (lookup_partial_symbol): Update.
5453
5454 2017-08-22  Tom Tromey  <tom@tromey.com>
5455
5456         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
5457         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
5458         (find_and_open_source, symtab_to_fullname): Update.
5459         * psymtab.c (psymtab_to_fullname): Update.
5460
5461 2017-08-22  Tom Tromey  <tom@tromey.com>
5462
5463         * exec.c (exec_file_attach): Update.
5464         * linux-thread-db.c (try_thread_db_load): Update.
5465         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
5466         * utils.c (gdb_realpath): Change return type.
5467         (gdb_realpath_keepfile): Update.
5468         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
5469         (_initialize_utils): Register the new self test.
5470         * source.c (openp): Update.
5471         (find_and_open_source): Update.
5472         * nto-tdep.c (nto_find_and_open_solib): Update.
5473         * main.c (set_gdb_data_directory): Update.
5474         (captured_main_1): Update.
5475         * dwarf2read.c (dwarf2_get_dwz_file): Update
5476         (dw2_map_symbol_filenames): Update.
5477         * auto-load.c (auto_load_safe_path_vec_update): Update.
5478         (filename_is_in_auto_load_safe_path_vec): Change type of
5479         "filename_realp".
5480         (auto_load_objfile_script): Update.
5481         (file_is_auto_load_safe): Update.  Use std::string.
5482         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
5483
5484 2017-08-22  Tom Tromey  <tom@tromey.com>
5485
5486         * utils.c (gdb_realpath_keepfile): Return a
5487         gdb::unique_xmalloc_ptr.
5488         * exec.c (exec_file_attach): Update.
5489         * utils.h (gdb_realpath_keepfile): Return a
5490         gdb::unique_xmalloc_ptr.
5491
5492 2017-08-22  Tom Tromey  <tom@tromey.com>
5493
5494         * compile/compile.c (compile_file_command): Use
5495         gdb::unique_xmalloc_ptr, std::string.
5496         * utils.c (gdb_abspath): Change return type.
5497         * source.c (openp): Update.
5498         * objfiles.c (allocate_objfile): Update.
5499         * main.c (set_gdb_data_directory): Update.
5500         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
5501
5502 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
5503
5504         * cli-cmds.c (list_commands): List actual code around more than
5505         one location.
5506
5507 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
5508
5509         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
5510
5511 2017-08-21  Pedro Alves  <palves@redhat.com>
5512
5513         PR gdb/19487
5514         * c-exp.y (variable production): Handle function aliases.
5515         * minsyms.c (msymbol_is_text): New function.
5516         * minsyms.h (msymbol_is_text): Declare.
5517         * symtab.c (find_function_alias_target): New function.
5518         * symtab.h (find_function_alias_target): Declare.
5519
5520 2017-08-21  Pedro Alves  <palves@redhat.com>
5521
5522         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
5523         typedefs.
5524         * typeprint.c (whatis_exp): If handling "whatis", and expression
5525         is OP_TYPE, strip one typedef level.  Otherwise don't strip
5526         typedefs here.
5527         * valops.c (value_cast): Save "to" type before resolving
5528         stubs/typedefs.  Use that type as resulting value's type.
5529
5530 2017-08-18  Tom Tromey  <tom@tromey.com>
5531             Pedro Alves  <palves@redhat.com>
5532
5533         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
5534         * sol-thread.c (sol_thread_resume, sol_thread_wait)
5535         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
5536         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
5537         * proc-service.c (ps_xfer_memory): Use scoped_restore.
5538         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
5539         (linux_get_siginfo_data): Add "thread" argument.  Use
5540         scoped_restore.
5541         * linux-nat.c (linux_child_follow_fork)
5542         (check_stopped_by_watchpoint): Use scoped_restore.
5543         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
5544         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
5545         (restore_inferior_ptid, save_inferior_ptid): Remove.
5546         * btrace.c (btrace_fetch): Use scoped_restore.
5547         * bsd-uthread.c (bsd_uthread_fetch_registers)
5548         (bsd_uthread_store_registers): Use scoped_restore.
5549         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
5550         scoped_restore.
5551         * aix-thread.c (aix_thread_resume, aix_thread_wait)
5552         (aix_thread_xfer_partial): Use scoped_restore.
5553         * inferior.h (save_inferior_ptid): Remove.
5554
5555 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5556
5557         PR tdep/21818
5558         * arm-tdep.c (gdb_print_insn_arm): Mark
5559         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
5560
5561 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5562
5563         * NEWS: Mention GDBserver's new option "--selftest".
5564         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
5565         * selftest.c: Move it to common/selftest.c.
5566         * selftest.h: Move it to common/selftest.h.
5567         * selftest-arch.c (reset): New function.
5568         (tests_with_arch): Call reset.
5569
5570 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5571
5572         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
5573         instead of exception_fprintf and printf_filtered.
5574
5575 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5576
5577         * selftest.c (register_self_test): Rename it to
5578         selftests::register_test.
5579         (run_self_tests): selftest::run_tests.
5580         * selftest.h: Update declarations.
5581         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
5582         selftests::register_test_foreach_arch.
5583         * selftest-arch.h: Update declaration.
5584         * aarch64-tdep.c: Update.
5585         * arm-tdep.c: Likewise.
5586         * disasm-selftests.c: Likewise.
5587         * dwarf2loc.c: Likewise.
5588         * dwarf2-frame.c: Likewise.
5589         * findvar.c: Likewise.
5590         * gdbarch-selftests.c: Likewise.
5591         * maint.c (maintenance_selftest): Likewise.
5592         * regcache.c: Likewise.
5593         * rust-exp.y: Likewise.
5594         * selftest-arch.c: Likewise.
5595         * unittests/environ-selftests.c: Likewise.
5596         * unittests/function-view-selftests.c: Likewise.
5597         * unittests/offset-type-selftests.c: Likewise.
5598         * unittests/optional-selftests.c: Likewise.
5599         * unittests/scoped_restore-selftests.c: Likewise.
5600         * utils-selftests.c: Likewise.
5601
5602 2017-08-17  Pedro Alves  <palves@redhat.com>
5603
5604         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
5605         local.
5606
5607 2017-08-17  Pedro Alves  <palves@redhat.com>
5608
5609         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
5610         field.
5611         (reset_die_in_process): Delete, replaced by ...
5612         (process_die_scope): ... this new class.  Make it responsible for
5613         freeing cu->line_header too.
5614         (process_die): Use process_die_scope.
5615         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
5616         cu->line_header_die_owner.  Don't release the line header if it's
5617         owned by the CU.
5618         (setup_type_unit_groups): Make the CU/DIE own the line header.
5619         Don't release the line header here.
5620
5621 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
5622
5623         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
5624
5625 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5626
5627         * NEWS: Mention new shortcuts for nexti and stepi in TUI
5628         Single-Key mode
5629
5630 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5631
5632         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
5633         mode command list.
5634
5635 2017-08-15  Stafford Horne  <shorne@gmail.com>
5636
5637         * MAINTAINERS (Write After Approval): Add Stafford Horne.
5638
5639 2017-08-15  Stafford Horne  <shorne@gmail.com>
5640
5641         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
5642
5643 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
5644
5645         PR gdb/21954
5646         * infcmd.c (unset_environment_command): Use the 'clear' method on
5647         the environment instead of resetting it.
5648
5649 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
5650
5651         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
5652         platforms.
5653
5654 2017-08-14  Tom Tromey  <tom@tromey.com>
5655
5656         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
5657         (print_binary_chars): Likewise.
5658         (BITS_IN_BYTES): Remove.
5659
5660 2017-08-14  Tom Tromey  <tom@tromey.com>
5661
5662         PR gdb/21675
5663         * valprint.c (LOW_ZERO): Change value to 034.
5664         (print_octal_chars): Add static_asserts for octal constants.
5665         * printcmd.c (print_scalar_formatted): Add 'd' case.
5666
5667 2017-08-11  Tom Tromey  <tom@tromey.com>
5668
5669         * symfile.c (add_symbol_file_command): Use std::vector.
5670
5671 2017-08-14  Tom Tromey  <tom@tromey.com>
5672
5673         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
5674         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5675         std::move.
5676         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
5677
5678 2017-08-11  Pedro Alves  <palves@redhat.com>
5679
5680         * infrun.c (process_event_stop_test): Adjust
5681         function_name_is_marked_for_skip call.
5682         * skip.c: Include <list>.
5683         (skiplist_entry): Make it a class with private fields, and
5684         getters/setters.
5685         (skiplist_entry_chain): Delete.
5686         (skiplist_entries): New.
5687         (skiplist_entry_count): Delete.
5688         (highest_skiplist_entry_num): New.
5689         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
5690         (add_skiplist_entry): Delete.
5691         (skiplist_entry::skiplist_entry): New.
5692         (skiplist_entry::add_entry): New.
5693         (skip_file_command, skip_function): Adjust.
5694         (compile_skip_regexp): Delete.
5695         (skip_command): Don't compile regexp here.  Adjust to use
5696         skiplist_entry::add_entry.
5697         (skip_info): Adjust to use range-for and getters.
5698         (skip_enable_command, skip_disable_command): Adjust to use
5699         range-for and setters.
5700         (skip_delete_command): Adjust to use std::list.
5701         (add_skiplist_entry): Delete.
5702         (skip_file_p): Delete, refactored as ...
5703         (skiplist_entry::do_skip_file_p): ... this new method.
5704         (skip_gfile_p): Delete, refactored as ...
5705         (skiplist_entry::do_gskip_file_p): ... this new method.
5706         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
5707         (skiplist_entry::skip_function_p): ... this new method.
5708         (function_name_is_marked_for_skip): Now returns bool, and takes
5709         the function sal by const reference.  Adjust to use range-for and
5710         skiplist_entry methods.
5711         (_initialize_step_skip): Remove references to
5712         skiplist_entry_chain, skiplist_entry_count.
5713         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
5714         takes the function sal by const reference.
5715
5716 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5717
5718         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
5719         (dwarf2_frame_cache): Remove reset_cache_cleanup.
5720         (dwarf2_frame_cache):
5721         * frame-unwind.c (frame_unwind_try_unwinder): Catch
5722         RETURN_MASK_ALL and set *this_case to NULL.
5723         * frame-unwind.h: Update comments.
5724
5725 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5726
5727         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
5728         (dwarf2_frame_state_copy_regs): Remove.
5729         (dwarf2_frame_state_free_regs): Remove.
5730         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
5731         (dwarf2_restore_rule): Call method .alloc_regs instead of
5732         dwarf2_frame_state_alloc_regs.
5733         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
5734         constructor.  Call std::move.
5735         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
5736         (dwarf2_frame_cache): Likewise.
5737
5738         [GDB_SELF_TEST]: Include selftest.h and
5739         selftest-arch.h.
5740         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
5741         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
5742         execute_cfa_program_test.
5743
5744         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
5745         copy ctor, assignment operator, move assignment.
5746         <alloc_regs>: New method.
5747         <swap>: New method.
5748         (struct dwarf2_frame_state): Delete dtor.
5749         (dwarf2_frame_state_alloc_regs): Remove declaration.
5750         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
5751         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
5752
5753 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5754
5755         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
5756         (dwarf2_frame_state::dwarf2_frame_state): New.
5757         (dwarf2_frame_state::~dwarf2_frame_state): New.
5758         (dwarf2_fetch_cfa_info): Update.
5759         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
5760         rather than a pointer.  Update code.
5761         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
5762         dtor.
5763         <data_align, code_align, retaddr_column>: Change them to const.
5764         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
5765         to bool.
5766
5767 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5768
5769         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
5770         <loc.exp>: New field.
5771         * dwarf2-frame.c (execute_cfa_program): Update.
5772         (dwarf2_frame_prev_register): Update.
5773
5774 2017-08-10  Pedro Alves  <palves@redhat.com>
5775
5776         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
5777
5778 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
5779
5780         * fbsd-nat.c (struct fbsd_fork_info): Remove.
5781         (fbsd_pending_children): Use std::list.
5782         (fbsd_remember_child): Likewise.
5783         (fbsd_is_child_pending): Likewise.
5784         (fbsd_pending_vfork_done): Use std::forward_list.
5785         (fbsd_add_vfork_done): Likewise.
5786         (fbsd_is_vfork_done_pending): Likewise.
5787         (fbsd_next_vfork_done): Likewise.
5788
5789 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
5790
5791         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
5792         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
5793         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
5794         for `mapfilename'.
5795         (fbsd_xfer_partial): Use gdb::byte_vector.
5796         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
5797
5798 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
5799
5800         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
5801         "filestuff.h".
5802         (fbsd_find_memory_regions): Fix `mapfile' initialization.
5803
5804 2017-08-09  Tom Tromey  <tom@tromey.com>
5805
5806         * skip.c (skiplist_entry): New constructor.
5807         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
5808         (skiplist_entry::file_is_glob): Now bool.
5809         (skiplist_entry::file, skiplist_entry::function): Now
5810         std::string.
5811         (make_skip_entry): Return a unique_ptr.  Use new.
5812         (free_skiplist_entry, free_skiplist_entry_cleanup)
5813         (make_free_skiplist_entry_cleanup): Remove.
5814         (skip_command, skip_disable_command, add_skiplist_entry)
5815         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
5816         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
5817         (function_name_is_marked_for_skip): Update.
5818         (skip_delete_command): Update.  Use delete.
5819
5820 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
5821
5822         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
5823         (aarch64_linux_core_read_description): New function.
5824         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
5825
5826 2017-08-09  Pedro Alves  <palves@redhat.com>
5827
5828         * cp-name-parser.y (cp_comp_to_string): Return a
5829         gdb::unique_xmalloc_ptr<char>.
5830         * cp-support.c (replace_typedefs_qualified_name)
5831         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
5832         (cp_canonicalize_string_full): Use op= instead of explicit
5833         convertion.
5834         (cp_class_name_from_physname, method_name_from_physname)
5835         (cp_func_name, cp_remove_params): Adjust to use
5836         gdb::unique_xmalloc_ptr<char>.
5837         * cp-support.h (cp_comp_to_string): Return a
5838         gdb::unique_xmalloc_ptr<char>.
5839         * python/py-type.c (typy_lookup_type): Adjust to use
5840         gdb::unique_xmalloc_ptr<char>.
5841
5842 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
5843
5844         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
5845
5846 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
5847             Yao Qi  <yao.qi@linaro.org>
5848
5849         * cp-support.c (cp_canonicalize_string_full): Use
5850         gdb::unique_xmalloc_ptr<char>.
5851         (cp_canonicalize_string): Likewise.
5852
5853 2017-08-09  Yao Qi  <yao.qi@linaro.org>
5854
5855         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
5856         * regformats/i386/amd64-avx-avx512.dat: Remove.
5857         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
5858         * regformats/i386/amd64-avx-mpx.dat:Remove.
5859         * regformats/i386/amd64-avx.dat: Remove.
5860         * regformats/i386/amd64-mpx.dat: Remove.
5861         * regformats/i386/i386-avx-avx512.dat: Remove.
5862         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
5863         * regformats/i386/i386-avx-mpx.dat: Remove.
5864         * regformats/i386/i386-mmx.dat: Remove.
5865         * regformats/i386/i386-mpx.dat: Remove.
5866
5867 2017-08-09  Yao Qi  <yao.qi@linaro.org>
5868
5869         * amd64-tdep.h (tdesc_x32): Remove the declaration.
5870         * amd64-tdep.c: Don't include features/i386/x32*.c.
5871         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
5872         functions.
5873         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
5874         and i386/x32-avx-avx512.
5875         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
5876         and i386/x32.xml.
5877         * features/i386/x32-avx-avx512.c: Removed.
5878         * features/i386/x32-avx-avx512.xml: Removed.
5879         * features/i386/x32-avx.c: Removed.
5880         * features/i386/x32-avx.xml: Removed.
5881         * features/i386/x32.c: Removed.
5882         * features/i386/x32.xml: Removed.
5883         * regformats/i386/x32-avx-avx512.dat: Removed.
5884         * regformats/i386/x32-avx.dat: Removed.
5885         * regformats/i386/x32.dat: Removed.
5886
5887 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
5888
5889         PR breakpoints/21886
5890         * mem-break.c (default_memory_insert_breakpoint): Use
5891         `->placed_address' rather than `->reqstd_address' for the
5892         breakpoint location.
5893
5894 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
5895
5896         * arch-utils.c (default_print_insn): Remove arch/mach/endian
5897         assertions.
5898
5899 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
5900
5901         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
5902         a union of `tdep_info', `tdesc_data' and `id'.
5903         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
5904         rather than `info.tdep_info'.
5905         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
5906         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5907         * i386-tdep.c (i386_gdbarch_init): Likewise.
5908         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
5909         * mips-tdep.c (mips_gdbarch_init): Likewise.
5910         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5911         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5912         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
5913         `info.tdep_info'.
5914         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
5915         `info.tdep_info'.
5916         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5917         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
5918         `info.tdep_info'.
5919         * spu-tdep.c (spu_gdbarch_init): Likewise.
5920         * gdbarch.h: Regenerate.
5921
5922 2017-08-07  Leszek Swirski  <leszeks@google.com>
5923
5924         PR symtab/20899
5925         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
5926
5927 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5928
5929         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
5930         (gdbsim_open): Rename gdb_argv args object to argv.
5931
5932 2017-08-05  Tom Tromey  <tom@tromey.com>
5933
5934         * compile/compile-object-load.c (compile_object_load): Use
5935         gdb::unique_xmalloc_ptr.
5936         * cli/cli-dump.c (scan_filename): Rename from
5937         scan_filename_with_cleanup.  Change return type.
5938         (scan_expression): Rename from scan_expression_with_cleanup.
5939         Change return type.
5940         (dump_memory_to_file, dump_value_to_file, restore_command):
5941         Use gdb::unique_xmalloc_ptr.  Update.
5942         * cli/cli-cmds.c (find_and_open_script): Use
5943         gdb::unique_xmalloc_ptr.
5944         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
5945         * symmisc.c (maintenance_print_symbols)
5946         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
5947         * symfile.c (symfile_bfd_open, generic_load)
5948         (add_symbol_file_command, remove_symbol_file_command): Use
5949         gdb::unique_xmalloc_ptr.
5950         * source.c (openp): Use gdb::unique_xmalloc_ptr.
5951         * psymtab.c (maintenance_print_psymbols): Use
5952         gdb::unique_xmalloc_ptr.
5953         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
5954         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
5955         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
5956         (reload_shared_libraries_1): Likewise.
5957
5958 2017-08-05  Tom Tromey  <tom@tromey.com>
5959
5960         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
5961         (rust_op_vector, rust_set_vector): New typedefs.
5962         (current_parser): New global.
5963         (work_obstack): Change to pointer type.  Update all users.
5964         (rust_ast, pstate): Remove globals.
5965         (struct rust_parser): New.
5966         (%union) <params, field_inits>: Change type.
5967         (start, tuple_expr, unit_expr, struct_expr_list, literal)
5968         (field_expr, expr_list, maybe_expr_list, type_list): Update.
5969         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
5970         (convert_params_to_types, convert_params_to_expression): Change
5971         type of "params".
5972         (ast_string): Change type of "fields".
5973         (rust_parse): Make a rust_parser.  Remove cleanups.
5974         (rust_lex_tests): Make and install an auto_obstack.
5975
5976 2017-08-04  Yao Qi  <yao.qi@linaro.org>
5977
5978         * configure.srv (ipa_x32_linux_regobj): New.
5979         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
5980         instead of X86_TDESC_AVX512.
5981         (initialize_low_tracepoint): Call
5982         init_registers_x32_avx_avx512_linux.
5983
5984 2017-08-04  Yao Qi  <yao.qi@linaro.org>
5985
5986         * utils.h (gdb_argv): Add namespace std for nullptr_t.
5987
5988 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5989
5990         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
5991
5992 2017-08-03  Tom Tromey  <tom@tromey.com>
5993
5994         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
5995         Remove.
5996         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
5997
5998 2017-08-03  Tom Tromey  <tom@tromey.com>
5999
6000         * python/py-param.c (compute_enum_values): Use gdb_argv.
6001
6002 2017-08-03  Tom Tromey  <tom@tromey.com>
6003
6004         * utils.h (struct gdb_argv_deleter): New.
6005         (gdb_argv): New class.
6006         * utils.c (gdb_argv::reset): New method.
6007         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
6008         * tracefile.c (tsave_command): Use gdb_argv.
6009         * top.c (new_ui_command): Use gdb_argv.
6010         * symmisc.c (maintenance_print_symbols)
6011         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
6012         * symfile.c (symbol_file_command, generic_load)
6013         (remove_symbol_file_command): Use gdb_argv.
6014         * stack.c (backtrace_command): Use gdb_argv.
6015         * source.c (add_path, show_substitute_path_command)
6016         (unset_substitute_path_command, set_substitute_path_command):
6017         Use gdb_argv.
6018         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
6019         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
6020         * remote.c (extended_remote_run, remote_put_command)
6021         (remote_get_command, remote_delete_command): Use gdb_argv.
6022         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
6023         (gdbsim_open): Use gdb_argv.
6024         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
6025         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
6026         * procfs.c (procfs_info_proc): Use gdb_argv.
6027         * interps.c (interpreter_exec_cmd): Use gdb_argv.
6028         * infrun.c (handle_command): Use gdb_argv.
6029         * inferior.c (add_inferior_command, clone_inferior_command):
6030         Use gdb_argv.
6031         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
6032         * exec.c (exec_file_command): Use gdb_argv.
6033         * cli/cli-cmds.c (alias_command): Use gdb_argv.
6034         * compile/compile.c (build_argc_argv): Use gdb_argv.
6035
6036 2017-08-03  Tom Tromey  <tom@tromey.com>
6037
6038         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
6039
6040 2017-08-03  Tom Tromey  <tom@tromey.com>
6041
6042         * python/python.c (compute_python_string): Return std::string.
6043         (gdbpy_eval_from_control_command): Update.
6044         (do_start_initialization): Use std::string.
6045         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
6046         xstrprintf.
6047         * python/py-breakpoint.c (local_setattro): Use string_printf, not
6048         xstrprintf.
6049
6050 2017-08-03  Tom Tromey  <tom@tromey.com>
6051
6052         * top.h (do_restore_instream_cleanup): Remove.
6053         * top.c (do_restore_instream_cleanup): Remove.
6054         (read_command_file): Use scoped_restore.
6055         * cli/cli-script.c (execute_user_command): Use scoped_restore.
6056
6057 2017-08-03  Tom Tromey  <tom@tromey.com>
6058
6059         * cli/cli-script.c (execute_user_command)
6060         (execute_control_command): Use scoped_restore.
6061
6062 2017-08-03  Tom Tromey  <tom@tromey.com>
6063
6064         * cli/cli-script.c (do_restore_user_call_depth): Remove.
6065         (execute_user_command): Remove user_call_depth; use
6066         user_args_stack's size instead.
6067
6068 2017-08-03  Tom Tromey  <tom@tromey.com>
6069
6070         * top.h (in_user_command): Remove.
6071         * top.c (in_user_command): Remove.
6072         * cli/cli-script.c (do_restore_user_call_depth)
6073         (execute_user_command): Update.
6074
6075 2017-08-03  Tom Tromey  <tom@tromey.com>
6076
6077         * valops.c (search_struct_method): Use gdb::byte_vector.
6078         * valarith.c (value_concat): Use std::vector.
6079         * target.c (memory_xfer_partial): Use gdb::byte_vector.
6080         (simple_search_memory): Likewise.
6081         * printcmd.c (find_string_backward): Use gdb::byte_vector.
6082         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
6083         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
6084         * elfread.c (elf_rel_plt_read): Use std::string.
6085         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
6086         * cli/cli-dump.c (restore_section_callback): Use
6087         gdb::byte_vector.
6088
6089 2017-08-03  Tom Tromey  <tom@tromey.com>
6090
6091         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
6092
6093 2017-08-03  Tom Tromey  <tom@tromey.com>
6094
6095         * tui/tui-regs.c (tui_restore_gdbout): Remove.
6096         (tui_register_format): Use scoped_restore.
6097
6098 2017-08-03  Tom Tromey  <tom@tromey.com>
6099
6100         * reverse.c (exec_direction_default): Remove.
6101         (exec_reverse_once): Use scoped_restore.
6102         * remote.c (restore_remote_timeout): Remove.
6103         (remote_flash_erase, remote_flash_write, remote_flash_done)
6104         (readchar, remote_serial_write): Use scoped_restore.
6105         * cli/cli-script.c (struct source_cleanup_lines_args)
6106         (source_cleanup_lines): Remove.
6107         (script_from_file): Use scoped_restore.
6108         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
6109         (source_command): Use scoped_restore.
6110
6111 2017-08-03  Tom Tromey  <tom@tromey.com>
6112
6113         * utils.h (make_cleanup_free_so): Remove.
6114         * utils.c (do_free_so, make_cleanup_free_so): Remove.
6115         * solist.h (struct so_deleter): New.
6116         (so_list_up): New typedef.
6117         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
6118
6119 2017-08-03  Tom Tromey  <tom@tromey.com>
6120
6121         * utils.h (make_cleanup_restore_current_language): Remove.
6122         * utils.c (do_restore_current_language)
6123         (make_cleanup_restore_current_language): Remove.
6124         * parse.c (parse_exp_in_context_1)
6125         (parse_expression_with_language): Use
6126         scoped_restore_current_language.
6127         * mi/mi-main.c (mi_cmd_execute): Use
6128         scoped_restore_current_language.
6129         * language.h (scoped_restore_current_language): New class.
6130
6131 2017-08-03  Tom Tromey  <tom@tromey.com>
6132
6133         * compile/compile.c (cleanup_unlink_file): Remove.
6134         (compile_to_object): Use gdb::unlinker.
6135         (eval_compile_command): Likewise.
6136
6137 2017-08-03  Tom Tromey  <tom@tromey.com>
6138
6139         * utils.h (make_cleanup_fclose): Remove.
6140         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
6141
6142 2017-08-03  Tom Tromey  <tom@tromey.com>
6143
6144         * top.c (open_terminal_stream): Return gdb_file_up.
6145         (new_ui_command): Update.
6146
6147 2017-08-03  Tom Tromey  <tom@tromey.com>
6148
6149         * source.c (print_source_lines_base, forward_search_command)
6150         (reverse_search_command): Use gdb_file_up.
6151
6152 2017-08-03  Tom Tromey  <tom@tromey.com>
6153
6154         * fbsd-nat.c (fbsd_find_memory_regions): Update.
6155
6156 2017-08-03  Tom Tromey  <tom@tromey.com>
6157
6158         * cli/cli-cmds.c (find_and_open_script): Change return type.
6159         Remove "streamp" and "full_path" parameters.
6160         (source_script_with_search): Update.
6161         * auto-load.c (source_script_file): Update.
6162         * cli/cli-cmds.h (find_and_open_script): Change type.
6163         (open_script): New struct.
6164
6165 2017-08-03  Tom Tromey  <tom@tromey.com>
6166
6167         * xml-support.c (xml_fetch_content_from_file): Update.
6168         * ui-file.c (stdio_file::open): Update.
6169         * tracefile-tfile.c (tfile_start): Update.
6170         * remote.c (remote_file_put, remote_file_get): Update.
6171         * nat/linux-procfs.c (linux_proc_get_int)
6172         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
6173         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
6174         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
6175         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
6176         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
6177         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
6178         * linux-nat.c (linux_proc_pending_signals): Update.
6179         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
6180         (file_closer): Remove.
6181         * compile/compile.c (compile_to_object): Update.
6182         * common/filestuff.h (struct gdb_file_deleter): New.
6183         (gdb_file_up): New typedef.
6184         (gdb_fopen_cloexec): Change return type.
6185         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
6186         * cli/cli-dump.c (fopen_with_cleanup): Remove.
6187         (dump_binary_file, restore_binary_file): Update.
6188         * auto-load.c (auto_load_objfile_script_1): Update.
6189
6190 2017-08-03  Tom Tromey  <tom@tromey.com>
6191
6192         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
6193         (info_static_tracepoint_markers_command): Likewise.
6194         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
6195         * skip.c (skip_info): Use ui_out_emit_table.
6196         * progspace.c (print_program_space): Use ui_out_emit_table.
6197         * osdata.c (info_osdata): Use ui_out_emit_table.
6198         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
6199         ui_out_emit_table.
6200         * linux-thread-db.c (info_auto_load_libthread_db): Use
6201         ui_out_emit_table.
6202         * inferior.c (print_inferior): Use ui_out_emit_table.
6203         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
6204         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
6205         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
6206         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
6207         * ui-out.h (class ui_out_emit_table): New.
6208
6209 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
6210
6211         * mips-tdep.c (mips_fpu_type_str): New function.
6212         (mips_dump_tdep): Call it.
6213
6214 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
6215
6216         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
6217         `->mips_fpu_type'.
6218
6219 2017-07-31  Xavier Roirand  <roirand@adacore.com>
6220
6221         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
6222
6223 2017-07-27  Xavier Roirand  <roirand@adacore.com>
6224
6225         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
6226
6227 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6228
6229         * cli/cli-cmds.c (maintenancechecklist): New variable.
6230         * gdbcmd.h (maintenancechecklist): Declare it.
6231         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
6232         Call i386_linux_read_description with different masks.
6233         * maint.c (maintenance_check_command): New function.
6234         (_initialize_maint_cmds): Call add_prefix_cmd.
6235         * target-descriptions.c (tdesc_reg): override operator != and ==.
6236         (tdesc_type): Likewise.
6237         (tdesc_feature): Likewise.
6238         (target_desc): Likewise.
6239         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
6240         (maintenance_check_xml_descriptions): New function.
6241         (_initialize_target_descriptions) Add command "xml-descriptions".
6242         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
6243
6244 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6245
6246         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
6247         Include features/i386/32bit-*.c.
6248         (i386_linux_read_description): Generate target description if it
6249         doesn't exist.
6250         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
6251         functions.
6252         * features/i386/32bit-linux.c: Re-generated.
6253         * features/i386/32bit-sse.c: Likewise.
6254         * target-descriptions.c (print_c_feature::visit): Print code to
6255         set register number if needed.
6256         (print_c_feature) <m_next_regnum>: New field.
6257
6258 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6259
6260         * features/Makefile (CFILES): Rename with TDESC_CFILES.
6261         (FEATURE_XMLFILES): New.
6262         (FEATURE_CFILES): New.
6263         New rules.
6264         (clean-cfiles): Remove generated c files.
6265         * features/i386/32bit-avx.c: Generated.
6266         * features/i386/32bit-avx512.c: Generated.
6267         * features/i386/32bit-core.c: Generated.
6268         * features/i386/32bit-linux.c: Generated.
6269         * features/i386/32bit-mpx.c: Generated.
6270         * features/i386/32bit-pkeys.c: Generated.
6271         * features/i386/32bit-sse.c: Generated.
6272         * target-descriptions.c: Include algorithm.
6273         (tdesc_element_visitor): Add method visit_end.
6274         (print_c_tdesc): Implement visit_end.
6275         (print_c_tdesc:: m_filename_after_features): Move it to
6276         protected.
6277         (print_c_feature): New class.
6278         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
6279         name starts with "i386/32bit-".
6280
6281 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6282
6283         * target-descriptions.c (tdesc_element_visitor): New class.
6284         (tdesc_element): New class.
6285         (tdesc_reg): Inherit from tdesc_element.
6286         (tdesc_reg::accept): New function.
6287         (tdesc_type): Inherit from tdesc_element.
6288         (tdesc_type::accept): New function.
6289         (tdesc_feature): Inherit from tdesc_element.
6290         (tdesc_feature::accept): New function.
6291         (target_desc): Inherit from tdesc_element.
6292         (target_desc::target_desc): New.
6293         (target_desc::~target_desc): New.
6294         (target_desc::accept): New.
6295         (allocate_target_description): Use new.
6296         (free_target_description): Use delete.
6297         (print_c_tdesc): New class.
6298         (maint_print_c_tdesc_cmd): Adjust.
6299
6300         * features/aarch64.c: Re-generated.
6301         * features/arc-arcompact.c: Re-generated.
6302         * features/arc-v2.c: Re-generated.
6303         * features/arm/arm-with-iwmmxt.c: Re-generated.
6304         * features/arm/arm-with-m.c: Re-generated.
6305         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
6306         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
6307         * features/arm/arm-with-neon.c: Re-generated.
6308         * features/arm/arm-with-vfpv2.c: Re-generated.
6309         * features/arm/arm-with-vfpv3.c: Re-generated.
6310         * features/i386/amd64-avx-avx512.c: Re-generated.
6311         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6312         * features/i386/amd64-avx.c: Re-generated.
6313         * features/i386/amd64-avx-linux.c: Re-generated.
6314         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
6315         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6316         * features/i386/amd64-avx-mpx.c: Re-generated.
6317         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
6318         * features/i386/amd64.c: Re-generated.
6319         * features/i386/amd64-linux.c: Re-generated.
6320         * features/i386/amd64-mpx.c: Re-generated.
6321         * features/i386/amd64-mpx-linux.c: Re-generated.
6322         * features/i386/i386-avx-avx512.c: Re-generated.
6323         * features/i386/i386-avx-avx512-linux.c: Re-generated.
6324         * features/i386/i386-avx.c: Re-generated.
6325         * features/i386/i386-avx-linux.c: Re-generated.
6326         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
6327         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
6328         * features/i386/i386-avx-mpx.c: Re-generated.
6329         * features/i386/i386-avx-mpx-linux.c: Re-generated.
6330         * features/i386/i386.c: Re-generated.
6331         * features/i386/i386-linux.c: Re-generated.
6332         * features/i386/i386-mmx.c: Re-generated.
6333         * features/i386/i386-mmx-linux.c: Re-generated.
6334         * features/i386/i386-mpx.c: Re-generated.
6335         * features/i386/i386-mpx-linux.c: Re-generated.
6336         * features/i386/x32-avx-avx512.c: Re-generated.
6337         * features/i386/x32-avx-avx512-linux.c: Re-generated.
6338         * features/i386/x32-avx.c: Re-generated.
6339         * features/i386/x32-avx-linux.c: Re-generated.
6340         * features/i386/x32.c: Re-generated.
6341         * features/i386/x32-linux.c: Re-generated.
6342         * features/microblaze.c: Re-generated.
6343         * features/microblaze-with-stack-protect.c: Re-generated.
6344         * features/mips64-dsp-linux.c: Re-generated.
6345         * features/mips64-linux.c: Re-generated.
6346         * features/mips-dsp-linux.c: Re-generated.
6347         * features/mips-linux.c: Re-generated.
6348         * features/nds32.c: Re-generated.
6349         * features/nios2.c: Re-generated.
6350         * features/nios2-linux.c: Re-generated.
6351         * features/rs6000/powerpc-32.c: Re-generated.
6352         * features/rs6000/powerpc-32l.c: Re-generated.
6353         * features/rs6000/powerpc-403.c: Re-generated.
6354         * features/rs6000/powerpc-403gc.c : Re-generated.
6355         * features/rs6000/powerpc-405.c: Re-generated.
6356         * features/rs6000/powerpc-505.c: Re-generated.
6357         * features/rs6000/powerpc-601.c: Re-generated.
6358         * features/rs6000/powerpc-602.c: Re-generated.
6359         * features/rs6000/powerpc-603.c: Re-generated.
6360         * features/rs6000/powerpc-604.c: Re-generated.
6361         * features/rs6000/powerpc-64.c: Re-generated.
6362         * features/rs6000/powerpc-64l.c: Re-generated.
6363         * features/rs6000/powerpc-7400.c: Re-generated.
6364         * features/rs6000/powerpc-750.c: Re-generated.
6365         * features/rs6000/powerpc-860.c: Re-generated.
6366         * features/rs6000/powerpc-altivec32.c: Re-generated.
6367         * features/rs6000/powerpc-altivec32l.c: Re-generated.
6368         * features/rs6000/powerpc-altivec64.c: Re-generated.
6369         * features/rs6000/powerpc-altivec64l.c: Re-generated.
6370         * features/rs6000/powerpc-cell32l.c: Re-generated.
6371         * features/rs6000/powerpc-cell64l.c: Re-generated.
6372         * features/rs6000/powerpc-e500.c: Re-generated.
6373         * features/rs6000/powerpc-e500l.c: Re-generated.
6374         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
6375         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
6376         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
6377         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
6378         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
6379         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
6380         * features/rs6000/powerpc-vsx32.c: Re-generated.
6381         * features/rs6000/powerpc-vsx32l.c: Re-generated.
6382         * features/rs6000/powerpc-vsx64.c: Re-generated.
6383         * features/rs6000/powerpc-vsx64l.c: Re-generated.
6384         * features/rs6000/rs6000.c: Re-generated.
6385         * features/s390-linux32.c: Re-generated.
6386         * features/s390-linux32v1.c: Re-generated.
6387         * features/s390-linux32v2.c: Re-generated.
6388         * features/s390-linux64.c: Re-generated.
6389         * features/s390-linux64v1.c: Re-generated.
6390         * features/s390-linux64v2.c: Re-generated.
6391         * features/s390-te-linux64.c: Re-generated.
6392         * features/s390-tevx-linux64.c: Re-generated.
6393         * features/s390-vx-linux64.c: Re-generated.
6394         * features/s390x-linux64.c: Re-generated.
6395         * features/s390x-linux64v1.c: Re-generated.
6396         * features/s390x-linux64v2.c: Re-generated.
6397         * features/s390x-te-linux64.c: Re-generated.
6398         * features/s390x-tevx-linux64.c: Re-generated.
6399         * features/s390x-vx-linux64.c: Re-generated.
6400         * features/sparc/sparc32-solaris.c: Re-generated.
6401         * features/sparc/sparc64-solaris.c: Re-generated.
6402         * features/tic6x-c62x.c: Re-generated.
6403         * features/tic6x-c62x-linux.c: Re-generated.
6404         * features/tic6x-c64x.c: Re-generated.
6405         * features/tic6x-c64x-linux.c: Re-generated.
6406         * features/tic6x-c64xp.c: Re-generated.
6407         * features/tic6x-c64xp-linux.c: Re-generated.
6408
6409 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6410
6411         * i386-linux-tdep.c (i386_linux_read_description): New function.
6412         (i386_linux_core_read_description): Call
6413         i386_linux_read_description.
6414         * i386-linux-tdep.h (i386_linux_read_description): Declare.
6415         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
6416         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
6417         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
6418         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
6419         * x86-linux-nat.c (x86_linux_read_description): Call
6420         i386_linux_read_description.
6421
6422 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6423
6424         * NEWS: Mention it.
6425         * features/Makefile (%.c: %.xml): Pass the xml file name to
6426         command "maint print c-tdesc".
6427         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
6428         name from 'arg'.
6429
6430 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6431
6432         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
6433         in-class initialization.
6434         (tdesc_create_feature): Call new instead of XCNEW.
6435         (free_target_description): Ue delete.
6436
6437 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
6438
6439         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
6440
6441 2017-07-25  Yao Qi  <yao.qi@linaro.org>
6442
6443         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
6444         constant.
6445         (amd64_x32_init_abi): Likewise.
6446         * amd64-tdep.h (amd64_init_abi): Update declaration.
6447         (amd64_x32_init_abi): Likewise.
6448
6449 2017-07-25  Yao Qi  <yao.qi@linaro.org>
6450
6451         PR tdep/21717
6452         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
6453         condition for FPSCR.
6454         (arm_linux_store_inferior_registers): Likewise.
6455
6456 2017-07-22  Tom Tromey  <tom@tromey.com>
6457
6458         * break-catch-syscall.c (struct catch_syscall_inferior_data)
6459         <syscalls_counts>: Now a std::vector.
6460         (get_catch_syscall_inferior_data): Use "new".
6461         (catch_syscall_inferior_data_cleanup): Use "delete".
6462         (insert_catch_syscall, remove_catch_syscall)
6463         (clear_syscall_counts): Update.
6464
6465 2017-07-22  Tom Tromey  <tom@tromey.com>
6466
6467         * break-catch-syscall.c (syscall_catchpoint)
6468         <syscalls_to_be_caught>: Now a std::vector<int>
6469         (~syscall_catchpoint): Remove.
6470         (insert_catch_syscall, remove_catch_syscall)
6471         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
6472         (print_mention_catch_syscall, print_recreate_catch_syscall):
6473         Update.
6474         (create_syscall_event_catchpoint): Change type of "filter"
6475         parameter.
6476         (catch_syscall_split_args): Return a std::vector.
6477         (catch_syscall_command_1, catching_syscall_number_1): Update.
6478
6479 2017-07-22  Tom Tromey  <tom@tromey.com>
6480
6481         * break-catch-throw.c (struct exception_catchpoint)
6482         <exception_rx>: Now a std::string.
6483         (~exception_catchpoint): Remove.
6484         (print_one_detail_exception_catchpoint): Update.
6485         (handle_gnu_v3_exceptions): Change type of except_rx.
6486         (extract_exception_regexp): Return a std::string.
6487         (catch_exception_command_1): Update.
6488
6489 2017-07-22  Tom Tromey  <tom@tromey.com>
6490
6491         * break-catch-sig.c (gdb_signal_type): Remove typedef.
6492         (struct signal_catchpoint) <signals_to_be_caught>: Now a
6493         std::vector.
6494         <catch_all>: Now a bool.
6495         (~signal_catchpoint): Remove.
6496         (signal_catchpoint_insert_location)
6497         (signal_catchpoint_remove_location)
6498         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
6499         (signal_catchpoint_print_mention)
6500         (signal_catchpoint_print_recreate)
6501         (signal_catchpoint_explains_signal): Update.
6502         (create_signal_catchpoint): Change type of "filter" and
6503         "catch_all".
6504         (catch_signal_split_args): Return a std::vector.  Change type of
6505         "catch_all".
6506         (catch_signal_command): Update.
6507
6508 2017-07-20  Pedro Alves  <palves@redhat.com>
6509
6510         * ada-lang.c (ada_language_defn): Make extern.
6511         (_initialize_ada_language): Remove add_language call.
6512         * c-lang.c (c_language_defn, cplus_language_defn)
6513         (asm_language_defn, minimal_language_defn): Make extern.
6514         (_initialize_c_language): Delete.
6515         * completer.c (compare_cstrings): Delete, moved to utils.h.
6516         * d-lang.c (d_language_defn): Make extern.
6517         (_initialize_d_language): Remove add_language calls.
6518         * defs.h (enum language): Add comment.
6519         * f-lang.c (f_language_defn): Make extern.
6520         (_initialize_f_language): Remove add_language call.
6521         * go-lang.c (go_language_defn): Make extern.
6522         (_initialize_go_language): Remove add_language call.
6523         * language.c: Include <algorithm>.
6524         (languages): Redefine as const array.
6525         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
6526         (set_language_command): Handle "local".  Use for-range loop.
6527         (set_language): Remove loop.
6528         (language_enum): Rewrite.
6529         (language_def, language_str): Remove loops.
6530         (add_language): Delete.
6531         (add_set_language_command): New, based on add_languages.
6532         (skip_language_trampoline): Adjust.
6533         (local_language_defn): Delete.
6534         (language_gdbarch_post_init): Adjust.
6535         (_initialize_language): Remove add_language calls.  Call
6536         add_set_language_command.
6537         * language.h (add_language): Delete.
6538         (auto_language_defn)
6539         (unknown_language_defn, minimal_language_defn, ada_language_defn)
6540         (asm_language_defn, c_language_defn, cplus_language_defn)
6541         (d_language_defn, f_language_defn, go_language_defn)
6542         (m2_language_defn, objc_language_defn, opencl_language_defn)
6543         (pascal_language_defn, rust_language_defn): Declare.
6544         * m2-lang.c (m2_language_defn): Make extern.
6545         (_initialize_m2_language): Remove add_language call.
6546         * objc-lang.c (objc_language_defn): Make extern.
6547         (_initialize_objc_language): Remove add_language call.
6548         * opencl-lang.c (opencl_language_defn): Make extern.
6549         (_initialize_opencl_language): Remove add_language call.
6550         * p-lang.c (pascal_language_defn): Make extern.
6551         (_initialize_pascal_language): Delete.
6552         * rust-lang.c (rust_language_defn): Make extern.
6553         (_initialize_rust_language): Delete.
6554         * utils.h (compare_cstrings): New static inline function.
6555
6556 2017-07-20  Pedro Alves  <palves@redhat.com>
6557
6558         * ada-lang.c (ada_to_fixed_type_1): Adjust.
6559         (get_var_value): Constify parameters.
6560         (get_int_var_value): Change prototype.
6561         (to_fixed_range_type): Adjust.
6562         * ada-lang.h (get_int_var_value): Change prototype.
6563
6564 2017-07-20  Pedro Alves  <palves@redhat.com>
6565
6566         * dwarf2read.c (dw2_lookup_symbol): Use
6567         SYMBOL_MATCHES_SEARCH_NAME.
6568         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
6569
6570 2017-07-20  Pedro Alves  <palves@redhat.com>
6571
6572         * block.c (block_iter_name_step, block_iter_name_first)
6573         (block_iter_name_next): Delete.
6574         (block_lookup_symbol_primary): Adjust to use
6575         dict_iter_match_first/dict_iter_match_next.
6576         * block.h (block_iter_name_first, block_iter_name_next): Delete
6577         declarations.
6578         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
6579         dict_iter_match_first/dict_iter_match_next.
6580
6581 2017-07-20  Pedro Alves  <palves@redhat.com>
6582
6583         * cp-support.c (cp_find_first_component_aux): Add missing case for
6584         end of string.
6585
6586 2017-07-18  David Blaikie  <dblaikie@gmail.com>
6587
6588         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
6589         of dwo_cu's dwo_file.
6590
6591 2017-07-18  Yao Qi  <yao.qi@linaro.org>
6592
6593         * remote.c (store_registers_using_G): Remove one line comment.
6594
6595 2017-07-18  Yao Qi  <yao.qi@linaro.org>
6596
6597         * regcache.c (regcache_cpy): Simplify it.
6598         (regcache::cpy_no_passthrough): Remove it.
6599         * regcache.h (cpy_no_passthrough): Remove it.
6600         (regcache_dup, regcache_cpy): Update comments.
6601
6602 2017-07-18  Pedro Alves  <palves@redhat.com>
6603
6604         * remote-sim.c (sim_command_completer): Adjust to work with a
6605         completion_tracker instead of a VEC.
6606
6607 2017-07-17  Pedro Alves  <palves@redhat.com>
6608
6609         * completer.c (complete_source_filenames): New function.
6610         (complete_address_and_linespec_locations): New function.
6611         (location_completer): Use complete_address_and_linespec_locations.
6612         (completion_tracker::build_completion_result): Honor the tracker's
6613         request to suppress append.
6614         * completer.h (completion_tracker::suppress_append_ws)
6615         (completion_tracker::set_suppress_append_ws): New methods.
6616         (completion_tracker::m_suppress_append_ws): New field.
6617         (complete_source_filenames): New declaration.
6618         * linespec.c (linespec_complete_what): New.
6619         (struct ls_parser) <complete_what, completion_word,
6620         completion_quote_char, completion_quote_end, completion_tracker>:
6621         New fields.
6622         (string_find_incomplete_keyword_at_end): New.
6623         (linespec_lexer_lex_string): Record quote char.  If in completion
6624         mode, don't throw.
6625         (linespec_lexer_consume_token): Advance the completion word point.
6626         (linespec_lexer_peek_token): Save/restore completion info.
6627         (save_stream_and_consume_token): New.
6628         (set_completion_after_number): New.
6629         (linespec_parse_basic): Set what to complete next depending on
6630         token.  Handle function and label completions specially.
6631         (parse_linespec): Disable objc shortcut in completion mode.  Set
6632         what to complete next depending on token type.  Skip keyword if in
6633         completion mode.
6634         (complete_linespec_component, linespec_complete): New.
6635         * linespec.h (linespec_complete): Declare.
6636
6637 2017-07-17  Pedro Alves  <palves@redhat.com>
6638
6639         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
6640         Handle 'operator<' / 'operator<<'.
6641
6642 2017-07-17  Pedro Alves  <palves@redhat.com>
6643
6644         * completer.c (collect_explicit_location_matches): Handle
6645         MATCH_LABEL.
6646         (convert_explicit_location_to_linespec): New, factored out from
6647         ...
6648         (convert_explicit_location_to_sals): ... this.
6649         (complete_label): New.
6650         (linespec_complete_label, find_label_symbols_in_block): New.
6651         (find_label_symbols): Add completion_mode parameter and adjust to
6652         call find_label_symbols_in_block.
6653         * linespec.h (linespec_complete_label): Declare.
6654
6655 2017-07-17  Pedro Alves  <palves@redhat.com>
6656
6657         * ada-lang.c (ada_collect_symbol_completion_matches): Add
6658         complete_symbol_mode parameter.
6659         * cli/cli-cmds.c (complete_command): Get the completion result out
6660         of the handle_brkchars tracker if used a custom word point.
6661         * completer.c: Include "linespec.h".
6662         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
6663         (advance_to_expression_complete_word_point): New.
6664         (completion_tracker::completes_to_completion_word): New.
6665         (complete_files_symbols): Pass down
6666         complete_symbol_mode::EXPRESSION.
6667         (explicit_options, probe_options): New.
6668         (collect_explicit_location_matches): Complete on the
6669         explictit_loc->foo instead of word.  Use
6670         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
6671         keyword and options completions.
6672         (backup_text_ptr): Delete.
6673         (skip_keyword): New.
6674         (complete_explicit_location): Remove 'word' parameter.  Add
6675         language, quoted_arg_start and quoted_arg_end parameters.
6676         Rewrite, parsing left to right.
6677         (location_completer): Rewrite.
6678         (location_completer_handle_brkchars): New function.
6679         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
6680         (enum complete_line_internal_reason): Adjust comments.
6681         (completion_tracker::discard_completions): New.
6682         (completer_handle_brkchars_func_for_completer): Handle
6683         location_completer.
6684         (gdb_custom_word_point_brkchars)
6685         (gdb_org_rl_basic_quote_characters): New.
6686         (gdb_completion_word_break_characters_throw)
6687         (completion_find_completion_word): Handle trackers that use a
6688         custom word point.
6689         (completion_tracker::advance_custom_word_point_by): New.
6690         (completion_tracker::build_completion_result): Don't rely on
6691         readline appending the quote char.
6692         (gdb_rl_attempted_completion_function_throw): Handle trackers that
6693         use a custom word point.
6694         (gdb_rl_attempted_completion_function): Restore
6695         rl_basic_quote_characters.
6696         * completer.h (class completion_tracker): Extend intro comment.
6697         (completion_tracker::set_quote_char)
6698         (completion_tracker::quote_char)
6699         (completion_tracker::set_use_custom_word_point)
6700         (completion_tracker::use_custom_word_point)
6701         (completion_tracker::custom_word_point)
6702         (completion_tracker::set_custom_word_point)
6703         (completion_tracker::advance_custom_word_point_by)
6704         (completion_tracker::completes_to_completion_word)
6705         (completion_tracker::discard_completions): New methods.
6706         (completion_tracker::m_quote_char)
6707         (completion_tracker::m_use_custom_word_point)
6708         (completion_tracker::m_custom_word_point): New fields.
6709         (advance_to_expression_complete_word_point): Declare.
6710         * f-lang.c (f_collect_symbol_completion_matches): Add
6711         complete_symbol_mode parameter.
6712         * language.h (struct language_defn)
6713         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
6714         parameter.
6715         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
6716         (linespec_complete_function): New function.
6717         (linespec_lexer_lex_keyword): Adjust.
6718         * linespec.h (linespec_keywords, linespec_complete_function): New
6719         declarations.
6720         * location.c (find_end_quote): New function.
6721         (explicit_location_lex_one): Add explicit_completion_info
6722         parameter.  Save quoting info.  Don't throw if being called for
6723         completion.  Don't handle Ada operators here.
6724         (is_cp_operator, skip_op_false_positives, first_of)
6725         (explicit_location_lex_one_function): New function.
6726         (string_to_explicit_location): Replace 'dont_throw' parameter with
6727         an explicit_completion_info pointer parameter.  Handle it.  Don't
6728         use explicit_location_lex_one to lex function names.  Use
6729         explicit_location_lex_one_function instead.
6730         * location.h (struct explicit_completion_info): New.
6731         (string_to_explicit_location): Replace 'dont_throw' parameter with
6732         an explicit_completion_info pointer parameter.
6733         * symtab.c (default_collect_symbol_completion_matches_break_on):
6734         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
6735         (default_collect_symbol_completion_matches)
6736         (collect_symbol_completion_matches): Add complete_symbol_mode
6737         parameter.
6738         (collect_symbol_completion_matches_type): Pass down
6739         complete_symbol_mode::EXPRESSION.
6740         (collect_file_symbol_completion_matches): Add complete_symbol_mode
6741         parameter.  Handle LINESPEC mode.
6742         * symtab.h (complete_symbol_mode): New.
6743         (default_collect_symbol_completion_matches_break_on)
6744         (default_collect_symbol_completion_matches)
6745         (collect_symbol_completion_matches)
6746         (collect_file_symbol_completion_matches): Add complete_symbol_mode
6747         parameter.
6748
6749 2017-07-17  Pedro Alves  <palves@redhat.com>
6750
6751         * utils.c (enum class strncmp_iw_mode): New.
6752         (strcmp_iw): Rename to ...
6753         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
6754         parameters.  Handle them.
6755         (strncmp_iw): New.
6756         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
6757         * utils.h (strncmp_iw): Declare.
6758         (strcmp_iw): Move describing comments here.
6759
6760 2017-07-17  Pedro Alves  <palves@redhat.com>
6761
6762         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
6763         CP_OPERATOR_STR.
6764         * c-typeprint.c (is_type_conversion_operator): Use
6765         CP_OPERATOR_STR.
6766         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
6767         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
6768         CP_OPERATOR_LEN.
6769         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
6770         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
6771         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
6772         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
6773         CP_OPERATOR_STR.
6774         * location.c: Include "cp-support.h".
6775         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
6776         CP_OPERATOR_STR.
6777         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
6778         CP_OPERATOR_LEN.
6779
6780 2017-07-17  Pedro Alves  <palves@redhat.com>
6781
6782         * cli/cli-cmds.c (complete_command): Use a completion tracker
6783         along with completion_find_completion_word for handle_brkchars
6784         phase.
6785         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
6786         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
6787         (struct gdb_rl_completion_word_info): New.
6788         (gdb_rl_find_completion_word): New.
6789         (completion_find_completion_word): New.
6790         * completer.h (completion_find_completion_word): Declare.
6791
6792 2017-07-17  Pedro Alves  <palves@redhat.com>
6793
6794         * ada-lang.c (symbol_completion_match): Adjust comments.
6795         (symbol_completion_add): Replace vector parameter with
6796         completion_tracker parameter.  Use it.
6797         (ada_make_symbol_completion_list): Rename to...
6798         (ada_collect_symbol_completion_matches): ... this.  Add
6799         completion_tracker parameter and use it.
6800         (ada_language_defn): Adjust.
6801         * break-catch-syscall.c (catch_syscall_completer): Adjust
6802         prototype and work with completion_tracker instead of VEC.
6803         * breakpoint.c (condition_completer): Adjust prototype and work
6804         with completion_tracker instead of VEC.
6805         * c-lang.c (c_language_defn, cplus_language_defn)
6806         (asm_language_defn, minimal_language_defn): Adjust to renames.
6807         * cli/cli-cmds.c (complete_command): Rework using
6808         completion_tracker.  Catch exceptions when completing.
6809         * cli/cli-decode.c (integer_unlimited_completer)
6810         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
6811         with completion_tracker instead of VEC.
6812         * command.h (struct completion_tracker): Forward declare.
6813         (completer_ftype, completer_handle_brkchars_ftype): Change
6814         types.
6815         (complete_on_cmdlist, complete_on_enum): Adjust.
6816         * completer.c: Include <algorithm>.
6817         (struct gdb_completer_state): New.
6818         (current_completion): New global.
6819         (readline_line_completion_function): Delete.
6820         (noop_completer, filename_completer)
6821         (filename_completer_handle_brkchars, complete_files_symbols)
6822         (linespec_location_completer): Adjust to work with a
6823         completion_tracker instead of a VEC.
6824         (string_or_empty): New.
6825         (collect_explicit_location_matches): Adjust to work with a
6826         completion_tracker instead of a VEC.
6827         (explicit_location_completer): Rename to ...
6828         (complete_explicit_location): ... this and adjust to work with a
6829         completion_tracker instead of a VEC.
6830         (location_completer): Adjust to work with a completion_tracker
6831         instead of a VEC.
6832         (add_struct_fields): Adjust to work with a completion_list instead
6833         of VEC.
6834         (expression_completer): Rename to ...
6835         (complete_expression): ... this and adjust to work with a
6836         completion_tracker instead of a VEC.  Use complete_files_symbols.
6837         (expression_completer): Reimplement on top of complete_expression.
6838         (symbol_completer): Adjust to work with a completion_tracker
6839         instead of a VEC.
6840         (enum complete_line_internal_reason): Add describing comments.
6841         (complete_line_internal_normal_command): Adjust to work with a
6842         completion_tracker instead of a VEC.
6843         (complete_line_internal): Rename to ...
6844         (complete_line_internal_1): ... this and adjust to work with a
6845         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
6846         handle_brkchars phase.
6847         (new_completion_tracker): Delete.
6848         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
6849         complete_line_internal_1.
6850         (free_completion_tracker): Delete.
6851         (INITIAL_COMPLETION_HTAB_SIZE): New.
6852         (completion_tracker::completion_tracker)
6853         (completion_tracker::~completion_tracker): New.
6854         (maybe_add_completion): Delete.
6855         (completion_tracker::maybe_add_completion)
6856         (completion_tracker::add_completion)
6857         (completion_tracker::add_completions): New.
6858         (throw_max_completions_reached_error): Delete.
6859         (complete_line): Adjust to work with a completion_tracker instead
6860         of a VEC.  Don't create a completion_tracker_t or check for max
6861         completions here.
6862         (command_completer, command_completer_handle_brkchars)
6863         (signal_completer, reg_or_group_completer_1)
6864         (reg_or_group_completer, default_completer_handle_brkchars):
6865         Adjust to work with a completion_tracker.
6866         (gdb_completion_word_break_characters_throw): New.
6867         (gdb_completion_word_break_characters): Reimplement.
6868         (line_completion_function): Delete.
6869         (completion_tracker::recompute_lowest_common_denominator)
6870         (expand_preserving_ws)
6871         (completion_tracker::build_completion_result)
6872         (completion_result::completion_result)
6873         (completion_result::completion_result)
6874         (completion_result::~completion_result)
6875         (completion_result::completion_result)
6876         (completion_result::release_match_list, compare_cstrings)
6877         (completion_result::sort_match_list)
6878         (completion_result::reset_match_list)
6879         (gdb_rl_attempted_completion_function_throw)
6880         (gdb_rl_attempted_completion_function): New.
6881         * completer.h (completion_list, struct completion_result)
6882         (class completion_tracker): New.
6883         (complete_line): Add completion_tracker parameter.
6884         (readline_line_completion_function): Delete.
6885         (gdb_rl_attempted_completion_function): New.
6886         (noop_completer, filename_completer, expression_completer)
6887         (location_completer, symbol_completer, command_completer)
6888         (signal_completer, reg_or_group_completer): Update prototypes.
6889         (completion_tracker_t, new_completion_tracker)
6890         (make_cleanup_free_completion_tracker): Delete.
6891         (enum maybe_add_completion_enum): Delete.
6892         (maybe_add_completion): Delete.
6893         (throw_max_completions_reached_error): Delete.
6894         * corefile.c (complete_set_gnutarget): Adjust to work with a
6895         completion_tracker instead of a VEC.
6896         * cp-abi.c (cp_abi_completer): Adjust to work with a
6897         completion_tracker instead of a VEC.
6898         * d-lang.c (d_language_defn): Adjust.
6899         * disasm.c (disassembler_options_completer): Adjust to work with a
6900         completion_tracker instead of a VEC.
6901         * f-lang.c (f_make_symbol_completion_list): Rename to ...
6902         (f_collect_symbol_completion_matches): ... this.  Adjust to work
6903         with a completion_tracker instead of a VEC.
6904         (f_language_defn): Adjust.
6905         * go-lang.c (go_language_defn): Adjust.
6906         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
6907         Adjust to work with a completion_tracker instead of a VEC.
6908         * infrun.c (handle_completer): Likewise.
6909         * interps.c (interpreter_completer): Likewise.
6910         * interps.h (interpreter_completer): Likewise.
6911         * language.c (unknown_language_defn, auto_language_defn)
6912         (local_language_defn): Adjust.
6913         * language.h (language_defn::la_make_symbol_completion_list):
6914         Rename to ...
6915         (language_defn::la_collect_symbol_completion_matches): ... this
6916         and adjust to work with a completion_tracker instead of a VEC.
6917         * m2-lang.c (m2_language_defn): Adjust.
6918         * objc-lang.c (objc_language_defn): Adjust.
6919         * opencl-lang.c (opencl_language_defn): Adjust.
6920         * p-lang.c (pascal_language_defn): Adjust.
6921         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
6922         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
6923         with a completion_tracker.
6924         * rust-lang.c (rust_language_defn): Adjust.
6925         * symtab.c (free_completion_list, do_free_completion_list)
6926         (return_val, completion_tracker): Delete.
6927         (completion_list_add_name, completion_list_add_symbol)
6928         (completion_list_add_msymbol, completion_list_objc_symbol)
6929         (completion_list_add_fields, add_symtab_completions): Add
6930         completion_tracker parameter and use it.
6931         (default_make_symbol_completion_list_break_on_1): Rename to...
6932         (default_collect_symbol_completion_matches_break_on): ... this.
6933         Add completion_tracker parameter and use it instead of allocating
6934         a completion tracker here.
6935         (default_make_symbol_completion_list_break_on): Delete old
6936         implementation.
6937         (default_make_symbol_completion_list): Delete.
6938         (default_collect_symbol_completion_matches): New.
6939         (make_symbol_completion_list): Delete.
6940         (collect_symbol_completion_matches): New.
6941         (make_symbol_completion_type): Rename to ...
6942         (collect_symbol_completion_matches_type): ... this.  Add
6943         completion_tracker parameter and use it instead of VEC.
6944         (make_file_symbol_completion_list_1): Rename to...
6945         (collect_file_symbol_completion_matches): ... this.  Add
6946         completion_tracker parameter and use it instead of VEC.
6947         (make_file_symbol_completion_list): Delete.
6948         (add_filename_to_list): Use completion_list instead of a VEC.
6949         (add_partial_filename_data::list): Now a completion_list.
6950         (make_source_files_completion_list): Work with a completion_list
6951         instead of a VEC.
6952         * symtab.h: Include "completer.h".
6953         (default_make_symbol_completion_list_break_on)
6954         (default_make_symbol_completion_list, make_symbol_completion_list)
6955         (make_symbol_completion_type, make_file_symbol_completion_list)
6956         (make_source_files_completion_list): Delete.
6957         (default_collect_symbol_completion_matches_break_on)
6958         (default_collect_symbol_completion_matches)
6959         (collect_symbol_completion_matches)
6960         (collect_symbol_completion_matches_type)
6961         (collect_file_symbol_completion_matches)
6962         (make_source_files_completion_list): New.
6963         * top.c (init_main): Don't install a rl_completion_entry_function
6964         hook.  Install a rl_attempted_completion_function hook instead.
6965         * tui/tui-layout.c (layout_completer): Adjust to work with a
6966         completion_tracker.
6967         * tui/tui-regs.c (tui_reggroup_completer):
6968         * tui/tui-win.c (window_name_completer, focus_completer)
6969         (winheight_completer): Adjust to work with a completion_tracker.
6970         * value.c: Include "completer.h".
6971         (complete_internalvar): Adjust to work with a completion_tracker.
6972         * value.h (complete_internalvar): Likewise.
6973
6974 2017-07-17  Pedro Alves  <palves@redhat.com>
6975
6976         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
6977         renames.
6978         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
6979         comments to completer_ftype's declaration.
6980         <completer_handle_brkchars>: Change type to
6981         completer_handle_brkchars_ftype.
6982         * command.h (completer_ftype): Add describing comment and give
6983         names to parameters.
6984         (completer_ftype_void): Rename to ...
6985         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
6986         (set_cmd_completer_handle_brkchars): Adjust.
6987         * completer.c (filename_completer_handle_brkchars): New function.
6988         (complete_line_internal_normal_command): New function, factored
6989         out from ...
6990         (complete_line_internal): ... here.
6991         (command_completer_handle_brkchars)
6992         (default_completer_handle_brkchars)
6993         (completer_handle_brkchars_func_for_completer): New functions.
6994         * completer.h (set_gdb_completion_word_break_characters): Delete
6995         declaration.
6996         (completer_handle_brkchars_func_for_completer): New declaration.
6997         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
6998         completer_handle_brkchars_func_for_completer.
6999
7000 2017-07-17  Pedro Alves  <palves@redhat.com>
7001
7002         * completer.c (symbol_completer): New function, based on
7003         make_symbol_completion_list_fn.
7004         * completer.h (symbol_completer): New declaration.
7005         * guile/scm-cmd.c (cmdscm_completers): Adjust.
7006         * python/py-cmd.c (completers): Adjust.
7007         * symtab.c (make_symbol_completion_list_fn): Delete.
7008         * symtab.h (make_symbol_completion_list_fn): Delete.
7009         * cli/cli-decode.c (add_cmd): Adjust.
7010
7011 2017-07-17  Pedro Alves  <palves@redhat.com>
7012
7013         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
7014         * dwarf2read.c: Include "filename-seen-cache.h".
7015         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
7016         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
7017         * filename-seen-cache.c: New file.
7018         * filename-seen-cache.h: New file.
7019         * symtab.c: Include "filename-seen-cache.h".
7020         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
7021         (create_filename_seen_cache, clear_filename_seen_cache)
7022         (delete_filename_seen_cache, filename_seen): Delete, parts moved
7023         to filename-seen-cache.h/filename-seen-cache.c.
7024         (output_source_filename, sources_info)
7025         (maybe_add_partial_symtab_filename)
7026         (make_source_files_completion_list): Adjust to use
7027         filename_seen_cache.
7028
7029 2017-07-17  Pedro Alves  <palves@redhat.com>
7030
7031         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
7032         fields.
7033         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
7034         dwarf2_debug_sections*)): New.
7035         (dwarf2_per_objfile::dwarf2_per_objfile(const
7036         dwarf2_per_objfile&)): Declare as deleted.
7037         (dwarf2_per_objfile::operator=): Declare as deleted.
7038         (dwarf2_per_objfile::dwarf2_per_objfile)
7039         (dwarf2_per_objfile::~dwarf2_per_objfile)
7040         (dwarf2_per_objfile::free_cached_comp_units): New.
7041         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
7042         ctor.  Call dwarf2_per_objfile's ctor manually.
7043         (dwarf2_locate_sections): Deleted/refactored as ...
7044         (dwarf2_per_objfile::locate_sections): ... this new method.
7045         (free_cached_comp_units): Defer to
7046         dwarf2_per_objfile::free_cached_comp_units.
7047         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
7048
7049 2017-07-14  Tom Tromey  <tom@tromey.com>
7050
7051         PR rust/21764:
7052         * rust-exp.y (convert_ast_to_expression): Add "want_type"
7053         parameter.
7054         <UNOP_SIZEOF>: Split into separate case.
7055         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
7056
7057 2017-07-14  Tom Tromey  <tom@tromey.com>
7058
7059         PR rust/21763:
7060         * symtab.c (symbol_matches_domain): Add language_rust to special
7061         case.
7062         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
7063         treat LOC_TYPEDEF symbols as variables.
7064
7065 2017-07-14  Pedro Alves  <palves@redhat.com>
7066
7067         * symtab.c (make_file_symbol_completion_list_1): Iterate over
7068         symtabs matching all symtabs with SRCFILE as file name instead of
7069         only considering the first hit, with lookup_symtab.
7070
7071 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7072
7073         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
7074         operator_name parameters.
7075         (gen_expr): Update function call.
7076
7077 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7078
7079         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
7080         parameter.
7081         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
7082         Likewise.
7083         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
7084         parameter, use agent_expr::gdbarch instead, update function
7085         calls.
7086         (locexpr_tracepoint_var_ref): Likewise.
7087         (loclist_tracepoint_var_ref): Likewise.
7088         * ax-gdb.c (gen_trace_static_fields): Likewise.
7089         (gen_traced_pop): Likewise.
7090         (gen_frame_args_address): Likewise.
7091         (gen_frame_locals_address): Likewise.
7092         (gen_var_ref): Likewise.
7093         (gen_struct_ref_recursive): Likewise.
7094         (gen_static_field): Likewise.
7095         (gen_maybe_namespace_elt): Likewise.
7096         (gen_expr): Likewise.
7097         (gen_trace_for_var): Likewise.
7098         (gen_trace_for_expr): Likewise.
7099         (gen_trace_for_return_address): Likewise.
7100
7101 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7102
7103         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
7104         parameter.
7105         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
7106
7107 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7108
7109         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
7110         from ax, update calls.
7111         (gen_usual_arithmetic): Likewise.
7112         (gen_integral_promotions): Likewise.
7113         (gen_bitfield_ref): Likewise.
7114         (gen_primitive_field): Likewise.
7115         (gen_struct_ref_recursive): Likewise.
7116         (gen_struct_ref): Likewise.
7117         (gen_maybe_namespace_elt): Likewise.
7118         (gen_struct_elt_for_reference): Likewise.
7119         (gen_namespace_elt): Likewise.
7120         (gen_aggregate_elt_ref): Likewise.
7121         (gen_expr): Get gdbarch from ax, update calls.
7122         (gen_expr_binop_rest): Likewise.
7123
7124 2017-07-13  Pedro Alves  <palves@redhat.com>
7125
7126         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
7127         as default tdesc.
7128         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
7129         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
7130         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
7131         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
7132         tdep.
7133         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
7134         Get final tdesc from the tdep.
7135         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
7136         default tdesc.
7137         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7138         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7139         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
7140         Use it as default tdesc.
7141         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
7142         down to amd_init_abi.  No longer handle fallback tdesc here.
7143         * amd64-tdep.h (tdesc_x32): Declare.
7144         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
7145         parameter.
7146         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
7147         as default tdesc.
7148
7149 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7150
7151         * s390-linux-tdep.c (s390_process_record): Add support for
7152         instructions new in arch12.
7153
7154 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7155
7156         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
7157         PT_GETFSBASE and PT_GETGSBASE.
7158         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
7159         PT_SETGSBASE.
7160
7161 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7162
7163         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
7164         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
7165         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
7166         those rules.
7167         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
7168         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
7169         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
7170         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
7171         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
7172         * features/i386/amd64.xml: Add 64bit-segments.xml.
7173         * features/i386/amd64-avx-avx512.c: Regenerated.
7174         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
7175         * features/i386/amd64-avx-mpx.c: Regenerated.
7176         * features/i386/amd64-avx.c: Regenerated.
7177         * features/i386/amd64-mpx.c: Regenerated.
7178         * features/i386/amd64.c: Regenerated.
7179         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
7180         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7181         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
7182         * regformats/i386/amd64-avx.dat: Regenerated.
7183         * regformats/i386/amd64-mpx.dat: Regenerated.
7184         * regformats/i386/amd64.dat: Regenerated.
7185
7186 2017-07-10  Yao Qi  <yao.qi@linaro.org>
7187
7188         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7189         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7190
7191 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
7192
7193         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
7194         unsetenv.
7195         * gnulib/aclocal.m4: Regenerate.
7196         * gnulib/config.in: Regenerate.
7197         * gnulib/configure: Regenerate.
7198         * gnulib/import/Makefile.am: Regenerate.
7199         * gnulib/import/Makefile.in: Regenerate.
7200         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7201         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7202         * gnulib/import/m4/environ.m4: New file.
7203         * gnulib/import/m4/setenv.m4: New file.
7204         * gnulib/import/setenv.c: New file.
7205         * gnulib/import/unsetenv.c: New file.
7206
7207 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
7208
7209         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
7210         address when op is DW_OP_addr.
7211
7212 2017-07-09  Tom Tromey  <tom@tromey.com>
7213
7214         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
7215         check and apply to outer type.
7216
7217 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7218
7219         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
7220         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
7221         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
7222         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
7223
7224 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7225
7226         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
7227
7228 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7229
7230         * corelow.c (get_core_siginfo): Remove.
7231         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
7232         instead of get_core_siginfo.
7233         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
7234         * gdbarch.h: Re-generate.
7235         * gdbarch.c: Re-generate.
7236         * linux-tdep.c (linux_core_xfer_siginfo): New.
7237         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
7238
7239 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7240
7241         * corelow.c (thread_section_name): Move to ...
7242         * gdbcore.h (thread_section_name): ... here.
7243
7244 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7245
7246         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
7247         (struct siginfo32): New.
7248         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
7249         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
7250         via ptrace(PT_LWPINFO).
7251
7252 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7253
7254         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
7255         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
7256         (fbsd_get_siginfo_type): New.
7257         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
7258         (_initialize_fbsd_tdep): New.
7259
7260 2017-07-06  David Blaikie  <dblaikie@gmail.com>
7261
7262         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
7263         a singular dwo_unit*) to support multiple CUs in the same way that
7264         multiple TUs are supported.
7265         (create_cus_hash_table): Replace create_dwo_cu with a function for
7266         parsing multiple CUs from a DWO file.
7267         (open_and_init_dwo_file): Use create_cus_hash_table rather than
7268         create_dwo_cu.
7269         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
7270         htab_find, rather than comparing the signature to a singleton CU in
7271         the dwo_file.
7272
7273 2017-07-06  Pedro Alves  <palves@redhat.com>
7274
7275         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
7276
7277 2017-07-04  Pedro Alves  <palves@redhat.com>
7278
7279         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
7280         * gdbtypes.h (TYPE_STATIC): Delete.
7281         (struct fn_field) <is_public, is_abstract, is_static, is_final,
7282         is_synchronized, is_native>: Delete.
7283         <dummy>: Bump.
7284         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
7285         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
7286         (TYPE_FN_FIELD_ABSTRACT): Delete.
7287
7288 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
7289
7290         * buffer.h (buffer_finish): Fix spelling mistakes.
7291
7292 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
7293
7294         * .dir-locals.el: Automatically switch to C-style comments in
7295         versions of Emacs that support the feature.
7296
7297 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7298             Pedro Alves  <palves@redhat.com>
7299
7300         PR cli/21688
7301         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
7302         (process_next_line): New variable 'inline_cmd'.
7303         Adjust 'if' clauses for "python", "compile" and "guile" to use
7304         'command_name_equals' and check for '!inline_cmd'.
7305
7306 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7307
7308         PR cli/21688
7309         * cli/cli-script.c (command_name_equals_not_inline): New function.
7310         (process_next_line): Adjust 'if' clauses for "python", "compile"
7311         and "guile" to use command_name_equals_not_inline.
7312
7313 2017-06-29  Pedro Alves  <palves@redhat.com>
7314
7315         * completer.c (expression_completer): Call
7316         linespec_location_completer instead of location_completer.
7317
7318 2017-06-29  Pedro Alves  <palves@redhat.com>
7319
7320         * completer.c (expression_completer): Remove code that recomputes
7321         'text' from 'word'.
7322
7323 2017-06-29  Yao Qi  <yao.qi@linaro.org>
7324
7325         * regformats/regdat.sh: Generate code with
7326         "ifndef IN_PROCESS_AGENT".
7327
7328 2017-06-28  Pedro Alves  <palves@redhat.com>
7329
7330         * command.h: Include "common/scoped_restore.h".
7331
7332 2017-06-28  Yao Qi  <yao.qi@linaro.org>
7333
7334         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
7335         instead of obstack_grow.
7336
7337 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
7338
7339         PR gdb/21337
7340         * symfile.c (reread_symbols): Call objfiles_changed just before
7341         read_symbols.
7342
7343 2017-06-27  Pedro Alves  <palves@redhat.com>
7344
7345         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
7346         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
7347         (completion_list_add_symbol, completion_list_add_msymbol):
7348         ... these new functions.
7349         (add_symtab_completions)
7350         (default_make_symbol_completion_list_break_on_1): Adjust.
7351
7352 2017-06-27  Pedro Alves  <palves@redhat.com>
7353
7354         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
7355         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
7356         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
7357         dtor.
7358         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
7359         'storage_obstack' field an auto_obstack.  In-class initialize all
7360         non-bitfield fields.  Make minsyms_read bool.
7361         * symfile.c (read_symbols): Adjust.
7362
7363 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
7364
7365         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
7366         (gdbsim_store_register): Likewise.
7367
7368 2017-06-27  Pedro Alves  <palves@redhat.com>
7369
7370         * c-exp.y (name_obstack): Now an auto_obstack.
7371         (yylex): Use auto_obstack::clear.
7372         (c_parse): Use auto_obstack::clear instead of reinitializing and
7373         freeing the obstack.
7374         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
7375         * d-exp.y (name_obstack): Now an auto_obstack.
7376         (yylex): Use auto_obstack::clear.
7377         (d_parse): Use auto_obstack::clear instead of reinitializing and
7378         freeing the obstack.
7379         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
7380         auto_obstack.
7381         * dwarf2read.c (create_addrmap_from_index)
7382         (dwarf2_build_psymtabs_hard)
7383         (update_enumeration_type_from_children): Likewise.
7384         * gdb_obstack.h (auto_obstack): New type.
7385         * go-exp.y (name_obstack): Now an auto_obstack.
7386         (build_packaged_name): Use auto_obstack::clear.
7387         (go_parse): Use auto_obstack::clear instead of reinitializing and
7388         freeing the obstack.
7389         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
7390         auto_obstack.
7391         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
7392         * rust-exp.y (work_obstack): Now an auto_obstack.
7393         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
7394         reinitializing and freeing the obstack.
7395         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
7396         (host_char_to_target): Use auto_obstack.
7397         * utils.h (make_cleanup_obstack_free): Delete declaration.
7398         * valprint.c (generic_emit_char, generic_printstr): Use
7399         auto_obstack.
7400
7401 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7402
7403         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
7404         thread.
7405         (darwin_init_thread_list): Don't update dummy thread.
7406         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
7407
7408 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7409
7410         * record-full.c (netorder16): Remove.
7411
7412 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7413
7414         * common/diagnostics.h: Define macros for GCC.
7415         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
7416         * common/vec.h: Include diagnostics.h.
7417         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
7418         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
7419         warning.
7420
7421 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7422
7423         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
7424         New macro.
7425         * ada-lex.l: Ignore deprecated register warnings.
7426
7427 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7428
7429         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
7430         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
7431
7432 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7433
7434         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
7435         its own line.
7436
7437 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7438
7439         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
7440
7441 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
7442
7443         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
7444         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
7445         (xtensa_register_read_masked): Likewise.
7446
7447 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
7448
7449         * common/environ.c (gdb_environ::unset): Update comment.
7450
7451 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7452
7453         * python/py-unwind.c (pyuw_sniffer): Allocate space for
7454         registers.
7455
7456 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7457
7458         * record-full.c (record_full_exec_insn): Use byte_vector.
7459
7460 2017-06-22  Yao Qi  <yao.qi@linaro.org>
7461
7462         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
7463         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7464
7465 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7466
7467         * remote.c (cached_reg): Move from here...
7468         * regcache.h (cached_reg): ...to here.
7469         * python/py-unwind.c (struct reg_info): Remove.
7470         (cached_frame_info): Use cached_reg_t.
7471         (pyuw_prev_register): Likewise.
7472         (pyuw_sniffer): Use cached_reg_t and allocate registers.
7473         (pyuw_dealloc_cache): Free all registers.
7474
7475 2017-06-22  Pedro Alves  <palves@redhat.com>
7476             Simon Marchi  <simon.marchi@ericsson.com>
7477
7478         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
7479         warning.
7480         * common/diagnostics.h: New file.
7481
7482 2017-06-22  Pedro Alves  <palves@redhat.com>
7483
7484         * common/agent.h: Add include guards.
7485
7486 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
7487
7488         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
7489         talk about addressable units instead of bytes.
7490
7491 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
7492
7493         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
7494         of '::const_iterator'.
7495
7496 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
7497
7498         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7499         'unittests/environ-selftests.c'.
7500         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
7501         * charset.c (find_charset_names): Declare object 'iconv_env'.
7502         Update code to use 'iconv_env' object.  Remove call to
7503         'free_environ'.
7504         * common/environ.c: Include <utility>.
7505         (make_environ): Delete function.
7506         (free_environ): Delete function.
7507         (gdb_environ::clear): New function.
7508         (gdb_environ::operator=): New function.
7509         (gdb_environ::get): Likewise.
7510         (environ_vector): Delete function.
7511         (set_in_environ): Delete function.
7512         (gdb_environ::set): New function.
7513         (unset_in_environ): Delete function.
7514         (gdb_environ::unset): New function.
7515         (gdb_environ::envp): Likewise.
7516         * common/environ.h: Include <vector>.
7517         (struct gdb_environ): Delete; transform into...
7518         (class gdb_environ): ... this class.
7519         (free_environ): Delete prototype.
7520         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
7521         environ_vector): Likewise.
7522         * infcmd.c (run_command_1): Update code to call
7523         'envp' from 'gdb_environ' class.
7524         (environment_info): Update code to call methods from 'gdb_environ'
7525         class.
7526         (unset_environment_command): Likewise.
7527         (path_info): Likewise.
7528         (path_command): Likewise.
7529         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
7530         (inferior::inferior): Initialize 'environment' using the host's
7531         information.
7532         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
7533         Include "environ.h".
7534         (class inferior) <environment>: Change type from 'struct
7535         gdb_environ' to 'gdb_environ'.
7536         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
7537         methods from 'gdb_environ' class.
7538         * solib.c (solib_find_1): Likewise
7539         * unittests/environ-selftests.c: New file.
7540
7541 2017-06-20  Yao Qi  <yao.qi@linaro.org>
7542
7543         * features/i386/i386-linux.xml: Exchange the order of including
7544         32bit-linux.xml and 32bit-sse.xml.
7545         * features/i386/i386-linux.c: Regenerated.
7546
7547 2017-06-20  Yao Qi  <yao.qi@linaro.org>
7548
7549         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
7550         Delete copy ctor and assignment operator.
7551         (tdesc_type): Likewise.
7552         (tdesc_feature): Likewise.
7553         (tdesc_free_reg): Remove.
7554         (tdesc_create_reg): Use new.
7555         (tdesc_free_type): Remove.
7556         (tdesc_create_vector): Use new.
7557         (tdesc_create_union): Likewise.
7558         (tdesc_create_flags): Likewise.
7559         (tdesc_create_enum): Likewise.
7560         (tdesc_free_feature): Delete.
7561         (free_target_description): Use delete.
7562
7563 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
7564
7565         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
7566         registers.
7567
7568 2017-06-19  Pedro Alves  <palves@redhat.com>
7569
7570         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
7571         after gdb::unlinker.
7572
7573 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
7574
7575         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
7576         gdb_environ to access an environment variable.
7577
7578 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
7579
7580         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
7581         gdb_byte*.
7582
7583 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7584
7585         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
7586
7587 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7588
7589         * configure: Re-generate.
7590         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
7591
7592 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7593
7594         * configure: Re-generate.
7595         * warning.m4: Pass -Werror to compiler when checking for
7596         supported warning flags.
7597
7598 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7599
7600         * Makefile.in (COMPILE.pre): Add "-x c++".
7601
7602 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
7603             Pedro Alves  <palves@redhat.com>
7604             Yao Qi  <yao.qi@linaro.org>
7605
7606         * defs.h (RequireLongest): New.
7607         (extract_integer): Declare function template.
7608         (extract_signed_integer): Remove the declaration, but define it
7609         static inline.
7610         (extract_unsigned_integer): Likewise.
7611         (store_integer): Declare function template.
7612         (store_signed_integer): Remove the declaration, but define it
7613         static inline.
7614         (store_unsigned_integer): Likewise.
7615         * findvar.c (extract_integer): New function template.
7616         (extract_signed_integer): Remove.
7617         (extract_unsigned_integer): Remove.
7618         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
7619         instantiations.
7620         (store_integer): New function template.
7621         (store_signed_integer): Remove.
7622         (store_unsigned_integer): Remove.
7623         (store_integer): Explicit instantiations.
7624         * regcache.c (regcache_raw_read_signed): Update.
7625         (regcache::raw_read): New function.
7626         (regcache::raw_read_signed): Remove.
7627         (regcache::raw_read_unsigned): Remove.
7628         (regcache_raw_read_unsigned): Update.
7629         (regcache_raw_write_unsigned): Update.
7630         (regcache::raw_write_signed): Remove.
7631         (regcache::raw_write): New function.
7632         (regcache_cooked_read_signed): Update.
7633         (regcache::raw_write_unsigned): Remove.
7634         (regcache::cooked_read_signed): Remove.
7635         (regcache_cooked_read_unsigned): Update.
7636         (regcache::cooked_read_unsigned): Remove.
7637         (regcache_cooked_write_signed): Update.
7638         (regcache_cooked_write_unsigned): Update.
7639         * regcache.h (regcache) <raw_read_signed>: Remove.
7640         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
7641         <raw_read, raw_write>: New.
7642         <cooked_read_signed, cooked_write_signed>: Remove.
7643         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
7644         <cooked_read, cooked_write>: New.
7645         * sh64-tdep.c (sh64_pseudo_register_read): Update.
7646         (sh64_pseudo_register_write): Update.
7647
7648 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
7649
7650         * arc-tdep.c (arc_disassembler_options): New variable.
7651         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
7652         of default_print_insn.
7653         (arc_delayed_print_insn): Set info->section when needed,
7654         use default_print_insn to retrieve a disassembler.
7655
7656 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
7657
7658         PR gdb/21574
7659         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
7660         to mention $SHELL and startup-with-shell.
7661
7662 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
7663
7664         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
7665
7666 2017-06-14  Yao Qi  <yao.qi@linaro.org>
7667
7668         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
7669         default_print_insn instead of print_insn_aarch64.
7670         * arm-tdep.c (gdb_print_insn_arm): Call
7671         default_print_insn instead of print_insn_big_arm
7672         and print_insn_little_arm.
7673         * i386-tdep.c (i386_print_insn): Call default_print_insn
7674         instead of print_insn_i386.
7675         * ia64-tdep.c (ia64_print_insn): Call
7676         default_print_insn instead of print_insn_ia64.
7677         * mips-tdep.c (gdb_print_insn_mips): Call
7678         default_print_insn instead of print_insn_big_mips
7679         and print_insn_little_mips.
7680         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
7681         instead of print_insn_spu.
7682
7683 2017-06-14  Pedro Alves  <palves@redhat.com>
7684
7685         * ada-lang.c: Include "common/byte-vector.h".
7686         (ada_value_primitive_packed_val): Use gdb::byte_vector.
7687         * charset.c (wchar_iterator::iterate): Resize the vector instead
7688         of reserving it.
7689         * common/byte-vector.h: Include "common/def-vector.h".
7690         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
7691         * cli/cli-dump.c: Include "common/byte-vector.h".
7692         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
7693         * common/byte-vector.h: New file.
7694         * common/def-vector.h: New file.
7695         * common/default-init-alloc.h: New file.
7696         * dwarf2loc.c: Include "common/byte-vector.h".
7697         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
7698         instead of reserving it.
7699         * dwarf2read.c: Include "common/byte-vector.h".
7700         (data_buf::m_vec): Now a gdb::byte_vector.
7701         * gdb_regex.c: Include "common/def-vector.h".
7702         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
7703         * mi/mi-main.c: Include "common/byte-vector.h".
7704         (mi_cmd_data_read_memory): Use gdb::byte_vector.
7705         * printcmd.c: Include "common/byte-vector.h".
7706         (print_scalar_formatted): Use gdb::byte_vector.
7707         * valprint.c: Include "common/byte-vector.h".
7708         (maybe_negate_by_bytes, print_decimal_chars): Use
7709         gdb::byte_vector.
7710
7711 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7712
7713         * darwin-nat.c: Include "nat/fork-inferior.h".
7714
7715 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7716
7717         * configure.nat: Factor out Darwin bits that are not
7718         architecture-specific.  Add fork-inferior.o.
7719
7720 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7721
7722         * configure.nat: Factor out AIX bits that are not
7723         architecture-specific.  Add fork-inferior.o.
7724
7725 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7726
7727         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
7728         (read_pieced_value, write_pieced_value): ...here.  Reduce to
7729         wrappers that just call rw_pieced_value.
7730
7731 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7732
7733         * dwarf2loc.c (write_pieced_value): When writing the data for a
7734         memory piece, use write_memory_with_notification instead of
7735         write_memory.
7736
7737 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7738
7739         * valops.c (read_value_memory): Change embedded_offset to
7740         represent a bit offset instead of a byte offset.
7741         * value.h (read_value_memory): Adjust comment.
7742
7743 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7744
7745         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
7746         dest_offset_bits and source_offset_bits.
7747         (write_pieced_value): Likewise.
7748
7749 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7750
7751         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
7752         given by DW_OP_bit_piece.
7753         (write_pieced_value): Likewise.
7754
7755 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7756
7757         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
7758         some other preparations to the places where sufficient information
7759         is available.
7760         (write_pieced_value): Likewise.
7761
7762 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7763
7764         * dwarf2loc.c (bits_to_bytes): New function.
7765         (read_pieced_value): Fix offset calculations for register pieces
7766         on big-endian targets.
7767         (write_pieced_value): Likewise.
7768
7769 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7770
7771         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
7772         (write_pieced_value): Likewise.
7773
7774 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7775
7776         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
7777         transfer the source value's least significant bits, instead of its
7778         lowest-addressed ones.  Rename type_len to max_offset.
7779         (read_pieced_value): Mirror above changes to write_pieced_value as
7780         applicable.
7781
7782 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7783
7784         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
7785         truncate full bytes from dest_offset_bits before using it as an
7786         offset into the buffer.
7787
7788 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7789
7790         * dwarf2loc.c (write_pieced_value): Include transfer size in
7791         byte-wise check.
7792
7793 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7794
7795         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
7796         calculation of this_size.
7797
7798 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7799
7800         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
7801         when targeting a bit-field.
7802         (write_pieced_value): Likewise.
7803
7804 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7805
7806         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
7807         (allocate_piece_closure): Drop addr_size parameter.
7808         (dwarf2_evaluate_loc_desc_full): Adjust call to
7809         allocate_piece_closure.
7810
7811 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7812
7813         PR gdb/21226
7814         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
7815         the LSB end, independent of endianness.
7816
7817 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7818
7819         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
7820         size capping.
7821
7822 2017-06-13  Yao Qi  <yao.qi@linaro.org>
7823
7824         * mips-linux-nat.c: Move include features/mips*-linux.c to
7825         mips-linux-tdep.c.
7826         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
7827         to mips-linux-tdep.c.
7828         * mips-linux-tdep.c: Include features/mips*-linux.c
7829         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
7830         functions.
7831         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
7832         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
7833         (tdesc_mips64_dsp_linux): Declare.
7834
7835 2017-06-12  Tom Tromey  <tom@tromey.com>
7836
7837         * valprint.h (val_print_type_code_int): Remove.
7838         * valprint.c (generic_val_print_int): Always call
7839         val_print_scalar_formatted.
7840         (val_print_type_code_int): Remove.
7841         * printcmd.c (print_scalar_formatted): Handle options->format==0.
7842         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
7843         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
7844         * ada-valprint.c (ada_val_print_num): Use
7845         val_print_scalar_formatted.
7846
7847 2017-06-12  Tom Tromey  <tom@tromey.com>
7848
7849         * printcmd.c (print_scalar_formatted): Unify the two switches.
7850         Don't convert scalars to LONGEST.
7851
7852 2017-06-12  Tom Tromey  <tom@tromey.com>
7853
7854         PR exp/16225:
7855         * valprint.h (print_decimal_chars): Update.
7856         * valprint.c (maybe_negate_by_bytes): New function.
7857         (print_decimal_chars): Add "is_signed" argument.
7858         * printcmd.c (print_scalar_formatted): Update.
7859
7860 2017-06-12  Tom Tromey  <tom@tromey.com>
7861
7862         PR exp/16225:
7863         * valprint.h (print_binary_chars, print_hex_chars): Update.
7864         * valprint.c (val_print_type_code_int): Update.
7865         (print_binary_chars): Add "zero_pad" argument.
7866         (emit_octal_digit): New function.
7867         (print_octal_chars): Don't zero-pad.
7868         (print_decimal_chars): Likewise.
7869         (print_hex_chars): Add "zero_pad" argument.
7870         * sh64-tdep.c (sh64_do_fp_register): Update.
7871         * regcache.c (regcache::dump): Update.
7872         * printcmd.c (print_scalar_formatted): Update.
7873         * infcmd.c (default_print_one_register_info): Update.
7874
7875 2017-06-12  Pedro Alves  <palves@redhat.com>
7876             Alan Hayward  <alan.hayward@arm.com>
7877
7878         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
7879         (mips_eabi_push_dummy_call): Rename local 'regsize' to
7880         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
7881         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
7882         Assert that abi_regsize bytes fit in 'ref_valbuf'.
7883
7884 2017-06-12  Pedro Alves  <palves@redhat.com>
7885
7886         * dwarf2read.c (mapped_symtab::data): Now a vector of
7887         symtab_index_entry instead of vector of
7888         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
7889         whether an element's name is NULL instead of checking whether the
7890         element itself is NULL.
7891         (find_slot): Change return type.  Adjust.
7892         (hash_expand, , add_index_entry, uniquify_cu_indices)
7893         (write_hash_table): Adjust.
7894
7895 2017-06-12  Pedro Alves  <palves@redhat.com>
7896
7897         * dwarf2read.c (recursively_count_psymbols): New function.
7898         (write_psymtabs_to_index): Call it to compute number of psyms and
7899         pass estimate size of psyms_seen to unordered_set's ctor.
7900
7901 2017-06-12  Pedro Alves  <palves@redhat.com>
7902
7903         * dwarf2read.c (write_hash_table): Check if key already exists
7904         before emplacing.
7905
7906 2017-06-12  Pedro Alves  <palves@redhat.com>
7907
7908         * dwarf2read.c (data_buf::append_space): Rename to...
7909         (data_buf::grow): ... this, and make private.  Adjust all callers.
7910         (data_buf::append_uint): New method.
7911         (add_address_entry, write_one_signatured_type)
7912         (write_psymtabs_to_index): Use it.
7913
7914 2017-06-12  Pedro Alves  <palves@redhat.com>
7915
7916         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
7917         (file_write (FILE *, const std::vector<Elem>&)): Delete.
7918         (data_buf::file_write): Call ::fwrite directly.
7919
7920 2017-06-12  Pedro Alves  <palves@redhat.com>
7921
7922         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
7923         std::vector::erase.
7924
7925 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
7926
7927         Code cleanup: C++ify .gdb_index producer.
7928         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
7929         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
7930         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
7931         (create_strtab, add_string): Remove.
7932         (file_write, data_buf): New.
7933         (struct symtab_index_entry): Use std::vector for cu_indices.
7934         (struct mapped_symtab): Use std::vector for data.
7935         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
7936         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
7937         Remove.
7938         (find_slot): Change return type.  Update it to the new data structures.
7939         (hash_expand, add_index_entry): Update it to the new data structures.
7940         (offset_type_compare): Remove.
7941         (uniquify_cu_indices): Update it to the new data structures.
7942         (c_str_view, c_str_view_hasher, vector_hasher): New.
7943         (add_indices_to_cpool): Remove.
7944         (write_hash_table): Update it to the new data structures.
7945         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
7946         (eq_psymtab_cu_index): Remove.
7947         (psym_index_map): New typedef.
7948         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
7949         reference and std::unordered_map for cu_index_htab.
7950         (add_address_entry, add_address_entry_worker, write_address_map)
7951         (write_psymbols): Update it to the new data structures.
7952         (write_obstack): Remove.
7953         (struct signatured_type_index_data): Change types_list to a data_buf
7954         reference and psyms_seen to a std::unordered_set reference.
7955         (write_one_signatured_type, recursively_write_psymbols)
7956         (write_psymtabs_to_index): Update it to the new data structures.
7957
7958 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
7959
7960         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
7961         separate-debug-file commands.
7962         * symfile.h (separate_debug_file_debug): New global.
7963         * symfile.c (separate_debug_file_debug): New global.
7964         (separate_debug_file_exists, find_separate_debug_file): Add
7965         debug output.
7966         (_initialize_symfile): Add "set debug separate-debug-file"
7967         command.
7968         * build-id.c (build_id_to_debug_bfd,
7969         find_separate_debug_file_by_buildid): Add debug output.
7970
7971 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
7972
7973         * gdbarch.sh (displaced_step_free_closure): Remove.
7974         * gdbarch.h, gdbarch.c: Re-generate.
7975         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
7976         displaced_step_free_closure.
7977         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
7978         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
7979         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7980         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
7981         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7982         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7983         * arch-utils.h (simple_displaced_step_free_closure): Remove.
7984         * arch-utils.c (simple_displaced_step_free_closure): Remove.
7985         * infrun.c (displaced_step_clear): Call xfree instead of
7986         gdbarch_displaced_step_free_closure.
7987
7988 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
7989
7990         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
7991         NULL".
7992
7993 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
7994
7995         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
7996         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
7997         (mn10300_push_dummy_call): Likewise.
7998
7999 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
8000
8001         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
8002
8003 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
8004
8005         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
8006
8007 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8008
8009         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
8010         able to start inferiors using a shell.
8011         (New remote packets): Announce new packet "QStartupWithShell".
8012         * remote.c: Add PACKET_QStartupWithShell.
8013         (extended_remote_create_inferior): Handle new
8014         PACKET_QStartupWithShell.
8015         (remote_protocol_features) <QStartupWithShell>: New entry for
8016         PACKET_QStartupWithShell.
8017         (_initialize_remote): Call "add_packet_config_cmd" for
8018         QStartupShell.
8019
8020 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8021             Pedro Alves  <palves@redhat.com>
8022
8023         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
8024         and "nat/fork-inferior.h".
8025         * common/common-inferior.h: New file, with contents from
8026         "gdb/inferior.h".
8027         * commom/common-utils.c: Include "common-utils.h".
8028         (stringify_argv): New function.
8029         * common/common-utils.h (stringify_argv): New prototype.
8030         * configure.nat: Add "fork-inferior.o" as a dependency for
8031         "*linux*", "fbsd*" and "nbsd*" hosts.
8032         * corefile.c (get_exec_file): Update comment.
8033         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
8034         instead of "startup_inferior".
8035         (darwin_create_inferior): Call "add_thread_silent" after
8036         "fork_inferior".
8037         * fork-child.c: Cleanup unnecessary includes.
8038         (SHELL_FILE): Move to "common/common-fork-child.c".
8039         (environ): Likewise.
8040         (exec_wrapper): Initialize.
8041         (get_exec_wrapper): New function.
8042         (breakup_args): Move to "common/common-fork-child.c"; rename to
8043         "breakup_args_for_exec".
8044         (escape_bang_in_quoted_argument): Move to
8045         "common/common-fork-child.c".
8046         (saved_ui): New variable.
8047         (prefork_hook): New function.
8048         (postfork_hook): Likewise.
8049         (postfork_child_hook): Likewise.
8050         (gdb_startup_inferior): Likewise.
8051         (fork_inferior): Move to "common/common-fork-child.c".  Update
8052         function to support gdbserver.
8053         (startup_inferior): Likewise.
8054         * gdbcore.h (get_exec_file): Remove declaration.
8055         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
8056         instead of "startup_inferior".  Call "add_thread_silent" after
8057         "fork_inferior".
8058         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
8059         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
8060         instead of "startup_inferior".  Call "add_thread_silent" after
8061         "fork_inferior".
8062         * inferior.h: Include "common-inferior.h".
8063         (trace_start_error): Move to "common/common-utils.h".
8064         (trace_start_error_with_name): Likewise.
8065         (fork_inferior): Move prototype to "nat/fork-inferior.h".
8066         (startup_inferior): Likewise.
8067         (gdb_startup_inferior): New prototype.
8068         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
8069         * nat/fork-inferior.h: New file.
8070         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
8071         instead of "startup_inferior".  Call "add_thread_silent" after
8072         "fork_inferior".
8073         * target.h (target_terminal_init): Move prototype to
8074         "target/target.h".
8075         (target_terminal_inferior): Likewise.
8076         (target_terminal_ours): Likewise.
8077         * target/target.h (target_terminal_init): New prototype, moved
8078         from "target.h".
8079         (target_terminal_inferior): Likewise.
8080         (target_terminal_ours): Likewise.
8081         * utils.c (gdb_flush_out_err): New function.
8082
8083 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8084
8085         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
8086         * common/common-gdbthread.h: New file, with parts from
8087         "gdb/gdbthread.h".
8088         * gdbthread.h: Include "common-gdbthread.h".
8089         (switch_to_thread): Moved to "common/common-gdbthread.h".
8090
8091 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8092
8093         * Makefile.in (SFILES): Add "common/job-control.c".
8094         (HFILES_NO_SRCDIR): Add "common/job-control.h".
8095         (COMMON_OBS): Add "job-control.o".
8096         * common/job-control.c: New file, with contents from
8097         "gdb/inflow.c".
8098         * common/job-control.h: New file, with contents from "terminal.h".
8099         * fork-child.c: Include "job-control.h".
8100         * inflow.c: Include "job-control.h".
8101         (gdb_setpgid): Move to "common/common-inflow.c".
8102         (_initialize_inflow): Move setting of "job_control" to
8103         "handle_job_control".
8104         * terminal.h (job_control): Moved to "common/common-terminal.h".
8105         (gdb_setpgid): Likewise.
8106         * top.c: Include "job_control.h".
8107         * utils.c: Likewise.
8108         (job_control): Moved to "job-control.c".
8109
8110 2017-06-07  Pedro Alves  <palves@redhat.com>
8111
8112         * Makefile.in (SFILES): Add gdb_regex.c.
8113         (COMMON_OBS): Add gdb_regex.o.
8114         * ada-lang.c (ada_add_standard_exceptions)
8115         (ada_add_exceptions_from_frame, name_matches_regex)
8116         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
8117         parameter type to compiled_regex.  Adjust.
8118         (ada_exceptions_list): Use compiled_regex.
8119         * break-catch-throw.c (exception_catchpoint::pattern): Now a
8120         std::unique_ptr<compiled_regex>.
8121         (exception_catchpoint::~exception_catchpoint): Remove regfree
8122         call.
8123         (check_status_exception_catchpoint): Adjust to use compiled_regex.
8124         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
8125         * breakpoint.c (solib_catchpoint::compiled): Now a
8126         std::unique_ptr<compiled_regex>.
8127         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
8128         (check_status_catch_solib): Adjust to use compiled_regex.
8129         (add_solib_catchpoint): Adjust to use compiled_regex.
8130         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
8131         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
8132         compiled_regex reference.  Adjust to use it.
8133         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
8134         declaration.  Include "gdb_regex.h".
8135         (apropos_cmd): Change regex parameter to compiled_regex reference.
8136         * gdb_regex.c: New file.
8137         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
8138         declarations.
8139         (class compiled_regex): New.
8140         * linux-tdep.c: Include "common/gdb_optional.h".
8141         (struct mapping_regexes): New, factored out from
8142         mapping_is_anonymous_p, and adjusted to use compiled_regex.
8143         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
8144         gdb::optional and remove cleanups.  Adjust to compiled_regex.
8145         * probe.c: Include "common/gdb_optional.h".
8146         (collect_probes): Use compiled_regex and gdb::optional and remove
8147         cleanups.
8148         * skip.c: Include "common/gdb_optional.h".
8149         (skiplist_entry::compiled_function_regexp): Now a
8150         gdb::optional<compiled_regex>.
8151         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
8152         (free_skiplist_entry): Remove regfree call.
8153         (compile_skip_regexp, skip_rfunction_p): Adjust to use
8154         compiled_regex and gdb::optional.
8155         * symtab.c: Include "common/gdb_optional.h".
8156         (search_symbols): Use compiled_regex and gdb::optional.
8157         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
8158         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
8159         to gdb_regex.c.
8160
8161 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8162
8163         * regcache.c (regcache::save): Avoid buffer use.
8164         (regcache::dump): Likewise.
8165
8166 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8167
8168         * sh-tdep.c (sh_pseudo_register_read): Remove
8169         MAX_REGISTER_SIZE.
8170         (sh_pseudo_register_write): Likewise.
8171         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
8172         (sh64_pseudo_register_write): Likewise
8173
8174 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8175
8176         * aarch64-tdep.c (aarch64_store_return_value): Use
8177         V_REGISTER_SIZE.
8178         (aarch64_pseudo_read_value): Likewise.
8179         (aarch64_pseudo_write): Likewise.
8180
8181 2017-06-06  Yao Qi  <yao.qi@linaro.org>
8182
8183         * regformats/regdef.h (set_register_cache): Remove the
8184         declaration.
8185
8186 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
8187
8188         * frame.c (frame_unwind_register_signed): Use
8189         frame_unwind_register_value.
8190
8191 2017-06-06  Pedro Alves  <palves@redhat.com>
8192
8193         PR breakpoints/21553
8194         * breakpoint.c (create_breakpoints_sal_default)
8195         (init_breakpoint_sal, create_breakpoint_sal): Use
8196         gdb::unique_xmalloc_ptr for string parameters.
8197         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8198         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
8199         (base_breakpoint_create_breakpoints_sal)
8200         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
8201         (strace_marker_create_breakpoints_sal)
8202         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
8203         string parameters.
8204         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
8205         gdb::unique_xmalloc_ptr for string parameters.
8206         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8207         parameters.
8208
8209 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8210
8211         * alpha-tdep.c (alpha_register_to_value): Use
8212         get_frame_register_value.
8213         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
8214
8215 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8216
8217         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
8218         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
8219         (ia64_value_to_register): Likewise.
8220         (ia64_extract_return_value): Likewise.
8221         (ia64_store_return_value): Likewise.
8222         (ia64_push_dummy_call): Likewise.
8223
8224 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
8225
8226         GDB 8.0 released.
8227
8228 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
8229
8230         * x86-linux-nat.c (struct arch_lwp_info): Remove.
8231
8232 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
8233
8234         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
8235         parameter.
8236         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
8237
8238 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
8239
8240         * event-loop.c (poll_timers): Unallocate timer using delete
8241         instead of xfree.
8242
8243 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8244
8245         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
8246         (struct breakpoint) <~breakpoint>: New.
8247         (struct watchpoint): Inherit from breakpoint.
8248         <~watchpoint>: New.
8249         <base>: Remove.
8250         (struct tracepoint): Inherit from breakpoint.
8251         <base>: Remove.
8252         * breakpoint.c (longjmp_breakpoint_ops): Remove.
8253         (struct longjmp_breakpoint): Inherit from breakpoint.
8254         <~longjmp_breakpoint>: New.
8255         <base>: Remove.
8256         (new_breakpoint_from_type): Remove casts.
8257         (watchpoint_in_thread_scope): Remove reference to base field.
8258         (watchpoint_del_at_next_stop): Likewise.
8259         (update_watchpoint): Likewise.
8260         (watchpoint_check): Likewise.
8261         (bpstat_check_watchpoint): Likewise.
8262         (set_longjmp_breakpoint): Likewise.
8263         (struct fork_catchpoint): Inherit from breakpoint.
8264         <base>: Remove.
8265         (struct solib_catchpoint): Inherit from breakpoint.
8266         <~solib_catchpoint>: New.
8267         <base>: Remove.
8268         (dtor_catch_solib): Change to ...
8269         (solib_catchpoint::~solib_catchpoint): ... this.
8270         (breakpoint_hit_catch_solib): Remove reference to base field.
8271         (add_solib_catchpoint): Likewise.
8272         (create_fork_vfork_event_catchpoint): Likewise.
8273         (struct exec_catchpoint): Inherit from breakpoint.
8274         <~exec_catchpoint>: New.
8275         <base>: Remove.
8276         (dtor_catch_exec): Change to ...
8277         (exec_catchpoint::~exec_catchpoint): ... this.
8278         (dtor_watchpoint): Change to ...
8279         (watchpoint::~watchpoint): ... this.
8280         (watch_command_1): Remove reference to base field.
8281         (catch_exec_command_1): Likewise.
8282         (base_breakpoint_dtor): Change to ...
8283         (breakpoint::~breakpoint): ... this.
8284         (base_breakpoint_ops): Remove dtor field value.
8285         (longjmp_bkpt_dtor): Change to ...
8286         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
8287         (strace_marker_create_breakpoints_sal): Remove reference to base
8288         field.
8289         (delete_breakpoint): Don't manually call breakpoint destructor.
8290         (create_tracepoint_from_upload): Remove reference to base field.
8291         (trace_pass_set_count): Likewise.
8292         (initialize_breakpoint_ops): Don't initialize
8293         momentary_breakpoint_ops, don't set dtors.
8294         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
8295         <~ada_catchpoint>: New.
8296         <base>: Remove.
8297         (create_excep_cond_exprs): Remove reference to base field.
8298         (dtor_exception): Change to ...
8299         (ada_catchpoint::~ada_catchpoint): ... this.
8300         (dtor_catch_exception): Remove.
8301         (dtor_catch_exception_unhandled): Remove.
8302         (dtor_catch_assert): Remove.
8303         (create_ada_exception_catchpoint): Remove reference to base
8304         field.
8305         (initialize_ada_catchpoint_ops): Don't set dtors.
8306         * break-catch-sig.c (struct signal_catchpoint): Inherit from
8307         breakpoint.
8308         <~signal_catchpoint>: New.
8309         <base>: Remove.
8310         (signal_catchpoint_dtor): Change to ...
8311         (signal_catchpoint::~signal_catchpoint): ... this.
8312         (create_signal_catchpoint): Remove reference to base field.
8313         (initialize_signal_catchpoint_ops): Don't set dtor.
8314         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
8315         from breakpoint.
8316         <~syscall_catchpoint>: New.
8317         <base>: Remove.
8318         (dtor_catch_syscall): Change to ...
8319         (syscall_catchpoint::~syscall_catchpoint): ... this.
8320         (create_syscall_event_catchpoint): Remove reference to base
8321         field.
8322         (initialize_syscall_catchpoint_ops): Don't set dtor.
8323         * break-catch-throw.c (struct exception_catchpoint): Inherit
8324         from breakpoint.
8325         <~exception_catchpoint>: New.
8326         <base>: Remove.
8327         (dtor_exception_catchpoint): Change to ...
8328         (exception_catchpoint::~exception_catchpoint): ... this.
8329         (handle_gnu_v3_exceptions): Remove reference to base field.
8330         (initialize_throw_catchpoint_ops): Don't set dtor.
8331         * ctf.c (ctf_get_traceframe_address): Remove reference to base
8332         field.
8333         * remote.c (remote_get_tracepoint_status): Likewise.
8334         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
8335         * tracefile.c (tracefile_fetch_registers): Likewise.
8336         * tracepoint.c (actions_command): Likewise.
8337         (validate_actionline): Likewise.
8338         (tfind_1): Likewise.
8339         (get_traceframe_location): Likewise.
8340         (find_matching_tracepoint_location): Likewise.
8341         (parse_tracepoint_status): Likewise.
8342         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
8343
8344 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8345
8346         * breakpoint.c (struct longjmp_breakpoint): New struct.
8347         (is_tracepoint_type): Change return type to bool.
8348         (is_longjmp_type): New function.
8349         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
8350         (set_raw_breakpoint_without_location): Use
8351         new_breakpoint_from_type.
8352         (set_raw_breakpoint): Likewise.
8353
8354 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8355
8356         * breakpoint.c (new_breakpoint_from_type): New function.
8357         (create_breakpoint_sal): Use new_breakpoint_from_type and
8358         unique_ptr.
8359         (create_breakpoint): Likewise.
8360
8361 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
8362
8363         * memattr.c (mem_info_command): Rename to ...
8364         (info_mem_command): ... this.
8365         (mem_enable_command): Rename to ...
8366         (enable_mem_command): ... this.
8367         (mem_disable_command): Rename to ...
8368         (disable_mem_command): ... this.
8369         (mem_delete_command): Rename to ...
8370         (delete_mem_command): ... this.
8371         (_initialize_mem): Adjust function names.
8372
8373 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8374
8375         * btrace.c (handle_pt_insn_events): New.
8376         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
8377         STATUS.  Split into this and ...
8378         (handle_pt_insn_event_flags): ... this.
8379
8380 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8381
8382         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
8383         and struct pt_insn.resynced.
8384         * configure: Regenerated.
8385         * config.in: Regenerated.
8386
8387 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8388
8389         * btrace.c (ftrace_find_call_by_number): New function.
8390         (ftrace_new_function): Store objects, not pointers.
8391         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
8392         ftrace_new_gap, ftrace_update_function,
8393         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
8394         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
8395         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
8396         btrace_ends_with_single_insn, btrace_call_get): Account for
8397         btrace_thread_info::functions now storing objects.
8398         * btrace.h (struct btrace_thread_info): Add constructor.
8399         (struct btrace_thread_info) <functions>: Make std::vector.
8400         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
8401         Initialize with default values.
8402         * record-btrace.c (record_btrace_frame_sniffer): Account for
8403         btrace_thread_info::functions now storing objects.
8404
8405 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8406
8407         * btrace.c: Remove typedef bfun_s.
8408         (ftrace_new_gap): Directly add gaps to the list of gaps.
8409         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
8410         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
8411         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
8412         instead of gdb VEC.
8413
8414 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8415
8416         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
8417         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
8418         with btrace_thread_info::next_segment and
8419         btrace_thread_info::prev_segment.
8420         * btrace.h: Remove struct btrace_func_link.
8421         (struct btrace_function): Replace pair of function segment pointers
8422         with pair of indices.
8423         * python/py-record-btrace.c (btpy_call_prev_sibling,
8424         btpy_call_next_sibling): Replace references to
8425         btrace_thread_info::segment with btrace_thread_info::next_segment and
8426         btrace_thread_info::prev_segment.
8427         * record-btrace.c (record_btrace_frame_this_id): Use
8428         btrace_find_call_by_number.
8429
8430 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8431
8432         * btrace.c (ftrace_new_function, ftrace_fixup_level,
8433         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
8434         btrace_insn_next, btrace_insn_prev): Remove references to
8435         btrace_thread_info::flow.
8436         * btrace.h (struct btrace_function): Remove FLOW.
8437
8438 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8439
8440         * btrace.c (ftrace_find_call_by_number): New function.
8441         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
8442         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
8443         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
8444         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
8445         index.
8446         * btrace.h (struct btrace_function): Turn UP into an index.
8447         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
8448         as an index.
8449         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
8450         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
8451         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
8452
8453 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8454
8455         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8456         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8457         ftrace_update_function, ftrace_compute_global_level_offset,
8458         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
8459         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
8460         btrace_insn_end, btrace_is_empty): Remove references to
8461         btrace_thread_info::begin and btrace_thread_info::end.
8462         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
8463         (struct btrace_thread_info) <functions>: Adjust comment.
8464         * record-btrace.c (record_btrace_start_replaying): Remove reference to
8465         btrace_thread_info::begin.
8466
8467 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8468
8469         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8470         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8471         ftrace_update_function): Remove arguments that implicitly were always
8472         BTINFO->END.
8473         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
8474         Don't pass BTINFO->END.
8475
8476 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8477
8478         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
8479         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
8480         btrace_find_insn_by_number): Replace function segment pointer with
8481         index.
8482         (btrace_insn_cmp): Simplify.
8483         * btrace.h: (struct btrace_insn_iterator) Rename index to
8484         insn_index.  Replace function segment pointer with index into function
8485         segment vector.
8486         * record-btrace.c (record_btrace_call_history): Replace function
8487         segment pointer use with index.
8488         (record_btrace_frame_sniffer): Retrieve function call segment through
8489         vector.
8490         (record_btrace_set_replay): Remove defunc't safety check.
8491
8492 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8493
8494         * btrace.c (btrace_ends_with_single_insn): New function.
8495         (btrace_call_get, btrace_call_number, btrace_call_begin,
8496         btrace_call_end, btrace_call_next, btrace_call_prev,
8497         btrace_find_call_by_number): Use index into call segment vector
8498         instead of pointer.
8499         (btrace_call_cmp): Simplify.
8500         * btrace.h (struct btrace_call_iterator): Replace function call segment
8501         pointer with index into vector.
8502         * record-btrace.c (record_btrace_call_history): Use index instead of
8503         pointer.
8504
8505 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8506
8507         * btrace.c (btrace_insn_begin, btrace_insn_end,
8508         btrace_find_insn_by_number): Add btinfo to iterator.
8509         * btrace.h (struct btrace_insn_iterator): Add btinfo.
8510
8511 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8512
8513         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
8514         and save pointers directly.
8515         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
8516         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
8517         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
8518         changed signature of functions.
8519         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
8520         (btrace_fetch): Remove code that adds btrace_function pointers to
8521         vector of btrace_functions.
8522         (btrace_clear): Simplify freeing vector of btrace_functions.
8523
8524 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8525
8526         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
8527         Replace VEC_* with std::vector functions.
8528         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
8529         (struct btrace_thread_info)<functions>: Change type to std::vector.
8530
8531 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8532
8533         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
8534         "Removed targets and native configurations" up.  Merge duplicate
8535         "New commands" sub-sections.  Add "New options" sub-sections.
8536
8537 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
8538
8539         * defs.h (copy_integer_to_size): New declaration.
8540         * findvar.c (copy_integer_to_size): New function.
8541         (do_cint_test): New selftest function.
8542         (copy_integer_to_size_test): Likewise.
8543         (_initialize_findvar): Likewise.
8544         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
8545         (mips_fbsd_collect_reg): Use raw_collect_integer.
8546         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
8547         (mips64_fill_gregset): Use raw_collect_integer
8548         (mips64_fill_fpregset): Use raw_supply_integer.
8549         * regcache.c (regcache::raw_supply_integer): New function.
8550         (regcache::raw_collect_integer): Likewise.
8551         * regcache.h: (regcache::raw_supply_integer): New declaration.
8552         (regcache::raw_collect_integer): Likewise.
8553
8554 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8555
8556         * Makefile.in (SFILES): Add gdbarch-selftests.c.
8557         (COMMON_OBS): Add gdbarch-selftests.o.
8558         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
8559         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
8560         * gdbarch-selftests.c: New file.
8561         * regcache.h (regcache) <~regcache>: Mark it virtual if
8562         GDB_SELF_TEST.
8563         <raw_write>: Likewise.
8564
8565 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8566
8567         * regcache.c (current_regcache): Change it to
8568         regcache::current_regcache.
8569         (regcache_observer_target_changed): Update.
8570         (regcache_thread_ptid_changed): Make it a regcache static
8571         method.
8572         (regcache_thread_ptid_changed): Update.
8573         (class regcache_access): New.
8574         (current_regcache_test): Update.
8575         (_initialize_regcache): Update.
8576         * regcache.h: Include forward_list.
8577         (regcache): Declare regcache_thread_ptid_changed and declare
8578         registers_changed_ptid as friend.
8579
8580 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8581
8582         * i387-tdep.c (i387_register_to_value): Use register_size
8583         instead of TYPE_LENGTH.
8584         * m68k-tdep.c (m68k_register_to_value): Likewise.
8585
8586 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8587
8588         * i387-tdep.c (i387_convert_register_p): Return false if type
8589         code isn't TYPE_CODE_FLT.
8590
8591 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8592
8593         * alpha-tdep.c (alpha_convert_register_p): Return true if type
8594         length is 4.
8595         (alpha_register_to_value): Remove type length check.
8596         (alpha_value_to_register): Likewise.
8597
8598 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8599
8600         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
8601         TYPE_CODE_FLT.
8602
8603 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8604
8605         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
8606         TYPE_CODE_FLT or not.
8607
8608 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8609
8610         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
8611         * avr-tdep.c (avr_gdbarch_init): Likewise.
8612         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8613         * cris-tdep.c (cris_gdbarch_init): Likewise.
8614         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8615         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8616         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8617         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
8618         * mep-tdep.c (mep_gdbarch_init): Likewise.
8619         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8620         * mips-tdep.c (mips_gdbarch_init): Likewise.
8621         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8622         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8623         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8624         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8625         * v850-tdep.c (v850_gdbarch_init): Likewise.
8626
8627 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8628
8629         * selftest-arch.c (tests_with_arch): Call registers_changed
8630         and reinit_frame_cache.
8631         * selftest.c (run_self_tests): Likewise.
8632
8633 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8634
8635         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
8636         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
8637
8638 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8639
8640         * rl78-tdep.c (rl78_gdbarch_init): Don't call
8641         set_gdbarch_print_insn.
8642
8643 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8644
8645         * h8300-tdep.c (h8300_gdbarch_init): Don't call
8646         set_gdbarch_print_insn.
8647
8648 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8649
8650         * alpha-tdep.c (alpha_gdbarch_init): Don't call
8651         set_gdbarch_print_insn.
8652         * arc-tdep.c (arc_gdbarch_init): Likewise.
8653         * arch-utils.c: include dis-asm.h.
8654         (default_print_insn): New function.
8655         * arch-utils.h (default_print_insn): Declare.
8656         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
8657         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8658         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
8659         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
8660         * frv-tdep.c (frv_gdbarch_init): Likewise.
8661         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8662         * gdbarch.sh (print_insn): Use default_print_insn.
8663         * gdbarch.c: Regenerated.
8664         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
8665         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
8666         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8667         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
8668         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8669         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
8670         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
8671         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
8672         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
8673         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8674         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8675         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8676         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8677         * mt-tdep.c (mt_gdbarch_init): Likewise.
8678         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8679         * nios2-tdep.c (nios2_print_insn): Remove.
8680         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
8681         * rx-tdep.c (rx_gdbarch_init): Likewise.
8682         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8683         * score-tdep.c (score_print_insn): Remove.
8684         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
8685         * sh-tdep.c (sh_gdbarch_init): Likewise.
8686         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8687         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8688         * tic6x-tdep.c (tic6x_print_insn): Remove.
8689         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
8690         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
8691         * v850-tdep.c (v850_gdbarch_init): Likewise.
8692         * vax-tdep.c (vax_gdbarch_init): Likewise.
8693         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8694         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
8695
8696 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
8697
8698         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
8699         (MIPS_FP0_REGNUM): Remove.
8700         (MIPS_FSR_REGNUM): Remove.
8701         (mips_fbsd_supply_fpregs): Use mips_regnum.
8702         (mips_fbsd_supply_gregs): Likewise.
8703         (mips_fbsd_collect_fpregs): Likewise.
8704         (mips_fbsd_collect_gregs): Likewise.
8705
8706 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
8707
8708         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
8709         (getpfpregs_supplies): New function.
8710         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
8711         getfpregs_supplies.
8712         (mips_fbsd_store_inferior_registers): Likewise.
8713
8714 2017-05-22  Pedro Alves <palves@redhat.com>
8715
8716         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
8717         maintainer.
8718
8719 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
8720
8721         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
8722         (store_register): Likewise.
8723         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
8724         (get_decimal_float_return_value): Likewise.
8725         (do_ppc_sysv_return_value): Likewise.
8726         (ppc64_sysv_abi_push_integer): Likewise.
8727         (ppc64_sysv_abi_push_freg): Likewise.
8728         (ppc64_sysv_abi_return_value_base): Likewise.
8729         (ppc64_sysv_abi_return_value): Likewise.
8730         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
8731         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
8732         * rs6000-nat.c: Likewise.
8733         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
8734         (rs6000_value_to_register): Likewise.
8735         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
8736
8737 2017-05-21  Tom Tromey  <tom@tromey.com>
8738
8739         PR rust/21466:
8740         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
8741         arrays as "[T]", not "[T; ]".
8742
8743 2017-05-19  Tom Tromey  <tom@tromey.com>
8744
8745         PR rust/21484:
8746         * rust-lang.c (exp_descriptor_rust): New function.
8747         (rust_language_defn): Use it.
8748         * p-lang.c (pascal_language_defn): Update.
8749         * opencl-lang.c (opencl_language_defn): Update.
8750         * objc-lang.c (objc_language_defn): Update.
8751         * m2-lang.c (m2_language_defn): Update.
8752         * language.h (struct language_defn)
8753         <la_watch_location_expression>: New member.
8754         * language.c (unknown_language_defn, auto_language_defn)
8755         (local_language_defn): Update.
8756         * go-lang.c (go_language_defn): Update.
8757         * f-lang.c (f_language_defn): Update.
8758         * d-lang.c (d_language_defn): Update.
8759         * c-lang.h (c_watch_location_expression): Declare.
8760         * c-lang.c (c_watch_location_expression): New function.
8761         (c_language_defn, cplus_language_defn, asm_language_defn)
8762         (minimal_language_defn): Use it.
8763         * breakpoint.c (watch_command_1): Call
8764         la_watch_location_expression.
8765         * ada-lang.c (ada_language_defn): Update.
8766
8767 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8768
8769         PR tui/21482
8770         * gdb_curses.h (NOMACROS): Define.
8771         (NCURSES_NOMACROS): Define.
8772
8773 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8774
8775         PR tui/21482
8776         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
8777         arg to char *.
8778         * tui/tui-wingeneral.c (box_win): Likewise.
8779         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
8780         (tui_show_source_line): Likewise.
8781         (tui_show_exec_info_content): Likewise.
8782
8783 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
8784
8785         * sparc-tdep.c (sparc_structure_return_p)
8786         (sparc_arg_on_registers_p): New functions.
8787         (sparc32_store_arguments): Use them.
8788         * sparc64-tdep.c (sparc64_16_byte_align_p)
8789         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
8790         Handle TYPE_CODE_ARRAY.
8791
8792 2017-05-17  Yao Qi  <yao.qi@linaro.org>
8793
8794         * cli/cli-decode.c (add_alias_cmd): New function.
8795         * command.h (add_alias_cmd): Declare.
8796         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
8797         instead call add_alias_cmd.
8798
8799 2017-05-17  Pedro Alves  <palves@redhat.com>
8800
8801         * Makefile.in (nat_extra_makefile_frag): Rename to ...
8802         (nat_makefile_frag): ... this.  All references updated.
8803         * configure.ac: Likewise.
8804         * configure.nat: Likewise.  Enhance comments.
8805         * configure: Regenerate.
8806
8807 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8808
8809         * procfs.c (procfs_create_inferior): Change prototype to match
8810         definition.
8811
8812 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
8813
8814         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
8815         C++ compiler warning.
8816
8817 2017-05-12  Tom Tromey  <tom@tromey.com>
8818
8819         PR rust/21483:
8820         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
8821         recurse, just call value_struct_elt directly.
8822
8823 2017-05-12  Tom Tromey  <tom@tromey.com>
8824
8825         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
8826         OP_RUST_ARRAY>: Fix.
8827
8828 2017-05-12  Tom Tromey  <tom@tromey.com>
8829
8830         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
8831
8832 2017-05-09  Yao Qi  <yao.qi@linaro.org>
8833
8834         * regcache.c: Include <forward_list>.
8835         (struct regcache_list): Remove.
8836         (current_regcache): Update.
8837         (get_thread_arch_aspace_regcache): Update for std::forward_list.
8838         (regcache_thread_ptid_changed): Likewise.
8839         (registers_changed_ptid): Likewise.
8840         (current_regcache_size): Likewise.
8841
8842 2017-05-09  Yao Qi  <yao.qi@linaro.org>
8843
8844         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
8845         (current_regcache_size): New function.
8846         (current_regcache_test): New function.
8847         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
8848
8849 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
8850
8851         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
8852         (print_gp_register_row): Use get_frame_register_value.
8853
8854 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
8855
8856         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
8857         (mips_supply_fpregset): Likewise.
8858         (mips64_supply_gregset): Likewise.
8859
8860 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
8861
8862         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
8863         regcache->raw_supply_zeroed.
8864
8865 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8866
8867         * configure.nat: Rearrange 'case' statements to match
8868         host before cpu.
8869
8870 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8871
8872         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
8873         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
8874         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
8875         "@nat_extra_makefile_frag@".
8876         (Makefile): Remove dependency on "@frags@".
8877         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
8878         (data-directory/Makefile): Likewise.
8879         * config/aarch64/linux.mh: Deleted; moved contents to
8880         "gdb/configure.nat".
8881         * config/alpha/alpha-linux.mh: Likewise.
8882         * config/alpha/nbsd.mh: Likewise.
8883         * config/arm/linux.mh: Likewise.
8884         * config/arm/nbsdelf.mh: Likewise.
8885         * config/i386/cygwin.mh: Likewise.
8886         * config/i386/cygwin64.mh: Likewise.
8887         * config/i386/darwin.mh: Likewise.
8888         * config/i386/fbsd.mh: Likewise.
8889         * config/i386/fbsd64.mh: Likewise.
8890         * config/i386/go32.mh: Likewise.
8891         * config/i386/i386gnu.mh: Likewise.
8892         * config/i386/i386sol2.mh: Likewise.
8893         * config/i386/linux.mh: Likewise.
8894         * config/i386/linux64.mh: Likewise.
8895         * config/i386/mingw.mh: Likewise.
8896         * config/i386/mingw64.mh: Likewise.
8897         * config/i386/nbsd64.mh: Likewise.
8898         * config/i386/nbsdelf.mh: Likewise.
8899         * config/i386/nto.mh: Likewise.
8900         * config/i386/obsd.mh: Likewise.
8901         * config/i386/obsd64.mh: Likewise.
8902         * config/i386/sol2-64.mh: Likewise.
8903         * config/ia64/linux.mh: Likewise.
8904         * config/m32r/linux.mh: Likewise.
8905         * config/m68k/linux.mh: Likewise.
8906         * config/m68k/nbsdelf.mh: Likewise.
8907         * config/m68k/obsd.mh: Likewise.
8908         * config/m88k/obsd.mh: Likewise.
8909         * config/mips/fbsd.mh: Likewise.
8910         * config/mips/linux.mh: Likewise.
8911         * config/mips/nbsd.mh: Likewise.
8912         * config/mips/obsd64.mh: Likewise.
8913         * config/pa/linux.mh: Likewise.
8914         * config/pa/nbsd.mh: Likewise.
8915         * config/pa/obsd.mh: Likewise.
8916         * config/powerpc/aix.mh: Likewise.
8917         * config/powerpc/fbsd.mh: Likewise.
8918         * config/powerpc/linux.mh: Likewise.
8919         * config/powerpc/nbsd.mh: Likewise.
8920         * config/powerpc/obsd.mh: Likewise.
8921         * config/powerpc/ppc64-linux.mh: Likewise.
8922         * config/powerpc/spu-linux.mh: Likewise.
8923         * config/s390/linux.mh: Likewise.
8924         * config/sh/nbsd.mh: Likewise.
8925         * config/sparc/fbsd.mh: Likewise.
8926         * config/sparc/linux.mh: Likewise.
8927         * config/sparc/linux64.mh: Likewise.
8928         * config/sparc/nbsd64.mh: Likewise.
8929         * config/sparc/nbsdelf.mh: Likewise.
8930         * config/sparc/obsd64.mh: Likewise.
8931         * config/sparc/sol2.mh: Likewise.
8932         * config/tilegx/linux.mh: Likewise.
8933         * config/vax/nbsdelf.mh: Likewise.
8934         * config/vax/obsd.mh: Likewise.
8935         * config/xtensa/linux.mh: Likewise.
8936         * config/i386/i386gnu.mn: New file, with excerpts from
8937         "config/i386/i386gnu.mh".
8938         * configure: Regenerate.
8939         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
8940         *.mh files under "gdb/config".
8941         * configure.nat: New file, with contents from the
8942         "gdb/config/*/*.mh" files.
8943
8944 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
8945
8946         * btrace.c (btrace_clear): Free insn vector.
8947
8948 2017-05-05  Pedro Alves  <palves@redhat.com>
8949
8950         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
8951         * configure: Regenerate.
8952
8953 2017-05-04  Pedro Alves  <palves@redhat.com>
8954
8955         * Makefile.in (SFILES): Add progspace-and-thread.c.
8956         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
8957         (COMMON_OBS): Add progspace-and-thread.o.
8958         * breakpoint.c: Include "progspace-and-thread.h".
8959         (update_inserted_breakpoint_locations)
8960         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
8961         Use scoped_restore_current_pspace_and_thread.
8962         (create_std_terminate_master_breakpoint): Use
8963         scoped_restore_current_program_space.
8964         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
8965         (print_breakpoint_location): Use
8966         scoped_restore_current_program_space.
8967         (bp_loc_is_permanent): Use
8968         scoped_restore_current_pspace_and_thread.
8969         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
8970         (download_tracepoint_locations): Use
8971         scoped_restore_current_pspace_and_thread.
8972         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
8973         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
8974         (enum step_over_calls_kind): Moved from inferior.h.
8975         (class scoped_restore_current_thread): New class.
8976         * gdbthread.h (make_cleanup_restore_current_thread): Delete
8977         declaration.
8978         (scoped_restore_current_thread): New class.
8979         * infcmd.c: Include "common/gdb_optional.h".
8980         (continue_1, proceed_after_attach): Use
8981         scoped_restore_current_thread.
8982         (notice_new_inferior): Use scoped_restore_current_thread.
8983         * inferior.c: Include "progspace-and-thread.h".
8984         (restore_inferior, save_current_inferior): Delete.
8985         (add_inferior_command, clone_inferior_command): Use
8986         scoped_restore_current_pspace_and_thread.
8987         * inferior.h (scoped_restore_current_inferior): New class.
8988         * infrun.c: Include "progspace-and-thread.h" and
8989         "common/gdb_optional.h".
8990         (follow_fork_inferior): Use
8991         scoped_restore_current_pspace_and_thread.
8992         (scoped_restore_exited_inferior): New class.
8993         (handle_vfork_child_exec_or_exit): Use
8994         scoped_restore_exited_inferior,
8995         scoped_restore_current_pspace_and_thread,
8996         scoped_restore_current_thread and scoped_restore.
8997         (fetch_inferior_event): Use scoped_restore_current_thread.
8998         * linespec.c (decode_line_full, decode_line_1): Use
8999         scoped_restore_current_program_space.
9000         * mi/mi-main.c: Include "progspace-and-thread.h".
9001         (exec_continue): Use scoped_restore_current_thread.
9002         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
9003         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
9004         * proc-service.c (ps_pglobal_lookup): Use
9005         scoped_restore_current_program_space.
9006         * progspace-and-thread.c: New file.
9007         * progspace-and-thread.h: New file.
9008         * progspace.c (release_program_space, clone_program_space): Use
9009         scoped_restore_current_program_space.
9010         (restore_program_space, save_current_program_space)
9011         (save_current_space_and_thread): Delete.
9012         (switch_to_program_space_and_thread): Moved to
9013         progspace-and-thread.c.
9014         * progspace.h (save_current_program_space)
9015         (save_current_space_and_thread): Delete declarations.
9016         (scoped_restore_current_program_space): New class.
9017         * remote.c (remote_btrace_maybe_reopen): Use
9018         scoped_restore_current_thread.
9019         * symtab.c: Include "progspace-and-thread.h".
9020         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
9021         * thread.c (print_thread_info_1): Use
9022         scoped_restore_current_thread.
9023         (struct current_thread_cleanup): Delete.
9024         (do_restore_current_thread_cleanup)
9025         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
9026         (scoped_restore_current_thread::~scoped_restore_current_thread):
9027         ... this new dtor.
9028         (make_cleanup_restore_current_thread): Rename/convert to ...
9029         (scoped_restore_current_thread::scoped_restore_current_thread):
9030         ... this new ctor.
9031         (thread_apply_all_command): Use scoped_restore_current_thread.
9032         (thread_apply_command): Use scoped_restore_current_thread.
9033         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
9034         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
9035
9036 2017-05-04  Pedro Alves  <palves@redhat.com>
9037
9038         * thread.c (make_cleanup_restore_current_thread): Move
9039         find_thread_ptid call before the is_stopped call.  Assert that the
9040         thread is found.  Replace is_stopped call by checking the thread's
9041         state directly.  Remove unnecessary NULL-thread check.
9042
9043 2017-05-04  Pedro Alves  <palves@redhat.com>
9044
9045         * corelow.c (thread_section_name): New class.
9046         (get_core_register_section, get_core_siginfo): Use it.
9047
9048 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9049
9050         * corelow.c (sniff_core_bfd): Remove extra semicolon.
9051         (get_core_register_section): Remove xfree of NULL pointer.
9052
9053 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
9054
9055         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
9056         * regcache.c (regcache::raw_supply_zeroed): New function.
9057         * regcache.h (regcache::raw_supply_zeroed): New declaration.
9058
9059 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
9060
9061         * gdbarch.sh: Remove commented out definition of
9062         TARGET_CHAR_BIT.
9063         * gdbarch.h: Re-generate.
9064
9065 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
9066
9067         * configure: Regenerate.
9068
9069 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
9070
9071         * solib-target.c (solib_target_relocate_section_addresses):
9072         Remove num_section_bases, num_bases, segment_bases variables.
9073
9074 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9075
9076         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
9077
9078 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9079
9080         * solib-target.c: Include <vector>
9081         (struct lm_info_target) <~lm_info_target>: Remove.
9082         <segment_bases, section_bases>: Change type to
9083         std::vector<CORE_ADDR>.
9084         (library_list_start_segment, library_list_start_section,
9085         library_list_end_library,
9086         solib_target_relocate_section_addresses): Adjust.
9087
9088 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9089
9090         * gdbarch.sh (software_single_step): Change return type to
9091         std::vector<CORE_ADDR>.
9092         * gdbarch.c, gdbarch.h: Re-generate.
9093         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
9094         Adjust.
9095         (arm_deal_with_atomic_sequence_raw): Adjust.
9096         (thumb_get_next_pcs_raw): Adjust.
9097         (arm_get_next_pcs_raw): Adjust.
9098         (arm_get_next_pcs): Adjust.
9099         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
9100         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
9101         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
9102         (alpha_software_single_step): Adjust.
9103         * alpha-tdep.h (alpha_software_single_step): Adjust.
9104         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
9105         * arm-tdep.c (arm_software_single_step): Adjust.
9106         (arm_breakpoint_kind_from_current_state): Adjust.
9107         * arm-tdep.h (arm_software_single_step): Adjust.
9108         * breakpoint.c (insert_single_step_breakpoint): Adjust.
9109         * cris-tdep.c (cris_software_single_step): Adjust.
9110         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
9111         (micromips_deal_with_atomic_sequence): Adjust.
9112         (deal_with_atomic_sequence): Adjust.
9113         (mips_software_single_step): Adjust.
9114         * mips-tdep.h (mips_software_single_step): Adjust.
9115         * moxie-tdep.c (moxie_software_single_step): Adjust.
9116         * nios2-tdep.c (nios2_software_single_step): Adjust.
9117         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
9118         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
9119         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
9120         * s390-linux-tdep.c (s390_software_single_step): Adjust.
9121         * sparc-tdep.c (sparc_software_single_step): Adjust.
9122         * spu-tdep.c (spu_software_single_step): Adjust.
9123         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
9124
9125 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9126
9127         * gdbarch.sh: Use semi-colon as field separator instead of colon.
9128         * gdbarch.h: Re-generate.
9129
9130 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9131
9132         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
9133         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
9134         * python/py-instruction.c, python/py-instruction.h: New file.
9135         * python/py-record.c: Add py-instruction.h include.
9136         (gdbpy_initialize_record): Make gdb.Instruction a super class of
9137         gdb.RecordInstruction.
9138         * python/python-internal.h: Add gdbpy_initialize_instruction
9139         declaration.
9140         * python/python.c (do_start_initialization): Add
9141         gdbpy_initialize_instruction.
9142
9143 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9144
9145         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
9146         Remove.
9147         (btrace_func_from_recpy_func): New function.
9148         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
9149         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
9150         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
9151         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
9152         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
9153         Also, use new helper functions.
9154         (btpy_list_item): Use new helper functions.
9155         (recpy_bt_function_call_history): Use new type name.
9156         (btpy_call_getset): Remove.
9157         (gdbpy_initialize_btrace): Remove code to initialize
9158         gdb.BtraceFunctionCall.
9159         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
9160         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
9161         recpy_bt_func_prev, recpy_bt_func_next): New export.
9162         * python/py-record.c (recpy_func_type): New static object.
9163         (recpy_func_new, recpy_func_level, recpy_func_symbol,
9164         recpy_func_instructions, recpy_func_up, recpy_func_prev,
9165         recpy_func_next): New function.
9166         (recpy_element_hash, recpy_element_richcompare): Updated comment.
9167         (recpy_func_getset): New static object.
9168         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
9169         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
9170
9171 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9172
9173         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
9174         (btpy_object, btpy_insn_type, btpy_new): Remove.
9175         (btpy_list_object): Use gdb.RecordInstruction type instead of
9176         gdb.BtraceInstruction type.
9177         (btrace_insn_from_recpy_insn): New function.
9178         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
9179         btpy_new.
9180         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
9181         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
9182         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
9183         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
9184         instead of btpy_object.
9185         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9186         btpy_insn_data, btpy_insn_decode): Rename to ...
9187         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
9188         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
9189         recpy_bt_insn_decode): This.  Also, use new helper functions.
9190         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
9191         recpy_insn_type.
9192         (btpy_insn_getset): Remove.
9193         (gdbpy_initialize_btrace): Remove code to initialize
9194         gdb.BtraceInstruction.  Use recpy_element_object.
9195         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
9196         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
9197         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
9198         * python/py-record.c (recpy_insn_type): New static object.
9199         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
9200         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
9201         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
9202         New function.
9203         (recpy_insn_getset): New static object.
9204         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
9205         * python/py-record.h (recpy_element_object): New typedef.
9206         (recpy_insn_type, recpy_insn_new): New export.
9207
9208 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9209
9210         * py-record-btrace.c (btpy_insn_new): Removed.
9211         (btpy_insn_or_gap_new): New function.
9212         (btpy_insn_error): Removed.
9213         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9214         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
9215         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
9216         btpy_insn_or_gap_new instead of btpy_insn_new.
9217         (btpy_insn_getset): Remove btpy_insn_error.
9218         * py-record.c (recpy_gap_type): New static object.
9219         (recpy_gap_object): New typedef.
9220         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
9221         recpy_gap_reason_string): New function.
9222         (recpy_gap_getset): New static object.
9223         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
9224         * py-record.h (recpy_gap_new): New export.
9225
9226 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9227
9228         * python/py-record.c (recpy_ptid): Remove.
9229         (recpy_record_getset): Remove recpy_ptid.
9230
9231 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9232
9233         * btrace.c (btrace_fetch): Set inferior_ptid.
9234         * python/py-record-btrace.c: Add "py-record.h" include.
9235         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
9236         recpy_bt_end, recpy_bt_instruction_history,
9237         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
9238         in gdb.Record object instead of current ptid.
9239         * python/py-record.c: Include new "py-record.h" file.
9240         (recpy_record_object): Moved to py-record.h.
9241         * python/py-record.h: New file.
9242
9243 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9244
9245         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
9246         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
9247         indentation.
9248
9249 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
9250
9251         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
9252         the past maintainers section.
9253
9254 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9255
9256         * infcmd.c (get_return_value): Use regcache ctor, and remove
9257         cleanup.
9258
9259 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9260             Pedro Alves  <palves@redhat.com>
9261
9262         * regcache.c (regcache::regcache): New tag dispatch ctor.
9263         (do_cooked_read): Moved above.
9264         (regcache_dup): Use the tag dispatch ctor..
9265         * regcache.h (regcache): Declare ctor, delete copy ctor and
9266         assignment operator, remove friend regcache_dup.
9267
9268 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9269
9270         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
9271         call method save instead of regcache_cpy.
9272         * regcache.h (struct regcache): Make regcache_dup a friend.
9273
9274 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9275
9276         * regcache.c (struct regcache): Move to regcache.h
9277         (regcache::arch): New method.
9278         (regcache_get_ptid): Update.
9279         (get_regcache_arch): Call arch method.
9280         (get_regcache_aspace): Call method aspace.
9281         (register_buffer): Change it to method.
9282         (regcache_save): Change it to regcache::save.
9283         (regcache_restore): Likewise.
9284         (regcache_cpy_no_passthrough): Remove the declaration.
9285         (regcache_cpy): Call methods restore and cpy_no_passthrough.
9286         (regcache_cpy_no_passthrough): Change it to method
9287         cpy_no_passthrough.
9288         (regcache_register_status): Change it to method
9289         get_register_status.
9290         (regcache_invalidate): Change it to method invalidate.
9291         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
9292         (regcache_raw_update): Change it to method raw_update.
9293         (regcache_raw_read): Likewise.
9294         (regcache_raw_read_signed): Likewise.
9295         (regcache_raw_read_unsigned): Likewise.
9296         (regcache_raw_write_signed): Likewise.
9297         (regcache_raw_write_unsigned): Likewise.
9298         (regcache_cooked_read): Likewise.
9299         (regcache_cooked_read_value): Likewise.
9300         (regcache_cooked_read_signed): Likewise.
9301         (regcache_cooked_read_unsigned): Likewise.
9302         (regcache_cooked_write_signed): Likewise.
9303         (regcache_cooked_write_unsigned): Likewise.
9304         (regcache_raw_set_cached_value): Likewise.
9305         (regcache_raw_write): Likewise.
9306         (regcache_cooked_write): Likewise.
9307         (regcache_xfer_part): Likewise.
9308         (regcache_raw_read_part): Likewise.
9309         (regcache_raw_write_part): Likewise.
9310         (regcache_cooked_read_part): Likewise.
9311         (regcache_cooked_write_part): Likewise.
9312         (regcache_raw_supply): Likewise.
9313         (regcache_raw_collect): Likewise.
9314         (regcache_transfer_regset): Likewise.
9315         (regcache_supply_regset): Likewise.
9316         (regcache_collect_regset): Likewise.
9317         (regcache_debug_print_register): Likewise.
9318         (enum regcache_dump_what): Move it to regcache.h.
9319         (regcache_dump): Change it to method dump.
9320         * regcache.h (enum regcache_dump_what): New.
9321         (class regcache): New.
9322         * target.c (target_fetch_registers): Call method
9323         debug_print_register.
9324         (target_store_registers): Likewise.
9325
9326 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9327
9328         * windows-nat.c (struct lm_info_windows): Initialize field.
9329         (windows_make_so): Allocate lm_info_windows with new.
9330         (windows_free_so): Free lm_info_windows with delete.
9331
9332 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9333
9334         * solib-darwin.c (struct lm_info_darwin): Initialize field.
9335         (darwin_current_sos): Allocate lm_info_darwin with new, remove
9336         cleanup.
9337         (darwin_free_so): Free lm_info_darwin with delete.
9338
9339 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9340
9341         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
9342         <l_addr_p>: Change type to bool.
9343         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
9344         (svr4_free_so): Free lm_info_svr4 with delete.
9345         (svr4_copy_library_list): Replace memcpy with call to copy
9346         constructor.
9347         (library_list_start_library, svr4_default_sos): Allocate
9348         lm_info_svr4 with new.
9349
9350 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9351
9352         * solib-target.c (struct lm_info_target): Add destructor,
9353         initialize fields.
9354         <name>: Change type to std::string.
9355         (library_list_start_library): Allocate lm_info_target with new.
9356         (solib_target_free_library_list): Free lm_info_target with
9357         delete.
9358         (solib_target_current_sos): Adapt to std::string.
9359         (solib_target_free_so): Free lm_info_target with delete.
9360
9361 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9362
9363         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
9364         fields.
9365         (frv_current_sos): Allocate lm_info_frv with new.
9366         (frv_relocate_main_executable): Free lm_info_frv with delete,
9367         allocate with new.
9368         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
9369
9370 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9371
9372         * solib-frv.c (struct lm_info_frv): Fix indentation.
9373
9374 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9375
9376         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
9377         map field.
9378         (dsbt_current_sos): Allocate lm_info_dsbt with new.
9379         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
9380         and allocate with new.
9381         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
9382
9383 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9384
9385         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
9386         <filename, member_name>: Change type to std::string.
9387         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
9388         (library_list_start_library): Allocate lm_info_aix with new.
9389         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
9390         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
9391         with copy constructor.
9392
9393 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9394
9395         * solist.h (struct lm_info): Remove.
9396         (struct lm_info_base): New class.
9397         (struct so_list) <lm_info>: Change type to lm_info_base *.
9398         * nto-tdep.c (struct lm_info): Remove.
9399         (lm_addr): Adjust.
9400         * solib-aix.c (struct lm_info): Rename to ...
9401         (struct lm_info_aix): ... this.  Extend lm_info_base.
9402         (lm_info_p): Rename to ...
9403         (lm_info_aix_p): ... this, and adjust.
9404         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
9405         solib_aix_parse_libraries, library_list_start_library,
9406         solib_aix_free_library_list, solib_aix_parse_libraries,
9407         solib_aix_get_library_list,
9408         solib_aix_relocate_section_addresses, solib_aix_free_so,
9409         solib_aix_get_section_offsets,
9410         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
9411         Adjust.
9412         (struct solib_aix_inferior_data) <library_list>: Adjust.
9413         * solib-darwin.c (struct lm_info): Rename to ...
9414         (struct lm_info_darwin): ... this.  Extend lm_info_base.
9415         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
9416         * solib-dsbt.c (struct lm_info): Rename to ...
9417         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
9418         (struct dsbt_info) <main_executable_lm_info): Adjust.
9419         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
9420         dsbt_relocate_section_addresses): Adjust.
9421         * solib-frv.c (struct lm_info): Rename to ...
9422         (struct lm_info_frv): ... this.  Extend lm_info_base.
9423         (main_executable_lm_info): Adjust.
9424         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
9425         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
9426         find_canonical_descriptor_in_load_object,
9427         frv_fdpic_find_canonical_descriptor): Adjust.
9428         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
9429         to lm_info_svr4.
9430         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
9431         svr4_clear_so, svr4_copy_library_list,
9432         library_list_start_library, svr4_default_sos, svr4_read_so_list,
9433         svr4_current_sos, svr4_fetch_objfile_link_map,
9434         solist_update_incremental): Adjust.
9435         * solib-svr4.h (struct lm_info_svr4): Move here from
9436         solib-svr4.c.
9437         * solib-target.c (struct lm_info): Rename to ...
9438         (struct lm_info_target): ... this.  Extend lm_info_base.
9439         (lm_info_p): Rename to ...
9440         (lm_info_target_p): ... this.
9441         (solib_target_parse_libraries, library_list_start_segment,
9442         library_list_start_section, library_list_start_library,
9443         library_list_end_library, solib_target_free_library_list,
9444         solib_target_current_sos, solib_target_free_so,
9445         solib_target_relocate_section_addresses): Adjust.
9446         * windows-nat.c (struct lm_info): Rename to ...
9447         (struct lm_info_windows): ... this.  Extend lm_info_base.
9448         (windows_make_so, handle_load_dll, handle_unload_dll,
9449         windows_xfer_shared_libraries): Adjust.
9450
9451 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9452
9453         * solib-darwin.c (struct darwin_so_list): Remove.
9454         (darwin_current_sos): Allocate an so_list object instead of a
9455         darwin_so_list, separately allocate an lm_info object.
9456         (darwin_free_so): Free lm_info.
9457
9458 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
9459
9460         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
9461         with fprintf_filtered.
9462
9463 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9464
9465         * regcache.c (regcache::regcache): New function.
9466         (regcache::~regcache): New function.
9467         (regcache_xmalloc_1): Remove.
9468         (regcache_xmalloc): Call new regcache.
9469         (regcache_xfree): Call delete regcache.
9470         (get_thread_arch_aspace_regcache): Call new regcache.
9471
9472 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9473
9474         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
9475         lwp instead of ptid_get_lwp.
9476
9477 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9478
9479         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
9480         lwp_info instead of getting from inferior_ptid.
9481
9482 2017-04-27  Keith Seitz  <keiths@redhat.com>
9483
9484         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
9485         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
9486         (CV_CONVERSION_BADNESS): Define.
9487         (rank_one_type): Remove overly restrictive rvalue reference
9488         rank checks.
9489         Add cv-qualifier checks and subranks for type equality.
9490         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
9491         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
9492         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
9493
9494 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
9495
9496         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
9497         count when creating the object.
9498
9499 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
9500             Ulrich Weigand  <uweigand@de.ibm.com>
9501
9502         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
9503         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
9504         is used in AIX.
9505         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
9506         (process_xcoff_symbol): Likewise.
9507         (scan_xcoff_symtab): Likewise.
9508
9509 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9510
9511         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
9512         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
9513         (ia64_access_reg): Use get_frame_register_unsigned.
9514         (ia64_access_rse_reg): Likewise.
9515         (ia64_libunwind_frame_prev_register): Likewise.
9516
9517 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
9518
9519         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
9520         * gdbarch.c: Regenerated.
9521         * gdbarch.h: Regenerated.
9522         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
9523         visibility external.
9524         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
9525         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
9526         (enum cfa_how_kind): Move to ...
9527         (struct dwarf2_frame_state_reg_info): Likewise.
9528         (struct dwarf2_frame_state): Likewise.
9529         * dwarf2-frame.h: ... here.
9530         (dwarf2_frame_state_alloc_regs): New declaration.
9531         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
9532         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
9533
9534 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9535
9536         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
9537         regcache_raw_read_unsigned.
9538         (xtensa_pseudo_register_write): Likewise.
9539
9540 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9541
9542         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
9543         (nds32_pseudo_register_write): Likewise.
9544
9545 2017-04-25  Yao Qi  <yao.qi@linaro.org>
9546
9547         * regcache.c (struct regcache) <readonly_p>: Change its type
9548         to bool.
9549         (regcache_xmalloc_1): Update parameter type and callers update.
9550
9551 2017-04-25  Yao Qi  <yao.qi@linaro.org>
9552
9553         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
9554         set_gdbarch_wchar_bit.
9555         * arm-tdep.c (arm_gdbarch_init): Likewise.
9556
9557 2017-04-25  Pedro Alves  <palves@redhat.com>
9558
9559         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
9560         (BothAreRelocatable, memcopy, memmove): Don't define.
9561         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
9562         macros.
9563
9564 2017-04-25  Pedro Alves  <palves@redhat.com>
9565
9566         * common/common-defs.h: Include "common/poison.h".
9567         * common/function-view.h: (Not, Or, Requires): Move to traits.h
9568         and adjust.
9569         * common/poison.h: New file.
9570         * common/traits.h: Include <type_traits>.
9571         (Not, Or, Requires): New, moved from common/function-view.h.
9572
9573 2017-04-25  Pedro Alves  <palves@redhat.com>
9574
9575         * breakpoint.h (struct breakpoint): In-class initialize all
9576         fields.  Make boolean fields "bool".
9577         * breakpoint.c (init_raw_breakpoint_without_location): Remove
9578         memset call and initializations no longer necessary.
9579
9580 2017-04-25  Pedro Alves  <palves@redhat.com>
9581
9582         * btrace.c (pt_btrace_insn_flags): Change parameter type to
9583         reference.
9584         (pt_btrace_insn): New function.
9585         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
9586
9587 2017-04-25  Pedro Alves  <palves@redhat.com>
9588
9589         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
9590         "base" field and inherit from "bp_location" instead.  Add
9591         non-default ctor.
9592         (allocate_location_exception): Use new non-default ctor.
9593         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
9594         (init_bp_location): Convert to ...
9595         (bp_location::bp_location): ... this new ctor, and remove memset
9596         call.
9597         (base_breakpoint_allocate_location): Use the new non-default ctor.
9598         * breakpoint.h (bp_location): Now a class.  Declare default and
9599         non-default ctors.  In-class initialize all members.
9600         (init_bp_location): Remove declaration.
9601
9602 2017-04-25  Pedro Alves  <palves@redhat.com>
9603
9604         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
9605         assignment operator.
9606
9607 2017-04-24  Yao Qi  <yao.qi@linaro.org>
9608
9609         * doublest.c (convert_doublest_to_floatformat): Call
9610         floatformat_totalsize_bytes.
9611
9612 2017-04-22  Tom Tromey  <tom@tromey.com>
9613
9614         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
9615         ui_out_emit_list.
9616         * stack.c (print_frame): Use ui_out_emit_list.
9617         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9618         ui_out_emit_list.
9619         * mi/mi-main.c (print_one_inferior)
9620         (mi_cmd_data_list_register_names)
9621         (mi_cmd_data_list_register_values, mi_cmd_list_features)
9622         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
9623         ui_out_emit_list.
9624         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
9625         (mi_output_solib_attribs): Use ui_out_emit_list,
9626         ui_out_emit_tuple.
9627         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
9628         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
9629         (mi_cmd_stack_list_args, list_args_or_locals): Use
9630         ui_out_emit_list.
9631         * disasm.c (do_assembly_only): Use ui_out_emit_list.
9632         * breakpoint.c (print_solib_event, output_thread_groups): Use
9633         ui_out_emit_list.
9634
9635 2017-04-22  Tom Tromey  <tom@tromey.com>
9636
9637         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
9638         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
9639         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
9640
9641 2017-04-22  Tom Tromey  <tom@tromey.com>
9642
9643         * tracepoint.c (tvariables_info_1)
9644         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
9645
9646 2017-04-22  Tom Tromey  <tom@tromey.com>
9647
9648         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
9649         annotate_arg_emitter.
9650         * breakpoint.c (print_mention_watchpoint)
9651         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
9652         * annotate.h (struct annotate_arg_emitter): New.
9653
9654 2017-04-22  Tom Tromey  <tom@tromey.com>
9655
9656         * record-btrace.c (record_btrace_insn_history)
9657         (record_btrace_insn_history_range, record_btrace_call_history)
9658         (record_btrace_call_history_range): Use ui_out_emit_tuple.
9659         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
9660         ui_out_emit_tuple.
9661         * stack.c (print_frame_info): Use ui_out_emit_tuple.
9662         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
9663         * skip.c (skip_info): Use ui_out_emit_tuple.
9664         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
9665         * progspace.c (print_program_space): Use ui_out_emit_tuple.
9666         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
9667         * osdata.c (info_osdata): Use ui_out_emit_tuple.
9668         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9669         ui_out_emit_tuple.
9670         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
9671         (output_register, mi_cmd_data_read_memory)
9672         (mi_cmd_data_read_memory_bytes, mi_load_progress)
9673         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
9674         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
9675         Use ui_out_emit_tuple.
9676         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
9677         ui_out_emit_tuple.
9678         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9679         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
9680         * linux-thread-db.c (info_auto_load_libthread_db): Use
9681         ui_out_emit_tuple.
9682         * inferior.c (print_inferior): Use ui_out_emit_tuple.
9683         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
9684         * disasm.c (do_mixed_source_and_assembly_deprecated)
9685         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
9686         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
9687         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
9688         * breakpoint.c (print_one_breakpoint_location)
9689         (print_one_breakpoint): Use ui_out_emit_tuple.
9690         * auto-load.c (print_script, info_auto_load_cmd): Use
9691         ui_out_emit_tuple.
9692         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
9693
9694 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
9695
9696         * thread.c (print_thread_info_1): Remove dead code.
9697
9698 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
9699
9700         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
9701         GDB_SELF_TEST.
9702         * arm-tdep.c (selftests::arm_record_test): Likewise.
9703
9704 2017-04-21  Yao Qi  <yao.qi@linaro.org>
9705
9706         * regcache.c (regcache_restore): Remove argument 2.  Replace
9707         argument 3 with regcache.  Get register status from
9708         src->register_status and get register contents from
9709         register_buffer (src, regnum).
9710         (regcache_cpy): Update.
9711
9712 2017-04-19  Pedro Alves  <palves@redhat.com>
9713
9714         * gdbthread.h (thread): Add missing closing parenthesis in
9715         comment.
9716
9717 2017-04-19  Pedro Alves  <palves@redhat.com>
9718
9719         * common/refcounted-object.h: New file.
9720         * gdbthread.h: Include "common/refcounted-object.h".
9721         (thread_info): Inherit from refcounted_object and add comments.
9722         (thread_info::incref, thread_info::decref)
9723         (thread_info::m_refcount): Delete.
9724         (thread_info::deletable): Use the refcounted_object::refcount()
9725         method.
9726         * inferior.c (current_inferior_): Add comment.
9727         (set_current_inferior): Increment/decrement refcounts.
9728         (prune_inferiors, remove_inferior_command): Skip inferiors marked
9729         not-deletable instead of comparing with the current inferior.
9730         (initialize_inferiors): Increment the initial inferior's refcount.
9731         * inferior.h (struct inferior): Forward declare.
9732         Include "common/refcounted-object.h".
9733         (current_inferior, set_current_inferior): Move declaration to
9734         before struct inferior's definition, and fix comment.
9735         (inferior): Inherit from refcounted_object.  Add comments.
9736         * thread.c (switch_to_thread_no_regs): Reference the thread's
9737         inferior pointer directly instead of doing a ptid lookup.
9738         (switch_to_no_thread): New function.
9739         (switch_to_thread(thread_info *)): New function, factored out
9740         from ...
9741         (switch_to_thread(ptid_t)): ... this.
9742         (restore_current_thread): Delete.
9743         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
9744         fields, and add 'inf' field.
9745         (do_restore_current_thread_cleanup): Check whether old->inf is
9746         alive instead of looking up an inferior by ptid.  Use
9747         switch_to_thread and switch_to_no_thread.
9748         (restore_current_thread_cleanup_dtor): Use old->inf directly
9749         instead of lookup up an inferior by id.  Decref the inferior.
9750         Don't restore 'removable'.
9751         (make_cleanup_restore_current_thread): Same the inferior pointer
9752         in old, instead of the inferior number.  Incref the inferior.
9753         Don't save/clear 'removable'.
9754
9755 2017-04-19  Pedro Alves  <palves@redhat.com>
9756
9757         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9758         unittests/scoped_restore-selftests.c.
9759         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
9760         * common/scoped_restore.h (scoped_restore_base): Make "class".
9761         (scoped_restore_base::release): New public method.
9762         (scoped_restore_base::scoped_restore_base): New protected ctor.
9763         (scoped_restore_base::m_saved_var): New protected field.
9764         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
9765         scoped_restore_base base class instead of m_saved_var directly.
9766         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
9767         (scoped_restore_tmpl::scoped_restore_tmpl(const
9768         scoped_restore_tmpl<T>&)): Likewise.
9769         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
9770         method.
9771         (scoped_restore_tmpl::saved_var): New method.
9772         (scoped_restore_tmpl::m_saved_var): Delete.
9773         * inferior.h (inferior::detaching): Now a bool.
9774         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
9775         cleanup.
9776         * unittests/scoped_restore-selftests.c: New file.
9777
9778 2017-04-19  Pedro Alves  <palves@redhat.com>
9779
9780         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
9781         Re-sort in alphabetic order.
9782
9783 2017-04-18  Pedro Alves  <palves@redhat.com>
9784
9785         * xml-support.c (obstack_xml_printf): Delete.
9786         * xml-support.h (obstack_xml_printf): Delete.
9787
9788 2017-04-18  Pedro Alves  <palves@redhat.com>
9789
9790         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
9791         vdebug, verror, body_text, start_element, end_element, name,
9792         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
9793         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
9794         is_xinclude>: Make private and add m_ prefix.
9795         (gdb_xml_parser::body_text): New method, based on ...
9796         (gdb_xml_body_text): ... this.  Adjust.
9797         (gdb_xml_parser::vdebug): New method, based on ...
9798         (gdb_xml_debug): ... this.  Adjust.
9799         (gdb_xml_parser::verror): New method, based on ...
9800         (gdb_xml_error): ... this.  Adjust.
9801         (gdb_xml_parser::start_element): New method, based on ...
9802         (gdb_xml_start_element): ... this.  Adjust.
9803         (gdb_xml_start_element_wrapper): Defer to
9804         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
9805         (gdb_xml_parser::end_element): New method, based on ...
9806         (gdb_xml_end_element_wrapper): ... this.  Adjust.
9807         (gdb_xml_parser::~gdb_xml_parser): Adjust.
9808         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
9809         (gdb_xml_parser::use_dtd): New method, based on ...
9810         (gdb_xml_use_dtd): ... this.  Adjust.
9811         (gdb_xml_parser::parse): New method, based on ...
9812         (gdb_xml_parse): ... this.  Adjust.
9813         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
9814         (xinclude_start_include): Adjust to call the parser's name method.
9815         (xml_xinclude_default, xml_xinclude_start_doctype)
9816         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
9817         method.
9818         (xml_process_xincludes): Adjust to call parser methods.
9819         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
9820         declarations.
9821
9822 2017-04-18  Pedro Alves  <palves@redhat.com>
9823
9824         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
9825         gdb::optional<std::string>.
9826         * xml-support.c: Include <string>.
9827         (scope_level::scope_level(scope_level &&))
9828         (scope_level::~scope_level): Delete.
9829         (scope_level::body): Now a std::string.
9830         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
9831         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
9832         parameter.
9833         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
9834         (xinclude_parsing_data::output): Now a std::string reference.
9835         (xinclude_start_include): Adjust.
9836         (xml_xinclude_default): Adjust.
9837         (xml_process_xincludes): Add 'output' parameter, and return bool.
9838         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
9839         and return bool.
9840         * xml-tdesc.c: Include <unordered_map> and <string>.
9841         (tdesc_xml_cache): Delete.
9842         (tdesc_xml_cache_s): Delete.
9843         (xml_cache): Now an std::unordered_map.
9844         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
9845         (target_fetch_description_xml): Change return type to
9846         gdb::optional<std::string>, and adjust.
9847         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
9848         (target_fetch_description_xml): Change return type to
9849         gdb::optional<std::string>.
9850
9851 2017-04-18  Pedro Alves  <palves@redhat.com>
9852
9853         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9854         unittests/optional-selftests.c.
9855         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
9856         * unittests/optional-selftests.c: New file.
9857         * unittests/optional/assignment/1.cc: New file.
9858         * unittests/optional/assignment/2.cc: New file.
9859         * unittests/optional/assignment/3.cc: New file.
9860         * unittests/optional/assignment/4.cc: New file.
9861         * unittests/optional/assignment/5.cc: New file.
9862         * unittests/optional/assignment/6.cc: New file.
9863         * unittests/optional/assignment/7.cc: New file.
9864         * unittests/optional/cons/copy.cc: New file.
9865         * unittests/optional/cons/default.cc: New file.
9866         * unittests/optional/cons/move.cc: New file.
9867         * unittests/optional/cons/value.cc: New file.
9868         * unittests/optional/in_place.cc: New file.
9869         * unittests/optional/observers/1.cc: New file.
9870         * unittests/optional/observers/2.cc: New file.
9871
9872 2017-04-18  Pedro Alves  <palves@redhat.com>
9873
9874         * common/gdb_optional.h: Include common/traits.h.
9875         (in_place_t): New type.
9876         (in_place): New constexpr variable.
9877         (optional::optional): Remove member initialization of
9878         m_instantiated.
9879         (optional::optional(in_place_t...)): New constructor.
9880         (optional::~optional): Use reset.
9881         (optional::optional(const optional&)): New.
9882         (optional::optional(const optional&&)): New.
9883         (optional::optional(T &)): New.
9884         (optional::optional(T &&)): New.
9885         (operator::operator=(const optional &)): New.
9886         (operator::operator=(optional &&)): New.
9887         (operator::operator= (const T &))
9888         (operator::operator= (T &&))
9889         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
9890         (operator::reset): New.
9891         (operator::m_instantiated):: Add in-class initializer.
9892         * common/traits.h: Include <type_traits>.
9893         (struct And): New types.
9894
9895 2017-04-18  Pedro Alves  <palves@redhat.com>
9896
9897         * xml-support.c: Include <vector>.
9898         (scope_level::scope_level(const gdb_xml_element *))
9899         (scope_level::scope_level(scope_level&&)): New.
9900         (scope_level::~scope_level): New.
9901         (scope_level_s): Delete.
9902         (gdb_xml_parser::scopes): Now a std::vector.
9903         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
9904         Use std::vector.
9905         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
9906         scope cleanup code.
9907         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
9908         of the scopes member.  Use std::vector::emplace_back.
9909
9910 2017-04-18  Pedro Alves  <palves@redhat.com>
9911
9912         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
9913         a bool.
9914         (gdb_xml_end_element): Change type of first parameter.
9915         (gdb_xml_cleanup): Rename to ...
9916         (gdb_xml_parser::~gdb_xml_parser): ... this.
9917         (gdb_xml_create_parser_and_cleanup): Delete with ...
9918         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
9919         to this new ctor.
9920         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
9921         using gdb_xml_create_parser_and_cleanup.
9922         (xinclude_parsing_data): Add ctor/dtor.
9923         (xml_xinclude_cleanup): Delete.
9924         (xml_process_xincludes): Create a local xinclude_parsing_data
9925         instead of heap-allocating one.  Create a local gdb_xml_parser
9926         instead of heap-allocating one with
9927         gdb_xml_create_parser_and_cleanup.
9928
9929 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
9930
9931         PR threads/20743
9932         * fbsd-nat.c (resume_one_thread_cb): Remove.
9933         (resume_all_threads_cb): Remove.
9934         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
9935         iterate_over_threads.
9936
9937 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
9938
9939         * NEWS: Create a new section for the next release branch.
9940         Rename the section of the current branch, now that it has
9941         been cut.
9942
9943 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
9944
9945         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
9946         * version.in: Bump version to 8.0.50.DATE-git.
9947
9948 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
9949
9950         PR gdb/21385
9951         * windows-nat.c (windows_create_inferior): Declare 'allargs'
9952         independently of the host, and fix build breakage on Cygwin.
9953
9954 2017-04-13  Pedro Alves  <palves@redhat.com>
9955
9956         * inferior.c (free_inferior): Convert to ...
9957         (inferior::~inferior): ... this dtor.
9958         (inferior::inferior): New ctor, factored out from ...
9959         (add_inferior_silent): ... here.  Allocate the inferior with a new
9960         expression.
9961         (delete_inferior): Call delete instead of free_inferior.
9962         * inferior.h (gdb_environ, continuation): Forward declare.
9963         (inferior): Now a class.  Add in-class initialization to all
9964         members.  Make boolean fields bool, except 'detaching'.
9965         (inferior::inferior): New explicit ctor.
9966         (inferior::~inferior): New.
9967
9968 2017-04-13  Pedro Alves  <palves@redhat.com>
9969
9970         * inferior.c (init_inferior_list): Delete.
9971         * inferior.h (init_inferior_list): Delete.
9972
9973 2017-04-13  Pedro Alves  <palves@redhat.com>
9974
9975         PR threads/13217
9976         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
9977         (top level): Call it twice, with different thread sets.
9978
9979 2017-04-13  Pedro Alves  <palves@redhat.com>
9980
9981         * thread.c: Include <algorithm>.
9982         (thread_array_cleanup): Delete.
9983         (scoped_inc_dec_ref): New class.
9984         (live_threads_count): New function.
9985         (set_thread_refcount): Delete.
9986         (tp_array_compar_ascending): Now a bool.
9987         (tp_array_compar): Convert to a std::sort comparison function.
9988         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
9989         and live_threads_count.
9990
9991 2017-04-13  Pedro Alves  <palves@redhat.com>
9992
9993         * infrun.c (follow_fork_inferior): Also switch the current
9994         inferior.
9995
9996 2017-04-13  Pedro Alves  <palves@redhat.com>
9997
9998         * breakpoint.c (watch_command_1): Save watchpoint-frame info
9999         before calling create_internal_breakpoint.
10000
10001 2017-04-13  Pedro Alves  <palves@redhat.com>
10002
10003         * fork-child.c (execv_argv): New class.
10004         (breakup_args): Refactored as ...
10005         (execv_argv::init_for_no_shell): .. this method of execv_argv.
10006         Copy arguments to storage and replace separators with NULL
10007         terminators in place.
10008         (escape_bang_in_quoted_argument): Adjust to return bool.
10009         (execv_argv::execv_argv): New ctor.
10010         (execv_argv::init_for_shell): New method, factored out from
10011         fork_inferior.  Don't strdup strings into the vector.
10012         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
10013         Remove free_vector_argv call.
10014
10015 2017-04-13  Yao Qi  <yao.qi@linaro.org>
10016
10017         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
10018         tdep->rx_psw_type.
10019
10020 2017-04-13  Yao Qi  <yao.qi@linaro.org>
10021
10022         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
10023         * rx-tdep.c (rx_gdbarch_init): Likewise.
10024
10025 2017-04-13  Pedro Alves  <palves@redhat.com>
10026
10027         * breakpoint.h (struct breakpoint): Reindent.
10028
10029 2017-04-13  Pedro Alves  <palves@redhat.com>
10030
10031         * breakpoint.c (bp_location): Rename to ...
10032         (bp_locations): ... this.  All references updated.
10033         (bp_location_count): Rename to ...
10034         (bp_locations_count): ... this.  All references updated.
10035         (bp_location_placed_address_before_address_max): Rename to ...
10036         (bp_locations_placed_address_before_address_max): ... this.  All
10037         references updated.
10038         (bp_location_shadow_len_after_address_max): Rename to ...
10039         (bp_locations_shadow_len_after_address_max): ... this.  All
10040         references updated.
10041         (bp_location_compare_addrs): Rename to ...
10042         (bp_locations_compare_addrs): ... this.  All references updated.
10043         (bp_location_compare):Rename to ...
10044         (bp_locations_compare): ... this.  All references updated.
10045         (bp_location_target_extensions_update): Rename to ...
10046         (bp_locations_target_extensions_update): ... this.  All references
10047         updated.
10048
10049 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10050
10051         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
10052         * common/common.m4: Check headers 'termios.h', 'termio.h' and
10053         'sgtty.h'.
10054         * common/gdb_termios.h: New file, with parts of "terminal.h".
10055         * inflow.c: Include "gdb_termios.h".
10056         * ser-unix.c: Include "gdb_termios.h".
10057         * terminal.h: Move terminal-related defines to
10058         "common/gdb_termios.h".
10059
10060 2017-04-12  Tom Tromey  <tom@tromey.com>
10061
10062         * probe.c (parse_probes): Update.
10063         * location.h (delete_event_location): Don't declare.
10064         (event_location_deleter::operator()): Update.
10065         * location.c (event_location_deleter::operator()): Rename from
10066         delete_event_location.
10067         * linespec.h (linespec_result) <location>: Change type to
10068         event_location_up.
10069         * linespec.c (canonicalize_linespec, event_location_to_sals)
10070         (decode_objc): Update.
10071         (linespec_result): Don't call delete_event_location.
10072         * breakpoint.c (create_breakpoints_sal)
10073         (bkpt_probe_create_sals_from_location)
10074         (strace_marker_create_sals_from_location): Update.
10075
10076 2017-04-12  Tom Tromey  <tom@tromey.com>
10077
10078         * linespec.h (struct linespec_result): Add constructor and
10079         destructor.
10080         (init_linespec_result, destroy_linespec_result)
10081         (make_cleanup_destroy_linespec_result): Don't declare.
10082         * linespec.c (init_linespec_result): Remove.
10083         (linespec_result::~linespec_result): Rename from
10084         destroy_linespec_result.  Update.
10085         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
10086         Remove.
10087         * breakpoint.c (create_breakpoint, break_range_command)
10088         (decode_location_default): Update.
10089         * ax-gdb.c (agent_command_1): Update.
10090
10091 2017-04-12  Tom Tromey  <tom@tromey.com>
10092
10093         * remote.c (remote_download_tracepoint): Update.
10094         * python/py-breakpoint.c (bppy_get_location): Update.
10095         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
10096         (gdbscm_breakpoint_location): Update.
10097         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
10098         * breakpoint.h (struct breakpoint) <location, location_range_end>:
10099         Change type to event_location_up.
10100         * breakpoint.c (create_overlay_event_breakpoint)
10101         (create_longjmp_master_breakpoint)
10102         (create_std_terminate_master_breakpoint)
10103         (create_exception_master_breakpoint)
10104         (breakpoint_event_location_empty_p, print_breakpoint_location)
10105         (print_one_breakpoint_location, create_thread_event_breakpoint)
10106         (init_breakpoint_sal, create_breakpoint)
10107         (print_recreate_ranged_breakpoint, break_range_command)
10108         (init_ada_exception_breakpoint, say_where): Update.
10109         (base_breakpoint_dtor): Don't call delete_event_location.
10110         (bkpt_print_recreate, tracepoint_print_recreate)
10111         (dprintf_print_recreate, update_static_tracepoint)
10112         (breakpoint_re_set_default): Update.
10113
10114 2017-04-12  Tom Tromey  <tom@tromey.com>
10115
10116         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
10117         type of "to_do".  Update.
10118         (compute_stack_depth): Use std::vector.
10119
10120 2017-04-12  Tom Tromey  <tom@tromey.com>
10121
10122         * printcmd.c (find_instruction_backward): Use std::vector.
10123
10124 2017-04-12  Tom Tromey  <tom@tromey.com>
10125
10126         * symfile.c (objfilep): Remove typedef.
10127         (reread_symbols): Use a std::vector.
10128
10129 2017-04-12  Tom Tromey  <tom@tromey.com>
10130
10131         * mi/mi-main.c (exec_direction_forward): Remove.
10132         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
10133         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
10134         scoped_restore.
10135         * guile/guile.c (guile_repl_command, guile_command)
10136         (gdbscm_execute_gdb_command): Use scoped_restore.
10137         * go-exp.y (go_parse): Use scoped_restore.
10138         * d-exp.y (d_parse): Use scoped_restore.
10139         * cli/cli-decode.c (cmd_func): Use scoped_restore.
10140         * c-exp.y (c_parse): Use scoped_restore.
10141
10142 2017-04-12  Tom Tromey  <tom@tromey.com>
10143
10144         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
10145         (mi_parse): Update return type.
10146         (mi_parse_free): Remove.
10147         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
10148         (mi_parse::~mi_parse): Rename from mi_parse_free.
10149         (mi_parse_cleanup): Remove.
10150         (mi_parse): Return a unique_ptr.  Use new.
10151         * mi/mi-main.c (mi_execute_command): Update.
10152
10153 2017-04-12  Tom Tromey  <tom@tromey.com>
10154
10155         * location.c (explicit_location_lex_one): Return a
10156         unique_xmalloc_ptr.
10157         (string_to_explicit_location): Update.  Remove cleanups.
10158
10159 2017-04-12  Tom Tromey  <tom@tromey.com>
10160
10161         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
10162         (compare_value_and_voffset): Change type.  Update.
10163         (compute_vtable_size): Change type of "offset_vec".
10164         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
10165         (gnuv3_get_typeid): Remove extraneous declaration.
10166
10167 2017-04-12  Tom Tromey  <tom@tromey.com>
10168
10169         * charset.h (wchar_iterator): Fix comment.
10170
10171 2017-04-12  Tom Tromey  <tom@tromey.com>
10172
10173         * charset.c (iconv_wrapper): New class.
10174         (cleanup_iconv): Remove.
10175         (convert_between_encodings): Use it.
10176
10177 2017-04-12  Tom Tromey  <tom@tromey.com>
10178
10179         * symfile.h (increment_reading_symtab): Update type.
10180         * symfile.c (decrement_reading_symtab): Remove.
10181         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
10182         * psymtab.c (psymtab_to_symtab): Update.
10183         * dwarf2read.c (dw2_instantiate_symtab): Update.
10184
10185 2017-04-12  Tom Tromey  <tom@tromey.com>
10186
10187         * jit.c (struct jit_reader): Declare separately.  Add constructor
10188         and destructor.  Change type of "handle".
10189         (loaded_jit_reader): Define separately.
10190         (jit_reader_load): Update.  New "new".
10191         (jit_reader_unload_command): Use "delete".
10192         * gdb-dlfcn.h (struct dlclose_deleter): New.
10193         (gdb_dlhandle_up): New typedef.
10194         (gdb_dlopen, gdb_dlsym): Update types.
10195         (gdb_dlclose): Remove.
10196         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
10197         (gdb_dlsym): Change type of "handle".
10198         (make_cleanup_dlclose): Remove.
10199         (dlclose_deleter::operator()): Rename from gdb_dlclose.
10200         * compile/compile-c-support.c (load_libcc): Update.
10201
10202 2017-04-12  Tom Tromey  <tom@tromey.com>
10203
10204         * symtab.h (find_pcs_for_symtab_line): Change return type.
10205         * symtab.c (find_pcs_for_symtab_line): Change return type.
10206         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
10207         type of "vec".  Update.
10208         (ltpy_get_pcs_for_line): Update.
10209         * linespec.c (decode_digits_ordinary): Update.
10210
10211 2017-04-12  Tom Tromey  <tom@tromey.com>
10212
10213         * tracepoint.c (actions_command): Update.
10214         * python/python.c (python_command, python_interactive_command):
10215         Update.
10216         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10217         * guile/guile.c (guile_command): Update.
10218         * defs.h (read_command_lines, read_command_lines_1): Return
10219         command_line_up.
10220         (command_lines_deleter): New struct.
10221         (command_line_up): New typedef.
10222         * compile/compile.c (compile_code_command)
10223         (compile_print_command): Update.
10224         * cli/cli-script.h (get_command_line, copy_command_lines): Return
10225         command_line_up.
10226         (make_cleanup_free_command_lines): Remove.
10227         * cli/cli-script.c (get_command_line, read_command_lines_1)
10228         (copy_command_lines): Return command_line_up.
10229         (while_command, if_command, read_command_lines, define_command)
10230         (document_command): Update.
10231         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
10232         Remove.
10233         * breakpoint.h (breakpoint_set_commands): Change type of
10234         "commands".
10235         * breakpoint.c (breakpoint_set_commands): Change type of
10236         "commands".  Update.
10237         (do_map_commands_command, update_dprintf_command_list)
10238         (create_tracepoint_from_upload): Update.
10239
10240 2017-04-12  Tom Tromey  <tom@tromey.com>
10241
10242         * tracepoint.c (scope_info): Update.
10243         * spu-tdep.c (spu_catch_start): Update.
10244         * python/python.c (gdbpy_decode_line): Update.
10245         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
10246         * python/py-breakpoint.c (bppy_init): Update.
10247         * probe.c (parse_probes): Update.
10248         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
10249         * location.h (event_location_deleter): New struct.
10250         (event_location_up): New typedef.
10251         (new_linespec_location, new_address_location, new_probe_location)
10252         (new_explicit_location, copy_event_location)
10253         (string_to_event_location, string_to_event_location_basic)
10254         (string_to_explicit_location): Update return type.
10255         (make_cleanup_delete_event_location): Remove.
10256         * location.c (new_linespec_location, new_address_location)
10257         (new_probe_location, new_explicit_location, copy_event_location):
10258         Return event_location_up.
10259         (delete_event_location_cleanup)
10260         (make_cleanup_delete_event_location): Remove.
10261         (string_to_explicit_location, string_to_event_location_basic)
10262         (string_to_event_location): Return event_location_up.
10263         * linespec.c (canonicalize_linespec, event_location_to_sals)
10264         (decode_line_with_current_source)
10265         (decode_line_with_last_displayed, decode_objc): Update.
10266         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
10267         * completer.c (location_completer): Update.
10268         * cli/cli-cmds.c (edit_command, list_command): Update.
10269         * breakpoint.c (create_overlay_event_breakpoint)
10270         (create_longjmp_master_breakpoint)
10271         (create_std_terminate_master_breakpoint)
10272         (create_exception_master_breakpoint)
10273         (create_thread_event_breakpoint): Update.
10274         (init_breakpoint_sal): Update.  Remove some dead code.
10275         (create_breakpoint_sal): Change type of "location".  Update.
10276         (create_breakpoints_sal, create_breakpoint, break_command_1)
10277         (dprintf_command, break_range_command, until_break_command)
10278         (init_ada_exception_breakpoint)
10279         (strace_marker_create_sals_from_location)
10280         (update_static_tracepoint, trace_command, ftrace_command)
10281         (strace_command, create_tracepoint_from_upload): Update.
10282         * break-catch-throw.c (re_set_exception_catchpoint): Update.
10283         * ax-gdb.c (agent_command_1): Update.
10284
10285 2017-04-12  Pedro Alves  <palves@redhat.com>
10286
10287         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
10288         * configure.tgt: Handle i[34567]86-*-go32* and
10289         i[34567]86-*-msdosdjgpp*.
10290         * i386-tdep.c (i386_svr4_reg_to_regnum):
10291         Make extern.
10292         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
10293         i386-go32-tdep.c.
10294         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
10295         * i386-go32-tdep.c: New file.
10296         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
10297         declarations.
10298
10299 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
10300
10301         * aix-thread.c (pd_status2str): Change return type to const char *.
10302
10303 2017-04-12  Pedro Alves  <palves@redhat.com>
10304
10305         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
10306         calls to set_gdbarch_gnu_triplet_regexp.
10307
10308 2017-04-12  Pedro Alves  <palves@redhat.com>
10309
10310         PR gdb/21323
10311         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
10312         New enum value.
10313         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
10314         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
10315         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
10316         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
10317         * gdbarch.h, gdbarch.c: Regenerate.
10318         * aarch64-tdep.c (aarch64_gdbarch_init): Override
10319         gdbarch_wchar_bit and gdbarch_wchar_signed.
10320         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
10321         * arm-tdep.c (arm_gdbarch_init): Likewise.
10322         * avr-tdep.c (avr_gdbarch_init): Likewise.
10323         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
10324         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
10325         * i386-tdep.c (i386_go32_init_abi): Likewise.
10326         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10327         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10328         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10329         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10330         * sh-tdep.c (sh_gdbarch_init): Likewise.
10331         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10332         * sparc64-tdep.c (sparc64_init_abi): Likewise.
10333         * windows-tdep.c (windows_init_abi): Likewise.
10334         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10335
10336 2017-04-12  Pedro Alves  <palves@redhat.com>
10337
10338         PR c++/21323
10339         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
10340         cplus_primitive_type_char32_t>: New enum values.
10341         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
10342         and cplus_primitive_type_char32_t.
10343         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
10344         32, use the archtecture's built-in type for char16_t and char32_t,
10345         respectively.  Otherwise, fallback to init_integer_type as before,
10346         but make the type unsigned, and issue a complaint.
10347         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
10348
10349 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
10350
10351         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
10352         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
10353
10354 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10355
10356         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
10357         'const char *'.
10358
10359 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10360
10361         * common/common-utils.c (free_vector_argv): New function.
10362         * common/common-utils.h: Include <vector>.
10363         (free_vector_argv): New prototype.
10364         * darwin-nat.c (darwin_create_inferior): Rewrite function
10365         prototype in order to constify "exec_file" and accept a
10366         "std::string" for "allargs".
10367         * fork-child.c: Include <vector>.
10368         (breakup_args): Rewrite function, using C++.
10369         (fork_inferior): Rewrite function header, constify "exec_file_arg"
10370         and accept "std::string" for "allargs".  Update the code to
10371         calculate "argv" based on "allargs".  Update calls to "exec_fun"
10372         and "execvp".
10373         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
10374         order to constify "exec_file" and accept a "std::string" for
10375         "allargs".
10376         * go32-nat.c (go32_create_inferior): Likewise.
10377         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
10378         * infcmd.c (run_command_1): Constify "exec_file".  Use
10379         "std::string" for inferior arguments.
10380         * inferior.h (fork_inferior): Update prototype.
10381         * linux-nat.c (linux_nat_create_inferior): Rewrite function
10382         prototype in order to constify "exec_file" and accept a
10383         "std::string" for "allargs".
10384         * nto-procfs.c (procfs_create_inferior): Likewise.
10385         * procfs.c (procfs_create_inferior): Likewise.
10386         * remote-sim.c (gdbsim_create_inferior): Likewise.
10387         * remote.c (extended_remote_run): Update code to accept
10388         "std::string" as argument.
10389         (extended_remote_create_inferior): Rewrite function prototype in
10390         order to constify "exec_file" and accept a "std::string" for
10391         "allargs".
10392         * rs6000-nat.c (super_create_inferior): Likewise.
10393         (rs6000_create_inferior): Likewise.
10394         * target.h (struct target_ops) <to_create_inferior>: Likewise.
10395         * windows-nat.c (windows_create_inferior): Likewise.
10396
10397 2017-04-11  Pedro Alves  <palves@redhat.com>
10398
10399         * thread.c: Fix whitespace throughout.
10400
10401 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10402
10403         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
10404
10405 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
10406
10407         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
10408
10409 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
10410
10411         PR gdb/21364
10412         * osdata.c (info_osdata): Check if 'type' is an empty string
10413         instead of NULL.
10414
10415 2017-04-10  Pedro Alves  <palves@redhat.com>
10416
10417         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
10418         (ptid_to_global_thread_id, in_thread_list)
10419         (do_captured_list_thread_ids, set_resumed, set_running)
10420         (set_executing, set_stop_requested, finish_thread_state)
10421         (validate_registers_access, can_access_registers_ptid)
10422         (print_thread_info_1, switch_to_thread)
10423         (do_restore_current_thread_cleanup)
10424         (make_cleanup_restore_current_thread, thread_command)
10425         (thread_name_command): Use operator== instead of ptid_equal.
10426
10427 2017-04-10  Pedro Alves  <palves@redhat.com>
10428
10429         * thread.c (struct current_thread_cleanup) <next>: Delete field.
10430         (current_thread_cleanup_chain): Delete.
10431         (restore_current_thread_cleanup_dtor)
10432         (make_cleanup_restore_current_thread): Remove references to
10433         current_thread_cleanup_chain.
10434
10435 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
10436
10437         * msp430-tdep.c (msp430_pseudo_register_read): Never return
10438         REG_UNKNOWN.
10439
10440 2017-04-10  Yao Qi  <yao.qi@linaro.org>
10441
10442         PR gdb/19942
10443         * gdbthread.h (thread_info::deletable): New method.
10444         (thread_info::incref): New method.
10445         (thread_info::decref): New method.
10446         (thread_info::refcount): Move it to private.
10447         * infrun.c (save_stop_context): Call inc_refcount.
10448         (release_stop_context_cleanup): Likewise.
10449         * thread.c (set_thread_exited): New function.
10450         (init_thread_list): Delete "tp" only it is deletable, otherwise
10451         call set_thread_exited.
10452         (delete_thread_1): Call set_thread_exited.
10453         (current_thread_cleanup) <inferior_pid>: Remove.
10454         <thread>: New field.
10455         (restore_current_thread_ptid_changed): Removed.
10456         (do_restore_current_thread_cleanup): Adjust.
10457         (restore_current_thread_cleanup_dtor): Don't call
10458         find_thread_ptid.
10459         (set_thread_refcount): Use dec_refcount.
10460         (make_cleanup_restore_current_thread): Adjust.
10461         (thread_apply_all_command): Call inc_refcount.
10462         (_initialize_thread): Don't call
10463         observer_attach_thread_ptid_changed.
10464
10465 2017-04-10  Yao Qi  <yao.qi@linaro.org>
10466
10467         * thread.c (delete_thread_1): Hoist code on marking thread as
10468         exited.
10469
10470 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10471
10472         * windows-nat.c (windows_detach): Initialize ptid with
10473         minus_one_ptid.
10474
10475 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10476
10477         * unittests/ptid-selftests.c: Fix erroneous assert messages.
10478
10479 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
10480
10481         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
10482         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
10483         (bfin_pseudo_register_write): Likewise
10484
10485 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
10486
10487         * common/ptid.h (struct ptid): Change to...
10488         (class ptid_t): ... this.
10489         <ptid_t>: New constructors.
10490         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
10491         matches>: New methods.
10492         <make_null, make_minus_one>: New static methods.
10493         <pid>: Rename to...
10494         <m_pid>: ...this.
10495         <lwp>: Rename to...
10496         <m_lwp>: ...this.
10497         <tid>: Rename to...
10498         <m_tid>: ...this.
10499         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
10500         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
10501         as references, move comment to class ptid_t.
10502         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
10503         ptid_t static methods.
10504         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
10505         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
10506         Take ptid arguments as references, implement using ptid_t methods.
10507         * unittests/ptid-selftests.c: New file.
10508         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10509         unittests/ptid-selftests.c.
10510         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
10511
10512 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
10513
10514         * python/python.c (python_run_simple_file): Cast mode literal to
10515         non-const char pointer as expected by PyFile_FromString.
10516
10517 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
10518
10519         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
10520         minus_one_ptid and null_ptid.
10521
10522 2017-04-05  Pedro Alves  <palves@redhat.com>
10523
10524         * warning.m4 (build_warnings): Remove -Wno-write-strings.
10525         * configure: Regenerate.
10526
10527 2017-04-05  Pedro Alves  <palves@redhat.com>
10528
10529         * ada-exp.y (yyerror): Constify.
10530         * ada-lang.c (bound_name, get_selections)
10531         (ada_variant_discrim_type)
10532         (ada_variant_discrim_name, ada_value_struct_elt)
10533         (ada_lookup_struct_elt_type, is_unchecked_variant)
10534         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
10535         (catch_ada_exception_command_split)
10536         (catch_ada_assert_command_split, catch_assert_command)
10537         (ada_op_name): Constify.
10538         * ada-lang.h (ada_yyerror, get_selections)
10539         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
10540         * arc-tdep.c (arc_print_frame_cache): Constify.
10541         * arm-tdep.c (arm_skip_stub): Constify.
10542         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
10543         (gen_aggregate_elt_ref): Constify.
10544         * bcache.c (print_bcache_statistics): Constify.
10545         * bcache.h (print_bcache_statistics): Constify.
10546         * break-catch-throw.c (catch_exception_command_1):
10547         * breakpoint.c (struct ep_type_description::description):
10548         Constify.
10549         (add_solib_catchpoint): Constify.
10550         (catch_fork_command_1): Add cast.
10551         (add_catch_command): Constify.
10552         * breakpoint.h (add_catch_command, add_solib_catchpoint):
10553         Constify.
10554         * bsd-uthread.c (bsd_uthread_state): Constify.
10555         * buildsym.c (patch_subfile_names): Constify.
10556         * buildsym.h (next_symbol_text_func, patch_subfile_names):
10557         Constify.
10558         * c-exp.y (yyerror): Constify.
10559         (token::oper): Constify.
10560         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
10561         * c-varobj.c (cplus_describe_child): Constify.
10562         * charset.c (find_charset_names): Add cast.
10563         (find_charset_names): Constify array and add const_cast.
10564         * cli/cli-cmds.c (complete_command, cd_command): Constify.
10565         (edit_command): Constify.
10566         * cli/cli-decode.c (lookup_cmd): Constify.
10567         * cli/cli-dump.c (dump_memory_command, dump_value_command):
10568         Constify.
10569         (struct dump_context): Constify.
10570         (add_dump_command, restore_command): Constify.
10571         * cli/cli-script.c (get_command_line): Constify.
10572         * cli/cli-script.h (get_command_line): Constify.
10573         * cli/cli-utils.c (check_for_argument): Constify.
10574         * cli/cli-utils.h (check_for_argument): Constify.
10575         * coff-pe-read.c (struct read_pe_section_data): Constify.
10576         * command.h (lookup_cmd): Constify.
10577         * common/print-utils.c (decimal2str): Constify.
10578         * completer.c (gdb_print_filename): Constify.
10579         * corefile.c (set_gnutarget): Constify.
10580         * cp-name-parser.y (yyerror): Constify.
10581         * cp-valprint.c (cp_print_class_member): Constify.
10582         * cris-tdep.c (cris_register_name, crisv32_register_name):
10583         Constify.
10584         * d-exp.y (yyerror): Constify.
10585         (struct token::oper): Constify.
10586         * d-lang.h (d_yyerror): Constify.
10587         * dbxread.c (struct header_file_location::name): Constify.
10588         (add_old_header_file, add_new_header_file, last_function_name)
10589         (dbx_next_symbol_text, add_bincl_to_list)
10590         (find_corresponding_bincl_psymtab, set_namestring)
10591         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
10592         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
10593         * defs.h (command_line_input, print_address_symbolic)
10594         (deprecated_readline_begin_hook): Constify.
10595         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
10596         Constify.
10597         * event-top.c (handle_line_of_input): Constify and add cast.
10598         * exceptions.c (catch_errors): Constify.
10599         * exceptions.h (catch_errors): Constify.
10600         * expprint.c (print_subexp_standard, op_string, op_name)
10601         (op_name_standard, dump_raw_expression, dump_raw_expression):
10602         * expression.h (op_name, op_string, dump_raw_expression):
10603         Constify.
10604         * f-exp.y (yyerror): Constify.
10605         (struct token::oper): Constify.
10606         (struct f77_boolean_val::name): Constify.
10607         * f-lang.c (f_word_break_characters): Constify.
10608         * f-lang.h (f_yyerror): Constify.
10609         * fork-child.c (fork_inferior): Add cast.
10610         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
10611         (new_variant): Constify.
10612         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
10613         * gdbarch.c: Regenerate.
10614         * gdbcore.h (set_gnutarget): Constify.
10615         * go-exp.y (yyerror): Constify.
10616         (token::oper): Constify.
10617         * go-lang.h (go_yyerror): Constify.
10618         * go32-nat.c (go32_sysinfo): Constify.
10619         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
10620         * guile/scm-cmd.c (cmdscm_function): Constify.
10621         * guile/scm-param.c (pascm_param_value): Constify.
10622         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
10623         (h8300sx_register_name): Constify.
10624         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
10625         Constify.
10626         * ia64-tdep.c (ia64_register_names): Constify.
10627         * infcmd.c (construct_inferior_arguments): Constify.
10628         (path_command, attach_post_wait): Constify.
10629         * language.c (show_range_command, show_case_command)
10630         (unk_lang_error): Constify.
10631         * language.h (language_defn::la_error)
10632         (language_defn::la_name_of_this): Constify.
10633         * linespec.c (decode_line_2): Constify.
10634         * linux-thread-db.c (thread_db_err_str): Constify.
10635         * lm32-tdep.c (lm32_register_name): Constify.
10636         * m2-exp.y (yyerror): Constify.
10637         * m2-lang.h (m2_yyerror): Constify.
10638         * m32r-tdep.c (m32r_register_names): Constify and make static.
10639         * m68hc11-tdep.c (m68hc11_register_names): Constify.
10640         * m88k-tdep.c (m88k_register_name): Constify.
10641         * macroexp.c (appendmem): Constify.
10642         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
10643         (upgrade_type, parse_external, parse_partial_symbols)
10644         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
10645         (new_symbol): Constify.
10646         * memattr.c (mem_info_command): Constify.
10647         * mep-tdep.c (register_name_from_keyword): Constify.
10648         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
10649         Constify.
10650         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
10651         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
10652         * mi/mi-main.c (captured_mi_execute_command): Constify and add
10653         cast.
10654         (mi_execute_async_cli_command): Constify.
10655         * mips-tdep.c (mips_register_name): Constify.
10656         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
10657         (am33_register_name, am33_2_register_name)
10658         * moxie-tdep.c (moxie_register_names): Constify.
10659         * nat/linux-osdata.c (osdata_type): Constify fields.
10660         * nto-tdep.c (nto_parse_redirection): Constify.
10661         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
10662         (lookup_child_selector): Constify.
10663         (objc_methcall::name): Constify.
10664         * objc-lang.h (lookup_objc_class, lookup_child_selector)
10665         (lookup_struct_typedef): Constify.
10666         * objfiles.c (pc_in_section): Constify.
10667         * objfiles.h (pc_in_section): Constify.
10668         * p-exp.y (struct token::oper): Constify.
10669         (yyerror): Constify.
10670         * p-lang.h (pascal_yyerror): Constify.
10671         * parser-defs.h (op_name_standard): Constify.
10672         (op_print::string): Constify.
10673         (exp_descriptor::op_name): Constify.
10674         * printcmd.c (print_address_symbolic): Constify.
10675         * psymtab.c (print_partial_symbols): Constify.
10676         * python/py-breakpoint.c (stop_func): Constify.
10677         (bppy_get_expression): Constify.
10678         * python/py-cmd.c (cmdpy_completer::name): Constify.
10679         (cmdpy_function): Constify.
10680         * python/py-event.c (evpy_add_attribute)
10681         (gdbpy_initialize_event_generic): Constify.
10682         * python/py-event.h (evpy_add_attribute)
10683         (gdbpy_initialize_event_generic): Constify.
10684         * python/py-evts.c (add_new_registry): Constify.
10685         * python/py-finishbreakpoint.c (outofscope_func): Constify.
10686         * python/py-framefilter.c (get_py_iter_from_func): Constify.
10687         * python/py-inferior.c (get_buffer): Add cast.
10688         * python/py-param.c (parm_constant::name): Constify.
10689         * python/py-unwind.c (fprint_frame_id): Constify.
10690         * python/python.c (gdbpy_parameter_value): Constify.
10691         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
10692         * remote.c (memory_packet_config::name): Constify.
10693         (show_packet_config_cmd, remote_write_bytes)
10694         (remote_buffer_add_string):
10695         * reverse.c (exec_reverse_once): Constify.
10696         * rs6000-tdep.c (variant::name, variant::description): Constify.
10697         * rust-exp.y (rustyyerror): Constify.
10698         * rust-lang.c (rust_op_name): Constify.
10699         * rust-lang.h (rustyyerror): Constify.
10700         * serial.h (serial_ops::name): Constify.
10701         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
10702         (sh_sh3e_register_name, sh_sh2e_register_name)
10703         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
10704         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
10705         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
10706         (sh_sh4al_dsp_register_name): Constify.
10707         * sh64-tdep.c (sh64_register_name): Constify.
10708         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
10709         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
10710         * stabsread.c (patch_block_stabs, read_type_number)
10711         (ref_map::stabs, ref_add, process_reference)
10712         (symbol_reference_defined, define_symbol, define_symbol)
10713         (error_type, read_type, read_member_functions, read_cpp_abbrev)
10714         (read_one_struct_field, read_struct_fields, read_baseclasses)
10715         (read_tilde_fields, read_struct_type, read_array_type)
10716         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
10717         (read_huge_number, read_range_type, read_args, common_block_start)
10718         (find_name_end): Constify.
10719         * stabsread.h (common_block_start, define_symbol)
10720         (process_one_symbol, symbol_reference_defined, ref_add):
10721         * symfile.c (get_section_index, add_symbol_file_command):
10722         * symfile.h (get_section_index): Constify.
10723         * target-descriptions.c (tdesc_type::name): Constify.
10724         (tdesc_free_type): Add cast.
10725         * target.c (find_default_run_target):
10726         (add_deprecated_target_alias, find_default_run_target)
10727         (target_announce_detach): Constify.
10728         (do_option): Constify.
10729         * target.h (add_deprecated_target_alias): Constify.
10730         * thread.c (print_thread_info_1): Constify.
10731         * top.c (deprecated_readline_begin_hook, command_line_input):
10732         Constify.
10733         (init_main): Add casts.
10734         * top.h (handle_line_of_input): Constify.
10735         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
10736         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
10737         (tfind_command): Rename to ...
10738         (tfind_command_1): ... this and constify.
10739         (tfind_command): New function.
10740         (tfind_end_command, tfind_start_command): Adjust.
10741         (encode_source_string): Constify.
10742         * tracepoint.h (encode_source_string): Constify.
10743         * tui/tui-data.c (tui_partial_win_by_name): Constify.
10744         * tui/tui-data.h (tui_partial_win_by_name): Constify.
10745         * tui/tui-source.c (tui_set_source_content_nil): Constify.
10746         * tui/tui-source.h (tui_set_source_content_nil): Constify.
10747         * tui/tui-win.c (parse_scrolling_args): Constify.
10748         * tui/tui-windata.c (tui_erase_data_content): Constify.
10749         * tui/tui-windata.h (tui_erase_data_content): Constify.
10750         * tui/tui-winsource.c (tui_erase_source_content): Constify.
10751         * tui/tui.c (tui_enable): Add cast.
10752         * utils.c (defaulted_query): Constify.
10753         (init_page_info): Add cast.
10754         (puts_debug, subset_compare): Constify.
10755         * utils.h (subset_compare): Constify.
10756         * varobj.c (varobj_format_string): Constify.
10757         * varobj.h (varobj_format_string): Constify.
10758         * vax-tdep.c (vax_register_name): Constify.
10759         * windows-nat.c (windows_detach): Constify.
10760         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
10761         * xml-support.c (gdb_xml_end_element): Constify.
10762         * xml-tdesc.c (tdesc_start_reg): Constify.
10763         * xstormy16-tdep.c (xstormy16_register_name): Constify.
10764         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
10765         * xtensa-tdep.h (xtensa_register_t::name): Constify.
10766
10767 2017-04-05  Pedro Alves  <palves@redhat.com>
10768
10769         * proc-api.c (struct trans): Constify.
10770         (procfs_note): Constify.
10771         * proc-events.c (struct trans, syscall_table):
10772         * proc-flags.c (struct trans): Constify.
10773         * proc-utils.h (procfs_note): Constify.
10774         * proc-why.c (struct trans): Constify.
10775         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
10776         (procfs_detach): Constify.
10777         * sol-thread.c (struct string_map): Constify.
10778         (td_err_string, td_state_string): Constify.
10779
10780 2017-04-05  Pedro Alves  <palves@redhat.com>
10781
10782         * proc-api.c (procfs_filename): Don't initialize
10783         procfs_filename.
10784         (prepare_to_trace): Assume procfs_filename is non-NULL.
10785         (_initialize_proc_api): Give procfs_filename a default value here.
10786
10787 2017-04-05  Pedro Alves  <palves@redhat.com>
10788
10789         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
10790         'cond_string' parameter.
10791         (extract_exception_regexp): Constify 'string' parameter.
10792         (catch_exception_command_1): Constify.
10793         * breakpoint.c (init_catchpoint)
10794         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
10795         parameter.
10796         (ep_parse_optional_if_clause, catch_fork_command_1)
10797         (catch_exec_command_1): Constify.
10798         * breakpoint.h (init_catchpoint): Constify 'cond_string'
10799         parameter.
10800         (ep_parse_optional_if_clause): Constify.
10801         * cli/cli-utils.c (remove_trailing_whitespace)
10802         (check_for_argument): Constify.
10803         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
10804         non-const overload.
10805         (check_for_argument): Likewise.
10806
10807 2017-04-05  Pedro Alves  <palves@redhat.com>
10808
10809         * event-top.c (command_line_handler): Add cast to execute_command
10810         call.
10811         * record-btrace.c (cmd_record_btrace_bts_start)
10812         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
10813         (cmd_record_btrace_start): Add cast to execute_command call.
10814         * record-full.c (record_full_goto_insn):
10815         * record.c (record_start, record_stop): Add cast to
10816         execute_command_to_string calls.
10817         (cmd_record_start): Add cast to execute_command calls.
10818
10819 2017-04-05  Pedro Alves  <palves@redhat.com>
10820
10821         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
10822         static inline function.
10823         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
10824         array and use gdb_PyArg_ParseTupleAndKeywords.
10825         * python/py-cmd.c (cmdpy_init): Likewise.
10826         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
10827         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
10828         (infpy_search_memory): Likewise.
10829         * python/py-objfile.c (objfpy_add_separate_debug_file)
10830         (gdbpy_lookup_objfile): Likewise.
10831         * python/py-symbol.c (gdbpy_lookup_symbol)
10832         (gdbpy_lookup_global_symbol): Likewise.
10833         * python/py-type.c (gdbpy_lookup_type): Likewise.
10834         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
10835         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
10836         Likewise.
10837
10838 2017-04-05  Pedro Alves  <palves@redhat.com>
10839
10840         * python/python-internal.h (gdb_PyGetSetDef): New type.
10841         * python/py-block.c (block_object_getset)
10842         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
10843         * python/py-event.c (event_object_getset)
10844         (finish_breakpoint_object_getset): Likewise.
10845         * python/py-inferior.c (inferior_object_getset): Likewise.
10846         * python/py-infthread.c (thread_object_getset): Likewise.
10847         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
10848         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
10849         * python/py-objfile.c (objfile_getset): Likewise.
10850         * python/py-progspace.c (pspace_getset): Likewise.
10851         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
10852         Likewise.
10853         * python/py-record.c (recpy_record_getset): Likewise.
10854         * python/py-symbol.c (symbol_object_getset): Likewise.
10855         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
10856         Likewise.
10857         * python/py-type.c (type_object_getset, field_object_getset):
10858         Likewise.
10859         * python/py-value.c (value_object_getset): Likewise.
10860
10861 2017-04-05  Pedro Alves  <palves@redhat.com>
10862
10863         * python/python-internal.h (gdb_PyObject_CallMethod)
10864         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
10865         New functions.
10866         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
10867         (PySys_GetObject, PySys_SetPath): New macros.
10868
10869 2017-04-05  Pedro Alves  <palves@redhat.com>
10870
10871         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
10872         info_osdata_command.
10873         * osdata.c (info_osdata_command): Rename to ...
10874         (info_osdata): ... this.  Constify 'type' parameter, and remove
10875         the 'from_tty' parameter.  Accept NULL TYPE.
10876         (info_osdata_command): New function.
10877         * osdata.h (info_osdata_command): Remove declaration.
10878         (info_osdata): New declaration.
10879
10880 2017-04-05  Pedro Alves  <palves@redhat.com>
10881
10882         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
10883         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
10884         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
10885         parameter.
10886         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
10887         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
10888         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
10889         parameter.
10890         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
10891         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
10892         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
10893         (mi_cmd_file_list_exec_source_files)
10894         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
10895         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
10896         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
10897         parameter.
10898         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
10899         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
10900         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
10901         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
10902         (mi_cmd_stack_info_frame): Constify 'command' parameter.
10903         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
10904         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
10905         'command' parameter.
10906         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
10907         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
10908         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
10909         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
10910         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
10911         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
10912         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
10913         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
10914         (mi_cmd_var_set_update_range): Constify 'command' parameter.
10915         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
10916         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
10917         parameter.
10918         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
10919         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
10920         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
10921         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
10922         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
10923         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
10924         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
10925         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
10926         (mi_cmd_data_list_changed_registers)
10927         (mi_cmd_data_write_register_values)
10928         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
10929         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
10930         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
10931         (mi_cmd_list_features, mi_cmd_list_target_features)
10932         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
10933         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
10934         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
10935         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
10936         (mi_cmd_trace_frame_collected): Constify 'command'
10937         parameter.
10938         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
10939         'command' parameter.
10940
10941 2017-04-05  Pedro Alves  <palves@redhat.com>
10942
10943         * ada-lang.c (ada_completer_word_break_characters): Now a const
10944         array.
10945         (ada_get_gdb_completer_word_break_characters): Constify.
10946         * completer.c (gdb_completer_command_word_break_characters)
10947         (gdb_completer_file_name_break_characters)
10948         (gdb_completer_quote_characters): Now const arrays.
10949         (get_gdb_completer_quote_characters): Constify.
10950         (set_rl_completer_word_break_characters): New function.
10951         (set_gdb_completion_word_break_characters)
10952         (complete_line_internal): Use it.
10953         * completer.h (get_gdb_completer_quote_characters): Constify.
10954         (set_rl_completer_word_break_characters): Declare.
10955         * f-lang.c (f_word_break_characters): Constify.
10956         * language.c (default_word_break_characters): Constify.
10957         * language.h (language_defn::la_word_break_characters): Constify.
10958         (default_word_break_characters): Constify.
10959         * top.c (init_main): Use set_rl_completer_word_break_characters.
10960
10961 2017-04-05  Pedro Alves  <palves@redhat.com>
10962
10963         * aix-thread.c (aix_thread_pid_to_str)
10964         (aix_thread_extra_thread_info): Constify.
10965         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
10966         * bsd-uthread.c (bsd_uthread_extra_thread_info)
10967         (bsd_uthread_pid_to_str): Constify.
10968         * corelow.c (core_pid_to_str): Constify.
10969         * darwin-nat.c (darwin_pid_to_str): Constify.
10970         * fbsd-nat.c (fbsd_pid_to_str): Constify.
10971         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
10972         Constify.
10973         * gnu-nat.c (gnu_pid_to_str): Constify.
10974         * go32-nat.c (go32_pid_to_str): Constify.
10975         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
10976         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
10977         * inferior.c (inferior_pid_to_str): Constify.
10978         * linux-nat.c (linux_nat_pid_to_str): Constify.
10979         * linux-tdep.c (linux_core_pid_to_str): Constify.
10980         * linux-thread-db.c (thread_db_pid_to_str)
10981         (thread_db_extra_thread_info): Constify.
10982         * nto-tdep.c (nto_extra_thread_info): Constify.
10983         * nto-tdep.h (nto_extra_thread_info): Constify.
10984         * obsd-nat.c (obsd_pid_to_str): Constify.
10985         * procfs.c (procfs_pid_to_str): Constify.
10986         * ravenscar-thread.c (ravenscar_extra_thread_info)
10987         (ravenscar_pid_to_str): Constify.
10988         * remote-sim.c (gdbsim_pid_to_str): Constify.
10989         * remote.c (remote_threads_extra_info, remote_pid_to_str):
10990         Constify.
10991         * sol-thread.c (solaris_pid_to_str): Constify.
10992         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
10993         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
10994         * target.c (default_pid_to_str, target_pid_to_str)
10995         (normal_pid_to_str, default_pid_to_str): Constify.
10996         * target.h (target_ops::to_pid_to_str)
10997         (target_ops::to_extra_thread_info): Constify.
10998         (target_pid_to_str, normal_pid_to_str): Constify.
10999         * windows-nat.c (windows_pid_to_str): Constify.
11000         * gdbarch.sh (core_pid_to_str): Constify.
11001         * target-delegates.c: Regenerate.
11002         * gdbarch.h, gdbarch.c: Regenerate.
11003
11004 2017-04-05  Pedro Alves  <palves@redhat.com>
11005
11006         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
11007         the memory of the temporary warning_pre_print override.
11008         * utils.c (warning_pre_print): Constify.
11009         * utils.h (warning_pre_print): Constify.
11010
11011 2017-04-05  Pedro Alves  <palves@redhat.com>
11012
11013         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
11014         (shell_command): New function.
11015         (make_command): Use std::string.
11016         (init_cli_cmds): Register shell_command instead of shell_escape.
11017
11018 2017-04-05  Pedro Alves  <palves@redhat.com>
11019
11020         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
11021         * tracepoint.c (default_collect): Don't initialize.
11022
11023 2017-04-05  Pedro Alves  <palves@redhat.com>
11024
11025         * macroexp.c (macro_buffer::shared): Now a bool.
11026         (init_buffer): Update.
11027         (init_shared_buffer): Constify 'addr' parameter.
11028         (substitute_args, expand, macro_expand, macro_expand_next): Remove
11029         casts.
11030
11031 2017-04-05  Pedro Alves  <palves@redhat.com>
11032
11033         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
11034         * disasm.c (set_disassembler_options): Constify local.
11035         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
11036
11037 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
11038
11039         PR gdb/21352
11040         * tracefile.c (tsave_command): Fix argument parsing for '-r'
11041         option.
11042
11043 2017-04-05  Yao Qi  <yao.qi@linaro.org>
11044
11045         * frame.c (frame_unwind_register_unsigned): Call
11046         frame_unwind_register_value.
11047
11048 2017-04-05  Yao Qi  <yao.qi@linaro.org>
11049
11050         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
11051         Use gdb_test_multiple, and don't match anchor.
11052
11053 2017-04-05  Pedro Alves  <palves@redhat.com>
11054
11055         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
11056         (Write After Approval): Remove Simon Marchi.
11057
11058 2017-04-05  Pedro Alves  <palves@redhat.com>
11059
11060         * common/gdb_optional.h (optional::optional): Make constexpr and
11061         initialize m_dummy.
11062
11063 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11064
11065         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11066         (amd64fbsd_jmp_buf_reg_offset): Remove.
11067         (amd64fbsd_supply_uthread): Remove function.
11068         (amd64fbsd_collect_uthread): Remove function.
11069         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
11070         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
11071         (x86_64-*-freebsd*): Remove bsd-uthread.o.
11072         (fbsd-nat.c): Update comment.
11073         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11074         (i386fbsd_jmp_buf_reg_offset): Remove.
11075         (i386fbsd_supply_uthread): Remove function.
11076         (i386fbsd_collect_uthread): Remove function.
11077         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
11078
11079 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11080
11081         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
11082         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
11083         * NEWS: Mention that support for FreeBSD/alpha was removed.
11084         * alpha-fbsd-tdep.c: Delete file.
11085         * config/alpha/fbsd.mh: Delete file.
11086         * configure.host: Delete alpha*-*-freebsd* and
11087         alpha*-*-kfreebsd*-gnu.
11088         * configure.tgt: Delete alpha*-*-freebsd* and
11089         alpha*-*-kfreebsd*-gnu.
11090
11091 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11092
11093         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
11094         amd64bsd_store_inferior_registers): Use ptid from regcache.
11095
11096 2017-04-04  Pedro Alves  <palves@redhat.com>
11097
11098         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
11099         data fields, make them private and add "m_" prefixes.
11100         (lnp_state_machine::lnp_state_machine): New ctor.
11101         (record_line, check_line_address, handle_set_discriminator)
11102         (handle_set_address, handle_advance_pc, handle_special_opcode)
11103         (handle_advance_line, handle_set_file, handle_negate_stmt)
11104         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
11105         (end_sequence, advance_line): New methods.
11106         (m_gdbarch, m_record_lines_p): New fields.
11107         (lnp_reader_state): Delete.
11108         (dwarf_record_line): Rename to ...
11109         (lnp_state_machine::record_line): ... adjust.
11110         (init_lnp_state_machine): Delete.
11111         (lnp_state_machine::lnp_state_machine): New.
11112         (check_line_address): Rename to ...
11113         (lnp_state_machine::check_line_address): This.
11114         (dwarf_decode_lines_1): Remove reference to "reader_state".
11115         Adjust lnp_state_machine having a non-default ctor.  Use bool.
11116         State machine internal state manipulation moved to
11117         lnp_state_machine methods.
11118
11119 2017-04-04  Pedro Alves  <palves@redhat.com>
11120
11121         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11122         unittests/offset-type-selftests.c.
11123         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
11124         * common/offset-type.h: New file.
11125         * common/preprocessor.h: New file.
11126         * common/traits.h: New file.
11127         * common/valid-expr.h: New file.
11128         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
11129         sect_offset and cu_offset strong typedefs throughout.
11130         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
11131         typedefs throughout.
11132         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
11133         sect_offset and cu_offset strong typedefs throughout.
11134         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
11135         typedefs throughout.
11136         * gdbtypes.h: Include "common/offset-type.h".
11137         (cu_offset): Now an offset type (strong typedef) instead of a
11138         struct.
11139         (sect_offset): Likewise.
11140         (union call_site_parameter_u): Rename "param_offset" field to
11141         "param_cu_off".
11142         * unittests/offset-type-selftests.c: New file.
11143
11144 2017-04-04  Pedro Alves  <palves@redhat.com>
11145
11146         * common/underlying.h: New file.
11147         * dwarf2read.c: Include "common/gdb_optional.h" and
11148         "common/underlying.h".
11149         (dir_index, file_name_index): New types.
11150         (file_entry): Use them.
11151         (file_entry::include): Use to_underlying.
11152         (line_header::add_file_name): Use dir_index.
11153         (read_formatted_entries): Use gdb::optional.  Read form before
11154         writting to file_entry.
11155         (dwarf_decode_line_header): Use dir_index.
11156         (lnp_state_machine::current_file): Use to_underlying.
11157         (lnp_state_machine::file): Change type to file_name_index.
11158         (dwarf_record_line): Use to_underlying.
11159         (init_lnp_state_machine): Use file_name_index.
11160         (dwarf_decode_lines_1): Use dir_index and file_name_index.
11161
11162 2017-04-04  Pedro Alves  <palves@redhat.com>
11163
11164         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
11165         operator bool, has_value and get methods.
11166
11167 2017-04-04  Pedro Alves  <palves@redhat.com>
11168
11169         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
11170         fields.
11171         (line_header): Initialize all data fields.  Change type of
11172         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
11173         Change type of include_dirs to std::vector<const char *>.  Remove
11174         num_include_dirs, include_dirs_size.  Change type of file_names to
11175         std::vector<file_entry>.  Remove num_file_names, file_names_size.
11176         (line_header::line_header): New.
11177         (line_header::add_include_dir, line_header::add_file_name): New
11178         methods.
11179         (line_header::include_dir_at): Remove NULL check.
11180         (line_header::file_name_at): Add const overload.
11181         (line_header_up): New unique_ptr typedef.
11182         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
11183         std::vector.  Remove free_line_header call.
11184         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
11185         free_line_header call.
11186         (free_cu_line_header): Delete.
11187         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
11188         (setup_type_unit_groups): Use line_header_up instead of cleanups.
11189         Adjust to use std::vector.
11190         (free_line_header): Delete.
11191         (free_line_header_voidp): Use delete.
11192         (add_include_dir): Replace with ...
11193         (line_header::add_include_dir): ... this method.  Use std::vector.
11194         (add_file_name): Replace with ...
11195         (line_header::add_file_name): ... this method.  Use std::vector.
11196         (add_include_dir_stub): Delete.
11197         (read_formatted_entries): Remove memset.
11198         (dwarf_decode_line_header): Return a line_header_up instead of a
11199         raw pointer.  Remove cleanup handling.  Pass lambdas to
11200         read_formatted_entries.  Adjust to use line_header methods.
11201         (dwarf_decode_lines_1): Adjust to use line_header methods.
11202         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
11203         use std::vector.
11204
11205 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
11206
11207         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
11208         instead of struct ptid.
11209
11210 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
11211
11212         * frame.c (get_frame_register_bytes): Unwind using value.
11213         (put_frame_register_bytes): Likewise.
11214
11215 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
11216
11217         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
11218         aggregate-like.
11219
11220 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
11221
11222         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
11223
11224 2017-03-29  Yao Qi  <yao.qi@linaro.org>
11225
11226         * gdbthread.h (struct thread_info): Declare constructor and
11227         destructor.  Add some in-class member initializers.
11228         * thread.c (free_thread): Remove.
11229         (init_thread_list): Call delete instead of free_thread.
11230         (new_thread): Call thread_info constructor.
11231         (thread_info::thread_info): New function.
11232         (thread_info::~thread_info): New function.
11233         (delete_thread_1): Call delete instead of free_thread.
11234         (make_cleanup_restore_current_thread): Move tp and frame to
11235         inner block.
11236
11237 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11238
11239         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
11240         (arc_skip_prologue): Likewise.
11241         (arc_make_frame_cache): Likewise.
11242         (arc_pv_get_operand): New function.
11243         (arc_is_in_prologue): Likewise.
11244         (arc_analyze_prologue): Likewise.
11245         (arc_print_frame_cache): Likewise.
11246         (MAX_PROLOGUE_LENGTH): New constant.
11247
11248 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11249
11250         * configure.tgt: Add arc-insn.o.
11251         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
11252         (dump_arc_instruction_command): New function.
11253         (arc_fprintf_disasm): Likewise.
11254         (arc_disassemble_info): Likewise.
11255         (arc_insn_get_operand_value): Likewise.
11256         (arc_insn_get_operand_value_signed): Likewise.
11257         (arc_insn_get_memory_base_reg): Likewise.
11258         (arc_insn_get_memory_offset): Likewise.
11259         (arc_insn_get_branch_target): Likewise.
11260         (arc_insn_dump): Likewise.
11261         (arc_insn_get_linear_next_pc): Likewise.
11262         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
11263         (arc_disassemble_info): Likewise.
11264         (arc_insn_get_branch_target): Likewise.
11265         (arc_insn_get_linear_next_pc): Likewise.
11266         * NEWS: Mention new "maint print arc arc-instruction".
11267
11268 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11269
11270         * arc-tdep (maintenance_print_arc_list): New variable.
11271         (maintenance_print_arc_command): New function.
11272
11273 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11274
11275         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
11276         Add "limm" and "reserved".
11277         (arc_cannot_fetch_register, arc_cannot_store_register): Add
11278         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
11279         * arc-tdep.h (arc_regnum): Likewise.
11280
11281 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11282
11283         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11284         for THREADPTR register.
11285         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
11286         register.
11287         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
11288         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
11289         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
11290
11291 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11292
11293         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
11294         registers above gdbarch_num_regs (gdbarch) as privileged in
11295         call0 ABI.
11296
11297 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11298
11299         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11300         for a single specified register or for all registers in
11301         a0_base..a0_base + C0_NREGS range.
11302         (supply_gregset_reg): Call regcache_raw_supply for a single
11303         specified register or for all registers in a0_base..a0_base +
11304         C0_NREGS range.
11305
11306 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11307
11308         * arch/xtensa.h (C0_NREGS): Add definition.
11309         * xtensa-tdep.c (C0_NREGS): Remove definition.
11310
11311 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11312
11313         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
11314         Drop xtensa_default_isa initialization.
11315         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
11316
11317 2017-03-27  Pedro Alves  <palves@redhat.com>
11318
11319         * dwarf2read.c (file_entry) <dir_index>: Add comment.
11320         (file_entry::include_dir): New method.
11321         (line_header::include_dir_at, line_header::file_name_at): New
11322         methods.
11323         (setup_type_unit_groups, setup_type_unit_groups)
11324         (psymtab_include_file_name): Simplify using the new methods.
11325         (lnp_state_machine) <the_line_header>: New field.
11326         <file>: Add comment.
11327         (lnp_state_machine::current_file): New method.
11328         (dwarf_record_line): Simplify using the new methods.
11329         (init_lnp_state_machine): Initialize the "the_line_header" field.
11330         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
11331         Simplify using the new methods.
11332
11333 2017-03-27  Pedro Alves  <palves@redhat.com>
11334
11335         * cp-name-parser.y (make_empty): Delete.
11336         (demangler_special, nested_name, ptr_operator, array_indicator)
11337         (direct_declarator, declarator_1): Use fill_comp instead of
11338         make_empty.
11339
11340 2017-03-27  Pedro Alves  <palves@redhat.com>
11341
11342         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
11343         to ATTRIBUTE_PRINTF.
11344         * solib-target.c (library_list_start_list): Print "string" not
11345         "version".
11346         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
11347         gdb_xml_error call.
11348
11349 2017-03-27  Pedro Alves  <palves@redhat.com>
11350
11351         * dwarf2read.c (struct file_and_directory): New.
11352         (dwarf2_get_dwz_file): Adjust to use std::string.
11353         (dw2_get_file_names_reader): Adjust to use file_and_directory.
11354         (find_file_and_directory): Adjust to return a file_and_directory
11355         object.
11356         (read_file_scope): Adjust to use file_and_directory.  Remove
11357         make_cleanup/do_cleanups calls.
11358         (open_and_init_dwp_file): Adjust to use std::string.  Remove
11359         make_cleanup/do_cleanups calls.
11360         * python/python.c (do_start_initialization): Adjust to ldirname
11361         returning a std::string.
11362         * utils.c (ldirname): Now returns a std::string.
11363         * utils.h (ldirname): Change return type to std::string.
11364         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
11365         returning a std::string.
11366         * xml-tdesc.c (file_read_description_xml): Likewise.
11367
11368 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
11369
11370         * regcache.c (regcache_debug_print_register): New function.
11371         * regcache.h (regcache_debug_print_register): New declaration.
11372         * target.c (debug_print_register): Remove.
11373         (target_fetch_registers): Call regcache_debug_print_register.
11374         (target_store_registers): Likewise.
11375
11376 2017-03-24  Pádraig Brady  <pbrady@fb.com>
11377
11378         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
11379         reference beyond the 'lh->include_dirs' array before accessing to
11380         it.
11381         (psymtab_include_file_name): Likewise.
11382         (dwarf_decode_lines_1): Likewise.
11383         (dwarf_decode_lines): Likewise.
11384         (file_file_name): Likewise.
11385
11386 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
11387
11388         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
11389         inferior_ptid.
11390         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11391         ps_lsetfpregs): Likewise.
11392         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
11393         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11394         ps_lsetfpregs): Likewise.
11395         * target.c (target_fetch_registers, target_store_registers):
11396         Remove asserts.
11397
11398 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
11399
11400         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
11401
11402 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11403
11404         * aarch64-tdep.c (aarch64_process_record_test): Declare.
11405         (_initialize_aarch64_tdep): Register it.
11406         (aarch64_record_load_store): Handle PRFM instruction.
11407         (aarch64_process_record_test): New function.
11408
11409 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11410
11411         * aarch64-tdep.c (aarch64_record_load_store): Fix code
11412         indentation.
11413
11414 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11415
11416         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
11417
11418 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11419
11420         python/python.c (do_start_initialization): Fix memory leak.
11421
11422 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11423
11424         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
11425         using get_ptrace_pid.
11426         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
11427         inferior_ptid.
11428         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
11429         inferior_ptid instead of pid.
11430
11431 2017-03-22  Yao Qi  <yao.qi@linaro.org>
11432
11433         * aarch64-tdep.c: Wrap locally used classes in anonymous
11434         namespace.
11435         * arm-tdep.c: Likewise.
11436         * linespec.c: Likewise.
11437         * ui-out.c: Likewise.
11438
11439 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
11440
11441         PR gdb/19637
11442         * python/lib/gdb/printer/bound_registers.py: Import sys.
11443
11444 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
11445
11446         * windows-nat.c (do_windows_fetch_inferior_registers): Add
11447         windows_thread_info parameter and use it instead of
11448         current_thread.
11449         (windows_fetch_inferior_registers): Don't set current_thread,
11450         pass the thread to do_windows_fetch_inferior_registers.  Use
11451         ptid from regcache instead of inferior_ptid.
11452         (do_windows_store_inferior_registers): Add windows_thread_info
11453         parameter and use it instead of current_thread.
11454         (windows_store_inferior_registers): Don't set current_thread,
11455         pass the thread to do_windows_store_inferior_registers.  Use
11456         ptid from regcache instead of inferior_ptid.
11457
11458 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
11459
11460         * ser-mingw.c (ser_windows_raw): Remove reference to
11461         struct serial::current_timeout.
11462
11463 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
11464
11465         PR tdep/20928
11466         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
11467         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
11468         (sparc64_fsr_type): Fix %fsr decoding.
11469
11470 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
11471
11472         * python/py-record-btrace.c (btpy_insn_data): Change return type
11473         for Python 2.
11474
11475 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
11476
11477         * spu-linux-nat.c (spu_fetch_inferior_registers,
11478         spu_store_inferior_registers): Use ptid from regcache, set and
11479         restore inferior_ptid.
11480         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
11481         Likewise.
11482
11483 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
11484
11485         * i386-linux-nat.c (fetch_register, store_register,
11486         i386_linux_fetch_inferior_registers,
11487         i386_linux_store_inferior_registers): Use ptid from regcache.
11488         * ia64-linux-nat.c (ia64_linux_fetch_register,
11489         ia64_linux_store_register): Likewise.
11490         * inf-ptrace.c (inf_ptrace_fetch_register,
11491         inf_ptrace_store_register): Likewise.
11492         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
11493         m32r_linux_store_inferior_registers): Likewise.
11494         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
11495         m68kbsd_store_inferior_registers): Likewise.
11496         * m68k-linux-nat.c (fetch_register, store_register,
11497         m68k_linux_fetch_inferior_registers,
11498         m68k_linux_store_inferior_registers): Likewise.
11499         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
11500         m88kbsd_store_inferior_registers): Likewise.
11501         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
11502         mips_fbsd_store_inferior_registers): Likewise.
11503         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
11504         mips64_linux_regsets_store_registers): Likewise.
11505         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
11506         mipsnbsd_store_inferior_registers): Likewise.
11507         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
11508         mips64obsd_store_inferior_registers): Likewise.
11509         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
11510         Likewise.
11511         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
11512         ppcfbsd_store_inferior_registers): Likewise.
11513         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
11514         ppc_linux_store_inferior_registers): Likewise.
11515         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
11516         ppcnbsd_store_inferior_registers): Likewise.
11517         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
11518         ppcobsd_store_registers): Likewise.
11519         * procfs.c (procfs_fetch_registers, procfs_store_registers):
11520         Likewise.
11521         * ravenscar-thread.c (ravenscar_fetch_registers,
11522         ravenscar_store_registers, ravenscar_prepare_to_store):
11523         Likewise.
11524         * record-btrace.c (record_btrace_fetch_registers,
11525         record_btrace_store_registers, record_btrace_prepare_to_store):
11526         Likewise.
11527         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
11528         Lookup inferior using ptid from regcache, instead of
11529         current_inferior.
11530         * remote.c (remote_fetch_registers, remote_store_registers): Use
11531         ptid from regcache.
11532         * rs6000-nat.c (fetch_register, store_register): Likewise.
11533         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
11534         s390_linux_store_inferior_registers): Likewise.
11535         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
11536         shnbsd_store_inferior_registers): Likewise.
11537         * sol-thread.c (sol_thread_fetch_registers,
11538         sol_thread_store_registers): Likewise.
11539         * sparc-nat.c (sparc_fetch_inferior_registers,
11540         sparc_store_inferior_registers): Likewise.
11541         * tilegx-linux-nat.c (fetch_inferior_registers,
11542         store_inferior_registers): Likewise.
11543         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
11544         vaxbsd_store_inferior_registers): Likewise.
11545         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
11546         store_xtregs): Likewise.
11547
11548 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11549
11550         PR gdb/14441
11551         * NEWS: Mention support for rvalue references in GDB and python.
11552         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
11553         supports both lvalue and rvalue references.
11554
11555 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11556
11557         PR gdb/14441
11558         * gdbtypes.c (rank_one_type): Implement overloading
11559         resolution rules regarding rvalue references.
11560
11561 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11562
11563         PR gdb/14441
11564         * aarch64-tdep.c (aarch64_type_align)
11565         (aarch64_extract_return_value, aarch64_store_return_value): Change
11566         lvalue reference type checks to general reference type checks.
11567         * amd64-tdep.c (amd64_classify): Likewise.
11568         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
11569         Likewise.
11570         * arm-tdep.c (arm_type_align, arm_extract_return_value)
11571         (arm_store_return_value): Likewise.
11572         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
11573         * c-typeprint.c (c_print_type): Likewise.
11574         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
11575         (cplus_number_of_children, cplus_describe_child): Likewise.
11576         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
11577         * completer.c (expression_completer): Likewise.
11578         * cp-support.c (make_symbol_overload_list_adl_namespace):
11579         Likewise.
11580         * darwin-nat-info.c (info_mach_region_command): Likewise.
11581         * dwarf2loc.c (entry_data_value_coerce_ref)
11582         (value_of_dwarf_reg_entry): Likewise.
11583         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
11584         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
11585         Likewise.
11586         * findvar.c (extract_typed_address, store_typed_address):
11587         Likewise.
11588         * gdbtypes.c (rank_one_type): Likewise.
11589         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
11590         * infcall.c (value_arg_coerce): Likewise.
11591         * language.c (pointer_type): Likewise.
11592         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
11593         Likewise.
11594         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
11595         * mn10300-tdep.c (mn10300_type_align): Likewise.
11596         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
11597         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
11598         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
11599         Likewise.
11600         * printcmd.c (print_formatted, x_command): Likewise.
11601         * python/py-type.c (typy_get_composite, typy_template_argument):
11602         Likewise.
11603         * python/py-value.c (valpy_referenced_value)
11604         (valpy_get_dynamic_type, value_has_field): Likewise.
11605         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
11606         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
11607         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
11608         * spu-tdep.c (spu_scalar_value_p): Likewise.
11609         * symtab.c (lookup_symbol_aux): Likewise.
11610         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
11611         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
11612         Likewise.
11613         * valops.c (value_cast_pointers, value_cast)
11614         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
11615         (value_struct_elt, value_struct_elt_bitpos)
11616         (value_find_oload_method_list, find_overload_match)
11617         (value_rtti_indirect_type): Likewise.
11618         * valprint.c (val_print_scalar_type_p, generic_val_print):
11619         Likewise.
11620         * value.c (value_actual_type, value_as_address, unpack_long)
11621         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
11622         (coerce_ref): Likewise.
11623         * varobj.c (varobj_get_value_type): Likewise.
11624
11625 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11626
11627         PR gdb/14441
11628         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
11629         table of constants.
11630         * python/lib/gdb/command/explore.py: Support exploring values
11631         of rvalue reference types.
11632         * python/lib/gdb/types.py: Implement get_basic_type() for
11633         rvalue reference types.
11634         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
11635         constant.
11636         * python/py-value.c (valpy_getitem): Add an rvalue reference
11637         check.
11638         (valpy_reference_value): Add new parameter "refcode".
11639         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
11640         New wrappers for valpy_reference_value().
11641         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11642         (gdbpy_invoke_xmethod): Likewise.
11643
11644 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11645
11646         PR gdb/14441
11647         * dwarf2read.c (process_die, read_type_die_1): Handle the
11648         DW_TAG_rvalue_reference_type DIE.
11649         (read_tag_reference_type): Add new parameter "refcode".
11650
11651 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11652
11653         PR gdb/14441
11654         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
11655         (c_type_print_modifier, c_type_print_varspec_suffix)
11656         (c_type_print_base): Support printing rvalue reference types.
11657         * c-valprint.c (c_val_print, c_value_print): Support printing
11658         rvalue reference values.
11659
11660 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11661
11662         PR gdb/14441
11663         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
11664         typename.
11665         * cp-support.c (replace_typedefs): Handle
11666         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
11667         * python/py-type.c (typy_lookup_type): Likewise.
11668
11669 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11670
11671         PR gdb/14441
11672         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
11673         * parse.c (insert_type): Change assert statement.
11674         (follow_types): Handle rvalue reference types.
11675         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
11676         constant.
11677
11678 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11679
11680         PR gdb/14441
11681         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
11682         value_ref() interface.
11683         * c-valprint.c (c_value_print): Likewise.
11684         * infcall.c (value_arg_coerce): Likewise.
11685         * python/py-value.c (valpy_reference_value): Likewise.
11686         * valops.c (value_cast, value_reinterpret_cast)
11687         (value_dynamic_cast, typecmp): Likewise.
11688         (value_ref): Parameterize by kind of return value reference type.
11689         * value.h (value_ref): Add new parameter "refcode".
11690
11691 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11692
11693         PR gdb/14441
11694         * dwarf2read.c (read_tag_reference_type): Use
11695         lookup_lvalue_reference_type() instead of lookup_reference_type().
11696         * eval.c (evaluate_subexp_standard): Likewise.
11697         * f-exp.y: Likewise.
11698         * gdbtypes.c (make_reference_type, lookup_reference_type):
11699         Generalize with rvalue reference types.
11700         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
11701         convenience wrappers for lookup_reference_type().
11702         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
11703         reference kind parameter.
11704         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
11705         wrappers for lookup_reference_type().
11706         * guile/scm-type.c (gdbscm_type_reference): Use
11707         lookup_lvalue_reference_type() instead of lookup_reference_type().
11708         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
11709         * parse.c (follow_types): Likewise.
11710         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
11711         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
11712         Likewise.
11713         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11714         (gdbpy_invoke_xmethod): Likewise.
11715         * stabsread.c: Provide extra argument to make_reference_type()
11716         call.
11717         * valops.c (value_ref, value_rtti_indirect_type): Use
11718         lookup_lvalue_reference_type() instead of lookup_reference_type().
11719
11720 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11721
11722         PR gdb/14441
11723         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
11724         (TYPE_IS_REFERENCE): New macro.
11725         (struct type): Add rvalue_reference_type field.
11726         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
11727
11728 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
11729
11730         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
11731         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
11732         New function definition.
11733         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
11734         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
11735         New function declaration.
11736         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
11737         * mi/mi-interp.h: New file.
11738         * solib.c (info_sharedlibrary_command): Replace for loop with
11739         ALL_SO_LIBS macro
11740         * solib.h (update_solib_list): New function declaration.
11741         (so_list_head): Move macro.
11742         * solist.h (ALL_SO_LIBS): New macro.
11743
11744 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
11745
11746         * infcmd.c (post_create_inferior): Remove unused argument in
11747         call to solib_add.
11748         * remote.c (remote_start_remote): Likewise.
11749         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
11750         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
11751         (enable_break): Likewise.
11752         * solib.c (update_solib_list): Remove unused target argument
11753         and its documentation.
11754         (solib_add): Remove unused target argument.  Remove unused
11755         argument in call to update_solib_list.
11756         (info_sharedlibrary_command): Remove unused argument in call
11757         to update_solib_list.
11758         (sharedlibrary_command): Remove unused argument in call to
11759         solib_add.
11760         (handle_solib_event): Likewise.
11761         (reload_shared_libraries): Likewise.
11762         * solib.h (solib_add): Remove unused target argument.
11763
11764 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11765
11766         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
11767         (s390_displaced_step_fixup): Cover relative branches with the
11768         default fixup handling.  This fixes lack of support for some
11769         relative branch instructions.
11770
11771 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11772
11773         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
11774         ptid from regcache.
11775
11776 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11777
11778         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
11779         i386_darwin_store_inferior_registers): Use ptid from regcache.
11780
11781 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11782
11783         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
11784         i386bsd_store_inferior_registers): Use ptid from regcache.
11785
11786 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11787
11788         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
11789         hppaobsd_store_registers): Use ptid from regcache.
11790
11791 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11792
11793         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
11794         hppanbsd_store_registers): Use ptid from regcache.
11795
11796 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11797
11798         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
11799         from regcache.  Use get_ptrace_pid.
11800
11801 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11802
11803         * corelow.c (get_core_register_section): Use ptid from regcache,
11804         update doc.
11805
11806 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11807
11808         * bsd-uthread.c (bsd_uthread_fetch_registers,
11809         bsd_uthread_store_registers): Use ptid from regcache, set and
11810         restore inferior_ptid.
11811
11812 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11813
11814         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
11815         fetch_fp_regs, store_register, store_regs, store_fp_register,
11816         store_fp_regs): Use ptid from regcache.
11817
11818 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11819
11820         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
11821         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
11822         store_vfp_regs): Use ptid from regcache.
11823
11824 2017-03-17  Pedro Alves  <palves@redhat.com>
11825
11826         PR remote/21188
11827         * ser-base.c (ser_base_wait_for): Add comment.
11828         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
11829         version.
11830         * ser-unix.c (hardwire_raw): Remove reference to
11831         scb->current_timeout.
11832         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
11833         (hardwire_ops): Install ser_base_readchar instead of
11834         hardwire_readchar.
11835         * serial.h (struct serial) <current_timeout, timeout_remaining>:
11836         Remove fields.
11837
11838 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
11839
11840         PR gdb/19637
11841         * python/lib/gdb/printer/bound_registers.py: Add support for
11842         Python 3.
11843
11844 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11845
11846         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
11847         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
11848         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
11849         byte_offset to subobj_byte_offset.  Fix the handling of
11850         DWARF_VALUE_STACK on big-endian targets when coming via an
11851         implicit pointer.
11852         (dwarf2_evaluate_loc_desc): Adjust call to
11853         dwarf2_evaluate_loc_desc_full.
11854         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
11855         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
11856
11857 2017-03-16  Yao Qi  <yao.qi@linaro.org>
11858
11859         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
11860         and REVSH instructions.
11861
11862 2017-03-16  Yao Qi  <yao.qi@linaro.org>
11863
11864         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
11865         (arm_record_test): Declare.
11866         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
11867         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
11868         align with the manual.
11869         (thumb_record_misc): Adjust the code order to align with the
11870         manual.
11871         (thumb2_record_decode_insn_handler): Fix instruction matching.
11872         (instruction_reader_thumb): New class.
11873         (arm_record_test): New function.
11874
11875 2017-03-16  Yao Qi  <yao.qi@linaro.org>
11876
11877         * arm-tdep.c (abstract_memory_reader): New class.
11878         (instruction_reader): New class.
11879         (extract_arm_insn): Add argument 'reader'.  Callers updated.
11880         (decode_insn): Likewise.
11881
11882 2017-03-16  Doug Evans  <dje@google.com>
11883
11884         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
11885         member.  Change type of TYPE member to SCM.  All uses updated.
11886         (lsscm_make_lazy_string_smob): Add assert.
11887         (lsscm_make_lazy_string): Flag bad length values.
11888         (lsscm_elt_type): New function.
11889         (gdbscm_lazy_string_to_value): Rewrite to use
11890         lsscm_safe_lazy_string_to_value.
11891         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
11892         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
11893         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
11894         in incoming type.
11895         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
11896         * guile/scm-type.c (tyscm_scm_to_type): New function.
11897
11898 2017-03-15  Doug Evans  <dje@google.com>
11899
11900         PR python/17728, python/18439, python/18779
11901         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
11902         member.  Change type of TYPE member to PyObject *.  All uses updated.
11903         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
11904         (gdbpy_create_lazy_string_object): Flag bad length values.
11905         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
11906         Handle typedefs in incoming type.
11907         (stpy_lazy_string_elt_type): New function.
11908         (gdbpy_extract_lazy_string): Call it.
11909         * python/py-value.c (valpy_lazy_string): Flag bad length values.
11910         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
11911         typedefs in incoming type.
11912
11913 2017-03-16  Doug Evans  <dje@google.com>
11914
11915         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
11916         * guile/scm-type.c (tyscm_scm_to_type): New function.
11917
11918 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
11919
11920         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
11921         "ULONGEST" for "skip".
11922
11923 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11924
11925         PR gdb/21220
11926         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
11927         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
11928         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
11929         over ptrace peek/poke until end of buffer or error.
11930
11931 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
11932
11933         * parse.c (length_of_subexp): Make static.
11934         * parser-defs.h (length_of_subexp): Remove.
11935
11936 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11937
11938         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
11939         as well.
11940
11941 2017-03-14  Pedro Alves  <palves@redhat.com>
11942
11943         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
11944         (main): Use std::unique_ptr.  Remove calls to
11945         cp_demangled_name_parse_free.
11946
11947 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11948
11949         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
11950         alphabsd_store_inferior_registers): Use regcache->ptid instead
11951         of inferior_ptid.
11952
11953 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11954
11955         * aix-thread.c (aix_thread_fetch_registers,
11956         aix_thread_store_registers): Use regcache->ptid instead of
11957         inferior_ptid.
11958
11959 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11960
11961         * aarch64-linux-nat.c (fetch_gregs_from_thread,
11962         store_gregs_to_thread, fetch_fpregs_from_thread,
11963         store_fpregs_to_thread): Use regcache->ptid instead of
11964         inferior_ptid.
11965
11966 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11967
11968         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
11969         amd64_linux_fetch_inferior_registers): Use regcache->ptid
11970         instead of inferior_ptid.
11971
11972 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11973
11974         * target.c (target_fetch_registers, target_store_registers): Add
11975         assert.
11976
11977 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11978
11979         * regcache.h (regcache_get_ptid): New function.
11980         * regcache.c (regcache_get_ptid): New function.
11981
11982 2017-03-13  Mark Wielaard  <mark@klomp.org>
11983
11984         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
11985
11986 2017-03-10  Keith Seitz  <keiths@redhat.com>
11987
11988         PR c++/8218
11989         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
11990
11991 2017-03-08  Pedro Alves  <palves@redhat.com>
11992
11993         PR gdb/18360
11994         * infrun.c (start_step_over, do_target_resume, resume)
11995         (restart_threads): Assert we're not resuming a thread that is
11996         meant to be stopped.
11997         (infrun_thread_stop_requested_callback): Delete.
11998         (infrun_thread_stop_requested): If the thread is internally
11999         stopped, queue a pending stop event and clear the thread's
12000         inline-frame state.
12001         (handle_stop_requested): New function.
12002         (handle_syscall_event, handle_inferior_event_1): Use
12003         handle_stop_requested.
12004         (handle_stop_requested): New function.
12005         (handle_signal_stop): Set the thread's stop_signal here instead of
12006         at caller.
12007         (finish_step_over): Clear step over info unconditionally.
12008         (handle_signal_stop): If the user had interrupted the event
12009         thread, consider the stop a random signal.
12010         (handle_signal_stop) <signal arrived while stepping over
12011         breakpoint>: Don't restart threads here.
12012         (stop_waiting): Don't clear step-over info here.
12013
12014 2017-03-08  Pedro Alves  <palves@redhat.com>
12015
12016         PR 21206
12017         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
12018         goes to argument 2, not 1.
12019
12020 2017-03-08  Pedro Alves  <palves@redhat.com>
12021
12022         PR cli/21218
12023         * top.c (gdb_readline_wrapper): Avoid passing NULL to
12024         display_gdb_prompt.
12025         (command_line_input): Add comment.
12026
12027 2017-03-08  Pedro Alves  <palves@redhat.com>
12028
12029         PR tui/21216
12030         * tui/tui-file.c (tui_file::write): New.
12031         * tui/tui-file.h (tui_file): Override "write".
12032         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
12033         factored out from ...
12034         (tui_puts): ... here.
12035         (tui_putc): Use them.
12036         (tui_write): New function.
12037         * tui/tui-io.h (tui_write): Declare.
12038
12039 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
12040
12041         * Makefile.in (SFILES): Replace "environ.c" with
12042         "common/environ.c".
12043         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
12044         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
12045         to...
12046         * common/environ.c: ... here.
12047         * environ.h: Moved to...
12048         * common/environ.h: ... here.
12049
12050 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
12051
12052         * gdbarch.sh (pstring_ptr): New static function.
12053         (gdbarch_disassembler_options): Use it.
12054         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
12055         not valid_disassembler_option->name.
12056         * gdbarch.c: Regenerate.
12057
12058 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
12059
12060         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
12061
12062 2017-03-07  Pedro Alves  <palves@redhat.com>
12063
12064         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
12065
12066 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12067
12068         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
12069         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
12070         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
12071         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
12072
12073 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
12074
12075         * xtensa-linux-nat.c (fetch_gregs): Remove const.
12076
12077 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
12078
12079         * remote.c (remote_add_target_side_commands): Use range-based
12080         for loop.
12081
12082 2017-03-03  Yao Qi  <yao.qi@linaro.org>
12083
12084         PR gdb/21165
12085         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
12086         value is lazy.
12087         * valprint.c (common_val_print): Likewise.
12088
12089 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
12090
12091         * NEWS: Mention new set/show disassembler-options commands.
12092         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
12093         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
12094         (prospective_options): New static variable.
12095         (gdb_disassembler::gdb_disassembler): Initialize
12096         m_di.disassembler_options.
12097         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
12098         (get_disassembler_options): New function.
12099         (set_disassembler_options): Likewise.
12100         (set_disassembler_options_sfunc): Likewise.
12101         (show_disassembler_options_sfunc): Likewise.
12102         (disassembler_options_completer): Likewise.
12103         (_initialize_disasm): Likewise.
12104         * disasm.h (get_disassembler_options): New prototype.
12105         (set_disassembler_options): Likewise.
12106         * gdbarch.sh (gdbarch_disassembler_options): New variable.
12107         (gdbarch_verify_disassembler_options): Likewise.
12108         * gdbarch.c: Regenerate.
12109         * gdbarch.h: Likewise.
12110         * arm-tdep.c (num_disassembly_options): Delete.
12111         (set_disassembly_style): Likewise.
12112         (arm_disassembler_options): New static variable.
12113         (set_disassembly_style_sfunc): Convert short style name into long
12114         option name.  Call set_disassembler_options.
12115         (show_disassembly_style_sfunc): New function.
12116         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
12117         set_gdbarch_verify_disassembler_options.
12118         (_initialize_arm_tdep): Delete regnames variable and update callers.
12119         (arm_disassembler_options): Initialize.
12120         (disasm_options): New variable.
12121         (num_disassembly_options): Rename from this...
12122         (num_disassembly_styles): ...to this.  Compute by scanning through
12123         disasm_options.
12124         (valid_disassembly_styles): Initialize using disasm_options.
12125         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
12126         set_arm_regname_option.
12127         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
12128         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
12129         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
12130         set_gdbarch_verify_disassembler_options.
12131         * s390-tdep.c (s390_disassembler_options): New static variable.
12132         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
12133         set_gdbarch_verify_disassembler_options.
12134
12135 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12136
12137         * remote.c (remote_add_target_side_condition): Remove "struct"
12138         keyword from range-based for loop.
12139
12140 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12141
12142         * remote.c (remote_add_target_side_condition): Use range-based
12143         for loop.  Update comment.
12144
12145 2017-02-27  Yao Qi  <yao.qi@linaro.org>
12146
12147         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
12148
12149 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
12150
12151         * regcache.c (regcache_raw_update): New function.
12152         (regcache_raw_read): Move code to regcache_raw_update.
12153         * regcache.h (regcache_raw_update): New declaration.
12154         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
12155
12156 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
12157
12158         * dwarf2read.c (create_debug_type_hash_table): Initialize
12159         header.signature and header.type_offset_in_tu.
12160
12161 2017-02-24  Pedro Alves  <palves@redhat.com>
12162
12163         * symtab.c (make_file_symbol_completion_list_1): Use
12164         add_symtab_completions.
12165
12166 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12167
12168         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
12169
12170 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12171
12172         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
12173         I386_MAX_REGISTER_SIZE.
12174         (i386_pseudo_register_write): Likewise.
12175         (i386_process_record): Likewise.
12176         * i387-tdep.c (i387_supply_xsave): Likewise.
12177         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
12178         (store_register): Likewise.
12179
12180 2017-02-23  Pedro Alves  <palves@redhat.com>
12181
12182         * ada-lang.c: Include "common/function-view.h".
12183         (ada_iterate_over_symbols): Adjust to use function_view as
12184         callback type.
12185         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
12186         (ada_make_symbol_completion_list): Use a lambda.
12187         (ada_exc_search_name_matches): Delete.
12188         (name_matches_regex): New.
12189         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
12190         * compile/compile-c-support.c: Include "common/function-view.h".
12191         (print_one_macro): Change prototype to accept a ui_file pointer.
12192         (write_macro_definitions): Use a lambda.
12193         * dwarf2read.c: Include "common/function-view.h".
12194         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
12195         (dw2_expand_symtabs_matching): Adjust to use function_view as
12196         callback type.
12197         * language.h: Include "common/function-view.h".
12198         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
12199         function_view as callback type.
12200         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
12201         * linespec.c: Include "common/function-view.h".
12202         (collect_info::add_symbol): New method.
12203         (struct symbol_and_data_callback, iterate_inline_only, struct
12204         symbol_matcher_data, iterate_name_matcher): Delete.
12205         (iterate_over_all_matching_symtabs): Adjust to use function_view
12206         as callback type and lambdas.
12207         (iterate_over_file_blocks): Adjust to use function_view as
12208         callback type.
12209         (decode_compound_collector): Now a class with private fields.
12210         (decode_compound_collector::release_symbols): New method.
12211         (collect_one_symbol): Rename to...
12212         (decode_compound_collector::operator()): ... this and adjust.
12213         (lookup_prefix_sym): decode_compound_collector construction bits
12214         move to decode_compound_collector ctor.  Pass the
12215         decode_compound_collector object directly as callback.  Remove
12216         cleanups and use decode_compound_collector::release_symbols
12217         instead.
12218         (symtab_collector): Now a class with private fields.
12219         (symtab_collector::release_symtabs): New method.
12220         (add_symtabs_to_list): Rename to...
12221         (symtab_collector::operator()): ... this and adjust.
12222         (collect_symtabs_from_filename): symtab_collector construction
12223         bits move to symtab_collector ctor.  Pass the symtab_collector
12224         object directly as callback.  Remove cleanups and use
12225         symtab_collector::release_symtabs instead.
12226         (collect_symbols): Delete.
12227         (add_matching_symbols_to_info): Use lambdas.
12228         * macrocmd.c (print_macro_callback): Delete.
12229         (info_macro_command): Use a lambda.
12230         (info_macros_command): Pass print_macro_definition as callable
12231         directly.
12232         (print_one_macro): Remove 'ignore' parameter.
12233         (macro_list_command): Adjust.
12234         * macrotab.c (macro_for_each_data::fn): Now a function_view.
12235         (macro_for_each_data::user_data): Delete field.
12236         (foreach_macro): Adjust to call the function_view.
12237         (macro_for_each): Adjust to use function_view as callback type.
12238         (foreach_macro_in_scope): Adjust to call the function_view.
12239         (macro_for_each_in_scope): Adjust to use function_view as callback
12240         type.
12241         * macrotab.h: Include "common/function-view.h".
12242         (macro_callback_fn): Declare a prototype instead of a pointer.
12243         Remove "user_data" parameter.
12244         (macro_for_each, macro_for_each_in_scope): Adjust to use
12245         function_view as callback type.
12246         * psymtab.c (partial_map_expand_apply)
12247         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
12248         Adjust to use function_view as callback type and to return bool.
12249         (psym_expand_symtabs_matching): Adjust to use function_view as
12250         callback types.
12251         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
12252         to use function_view as callback type and to return bool.
12253         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
12254         callback types.
12255         * symfile.c (expand_symtabs_matching): Adjust to use function_view
12256         as callback types.
12257         * symfile.h: Include "common/function-view.h".
12258         (expand_symtabs_file_matcher_ftype)
12259         (expand_symtabs_symbol_matcher_ftype)
12260         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
12261         return bool.
12262         (quick_symbol_functions::map_symtabs_matching_filename)
12263         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
12264         function_view as callback type and return bool.
12265         (expand_symtabs_matching): Adjust to use function_view as callback
12266         type.
12267         (maintenance_expand_name_matcher)
12268         (maintenance_expand_file_matcher): Delete.
12269         (maintenance_expand_symtabs): Use lambdas.
12270         * symtab.c (iterate_over_some_symtabs): Adjust to use
12271         function_view as callback types and return bool.
12272         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
12273         of a cleanup.
12274         (lookup_symtab_callback): Delete.
12275         (lookup_symtab): Use a lambda.
12276         (iterate_over_symbols): Adjust to use function_view as callback
12277         type.
12278         (struct search_symbols_data, search_symbols_file_matches)
12279         (search_symbols_name_matches): Delete.
12280         (search_symbols): Use a pair of lambdas.
12281         (struct add_name_data, add_macro_name, symbol_completion_matcher)
12282         (symtab_expansion_callback): Delete.
12283         (default_make_symbol_completion_list_break_on_1): Use lambdas.
12284         * symtab.h: Include "common/function-view.h".
12285         (iterate_over_some_symtabs): Adjust to use function_view as
12286         callback type and return bool.
12287         (iterate_over_symtabs): Adjust to use function_view as callback
12288         type.
12289         (symbol_found_callback_ftype): Remove 'data' parameter and return
12290         bool.
12291         (iterate_over_symbols): Adjust to use function_view as callback
12292         type.
12293
12294 2017-02-23  Pedro Alves  <palves@redhat.com>
12295
12296         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
12297         (%.o) <unittests/%.c>: New pattern.
12298         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
12299         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
12300         * common/function-view.h: New file.
12301         * unittests/function-view-selftests.c: New file.
12302         * configure: Regenerate.
12303
12304 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
12305
12306         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
12307         inferior_ptid.
12308         * go32-nat.c (go32_thread_alive): Likewise.
12309
12310 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12311
12312         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
12313         delete.
12314
12315 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12316
12317         * varobj.c (varobj_clear_saved_item): Use delete instead of
12318         xfree.
12319         (update_dynamic_varobj_children): Likewise.
12320
12321 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12322
12323         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
12324
12325 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
12326
12327         * common/enum-flags.h (enum_flags::enum_flags): Initialize
12328         m_enum_value to 0 in default constructor.
12329
12330 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
12331
12332         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
12333         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
12334         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
12335         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
12336         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
12337         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
12338         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
12339         IS_STORE_CONDITIONAL_INSN.
12340
12341 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12342
12343         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
12344
12345 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12346
12347         * NEWS (Changes since GDB 7.12): Add DWARF-5.
12348
12349 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12350
12351         * dwarf2read.c (skip_one_die, read_attribute_value)
12352         (dwarf2_const_value_attr, dump_die_shallow)
12353         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
12354         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
12355
12356 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12357
12358         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
12359         (dwarf_parse_macro_header): Accept DWARF version 5.
12360         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
12361
12362 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12363
12364         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
12365         DW_AT_GNU_*.
12366         * common/common-exceptions.h (enum errors): Likewise.
12367         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
12368         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
12369         (dwarf_expr_context::execute_stack_op): Likewise.
12370         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
12371         Likewise.
12372         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
12373         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
12374         (show_entry_values_debug, call_site_to_target_addr)
12375         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
12376         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
12377         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
12378         (value_of_dwarf_block_entry, indirect_pieced_value)
12379         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
12380         (disassemble_dwarf_expression): Likewise.
12381         * dwarf2read.c (process_die, inherit_abstract_dies)
12382         (read_call_site_scope): Likewise.
12383         * gdbtypes.h (struct func_type, struct call_site_parameter)
12384         (struct call_site): Likewise.
12385         * stack.c (read_frame_arg): Likewise.
12386         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
12387
12388 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12389
12390         * defs.h (read_unsigned_leb128): New declaration.
12391         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
12392         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
12393         (dwarf2_find_location_expression): Call also
12394         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
12395         * dwarf2loc.h (dwarf2_version): New declaration.
12396         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
12397         rnglists.
12398         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
12399         .debug_rnglists.
12400         (struct dwop_section_names): Add loclists_dwo.
12401         (dwop_section_names): Add .debug_loclists.dwo.
12402         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
12403         (struct dwarf2_per_cu_data): Add dwarf_version.
12404         (struct dwo_sections): Add loclists.
12405         (struct attr_abbrev): Add implicit_const.
12406         (read_indirect_line_string): New declaration.
12407         (read_unsigned_leb128): Delete declaration.
12408         (rcuh_kind): New definition.
12409         (read_and_check_comp_unit_head): Change parameter
12410         is_debug_types_section to section_kind.
12411         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
12412         (read_comp_unit_head): Change parameter abfd to section, add parameter
12413         section_kind.  Handle DWARF-5.
12414         (error_check_comp_unit_head): Accept also DWARF version 5.
12415         (read_and_check_comp_unit_head): Change parameter
12416         is_debug_types_section to section_kind.
12417         (read_and_check_type_unit_head): Delete function.
12418         (read_abbrev_offset): Handle DWARF-5.
12419         (create_debug_type_hash_table): Add parameter section_kind.  Process
12420         only DW_UT_type.  Use signature and type_offset_in_tu from struct
12421         comp_unit_head.
12422         (create_debug_types_hash_table): Update create_debug_type_hash_table
12423         caller.
12424         (create_all_type_units): Call create_debug_type_hash_table.
12425         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
12426         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
12427         caller.
12428         (skip_one_die): Handle DW_FORM_implicit_const.
12429         (dwarf2_rnglists_process): New function.
12430         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
12431         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
12432         (read_attribute_value): Handle DW_FORM_implicit_const,
12433         DW_FORM_line_strp.
12434         (read_attribute): Handle DW_FORM_implicit_const.
12435         (read_indirect_string_at_offset_from): New function from
12436         read_indirect_string_at_offset.
12437         (read_indirect_string_at_offset): Call
12438         read_indirect_string_at_offset_from.
12439         (read_indirect_line_string_at_offset): New function.
12440         (read_indirect_string): New function comment.
12441         (read_indirect_line_string): New function.
12442         (read_unsigned_leb128): Make it global.
12443         (dwarf2_string_attr): Handle DWARF-5.
12444         (add_include_dir_stub, read_formatted_entries): New functions.
12445         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
12446         Handle DWARF-5.
12447         (per_cu_header_read_in): Update read_comp_unit_head caller.
12448         (dwarf2_version): New function.
12449         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
12450         rnglists.
12451         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
12452         fields.
12453
12454 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12455
12456         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
12457
12458 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12459
12460         * dwarf2read.c (dwarf2_ranges_process): New function from
12461         dwarf2_ranges_read.
12462         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
12463         dwarf2_ranges_process.
12464
12465 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12466
12467         * dwarf2read.c (create_debug_type_hash_table): New function from
12468         create_debug_types_hash_table.
12469         (create_debug_types_hash_table): Call create_debug_type_hash_table.
12470         (create_all_type_units, open_and_init_dwo_file): Update
12471         create_debug_types_hash_table callers.
12472
12473 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
12474
12475         PR gdb/16188
12476         * fork-child.c (trace_start_error): Fix thinko.  va_end should
12477         refer to 'ap', not 'args'.
12478
12479 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
12480             Pedro Alves  <palves@redhat.com>
12481
12482         PR gdb/16188
12483         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
12484         calls succeeded.
12485         * fork-child.c (trace_start_error): New function.
12486         (trace_start_error_with_name): Likewise.
12487         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
12488         * inf-ptrace.c (inf_ptrace_me): Likewise.
12489         * inferior.h (trace_start_error): New prototype.
12490         (trace_start_error_with_name): Likewise.
12491
12492 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
12493
12494         PR gdb/21164
12495         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
12496         NULL before using it.
12497         * symmisc.c (maintenance_print_symbols): Likewise.
12498         (maintenance_print_msymbols): Likewise.
12499
12500 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12501
12502         * NEWS: Add record Python bindings entry.
12503
12504 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12505
12506         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
12507         py-record-full.o.
12508         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
12509         * python/py-record-btrace.c, python/py-record-btrace.h,
12510         python/py-record-full.c, python/py-record-full.h: New file.
12511         * python/py-record.c: Add include for py-record-btrace.h and
12512         py-record-full.h.
12513         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
12514         recpy_instruction_history, recpy_function_call_history, recpy_begin,
12515         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
12516         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
12517         New definition.
12518         (gdbpy_initialize_btrace): New export.
12519         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
12520
12521 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12522
12523         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
12524         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
12525         * python/py-record.c: New file.
12526         * python/python-internal.h (gdbpy_start_recording,
12527         gdbpy_current_recording, gdpy_stop_recording,
12528         gdbpy_initialize_record): New export.
12529         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
12530         (python_GdbMethods): Add gdbpy_start_recording,
12531         gdbpy_current_recording and gdbpy_stop_recording.
12532
12533 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12534
12535         * record-btrace.c (record_btrace_record_method): New function.
12536         (init_record_btrace_ops): Initialize to_record_method.
12537         * record-full.c (record_full_record_method): New function.
12538         (init_record_full_ops, init_record_full_core_ops): Add
12539         record_full_record_method.
12540         * record.h (enum record_method): New enum.
12541         * target-debug.h (target_debug_print_enum_record_method: New define.
12542         * target-delegates.c: Regenerate.
12543         * target.c (target_record_method): New function.
12544         * target.h: Include record.h.
12545         (struct target_ops) <to_record_method>: New field.
12546         (target_record_method): New export.
12547
12548 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12549
12550         * record.h (record_start, record_stop): New export.
12551         * record.c (record_start, record_stop): New function.
12552
12553 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12554
12555         * btrace.c (btrace_fetch): Copy function call segments pointer
12556         into a vector.
12557         (btrace_clear): Clear the vector.
12558         (btrace_find_insn_by_number): Use binary search to find the correct
12559         function call segment.
12560         * btrace.h (brace_fun_p): New typedef.
12561         (struct btrace_thread_info) <functions>: New field.
12562
12563 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12564
12565         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
12566         * btrace.c (btrace_decode_error): ... here.  New function.
12567         * btrace.h (btrace_decode_error): New export.
12568
12569 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12570
12571         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
12572         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
12573         btrace_find_insn_by_number): Remove special case for gaps.
12574         * btrace.h (btrace_insn_get_error): New export.
12575         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
12576         * record-btrace.c (btrace_insn_history): Print number for gaps.
12577         (record_btrace_info, record_btrace_goto): Handle gaps.
12578
12579 2017-02-14  Tom Tromey  <tom@tromey.com>
12580
12581         PR python/13598:
12582         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
12583         event.
12584         * python/py-evts.c (gdbpy_initialize_py_events): Add
12585         before_prompt registry.
12586         * python/py-events.h (events_object) <before_prompt>: New field.
12587
12588 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
12589
12590         * btrace.c (ftrace_new_switch): Preserve up link and flags.
12591
12592 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
12593
12594         * symfile (_initialize_symfile): Add usage text to the load command's
12595         help text.
12596
12597 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
12598
12599         * utils.c (defaulted_query): Don't query on secondary UIs.
12600
12601 2017-02-10  Tom Tromey  <tom@tromey.com>
12602
12603         * rust-lang.c (rust_get_disr_info): Remove unused variable.
12604
12605 2017-02-10  Tom Tromey  <tom@tromey.com>
12606
12607         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
12608         "cleanup" local.
12609         * python/py-type.c (typy_legacy_template_argument): Remove
12610         unnecessary "cleanup" local.
12611
12612 2017-02-10  Tom Tromey  <tom@tromey.com>
12613
12614         * python/python.c (do_start_initialization): New function, from
12615         _initialize_python.
12616         (_initialize_python): Call do_start_initialization.
12617         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
12618         goto.
12619
12620 2017-02-10  Tom Tromey  <tom@tromey.com>
12621
12622         * python/py-prettyprint.c (pretty_print_one_value): Use
12623         gdbpy_ref.
12624
12625 2017-02-10  Tom Tromey  <tom@tromey.com>
12626
12627         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
12628         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
12629         gdbpy_ref.
12630         * python/py-type.c (field_new): Use gdbpy_ref.
12631         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
12632         gdbpy_ref.
12633         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
12634         (py_free_pspace): Likewise.
12635         (pspace_to_pspace_object): Likewise.
12636         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
12637         (py_free_objfile): Likewise.
12638         (objfile_to_objfile_object): Likewise.
12639         * python/py-inferior.c (delete_thread_object): Use
12640         gdbpy_ref.
12641         (infpy_read_memory): Likewise.
12642         (py_free_inferior): Likewise.
12643         * python/py-evtregistry.c (create_eventregistry_object): Use
12644         gdbpy_ref.
12645         * python/py-event.c (create_event_object): Use gdbpy_ref.
12646
12647 2017-02-10  Tom Tromey  <tom@tromey.com>
12648
12649         * python/py-ref.h (gdbpy_ref_policy): Now a template.
12650         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
12651         used.
12652         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
12653         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
12654         python/py-exitedevent.c, python/py-finishbreakpoint.c,
12655         python/py-framefilter.c, python/py-function.c,
12656         python/py-inferior.c, python/py-infevents.c,
12657         python/py-linetable.c, python/py-newobjfileevent.c,
12658         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
12659         python/py-signalevent.c, python/py-stopevent.c,
12660         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
12661         python/py-unwind.c, python/py-utils.c, python/py-value.c,
12662         python/py-varobj.c, python/py-xmethods.c, python/python.c,
12663         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
12664
12665 2017-02-10  Tom Tromey  <tom@tromey.com>
12666
12667         * ui-out.h (ui_out_emit_type): New class.
12668         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
12669         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
12670         and ui_out_emit_tuple.
12671         (enumerate_locals): Likewise.
12672         (py_mi_print_variables, py_print_locals, py_print_args): Use
12673         ui_out_emit_list.
12674         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
12675         ui_out_emit_list.
12676         * common/gdb_optional.h: New file.
12677
12678 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
12679
12680         * MAINTAINERS (Write After Approval): Update my e-mail address.
12681
12682 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
12683
12684         PR gdb/21122
12685         * breakpoint.c (_initialize_breakpoint): Update the help description
12686         of the 'commands' command to indicate that it takes a list argument.
12687
12688 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
12689
12690         * interps.c (current_interp_set_logging): Remove "return".
12691
12692 2017-02-09  Gary Benson  <gbenson@redhat.com>
12693
12694         * symtab.c (add_symtab_completions): Prevent NULL pointer
12695         dereference.
12696
12697 2017-02-08  Pedro Alves  <palves@redhat.com>
12698
12699         * interps.c (interp::interp): Remove reference to quiet_p.
12700         (interp_set): Make static.  Remove dead "Switching to" output
12701         code.
12702         (interp_quiet_p, interp_set_quiet): Delete.
12703         (interpreter_exec_cmd): Don't set the interpreter quiet.
12704         * interps.h (interp_quiet_p): Make static.
12705         (class interp) <quiet_p>: Remove field
12706
12707 2017-02-08  Jerome Guitton  <guitton@adacore.com>
12708
12709         * cli/cli-decode.c (find_command_name_length): Make it extern.
12710         * cli/cli-decode.h (find_command_name_length): Declare.
12711         * cli/cli-script.c (command_name_equals, line_first_arg):
12712         New functions.
12713         (process_next_line): Use cli-decode to parse command names.
12714         (build_command_line): Make args a constant pointer.
12715
12716 2017-02-08  Jerome Guitton  <guitton@adacore.com>
12717
12718         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
12719         Remove case-insensitive search.
12720
12721 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
12722
12723         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
12724         at the end of the line.  Avoids an ARI warning.
12725
12726 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
12727
12728         * NEWS: Mention support for record/replay of Intel 64 rdrand and
12729         rdseed instructions.
12730         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
12731
12732 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
12733
12734         PR tdep/20936
12735         Provide and use sparc32 and sparc64 target description XML files.
12736         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
12737         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
12738         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
12739         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
12740         * features/sparc/sparc32-solaris.xml: New file.
12741         * features/sparc/sparc64-solaris.xml: New file.
12742         * features/sparc/sparc32-solaris.c: Generated.
12743         * features/sparc/sparc64-solaris.c: Generated.
12744         * sparc-tdep.h: Account for differences in target descriptions.
12745         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
12746         (sparc32_register_type): Use target provided registers.
12747         (validate_tdesc_registers): New function.
12748         (sparc32_gdbarch_init): Use tdesc_has_registers.
12749         Set pseudoregister functions.
12750         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
12751         (sparc64_register_type): Use target provided registers.
12752         (sparc64_init_abi): Set pseudoregister functions.
12753
12754 2017-02-03  Tom Tromey  <tom@tromey.com>
12755
12756         PR rust/21097:
12757         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
12758         with a single member.
12759
12760 2017-02-03  Pedro Alves  <palves@redhat.com>
12761
12762         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
12763         (cli_interp_base::~cli_interp_base): New.
12764         (cli_interp): New struct.
12765         (as_cli_interp): Cast the interp itself to cli_interp.
12766         (cli_interpreter_pre_command_loop): Rename to ...
12767         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
12768         parameter.
12769         (cli_interpreter_init): Rename to ...
12770         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
12771         boolean.  Make extern.
12772         (cli_interpreter_resume): Rename to ...
12773         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
12774         extern.
12775         (cli_interpreter_suspend): Rename to ...
12776         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
12777         extern.
12778         (cli_interpreter_exec): Rename to ...
12779         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
12780         extern.
12781         (cli_interpreter_supports_command_editing): Rename to ...
12782         (cli_interp_base::supports_command_editing): ... this.  Remove
12783         'interp' parameter.  Make extern.
12784         (cli_ui_out): Rename to ...
12785         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
12786         Make extern.
12787         (cli_set_logging): Rename to ...
12788         (cli_interp_base::set_logging): ... this.  Remove 'interp'
12789         parameter.  Make extern.
12790         (cli_interp_procs): Delete.
12791         (cli_interp_factory): Adjust to use "new".
12792         * cli/cli-interp.h: Include "interps.h".
12793         (struct cli_interp_base): New struct.
12794         * interps.c (struct interp): Delete.  Fields moved to interps.h.
12795         (interp_new): Delete.
12796         (interp::interp, interp::~interp): New.
12797         (interp_set): Use bool, and return void.  Assume the interpreter
12798         has suspend, init and resume methods, and that the all return
12799         void.
12800         (set_top_level_interpreter): interp_set returns void.
12801         (interp_ui_out): Adapt.
12802         (current_interp_set_logging): Adapt.
12803         (interp_data): Delete.
12804         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
12805         (interp_exec): Adapt.
12806         (top_level_interpreter_data): Delete.
12807         * interps.h (interp_init_ftype, interp_resume_ftype)
12808         (interp_suspend_ftype, interp_exec_ftype)
12809         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
12810         (class interp): New.
12811         (interp_new): Delete.
12812         (interp_set): Now returns void.  Use bool.
12813         (interp_data, top_level_interpreter_data): Delete.
12814         * mi/mi-common.h: Include interps.h.
12815         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
12816         init, resume, suspect, exec, interp_ui_out, set_logging and
12817         pre_command_loop methods.
12818         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
12819         (mi_interpreter_init): Rename to ...
12820         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
12821         bool, return void and make extern.  Adjust.
12822         (mi_interpreter_resume): ... Rename to ...
12823         (mi_interp::resume): ... this.  Remove the 'data' parameter,
12824         return void and make extern.  Adjust.
12825         (mi_interpreter_suspend): ... Rename to ...
12826         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
12827         return void and make extern.  Adjust.
12828         (mi_interpreter_exec): ... Rename to ...
12829         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
12830         extern.  Adjust.
12831         (mi_interpreter_pre_command_loop): ... Rename to ...
12832         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
12833         parameter and make extern.
12834         (mi_on_normal_stop_1): Adjust.
12835         (mi_ui_out): Rename to ...
12836         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
12837         parameter and make extern.  Adjust.
12838         (mi_set_logging): Rename to ...
12839         (mi_interp::set_logging): ... this.  Remove the 'interp'
12840         parameter and make extern.  Adjust.
12841         (mi_interp_procs): Delete.
12842         (mi_interp_factory): Adjust to use 'new'.
12843         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
12844         (mi_print_exception, mi_execute_command, mi_load_progress):
12845         Adjust.
12846         * tui/tui-interp.c (tui_interp): New class.
12847         (as_tui_interp): Return a tui_interp pointer.
12848         (tui_on_normal_stop, tui_on_signal_received)
12849         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
12850         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
12851         to use interp::interp_ui_out.
12852         (tui_init): Rename to ...
12853         (tui_interp::init): ... this.  Remove the 'self' parameter, use
12854         bool, return void and make extern.  Adjust.
12855         (tui_resume): Rename to ...
12856         (tui_interp::resume): ... this.  Remove the 'data' parameter,
12857         return void and make extern.  Adjust.
12858         (tui_suspend): Rename to ...
12859         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
12860         return void and make extern.  Adjust.
12861         (tui_ui_out): Rename to ...
12862         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
12863         parameter, and make extern.  Adjust.
12864         (tui_exec): Rename to ...
12865         (tui_interp::exec): ... this.  Remove the 'data' parameter and
12866         make extern.
12867         (tui_interp_procs): Delete.
12868         (tui_interp_factory): Use "new".
12869
12870 2017-02-02  Tom Tromey  <tom@tromey.com>
12871
12872         * rust-exp.y (ends_raw_string, space_then_number)
12873         (rust_identifier_start_p): Return bool.
12874         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
12875         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
12876         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
12877         (rust_chartype_p): Return bool.
12878         (val_print_struct, rust_print_struct_def, rust_print_type):
12879         Update.
12880         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
12881         Return bool.
12882
12883 2017-02-02  Tom Tromey  <tom@tromey.com>
12884
12885         * rust-lang.c: Reindent.
12886
12887 2017-02-02  Tom Tromey  <tom@tromey.com>
12888
12889         * rust-lang.h (rust_crate_for_block): Update.
12890         * rust-lang.c (rust_crate_for_block): Return std::string.
12891         (rust_get_disr_info): Use std:;string, not
12892         gdb::unique_xmalloc_ptr.
12893         * rust-exp.y (crate_name): Update.
12894
12895 2017-02-02  Pedro Alves  <palves@redhat.com>
12896
12897         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
12898         field out of gdb_disassembler_test and make it static.
12899
12900 2017-02-02  Pedro Alves  <palves@redhat.com>
12901
12902         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
12903         mi1_interp and mi_interp fields.
12904
12905 2017-02-02  Pedro Alves  <palves@redhat.com>
12906
12907         * cli/cli-interp.c (struct saved_output_files, saved_output):
12908         Moved from cli/cli-logging.c.
12909         (cli_set_logging): New function.
12910         (cli_interp_procs): Install cli_set_logging.
12911         * cli/cli-interp.h (make_logging_output, cli_set_logging):
12912         Declare.
12913         * cli/cli-logging.c (struct saved_output_files, saved_output):
12914         Moved to cli/cli-interp.c.
12915         (pop_output_files): Don't save outputs here.
12916         (make_logging_output): New function.
12917         (handle_redirections): Don't build tee nor save previous outputs
12918         here.
12919         * interps.c (current_interp_set_logging): Change prototype.
12920         Assume there's always a set_logging_proc method installed.
12921         * interps.h (interp_set_logging_ftype): Change prototype.
12922         (current_interp_set_logging): Change prototype and adjust comment.
12923         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
12924         use make_logging_output.
12925         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
12926 2017-02-02  Pedro Alves  <palves@redhat.com>
12927
12928         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
12929         from ...
12930         (set_logging_overwrite): ... here.
12931         (logging_no_redirect_file): Delete.
12932         (set_logging_redirect): Don't handle redirection on the fly.
12933         Instead warn that "logging off" / "logging on" is necessary.
12934         (pop_output_files): Delete references to logging_no_redirect_file.
12935         (show_logging_command): Always speak in terms of what will happen
12936         once logging is reenabled.
12937
12938 2017-02-02  Pedro Alves  <palves@redhat.com>
12939
12940         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
12941
12942 2017-02-02  Pedro Alves  <palves@redhat.com>
12943
12944         * disasm.c (gdb_pretty_print_insn): Rename to ...
12945         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
12946         Remove gdbarch parameter.  Adapt to clear the object's buffers
12947         instead of allocating new buffers, and to print using the object's
12948         gdb_disassembler instead of calling gdb_print_insn.
12949         (dump_insns): Use gdb_pretty_print_disassembler.
12950         * disasm.h (gdb_pretty_print_insn): Delete declaration.
12951         (gdb_pretty_print_disassembler): New class.
12952         * record-btrace.c (btrace_insn_history): Use
12953         gdb_pretty_print_disassembler.
12954
12955 2017-02-02  Pedro Alves  <palves@redhat.com>
12956
12957         * ada-lang.c (type_as_string): Use string_file.
12958         * ada-valprint.c (ada_print_floating): Use string_file.
12959         * ada-varobj.c (ada_varobj_scalar_image)
12960         (ada_varobj_get_value_image): Use string_file.
12961         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
12962         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
12963         * breakpoint.c (update_inserted_breakpoint_locations)
12964         (insert_breakpoint_locations, reattach_breakpoints)
12965         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
12966         (print_it_watchpoint): Use string_file.
12967         (save_breakpoints): Use stdio_file.
12968         * c-exp.y (oper): Use string_file.
12969         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
12970         tee_file.
12971         (pop_output_files): Use delete.
12972         (handle_redirections): Use stdio_file and tee_file.
12973         * cli/cli-setshow.c (do_show_command): Use string_file.
12974         * compile/compile-c-support.c (c_compute_program): Use
12975         string_file.
12976         * compile/compile-c-symbols.c (generate_vla_size): Take a
12977         'string_file &' instead of a 'ui_file *'.
12978         (generate_c_for_for_one_variable): Take a 'string_file &' instead
12979         of a 'ui_file *'.  Use string_file.
12980         (generate_c_for_variable_locations): Take a 'string_file &'
12981         instead of a 'ui_file *'.
12982         * compile/compile-internal.h (generate_c_for_for_one_variable):
12983         Take a 'string_file &' instead of a 'ui_file *'.
12984         * compile/compile-loc2c.c (push, pushf, unary, binary)
12985         (print_label, pushf_register_address, pushf_register)
12986         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
12987         'ui_file *'.  Adjust.
12988         * compile/compile.c (compile_to_object): Use string_file.
12989         * compile/compile.h (compile_dwarf_expr_to_c)
12990         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
12991         'ui_file *'.
12992         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
12993         (replace_typedefs_qualified_name): Use string_file and
12994         obstack_copy0.
12995         * disasm.c (gdb_pretty_print_insn): Use string_file.
12996         (gdb_disassembly): Adjust reference the null_stream global.
12997         (do_ui_file_delete): Delete.
12998         (gdb_insn_length): Use null_stream.
12999         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
13000         * dwarf2loc.c (dwarf2_compile_property_to_c)
13001         (locexpr_generate_c_location, loclist_generate_c_location): Take a
13002         'string_file &' instead of a 'ui_file *'.
13003         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
13004         * dwarf2read.c (do_ui_file_peek_last): Delete.
13005         (dwarf2_compute_name): Use string_file.
13006         * event-top.c (gdb_setup_readline): Use stdio_file.
13007         * gdbarch.sh (verify_gdbarch): Use string_file.
13008         * gdbtypes.c (safe_parse_type): Use null_stream.
13009         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
13010         string_file.
13011         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
13012         'string_file *' instead of a 'ui_file *'.
13013         (gdbscm_arch_disassemble): Use string_file.
13014         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
13015         * guile/scm-ports.c (class ioscm_file_port): Now a class that
13016         inherits from ui_file.
13017         (ioscm_file_port_delete, ioscm_file_port_rewind)
13018         (ioscm_file_port_put): Delete.
13019         (ioscm_file_port_write): Rename to ...
13020         (ioscm_file_port::write): ... this.  Remove file_port_magic
13021         checks.
13022         (ioscm_file_port_new): Delete.
13023         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
13024         ui_file_up.
13025         * guile/scm-type.c (tyscm_type_name): Use string_file.
13026         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
13027         Use string_file.
13028         * infcmd.c (print_return_value_1): Use string_file.
13029         * infrun.c (print_target_wait_results): Use string_file.
13030         * language.c (add_language): Use string_file.
13031         * location.c (explicit_to_string_internal): Use string_file.
13032         * main.c (captured_main_1): Use null_file.
13033         * maint.c (maintenance_print_architecture): Use stdio_file.
13034         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
13035         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
13036         event_channel>: Change type to mi_console_file pointer.
13037         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
13038         (mi_console_file_delete): Delete.
13039         (struct mi_console_file): Delete.
13040         (mi_console_file_magic): Delete.
13041         (mi_console_file_new): Delete.
13042         (mi_console_file::mi_console_file): New.
13043         (mi_console_file_delete): Delete.
13044         (mi_console_file_fputs): Delete.
13045         (mi_console_file::write): New.
13046         (mi_console_raw_packet): Delete.
13047         (mi_console_file::flush): New.
13048         (mi_console_file_flush): Delete.
13049         (mi_console_set_raw): Rename to ...
13050         (mi_console_file::set_raw): ... this.
13051         * mi/mi-console.h (class mi_console_file): New class.
13052         (mi_console_file_new, mi_console_set_raw): Delete.
13053         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
13054         (mi_set_logging): Use delete and tee_file.  Adjust.
13055         * mi/mi-main.c (output_register): Use string_file.
13056         (mi_cmd_data_evaluate_expression): Use string_file.
13057         (mi_cmd_data_read_memory): Use string_file.
13058         (mi_cmd_execute, print_variable_or_computed): Use string_file.
13059         * mi/mi-out.c (mi_ui_out::main_stream): New.
13060         (mi_ui_out::rewind): Use main_stream and
13061         string_file.
13062         (mi_ui_out::put): Use main_stream and string_file.
13063         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13064         Allocate a 'string_file' instead.
13065         (mi_out_new): Don't allocate a mem_fileopen stream here.
13066         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13067         (mi_ui_out::main_stream): Declare method.
13068         * printcmd.c (eval_command): Use string_file.
13069         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
13070         * python/py-arch.c (archpy_disassemble): Use string_file.
13071         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
13072         * python/py-frame.c (frapy_str): Use string_file.
13073         * python/py-framefilter.c (py_print_type, py_print_single_arg):
13074         Use string_file.
13075         * python/py-type.c (typy_str): Use string_file.
13076         * python/py-unwind.c (unwind_infopy_str): Use string_file.
13077         * python/py-value.c (valpy_str): Use string_file.
13078         * record-btrace.c (btrace_insn_history): Use string_file.
13079         * regcache.c (regcache_print): Use stdio_file.
13080         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
13081         * remote.c (escape_buffer): Use string_file.
13082         * rust-lang.c (rust_get_disr_info): Use string_file.
13083         * serial.c (serial_open_ops_1): Use stdio_file.
13084         (do_serial_close): Use delete.
13085         * stack.c (print_frame_arg): Use string_file.
13086         (print_frame_args): Remove local mem_fileopen stream, not used.
13087         (print_frame): Use string_file.
13088         * symmisc.c (maintenance_print_symbols): Use stdio_file.
13089         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
13090         Take a 'string_file *' instead of a 'ui_file *'.
13091         * top.c (new_ui): Use stdio_file and stderr_file.
13092         (free_ui): Use delete.
13093         (execute_command_to_string): Use string_file.
13094         (quit_confirm): Use string_file.
13095         * tracepoint.c (collection_list::append_exp): Use string_file.
13096         * tui/tui-disasm.c (tui_disassemble): Use string_file.
13097         * tui/tui-file.c: Don't include "ui-file.h".
13098         (enum streamtype, struct tui_stream): Delete.
13099         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
13100         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
13101         (tui_file::tui_file): New method.
13102         (tui_file_fputs): Delete.
13103         (tui_file_get_strbuf): Delete.
13104         (tui_file::puts): New method.
13105         (tui_file_adjust_strbuf): Delete.
13106         (tui_file_flush): Delete.
13107         (tui_file::flush): New method.
13108         * tui/tui-file.h: Tweak intro comment.
13109         Include ui-file.h.
13110         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
13111         (tui_file_adjust_strbuf): Delete declarations.
13112         (class tui_file): New class.
13113         * tui/tui-io.c (tui_initialize_io): Use tui_file.
13114         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
13115         (tui_register_format): Use string_stream.
13116         * tui/tui-stack.c (tui_make_status_line): Use string_file.
13117         (tui_get_function_from_frame): Use string_file.
13118         * typeprint.c (type_to_string): Use string_file.
13119         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
13120         (null_stream): New global.
13121         (ui_file_delete): Delete.
13122         (ui_file::ui_file): New.
13123         (null_file_isatty): Delete.
13124         (ui_file::~ui_file): New.
13125         (null_file_rewind): Delete.
13126         (ui_file::printf): New.
13127         (null_file_put): Delete.
13128         (null_file_flush): Delete.
13129         (ui_file::putstr): New.
13130         (null_file_write): Delete.
13131         (ui_file::putstrn): New.
13132         (null_file_read): Delete.
13133         (ui_file::putc): New.
13134         (null_file_fputs): Delete.
13135         (null_file_write_async_safe): Delete.
13136         (ui_file::vprintf): New.
13137         (null_file_delete): Delete.
13138         (null_file::write): New.
13139         (null_file_fseek): Delete.
13140         (null_file::puts): New.
13141         (ui_file_data): Delete.
13142         (null_file::write_async_safe): New.
13143         (gdb_flush, ui_file_isatty): Adjust.
13144         (ui_file_put, ui_file_rewind): Delete.
13145         (ui_file_write): Adjust.
13146         (ui_file_write_for_put): Delete.
13147         (ui_file_write_async_safe, ui_file_read): Adjust.
13148         (ui_file_fseek): Delete.
13149         (fputs_unfiltered): Adjust.
13150         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
13151         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
13152         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
13153         (set_ui_file_data): Delete.
13154         (string_file::~string_file, string_file::write)
13155         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
13156         (do_ui_file_as_string, ui_file_as_string): Delete.
13157         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
13158         (struct mem_file): Delete.
13159         (mem_file_new): Delete.
13160         (stdio_file::stdio_file): New.
13161         (mem_file_delete): Delete.
13162         (stdio_file::stdio_file): New.
13163         (mem_fileopen): Delete.
13164         (stdio_file::~stdio_file): New.
13165         (mem_file_rewind): Delete.
13166         (stdio_file::set_stream): New.
13167         (mem_file_put): Delete.
13168         (stdio_file::open): New.
13169         (mem_file_write): Delete.
13170         (stdio_file_magic, struct stdio_file): Delete.
13171         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
13172         (stdio_file::flush): New.
13173         (stdio_file_read): Rename to ...
13174         (stdio_file::read): ... this.  Adjust.
13175         (stdio_file_write): Rename to ...
13176         (stdio_file::write): ... this.  Adjust.
13177         (stdio_file_write_async_safe): Rename to ...
13178         (stdio_file::write_async_safe) ... this.  Adjust.
13179         (stdio_file_fputs): Rename to ...
13180         (stdio_file::puts) ... this.  Adjust.
13181         (stdio_file_isatty): Delete.
13182         (stdio_file_fseek): Delete.
13183         (stdio_file::isatty): New.
13184         (stderr_file_write): Rename to ...
13185         (stderr_file::write) ... this.  Adjust.
13186         (stderr_file_fputs): Rename to ...
13187         (stderr_file::puts) ... this.  Adjust.
13188         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
13189         (stderr_file::stderr_file): New.
13190         (tee_file_magic): Delete.
13191         (struct tee_file): Delete.
13192         (tee_file::tee_file): New.
13193         (tee_file_new): Delete.
13194         (tee_file::~tee_file): New.
13195         (tee_file_delete): Delete.
13196         (tee_file_flush): Rename to ...
13197         (tee_file::flush): ... this.  Adjust.
13198         (tee_file_write): Rename to ...
13199         (tee_file::write): ... this.  Adjust.
13200         (tee_file::write_async_safe): New.
13201         (tee_file_fputs): Rename to ...
13202         (tee_file::puts): ... this.  Adjust.
13203         (tee_file_isatty): Rename to ...
13204         (tee_file::isatty): ... this.  Adjust.
13205         * ui-file.h (struct obstack, struct ui_file): Don't
13206         forward-declare.
13207         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
13208         (ui_file_write_ftype)
13209         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
13210         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
13211         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
13212         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
13213         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
13214         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
13215         (set_ui_file_fseek): Delete.
13216         (ui_file_data, ui_file_delete, ui_file_rewind)
13217         (struct ui_file): New.
13218         (ui_file_up): New.
13219         (class null_file): New.
13220         (null_stream): Declare.
13221         (ui_file_write_for_put, ui_file_put): Delete.
13222         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
13223         Delete.
13224         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
13225         (gdb_fopen, tee_file_new): Delete.
13226         (struct string_file): New.
13227         (struct stdio_file): New.
13228         (stdio_file_up): New.
13229         (struct stderr_file): New.
13230         (class tee_file): New.
13231         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
13232         of a 'ui_file *'.  Adjust.
13233         * ui-out.h (class ui_out) <field_stream>: Likewise.
13234         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
13235         (null_stream): Delete.
13236         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
13237         Adjust.
13238         * utils.h (struct ui_file): Delete forward declaration..
13239         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
13240         (error_stream): Take a 'string_file &' instead of a
13241         'ui_file *'.
13242         * varobj.c (varobj_value_get_print_value): Use string_file.
13243         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
13244         * gdbarch.c: Regenerate.
13245
13246 2017-02-02  Pedro Alves  <palves@redhat.com>
13247
13248         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
13249         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
13250         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
13251         Adjust to call gdb_print_insn instead of
13252         gdb_disassembler::print_insn.
13253         (dump_insns, do_mixed_source_and_assembly_deprecated)
13254         (do_mixed_source_and_assembly, do_assembly_only): Add back a
13255         'gdbarch' parameter.  Remove gdb_disassembler parameter.
13256         (gdb_disassembly): Don't allocate a gdb_disassembler here.
13257         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
13258         declaration.
13259         (gdb_pretty_print_insn): Re-add declaration.
13260         * record-btrace.c (btrace_insn_history): Don't allocate a
13261         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
13262
13263 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
13264
13265         * disasm.h (gdb_disassembly): Remove file_string parameter.
13266         * disasm.c (gdb_disassembly): Likewise.
13267         * cli/cli-cmds.c (print_disassembly): Adapt.
13268         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
13269         * stack.c (do_gdb_disassembly): Likewise.
13270
13271 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13272
13273         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
13274         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
13275         targets.  And if the implicit value is longer than needed, extract
13276         the first bytes instead of the "least significant" ones.
13277
13278 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13279
13280         * btrace.c (btrace_enable): Do not call btrace_add_pc for
13281         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
13282         (btrace_fetch): Assert can_access_registers_ptid.
13283         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
13284         validate_registers_access.
13285
13286 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13287
13288         * gdbthread.h (can_access_registers_ptid): New.
13289         * thread.c (can_access_registers_ptid): New.
13290
13291 2017-02-01  Pedro Alves  <palves@redhat.com>
13292
13293         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
13294
13295 2017-01-31  Pedro Alves  <palves@redhat.com>
13296
13297         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
13298         Fix typos.
13299
13300 2017-01-31  Pedro Alves  <palves@redhat.com>
13301
13302         * stack.c (print_frame_args): Remove local mem_fileopen stream,
13303         not used.
13304
13305 2017-01-31  Pedro Alves  <palves@redhat.com>
13306
13307         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
13308
13309 2017-01-31  Pedro Alves  <palves@redhat.com>
13310
13311         * common/scoped_restore.h
13312         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
13313         change the value's parameter type to T2.
13314         (make_scoped_restore): Likewise.
13315
13316 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13317             Richard Henderson  <rth@redhat.com>
13318
13319         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
13320         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
13321         GS_BASE for older kernels.
13322         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
13323         GS_BASE for older kernels.
13324         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
13325         and GS_BASE to the offset table.
13326         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
13327         system register group.
13328         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
13329         for older kernels.
13330         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
13331         amd64 ABI.
13332         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
13333         AMD64_GSBASE_REGNUM.
13334         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
13335         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
13336         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
13337         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
13338         i386/64bit-segments.xml in those rules.
13339         * features/i386/64bit-segments.xml: New file.
13340         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
13341         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
13342         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
13343         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
13344         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
13345         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
13346         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
13347         * features/i386/amd64-avx-linux.c: Regenerated.
13348         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
13349         * features/i386/amd64-avx-mpx.c: Regenerated.
13350         * features/i386/amd64-avx512-linux.c: Regenerated.
13351         * features/i386/amd64-linux.c: Regenerated.
13352         * features/i386/amd64-mpx-linux.c: Regenerated.
13353         * features/i386/i386-avx-mpx-linux.c: Regenerated.
13354         * features/i386/i386-avx-mpx.c: Regenerated.
13355         * features/i386/x32-avx-linux.c: Regenerated.
13356         * features/i386/x32-avx512-linux.c: Regenerated.
13357         * regformats/i386/amd64-avx-linux.dat: Regenerated.
13358         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
13359         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
13360         * regformats/i386/amd64-linux.dat: Regenerated.
13361         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
13362         * regformats/i386/x32-avx-linux.dat: Regenerated.
13363         * regformats/i386/x32-avx512-linux.dat: Regenerated.
13364         * regformats/i386/x32-linux.dat: Regenerated.
13365
13366 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13367
13368         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
13369         Set to AMD64_NUM_REGS.
13370
13371 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13372
13373         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
13374         that checks validity of a register number.
13375
13376 2017-01-27  Kees Cook  <keescook@google.com>
13377
13378         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
13379         fetch_fpregs if target has fpa registers.
13380         (arm_linux_store_inferior_registers): Call store_fpregs if target
13381         has fpa registers.
13382
13383 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13384
13385         * cris-tdep.c (cris_gdbarch_init): Remove check for
13386         info.byte_order and force it to BFD_ENDIAN_LITTLE.
13387
13388 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
13389
13390         * corelow.c (get_core_register_section): Check for regset
13391         existence before checking for REGSET_VARIABLE_SIZE.
13392
13393 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13394             Pedro Alves  <palves@redhat.com>
13395
13396         PR gdb/20939
13397         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
13398         call memory_error, save memaddr instead.
13399         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
13400         negative, cal memory_error.
13401         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
13402
13403 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13404
13405         * disasm-selftests.c (memory_error_test): New function.
13406         (_initialize_disasm_selftests): Register memory_error_test.
13407
13408 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13409
13410         * Makefile.in (SFILES): Add disasm-selftests.c and
13411         selftest-arch.c.
13412         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
13413         * disasm-selftests.c: New file.
13414         * selftest-arch.c: New file.
13415         * selftest-arch.h: New file.
13416
13417 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13418
13419         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
13420         to bfd_arch_mep.  Don't return 0 if section is not
13421         found.  Call print_insn_mep.
13422
13423 2017-01-26  Pedro Alves  <palves@redhat.com>
13424             Yao Qi  <yao.qi@linaro.org>
13425
13426         * arm-tdep.c: Include "disasm.h".
13427         (gdb_print_insn_arm): Update code to get gdbarch.
13428         * disasm.c (dis_asm_read_memory): Change it to
13429         gdb_disassembler::dis_asm_read_memory.
13430         (dis_asm_memory_error): Likewise.
13431         (dis_asm_print_address): Likewise.
13432         (gdb_pretty_print_insn): Change it to
13433         gdb_disassembler::pretty_print_insn.
13434         (dump_insns): Add one argument gdb_disassemlber.  All
13435         callers updated.
13436         (do_mixed_source_and_assembly_deprecated): Likewise.
13437         (do_mixed_source_and_assembly): Likewise.
13438         (do_assembly_only): Likewise.
13439         (gdb_disassembler::gdb_disassembler): New.
13440         (gdb_disassembler::print_insn): New.
13441         * disasm.h (class gdb_disassembler): New.
13442         (gdb_pretty_print_insn): Remove declaration.
13443         (gdb_disassemble_info): Likewise.
13444         * guile/scm-disasm.c (class gdbscm_disassembler): New.
13445         (gdbscm_disasm_read_memory_worker): Update.
13446         (gdbscm_disasm_read_memory): Update.
13447         (gdbscm_disasm_memory_error): Remove.
13448         (gdbscm_disasm_print_address): Remove.
13449         (gdbscm_disassembler::gdbscm_disassembler): New.
13450         (gdbscm_print_insn_from_port): Update.
13451         * mips-tdep.c: Include disasm.h.
13452         (gdb_print_insn_mips): Update code to get gdbarch.
13453         * record-btrace.c (btrace_insn_history): Update.
13454         * spu-tdep.c: Include disasm.h.
13455         (struct spu_dis_asm_data): Remove.
13456         (struct spu_dis_asm_info): New.
13457         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
13458         SPU id.
13459         (gdb_print_insn_spu): Cast disassemble_info to
13460         spu_dis_asm_info.
13461
13462 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13463
13464         * disasm.c (do_ui_file_delete): Delete.
13465         (gdb_insn_length): Move code creating stream to ...
13466         * utils.c (null_stream): ... here.  New function.
13467         * utils.h (null_stream): Declare.
13468
13469 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
13470
13471         * python/py-inferior.c (find_thread_object): Return directly
13472         from the loop.  Remove "found" variable.
13473
13474 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
13475
13476         GDB 7.12.1 released.
13477
13478 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
13479
13480         * python/py-function.c (fnpy_call): Reorder declarations to have
13481         the gdbpy_enter object declared first.
13482         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
13483
13484 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
13485
13486         PR python/21068
13487         * python/python-internal.h (PyMem_RawMalloc): Define for
13488         Python < 3.4.
13489         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
13490         PyMem_RawMalloc instead of PyMem_Malloc.
13491
13492 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
13493             Luis Machado  <lgustavo@codesourcery.com>
13494
13495         * NEWS (New commands): Mention flash-erase.
13496         (New MI commands): Mention target-flash-erase.
13497         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
13498         command.
13499         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
13500         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
13501         * target.c (flash_erase_command): New function.
13502         (initialize_targets): Add new flash-erase command.
13503         * target.h (flash_erase_command): New declaration.
13504
13505 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
13506
13507         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
13508         HAVE_SYS_PROCFS_H is defined.
13509
13510 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
13511
13512         * remote.c (struct cached_reg): Change data into a pointer.
13513         * (stop_reply_dtr): Free data pointers before deleting vector.
13514         (process_stop_reply): Likewise.
13515         (remote_parse_stop_reply): Allocate space for data
13516
13517 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
13518
13519         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
13520         MAX_REGISTER_SIZE.
13521         (amd64_pseudo_register_read_value): Likewise.
13522         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
13523         (store_register_using_P): Likewise.
13524         * regcache.c (regcache_xfer_part): Likewise.
13525
13526 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
13527
13528         Split real and pseudo registers.
13529         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
13530         (sparc32_pseudo_regnum): New enum.
13531         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
13532         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
13533         (SPARC32_CP0_REGISTERS): New macro.
13534         (sparc32_pseudo_register_name): New function.
13535         (sparc32_register_name): Use sparc32_pseudo_register_name.
13536         (sparc32_pseudo_register_type): New function.
13537         (sparc32_register_type): Use sparc32_pseudo_register_type.
13538         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
13539         pseudo register numbers.
13540         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
13541         (SPARC64_CP0_REGISTERS): New macro.
13542         (sparc64_pseudo_register_name): New function.
13543         (sparc64_register_name): Use sparc64_pseudo_register_name.
13544         (sparc64_pseudo_register_type): New function.
13545         (sparc64_register_type): Use sparc64_pseudo_register_type.
13546         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
13547         pseudo register numbers.
13548         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
13549         sparc64_store_arguments): Handle pseudo register numbers.
13550
13551 2017-01-13  Yao Qi  <yao.qi@linaro.org>
13552
13553         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
13554         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
13555         output.
13556         (getpkt_or_notif_sane_1): Likewise.
13557
13558 2017-01-13  Yao Qi  <yao.qi@linaro.org>
13559
13560         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
13561         of CC.  Pass "-x c++-header" instead of "-x c".
13562
13563 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13564
13565         * remote.c (remote_can_async_p): Update comment.
13566
13567 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13568
13569         * linux-nat.c (linux_nat_can_async_p): Update comment.
13570
13571 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13572
13573         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
13574
13575 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
13576
13577         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
13578
13579 2017-01-10  Tom Tromey  <tom@tromey.com>
13580
13581         * python/py-type.c (typy_legacy_template_argument): Update.
13582         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
13583         ~demangle_parse_info): Declare new members.
13584         (cp_demangled_name_to_comp): Return unique_ptr.
13585         (cp_demangled_name_parse_free)
13586         (make_cleanup_cp_demangled_name_parse_free)
13587         (cp_new_demangle_parse_info): Remove.
13588         * cp-support.c (do_demangled_name_parse_free_cleanup)
13589         (make_cleanup_cp_demangled_name_parse_free): Remove.
13590         (inspect_type, cp_canonicalize_string_full)
13591         (cp_canonicalize_string): Update.
13592         (mangled_name_to_comp): Change return type.
13593         (cp_class_name_from_physname, method_name_from_physname)
13594         (cp_func_name, cp_remove_params): Update.
13595         * cp-name-parser.y (demangle_parse_info): New constructor, from
13596         cp_new_demangle_parse_info.
13597         (~demangle_parse_info): New destructor, from
13598         cp_demangled_name_parse_free.
13599         (cp_merge_demangle_parse_infos): Update.
13600         (cp_demangled_name_to_comp): Change return type.
13601
13602 2017-01-10  Tom Tromey  <tom@tromey.com>
13603
13604         * top.c (prevent_dont_repeat): Change return type.
13605         * python/python.c (execute_gdb_command): Use std::string.
13606         Update.
13607         * guile/guile.c (gdbscm_execute_gdb_command): Update.
13608         * command.h (prevent_dont_repeat): Change return type.
13609         * breakpoint.c (bpstat_do_actions_1): Update.
13610
13611 2017-01-10  Tom Tromey  <tom@tromey.com>
13612
13613         * value.h (scoped_value_mark::~scoped_value_mark): Call
13614         free_to_mark.
13615         (scoped_value_mark::free_to_mark): New method.
13616         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
13617         scoped_value_mark.
13618
13619 2017-01-10  Tom Tromey  <tom@tromey.com>
13620
13621         * python/py-value.c (valpy_dereference, valpy_referenced_value)
13622         (valpy_reference_value, valpy_const_value, valpy_get_address)
13623         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
13624         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
13625         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
13626         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
13627         scoped_value_mark.
13628         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
13629         * value.h (scoped_value_mark): New class.
13630
13631 2017-01-10  Tom Tromey  <tom@tromey.com>
13632
13633         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
13634         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
13635         * psymtab.c (discard_psymtabs_upto): Remove.
13636         (make_cleanup_discard_psymtabs): Remove.
13637         (struct psymtab_state): Remove.
13638
13639 2017-01-10  Tom Tromey  <tom@tromey.com>
13640
13641         * record-full.c (record_full_save_cleanups): Remove.
13642         (record_full_save): Use gdb::unlinker.
13643         * gcore.c (do_bfd_delete_cleanup): Remove.
13644         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
13645         cleanups.
13646         * dwarf2read.c (unlink_if_set): Remove.
13647         (write_psymtabs_to_index): Use gdb::unlinker.
13648         * common/gdb_unlinker.h: New file.
13649
13650 2017-01-10  Tom Tromey  <tom@tromey.com>
13651
13652         * windows-tdep.c (windows_xfer_shared_library): Update.
13653         * windows-nat.c (windows_make_so): Update.
13654         * utils.h (make_cleanup_bfd_unref): Remove.
13655         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
13656         * symfile.h (symfile_bfd_open)
13657         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
13658         * symfile.c (read_symbols, symbol_file_add)
13659         (separate_debug_file_exists): Update.
13660         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
13661         (generic_load, reread_symbols): Update.
13662         * symfile-mem.c (symbol_file_add_from_memory): Update.
13663         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
13664         (spu_symbol_file_add_from_memory): Update.
13665         * solist.h (struct target_so_ops) <bfd_open>: Return
13666         gdb_bfd_ref_ptr.
13667         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
13668         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
13669         gdb_bfd_ref_ptr.
13670         (solib_map_sections, reload_shared_libraries_1): Update.
13671         * solib-svr4.c (enable_break): Update.
13672         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
13673         * solib-frv.c (enable_break2): Update.
13674         * solib-dsbt.c (enable_break): Update.
13675         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
13676         gdb_bfd_ref_ptr.
13677         (darwin_solib_get_all_image_info_addr_at_init): Update.
13678         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
13679         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
13680         * record-full.c (record_full_save): Update.
13681         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
13682         * procfs.c (insert_dbx_link_bpt_in_file): Update.
13683         * minidebug.c (find_separate_debug_file_in_section): Return
13684         gdb_bfd_ref_ptr.
13685         * machoread.c (macho_add_oso_symfile): Change abfd to
13686         gdb_bfd_ref_ptr.
13687         (macho_symfile_read_all_oso): Update.
13688         (macho_check_dsym): Return gdb_bfd_ref_ptr.
13689         (macho_symfile_read): Update.
13690         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
13691         (jit_bfd_try_read_symtab): Update.
13692         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13693         (gdb_bfd_openw, gdb_bfd_openr_iovec)
13694         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13695         gdb_bfd_ref_ptr.
13696         (gdb_bfd_ref_policy): New struct.
13697         (gdb_bfd_ref_ptr): New typedef.
13698         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13699         (gdb_bfd_openw, gdb_bfd_openr_iovec)
13700         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13701         gdb_bfd_ref_ptr.
13702         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13703         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13704         (gcore_command): Update.
13705         * exec.c (exec_file_attach): Update.
13706         * elfread.c (elf_symfile_read): Update.
13707         * dwarf2read.c (dwarf2_get_dwz_file): Update.
13708         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
13709         (open_and_init_dwo_file): Update.
13710         (open_dwp_file): Return gdb_bfd_ref_ptr.
13711         (open_and_init_dwp_file): Update.
13712         * corelow.c (core_open): Update.
13713         * compile/compile-object-load.c (compile_object_load): Update.
13714         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
13715         * coffread.c (coff_symfile_read): Update.
13716         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
13717         gdb_bfd_ref_ptr.  Rename.
13718         (dump_bfd_file, restore_command): Update.
13719         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13720         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13721         (find_separate_debug_file_by_buildid): Update.
13722
13723 2017-01-10  Tom Tromey  <tom@tromey.com>
13724
13725         * common/gdb_ref_ptr.h: New file.
13726         * python/py-ref.h (struct gdbpy_ref_policy): New.
13727         (gdbpy_ref): Now a typedef.
13728
13729 2017-01-10  Tom Tromey  <tom@tromey.com>
13730
13731         * utils.h (make_cleanup_htab_delete): Don't declare.
13732         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
13733         Remove.
13734         * linespec.c (decode_compound_collector): Add constructor,
13735         destructor.
13736         (lookup_prefix_sym): Remove cleanup.
13737         (symtab_collector): Add constructor, destructor.
13738         (collect_symtabs_from_filename): Remove cleanup.
13739         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
13740         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
13741         Use htab_up.
13742         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
13743         * dwarf2read.c (dw2_expand_symtabs_matching)
13744         (dw2_map_symbol_filenames, dwarf_decode_macros)
13745         (write_psymtabs_to_index): Use htab_up.
13746         * dwarf2loc.c (func_verify_no_selftailcall)
13747         (call_site_find_chain_1, func_verify_no_selftailcall)
13748         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
13749         std::vector, gdb::unique_xmalloc_ptr.
13750         (call_sitep): Remove typedef.
13751         (dwarf2_locexpr_baton_eval): Remove unused variable.
13752
13753 2017-01-10  Tom Tromey  <tom@tromey.com>
13754
13755         * python/python-internal.h (make_cleanup_py_decref)
13756         (make_cleanup_py_xdecref): Don't declare.
13757         * python/py-utils.c (py_decref, make_cleanup_py_decref)
13758         (py_xdecref, make_cleanup_py_xdecref): Remove.
13759
13760 2017-01-10  Tom Tromey  <tom@tromey.com>
13761
13762         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
13763         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
13764
13765 2017-01-10  Tom Tromey  <tom@tromey.com>
13766
13767         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
13768
13769 2017-01-10  Tom Tromey  <tom@tromey.com>
13770
13771         * python/py-utils.c (unicode_to_encoded_string)
13772         (python_string_to_target_string)
13773         (python_string_to_target_python_string)
13774         (python_string_to_host_string, gdbpy_obj_to_string)
13775         (get_addr_from_python): Use gdbpy_ref.
13776
13777 2017-01-10  Tom Tromey  <tom@tromey.com>
13778
13779         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
13780         gdbpy_ref.
13781
13782 2017-01-10  Tom Tromey  <tom@tromey.com>
13783
13784         * python/python.c (eval_python_command, gdbpy_decode_line)
13785         (gdbpy_run_events, gdbpy_start_type_printers)
13786         (gdbpy_apply_type_printers): Use gdbpy_ref.
13787
13788 2017-01-10  Tom Tromey  <tom@tromey.com>
13789
13790         * python/py-param.c (get_doc_string, compute_enum_values): Use
13791         gdbpy_ref.
13792
13793 2017-01-10  Tom Tromey  <tom@tromey.com>
13794
13795         * python/py-inferior.c (find_thread_object, build_inferior_list):
13796         Use gdbpy_ref.
13797
13798 2017-01-10  Tom Tromey  <tom@tromey.com>
13799
13800         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13801
13802 2017-01-10  Tom Tromey  <tom@tromey.com>
13803
13804         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
13805         gdbpy_ref.
13806
13807 2017-01-10  Tom Tromey  <tom@tromey.com>
13808
13809         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
13810         extra incref.
13811         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
13812         Use gdbpy_ref.
13813
13814 2017-01-10  Tom Tromey  <tom@tromey.com>
13815
13816         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
13817         gdbpy_ref.
13818
13819 2017-01-10  Tom Tromey  <tom@tromey.com>
13820
13821         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
13822         decref results of PyArg_ParseTupleAndKeywords.
13823
13824 2017-01-10  Tom Tromey  <tom@tromey.com>
13825
13826         * python/python.c (python_run_simple_file): Use
13827         unique_xmalloc_ptr, gdbpy_ref.
13828
13829 2017-01-10  Tom Tromey  <tom@tromey.com>
13830
13831         * python/py-prettyprint.c (print_stack_unless_memory_error)
13832         (print_string_repr, print_children): Use gdbpy_ref.
13833         (dummy_python_frame): New class.
13834         (dummy_python_frame::dummy_python_frame): Rename from
13835         push_dummy_python_frame.
13836         (py_restore_tstate): Remove.
13837
13838 2017-01-10  Tom Tromey  <tom@tromey.com>
13839
13840         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13841
13842 2017-01-10  Tom Tromey  <tom@tromey.com>
13843
13844         * python/python.c (ensure_python_env, restore_python_env):
13845         Remove.
13846         * python/python-internal.h (ensure_python_env): Don't declare.
13847         * varobj.h (varobj_ensure_python_env): Don't declare.
13848         * varobj.c (varobj_ensure_python_env): Remove.
13849
13850 2017-01-10  Tom Tromey  <tom@tromey.com>
13851
13852         * varobj.c (varobj_value_get_print_value): Use
13853         gdbpy_enter_varobj.
13854
13855 2017-01-10  Tom Tromey  <tom@tromey.com>
13856
13857         * python/py-prettyprint.c (print_string_repr, print_children):
13858         Update.
13859         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
13860         of "encoding".
13861         * varobj.c (varobj_value_get_print_value): Update.
13862         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
13863
13864 2017-01-10  Tom Tromey  <tom@tromey.com>
13865
13866         * varobj.c (varobj_get_display_hint)
13867         (dynamic_varobj_has_child_method, install_new_value_visualizer)
13868         (varobj_set_visualizer, free_variable): Use
13869         gdbpy_enter_varobj.
13870
13871 2017-01-10  Tom Tromey  <tom@tromey.com>
13872
13873         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
13874         (do_finish_initialization): New function.  Use gdbpy_ref.
13875         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
13876         do_finish_initialization.
13877
13878 2017-01-10  Tom Tromey  <tom@tromey.com>
13879
13880         * python/py-param.c (get_set_value, get_show_value): Use
13881         gdbpy_enter, gdbpy_ref.
13882
13883 2017-01-10  Tom Tromey  <tom@tromey.com>
13884
13885         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
13886
13887 2017-01-10  Tom Tromey  <tom@tromey.com>
13888
13889         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
13890
13891 2017-01-10  Tom Tromey  <tom@tromey.com>
13892
13893         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
13894         Use gdbpy_enter_varobj.
13895
13896 2017-01-10  Tom Tromey  <tom@tromey.com>
13897
13898         * varobj.c (gdbpy_enter_varobj): New constructor.
13899         * python/python-internal.h (gdbpy_enter_varobj): New class.
13900         * python/py-varobj.c (py_varobj_get_iterator): Use
13901         gdbpy_enter_varobj.
13902
13903 2017-01-10  Tom Tromey  <tom@tromey.com>
13904
13905         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
13906         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
13907         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
13908         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
13909         unique_xmalloc_ptr.
13910         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
13911
13912 2017-01-10  Tom Tromey  <tom@tromey.com>
13913
13914         * python/py-xmethods.c (invoke_match_method): Use
13915         gdbpy_ref.
13916
13917 2017-01-10  Tom Tromey  <tom@tromey.com>
13918
13919         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
13920         gdbpy_enter, gdbpy_ref.
13921
13922 2017-01-10  Tom Tromey  <tom@tromey.com>
13923
13924         * python/python.c (python_interactive_command): Use gdbpy_enter.
13925
13926 2017-01-10  Tom Tromey  <tom@tromey.com>
13927
13928         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
13929         gdbpy_ref.
13930
13931 2017-01-10  Tom Tromey  <tom@tromey.com>
13932
13933         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
13934         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
13935
13936 2017-01-10  Tom Tromey  <tom@tromey.com>
13937
13938         * utils.h (htab_deleter): New struct.
13939         (htab_up): New typedef.
13940         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
13941         gdbpy_enter, gdbpy_ref, htab_up.
13942
13943 2017-01-10  Tom Tromey  <tom@tromey.com>
13944
13945         * python/py-unwind.c (pending_frame_invalidate): Remove.
13946         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
13947
13948 2017-01-10  Tom Tromey  <tom@tromey.com>
13949
13950         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
13951         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
13952
13953 2017-01-10  Tom Tromey  <tom@tromey.com>
13954
13955         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
13956
13957 2017-01-10  Tom Tromey  <tom@tromey.com>
13958
13959         * python/python.c (gdbpy_eval_from_control_command)
13960         (gdbpy_source_script, gdbpy_run_events)
13961         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
13962         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
13963         gdbpy_enter.
13964
13965 2017-01-10  Tom Tromey  <tom@tromey.com>
13966
13967         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
13968
13969 2017-01-10  Tom Tromey  <tom@tromey.com>
13970
13971         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
13972
13973 2017-01-10  Tom Tromey  <tom@tromey.com>
13974
13975         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
13976         (python_on_inferior_call_pre, python_on_inferior_call_post)
13977         (python_on_memory_change, python_on_register_change)
13978         (python_inferior_exit, python_new_objfile, add_thread_object)
13979         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
13980
13981 2017-01-10  Tom Tromey  <tom@tromey.com>
13982
13983         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
13984         (bpfinishpy_handle_exit): Use gdbpy_enter.
13985
13986 2017-01-10  Tom Tromey  <tom@tromey.com>
13987
13988         * python/py-cmd.c (cmdpy_destroyer)
13989         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
13990         gdbpy_enter.
13991
13992 2017-01-10  Tom Tromey  <tom@tromey.com>
13993
13994         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
13995         gdbpy_enter.
13996         (gdbpy_breakpoint_has_cond): Likewise.
13997
13998 2017-01-10  Tom Tromey  <tom@tromey.com>
13999
14000         * python/python.c (gdbpy_enter): New constructor.
14001         (~gdbpy_enter): New destructor.
14002         (restore_python_env, ensure_python_env): Rewrite.
14003         * python/python-internal.h (gdbpy_enter): New class.
14004
14005 2017-01-10  Tom Tromey  <tom@tromey.com>
14006
14007         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
14008
14009 2017-01-10  Tom Tromey  <tom@tromey.com>
14010
14011         * python/py-value.c (value_has_field, get_field_flag)
14012         (get_field_type, valpy_getitem, convert_value_from_python): Use
14013         gdbpy_ref.
14014
14015 2017-01-10  Tom Tromey  <tom@tromey.com>
14016
14017         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
14018         gdbpy_ref.
14019
14020 2017-01-10  Tom Tromey  <tom@tromey.com>
14021
14022         * python/py-prettyprint.c (search_pp_list)
14023         (find_pretty_printer_from_objfiles)
14024         (find_pretty_printer_from_progspace)
14025         (find_pretty_printer_from_gdb, find_pretty_printer)
14026         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
14027         gdbpy_ref.
14028
14029 2017-01-10  Tom Tromey  <tom@tromey.com>
14030
14031         * python/py-param.c (call_doc_function): Use gdbpy_ref.
14032
14033 2017-01-10  Tom Tromey  <tom@tromey.com>
14034
14035         * python/py-linetable.c (build_line_table_tuple_from_pcs)
14036         (ltpy_get_all_source_lines): Use gdbpy_ref.
14037
14038 2017-01-10  Tom Tromey  <tom@tromey.com>
14039
14040         * python/py-framefilter.c (extract_sym, extract_value)
14041         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
14042         gdbpy_ref.
14043
14044 2017-01-10  Tom Tromey  <tom@tromey.com>
14045
14046         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
14047
14048 2017-01-10  Tom Tromey  <tom@tromey.com>
14049
14050         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
14051
14052 2017-01-10  Tom Tromey  <tom@tromey.com>
14053
14054         * python/py-function.c (convert_values_to_python, fnpy_init): Use
14055         gdbpy_ref.
14056
14057 2017-01-10  Tom Tromey  <tom@tromey.com>
14058
14059         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
14060
14061 2017-01-10  Tom Tromey  <tom@tromey.com>
14062
14063         * python/py-type.c (convert_field, make_fielditem, typy_fields)
14064         (typy_range): Use gdbpy_ref.
14065
14066 2017-01-10  Tom Tromey  <tom@tromey.com>
14067
14068         * python/py-threadevent.c (create_thread_event_object): Use
14069         gdbpy_ref.
14070         * python/py-stopevent.c (create_stop_event_object): Simplify.
14071         (emit_stop_event): Use gdbpy_ref.
14072         * python/py-signalevent.c (create_signal_event_object): Use
14073         gdbpy_ref.
14074         * python/py-newobjfileevent.c (create_new_objfile_event_object)
14075         (emit_new_objfile_event, create_clear_objfiles_event_object)
14076         (emit_clear_objfiles_event): Use gdbpy_ref.
14077         * python/py-infevents.c (create_inferior_call_event_object)
14078         (create_register_changed_event_object)
14079         (create_memory_changed_event_object, emit_inferior_call_event)
14080         (emit_memory_changed_event, emit_register_changed_event): Use
14081         gdbpy_ref.
14082         * python/py-exitedevent.c (create_exited_event_object)
14083         (emit_exited_event): Use gdbpy_ref.
14084         * python/py-event.h (evpy_emit_event): Remove
14085         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
14086         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
14087         * python/py-continueevent.c (emit_continue_event): Use
14088         gdbpy_ref.
14089         * python/py-breakpoint.c (gdbpy_breakpoint_created)
14090         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
14091         gdbpy_ref.
14092         * python/py-bpevent.c (create_breakpoint_event_object): Use
14093         gdbpy_ref.
14094
14095 2017-01-10  Tom Tromey  <tom@tromey.com>
14096
14097         * python/py-ref.h: New file.
14098
14099 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
14100
14101         * cli-out.c (cli_ui_out::do_redirect): Change return type to
14102         void.
14103         * cli-out.h (cli_ui_out::do_redirect): Likewise.
14104         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
14105         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
14106         * ui-out.c (ui_out::redirect): Likewise.
14107         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
14108         * cli/cli-logging.c (set_logging_redirect): Update call site of
14109         ui_out::redirect.
14110         (handle_redirections): Likewise.
14111         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
14112         * top.c (execute_command_to_string): Likewise.
14113         * utils.c (do_ui_out_redirect_pop): Likewise.
14114
14115 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
14116
14117         * stack.c (_initialize_stack): Update "frame" command help message.
14118
14119 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
14120
14121         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
14122
14123 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14124
14125         * x86-linux-nat.h: Include gdb_proc_service.h.
14126
14127 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14128
14129         * ser-base.h: Include serial.h.
14130
14131 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14132
14133         * ppc-linux-tdep.h: Include ppc-tdep.h.
14134
14135 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14136
14137         * nat/amd64-linux-siginfo.h: Include signal.h.
14138
14139 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14140
14141         * nat/aarch64-linux-hw-point.h: Include break-common.h.
14142
14143 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14144
14145         * mi/mi-parse.h: Include mi-cmds.h.
14146
14147 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14148
14149         * inf-loop.c: Don't include "target.h".
14150         * inf-loop.h: Include it here.
14151
14152 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14153
14154         * dfp.h: Include "dboulest.h" and "expression.h".
14155
14156 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14157
14158         * ax-gdb.h: Include "ax.h".
14159
14160 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14161
14162         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
14163         with nat/gdb_ptrace.h.
14164
14165 2017-01-05  Yao Qi  <yao.qi@linaro.org>
14166
14167         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
14168         new line.
14169         (mips64_fbsd_sigframe_init): Likewise.
14170
14171 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14172
14173         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
14174         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
14175
14176 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14177
14178         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
14179         * NEWS: Mention new FreeBSD/mips native configuration.
14180         * config/mips/fbsd.mh: New file.
14181         * configure.host: Add mips*-*-freebsd*.
14182         * mips-fbsd-nat.c: New file.
14183
14184 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14185
14186         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
14187         (ALLDEPFILES): Add mips-fbsd-tdep.c.
14188         * NEWS: Mention new FreeBSD/mips target.
14189         * configure.tgt: Add mips*-*-freebsd*.
14190         * mips-fbsd-tdep.c: New file.
14191         * mips-fbsd-tdep.h: New file.
14192
14193 2017-01-04  Yao Qi  <yao.qi@linaro.org>
14194
14195         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
14196         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
14197
14198 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14199
14200         Update copyright year range in all GDB files.
14201
14202 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14203
14204         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
14205
14206 For older changes see ChangeLog-2016.
14207 \f
14208 Local Variables:
14209 mode: change-log
14210 left-margin: 8
14211 fill-column: 74
14212 version-control: never
14213 coding: utf-8
14214 End: