bee135719c2204eaae96cf0b0e21f76d4af1cfa0
[external/binutils.git] / gdb / ChangeLog
1 2017-11-02  Yao Qi  <yao.qi@linaro.org>
2
3         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
4         (init_regcache_descr): Use gdbarch_num_regs.
5         (regcache::regcache): Likewise.
6         (regcache::get_register_status): Likewise.
7         (regcache::assert_raw_regnum): Likewise.
8         (regcache::cooked_read): Likewise.
9         (regcache::cooked_read_value): Likewise.
10         (regcache::cooked_write): Likewise.
11         (regcache::dump): Likewise.
12         (regcache::num_raw_registers): New method.
13         * regcache.h (class regcache) <num_raw_registers>: New.
14
15 2017-11-02  Yao Qi  <yao.qi@linaro.org>
16
17         * regcache.c (regcache::assert_regnum): New method.
18         (regcache::invalidate): Call assert_regnum.
19         (regcache::raw_update): Likewise.
20         (regcache::raw_write): Likewise.
21         (regcache::raw_read_part): Likewise.
22         (regcache::raw_write_part): Likewise.
23         (regcache::raw_supply): Likewise.
24         (regcache::raw_supply_integer): Likewise.
25         (regcache::raw_supply_zeroed): Likewise.
26         (regcache::raw_collect): Likewise.
27         (regcache::raw_collect_integer): Likewise.
28         * regcache.h (regcache::assert_regnum): Declare.
29
30 2017-11-02  Yao Qi  <yao.qi@linaro.org>
31
32         * regcache.c (regcache::dump): Remove code.
33
34 2017-11-02  Yao Qi  <yao.qi@linaro.org>
35
36         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
37         Remove.
38         <sizeof_cooked_register_status>: Remove.
39         (init_regcache_descr): Update.
40         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
41         (regcache::save): Likewise.
42         (regcache::dump): Likewise.
43
44 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
45
46         * ft32-tdep.c (ft32_fetch_instruction): New function.
47         (ft32_analyze_prologue): Use ft32_fetch_instruction().
48
49 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
50
51         * cli/cli-script.c (execute_control_command): Rename to ...
52         (execute_control_command_1): ... this.
53         (execute_control_command): New function.
54
55 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
56
57         * tracepoint.c (tfind_command): Remove const_cast.
58
59 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
60
61         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
62
63 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
64
65         * common/common-utils.h (in_inclusive_range): New function.
66         * arm-tdep.c (arm_record_extension_space): Use
67         in_inclusive_range.
68         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
69         * cris-tdep.c (cris_spec_reg_applicable): Use
70         in_inclusive_range.
71
72 2017-10-30  Pedro Alves  <palves@redhat.com>
73             Simon Marchi <simon.marchi@ericsson.com>
74
75         * remote.c (remote_set_syscall_catchpoint): Build a std::string
76         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
77
78 2017-10-30  Pedro Alves  <palves@redhat.com>
79
80         * common/common-utils.c (string_appendf, string_vappendf): New
81         functions.
82         * common/common-utils.h (string_appendf, string_vappendf): New
83         declarations.
84         * unittests/common-utils-selftests.c (string_appendf_func)
85         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
86         (string_vappendf_tests): New functions.
87         (_initialize_common_utils_selftests): Register "string_appendf" and
88         "string_vappendf tests".
89
90 2017-10-30  Pedro Alves  <palves@redhat.com>
91
92         * unittests/common-utils-selftests.c (format_func): New typedef.
93         (string_printf_tests, string_vprintf_tests): Tests factored out
94         and merged to ...
95         (test_format_func): ... this new function.
96         (string_printf_tests, string_vprintf_tests): Reimplement on top of
97         test_format_func.
98
99 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
100
101         * darwin-nat.c: Remove include of gdb.h.
102
103 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
104
105         * xtensa-xtregs.c: Fix formatting issues.
106
107 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
108
109         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
110
111 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
112
113         PR python/21213
114         * python/py-infthread.c (thpy_get_inferior): Increment reference
115         of inferior before returning it.
116
117 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
118
119         * unittests/common-utils-selftests.c (format): Add
120         ATTRIBUTE_PRINTF.
121
122 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
123
124         * xml-syscall.c (struct syscall_desc): Add constructor.
125         <name>: Change type to std::string.
126         (syscall_desc_up): New typedef.
127         (syscall_desc_p): Remove typeder.
128         (DEF_VEC_P(syscall_desc_p)): Remove.
129         (struct syscall_group_desc): Add constructor.
130         <name>: Change type to std::string.
131         <syscalls>: Change type to std::vector.
132         (syscall_group_desc_up): New typedef.
133         (syscall_group_desc_p): Remove typedef.
134         (DEF_VEC_P(syscall_group_desc_p)): Remove.
135         (struct syscalls_info) <syscalls>: Change type to std::vector of
136         unique_ptr.
137         <groups>: Likewise.
138         <my_gdb_datadir>: Change type to std::string.
139         (syscalls_info_up): New typedef.
140         (allocate_syscalls_info): Remove.
141         (syscalls_info_free_syscalls_desc): Remove.
142         (syscalls_info_free_syscall_group_desc): Remove.
143         (free_syscalls_info): Remove.
144         (make_cleanup_free_syscalls_info): Remove.
145         (syscall_group_create_syscall_group_desc): Adjust.
146         (syscall_group_add_syscall): Adjust.
147         (syscall_create_syscall_desc): Adjust.
148         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
149         (init_syscalls_info): Adjust.
150         (syscall_group_get_group_by_name): Adjust.
151         (xml_get_syscall_number): Adjust.
152         (xml_get_syscall_name): Adjust.
153         (xml_list_of_syscalls): Adjust.
154         (xml_list_syscalls_by_group): Adjust.
155         (xml_list_of_groups): Adjust.
156
157 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
158
159         * probe.h: Don't include gdb_vecs.h.
160         (DEF_VEC_P (probe_p)): Remove.
161         (find_probes_in_objfile): Return an std::vector.
162         * probe.c (find_probes_in_objfile): Likewise.
163         * breakpoint.c (breakpoint_objfile_data)
164         <longjmp_probes>: Change type to std::vector.
165         <exception_probes>: Likewise.
166         (free_breakpoint_probes): Don't manually free vectors.
167         (create_longjmp_master_breakpoint): Adjust.
168         (create_exception_master_breakpoint): Adjust.
169         * solib-svr4.c (svr4_create_probe_breakpoints): Change
170         parameter type, adjust.
171         (svr4_create_solib_event_breakpoints): Adjust.
172
173 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
174
175         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
176         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
177         with new.
178         (free_breakpoint_probes): Rename to ...
179         (free_breakpoint_objfile_data): ... this, and call delete on
180         bp_objfile_data..
181
182 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
183
184         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
185         (loaded_script_ptr): Remove typedef.
186         (DEF_VEC_P (loaded_script_ptr)): Remove.
187         (struct collect_matching_scripts_data): Add constructor.
188         <scripts_p>: Change type to (pointer to) std::vector.
189         (collect_matching_scripts_data): Adjust.
190         (sort_scripts_by_name): Make suitable for std::sort.
191         (print_scripts): Don't sort vector, adjust to std::vector.
192         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
193
194 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
195
196         * symfile.c (filename_language): Make struct, not typedef.  Add
197         constructor.
198         <ext>: Change type to std::string.
199         (DEF_VEC_O (filename_language)): Remove.
200         (filename_language_table): Change type to std::vector.
201         (add_filename_language): Adjust.
202         (set_ext_lang_command): Adjust.
203         (info_ext_lang_command): Adjust.
204         (deduce_language_from_filename): Adjust.
205         (class scoped_restore_filename_language_table): Remove.
206         (test_filename_language): Use scoped_restore.
207         (test_set_ext_lang_command): Use scoped_restore, adjust to
208         std::vector change.
209
210 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
211
212         * symfile.c: Include selftest.h.
213         (class scoped_restore_filename_language_table): New.
214         (test_filename_language): New test.
215         (test_set_ext_lang_command): New test.
216         (_initialize_symfile): Register tests.
217
218 2017-10-27  Keith Seitz  <keiths@redhat.com>
219
220         * breakpoint.c (print_breakpoint_location): Use the symbol saved
221         in the bp_location, falling back to find_pc_sect_function when
222         needed.
223         (add_location_to_breakpoint): Save sal->symbol.
224         * breakpoint.h (struct bp_location) <symbol>: New field.
225         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
226         * symtab.h (struct symtab_and_line) <symbol>: New field.
227
228 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
229
230         PR gdb/13669
231         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
232         to rewind obstack.
233
234 2017-10-26  Pedro Alves  <palves@redhat.com>
235
236         * remote.c (remote_async_terminal_ours_p): Delete.
237         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
238         Remove references to 'remote_async_terminal_ours_p'.
239
240 2017-10-26  Yao Qi  <yao.qi@linaro.org>
241
242         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
243
244 2017-10-26  Yao Qi  <yao.qi@linaro.org>
245
246         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
247         aspace const.
248         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
249         Likewise.
250         * breakpoint.c (bpstat_check_location): Remove cast.
251         (breakpoint_hit_catch_fork): Make aspce const.
252         (breakpoint_hit_catch_solib): Likewise.
253         (breakpoint_hit_catch_exec): Likewise.
254         (breakpoint_hit_ranged_breakpoint): Likewise.
255         (breakpoint_hit_watchpoint): Likewise.
256         (base_breakpoint_breakpoint_hit): Likewise.
257         (bkpt_breakpoint_hit): Likewise.
258         (dprintf_breakpoint_hit): Likewise.
259         (tracepoint_breakpoint_hit): Likewise.
260         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
261
262 2017-10-26  Yao Qi  <yao.qi@linaro.org>
263
264         * breakpoint.c (breakpoint_location_address_match): Change
265         "struct address_space *" to "const address_space".
266         (breakpoint_location_address_range_overlap): Likewise.
267         (breakpoint_here_p): Likewise.
268         (breakpoint_in_range_p): Likewise.
269         (moribund_breakpoint_here_p): Likewise.
270         (bp_location_inserted_here_p): Likewise.
271         (software_breakpoint_inserted_here_p): Likewise.
272         (hardware_breakpoint_inserted_here_p): Likewise.
273         (hardware_watchpoint_inserted_in_range): Likewise.
274         (bpstat_check_location): Likewise.
275         (bpstat_stop_status): Likewise.
276         (breakpoint_address_match): Likewise.
277         (breakpoint_address_match_range): Likewise.
278         (breakpoint_location_address_match): Likewise.
279         (breakpoint_location_address_range_overlap): Likewise.
280         (insert_single_step_breakpoint): Likewise.
281         (breakpoint_has_location_inserted_here): Likewise.
282         (single_step_breakpoint_inserted_here_p): Likewise.
283         (pc_at_non_inline_function): Likewise.
284         * breakpoint.h (bpstat_stop_status): Update declaration.
285         (breakpoint_here_p): Likewise.
286         (breakpoint_in_range_p): Likewise.
287         (moribund_breakpoint_here_p): Likewise.
288         (breakpoint_inserted_here_p): Likewise.
289         (software_breakpoint_inserted_here_p): Likewise.
290         (hardware_breakpoint_inserted_here_p): Likewise.
291         (breakpoint_has_location_inserted_here): Likewise.
292         (single_step_breakpoint_inserted_here_p): Likewise.
293         (hardware_watchpoint_inserted_in_range): Likewise.
294         (breakpoint_address_match): Likewise.
295         (insert_single_step_breakpoint): Likewise.
296         (pc_at_non_inline_function): Likewise.
297         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
298         * record.c (record_check_stopped_by_breakpoint): Likewise.
299         * record.h (record_check_stopped_by_breakpoint): Likewise.
300         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
301
302 2017-10-25  Yao Qi  <yao.qi@linaro.org>
303
304         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
305         regcache->arch () instead get_regcache_arch.
306         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
307         Likewise.
308         (aarch64_fbsd_store_inferior_registers): Likewise.
309         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
310         (store_gregs_to_thread): Likewise.
311         (fetch_fpregs_from_thread): Likewise.
312         (store_fpregs_to_thread): Likewise.
313         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
314         (aarch64_store_return_value): Likewise.
315         (aarch64_software_single_step): Likewise.
316         * aix-thread.c (aix_thread_wait): Likewise.
317         (supply_reg32): Likewise.
318         (supply_sprs64): Likewise.
319         (supply_sprs32): Likewise.
320         (fill_gprs64): Likewise.
321         (fill_gprs32): Likewise.
322         (fill_sprs64): Likewise.
323         (fill_sprs32): Likewise.
324         (store_regs_user_thread): Likewise.
325         (store_regs_kernel_thread): Likewise.
326         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
327         (alphabsd_store_inferior_registers): Likewise.
328         * alpha-tdep.c (alpha_extract_return_value): Likewise.
329         (alpha_store_return_value): Likewise.
330         (alpha_deal_with_atomic_sequence): Likewise.
331         (alpha_next_pc): Likewise.
332         (alpha_software_single_step): Likewise.
333         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
334         (amd64bsd_store_inferior_registers): Likewise.
335         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
336         Likewise.
337         (amd64_linux_store_inferior_registers): Likewise.
338         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
339         (amd64_collect_native_gregset): Likewise.
340         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
341         (amd64obsd_collect_uthread): Likewise.
342         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
343         (amd64_collect_fpregset): Likewise.
344         (amd64_supply_fxsave): Likewise.
345         (amd64_supply_xsave): Likewise.
346         (amd64_collect_fxsave): Likewise.
347         (amd64_collect_xsave): Likewise.
348         * arc-tdep.c (arc_write_pc): Likewise.
349         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
350         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
351         (arm_fbsd_store_inferior_registers): Likewise.
352         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
353         (store_vfp_regs): Likewise.
354         (arm_linux_fetch_inferior_registers): Likewise.
355         (arm_linux_store_inferior_registers): Likewise.
356         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
357         (arm_linux_sigreturn_next_pc): Likewise.
358         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
359         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
360         (fetch_register): Likewise.
361         (store_register): Likewise.
362         * arm-tdep.c (arm_is_thumb): Likewise.
363         (displaced_in_arm_mode): Likewise.
364         (bx_write_pc): Likewise.
365         (arm_get_next_pcs_addr_bits_remove): Likewise.
366         (arm_software_single_step): Likewise.
367         (arm_extract_return_value): Likewise.
368         (arm_store_return_value): Likewise.
369         (arm_write_pc): Likewise.
370         * bfin-tdep.c (bfin_extract_return_value): Likewise.
371         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
372         (bsd_uthread_store_registers): Likewise.
373         * core-regset.c (fetch_core_registers): Likewise.
374         * corelow.c (get_core_registers): Likewise.
375         * cris-tdep.c (cris_store_return_value): Likewise.
376         (cris_extract_return_value): Likewise.
377         (find_step_target): Likewise.
378         (find_step_target): Likewise.
379         (cris_software_single_step): Likewise.
380         * ctf.c (ctf_fetch_registers): Likewise.
381         * darwin-nat.c (cancel_breakpoint): Likewise.
382         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
383         * frv-tdep.c (frv_extract_return_value): Likewise.
384         * ft32-tdep.c (ft32_store_return_value): Likewise.
385         (ft32_extract_return_value): Likewise.
386         * go32-nat.c (fetch_register): Likewise.
387         (go32_fetch_registers): Likewise.
388         (go32_store_registers): Likewise.
389         (store_register): Likewise.
390         * h8300-tdep.c (h8300_extract_return_value): Likewise.
391         (h8300_store_return_value): Likewise.
392         * hppa-linux-nat.c (fetch_register): Likewise.
393         (store_register): Likewise.
394         (hppa_linux_fetch_inferior_registers): Likewise.
395         (hppa_linux_store_inferior_registers): Likewise.
396         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
397         (i386_darwin_store_inferior_registers): Likewise.
398         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
399         (gnu_store_registers): Likewise.
400         * i386-linux-nat.c (fetch_register): Likewise.
401         (store_register): Likewise.
402         (supply_gregset): Likewise.
403         (fill_gregset): Likewise.
404         (i386_linux_fetch_inferior_registers): Likewise.
405         (i386_linux_store_inferior_registers): Likewise.
406         (i386_linux_resume): Likewise.
407         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
408         Likewise.
409         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
410         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
411         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
412         (i386obsd_collect_uthread): Likewise.
413         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
414         (i386_supply_gregset): Likewise.
415         (i386_collect_gregset): Likewise.
416         (i386_supply_fpregset): Likewise.
417         (i386_collect_fpregset): Likewise.
418         (i386_mpx_bd_base): Likewise.
419         * i386-v4-nat.c (supply_fpregset): Likewise.
420         (fill_fpregset): Likewise.
421         * i387-tdep.c (i387_supply_fsave): Likewise.
422         (i387_collect_fsave): Likewise.
423         (i387_supply_fxsave): Likewise.
424         (i387_collect_fxsave): Likewise.
425         (i387_supply_xsave): Likewise.
426         (i387_collect_xsave): Likewise.
427         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
428         (ia64_linux_store_registers): Likewise.
429         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
430         (ia64_extract_return_value): Likewise.
431         (ia64_store_return_value): Likewise.
432         (find_func_descr): Likewise.
433         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
434         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
435         (inf_ptrace_store_registers): Likewise.
436         * infrun.c (use_displaced_stepping): Likewise.
437         (displaced_step_prepare_throw): Likewise.
438         (resume): Likewise.
439         (proceed): Likewise.
440         (do_target_wait): Likewise.
441         (adjust_pc_after_break): Likewise.
442         (handle_inferior_event_1): Likewise.
443         (handle_signal_stop): Likewise.
444         (save_infcall_suspend_state): Likewise.
445         (restore_infcall_suspend_state): Likewise.
446         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
447         * jit.c (jit_frame_prev_register): Likewise.
448         * linux-nat.c (save_stop_reason): Likewise.
449         (linux_nat_wait_1): Likewise.
450         (resume_stopped_resumed_lwps): Likewise.
451         * linux-record.c (record_linux_sockaddr): Likewise.
452         (record_linux_msghdr): Likewise.
453         (record_linux_system_call): Likewise.
454         * linux-tdep.c (linux_collect_thread_registers): Likewise.
455         * lm32-tdep.c (lm32_extract_return_value): Likewise.
456         (lm32_store_return_value): Likewise.
457         * m32c-tdep.c (m32c_read_flg): Likewise.
458         (m32c_pseudo_register_read): Likewise.
459         (m32c_pseudo_register_write): Likewise.
460         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
461         (m32r_linux_collect_gregset): Likewise.
462         * m32r-tdep.c (m32r_store_return_value): Likewise.
463         (m32r_extract_return_value): Likewise.
464         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
465         (m68kbsd_collect_fpregset): Likewise.
466         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
467         * m68k-linux-nat.c (fetch_register): Likewise.
468         (old_fetch_inferior_registers): Likewise.
469         (old_store_inferior_registers): Likewise.
470         (store_regs): Likewise.
471         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
472         (m68k_svr4_store_return_value): Likewise.
473         * m88k-tdep.c (m88k_store_arguments): Likewise.
474         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
475         (mi_cmd_data_write_register_values): Likewise.
476         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
477         (mips_fbsd_store_inferior_registers): Likewise.
478         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
479         (mips_fbsd_supply_gregs): Likewise.
480         (mips_fbsd_collect_fpregs): Likewise.
481         (mips_fbsd_collect_gregs): Likewise.
482         (mips_fbsd_supply_fpregset): Likewise.
483         (mips_fbsd_collect_fpregset): Likewise.
484         (mips_fbsd_supply_gregset): Likewise.
485         (mips_fbsd_collect_gregset): Likewise.
486         * mips-linux-nat.c (supply_gregset): Likewise.
487         (fill_gregset): Likewise.
488         (supply_fpregset): Likewise.
489         (fill_fpregset): Likewise.
490         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
491         (mips_fill_gregset): Likewise.
492         (mips_supply_fpregset): Likewise.
493         (mips_fill_fpregset): Likewise.
494         (mips64_supply_gregset): Likewise.
495         (micromips_linux_sigframe_validate): Likewise.
496         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
497         (mipsnbsd_fetch_inferior_registers): Likewise.
498         (mipsnbsd_store_inferior_registers): Likewise.
499         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
500         (mipsnbsd_supply_gregset): Likewise.
501         (mipsnbsd_iterate_over_regset_sections): Likewise.
502         (mipsnbsd_supply_reg): Likewise.
503         (mipsnbsd_supply_fpreg): Likewise.
504         * mips-tdep.c (mips_in_frame_stub): Likewise.
505         (mips_dummy_id): Likewise.
506         (is_octeon_bbit_op): Likewise.
507         (micromips_bc1_pc): Likewise.
508         (extended_mips16_next_pc): Likewise.
509         (mips16_next_pc): Likewise.
510         (deal_with_atomic_sequence): Likewise.
511         * moxie-tdep.c (moxie_process_readu): Likewise.
512         * nios2-tdep.c (nios2_get_next_pc): Likewise.
513         * nto-procfs.c (procfs_store_registers): Likewise.
514         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
515         (ppcfbsd_store_inferior_registers): Likewise.
516         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
517         (fetch_altivec_register): Likewise.
518         (get_spe_registers): Likewise.
519         (fetch_spe_register): Likewise.
520         (fetch_altivec_registers): Likewise.
521         (fetch_all_gp_regs): Likewise.
522         (fetch_all_fp_regs): Likewise.
523         (store_vsx_register): Likewise.
524         (store_altivec_register): Likewise.
525         (set_spe_registers): Likewise.
526         (store_spe_register): Likewise.
527         (store_altivec_registers): Likewise.
528         (store_all_gp_regs): Likewise.
529         (store_all_fp_regs): Likewise.
530         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
531         (ppc_linux_collect_gregset): Likewise.
532         (ppc_canonicalize_syscall): Likewise.
533         (ppc_linux_record_signal): Likewise.
534         (ppu2spu_prev_register): Likewise.
535         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
536         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
537         (ppcobsd_store_registers): Likewise.
538         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
539         Likewise.
540         (ppc_ravenscar_generic_store_registers): Likewise.
541         * procfs.c (procfs_fetch_registers): Likewise.
542         (procfs_store_registers): Likewise.
543         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
544         (ravenscar_store_registers): Likewise.
545         (ravenscar_prepare_to_store): Likewise.
546         * record-btrace.c (record_btrace_fetch_registers): Likewise.
547         * record-full.c (record_full_wait_1): Likewise.
548         (record_full_registers_change): Likewise.
549         (record_full_store_registers): Likewise.
550         (record_full_core_fetch_registers): Likewise.
551         (record_full_save): Likewise.
552         (record_full_goto_insn): Likewise.
553         * regcache.c (regcache_register_size): Likewise.
554         (get_regcache_arch): Remove.
555         (regcache_read_pc): Likewise.
556         * regcache.h (get_regcache_arch): Remove.
557         * remote-sim.c (gdbsim_fetch_register): Likewise.
558         (gdbsim_store_register): Likewise.
559         * remote.c (fetch_register_using_p): Likewise.
560         (send_g_packet): Likewise.
561         (remote_prepare_to_store): Likewise.
562         (store_registers_using_G): Likewise.
563         * reverse.c (save_bookmark_command): Likewise.
564         (goto_bookmark_command): Likewise.
565         * rs6000-aix-tdep.c (branch_dest): Likewise.
566         * rs6000-nat.c (rs6000_ptrace64): Likewise.
567         (fetch_register): Likewise.
568         * rs6000-tdep.c (ppc_supply_reg): Likewise.
569         (ppc_collect_reg): Likewise.
570         (ppc_collect_gregset): Likewise.
571         (ppc_collect_fpregset): Likewise.
572         (ppc_collect_vsxregset): Likewise.
573         (ppc_collect_vrregset): Likewise.
574         (ppc_displaced_step_hw_singlestep): Likewise.
575         (rs6000_pseudo_register_read): Likewise.
576         (rs6000_pseudo_register_write): Likewise.
577         * s390-linux-nat.c (supply_gregset): Likewise.
578         (fill_gregset): Likewise.
579         (s390_linux_fetch_inferior_registers): Likewise.
580         * s390-linux-tdep.c (s390_write_pc): Likewise.
581         (s390_software_single_step): Likewise.
582         (s390_all_but_pc_registers_record): Likewise.
583         (s390_linux_syscall_record): Likewise.
584         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
585         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
586         (shnbsd_store_inferior_registers): Likewise.
587         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
588         (sh_extract_return_value_fpu): Likewise.
589         (sh_store_return_value_nofpu): Likewise.
590         (sh_corefile_supply_regset): Likewise.
591         (sh_corefile_collect_regset): Likewise.
592         * sh64-tdep.c (sh64_extract_return_value): Likewise.
593         (sh64_store_return_value): Likewise.
594         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
595         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
596         (sparc_store_inferior_registers): Likewise.
597         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
598         (sparc_ravenscar_prepare_to_store): Likewise.
599         * sparc-tdep.c (sparc32_store_arguments): Likewise.
600         (sparc_analyze_control_transfer): Likewise.
601         (sparc_step_trap): Likewise.
602         (sparc_software_single_step): Likewise.
603         (sparc32_gdbarch_init): Likewise.
604         (sparc_supply_rwindow): Likewise.
605         (sparc_collect_rwindow): Likewise.
606         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
607         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
608         (sparc64nbsd_collect_gregset): Likewise.
609         (sparc64nbsd_supply_fpregset): Likewise.
610         (sparc64nbsd_collect_fpregset): Likewise.
611         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
612         (sparc64_supply_gregset): Likewise.
613         (sparc64_collect_gregset): Likewise.
614         (sparc64_supply_fpregset): Likewise.
615         (sparc64_collect_fpregset): Likewise.
616         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
617         * spu-tdep.c (spu_unwind_sp): Likewise.
618         (spu2ppu_prev_register): Likewise.
619         (spu_memory_remove_breakpoint): Likewise.
620         * stack.c (return_command): Likewise.
621         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
622         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
623         * tracefile.c (trace_save_ctf): Likewise.
624         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
625         (do_windows_store_inferior_registers): Likewise.
626         (windows_resume): Likewise.
627         * xtensa-linux-nat.c (fill_gregset): Likewise.
628         (supply_gregset_reg): Likewise.
629         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
630         (xtensa_register_read_masked): Likewise.
631         (xtensa_supply_gregset): Likewise.
632         (xtensa_extract_return_value): Likewise.
633         (xtensa_store_return_value): Likewise.
634
635 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
636
637         * doublest.c (floatformat_from_string): New function.
638         * doublest.h (floatformat_from_string): Add prototype.
639
640         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
641         (OP_FLOAT): ... this.
642         * expression.h: Do not include "doublest.h".
643         (union exp_element): Replace doubleconst and decfloatconst by
644         new element floatconst.
645         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
646         (ada_evaluate_subexp): Likewise.
647         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
648         OP_DOUBLE and OP_DECFLOAT.
649         * expprint.c (print_subexp_standard): Likewise.
650         (dump_subexp_body_standard): Likewise.
651         * breakpoint.c (watchpoint_exp_is_const): Likewise.
652
653         * parse.c: Include "dfp.h".
654         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
655         (write_exp_elt_floatcst): New function.
656         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
657         and OP_DECFLOAT.
658         (operator_check_standard): Likewise.
659         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
660         Return target format buffer instead of host DOUBLEST.
661         Use floatformat_from_string and decimal_from_string to parse
662         either binary or decimal floating-point types.
663         (parse_c_float): Remove.
664         * parser-defs.h: Do not include "doublest.h".
665         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
666         (write_exp_elt_floatcst): Add prototype.
667         (parse_float): Update prototype.
668         (parse_c_float): Remove.
669
670         * c-exp.y: Do not include "dfp.h".
671         (typed_val_float): Use byte buffer instead of DOUBLEST.
672         (typed_val_decfloat): Remove.
673         (DECFLOAT): Remove.
674         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
675         (parse_number): Update to new parse_float interface.
676         Parse suffixes and determine type before calling parse_float.
677         Handle decimal and binary FP types the same way.
678
679         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
680         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
681         (parse_number): Update to new parse_float interface.
682         Parse suffixes and determine type before calling parse_float.
683
684         * f-exp.y: Replace dval by typed_val_float.
685         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
686         (parse_number): Use parse_float instead of atof.
687
688         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
689         (parse_go_float): Remove.
690         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
691         (parse_number): Call parse_float instead of parse_go_float.
692         Parse suffixes and determine type before calling parse_float.
693
694         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
695         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
696         (parse_number): Update to new parse_float interface.
697         Parse suffixes and determine type before calling parse_float.
698
699         * m2-exp.y: Replace dval by byte buffer val.
700         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
701         (parse_number): Call parse_float instead of atof.
702
703         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
704         (lex_number): Call parse_float instead of strtod.
705         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
706         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
707         Use write_exp_elt_floatcst.
708         (unit_testing): Remove static variable.
709         (rust_type): Do not check unit_testing.
710         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
711
712         * ada-exp.y (type_float, type_double): Remove.
713         (typed_val_float): Use byte buffer instead of DOUBLEST.
714         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
715         * ada-lex.l (processReal): Use parse_float instead of sscanf.
716
717 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
718
719         * aarch64-tdep.h (enum aarch64_regnum): Remove.
720         * arch/aarch64.h: New file.
721
722 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
723
724         * dfp.h (decimal_from_string): Use const reference for argument.
725         * dfp.c (decimal_from_string): Likewise.
726
727 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
728
729         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
730         * sh64-tdep.c (sh64_do_fp_register): Likewise.
731         * mips-tdep.c (mips_print_fp_register): Likewise.
732
733 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
734
735         * common/format.h (enum argclass): Replace decfloat_arg by
736         dec32float_arg, dec64float_arg, and dec128float_arg.
737         * common/format.c (parse_format_string): Update to return
738         new decimal float argument classes.
739
740         * printcmd.c (printf_decfloat): Rename to ...
741         (printf_floating): ... this.  Add argclass argument, and use it
742         instead of parsing the format string again.  Add support for
743         binary floating-point values, using floatformat_to_string.
744         Convert value to the target format if it doesn't already match.
745         (ui_printf): Call printf_floating instead of printf_decfloat,
746         also for double_arg / long_double_arg.  Pass argclass.
747
748         * dfp.c (decimal_to_string): Add format string argument.
749         * dfp.h (decimal_to_string): Likewise.
750
751         * doublest.c (floatformat_to_string): Add format string argument.
752         * doublest.h (floatformat_to_string): Likewise.
753
754 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
755
756         * doublest.c (floatformat_precision): New routine.
757         (floatformat_to_string): Likewise.
758         * doublest.c (floatformat_to_string): Add prototype.
759
760         * printcmd.c (print_scalar_formatted): Only call print_floating
761         on floating-point types.
762         * valprint.c: Do not include "floatformat.h".
763         (generic_val_print_decfloat): Remove.
764         (generic_val_print): Call generic_val_print_float for both
765         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
766         (print_floating): Use floatformat_to_string.  Handle decimal float.
767         (print_decimal_floating): Remove, merge into floatformat_to_string.
768         * value.h (print_decimal_floating): Remove.
769
770         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
771
772 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
773
774         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
775
776 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
777
778         * memattr.h: Don't include vec.h.
779         (struct mem_attrib): Initialize fields.
780         <unknown>: New static method.
781         (struct mem_region): Add constructors, operator<, initialize
782         fields.
783         * memattr.c: Include algorithm.
784         (default_mem_attrib, unknown_mem_attrib): Remove.
785         (user_mem_region_list): New global.
786         (target_mem_region_list, mem_region_list): Change type to
787         std::vector<mem_region>.
788         (mem_use_target): Now a function.
789         (target_mem_regions_valid): Change type to bool.
790         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
791         (require_user_regions): Adjust.
792         (require_target_regions): Adjust.
793         (create_mem_region): Adjust.
794         (lookup_mem_region): Adjust.
795         (invalidate_target_mem_regions): Adjust.
796         (mem_clear): Rename to...
797         (user_mem_clear): ... this, and adjust.
798         (mem_command): Adjust.
799         (info_mem_command): Adjust.
800         (mem_enable, enable_mem_command, mem_disable,
801         disable_mem_command): Adjust.
802         (mem_delete): Adjust.
803         (delete_mem_command): Adjust.
804         * memory-map.h (parse_memory_map): Return an std::vector.
805         * memory-map.c (parse_memory_map): Likewise.
806         (struct memory_map_parsing_data): Add constructor.
807         <memory_map>: Point to std::vector.
808         (memory_map_start_memory): Adjust.
809         (memory_map_end_memory): Adjust.
810         (memory_map_end_property): Adjust.
811         (clear_result): Remove.
812         * remote.c (remote_memory_map): Return an std::vector.
813         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
814         Remove.
815         (target_debug_print_mem_region_vector): New.
816         * target-delegates.c: Regenerate.
817         * target.h (mem_region_vector): New typedef.
818         (to_memory_map): Return mem_region_vector.
819         (target_memory_map): Return an std::vector.
820         * target.c (target_memory_map): Return an std::vector.
821         (flash_erase_command): Adjust.
822
823 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
824
825         * memory-map.c (struct memory_map_parsing_data) <property_name>:
826         Change type to std::string.
827         (memory_map_start_property): Adjust.
828         (memory_map_end_property): Adjust.
829
830 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
831
832         * infrun.h: Include common/byte-vector.h.
833         (struct displaced_step_closure): New struct.
834         (struct buf_displaced_step_closure): New struct.
835         * infrun.c (displaced_step_closure::~displaced_step_closure):
836         Provide default implementation.
837         (displaced_step_clear): Deallocate step closure with delete.
838         * aarch64-tdep.c (displaced_step_closure): Rename to ...
839         (aarch64_displaced_step_closure): ... this, extend
840         displaced_step_closure.
841         (aarch64_displaced_step_data) <dsc>: Change type to
842         aarch64_displaced_step_closure.
843         (aarch64_displaced_step_copy_insn): Adjust to type change, use
844         unique_ptr.
845         (aarch64_displaced_step_fixup): Add cast for displaced step
846         closure.
847         * amd64-tdep.c (displaced_step_closure): Rename to ...
848         (amd64_displaced_step_closure): ... this, extend
849         displaced_step_closure.
850         <insn_buf>: Change type to std::vector<gdb_byte>.
851         <max_len>: Remove.
852         (fixup_riprel): Change type of DSC parameter, adjust to type
853         change of insn_buf.
854         (fixup_displaced_copy): Change type of DSC parameter.
855         (amd64_displaced_step_copy_insn): Instantiate
856         amd64_displaced_step_closure.
857         (amd64_displaced_step_fixup): Add cast for closure type, adjust
858         to type change of insn_buf.
859         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
860         parameter DSC.
861         (arm_linux_copy_svc): Likewise.
862         (cleanup_kernel_helper_return): Likewise.
863         (arm_catch_kernel_helper_return): Likewise.
864         (arm_linux_displaced_step_copy_insn): Instantiate
865         arm_displaced_step_closure.
866         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
867         (displaced_read_reg): Change type of parameter DSC.
868         (branch_write_pc): Likewise.
869         (load_write_pc): Likewise.
870         (alu_write_pc): Likewise.
871         (displaced_write_reg): Likewise.
872         (arm_copy_unmodified): Likewise.
873         (thumb_copy_unmodified_32bit): Likewise.
874         (thumb_copy_unmodified_16bit): Likewise.
875         (cleanup_preload): Likewise.
876         (install_preload): Likewise.
877         (arm_copy_preload): Likewise.
878         (thumb2_copy_preload): Likewise.
879         (install_preload_reg): Likewise.
880         (arm_copy_preload_reg): Likewise.
881         (cleanup_copro_load_store): Likewise.
882         (install_copro_load_store): Likewise.
883         (arm_copy_copro_load_store) Likewise.
884         (thumb2_copy_copro_load_store): Likewise.
885         (cleanup_branch): Likewise.
886         (install_b_bl_blx): Likewise.
887         (arm_copy_b_bl_blx): Likewise.
888         (thumb2_copy_b_bl_blx): Likewise.
889         (thumb_copy_b): Likewise.
890         (install_bx_blx_reg): Likewise.
891         (arm_copy_bx_blx_reg): Likewise.
892         (thumb_copy_bx_blx_reg): Likewise.
893         (cleanup_alu_imm): Likewise.
894         (arm_copy_alu_imm): Likewise.
895         (thumb2_copy_alu_imm): Likewise.
896         (cleanup_alu_reg): Likewise.
897         (install_alu_reg): Likewise.
898         (arm_copy_alu_reg): Likewise.
899         (thumb_copy_alu_reg): Likewise.
900         (cleanup_alu_shifted_reg): Likewise.
901         (install_alu_shifted_reg): Likewise.
902         (arm_copy_alu_shifted_reg): Likewise.
903         (cleanup_load): Likewise.
904         (cleanup_store): Likewise.
905         (arm_copy_extra_ld_st): Likewise.
906         (install_load_store): Likewise.
907         (thumb2_copy_load_literal): Likewise.
908         (thumb2_copy_load_reg_imm): Likewise.
909         (arm_copy_ldr_str_ldrb_strb): Likewise.
910         (cleanup_block_load_all): Likewise.
911         (cleanup_block_store_pc): Likewise.
912         (cleanup_block_load_pc): Likewise.
913         (arm_copy_block_xfer): Likewise.
914         (thumb2_copy_block_xfer): Likewise.
915         (cleanup_svc): Likewise.
916         (install_svc): Likewise.
917         (arm_copy_svc): Likewise.
918         (thumb_copy_svc): Likewise.
919         (arm_copy_undef): Likewise.
920         (thumb_32bit_copy_undef): Likewise.
921         (arm_copy_unpred): Likewise.
922         (arm_decode_misc_memhint_neon): Likewise.
923         (arm_decode_unconditional): Likewise.
924         (arm_decode_miscellaneous): Likewise.
925         (arm_decode_dp_misc): Likewise.
926         (arm_decode_ld_st_word_ubyte): Likewise.
927         (arm_decode_media): Likewise.
928         (arm_decode_b_bl_ldmstm): Likewise.
929         (arm_decode_ext_reg_ld_st): Likewise.
930         (thumb2_decode_dp_shift_reg): Likewise.
931         (thumb2_decode_ext_reg_ld_st): Likewise.
932         (arm_decode_svc_copro): Likewise.
933         (thumb2_decode_svc_copro): Likewise.
934         (install_pc_relative): Likewise.
935         (thumb_copy_pc_relative_16bit): Likewise.
936         (thumb_decode_pc_relative_16bit): Likewise.
937         (thumb_copy_pc_relative_32bit): Likewise.
938         (thumb_copy_16bit_ldr_literal): Likewise.
939         (thumb_copy_cbnz_cbz): Likewise.
940         (thumb2_copy_table_branch): Likewise.
941         (cleanup_pop_pc_16bit_all): Likewise.
942         (thumb_copy_pop_pc_16bit): Likewise.
943         (thumb_process_displaced_16bit_insn): Likewise.
944         (decode_thumb_32bit_ld_mem_hints): Likewise.
945         (thumb_process_displaced_32bit_insn): Likewise.
946         (thumb_process_displaced_insn): Likewise.
947         (arm_process_displaced_insn): Likewise.
948         (arm_displaced_init_closure): Likewise.
949         (arm_displaced_step_fixup): Add cast for closure.
950         * arm-tdep.h: Include infrun.h.
951         (displaced_step_closure): Rename to ...
952         (arm_displaced_step_closure): ... this, extend
953         displaced_step_closure.
954         <u::svc::copy_svc_os>: Change type of parameter DSC.
955         <cleanup>: Likewise.
956         (arm_process_displaced_insn): Likewise.
957         (arm_displaced_init_closure): Likewise.
958         (displaced_read_reg): Likewise.
959         (displaced_write_reg): Likewise.
960         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
961         Adjust.
962         * i386-tdep.h: Include infrun.h.
963         (i386_displaced_step_closure): New typedef.
964         * i386-tdep.c (i386_displaced_step_copy_insn): Use
965         i386_displaced_step_closure.
966         (i386_displaced_step_fixup): Adjust.
967         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
968         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
969         and unique_ptr.
970         (ppc_displaced_step_fixup): Adjust.
971         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
972         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
973         and unique_ptr.
974         (s390_displaced_step_fixup): Adjust.
975
976 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
977
978         * interps.h (interp_resume, interp_suspend, interp_set_temp):
979         Remove declarations.
980
981 2017-10-20  Tom Tromey  <tom@tromey.com>
982
983         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
984         std::vector.
985         (gdb_bfd_record_inclusion): Update.
986         (bfdp): Remove typedef.
987
988 2017-10-20  Tom Tromey  <tom@tromey.com>
989
990         * gdb_bfd.c (gdb_bfd_ref): Use new.
991         (struct gdb_bfd_data): Add constructor, destructor, and member
992         initializers.
993         (gdb_bfd_unref): Use delete.
994
995 2017-10-20  Tom Tromey  <tom@tromey.com>
996
997         * exec.c (exec_file_attach): Use new_bfd_ref.
998         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
999         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1000         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
1001         new_bfd_ref.
1002         * gdb_bfd.h (new_bfd_ref): New function.
1003
1004 2017-10-20  Pedro Alves  <palves@redhat.com>
1005
1006         * main.c (captured_command_loop): Add attribute noinline.
1007
1008 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
1009
1010         * interps.c (struct interp_factory): Add constructor.
1011         (interp_factory_p): Remove typedef.
1012         (DEF_VEC_P(interp_factory_p)): Remove.
1013         (interpreter_factories): Change type to std::vector.
1014         (interp_factory_register): Adjust.
1015         (interp_lookup): Adjust.
1016         (interpreter_completer): Adjust.
1017
1018 2017-10-19  Tom Tromey  <tom@tromey.com>
1019
1020         * break-catch-syscall.c (catch_syscall_completer): Use
1021         std::string, gdb::unique_xmalloc_ptr.
1022
1023 2017-10-19  Tom Tromey  <tom@tromey.com>
1024
1025         * infcall.c (call_function_by_hand_dummy): Use std::string.
1026
1027 2017-10-19  Tom Tromey  <tom@tromey.com>
1028
1029         * mi/mi-main.c (mi_cmd_execute): Update.
1030         * top.h (prepare_execute_command): Return scoped_value_mark.
1031         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
1032         Add move constructor.
1033         * top.c (prepare_execute_command): Return scoped_value_mark.
1034         (execute_command): Update.
1035
1036 2017-10-19  Pedro Alves  <palves@redhat.com>
1037
1038         * xml-support.c (xml_fetch_content_from_file): Check fread's
1039         return.
1040
1041 2017-10-19  Pedro Alves  <palves@redhat.com>
1042
1043         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
1044         async.
1045         (handle_error_fd): New function.
1046         (ser_base_async): Add/delete an event loop file handler for
1047         error_fd.
1048
1049 2017-10-19  Pedro Alves  <palves@redhat.com>
1050
1051         * xml-support.c (xml_fetch_content_from_file): Don't read in
1052         chunks.  Instead use fseek to determine the file's size, and read
1053         it in one go.
1054
1055 2017-11-18  Keith Seitz  <keiths@redhat.com>
1056
1057         * c-exp.y (oper): Canonicalize conversion operators of user-defined
1058         types.
1059         Add whitespace to front of type name.
1060
1061 2017-10-18  Keith Seitz  <keiths@redhat.com>
1062
1063         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
1064         DW_AT_accessibility.
1065
1066 2017-10-18  Yao Qi  <yao.qi@linaro.org>
1067
1068         * features/tic6x-c62x-linux.c: Remove.
1069
1070 2017-10-17  Tom Tromey  <tom@tromey.com>
1071
1072         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
1073         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
1074         (do_mixed_source_and_assembly): Likewise.
1075
1076 2017-10-17  Tom Tromey  <tom@tromey.com>
1077
1078         * regcache.c (regcache::xfer_part): Remove assertion.
1079
1080 2017-10-17  Pedro Alves  <palves@redhat.com>
1081
1082         * xml-support.c (xml_fetch_content_from_file): Call
1083         unique_ptr::release() instead unique_ptr::get() when passing
1084         through xrealloc.
1085
1086 2017-10-17  Yao Qi  <yao.qi@linaro.org>
1087
1088         * regcache.c (regcache::xfer_part): Remove parameters read and
1089         write, add parameter is_raw.  All callers are updated.
1090
1091 2017-10-16  Keith Seitz  <keiths@redhat.com>
1092
1093         * c-typeprint.c (enum access_specifier): Moved here from
1094         c_type_print_base.
1095         (output_access_specifier): New function.
1096         (c_type_print_base): Consider typedefs when assessing
1097         whether access labels are needed.
1098         Use output_access_specifier as needed.
1099         Output access specifier for typedefs, if needed.
1100         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
1101         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
1102         fields.
1103         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
1104         accessor macros.
1105
1106 2017-10-16  Tom Tromey  <tom@tromey.com>
1107
1108         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
1109         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
1110         * target.c (target_fileio_read_stralloc): Update.
1111         * sparc64-tdep.c (adi_is_addr_mapped): Update.
1112         * target.h (target_fileio_read_stralloc): Return
1113         unique_xmalloc_ptr.
1114
1115 2017-10-16  Tom Tromey  <tom@tromey.com>
1116
1117         * xml-syscall.c (xml_init_syscalls_info): Update.
1118         * xml-support.c (xinclude_start_include): Update.
1119         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
1120         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
1121         (xml_fetch_content_from_file): Likewise.
1122         * osdata.c (get_osdata): Update.
1123         * target.h (target_read_stralloc, target_get_osdata): Return
1124         unique_xmalloc_ptr.
1125         * solib-aix.c (solib_aix_get_library_list): Update.
1126         * solib-target.c (solib_target_current_sos): Update.
1127         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
1128         * xml-tdesc.c (fetch_available_features_from_target): Update.
1129         (target_fetch_description_xml): Update.
1130         (file_read_description_xml): Update.
1131         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
1132         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
1133         (remote_pid_to_exec_file): Update.
1134         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
1135         (target_get_osdata): Likewise.
1136
1137 2017-10-16  Tom Tromey  <tom@tromey.com>
1138
1139         * remote.c (remote_register_number_and_offset): Use std::vector.
1140         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
1141         (putpkt_binary): Use gdb::def_vector.
1142         (compare_sections_command): Use gdb::byte_vector.
1143
1144 2017-10-16  Tom Tromey  <tom@tromey.com>
1145
1146         * ppc-linux-nat.c (hwdebug_insert_point): Use
1147         gdb::unique_xmalloc_ptr, XDUP.
1148
1149 2017-10-16  Tom Tromey  <tom@tromey.com>
1150
1151         * probe.c (parse_probes): Use std::string.
1152         (info_probes_for_ops, enable_probes_command)
1153         (disable_probes_command): Remove cleanups.
1154
1155 2017-10-16  Tom Tromey  <tom@tromey.com>
1156
1157         * buildsym.c (block_compar): Remove.
1158         (end_symtab_get_static_block): Use std::vector.
1159
1160 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
1161
1162         * memrange.h (struct mem_range): Define operator< and operator==.
1163         (mem_range_s): Remove.
1164         (DEF_VEC_O (mem_range_s)): Remove.
1165         (normalize_mem_ranges): Change parameter type to std::vector.
1166         * memrange.c (compare_mem_ranges): Remove.
1167         (normalize_mem_ranges): Change parameter type to std::vector,
1168         adjust to vector change.
1169         * exec.c (section_table_available_memory): Return vector, remove
1170         parameter.
1171         (section_table_read_available_memory): Adjust to std::vector
1172         change.
1173         * remote.c (remote_read_bytes): Adjust to std::vector
1174         change.
1175         * tracepoint.h (traceframe_available_memory): Change parameter
1176         type to std::vector.
1177         * tracepoint.c (traceframe_available_memory): Change parameter
1178         type to std::vector, adjust.
1179         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
1180         std::vector change.
1181         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1182         unittests/memrange-selftests.c.
1183         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
1184         * gdb/unittests/memrange-selftests.c: New file.
1185
1186 2017-10-16  Pedro Alves  <palves@redhat.com>
1187
1188         * elfread.c (probe_key_free): Rename range-for variable.
1189         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
1190         (find_probe_by_pc, collect_probes): Rename range-for variable.
1191
1192 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1193
1194         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
1195         * features/tic6x-c62x.c: Remove.
1196         * features/tic6x-c64x-linux.c: Remove.
1197         * features/tic6x-c64x.c: Remove.
1198         * features/tic6x-c64xp-linux.c: Remove.
1199         * features/tic6x-c64xp.c: Remove.
1200         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
1201         initialize_tdesc_tic6x_*_linux functions.
1202         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
1203         initialize_tdesc_tic6x_* functions.
1204
1205 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1206
1207         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
1208         tic6x-c62x.
1209         * regformats/tic6x-c62x.dat: Remove.
1210         * regformats/tic6x-c64x.dat: Remove.
1211         * regformats/tic6x-c64xp.dat: Remove.
1212
1213 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
1214
1215         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
1216         (the !HAVE_LIBEXPAT version).
1217
1218 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1219
1220         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
1221         const.
1222
1223 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1224
1225         * target.h: Include tracepoint.h.
1226         (enum trace_find_type): Move to tracepoint.h.
1227         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
1228         * tracepoint.h: Don't include target.h
1229         (enum trace_find_type): Move from target.h.
1230         (parse_traceframe_info): Return a unique ptr.
1231         * tracepoint.c (current_traceframe_info): Change type to unique
1232         ptr.
1233         (free_traceframe_info): Remove.
1234         (clear_traceframe_info): Don't manually free
1235         current_traceframe_info.
1236         (free_result): Remove.
1237         (parse_traceframe_info): Return a unique ptr.
1238         (get_traceframe_info): Adjust to unique ptr.
1239         * ctf.c (ctf_traceframe_info): Return a unique ptr.
1240         * remote.c (remote_traceframe_info): Return a unique ptr.
1241         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
1242         ptr.
1243         * target-debug.h (target_debug_print_traceframe_info_up): New
1244         macro.
1245         * target-delegates.c: Regenerate.
1246
1247 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1248
1249         * memrange.h (struct mem_range): Add constructors.
1250         * tracepoint.h (struct traceframe_info) <memory>: Change type to
1251         std::vector<mem_range>.
1252         * tracepoint.c (free_traceframe_info): Don't manually free
1253         vector.
1254         (traceframe_info_start_memory): Adjust to vector change.
1255         (traceframe_available_memory): Likewise.
1256         * tracefile-tfile.c (build_traceframe_info): Likewise.
1257         * ctf.c (ctf_traceframe_info): Likewise.
1258
1259 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1260
1261         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
1262         std::vector<int>.
1263         * tracepoint.c (free_traceframe_info): Deallocate with delete.
1264         (traceframe_info_start_tvar): Adjust to vector change.
1265         (parse_traceframe_info): Allocate with new.
1266         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
1267         vector change.
1268         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
1269         change.
1270         tfile_traceframe_info): Allocate with new.
1271         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
1272         change.
1273
1274 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1275
1276         * tracepoint.c (traceframe_info): Rename to...
1277         (current_traceframe_info): ...this.
1278         (clear_traceframe_info): Adjust.
1279         (get_traceframe_info): Adjust.
1280
1281 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1282
1283         * nat/linux-osdata.c: Include algorithm.
1284         (compare_processes): Remove.
1285         (struct pid_pgid_entry): New struct.
1286         (linux_xfer_osdata_processgroups): Use std::vector instead of
1287         XNEWVEC.
1288
1289 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1290
1291         * objfiles.h: Don't include symfile.h.
1292         (struct partial_symbol): Remove forward-declaration.
1293         (struct objfile) <global_psymbols, static_psymbols>: Change type
1294         to std::vector<partial_symbol *>.
1295         * objfiles.c (objfile::objfile): Don't memset those fields.
1296         (objfile::~objfile): Don't free those fields.
1297         * psympriv.h (struct psymbol_allocation_list): Remove
1298         forward-declaration.
1299         (add_psymbol_to_list): Change psymbol_allocation_list parameter
1300         to std::vector.
1301         (start_psymtab_common): Change parameters to std::vector.
1302         * psymtab.c: Include algorithm.
1303         (require_partial_symbols): Call shrink_to_fit.
1304         (find_pc_sect_psymbol): Adjust to vector change.
1305         (match_partial_symbol): Likewise.
1306         (lookup_partial_symbol): Likewise.
1307         (psym_relocate): Likewise.
1308         (dump_psymtab): Likewise.
1309         (recursively_search_psymtabs): Likewise.
1310         (compare_psymbols): Remove.
1311         (sort_pst_symbols): Adjust to vector change.
1312         (start_psymtab_common): Likewise.
1313         (end_psymtab_common): Likewise.
1314         (psymbol_bcache_full): De-constify return value.
1315         (add_psymbol_to_bcache): Likewise.
1316         (extend_psymbol_list): Remove.
1317         (append_psymbol_to_list): Adjust to vector change.
1318         (add_psymbol_to_list): Likewise.
1319         (init_psymbol_list): Likewise.
1320         (maintenance_info_psymtabs): Likewise.
1321         (maintenance_check_psymtabs): Likewise.
1322         * symfile.h (struct psymbol_allocation_list): Remove.
1323         * symfile.c (reread_symbols): Adjust to vector change.
1324         * dbxread.c (start_psymtab): Change type of parameters.
1325         (dbx_symfile_read): Adjust to vector change.
1326         (read_dbx_symtab): Likewise.
1327         (start_psymtab): Change type of parameters.
1328         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
1329         (create_partial_symtab): Likewise.
1330         (add_partial_symbol): Likewise.
1331         (write_one_signatured_type): Likewise.
1332         (recursively_write_psymbols): Likewise.
1333         * mdebugread.c (parse_partial_symbols): Likewise.
1334         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
1335         (scan_xcoff_symtab): Adjust to vector change.
1336         (xcoff_initial_scan): Likewise.
1337
1338 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
1339
1340         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
1341
1342 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1343
1344         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
1345         Remove s390x-*-expedite, add s390x-expedite.
1346
1347 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1348
1349         * features/s390-gs-linux64.c: Regenerated.
1350         * features/s390x-gs-linux64.c: Regenerated.
1351
1352 2017-10-13  Tom Tromey  <tom@tromey.com>
1353
1354         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1355         * solib.c (update_solib_list, reload_shared_libraries_1): Use
1356         delete.
1357         * symfile.c (symbol_file_add_with_addrs): Use new.
1358         (symbol_file_add_separate): Update comment.
1359         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
1360         * jit.c (jit_object_close_impl): Use new.
1361         (jit_unregister_code): Use delete.
1362         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
1363         (~objfile): Rename from free_objfile.
1364         (free_objfile_separate_debug, do_free_objfile_cleanup)
1365         (free_all_objfiles, objfile_purge_solibs): Use delete.
1366         * objfiles.h (struct objfile): Add constructor and destructor.
1367         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
1368         (allocate_objfile, free_objfile): Don't declare.
1369         (struct objstats): Add initializers.
1370
1371 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1372
1373         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
1374         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
1375         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
1376         * gdbarch.h: Regenerate.
1377         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1378         Adjust comment.
1379         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
1380         (i386_displaced_step_fixup): Adjust comment.
1381         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
1382
1383 2017-10-12  Tom Tromey  <tom@tromey.com>
1384
1385         * prologue-value.h (pv_area::store_would_trash): Return bool.
1386         (pv_area::find_reg): Likewise.
1387         * prologue-value.c (pv_area::store_would_trash): Return bool.
1388         (pv_area::find_reg): Likewise.
1389
1390 2017-10-12  Tom Tromey  <tom@tromey.com>
1391
1392         * s390-linux-tdep.c (s390_store, s390_load)
1393         (s390_check_for_saved, s390_analyze_prologue): Update.
1394         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
1395         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
1396         * prologue-value.h (class pv_area): Move from prologue-value.c.
1397         Change names of members.  Add constructor, destructor, member
1398         functions.
1399         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
1400         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
1401         (pv_area_fetch, pv_area_scan): Don't declare.
1402         * prologue-value.c (struct pv_area::area_entry): Now member of
1403         pv_area.
1404         (struct pv_area): Move to prologue-value.h.
1405         (pv_area::pv_area): Rename from make_pv_area.
1406         (pv_area::~pv_area): Rename from free_pv_area.
1407         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
1408         (clear_entries, find_entry, overlaps, store_would_trash, store)
1409         (fetch, find_reg, scan): Now member of pv_area.
1410         Remove "area" argument.  Update.
1411         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
1412         Update.
1413         * mn10300-tdep.c (push_reg, check_for_saved)
1414         (mn10300_analyze_prologue): Update.
1415         * mep-tdep.c (is_arg_spill, check_for_saved)
1416         (mep_analyze_prologue): Update.
1417         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
1418         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
1419         (m32c_is_struct_return, m32c_analyze_prologue): Update.
1420         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
1421         Update.
1422         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
1423         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
1424
1425 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1426
1427         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
1428         * linux-nat.c (linux_nat_delete_thread): New variable.
1429         (lwp_free): Invoke linux_nat_delete_thread if set.
1430         (linux_nat_set_delete_thread): New function.
1431         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
1432         thread delete callback.
1433         * arm-linux-nat.c (arm_linux_delete_thread): New function.
1434         (_initialize_arm_linux_nat): Assign thread delete callback.
1435         * s390-linux-nat.c (s390_delete_thread): New function.
1436         (_initialize_s390_nat): Assign thread delete callback.
1437         * x86-linux-nat.c (x86_linux_add_target): Likewise.
1438         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
1439         function.
1440         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
1441         declaration.
1442         * nat/x86-linux.c (x86_linux_delete_thread): New function.
1443         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
1444
1445 2017-10-09  Tom Tromey  <tom@tromey.com>
1446
1447         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
1448         std::string.
1449         * tui/tui-layout.c (enum tui_status): Use std::string.
1450
1451 2017-10-11  Tom Tromey  <tom@tromey.com>
1452
1453         * gdbthread.h (thread_command): Constify.
1454         * inferior.h (detach_command): Constify.
1455         * top.h (set_history, show_history): Constify.
1456         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
1457         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
1458         * bsd-kvm.c (bsd_kvm_cmd): Constify.
1459         * printcmd.c (set_command): Constify.
1460         (non_const_set_command): New function.
1461         * dcache.c (set_dcache_command, show_dcache_command): Constify.
1462         * breakpoint.c (enable_command, disable_command, delete_command)
1463         (catch_command, tcatch_command, set_breakpoint_cmd)
1464         (show_breakpoint_cmd): Constify.
1465         * macrocmd.c (macro_command): Constify.
1466         * infcmd.c (unset_command, kill_command, detach_command)
1467         (info_proc_cmd): Constify.
1468         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
1469         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
1470         (info_auto_load_cmd): Constify.
1471         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
1472         (unset_tdesc_cmd): Constify.
1473         * ada-lang.c (set_ada_command, show_ada_command)
1474         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
1475         * guile/guile.c (set_guile_command, show_guile_command)
1476         (info_guile_command): Constify.
1477         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
1478         Constify.
1479         * skip.c (skip_command): Constify.
1480         * compile/compile.c (_initialize_compile): Constify.
1481         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
1482         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
1483         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
1484         (maint_btrace_pt_show_cmd): Constify.
1485         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
1486         Constify.
1487         * python/python.c (user_show_python, user_set_python): Constify.
1488         * mips-tdep.c (set_mips_command, show_mips_command)
1489         (set_mipsfpu_command): Constify.
1490         * record-btrace.c (cmd_record_btrace_start)
1491         (cmd_set_record_btrace, cmd_show_record_btrace)
1492         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
1493         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
1494         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
1495         Constify.
1496         * symfile.c (overlay_command): Constify.
1497         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
1498         * cli/cli-logging.c (set_logging_command, show_logging_command):
1499         Constify.
1500         * cli/cli-dump.c (dump_command, append_command)
1501         (srec_dump_command, ihex_dump_command, verilog_dump_command)
1502         (tekhex_dump_command, binary_dump_command)
1503         (binary_append_command): Constify.
1504         * cli/cli-decode.c (struct cmd_list_element): Change type of
1505         "fun".
1506         * cli/cli-cmds.c (info_command, show_command, set_debug)
1507         (show_debug): Constify.
1508         (show_command): Add non-const overload.
1509         * top.c (set_history, show_history): Constify.
1510         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
1511         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
1512         * target.c (target_command): Constify.
1513         * sparc64-tdep.c (info_adi_command): Constify.
1514         * record-full.c (cmd_record_full_start): Constify.
1515         (set_record_full_command): Constify.  Fix typo.
1516         (show_record_full_command): Constify.
1517         * thread.c (thread_command, thread_apply_command): Constify.
1518         * memattr.c (dummy_cmd): Constify.
1519         * value.c (function_command): Constify.
1520         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
1521         * probe.c (info_probes_command): Constify.
1522         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
1523         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
1524         (show_thread_cmd, set_thread_default_cmd)
1525         (show_thread_default_cmd): Constify.
1526         (check_empty): Constify.
1527         * tracepoint.c (tfind_command): Constify.
1528         * cp-support.c (maint_cplus_command): Constify.
1529         * windows-tdep.c (info_w32_command): Constify.
1530         * record.c (cmd_record_start, set_record_command)
1531         (show_record_command, info_record_command, cmd_record_goto):
1532         Constify.
1533         * ravenscar-thread.c (set_ravenscar_command)
1534         (show_ravenscar_command): Constify.
1535         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
1536         Constify.
1537         (add_internal_problem_command): Remove casts.
1538         * arc-tdep.c (maintenance_print_arc_command): Constify.
1539         * valprint.c (set_print, show_print, set_print_raw)
1540         (show_print_raw): Constify.
1541         * maint.c (maintenance_command, maintenance_info_command)
1542         (maintenance_print_command, maintenance_set_cmd)
1543         (maintenance_show_cmd, set_per_command_cmd)
1544         (show_per_command_cmd, maintenance_check_command): Constify.
1545         * language.c (set_check, show_check): Constify.
1546         * typeprint.c (show_print_type, set_print_type): Constify.
1547         * go32-nat.c (go32_info_dos_command): Constify.
1548
1549 2017-10-11  Tom Tromey  <tom@tromey.com>
1550
1551         * breakpoint.c (prepare_re_set_context): Remove.
1552         (breakpoint_re_set_one): Update.  Don't use cleanups.
1553         (breakpoint_re_set): Use scoped_restore, std::string, and
1554         scoped_restore_current_language.
1555
1556 2017-10-11  Tom Tromey  <tom@tromey.com>
1557
1558         * breakpoint.c (commands_command_1): Use std::string.
1559         (cleanup_executing_breakpoints): Remove.
1560         (bpstat_do_actions_1): Use scoped_restore.
1561         (bpstat_check_watchpoint): Use std::string.
1562         (decode_static_tracepoint_spec): Likewise.
1563         (break_range_command): Likewise.
1564         (watch_command_1): Likewise.
1565         (compare_breakpoints): Change argument types.
1566         (clear_command): Use std::vector.
1567         (cleanup_executing_breakpoints): Remove.
1568         (update_global_location_list): Use unique_xmalloc_ptr.
1569         (strace_command): Remove unused declaration.
1570
1571 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
1572
1573         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
1574         * NEWS: Mention new FreeBSD/arm native configuration.
1575         * configure.host: Add arm*-*-freebsd*.
1576         * configure.nat: Likewise.
1577         * arm-fbsd-nat.c: New file.
1578
1579 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
1580
1581         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
1582         (ALLDEPFILES): Add arm-fbsd-tdep.c.
1583         * NEWS: Mention new FreeBSD/arm target.
1584         * configure.tgt: Add arm*-*-freebsd*.
1585         * arm-fbsd-tdep.c: New file.
1586         * arm-fbsd-tdep.h: New file.
1587
1588 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
1589
1590         * linux-tdep.c (linux_make_corefile_notes): Remove call to
1591         `gdbarch_elfcore_write_linux_prpsinfo'.
1592         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
1593         method.
1594         (elf_internal_linux_prpsinfo): Remove declaration.
1595         * gdbarch.h: Regenerate.
1596         * gdbarch.c: Regenerate.
1597
1598 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
1599
1600         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
1601         `set_gdbarch_elfcore_write_linux_prpsinfo'.
1602
1603 2017-10-11  Pedro Alves  <palves@redhat.com>
1604
1605         * breakpoint.c (reattach_breakpoints): Delete.
1606         * breakpoint.h (reattach_breakpoints): Delete.
1607
1608 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
1609
1610         * symfile.c (registered_sym_fns): Make struct, not typedef.
1611         (DEF_VEC_O (registered_sym_fns)): Remove.
1612         (symtab_fns): Change type to std::vector.
1613         (add_symtab_fns): Adjust.
1614         (find_sym_fns): Adjust.
1615
1616 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
1617
1618         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
1619         * arc-tdep.h (arc_arch_is_em): New function.
1620         (arc_arch_is_hs): Likewise.
1621
1622 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
1623
1624         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
1625         parentheses in the declaration.
1626         (macro_lookup_inclusion): Likewise.
1627         (macro_lookup_definition): Likewise.
1628         * p-lang.h (pascal_builtin_types): Likewise.
1629         * tui/tui-data.c (tui_win_list): Likewise.
1630         * tui/tui-data.h (tui_win_list): Likewise.
1631         * utils.h (make_cleanup_free_section_addr_info): Likewise.
1632
1633 2017-10-11  Mark Rages  <markrages@gmail.com>
1634
1635         * target-memory.c (block_boundaries): Fix for block address not
1636         aligned on block size.
1637
1638 2017-10-10  Pedro Alves <palves@redhat.com>
1639             Tom Tromey  <tom@tromey.com>
1640
1641         * breakpoint.c (struct captured_breakpoint_query_args)
1642         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
1643         (print_breakpoint): New.
1644         * breakpoint.h (print_breakpoint): Declare.
1645         * common/common-exceptions.h (enum return_reason): Remove
1646         references to catch_exceptions.
1647         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
1648         Delete.
1649         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
1650         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
1651         * gdb.h: Delete.
1652         * gdbthread.h (thread_select): Declare.
1653         * mi/mi-cmd-break.c: Don't include gdb.h.
1654         (breakpoint_notify): Use print_breakpoint.
1655         * mi/mi-cmd-catch.c: Don't include gdb.h.
1656         * mi/mi-interp.c: Don't include gdb.h.
1657         (mi_print_breakpoint_for_event): New.
1658         (mi_breakpoint_created, mi_breakpoint_modified): Use
1659         mi_print_breakpoint_for_event.
1660         * mi/mi-main.c: Don't include gdb.h.
1661         (mi_cmd_thread_select): Parse the global thread ID here.  Use
1662         thread_select instead of gdb_thread_select.
1663         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
1664         of using gdb_list_thread_ids.
1665         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
1666         FILEIO_ENOSYS here.
1667         (remote_fileio_request): Use TRY/CATCH instead of
1668         catch_exceptions.
1669         * symfile-mem.c (struct symbol_file_add_from_memory_args)
1670         (symbol_file_add_from_memory_wrapper): Delete.
1671         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
1672         * thread.c: Don't include gdb.h.
1673         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
1674         (thread_alive): Use thread_select.
1675         (do_captured_thread_select): Delete, parts salvaged as ...
1676         (thread_select): ... this new function.
1677         (gdb_thread_select): Delete.
1678
1679 2017-10-10  Pedro Alves  <palves@redhat.com>
1680             Tom Tromey  <tom@tromey.com>
1681
1682         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
1683         and reverse logic.
1684         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
1685         No longer macros.  Instead ...
1686         (enum wp_check_result): They're now values of this new
1687         enumeration.
1688         (watchpoint_check): Change return type to wp_check_result and
1689         parameter type to bpstat.
1690         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
1691         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
1692         catch_errors.  Reverse logic of watchpoint_check call.
1693         (breakpoint_re_set_one): Now returns void and takes a breakpoint
1694         pointer as parameter.
1695         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
1696         * common/common-exceptions.c (throw_exception_sjlj): Update
1697         comments to avoid mentioning catch_errors.
1698         * exceptions.c (catch_errors): Delete.
1699         * exceptions.h: Update comments to avoid mentioning catch_errors.
1700         (catch_errors_ftype, catch_errors): Delete.
1701         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
1702         (hook_stop_stub): Delete.
1703         (restore_selected_frame): Change return type to void, and
1704         parameter type to const frame_id &.
1705         (restore_infcall_control_state): Use TRY/CATCH instead of
1706         catch_errors.
1707         * main.c (captured_command_loop): Return void and remove
1708         parameter.  Remove references to catch_errors.
1709         (captured_main): Use TRY/CATCH instead of catch_errors.
1710         * objc-lang.c (objc_submethod_helper_data)
1711         (find_objc_msgcall_submethod_helper): Delete.
1712         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
1713         catch_errors.
1714         * record-full.c (record_full_message): Return void.
1715         (record_full_message_args, record_full_message_wrapper): Delete.
1716         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
1717         instead of catch_errors.
1718         * solib-aix.c (solib_aix_open_symbol_file_object): Change
1719         parameter type to int.
1720         * solib-darwin.c (open_symbol_file_object): Ditto.
1721         * solib-dsbt.c (open_symbol_file_object): Ditto.
1722         * solib-frv.c (open_symbol_file_object): Ditto.
1723         * solib-svr4.c (open_symbol_file_object): Ditto.
1724         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
1725         * solib.c (update_solib_list): Use TRY/CATCH instead of
1726         catch_errors.
1727         * solist.h (struct target_so_ops) <open_symbol_file_object>:
1728         Change type.
1729         * symmisc.c (struct print_symbol_args): Remove.
1730         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
1731         (print_symbol): Change type.
1732         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
1733         and remove parameters.
1734         (catch_errors): New.
1735         (get_windows_debug_event): Adjust.
1736
1737 2017-10-09  Tom Tromey  <tom@tromey.com>
1738
1739         * mi/mi-main.c (free_splay_tree): Remove.
1740         (list_available_thread_groups): Use splay_tree_up.
1741         * common/gdb_splay_tree.h: New file.
1742
1743 2017-10-09  Tom Tromey  <tom@tromey.com>
1744
1745         * mi/mi-main.c (do_nothing): Remove.
1746         (list_available_thread_groups): Update.
1747
1748 2017-10-09  Pedro Alves  <palves@redhat.com>
1749
1750         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
1751         reading registers when switching context.
1752
1753 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
1754
1755         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
1756         (fbsd_convert_siginfo): Likewise.
1757         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
1758
1759 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
1760
1761         * configure.ac (try_guile_versions): Remove guile-2.2.
1762         * configure: Regenerate.
1763
1764 2017-10-09  Tom Tromey  <tom@tromey.com>
1765
1766         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
1767         (COMPILE.pre): Use $(CXX).
1768
1769 2017-10-09  Pedro Alves  <palves@redhat.com>
1770
1771         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
1772         Use bool.
1773         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1774         * cp-support.h (cp_remove_params): Now returns a
1775         gdb::unique_xmalloc_ptr.
1776         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
1777         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
1778         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
1779         returning a gdb::unique_xmalloc_ptr.
1780         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1781         * stack.c (find_frame_funname): Adjust to cp_remove_params
1782         returning a gdb::unique_xmalloc_ptr.
1783
1784 2017-10-08  Tom Tromey  <tom@tromey.com>
1785
1786         * dwarf2read.c (dwarf2_get_dwz_file): Use
1787         gdb::unique_xmalloc_ptr.
1788         (find_slot_in_mapped_hash): Likewise.
1789         (dwarf2_physname): Likewise.
1790         (create_dwo_unit_in_dwp_v1): Use std::string.
1791         (create_dwo_unit_in_dwp_v2): Likewise.
1792         (lookup_dwo_cutu): Likewise.
1793         (inherit_abstract_dies): Use std::vector.
1794         (read_array_type): Likewise.
1795         (dwarf_decode_macros): Remove unused declaration.
1796         (unsigned_int_compar): Remove.
1797         (dwarf2_build_psymtabs_hard): Use scoped_restore.
1798         (psymtabs_addrmap_cleanup): Remove.
1799
1800 2017-10-08  Tom Tromey  <tom@tromey.com>
1801
1802         * frame-unwind.c (frame_unwind_try_unwinder): Update.
1803         * frame.h (frame_cleanup_after_sniffer): Declare.
1804         (frame_prepare_for_sniffer): Return void.
1805         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
1806         type of argument.
1807         (frame_prepare_for_sniffer): Return void.
1808
1809 2017-10-08  Tom Tromey  <tom@tromey.com>
1810
1811         * utils.h (make_cleanup_value_free): Remove.
1812         * utils.c (do_value_free, struct cleanup): Remove.
1813         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
1814         Use gdb_value_up.
1815         * value.h (struct value_deleter): New.
1816         (gdb_value_up): New typedef.
1817
1818 2017-10-08  Tom Tromey  <tom@tromey.com>
1819
1820         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
1821         (make_cleanup_free_search_symbols): Remove.
1822         (search_symbols): Return std::vector.
1823         (symbol_search::compare_search_syms): Now member of
1824         symbol_search.  Change arguments.
1825         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
1826         (symtab_symbol_info, rbreak_command): Update.
1827         * symtab.h (struct symbol_search) <next>: Remove.
1828         Add constructors.
1829         (symbol_search::operator<): New function.
1830         (symbol_search::operator==): New function.
1831         (search_symbols): Remove std::vector.
1832         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
1833         (symbol_search::compare_search_syms): Declare.
1834
1835 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1836
1837         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
1838         arch/aarch64-insn.o.
1839         Remove one rule.
1840         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
1841
1842 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1843
1844         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
1845         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
1846         arch/arm-linux.o respectively.
1847         * configure.tgt: Likewise.
1848
1849 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1850
1851         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
1852         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
1853
1854 2017-10-06  Pedro Alves  <palves@redhat.com>
1855
1856         * windows-nat.c: Include <algorithm>.
1857
1858 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1859
1860         * configure.tgt (i386_tobjs): New variable.
1861         (amd64_tobjs): New variable.
1862         Set $cpu_obs and $os_obs.
1863
1864 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1865
1866         * Makefile.in (CONFIG_SRC_SUBDIR): New.
1867         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
1868         (clean): Remove object files and dependency files.
1869         (distclean): Remove the directory.
1870         * configure.ac: Invoke AC_CONFIG_COMMANDS.
1871         * configure: Re-generated.
1872         * configure.tgt: Replace amd64.o with arch/amd64.o.
1873
1874 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
1875
1876         PR build/22188
1877         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
1878         and SETEND.
1879
1880 2017-10-05  Pedro Alves  <palves@redhat.com>
1881
1882         * linux-nat.c (linux_child_follow_fork): When following the parent
1883         and detaching the child, consult the parent thread's architecture
1884         instead of the child's.
1885
1886 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
1887
1888         * ax.h: Do not include "doublest.h".
1889         (union agent_val): Remove.
1890
1891 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
1892
1893         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
1894         (decimal_to_string): Return std::string object.
1895         (decimal_from_string): Accept std::string object.  Return bool.
1896         (decimal_from_integral, decimal_from_doublest): Remove.
1897         (decimal_from_longest): Add prototype.
1898         (decimal_from_ulongest): Likewise.
1899         (decimal_to_longest): Likewise.
1900         (decimal_from_doublest): Likewise.
1901         * dfp.c: Do not include "gdbtypes.h" or "value.h".
1902         (MAX_DECIMAL_STRING): Move here.
1903         (decimal_to_string): Return std::string object.
1904         (decimal_from_string): Accept std::string object.  Return bool.
1905         (decimal_from_integral): Remove, replace by ...
1906         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
1907         (decimal_to_longest): New function.
1908         (decimal_from_floating): Remove, replace by ...
1909         (decimal_from_doublest): ... this new function.
1910         (decimal_to_doublest): Update to new decimal_to_string interface.
1911
1912         * value.c (unpack_long): Use decimal_to_longest.
1913         * valops.c (value_cast): Use decimal_from_doublest instead of
1914         decimal_from_floating.  Use decimal_from_[u]longest isntead of
1915         decimal_from_integral.
1916         * valarith.c (value_args_as_decimal): Likewise.
1917         * valprint.c (print_decimal_floating): Update to new
1918         decimal_to_string interface.
1919         * printcmd.c (printf_decfloat): Likewise.
1920         * c-exp.y (parse_number): Update to new decimal_from_string interface.
1921
1922 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
1923
1924         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
1925         * gdbtypes.c: Include "floatformat.h".
1926         * value.c: Likewise.
1927         * m68k-tdep.c: Likewise.
1928
1929         * findvar.c: Do not include "floatformat.h".
1930         * amd64-darwin-tdep.c: Likewise.
1931         * arm-linux-tdep.c: Likewise.
1932         * i386-darwin-tdep.c: Likewise.
1933         * i387-tdep.c: Likewise.
1934         * m68k-linux-tdep.c: Likewise.
1935         * mep-tdep.c: Likewise.
1936         * mips-tdep.c: Likewise.
1937         * nios2-tdep.c: Likewise.
1938         * s390-linux-tdep.c: Likewise.
1939         * sparc-obsd-tdep.c: Likewise.
1940         * sparc-tdep.c: Likewise.
1941         * sparc64-tdep.c: Likewise.
1942         * spu-tdep.c: Likewise.
1943         * tic6x-tdep.c: Likewise.
1944         * tilegx-tdep.c: Likewise.
1945         * vax-tdep.c: Likewise.
1946         * xstormy16-tdep.c: Likewise.
1947         * xtensa-tdep.c: Likewise.
1948
1949         * top.c: Do not include "doublest.h".
1950         * aarch64-tdep.c: Likewise.
1951         * alpha-tdep.c: Likewise.
1952         * arm-linux-tdep.c: Likewise.
1953         * m68k-linux-tdep.c: Likewise.
1954         * tilegx-tdep.c: Likewise.
1955         * xstormy16-tdep.c: Likewise.
1956
1957 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
1958
1959         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
1960         (mipsn32_fbsd_sigframe): Define.
1961         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
1962         for FreeBSD/mipsn32.
1963
1964 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
1965
1966         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
1967         AT_HWCAP.
1968
1969 2017-10-05  Tristan Gingold  <tgingold@free.fr>
1970
1971         * MAINTAINERS (Misc): Update my email address.
1972
1973 2017-10-04  Pedro Alves  <palves@redhat.com>
1974
1975         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
1976         it instead of target_gdbarch.
1977         (get_remote_state, get_remote_packet_size): Adjust
1978         get_remote_arch_state calls, passing down target_gdbarch
1979         explicitly.
1980         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
1981         'gdbarch' and use it instead of target_gdbarch.
1982         (get_memory_packet_size): Adjust get_remote_arch_state calls,
1983         passing down target_gdbarch explicitly.
1984         (struct stop_reply) <arch>: New field.
1985         (remote_parse_stop_reply): Use the stopped thread's architecture,
1986         not the current inferior's.  Save the architecture in the
1987         stop_reply.
1988         (process_stop_reply): Use the stop reply's architecture.
1989         (process_g_packet, remote_fetch_registers)
1990         (remote_prepare_to_store, store_registers_using_G)
1991         (remote_store_registers): Adjust get_remote_arch_state calls,
1992         using the regcache's architecture.
1993         (remote_get_trace_status): Adjust get_remote_arch_state calls,
1994         passing down target_gdbarch explicitly.
1995         * spu-multiarch.c (spu_thread_architecture): Defer to the target
1996         beneath instead of calling target_gdbarch.
1997         * target.c (default_thread_architecture): Use the specified
1998         inferior's architecture, instead of the current inferior's
1999         architecture (via target_gdbarch).
2000
2001 2017-10-04  Pedro Alves  <palves@redhat.com>
2002
2003         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
2004         case.
2005         (regcache_print): Handle !target_has_registers here instead.
2006
2007 2017-10-04  Pedro Alves  <palves@redhat.com>
2008
2009         * frame.c (create_test_frame): Delete.
2010         * frame.h (create_test_frame): Delete.
2011         * gdbarch-selftests.c: Include gdbthread.h and target.h.
2012         (class regcache_test): Delete.
2013         (test_target_has_registers, test_target_has_stack)
2014         (test_target_has_memory, test_target_prepare_to_store)
2015         (test_target_store_registers): New functions.
2016         (test_target_ops): New class.
2017         (register_to_value_test): Error out if there's already a
2018         process_stratum (or higher) target pushed.  Create a fuller mock
2019         environment, with mock target_ops, inferior, address space, thread
2020         and inferior_ptid.
2021         * progspace.c (struct address_space): Move to ...
2022         * progspace.h (struct address_space): ... here.
2023         * regcache.h (regcache::~regcache, regcache::raw_write)
2024         [GDB_SELF_TEST]: No longer virtual.
2025
2026 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
2027
2028         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
2029
2030 2017-10-04  Pedro Alves  <palves@redhat.com>
2031
2032         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
2033         out of 'between TRY and CATCH'.
2034
2035 2017-10-04  Pedro Alves  <palves@redhat.com>
2036
2037         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
2038         * common/common-exceptions.h (TRY): Open an outermost scope.
2039         Expand intro comment.
2040         (CATCH): Reindent.
2041         (END_CATCH): Close the outermost scope.
2042         * completer.c (complete_line_internal): Add missing END_CATCH.
2043
2044 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2045
2046         * NEWS (Changes since GDB 8.0): Add entry about new
2047         'set-cwd-on-gdbserver' feature.
2048         (New remote packets): Add entry for QSetWorkingDir.
2049         * common/common-inferior.h (set_inferior_cwd): New prototype.
2050         * infcmd.c (set_inferior_cwd): Remove "static".
2051         (show_cwd_command): Expand text to include remote debugging.
2052         * remote.c: Add PACKET_QSetWorkingDir.
2053         (remote_protocol_features) <QSetWorkingDir>: New entry for
2054         PACKET_QSetWorkingDir.
2055         (extended_remote_set_inferior_cwd): New function.
2056         (extended_remote_create_inferior): Call
2057         "extended_remote_set_inferior_cwd".
2058         (_initialize_remote): Call "add_packet_config_cmd" for
2059         QSetWorkingDir.
2060
2061 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2062
2063         * NEWS (New commands): Mention "set/show cwd".
2064         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
2065         "cd" command's help text.
2066         * common/common-inferior.h (get_inferior_cwd): New prototype.
2067         * infcmd.c (inferior_cwd_scratch): New global variable.
2068         (set_inferior_cwd): New function.
2069         (get_inferior_cwd): Likewise.
2070         (set_cwd_command): Likewise.
2071         (show_cwd_command): Likewise.
2072         (_initialize_infcmd): Add "set/show cwd" commands.
2073         * inferior.h (class inferior) <cwd>: New field.
2074         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
2075         (fork_inferior): Change inferior's cwd before its execution.
2076         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
2077         to CreateProcess.
2078
2079 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2080
2081         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
2082         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
2083         (COMMON_OBS): Add gdb_tilde_expand.o.
2084         * common/gdb_tilde_expand.c: New file.
2085         * common/gdb_tilde_expand.h: Likewise.
2086
2087 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
2088
2089         * gdbarch.sh (objfile): Remove duplicate declaration.
2090         * gdbarch.h: Regenerate.
2091
2092 2017-10-03  Tom Tromey  <tom@tromey.com>
2093
2094         * utils.c (internal_vproblem): Use string_vprintf.
2095
2096 2017-10-03  Tom Tromey  <tom@tromey.com>
2097
2098         * printcmd.c (info_symbol_command): Use std::string.
2099
2100 2017-10-03  Tom Tromey  <tom@tromey.com>
2101
2102         * top.c (gdb_safe_append_history): Use std::string.
2103
2104 2017-10-03  Tom Tromey  <tom@tromey.com>
2105
2106         * event-top.c (stdin_event_handler): Update.
2107         * main.c (captured_main_1): Update.
2108         * top.h (make_delete_ui_cleanup): Remove.
2109         (struct ui): Add constructor and destructor.
2110         (new_ui, delete_ui): Remove.
2111         * top.c (make_delete_ui_cleanup): Remove.
2112         (new_ui_command): Use std::unique_ptr.
2113         (delete_ui_cleanup): Remove.
2114         (ui::ui): Rename from new_ui.  Update.
2115         (free_ui): Remove.
2116         (ui::~ui): Rename from delete_ui.  Update.
2117
2118 2017-10-03  Tom Tromey  <tom@tromey.com>
2119
2120         * symfile.c (load_progress): Use gdb::byte_vector.
2121
2122 2017-10-03  Tom Tromey  <tom@tromey.com>
2123
2124         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
2125         declaration.
2126         * printcmd.c (x_command): Remove unused declaration.
2127         * symfile.c (symbol_file_command): Remove unused declaration.
2128
2129 2017-10-03  Tom Tromey  <tom@tromey.com>
2130
2131         * utils.c (internal_vproblem): Use std::string.
2132         (defaulted_query): Likewise.
2133
2134 2017-10-03  Tom Tromey  <tom@tromey.com>
2135
2136         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
2137         * top.c (execute_command_to_string): Update.
2138         * utils.c (make_cleanup_restore_page_info): Remove.
2139         (do_restore_page_info_cleanup): Remove.
2140         (set_batch_flag_and_restore_page_info):
2141         New.
2142         (make_cleanup_restore_page_info): Remove.
2143         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2144         (~set_batch_flag_and_restore_page_info): New
2145         (make_cleanup_restore_uinteger): Remove.
2146         (make_cleanup_restore_integer): Remove.
2147         (struct restore_integer_closure): Remove.
2148         (restore_integer): Remove.
2149         * utils.h (struct set_batch_flag_and_restore_page_info): New
2150         class.
2151         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2152         (make_cleanup_restore_page_info): Remove.
2153         (make_cleanup_restore_uinteger) Remove.
2154         (make_cleanup_restore_integer) Remove.
2155
2156 2017-10-03  Tom Tromey  <tom@tromey.com>
2157
2158         * record-full.h (record_full_gdb_operation_disable_set): Return
2159         scoped_restore_tmpl<int>.
2160         * infrun.c (adjust_pc_after_break): Update.
2161         (handle_signal_stop): Update.
2162         * record-full.c (record_full_gdb_operation_disable_set): Return
2163         scoped_restore_tmpl<int>.
2164         (record_full_wait_1, record_full_insert_breakpoint)
2165         (record_full_remove_breakpoint, record_full_save)
2166         (record_full_goto_insn): Update.
2167
2168 2017-10-02  Tom Tromey  <tom@tromey.com>
2169
2170         PR rust/22236:
2171         * rust-lang.c (rust_val_print_str): New function.
2172         (val_print_struct): Call it.
2173         (rust_subscript): Preserve name of slice type.
2174
2175 2017-10-02  Tom Tromey  <tom@tromey.com>
2176
2177         * rust-lang.c (rust_subscript): Handle slices in
2178         EVAL_AVOID_SIDE_EFFECTS case.
2179
2180 2017-10-02  Tom Tromey  <tom@tromey.com>
2181
2182         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
2183
2184 2017-10-02  Tom Tromey  <tom@tromey.com>
2185
2186         * rust-lang.h (rust_slice_type): Add "extern".
2187
2188 2017-10-02  Tom Tromey  <tom@tromey.com>
2189             Pedro Alves  <palves@redhat.com>
2190
2191         * ada-lang.h (ada_exc_info::operator<): Make const.
2192         (ada_exc_info::operator==): Make const.
2193         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
2194         Make const.
2195
2196 2017-09-29  Tom Tromey  <tom@tromey.com>
2197
2198         * target.c (read_whatever_is_readable): Change type of "result".
2199         Update.
2200         (free_memory_read_result_vector): Remove.
2201         (read_memory_robust): Change return type.  Update.
2202         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
2203         bin2hex, std::string.
2204         * target.h (memory_read_result_s): Remove typedef.
2205         (free_memory_read_result_vector): Remove.
2206         (read_memory_robust): Return std::vector.
2207
2208 2017-09-29  Tom Tromey  <tom@tromey.com>
2209
2210         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
2211
2212 2017-09-29  Tom Tromey  <tom@tromey.com>
2213
2214         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
2215         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
2216         operator< and operator==.
2217         (ada_exceptions_list): Return a std::vector.
2218         * ada-lang.c (ada_exc_info::operator<): Rename from
2219         compare_ada_exception_info.
2220         (ada_exc_info::operator==): New.
2221         (sort_remove_dups_ada_exceptions_list): Change type of
2222         "exceptions".
2223         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
2224         (ada_add_global_exceptions): Likewise.
2225         (ada_exceptions_list_1): Return a std::vector.
2226         (ada_exceptions_list): Likewise.
2227
2228 2017-09-29  Tom Tromey  <tom@tromey.com>
2229
2230         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
2231         'std::set *'.
2232         (print_one_inferior): Update.
2233         (free_vector_of_ints): Remove.
2234         (list_available_thread_groups): Change "ids" to std::set.
2235         (mi_cmd_list_thread_groups): Update.
2236         (struct collect_cores_data) <core>: Now a std::set.
2237         (collect_cores): Update.
2238         (unique): Remove.
2239         (print_one_inferior): Update.
2240
2241 2017-09-29  Tom Tromey  <tom@tromey.com>
2242
2243         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
2244         (mi_execute_async_cli_command): Likewise.
2245         (mi_cmd_trace_frame_collected): Use field_fmt.
2246
2247 2017-09-29  Tom Tromey  <tom@tromey.com>
2248
2249         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
2250         gdb::byte_vector.
2251
2252 2017-09-29  Tom Tromey  <tom@tromey.com>
2253
2254         * mi/mi-parse.c (mi_parse): Remove unused declaration.
2255
2256 2017-09-29  Tom Tromey  <tom@tromey.com>
2257
2258         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
2259
2260 2017-09-29  Tom Tromey  <tom@tromey.com>
2261
2262         * varobj.h (varobj_gen_name): Return std::string.
2263         * varobj.c (varobj_gen_name): Return std::string.
2264         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
2265         (mi_cmd_var_delete): Don't copy "name".
2266
2267 2017-09-29  Tom Tromey  <tom@tromey.com>
2268
2269         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
2270         (mi_cmd_break_insert_1): Update.
2271
2272 2017-09-29  Tom Tromey  <tom@tromey.com>
2273
2274         * target.h (make_scoped_defer_target_commit_resume): Update.
2275         * target.c (make_scoped_defer_target_commit_resume): Rename from
2276         make_cleanup_defer_target_commit_resume.  Return a
2277         scoped_restore.
2278         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
2279
2280 2017-09-29  Tom Tromey  <tom@tromey.com>
2281
2282         * main.c (captured_main_1): Remove unused declaration.
2283         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
2284
2285 2017-09-29  Tom Tromey  <tom@tromey.com>
2286
2287         * symtab.c (search_symbols): Remove unused outer cleanup.
2288         (make_source_files_completion_list): Remove unused declaration.
2289
2290 2017-09-29  Tom Tromey  <tom@tromey.com>
2291
2292         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
2293
2294 2017-09-29  Tom Tromey  <tom@tromey.com>
2295
2296         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
2297         gdb::byte_vector.
2298
2299 2017-09-29  Tom Tromey  <tom@tromey.com>
2300
2301         * complaints.c (vcomplaint): Use std::string.
2302
2303 2017-09-29  Tom Tromey  <tom@tromey.com>
2304
2305         * tracepoint.c (trace_variable_command): Use std::string.
2306         (encode_actions_1): Remove unused declarations.
2307         (create_tsv_from_upload): Use std::string.
2308
2309 2017-09-29  Tom Tromey  <tom@tromey.com>
2310
2311         * cp-support.c (gdb_demangle): Use std::string.
2312
2313 2017-09-29  Tom Tromey  <tom@tromey.com>
2314
2315         * stack.c (parse_frame_specification): Use std::string
2316         (info_frame_command): Use gdb::unique_xmalloc_ptr.
2317
2318 2017-09-29  Tom Tromey  <tom@tromey.com>
2319
2320         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
2321
2322 2017-09-29  Tom Tromey  <tom@tromey.com>
2323
2324         * utils.c (vfprintf_maybe_filtered): Use std::string.
2325         (vfprintf_unfiltered): Likewise.
2326
2327 2017-09-29  Tom Tromey  <tom@tromey.com>
2328
2329         * event-top.c (top_level_prompt): Return std::string.
2330         (display_gdb_prompt): Update.
2331
2332 2017-09-29  Tom Tromey  <tom@tromey.com>
2333
2334         * unittests/common-utils-selftests.c (format): New function.
2335         (string_vprintf_tests): New function.
2336         (_initialize_common_utils_selftests): Register new tests.
2337         * common/common-utils.c (string_vprintf): New function.
2338         * common/common-utils.h (string_vprintf): Declare.
2339
2340 2017-09-29  Pedro Alves  <palves@redhat.com>
2341
2342         * common/rsp-low.c (unpack_varlen_hex): Constify.
2343         * common/rsp-low.h (unpack_varlen_hex): Constify.
2344         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
2345         Constify.
2346         * remote.c (remote_set_permissions, read_ptid)
2347         (remote_current_thread, remote_get_threads_with_qthreadinfo)
2348         (remote_static_tracepoint_marker_at)
2349         (remote_static_tracepoint_markers_by_strid)
2350         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
2351         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
2352         (parse_tracepoint_definition, parse_tsv_definition)
2353         (parse_static_tracepoint_marker_definition): Constify.
2354         * tracepoint.h (parse_static_tracepoint_marker_definition)
2355         (parse_trace_status, parse_tracepoint_status)
2356         (parse_tracepoint_definition, parse_tsv_definition): Constify.
2357
2358 2017-09-29  Pedro Alves  <palves@redhat.com>
2359
2360         * remote.c (target_buf, target_buf_size): Delete.
2361         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
2362         Use the connection's packet buffer instead.
2363         All callers adjusted.
2364         (_initialize_remote): Remove references to target_buf and
2365         target_buf_size.
2366
2367 2017-09-28  Pedro Alves  <palves@redhat.com>
2368
2369         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2370         unittests/common-utils-selftests.c.
2371         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
2372         (COMMON_OBS): Remove utils-selftests.o.
2373         * utils-selftests.c: Move to ...
2374         * unittests/common-utils-selftests.c: ... here and rename self
2375         test to "string_printf".
2376
2377 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
2378
2379         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
2380         having NULL cus or tus.
2381
2382 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2383
2384         * arm-tdep.c: (convert_from_extended): Remove.
2385         (convert_to_extended): Likewise.
2386         (arm_extract_return_value): Use convert_typed_floating.
2387         (arm_store_return_value): Likewise.
2388
2389         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2390         * sh-tdep.c: Do not include "floatformat.h".
2391         (sh_littlebyte_bigword_type): New function.
2392         (sh_register_convert_to_virtual): Use convert_typed_floating.
2393         (sh_register_convert_to_raw): Likewise.
2394         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2395         (sh64_littlebyte_bigword_type): New function.
2396         (sh64_extract_return_value): Use convert_typed_floating.
2397         (sh64_register_convert_to_virtual): Likewise.
2398         (sh64_register_convert_to_raw): Likewise.
2399
2400 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2401
2402         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
2403         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
2404
2405         * gdbtypes.h (union type_specific): Make field floatformat hold
2406         just a single struct floatformat, not an array.
2407         (floatformat_from_type): Move here.
2408         * gdbtypes.c (floatformat_from_type): Move here.  Update to
2409         changed TYPE_FLOATFORMAT definition.
2410         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
2411         (recursive_dump_type): Likewise.
2412         (init_float_type): Install correct floatformat for byte order.
2413         (arch_float_type): Likewise.
2414
2415 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2416
2417         * gdbtypes.c (init_type): Change incoming argument from
2418         length-in-bytes to length-in-bits.  Assert length is a
2419         multiple of TARGET_CHAR_BITS.
2420         (arch_type, arch_flags_type): Likewise.
2421         (init_integer_type): Update call to init_type.
2422         (init_character_type): Likewise.
2423         (init_boolean_type): Likewise.
2424         (init_float_type): Likewise.
2425         (init_decfloat_type): Likewise.
2426         (init_complex_type): Likewise.
2427         (init_pointer_type): Likewise.
2428         (objfile_type): Likewise.
2429         (arch_integer_type): Update call to arch_type.
2430         (arch_character_type): Likewise.
2431         (arch_boolean_type): Likewise.
2432         (arch_float_type): Likewise.
2433         (arch_decfloat_type): Likewise.
2434         (arch_complex_type): Likewise.
2435         (arch_pointer_type): Likewise.
2436         (gdbtypes_post_init): Likewise.
2437
2438         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
2439         (read_base_type): Likewise.
2440         * mdebugread.c (basic_type): Likewise.
2441         * stabsread.c (dbx_init_float_type): Likewise.
2442         (rs6000_builtin_type): Likewise.
2443         (read_range_type): Likewise.  Also, fix call to init_integer_type
2444         with erroneous length argument.
2445
2446         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
2447         * d-lang.c (build_d_types): Likewise.
2448         * f-lang.c (build_fortran_types): Likewise.
2449         * go-lang.c (build_go_types): Likewise.
2450         * opencl-lang.c (build_opencl_types): Likewise.
2451         * jit.c (finalize_symtab): Likewise.
2452         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2453         (build_std_type_info_type): Likewise.
2454         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
2455         update call to arch_flags_type.
2456
2457         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
2458         arch_type.
2459         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
2460         * windows-tdep.c (windows_get_tlb_type): Likewise.
2461
2462         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
2463         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
2464         * m32c-tdep.c (make_types): Likewise.
2465         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
2466         (rl78_psw_type): Update call to arch_flags_type.
2467         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
2468         * rx-tdep.c (rx_psw_type): Likewise.
2469         (rx_fpsw_type): Likewise.
2470         * sparc-tdep.c (sparc_psr_type): Likewise.
2471         (sparc_fsr_type): Likewise.
2472         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
2473         (sparc64_ccr_type): Likewise.
2474         (sparc64_fsr_type): Likewise.
2475         (sparc64_fprs_type): Likewise.
2476
2477 2017-09-27  Tom Tromey  <tom@tromey.com>
2478
2479         * findcmd.c (find_command): Constify.
2480
2481 2017-09-27  Tom Tromey  <tom@tromey.com>
2482
2483         * ada-tasks.c (task_command_1, task_command): Constify.
2484
2485 2017-09-27  Tom Tromey  <tom@tromey.com>
2486
2487         * symtab.c (maintenance_print_symbol_cache)
2488         (maintenance_flush_symbol_cache)
2489         (maintenance_print_symbol_cache_statistics): Constify.
2490
2491 2017-09-27  Tom Tromey  <tom@tromey.com>
2492
2493         * inferior.c (detach_inferior_command, kill_inferior_command)
2494         (inferior_command): Constify.
2495
2496 2017-09-27  Tom Tromey  <tom@tromey.com>
2497
2498         * regcache.c (regcache_print, maintenance_print_registers)
2499         (maintenance_print_raw_registers)
2500         (maintenance_print_cooked_registers)
2501         (maintenance_print_register_groups)
2502         (maintenance_print_remote_registers): Constify.
2503
2504 2017-09-27  Tom Tromey  <tom@tromey.com>
2505
2506         * printcmd.c (map_display_numbers, undisplay_command)
2507         (enable_disable_display_command, enable_display_command)
2508         (disable_display_command): Constify.
2509
2510 2017-09-27  Tom Tromey  <tom@tromey.com>
2511
2512         * breakpoint.h (delete_command): Don't declare.
2513         * breakpoint.c (delete_command, enable_once_command)
2514         (enable_count_command, enable_delete_command, breakpoint_1)
2515         (maintenance_info_breakpoints, stopin_command, stopat_command)
2516         (delete_command, delete_trace_command, save_breakpoints)
2517         (save_breakpoints_command, save_tracepoints_command): Constify.
2518
2519 2017-09-27  Tom Tromey  <tom@tromey.com>
2520
2521         * macrocmd.c (macro_expand_command, macro_expand_once_command)
2522         (skip_ws, extract_identifier, macro_define_command)
2523         (macro_undef_command, macro_list_command): Constify.
2524
2525 2017-09-27  Tom Tromey  <tom@tromey.com>
2526
2527         * infcmd.c (environment_info, set_environment_command)
2528         (unset_environment_command, path_info, info_proc_cmd_1)
2529         (info_proc_cmd_mappings, info_proc_cmd_stat)
2530         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
2531         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
2532
2533 2017-09-27  Tom Tromey  <tom@tromey.com>
2534
2535         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
2536         Constify.
2537
2538 2017-09-27  Tom Tromey  <tom@tromey.com>
2539
2540         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
2541
2542 2017-09-27  Tom Tromey  <tom@tromey.com>
2543
2544         * demangle.c (demangle_command): Constify.
2545
2546 2017-09-27  Tom Tromey  <tom@tromey.com>
2547
2548         * progspace.c (maintenance_info_program_spaces_command):
2549         Constify.
2550
2551 2017-09-27  Tom Tromey  <tom@tromey.com>
2552
2553         * compile/compile.c (check_raw_argument, compile_file_command)
2554         (compile_code_command, compile_print_command): Constify.
2555
2556 2017-09-27  Tom Tromey  <tom@tromey.com>
2557
2558         * reggroups.c (maintenance_print_reggroups): Constify.
2559
2560 2017-09-27  Tom Tromey  <tom@tromey.com>
2561
2562         * dwarf2read.c (save_gdb_index_command): Constify.
2563
2564 2017-09-27  Tom Tromey  <tom@tromey.com>
2565
2566         * stap-probe.c (info_probes_stap_command): Constify.
2567
2568 2017-09-27  Tom Tromey  <tom@tromey.com>
2569
2570         * fork-child.c (unset_exec_wrapper_command): Constify.
2571
2572 2017-09-27  Tom Tromey  <tom@tromey.com>
2573
2574         * btrace.c (get_uint, get_context_size, no_chunk)
2575         (maint_btrace_packet_history_cmd)
2576         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
2577         (maint_info_btrace_cmd): Constify.
2578
2579 2017-09-27  Tom Tromey  <tom@tromey.com>
2580
2581         * reverse.c (delete_bookmark_command): Constify.
2582
2583 2017-09-27  Tom Tromey  <tom@tromey.com>
2584
2585         * remote.c (set_memory_packet_size)
2586         (set_memory_write_packet_size, show_memory_write_packet_size)
2587         (set_memory_read_packet_size, show_memory_read_packet_size)
2588         (compare_sections_command, packet_command, remote_put_command)
2589         (remote_get_command, remote_delete_command): Constify.
2590
2591 2017-09-27  Tom Tromey  <tom@tromey.com>
2592
2593         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
2594         (set_mipsfpu_double_command, set_mipsfpu_none_command)
2595         (set_mipsfpu_auto_command): Constify.
2596
2597 2017-09-27  Tom Tromey  <tom@tromey.com>
2598
2599         * cli/cli-cmds.h (cd_command): Constify.
2600         * cli/cli-cmds.c (cd_command): Constify.
2601
2602 2017-09-27  Tom Tromey  <tom@tromey.com>
2603
2604         * thread.c (thread_name_command, thread_find_command): Constify.
2605
2606 2017-09-27  Tom Tromey  <tom@tromey.com>
2607
2608         * probe.c (enable_probes_command, disable_probes_command):
2609         Constify.
2610
2611 2017-09-27  Tom Tromey  <tom@tromey.com>
2612
2613         * symfile.c (symbol_file_command): Constify.
2614         * gdbcore.h (deprecated_file_changed_hook): Constify.
2615         * exec.c (deprecated_file_changed_hook, exec_file_command)
2616         (file_command): Constify.
2617         * defs.h (symbol_file_command): Constify.
2618
2619 2017-09-27  Tom Tromey  <tom@tromey.com>
2620
2621         * remote-fileio.c (set_system_call_allowed)
2622         (show_system_call_allowed): Constify.
2623
2624 2017-09-27  Tom Tromey  <tom@tromey.com>
2625
2626         * tracepoint.c (delete_trace_variable_command)
2627         (tfind_end_command, tfind_start_command, tfind_pc_command)
2628         (tfind_tracepoint_command, tfind_line_command)
2629         (tfind_range_command, tfind_outside_command): Constify.
2630
2631 2017-09-27  Tom Tromey  <tom@tromey.com>
2632
2633         * ax-gdb.c (maint_agent_printf_command, agent_command)
2634         (agent_eval_command): Constify.
2635
2636 2017-09-27  Tom Tromey  <tom@tromey.com>
2637
2638         * tracepoint.c (info_scope_command): Constify.
2639         * python/python.c (gdbpy_decode_line): Constify.
2640         * python/py-breakpoint.c (bppy_init): Constify.
2641         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
2642         * location.h: (new_linespec_location)
2643         (string_to_event_location_basic, string_to_event_location):
2644         Constify.
2645         * location.c (new_linespec_location)
2646         (string_to_event_location_basic, string_to_event_location):
2647         Constify.
2648         * linespec.h (decode_line_with_current_source)
2649         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
2650         * linespec.c (linespec_lex_to_end)
2651         (decode_line_with_current_source)
2652         (decode_line_with_last_displayed): Constify.
2653         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
2654         Constify.
2655         * cli/cli-cmds.c (edit_command, list_command): Constify.
2656         * breakpoint.h (until_break_command, watch_command_wrapper)
2657         (awatch_command_wrapper, rwatch_command_wrapper)
2658         (init_ada_exception_breakpoint): Constify.
2659         * breakpoint.c (break_command_1, dprintf_command)
2660         (break_range_command, watch_command_wrapper)
2661         (rwatch_command_wrapper, awatch_command_wrapper)
2662         (until_break_command, init_ada_exception_breakpoint)
2663         (strace_marker_create_sals_from_location, trace_command)
2664         (ftrace_command, strace_command, struct tracepoint): Constify.
2665         * ax-gdb.c (agent_command_1): Constify.
2666         * ada-lang.c (ada_exception_sal): Constify.
2667
2668 2017-09-27  Tom Tromey  <tom@tromey.com>
2669
2670         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
2671         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
2672         (get_context_size, no_chunk, get_insn_history_modifiers)
2673         (cmd_record_insn_history, get_call_history_modifiers)
2674         (cmd_record_call_history): Constify.
2675
2676 2017-09-27  Tom Tromey  <tom@tromey.com>
2677
2678         * source.c (show_substitute_path_command)
2679         (unset_substitute_path_command, set_substitute_path_command):
2680         Constify.
2681
2682 2017-09-27  Tom Tromey  <tom@tromey.com>
2683
2684         * typeprint.c (maintenance_print_type): Constify.
2685         * maint.c (maintenance_dump_me, maintenance_demangle)
2686         (maintenance_time_display, maintenance_info_sections)
2687         (maintenance_print_statistics, maintenance_deprecate)
2688         (maintenance_undeprecate): Constify.
2689         (maintenance_do_deprecate): Constify.  Use std::string.
2690         (maintenance_selftest): Constify.
2691         * gdbtypes.h (maintenance_print_type): Constify.
2692
2693 2017-09-27  Tom Tromey  <tom@tromey.com>
2694
2695         * hppa-tdep.c (unwind_command): Constify.
2696
2697 2017-09-27  Tom Tromey  <tom@tromey.com>
2698
2699         * target-descriptions.c (unset_tdesc_filename_cmd)
2700         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
2701         Constify.
2702
2703 2017-09-27  Tom Tromey  <tom@tromey.com>
2704
2705         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
2706
2707 2017-09-27  Tom Tromey  <tom@tromey.com>
2708
2709         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
2710
2711 2017-09-27  Tom Tromey  <tom@tromey.com>
2712
2713         * tui/tui-regs.c (tui_reg_command): Constify.
2714
2715 2017-09-27  Tom Tromey  <tom@tromey.com>
2716
2717         * skip.c (skip_file_command, skip_function_command)
2718         (skip_enable_command, skip_disable_command, skip_delete_command):
2719         Constify.
2720
2721 2017-09-27  Tom Tromey  <tom@tromey.com>
2722
2723         * record-btrace.c (cmd_record_btrace_bts_start)
2724         (cmd_record_btrace_pt_start): Constify.
2725
2726 2017-09-27  Tom Tromey  <tom@tromey.com>
2727
2728         * symmisc.c (maintenance_print_symbols)
2729         (maintenance_print_msymbols, maintenance_print_objfiles)
2730         (maintenance_info_symtabs, maintenance_check_symtabs)
2731         (maintenance_expand_symtabs, maintenance_info_line_tables):
2732         Constify.
2733
2734 2017-09-27  Tom Tromey  <tom@tromey.com>
2735
2736         * top.c (new_ui_command): Constify.
2737
2738 2017-09-27  Tom Tromey  <tom@tromey.com>
2739
2740         * symfile.c (add_symbol_file_command)
2741         (remove_symbol_file_command, list_overlays_command)
2742         (map_overlay_command, unmap_overlay_command)
2743         (overlay_auto_command, overlay_manual_command)
2744         (overlay_off_command, overlay_load_command): Constify.
2745
2746 2017-09-27  Tom Tromey  <tom@tromey.com>
2747
2748         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
2749         (info_spu_mailbox_command, info_spu_dma_command)
2750         (info_spu_proxydma_command): Constify.
2751
2752 2017-09-27  Tom Tromey  <tom@tromey.com>
2753
2754         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
2755
2756 2017-09-27  Tom Tromey  <tom@tromey.com>
2757
2758         * cli/cli-script.c (user_defined_command): Constify.
2759
2760 2017-09-27  Tom Tromey  <tom@tromey.com>
2761
2762         * cli/cli-dump.c (dump_memory_command, dump_value_command)
2763         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
2764         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
2765         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
2766         (dump_binary_value, append_binary_memory, append_binary_value):
2767         Constify.
2768         (struct dump_context) <func>: Constify.
2769         (add_dump_command): Update.
2770
2771 2017-09-27  Tom Tromey  <tom@tromey.com>
2772
2773         * cli/cli-cmds.c (show_version, show_configuration)
2774         (source_command, show_user): Constify.
2775
2776 2017-09-27  Tom Tromey  <tom@tromey.com>
2777
2778         * target.c (maintenance_print_target_stack): Constify.
2779
2780 2017-09-27  Tom Tromey  <tom@tromey.com>
2781
2782         * interps.c (interpreter_exec_cmd): Constify.
2783
2784 2017-09-27  Tom Tromey  <tom@tromey.com>
2785
2786         * record-full.c (cmd_record_full_restore): Constify.
2787
2788 2017-09-27  Tom Tromey  <tom@tromey.com>
2789
2790         * memattr.c (enable_mem_command, disable_mem_command)
2791         (delete_mem_command): Constify.
2792
2793 2017-09-27  Tom Tromey  <tom@tromey.com>
2794
2795         * value.c (show_convenience): Constify.
2796
2797 2017-09-27  Tom Tromey  <tom@tromey.com>
2798
2799         * gdbcore.h (core_file_command): Update.
2800         * corefile.c (core_file_command): Constify.
2801
2802 2017-09-27  Tom Tromey  <tom@tromey.com>
2803
2804         * user-regs.c (maintenance_print_user_registers): Constify.
2805
2806 2017-09-27  Tom Tromey  <tom@tromey.com>
2807
2808         * cp-namespace.c (maintenance_cplus_namespace): Constify.
2809
2810 2017-09-27  Tom Tromey  <tom@tromey.com>
2811
2812         * cp-support.c (first_component_command): Constify.
2813
2814 2017-09-27  Tom Tromey  <tom@tromey.com>
2815
2816         * psymtab.c (maintenance_print_psymbols)
2817         (maintenance_info_psymtabs, maintenance_check_psymtabs):
2818         Constify.
2819
2820 2017-09-27  Tom Tromey  <tom@tromey.com>
2821
2822         * windows-tdep.c (display_tib): Constify.
2823
2824 2017-09-27  Tom Tromey  <tom@tromey.com>
2825
2826         * linux-fork.c (delete_checkpoint_command)
2827         (detach_checkpoint_command): Constify.
2828
2829 2017-09-27  Tom Tromey  <tom@tromey.com>
2830
2831         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
2832
2833 2017-09-27  Tom Tromey  <tom@tromey.com>
2834
2835         * arc-tdep.c (dump_arc_instruction_command): Constify.
2836
2837 2017-09-27  Tom Tromey  <tom@tromey.com>
2838
2839         * valprint.c (set_radix, show_radix): Constify.
2840
2841 2017-09-27  Tom Tromey  <tom@tromey.com>
2842
2843         * dtrace-probe.c (info_probes_dtrace_command): Constify.
2844
2845 2017-09-27  Tom Tromey  <tom@tromey.com>
2846
2847         * command.h (not_just_help_class_command): Update.
2848         * cli/cli-decode.h (not_just_help_class_command): Update.
2849         * cli/cli-decode.c (not_just_help_class_command): Constify.
2850
2851 2017-09-27  Tom Tromey  <tom@tromey.com>
2852
2853         * gdb_bfd.c (maintenance_info_bfds): Constify.
2854
2855 2017-09-27  Tom Tromey  <tom@tromey.com>
2856
2857         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
2858         overloads.
2859         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
2860         (do_const_cfunc): New function.
2861         (cmd_cfunc_eq): New overload.
2862         (cli_user_command_p): Check do_const_cfunc.
2863         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
2864         const_cfunc.
2865         * command.h (add_cmd): Add const overload and no-function
2866         overload.
2867         (set_cmd_cfunc): Add const overload.
2868         (cmd_const_cfunc_ftype): Declare.
2869         (cmd_cfunc_eq): Add const overload.
2870         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
2871         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
2872         overload.
2873
2874 2017-09-27  Tom Tromey  <tom@tromey.com>
2875
2876         * macroexp.c (get_next_token_for_substitution): New function.
2877         (substitute_args): Call it.  Check for __VA_OPT__.
2878
2879 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2880             Pedro Alves <palves@redhat.com>
2881
2882         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
2883         producer_is_icc_lt_14.
2884         (producer_is_icc_lt_14): New function.
2885         (check_producer): Add code for checking version of ICC.
2886         (producer_is_icc): Move to producer.c.
2887         (read_structure_type): Restrict ICC workaround to ICC<14.
2888         * producer.c: Include selftest.h.
2889         (producer_is_icc, producer_parsing_tests, _initialize_producer):
2890         New functions.
2891         * producer.h (producer_is_icc): New declaration.
2892
2893 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2894
2895         * Makefile.in (SFILES): Add producer.c.
2896         (COMMON_OBS): Add producer.o
2897         * amd64-tdep.c (producer.h): Add new include.
2898         * dwarf2read.c (producer.h): Add new include.
2899         * producer.c: New file.
2900         * producer.h: New file.
2901         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
2902         producer.c.
2903         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
2904         producer.h.
2905
2906 2017-09-26  Matthias Klose  <doko@ubuntu.com>
2907
2908         * configure.ac: Search ncursesw before ncurses.
2909         Check ncursesw/ncurses.h before ncurses/ncurses.h.
2910         * gdb_curses.h: Include <ncursesw/ncurses.h>
2911         * config.in, configure: Regenerate.
2912
2913 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2914
2915         PR gdb/22185
2916         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
2917         obsolete.
2918         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
2919         Remove i386sol2 support.
2920         * configure.nat <i386sol2>: Remove.
2921         <sol2-64>: Fold into ...
2922         <sol2>: ... this.
2923         Move common settings to default section.
2924         Add sol-thread.o.
2925         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
2926         x86_64-*-solaris2.1[0-9]*>: Rename to ...
2927         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
2928         <i[34567]86-*-solaris*>: Remove.
2929         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
2930
2931         * configure.ac: Remove wctype in libw check.
2932         (_MSE_INT_H): Don't define on Solaris 7-9.
2933         <solaris*>: Remove libthread_db.so.1 check.
2934         * configure: Regenerate.
2935         * config.in: Regenerate.
2936
2937         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
2938         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
2939         (gdb_ps_size_t): Remove.
2940         Use base types in users.
2941         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
2942
2943         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
2944
2945 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2946
2947         PR build/22206
2948         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
2949         (adi_is_addr_mapped): Likewise.
2950         (PSR_ICC): Don't redefine.
2951         (PSR_IMPL): Likewise.
2952
2953 2017-09-25  Tom Tromey  <tom@tromey.com>
2954
2955         * regcache.c (regcache::dump): Use string_printf.
2956
2957 2017-09-25  Tom Tromey  <tom@tromey.com>
2958
2959         * regcache.c (class regcache_invalidator): New.
2960         (struct register_to_invalidate): Remove.
2961         (make_cleanup_regcache_invalidate): Remove.
2962         (regcache::raw_write): Use regcache_invalidator.
2963
2964 2017-09-25  Tom Tromey  <tom@tromey.com>
2965
2966         * spu-tdep.c (spu2ppu_sniffer): Update.
2967         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
2968         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
2969         Remove.
2970         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
2971         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
2972         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
2973         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
2974         (frame_pop): Update.
2975
2976 2017-09-25  Tom Tromey  <tom@tromey.com>
2977
2978         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
2979         * regcache.h (regcache_xfree): Don't declare.
2980         * regcache.c (regcache_xfree): Remove.
2981         (do_regcache_xfree): Use delete.
2982         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
2983         * linux-fork.c (free_fork): Use delete.
2984         (fork_save_infrun_state): Likewise.
2985         * jit.c (jit_dealloc_cache): Use delete.
2986         * infrun.c (discard_infcall_suspend_state): Use delete.
2987
2988 2017-09-25  Tom Tromey  <tom@tromey.com>
2989
2990         * regcache.h (regcache_xmalloc): Don't declare.
2991         (regcache_raw_set_cached_value): Update comment.
2992         * regcache.c (regcache_xmalloc): Remove.
2993         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
2994         * jit.c (jit_frame_sniffer): Use new.
2995         * frame.c (frame_save_as_regcache): Use new.
2996
2997 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2998
2999         * NEWS: Advertise support for guarded-storage registers on IBM z.
3000
3001 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3002
3003         * s390-linux-nat.c (have_regset_gs): New static variable.
3004         (s390_linux_fetch_inferior_registers): Handle guarded-storage
3005         control block and guarded-storage broadcast control regsets.
3006         (s390_read_description): Detect whether the target has
3007         guarded-storage support, return appropriate tdesc.
3008         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
3009         (features/s390x-gs-linux64.c): Likewise.
3010         (struct gdbarch_tdep) <have_gs>: New field.
3011         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
3012         (s390_gsbc_regset): New variables.
3013         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
3014         and s390_gsbc_regset, if applicable.
3015         (s390_core_read_description): Check whether core file was from a
3016         target with guarded-storage support; include appropriate regsets.
3017         (s390_gdbarch_init): Add registers for guarded-storage support.
3018         (_initialize_s390_tdep): Initialize new target descriptions that
3019         include registers for guarded-storage support.
3020         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
3021         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
3022         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
3023         (S390_NUM_REGS): Adjust macro definition.
3024         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
3025         (tdesc_s390x_gs_linux64): New declarations.
3026
3027 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3028
3029         * features/s390-gs-linux64.xml: New file.
3030         * features/s390-gs.xml: New file.
3031         * features/s390-gsbc.xml: New file.
3032         * features/s390x-gs-linux64.xml: New file.
3033         * features/Makefile (WHICH): Add s390-gs-linux64 and
3034         s390x-gs-linux64.
3035         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
3036         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
3037         * features/s390-gs-linux64.c: New generated file.
3038         * features/s390x-gs-linux64.c: New file.
3039         * regformats/s390-gs-linux64.dat: New file.
3040         * regformats/s390x-gs-linux64.dat: New file.
3041
3042 2017-09-23  Tom Tromey  <tom@tromey.com>
3043
3044         * defs.h (make_cleanup_override_quit_handler): Don't declare.
3045
3046 2017-09-22  Tom Tromey  <tom@tromey.com>
3047
3048         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
3049         type to scoped_restore_tmpl.
3050         <scoped_input_handler>: Initialize m_quit_handler directly.
3051
3052 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
3053
3054         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
3055         (cd_command): Likewise.  Free "current_directory" before
3056         assigning to it.
3057         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
3058         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
3059         * top.c (gdb_dirbuf): Remove global declaration.
3060         * top.h (gdb_dirbuf): Likewise.
3061
3062 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
3063
3064         * gnulib/aclocal.m4: Regenerate.
3065         * gnulib/config.in: Regenerate.
3066         * gnulib/configure: Regenerate.
3067         * gnulib/import/Makefile.am: Regenerate.
3068         * gnulib/import/Makefile.in: Regenerate.
3069         * gnulib/import/assure.h: New file.
3070         * gnulib/import/at-func.c: Likewise
3071         * gnulib/import/chdir-long.c: New file.
3072         * gnulib/import/chdir-long.h: New file.
3073         * gnulib/import/cloexec.c: New file.
3074         * gnulib/import/cloexec.h: New file.
3075         * gnulib/import/close.c: New file.
3076         * gnulib/import/closedir.c: New file.
3077         * gnulib/import/dirent-private.h: New file.
3078         * gnulib/import/dup-safer.c: New file.
3079         * gnulib/import/dup.c: New file.
3080         * gnulib/import/dup2.c: New file.
3081         * gnulib/import/error.c: New file.
3082         * gnulib/import/error.h: New file.
3083         * gnulib/import/exitfail.c: New file.
3084         * gnulib/import/exitfail.h: New file.
3085         * gnulib/import/fchdir.c: New file.
3086         * gnulib/import/fcntl.c: New file.
3087         * gnulib/import/fcntl.in.h: New file.
3088         * gnulib/import/fd-hook.c: New file.
3089         * gnulib/import/fd-hook.h: New file.
3090         * gnulib/import/fd-safer.c: New file.
3091         * gnulib/import/fdopendir.c: New file.
3092         * gnulib/import/filename.h: New file.
3093         * gnulib/import/filenamecat-lgpl.c: New file.
3094         * gnulib/import/filenamecat.h: New file.
3095         * gnulib/import/fstat.c: New file.
3096         * gnulib/import/fstatat.c: New file.
3097         * gnulib/import/getcwd-lgpl.c: New file.
3098         * gnulib/import/getcwd.c: New file.
3099         * gnulib/import/getdtablesize.c: New file.
3100         * gnulib/import/getlogin_r.c: New file.
3101         * gnulib/import/getprogname.c: New file.
3102         * gnulib/import/getprogname.h: New file.
3103         * gnulib/import/gettext.h: New file.
3104         * gnulib/import/glob-libc.h: New file.
3105         * gnulib/import/glob.c: New file.
3106         * gnulib/import/glob.in.h: New file.
3107         * gnulib/import/intprops.h: New file.
3108         * gnulib/import/m4/chdir-long.m4: New file.
3109         * gnulib/import/m4/close.m4: New file.
3110         * gnulib/import/m4/closedir.m4: New file.
3111         * gnulib/import/m4/d-ino.m4: New file.
3112         * gnulib/import/m4/d-type.m4: New file.
3113         * gnulib/import/m4/dup.m4: New file.
3114         * gnulib/import/m4/dup2.m4: New file.
3115         * gnulib/import/m4/error.m4: New file.
3116         * gnulib/import/m4/fchdir.m4: New file.
3117         * gnulib/import/m4/fcntl.m4: New file.
3118         * gnulib/import/m4/fcntl_h.m4: New file.
3119         * gnulib/import/m4/fdopendir.m4: New file.
3120         * gnulib/import/m4/filenamecat.m4: New file.
3121         * gnulib/import/m4/fstat.m4: New file.
3122         * gnulib/import/m4/fstatat.m4: New file.
3123         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
3124         * gnulib/import/m4/getcwd-path-max.m4: New file.
3125         * gnulib/import/m4/getcwd.m4: New file.
3126         * gnulib/import/m4/getdtablesize.m4: New file.
3127         * gnulib/import/m4/getlogin_r.m4: New file.
3128         * gnulib/import/m4/getprogname.m4: New file.
3129         * gnulib/import/m4/glob.m4: New file.
3130         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
3131         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
3132         * gnulib/import/m4/mempcpy.m4: New file.
3133         * gnulib/import/m4/memrchr.m4: New file.
3134         * gnulib/import/m4/mode_t.m4: New file.
3135         * gnulib/import/m4/msvc-inval.m4: New file.
3136         * gnulib/import/m4/msvc-nothrow.m4: New file.
3137         * gnulib/import/m4/open.m4: New file.
3138         * gnulib/import/m4/openat.m4: New file.
3139         * gnulib/import/m4/opendir.m4: New file.
3140         * gnulib/import/m4/readdir.m4: New file.
3141         * gnulib/import/m4/realloc.m4: New file.
3142         * gnulib/import/m4/rewinddir.m4: New file.
3143         * gnulib/import/m4/save-cwd.m4: New file.
3144         * gnulib/import/m4/strdup.m4: New file.
3145         * gnulib/import/m4/strerror.m4: New file.
3146         * gnulib/import/m4/unistd-safer.m4: New file.
3147         * gnulib/import/mempcpy.c: New file.
3148         * gnulib/import/memrchr.c: New file.
3149         * gnulib/import/msvc-inval.c: New file.
3150         * gnulib/import/msvc-inval.h: New file.
3151         * gnulib/import/msvc-nothrow.c: New file.
3152         * gnulib/import/msvc-nothrow.h: New file.
3153         * gnulib/import/open.c: New file.
3154         * gnulib/import/openat-die.c: New file.
3155         * gnulib/import/openat-priv.h: New file.
3156         * gnulib/import/openat-proc.c: New file.
3157         * gnulib/import/openat.c: New file.
3158         * gnulib/import/openat.h: New file.
3159         * gnulib/import/opendir.c: New file.
3160         * gnulib/import/pipe-safer.c: New file.
3161         * gnulib/import/readdir.c: New file.
3162         * gnulib/import/realloc.c: New file.
3163         * gnulib/import/rewinddir.c: New file.
3164         * gnulib/import/save-cwd.c: New file.
3165         * gnulib/import/save-cwd.h: New file.
3166         * gnulib/import/strdup.c: New file.
3167         * gnulib/import/strerror-override.c: New file.
3168         * gnulib/import/strerror-override.h: New file.
3169         * gnulib/import/strerror.c: New file.
3170         * gnulib/import/unistd--.h: New file.
3171         * gnulib/import/unistd-safer.h: New file.
3172         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
3173         "getcwd" and "glob".
3174         * ser-tcp.c: Undefine "close" before redefining it.
3175
3176 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3177
3178         * guile/scm-value.c (gdbscm_value_address): Initialize address,
3179         get rid of res_val.
3180
3181 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3182
3183         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
3184         <sol2,sparc>: Likewise.
3185         <sol2-64,i386>: Likewise.
3186
3187         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
3188         -Wdeprecated-declarations on *-*-solaris*.
3189         * configure: Regenerate.
3190
3191         * procfs.c: Include "nat/inferior.h".
3192         (procfs_info_proc): Fix typo.
3193
3194 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3195
3196         * remote.c (vector): Include.
3197         (struct private_thread_info): Add field, thread_handle.
3198         (free_private_thread_info): Deallocate storage associated with
3199         thread handle.
3200         (get_private_info_thread): Initialize `thread_handle' field.
3201         (struct thread_item): Add field, thread_handle.
3202         (clear_threads_listing_context): Deallocate storage associated
3203         with thread handle.
3204         (start_thread): Add support for "handle" attribute.
3205         (thread_attributes): Add "handle".
3206         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
3207         field.
3208         (remote_update_thread_list): Update thread_handle.
3209         (remote_thread_handle_to_thread_info): New function.
3210         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
3211
3212 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3213
3214         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
3215         function.
3216         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
3217         * python/python-internal.h (thread_object_type): Declare.
3218
3219 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3220
3221         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
3222         (target_thread_handle_to_thread_info): Declare.
3223         * target.c (target_thread_handle_to_thread_info): New function.
3224         * target-delegates.c: Regenerate.
3225         * gdbthread.h (find_thread_by_handle): Declare.
3226         * thread.c (find_thread_by_handle): New function.
3227         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
3228         function.
3229         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
3230
3231 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3232
3233         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
3234
3235 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3236
3237         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
3238
3239 2017-09-21  Yao Qi  <yao.qi@linaro.org>
3240
3241         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
3242         to gdb_target_obs.
3243
3244 2017-09-20  Tom Tromey  <tom@tromey.com>
3245
3246         * breakpoint.c (struct counted_command_line): Remove.
3247         (breakpoint_commands): Update.
3248         (alloc_counted_command_line, incref_counted_command_line)
3249         (decref_counted_command_line, do_cleanup_counted_command_line)
3250         (make_cleanup_decref_counted_command_line): Remove.
3251         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
3252         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
3253         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
3254         (save_breakpoints): Update.
3255         * breakpoint.h (counted_command_line): Now a typedef to
3256         shared_ptr.
3257         (struct breakpoint) <commands>: Now a counted_command_line.
3258         (struct bpstats) <command>: Likewise.
3259
3260 2017-09-20  Tom Tromey  <tom@tromey.com>
3261
3262         * breakpoint.c (struct commands_info, do_map_commands_command):
3263         Remove.
3264         (commands_command_1): Update.
3265         (iterate_over_related_breakpoints): Take a function_view.
3266         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
3267         (delete_command): Update.
3268         (map_breakpoint_numbers): Take a function_view.
3269         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
3270         (disable_command): Update.
3271         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
3272         (enable_command): Update.
3273         (struct disp_data, do_enable_breakpoint_disp)
3274         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
3275         (do_map_enable_delete_breakpoint): Remove.
3276         (enable_once_command, enable_count_command, enable_delete_command)
3277         (delete_trace_variable_command): Update.
3278
3279 2017-09-20  Tom Tromey  <tom@tromey.com>
3280
3281         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
3282         (bpstat_clear): Use delete.
3283         (bpstats): New constructors.
3284         (bpstat_copy, bpstat_stop_status): Use new.
3285         (dprintf_after_condition_true): Update.
3286         * breakpoint.h (bpstats::bpstats): Add constructors.
3287         (bpstats::~bpstats): Add destructor.
3288
3289 2017-09-20  Pedro Alves  <palves@redhat.com>
3290
3291         * eval.c (make_params): Delete, refactored as ...
3292         (class fake_method): ... this new type's ctor.
3293         (fake_method::~fake_method): New.
3294         (evaluate_subexp_standard): Use 'fake_method'.
3295
3296 2017-09-20  Tom Tromey  <tom@tromey.com>
3297
3298         * windows-nat.c (get_windows_debug_event, windows_wait)
3299         (do_initial_windows_stuff, windows_attach): Update.
3300         * utils.c (vwarning, internal_vproblem): Update.
3301         (ui_unregister_input_event_handler_cleanup)
3302         (prepare_to_handle_input): Remove.
3303         (class scoped_input_handler): New.
3304         (defaulted_query, prompt_for_continue): Update.
3305         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
3306         Update.
3307         * top.c (undo_terminal_modifications_before_exit): Update.
3308         * target/target.h (target_terminal_init, target_terminal_inferior)
3309         (target_terminal_ours): Don't declare.
3310         (class target_terminal): New.
3311         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
3312         (target_terminal_ours_for_output)
3313         (make_cleanup_restore_target_terminal): Don't declare.
3314         (target_terminal_info): Remove.
3315         * target.c (enum terminal_state, terminal_state): Remove.
3316         (target_terminal::terminal_state): Define.
3317         (target_terminal::init): Rename from target_terminal_init.
3318         (target_terminal::inferior): Rename from
3319         target_terminal_inferior.
3320         (target_terminal::ours): Rename from target_terminal_ours.
3321         (target_terminal::ours_for_output): Rename from
3322         target_terminal_ours_for_output.
3323         (target_terminal::info): New method.
3324         (cleanup_restore_target_terminal)
3325         (make_cleanup_restore_target_terminal): Remove.
3326         * solib.c (handle_solib_event): Update.
3327         * remote.c (remote_serial_quit_handler): Update.
3328         (remote_terminal_inferior, remote_wait_as): Update.
3329         * record-full.c (record_full_wait_1): Update.
3330         * nto-procfs.c (procfs_create_inferior): Update.
3331         * nat/fork-inferior.c (startup_inferior): Update.
3332         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
3333         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
3334         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
3335         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
3336         (mi_breakpoint_created, mi_breakpoint_deleted)
3337         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
3338         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3339         (mi_user_selected_context_changed, report_initial_inferior):
3340         Update.
3341         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
3342         (linux_nat_terminal_inferior): Update.
3343         * infrun.c (follow_fork_inferior)
3344         (handle_vfork_child_exec_or_exit, do_target_resume)
3345         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
3346         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
3347         Update.
3348         * inflow.c (child_terminal_init, info_terminal_command): Update.
3349         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
3350         (attach_command): Update.
3351         * infcall.c (call_thread_fsm_should_stop): Update.
3352         * gnu-nat.c (gnu_attach): Update.
3353         * extension.c (struct active_ext_lang_state)
3354         (restore_active_ext_lang): Update.
3355         * exceptions.c (print_flush): Update.
3356         * event-top.c (async_enable_stdin, default_quit_handler): Update.
3357         (struct quit_handler_cleanup_data, restore_quit_handler)
3358         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
3359         Remove.
3360         * cp-support.c (gdb_demangle): Update.
3361         * breakpoint.c (update_inserted_breakpoint_locations)
3362         (insert_breakpoint_locations, handle_jit_event)
3363         (disable_breakpoints_in_unloaded_shlib): Update.
3364         * annotate.c (annotate_breakpoints_invalid)
3365         (annotate_frames_invalid): Update.
3366
3367 2017-09-20  Tom Tromey  <tom@tromey.com>
3368
3369         * main.c (catch_command_errors): Rename from
3370         catch_command_errors_const.
3371         (captured_main_1): Update.
3372
3373 2017-09-20  Pedro Alves  <palves@redhat.com>
3374
3375         * cli/cli-cmds.c (list_command): Use print_sal_location.
3376         (print_sal_location): New function.
3377         (ambiguous_line_spec): Use print_sal_location.
3378         * linespec.c (symbol_to_sal): Record the symbol in the sal.
3379         * symtab.c (find_function_start_sal): Likewise.
3380         * symtab.h (symtab_and_line::symbol): New field.
3381
3382 2017-09-20  Pedro Alves  <palves@redhat.com>
3383
3384         * linespec.c (minsym_found): Handle non-text minsyms.
3385         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
3386
3387 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3388
3389         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
3390         backslash.
3391
3392 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3393
3394         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
3395         vmovups instead vmovaps.
3396         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
3397
3398 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
3399
3400         * NEWS (Changes since GDB 8.0): Add starti.
3401         * infcmd.c (enum run_break): New.
3402         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
3403         case.
3404         (run_command): Use enum run_how.
3405         (start_command): Likewise.
3406         (starti_command): New function.
3407         (RUN_ARGS_HELP): New macro.
3408         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
3409         commands.  Add starti command.
3410
3411 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3412
3413         * Makefile.in (monitor.o): Remove the rule.
3414
3415 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3416
3417         * annotate.h (struct annotate_arg_emitter): Use
3418         DISABLE_COPY_AND_ASSIGN.
3419         * common/refcounted-object.h (refcounted_object): Likewise.
3420         * completer.h (struct completion_result): Likewise.
3421         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
3422         * filename-seen-cache.h (filename_seen_cache): Likewise.
3423         * gdbcore.h (thread_section_name): Likewise.
3424         * gdb_regex.h (compiled_regex): Likewise.
3425         * gdbthread.h (scoped_restore_current_thread): Likewise.
3426         * inferior.h (scoped_restore_current_inferior): Likewise.
3427         * jit.c (jit_reader): Likewise.
3428         * linespec.h (struct linespec_result): Likewise.
3429         * mi/mi-parse.h (struct mi_parse): Likewise.
3430         * nat/fork-inferior.c (execv_argv): Likewise.
3431         * progspace.h (scoped_restore_current_program_space): Likewise.
3432         * python/python-internal.h (class gdbpy_enter): Likewise.
3433         * regcache.h (regcache): Likewise.
3434         * target-descriptions.c (struct tdesc_reg): Likewise.
3435         (struct tdesc_type): Likewise.
3436         (struct tdesc_feature): Likewise.
3437         * ui-out.h (ui_out_emit_type): Likewise.
3438
3439 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
3440
3441         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
3442         label abort_expression.
3443
3444 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3445
3446         * common/buffer.c (buffer_xml_printf): Adjust.
3447         * common/xml-utils.c (xml_escape_text): Change return type to
3448         std::string, update code accordingly.
3449         * common/xml-utils.h (xml_escape_text): Change return type to
3450         std::string.
3451         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
3452         * windows-tdep.c (windows_xfer_shared_library): Adjust.
3453         * unittests/xml-utils-selftests.c (test_xml_escape_text):
3454         Adjust.
3455
3456 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3457
3458         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
3459         (SUBDIR_UNITTESTS_OBS): Add new object file.
3460         * unittests/xml-utils-selftests.c: New file.
3461
3462 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3463
3464         * common/selftest.h (selftest): New struct/interface.
3465         (register_test): Add name parameter, add new overload.
3466         (run_tests): Add filter parameter.
3467         (for_each_selftest_ftype): New typedef.
3468         (for_each_selftest): New declaration.
3469         * common/selftest.c (tests): Change type to
3470         map<string, unique_ptr<selftest>>.
3471         (simple_selftest): New struct.
3472         (register_test): New function.
3473         (register_test): Add name parameter and use it.
3474         (run_tests): Add filter parameter and use it.  Add prints.
3475         Adjust to vector -> map change.
3476         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
3477         registering selftests.
3478         * arm-tdep.c (_initialize_arm_tdep): Likewise.
3479         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
3480         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
3481         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
3482         * findvar.c (_initialize_findvar): Likewise.
3483         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
3484         * maint.c (maintenance_selftest): Update call to run_tests.
3485         (maintenance_info_selftests): New function.
3486         (_initialize_maint_cmds): Register "maintenance info selftests"
3487         command.  Update "maintenance selftest" doc.
3488         * regcache.c (_initialize_regcache): Add names when registering
3489         selftests.
3490         * rust-exp.y (_initialize_rust_exp): Likewise.
3491         * selftest-arch.c (gdbarch_selftest): New struct.
3492         (gdbarch_tests): Remove.
3493         (register_test_foreach_arch): Add name parameter.  Call
3494         register_test.
3495         (tests_with_arch): Remove, move most content to
3496         gdbarch_selftest::operator().
3497         (_initialize_selftests_foreach_arch): Remove.
3498         * selftest-arch.h (register_test_foreach_arch): Add name
3499         parameter.
3500         (run_tests_with_arch): New declaration.
3501         * utils-selftests.c (_initialize_utils_selftests): Add names
3502         when registering selftests.
3503         * utils.c (_initialize_utils): Likewise.
3504         * unittests/array-view-selftests.c
3505         (_initialize_array_view_selftests): Likewise.
3506         * unittests/environ-selftests.c (_initialize_environ_selftests):
3507         Likewise.
3508         * unittests/function-view-selftests.c
3509         (_initialize_function_view_selftests): Likewise.
3510         * unittests/offset-type-selftests.c
3511         (_initialize_offset_type_selftests): Likewise.
3512         * unittests/optional-selftests.c
3513         (_initialize_optional_selftests): Likewise.
3514         * unittests/scoped_restore-selftests.c
3515         (_initialize_scoped_restore_selftests): Likewise.
3516         * NEWS: Document "maintenance selftest" and "maint info
3517         selftests".
3518
3519 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3520
3521         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
3522         scoped_restore.
3523
3524 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3525
3526         * mi/mi-main.c (mi_load_progress): Make uiout variable
3527         a unique_ptr.
3528
3529 2017-09-15  Pedro Alves  <palves@redhat.com>
3530
3531         * compile/compile-c-types.c (convert_enum, convert_int)
3532         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
3533
3534 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
3535
3536         * dwarf2read.c (copy_string): Remove.
3537         (parse_macro_definition): Replace copy_string with savestring.
3538
3539 2017-09-15  Yao Qi  <yao.qi@linaro.org>
3540
3541         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
3542         gdb_target_obs.
3543         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
3544         Likewise.
3545         (i[34567]86-*-linux*): Likewise.
3546
3547 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3548
3549         * dwarf2expr.h (dwarf_stack_value): Add constructor.
3550         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
3551         <stack>: Change type to std::vector.
3552         <stack_len, stack_allocated>: Remove.
3553         <grow_stack>: Remove.
3554         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3555         (dwarf_expr_context::~dwarf_expr_context): Remove.
3556         (dwarf_expr_context::grow_stack): Remove.
3557         (dwarf_expr_context::push): Adjust.
3558         (dwarf_expr_context::pop): Adjust.
3559         (dwarf_expr_context::fetch): Adjust.
3560         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
3561         (dwarf_expr_context::stack_empty_p): Adjust.
3562         (dwarf_expr_context::execute_stack_op): Adjust.
3563
3564 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3565
3566         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
3567         return type to bool.
3568         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
3569
3570 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3571
3572         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
3573         Change type to bool.
3574         (dwarf_stack_value) <in_stack_memory>: Likewise.
3575         (dwarf_expr_context) <push_address>: Change parameter type to
3576         bool.
3577         <fetch_in_stack_memory>: Change return type to bool.
3578         <push>: Change parameter type to bool.
3579         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
3580         to bool.
3581         (dwarf_expr_context::push_address): Likewise.
3582         (dwarf_expr_context::fetch_in_stack_memory): Change return type
3583         to bool.
3584         (dwarf_expr_context::execute_stack_op): Adjust.
3585         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
3586
3587 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3588
3589         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
3590         (struct dwarf_expr_context) <n_pieces>: Remove.
3591         <pieces>: Change type to std::vector.
3592         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3593         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
3594         pieces.
3595         (dwarf_expr_context::add_piece): Adjust.
3596         * dwarf2loc.c (struct piece_closure): Initialize fields.
3597         <n_pieces>: Remove.
3598         <pieces>: Change type to std::vector.
3599         (allocate_piece_closure): Adjust, change parameter to
3600         std::vector rvalue and std::move it to piece_closure.
3601         (rw_pieced_value): Adjust.
3602         (check_pieced_synthetic_pointer): Adjust.
3603         (indirect_synthetic_pointer): Adjust.
3604         (coerce_pieced_ref): Adjust.
3605         (free_pieced_value_closure):  Adjust.  Use delete to free
3606         piece_closure.
3607         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
3608         to allocate_piece_closure.
3609         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
3610
3611 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3612
3613         * probe.h (probe_ops_cp): Remove typedef.
3614         (DEF_VEC_P (probe_ops_cp)): Remove.
3615         (all_probe_ops): Change type to std::vector.
3616         * probe.c (info_probes_for_ops): Adjust to vector change.
3617         (probe_linespec_to_ops): Likewise.
3618         (all_probe_ops): Change type to std::vector.
3619         (_initialize_probe): Adjust to vector change.
3620         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
3621         * elfread.c (elf_get_probes): Likewise.
3622         * stap-probe.c (_initialize_stap_probe): Likewise.
3623
3624 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3625
3626         * probe.h (struct bound_probe): Define constructors.
3627         * probe.c (bound_probe_s): Remove typedef.
3628         (DEF_VEC_O (bound_probe_s)): Remove VEC.
3629         (collect_probes): Change return type to std::vector, remove
3630         cleanup.
3631         (compare_probes): Return bool, change parameter type.  Change
3632         semantic to "less than".
3633         (gen_ui_out_table_header_info): Change parameter to std::vector
3634         and update.
3635         (exists_probe_with_pops): Likewise.
3636         (info_probes_for_ops): Update to std::vector change.
3637         (enable_probes_command): Likewise.
3638         (disable_probes_command): Likewise.
3639
3640 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3641
3642         * probe.h (struct probe_ops) <get_probes>: Change parameter from
3643         vec to std::vector.
3644         * probe.c (parse_probes_in_pspace): Update.
3645         (find_probes_in_objfile): Update.
3646         (find_probe_by_pc): Update.
3647         (collect_probes): Update.
3648         (probe_any_get_probes): Update.
3649         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
3650         return type to reference to std::vector.
3651         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
3652         std::vector and update.
3653         (dtrace_process_dof): Likewise.
3654         (dtrace_get_probes): Likewise.
3655         * elfread.c (elf_get_probes): Change return type to std::vector,
3656         store an std::vector in bfd_data.
3657         (probe_key_free): Update to std::vector.
3658         * stap-probe.c (handle_stap_probe): Change parameter to
3659         std::vector and update.
3660         (stap_get_probes): Likewise.
3661         * symfile-debug.c (debug_sym_get_probes): Change return type to
3662         std::vector and update.
3663
3664 2017-09-11  Tom Tromey  <tom@tromey.com>
3665
3666         * breakpoint.c (program_breakpoint_here_p): Update.
3667         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
3668         from make_show_memory_breakpoints_cleanup.  Return a
3669         scoped_restore_tmpl<int>.
3670         (restore_show_memory_breakpoints): Remove.
3671         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
3672         * mem-break.c (memory_validate_breakpoint): Update.
3673         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
3674         (ia64_memory_remove_breakpoint): Update.
3675         (ia64_breakpoint_from_pc): Update.
3676         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
3677         from make_show_memory_breakpoints_cleanup.
3678
3679 2017-09-11  Tom Tromey  <tom@tromey.com>
3680
3681         * d-namespace.c (d_lookup_symbol): Use std::string.
3682         (find_symbol_in_baseclass): Likewise.
3683
3684 2017-09-11  Tom Tromey  <tom@tromey.com>
3685
3686         * ctf.c (ctf_start): Use std::string.
3687
3688 2017-09-11  Tom Tromey  <tom@tromey.com>
3689
3690         * ada-lang.c (is_known_support_routine): Update.
3691         (ada_unhandled_exception_name_addr_from_raise): Update.
3692         * guile/scm-frame.c (gdbscm_frame_name): Update.
3693         * python/py-frame.c (frapy_name): Update.
3694         (frapy_function): Update.
3695         * stack.h (find_frame_funname): Update.
3696         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
3697         (print_frame): Update.
3698
3699 2017-09-11  Tom Tromey  <tom@tromey.com>
3700
3701         * findcmd.c (put_bits): Take a gdb::byte_vector.
3702         (parse_find_args): Return gdb::byte_vector.  "args" now const.
3703         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
3704         cleanups.
3705         (find_command): Update.
3706
3707 2017-09-11  Tom Tromey  <tom@tromey.com>
3708
3709         * cli/cli-script.c (class scoped_restore_hook_in): New.
3710         (clear_hook_in_cleanup): Remove.
3711         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
3712         scoped_restore_hook_in.
3713
3714 2017-09-11  Tom Tromey  <tom@tromey.com>
3715
3716         * cli/cli-script.c (restore_interp): Remove.
3717         (read_command_lines): Use scoped_restore_interp.
3718         * interps.c (scoped_restore_interp::set_temp): Rename from
3719         interp_set_temp.
3720         * interps.h (class scoped_restore_interp): New.
3721         (interp_set_temp): Remove.
3722
3723 2017-09-11  Tom Tromey  <tom@tromey.com>
3724
3725         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3726         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
3727         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
3728         scoped_restore.
3729         (mi_cmd_break_insert_1): Update.
3730         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
3731         scoped_restore.
3732
3733 2017-09-11  Tom Tromey  <tom@tromey.com>
3734
3735         * demangle.c (demangle_command): Update.
3736         * breakpoint.c (disable_command): Update.
3737         (enable_command): Update.
3738         (find_location_by_number): Make "number" const.  Use
3739         get_number_trailer.
3740         * cli/cli-utils.c (extract_arg): Return std::string.
3741         * probe.c (parse_probe_linespec): Update.  Change types.
3742         (collect_probes): Take string arguments.
3743         (parse_probe_linespec): Likewise.
3744         (info_probes_for_ops): Update.
3745         (enable_probes_command): Update.
3746         (disable_probes_command): Update.
3747         * break-catch-sig.c (catch_signal_split_args): Update.
3748         * mi/mi-parse.c (mi_parse): Update.
3749
3750 2017-09-11  Tom Tromey  <tom@tromey.com>
3751
3752         * language.h (language_enum): Make argument const.
3753         * language.c (language_enum): Make argument const.
3754
3755 2017-09-11  Tom Tromey  <tom@tromey.com>
3756
3757         * common/common-utils.h (skip_to_space): Remove macro, redeclare
3758         as function.
3759         (skip_to_space): Rename from skip_to_space_const.
3760         * common/common-utils.c (skip_to_space): New function.
3761         (skip_to_space): Rename from skip_to_space_const.
3762         * cli/cli-utils.h (get_number): Rename from get_number_const.
3763         (extract_arg): Rename from extract_arg_const.
3764         * cli/cli-utils.c (get_number): Rename from get_number_const.
3765         (extract_arg): Rename from extract_arg_const.
3766         (number_or_range_parser::get_number): Use ::get_number.
3767         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
3768         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
3769         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
3770         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
3771         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
3772         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
3773         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
3774         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
3775
3776 2017-09-11  Tom Tromey  <tom@tromey.com>
3777
3778         * python/python.c (do_start_initialization): Use
3779         py-event-types.def to initialize types.
3780         Define all object type structures.
3781         * python/python-internal.h: Don't declare event initialization
3782         functions.
3783         * python/py-threadevent.c (thread_event_object_type): Don't
3784         define.
3785         * python/py-stopevent.c (stop_event_object_type): Don't define.
3786         * python/py-signalevent.c (signal_event_object_type): Don't
3787         declare or define.
3788         * python/py-newobjfileevent.c (new_objfile_event_object_type)
3789         (clear_objfiles_event_object_type): Don't declare or define.
3790         * python/py-infevents.c (inferior_call_pre_event_object_type)
3791         (inferior_call_post_event_object_type)
3792         (register_changed_event_object_type)
3793         (memory_changed_event_object_type): Don't declare or define.
3794         * python/py-inferior.c (new_thread_event_object_type)
3795         (new_inferior_event_object_type)
3796         (inferior_deleted_event_object_type): Don't declare or define.
3797         * python/py-exitedevent.c (exited_event_object_type): Don't
3798         declare or define.
3799         * python/py-evts.c (gdbpy_initialize_py_events): Use
3800         py-all-events.def.
3801         * python/py-events.h (thread_event_object_type): Don't declare.
3802         (events_object): Use py-all-events.def.
3803         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
3804         py-event-types.def.
3805         * python/py-event-types.def: New file.
3806         * python/py-continueevent.c (create_continue_event_object): Don't
3807         declare or define.
3808         * python/py-bpevent.c (breakpoint_event_object_type): Don't
3809         declare or define.
3810         * python/py-all-events.def: New file.
3811
3812 2017-09-11  Tom Tromey  <tom@tromey.com>
3813
3814         * python/py-threadevent.c (create_thread_event_object): Return
3815         gdbpy_ref.
3816         * python/py-stopevent.h (create_stop_event_object)
3817         (create_breakpoint_event_object, create_signal_event_object):
3818         Update.
3819         * python/py-stopevent.c (create_stop_event_object): Return
3820         gdbpy_ref.
3821         (emit_stop_event): Update.
3822         * python/py-signalevent.c (create_signal_event_object): Return
3823         gdbpy_ref.
3824         * python/py-infevents.c (create_inferior_call_event_object):
3825         Update.
3826         * python/py-event.h (create_event_object)
3827         (create_thread_event_object): Update.
3828         * python/py-event.c (create_event_object): Return gdbpy_ref.
3829         * python/py-continueevent.c: Return gdbpy_ref.
3830         * python/py-bpevent.c (create_breakpoint_event_object): Return
3831         gdbpy_ref.
3832
3833 2017-09-11  Tom Tromey  <tom@tromey.com>
3834
3835         PR python/15622:
3836         * NEWS: Add entry.
3837         * python/python.c (do_start_initialization): Initialize new event
3838         types.
3839         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
3840         (gdbpy_initialize_inferior_deleted_event)
3841         (gdbpy_initialize_new_thread_event): Declare.
3842         * python/py-threadevent.c (create_thread_event_object): Add option
3843         "thread" parameter.
3844         * python/py-inferior.c (new_thread_event_object_type)
3845         (new_inferior_event_object_type)
3846         (inferior_deleted_event_object_type): Declare.
3847         (python_new_inferior, python_inferior_deleted): New functions.
3848         (add_thread_object): Emit new_thread event.
3849         (gdbpy_initialize_inferior): Attach new functions to corresponding
3850         observers.
3851         (new_thread, new_inferior, inferior_deleted): Define new event
3852         types.
3853         * python/py-evts.c (gdbpy_initialize_py_events): Add new
3854         registries.
3855         * python/py-events.h (events_object) <new_inferior,
3856         inferior_deleted, new_thread>: New fields.
3857         * python/py-event.h (create_thread_event_breakpoint): Add optional
3858         "thread" parameter.
3859
3860 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3861
3862         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
3863         check current_ui instead.
3864         (internal_vproblem): Likewise.
3865
3866 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
3867
3868         * thread.c (print_thread_info_1): Remove unnecessary calls to
3869         uiout->is_mi_like_p.
3870
3871 2017-09-09  Tom Tromey  <tom@tromey.com>
3872
3873         * namespace.h (add_using_directive): Update.
3874         * namespace.c (add_using_directive): Change type of excludes to
3875         std::vector.
3876         * dwarf2read.c (read_import_statement): Use std::vector.
3877         (read_namespace): Update.
3878         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3879
3880 2017-09-09  Tom Tromey  <tom@tromey.com>
3881
3882         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
3883
3884 2017-09-09  Tom Tromey  <tom@tromey.com>
3885
3886         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
3887
3888 2017-09-09  Tom Tromey  <tom@tromey.com>
3889
3890         * stack.c (func_command): Use gdb::def_vector.
3891
3892 2017-09-09  Tom Tromey  <tom@tromey.com>
3893
3894         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
3895         ui_out_emit_list, ui_out_emit_tuple.
3896         (mi_cmd_var_update): Likewise.
3897
3898 2017-09-09  Tom Tromey  <tom@tromey.com>
3899
3900         * mi/mi-interp.c (mi_user_selected_context_changed): Use
3901         ui_out_redirect_pop.
3902         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
3903         ui_out_redirect_pop.
3904         * utils.c (do_ui_out_redirect_pop)
3905         (make_cleanup_ui_out_redirect_pop): Remove.
3906         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
3907         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
3908         * ui-out.h (ui_out_redirect_pop): New class.
3909
3910 2017-09-09  Tom Tromey  <tom@tromey.com>
3911
3912         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
3913         (list_available_thread_groups, mi_cmd_list_thread_groups)
3914         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
3915         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
3916         Likewise.
3917
3918 2017-09-09  Tom Tromey  <tom@tromey.com>
3919
3920         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
3921         ui_out_emit_tuple.
3922
3923 2017-09-09  Tom Tromey  <tom@tromey.com>
3924
3925         * target.c (flash_erase_command): Use ui_out_emit_tuple.
3926         * stack.c (print_frame): Use ui_out_emit_tuple.
3927         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
3928         (info_spu_mailbox_command, info_spu_dma_command)
3929         (info_spu_proxydma_command): Likewise.
3930         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
3931         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
3932         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
3933         ui_out_emit_tuple.
3934         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
3935
3936 2017-09-09  Tom Tromey  <tom@tromey.com>
3937
3938         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
3939         (class ui_out_emit_table): Update comment.
3940         * ui-out.c (do_cleanup_table_end)
3941         (make_cleanup_ui_out_table_begin_end): Remove.
3942         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
3943         (info_spu_dma_cmdlist): Likewise.
3944         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
3945         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
3946         ui_out_emit_table.
3947
3948 2017-09-09  Tom Tromey  <tom@tromey.com>
3949
3950         * thread.c (print_thread_info_1): Use ui_out_emit_table,
3951         ui_out_emit_list, gdb::optional.
3952
3953 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
3954
3955         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
3956         prototype.
3957         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
3958         prototype.
3959         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
3960         prototype.
3961         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
3962         * ada-exp.y: Remove _initialize_ada_exp prototype.
3963         * ada-lang.c: Remove _initialize_ada_language prototype.
3964         * ada-tasks.c: Remove _initialize_tasks prototype.
3965         * addrmap.c: Remove _initialize_addrmap prototype.
3966         * agent.c: Remove _initialize_agent prototype.
3967         * aix-thread.c: Remove _initialize_aix_thread prototype.
3968         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
3969         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
3970         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
3971         prototype.
3972         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
3973         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
3974         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
3975         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
3976         prototype.
3977         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
3978         prototype.
3979         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
3980         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
3981         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
3982         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
3983         prototype.
3984         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
3985         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
3986         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
3987         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
3988         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
3989         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
3990         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
3991         prototype.
3992         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
3993         prototype.
3994         * annotate.c: Remove _initialize_annotate prototype.
3995         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
3996         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
3997         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
3998         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
3999         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
4000         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
4001         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
4002         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
4003         prototype.
4004         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
4005         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
4006         * auto-load.c: Remove _initialize_auto_load prototype.
4007         * auxv.c: Remove _initialize_auxv prototype.
4008         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
4009         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
4010         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
4011         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
4012         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
4013         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
4014         prototype.
4015         * break-catch-throw.c: Remove _initialize_break_catch_throw
4016         prototype.
4017         * breakpoint.c: Remove _initialize_breakpoint prototype.
4018         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
4019         * btrace.c: Remove _initialize_btrace prototype.
4020         * charset.c: Remove _initialize_charset prototype.
4021         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
4022         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
4023         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
4024         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
4025         * cli/cli-script.c: Remove _initialize_cli_script prototype.
4026         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
4027         * coffread.c: Remove _initialize_coffread prototype.
4028         * compile/compile.c: Remove _initialize_compile prototype.
4029         * complaints.c: Remove _initialize_complaints prototype.
4030         * completer.c: Remove _initialize_completer prototype.
4031         * copying.awk: Remove _initialize_copying prototype.
4032         * copying.c: Regenerate.
4033         * core-regset.c: Remove _initialize_core_regset prototype.
4034         * corefile.c: Remove _initialize_core prototype.
4035         * corelow.c: Remove _initialize_corelow prototype.
4036         * cp-abi.c: Remove _initialize_cp_abi prototype.
4037         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
4038         * cp-support.c: Remove _initialize_cp_support prototype.
4039         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
4040         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
4041         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
4042         * ctf.c: Remove _initialize_ctf prototype.
4043         * d-lang.c: Remove _initialize_d_language prototype.
4044         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
4045         prototype.
4046         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
4047         * dbxread.c: Remove _initialize_dbxread prototype.
4048         * dcache.c: Remove _initialize_dcache prototype.
4049         * demangle.c: Remove _initialize_demangler prototype.
4050         * disasm-selftests.c: Remove _initialize_disasm_selftests
4051         prototype.
4052         * disasm.c: Remove _initialize_disasm prototype.
4053         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
4054         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
4055         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
4056         prototype.
4057         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
4058         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
4059         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
4060         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
4061         * elfread.c: Remove _initialize_elfread prototype.
4062         * exec.c: Remove _initialize_exec prototype.
4063         * extension.c: Remove _initialize_extension prototype.
4064         * f-lang.c: Remove _initialize_f_language prototype.
4065         * f-valprint.c: Remove _initialize_f_valprint prototype.
4066         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
4067         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
4068         * filesystem.c: Remove _initialize_filesystem prototype.
4069         * findcmd.c: Remove _initialize_mem_search prototype.
4070         * fork-child.c: Remove _initialize_fork_child prototype.
4071         * frame-base.c: Remove _initialize_frame_base prototype.
4072         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
4073         * frame.c: Remove _initialize_frame prototype.
4074         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
4075         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
4076         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
4077         * gcore.c: Remove _initialize_gcore prototype.
4078         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
4079         * gdbarch.c: Regenerate.
4080         * gdbarch.sh: Remove _initialize_gdbarch prototype.
4081         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
4082         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
4083         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
4084         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
4085         * go-lang.c: Remove _initialize_go_language prototype.
4086         * go32-nat.c: Remove _initialize_go32_nat prototype.
4087         * guile/guile.c: Remove _initialize_guile prototype.
4088         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
4089         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
4090         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
4091         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
4092         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
4093         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
4094         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
4095         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
4096         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
4097         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
4098         prototype.
4099         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
4100         prototype.
4101         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
4102         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
4103         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
4104         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
4105         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
4106         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
4107         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
4108         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
4109         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
4110         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
4111         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
4112         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
4113         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
4114         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4115         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
4116         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
4117         prototype.
4118         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
4119         prototype.
4120         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
4121         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
4122         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
4123         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
4124         * infcall.c: Remove _initialize_infcall prototype.
4125         * infcmd.c: Remove _initialize_infcmd prototype.
4126         * inferior.c: Remove _initialize_inferiors prototype.
4127         * inflow.c: Remove _initialize_inflow prototype.
4128         * infrun.c: Remove _initialize_infrun prototype.
4129         * interps.c: Remove _initialize_interpreter prototype.
4130         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
4131         * jit.c: Remove _initialize_jit prototype.
4132         * language.c: Remove _initialize_language prototype.
4133         * linux-fork.c: Remove _initialize_linux_fork prototype.
4134         * linux-nat.c: Remove _initialize_linux_nat prototype.
4135         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
4136         * linux-thread-db.c: Remove _initialize_thread_db prototype.
4137         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
4138         * m2-lang.c: Remove _initialize_m2_language prototype.
4139         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
4140         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
4141         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
4142         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
4143         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
4144         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4145         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4146         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
4147         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
4148         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
4149         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4150         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4151         * machoread.c: Remove _initialize_machoread prototype.
4152         * macrocmd.c: Remove _initialize_macrocmd prototype.
4153         * macroscope.c: Remove _initialize_macroscope prototype.
4154         * maint.c: Remove _initialize_maint_cmds prototype.
4155         * mdebugread.c: Remove _initialize_mdebugread prototype.
4156         * memattr.c: Remove _initialize_mem prototype.
4157         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
4158         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
4159         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
4160         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
4161         * mi/mi-main.c: Remove _initialize_mi_main prototype.
4162         * microblaze-linux-tdep.c: Remove
4163         _initialize_microblaze_linux_tdep prototype.
4164         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
4165         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
4166         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
4167         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
4168         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
4169         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
4170         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
4171         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
4172         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
4173         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
4174         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
4175         prototype.
4176         * mipsread.c: Remove _initialize_mipsread prototype.
4177         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
4178         prototype.
4179         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
4180         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
4181         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
4182         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
4183         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
4184         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
4185         prototype.
4186         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
4187         * nto-procfs.c: Remove _initialize_procfs prototype.
4188         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
4189         * objc-lang.c: Remove _initialize_objc_language prototype.
4190         * objfiles.c: Remove _initialize_objfiles prototype.
4191         * observer.c: Remove observer_test_first_notification_function,
4192         observer_test_second_notification_function,
4193         observer_test_third_notification_function, and
4194         _initialize_observer prototypes.
4195         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
4196         * osabi.c: Remove _initialize_gdb_osabi prototype.
4197         * osdata.c: Remove _initialize_osdata prototype.
4198         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
4199         * parse.c: Remove _initialize_parse prototype.
4200         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
4201         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
4202         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
4203         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
4204         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
4205         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
4206         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
4207         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
4208         * printcmd.c: Remove _initialize_printcmd prototype.
4209         * probe.c: Remove _initialize_probe prototype.
4210         * proc-api.c: Remove _initialize_proc_api prototype.
4211         * proc-events.c: Remove _initialize_proc_events prototype.
4212         * proc-service.c: Remove _initialize_proc_service prototype.
4213         * procfs.c: Remove _initialize_procfs prototype.
4214         * psymtab.c: Remove _initialize_psymtab prototype.
4215         * python/python.c: Remove _initialize_python prototype.
4216         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
4217         * record-btrace.c: Remove _initialize_record_btrace prototype.
4218         * record-full.c: Remove _initialize_record_full prototype.
4219         * record.c: Remove _initialize_record prototype.
4220         * regcache.c: Remove _initialize_regcache prototype.
4221         * reggroups.c: Remove _initialize_reggroup prototype.
4222         * remote-notif.c: Remove _initialize_notif prototype.
4223         * remote-sim.c: Remove _initialize_remote_sim prototype.
4224         * remote.c: Remove _initialize_remote prototype.
4225         * reverse.c: Remove _initialize_reverse prototype.
4226         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
4227         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
4228         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
4229         prototype.
4230         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
4231         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
4232         * rust-exp.y: Remove _initialize_rust_exp prototype.
4233         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
4234         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
4235         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
4236         * score-tdep.c: Remove _initialize_score_tdep prototype.
4237         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
4238         prototype.
4239         * ser-go32.c: Remove _initialize_ser_dos prototype.
4240         * ser-mingw.c: Remove _initialize_ser_windows prototype.
4241         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
4242         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
4243         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
4244         * serial.c: Remove _initialize_serial prototype.
4245         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
4246         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
4247         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
4248         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
4249         * skip.c: Remove _initialize_step_skip prototype.
4250         * sol-thread.c: Remove _initialize_sol_thread prototype.
4251         * solib-aix.c: Remove _initialize_solib_aix prototype.
4252         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
4253         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
4254         * solib-frv.c: Remove _initialize_frv_solib prototype.
4255         * solib-spu.c: Remove _initialize_spu_solib prototype.
4256         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
4257         * solib-target.c: Remove _initialize_solib_target prototype.
4258         * solib.c: Remove _initialize_solib prototype.
4259         * source.c: Remove _initialize_source prototype.
4260         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
4261         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
4262         prototype.
4263         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
4264         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
4265         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
4266         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
4267         prototype.
4268         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
4269         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
4270         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
4271         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
4272         prototype.
4273         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
4274         prototype.
4275         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
4276         prototype.
4277         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
4278         prototype.
4279         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
4280         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
4281         prototype.
4282         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
4283         prototype.
4284         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
4285         prototype.
4286         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
4287         prototype.
4288         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
4289         prototype.
4290         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
4291         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
4292         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
4293         * stabsread.c: Remove _initialize_stabsread prototype.
4294         * stack.c: Remove _initialize_stack prototype.
4295         * stap-probe.c: Remove _initialize_stap_probe prototype.
4296         * std-regs.c: Remove _initialize_frame_reg prototype.
4297         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
4298         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
4299         * symfile.c: Remove _initialize_symfile prototype.
4300         * symmisc.c: Remove _initialize_symmisc prototype.
4301         * symtab.c: Remove _initialize_symtab prototype.
4302         * target-dcache.c: Remove _initialize_target_dcache prototype.
4303         * target-descriptions.c: Remove _initialize_target_descriptions
4304         prototype.
4305         * thread.c: Remove _initialize_thread prototype.
4306         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
4307         prototype.
4308         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
4309         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
4310         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
4311         prototype.
4312         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
4313         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
4314         * tracefile.c: Remove _initialize_tracefile prototype.
4315         * tracepoint.c: Remove _initialize_tracepoint prototype.
4316         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
4317         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
4318         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
4319         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
4320         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
4321         * tui/tui-win.c: Remove _initialize_tui_win prototype.
4322         * tui/tui.c: Remove _initialize_tui prototype.
4323         * typeprint.c: Remove _initialize_typeprint prototype.
4324         * user-regs.c: Remove _initialize_user_regs prototype.
4325         * utils.c: Remove _initialize_utils prototype.
4326         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
4327         * valarith.c: Remove _initialize_valarith prototype.
4328         * valops.c: Remove _initialize_valops prototype.
4329         * valprint.c: Remove _initialize_valprint prototype.
4330         * value.c: Remove _initialize_values prototype.
4331         * varobj.c: Remove _initialize_varobj prototype.
4332         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
4333         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
4334         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
4335         * windows-nat.c: Remove _initialize_windows_nat,
4336         _initialize_check_for_gdb_ini, and _initialize_loadable
4337         prototypes.
4338         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
4339         * xcoffread.c: Remove _initialize_xcoffread prototype.
4340         * xml-support.c: Remove _initialize_xml_support prototype.
4341         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
4342         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
4343         prototype.
4344         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
4345         prototype.
4346         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
4347
4348 2017-09-08  Keith Seitz  <keiths@redhat.com>
4349
4350         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
4351         field.
4352
4353 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
4354
4355         * f-valprint.c (f_val_print): Remove check for one byte
4356         sized integers. Remove printing of character type.
4357
4358 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
4359             Christoph Weinmann  <christoph.t.weinmann@intel.com>
4360             Bernhard Heckel  <bernhard.heckel@intel.com>
4361
4362         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
4363         to maintain proper indentation when printing pointers/refs.
4364
4365 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4366
4367         GDB 8.0.1 released.
4368
4369 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4370
4371         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
4372
4373 2017-09-05  Tom Tromey  <tom@tromey.com>
4374
4375         * parse.c (funcall_chain): Now a std::vector.
4376         (start_arglist, end_arglist): Simplify.
4377         (free_funcalls): Remove.
4378         (parse_exp_in_context_1): Remove cleanup.
4379
4380 2017-09-05  Tom Tromey  <tom@tromey.com>
4381
4382         * go-exp.y (go_parse): Don't create a cleanup.
4383
4384 2017-09-05  Tom Tromey  <tom@tromey.com>
4385
4386         * d-exp.y (PrimaryExpression): Use std::string.
4387         (d_parse): Don't create a cleanup.
4388
4389 2017-09-05  Tom Tromey  <tom@tromey.com>
4390
4391         * utils.c (do_clear_parser_state): Remove.
4392         (make_cleanup_clear_parser_state): Remove.
4393         * p-exp.y (pascal_parse): Use scoped_restore.
4394         * m2-exp.y (m2_parse): Use scoped_restore.
4395         * f-exp.y (f_parse): Use scoped_restore.
4396         * d-exp.y (d_parse): Use scoped_restore.
4397         * c-exp.y (c_parse): Use scoped_restore.
4398         * ada-exp.y (ada_parse): Use scoped_restore.
4399         * utils.h (make_cleanup_clear_parser_state): Remove.
4400
4401 2017-09-06  Keith Seitz  <keiths@redhat.com>
4402
4403         * dwarf2read.c (dw2_linkage_name_attr): New function.
4404         (dw2_linkage_name): New function.
4405         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
4406         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
4407         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
4408
4409 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4410
4411         * config/djgpp/djconfig.sh: Correct shell portability issue.
4412
4413 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4414
4415         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
4416
4417 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4418
4419         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
4420         * NEWS: Mention new FreeBSD/mips native configuration.
4421         * configure.host: Add aarch64*-*-freebsd*.
4422         * configure.nat: Likewise.
4423         * aarch64-fbsd-nat.c: New file.
4424
4425 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4426
4427         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
4428         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
4429         * NEWS: Mention new FreeBSD/aarch64 target.
4430         * configure.tgt: Add aarch64*-*-freebsd*.
4431         * aarch64-fbsd-tdep.c: New file.
4432         * aarch64-fbsd-tdep.h: New file.
4433
4434 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4435
4436         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
4437
4438 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
4439
4440         * parse.c (find_minsym_type_and_address): Don't relocate addresses
4441         of TLS symbols.
4442
4443 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4444
4445         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
4446         call.
4447
4448 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4449
4450         * infrun.c (follow_exec): Call add_thread after
4451         target_find_description.
4452
4453 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4454
4455         * infrun.c (handle_inferior_event_1): When exec'ing, read
4456         stop_pc after follow_exec.
4457
4458 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4459
4460         * remote.c (process_g_packet): Update error message.
4461
4462 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4463
4464         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
4465         targets.
4466
4467 2017-09-05  Pedro Alves  <palves@redhat.com>
4468
4469         * eval.c (eval_call, evaluate_funcall): New functions, factored
4470         out from ...
4471         (evaluate_subexp_standard): ... this.
4472
4473 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4474
4475         * amd64-tdep.c (amd64_target_description): Create target
4476         descriptions.
4477         (_initialize_amd64_tdep): Don't call functions
4478         initialize_tdesc_amd64_*.  Add self tests.
4479         * arch/amd64.c (amd64_create_target_description): Add parameter
4480         is_linux.  Call set_tdesc_osabi if is_linux is true.
4481         * arch/amd64.h (amd64_create_target_description): Update the
4482         declaration.
4483         * arch/i386.c (i386_create_target_description): Add parameter
4484         is_linux.  Call set_tdesc_osabi if is_linux is true.
4485         * arch/i386.h (i386_create_target_description): Update
4486         declaration.
4487         * configure.tgt: Add i386.o to gdb_target_obs.
4488         * features/Makefile (XMLTOC): Remove i386/*.xml.
4489         * features/i386/amd64-avx-avx512.c: Remove.
4490         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
4491         * features/i386/amd64-avx-mpx.c: Remove.
4492         * features/i386/amd64-avx.c: Remove.
4493         * features/i386/amd64-mpx.c: Remove.
4494         * features/i386/amd64.c: Remove.
4495         * features/i386/i386-avx-avx512.c: Remove.
4496         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
4497         * features/i386/i386-avx-mpx.c: Remove.
4498         * features/i386/i386-avx.c: Remove.
4499         * features/i386/i386-mmx.c: Remove.
4500         * features/i386/i386-mpx.c: Remove.
4501         * features/i386/i386.c: Remove.
4502         * i386-tdep.c: Don't include features/i386/i386*.c., include
4503         target-descriptions.h and arch/i386.h.
4504         (i386_target_description): Create target descriptions.
4505         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
4506         functions.  Do self tests.
4507
4508 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4509
4510         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
4511         * features/i386/amd64-avx-avx512-linux.c: Removed.
4512         * features/i386/amd64-avx-linux.c: Removed.
4513         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
4514         * features/i386/amd64-avx-mpx-linux.c: Removed.
4515         * features/i386/amd64-linux.c: Removed.
4516         * features/i386/amd64-mpx-linux.c: Removed.
4517         * features/i386/x32-avx-avx512-linux.c: Removed.
4518         * features/i386/x32-avx-linux.c: Removed.
4519         * features/i386/x32-linux.c: Removed.
4520
4521 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4522
4523         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
4524         features/i386/*.c.
4525         (amd64_linux_read_description): Call
4526         amd64_create_target_description.
4527         * arch/amd64.c: New file.
4528         * arch/amd64.h: New file.
4529         * configure.tgt (x86_64-*-linux*): Append amd64.o.
4530         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
4531
4532 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4533
4534         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
4535         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
4536         (amd64_linux_read_description): Create target descriptions.
4537         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
4538         functions.  Add unit tests.
4539         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
4540         x32-core.xml.
4541         * features/i386/64bit-avx.c: Generated.
4542         * features/i386/64bit-avx512.c: Generated.
4543         * features/i386/64bit-core.c: Generated.
4544         * features/i386/64bit-linux.c: Generated.
4545         * features/i386/64bit-mpx.c: Generated.
4546         * features/i386/64bit-pkeys.c: Generated.
4547         * features/i386/64bit-segments.c: Generated.
4548         * features/i386/64bit-sse.c: Generated.
4549         * features/i386/x32-core.c: Generated.
4550         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
4551         c files for amd64-linux and x32-linux.
4552
4553 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4554
4555         * amd64-linux-tdep.c (amd64_linux_read_description): New
4556         function.
4557         (amd64_linux_core_read_description): Call
4558         amd64_linux_read_description.
4559         (amd64_linux_init_abi): Likewise.
4560         (amd64_x32_linux_init_abi): Likewise.
4561         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
4562         * x86-linux-nat.c (x86_linux_read_description): Call
4563         amd64_linux_read_description.
4564
4565 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4566
4567         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
4568         comments.
4569
4570 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4571
4572         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
4573         * features/i386/i386-avx-avx512-linux.c: Remove.
4574         * features/i386/i386-avx-linux.c: Remove.
4575         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
4576         * features/i386/i386-avx-mpx-linux.c: Remove.
4577         * features/i386/i386-linux.c: Remove.
4578         * features/i386/i386-mmx-linux.c: Remove.
4579         * features/i386/i386-mpx-linux.c: Remove.
4580
4581 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4582
4583         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
4584         (SFILES): Add arch/i386.c.
4585         (HFILES_NO_SRCDIR): Add arch/i386.h.
4586         * arch/i386.c: New file.
4587         * arch/i386.h: New file.
4588         * arch/tdesc.h (allocate_target_description): Declare.
4589         (set_tdesc_architecture): Declare.
4590         (set_tdesc_osabi): Declare.
4591         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
4592         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
4593         include arch/i386.h.
4594         (i386_linux_read_description): Remove code and call
4595         i386_create_target_description.
4596         (set_tdesc_architecture): New function.
4597         (set_tdesc_osabi): New function.
4598         * target-descriptions.h (allocate_target_description): Remove.
4599
4600 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4601
4602         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
4603         * target-descriptions.c (tdesc_create_feature): Likewise, and
4604         adjust code.
4605         * features/i386/32bit-avx.c: Re-generated.
4606         * features/i386/32bit-avx512.c: Re-generated.
4607         * features/i386/32bit-core.c: Re-generated.
4608         * features/i386/32bit-linux.c: Re-generated.
4609         * features/i386/32bit-mpx.c: Re-generated.
4610         * features/i386/32bit-pkeys.c: Re-generated.
4611         * features/i386/32bit-sse.c: Re-generated.
4612
4613 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4614
4615         * regformats/regdef.h (struct reg): Override operator == and !=.
4616
4617 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4618
4619         * arch/tdesc.h: New file.
4620         * regformats/regdat.sh: Generate code using tdesc_create_reg.
4621         * target-descriptions.c: Update comments.
4622         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
4623         declarations.
4624         * features/i386/32bit-avx.c: Re-generated.
4625         * features/i386/32bit-avx512.c: Re-generated.
4626         * features/i386/32bit-core.c: Re-generated.
4627         * features/i386/32bit-linux.c: Re-generated.
4628         * features/i386/32bit-mpx.c: Re-generated.
4629         * features/i386/32bit-pkeys.c: Re-generated.
4630         * features/i386/32bit-sse.c: Re-generated.
4631
4632 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4633
4634         * regformats/regdat.sh: Update generated code.
4635
4636 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4637
4638         * regformats/regdat.sh: Adjust code order.
4639
4640 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4641
4642         * expprint.c (dump_subexp_body_standard): Use constant format
4643         string in fprintf_filtered call.
4644
4645 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4646
4647         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
4648         NetBSD/i386.
4649         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
4650
4651 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4652
4653         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
4654
4655 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4656
4657         * bsd-kvm.o: Define _KMEMUSER.
4658         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
4659         * configure: Regenerate.
4660
4661 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4662
4663         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
4664         * i386-fbsd-nat.c: Likewise.
4665
4666 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4667
4668         * unittests/array-view-selftests.c: Add include of <array>.
4669
4670 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4671
4672         * spu-tdep.c (flush_ea_cache): Add missing argument to
4673         call_function_by_hand.
4674
4675 2017-09-04  Pedro Alves  <palves@redhat.com>
4676
4677         * NEWS (Safer support for debugging with no debug info): New.
4678
4679 2017-09-04  Pedro Alves  <palves@redhat.com>
4680
4681         * c-exp.y (function_method, function_method_void): Add current
4682         instance flags to TYPE_INSTANCE.
4683         * dwarf2read.c (check_modifier): New.
4684         (compute_delayed_physnames): Assert that only C++ adds delayed
4685         physnames.  Mark fn_fields as const/volatile depending on
4686         physname.
4687         * eval.c (make_params): New type_instance_flags parameter.  Use
4688         it as the new type's instance flags.
4689         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
4690         flags element and pass it to make_params.
4691         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
4692         instance flags element.
4693         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
4694         * gdbtypes.h: Include "enum-flags.h".
4695         (type_instance_flags): New enum-flags type.
4696         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
4697         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
4698         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
4699         (follow_type_instance_flags): New function.
4700         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
4701         * parser-defs.h (follow_type_instance_flags): Declare.
4702         * valops.c (value_struct_elt_for_reference): const/volatile must
4703         match too.
4704
4705 2017-09-04  Pedro Alves  <palves@redhat.com>
4706
4707         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
4708         function/method scopes; lookup the nested name as a function local
4709         static variable.
4710
4711 2017-09-04  Pedro Alves  <palves@redhat.com>
4712
4713         (%type <voidval>): Add function_method.
4714         * c-exp.y (exp): New production for calls with no arguments.
4715         (function_method, function_method_void_or_typelist): New
4716         productions.
4717         (exp): New production for "method()::static_var".
4718         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
4719         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4720         Handle OP_FUNC_STATIC_VAR.
4721         * parse.c (operator_length_standard):
4722         Handle OP_FUNC_STATIC_VAR.
4723
4724 2017-09-04  Pedro Alves  <palves@redhat.com>
4725
4726         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
4727         handling.
4728         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4729         Ditto.
4730         * parse.c (operator_length_standard, operator_check_standard):
4731         Ditto.
4732         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
4733
4734 2017-09-04  Pedro Alves  <palves@redhat.com>
4735
4736         * ax-gdb.c: Include "typeprint.h".
4737         (gen_expr_for_cast): New function.
4738         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
4739         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
4740         type is unknown.
4741         * dwarf2read.c (new_symbol_full): Fallback to int instead of
4742         nodebug_data_symbol.
4743         * eval.c: Include "typeprint.h".
4744         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
4745         Error out if symbol has unknown type.
4746         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
4747         evaluate_subexp_for_cast.
4748         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
4749         OP_VAR_MSYM_VALUE.
4750         (evaluate_subexp_for_cast): New function.
4751         * gdbtypes.c (init_nodebug_var_type): New function.
4752         (objfile_type): Use it to initialize types of variables with no
4753         debug info.
4754         * typeprint.c (error_unknown_type): New.
4755         * typeprint.h (error_unknown_type): New declaration.
4756         * compile/compile-c-types.c (convert_type_basic): Handle
4757         TYPE_CODE_ERROR; warn and fallback to int for variables with
4758         unknown type.
4759
4760 2017-09-04  Pedro Alves  <palves@redhat.com>
4761
4762         * eval.c (evaluate_var_value): New function, factored out from ...
4763         (evaluate_subexp_standard): ... here.
4764
4765 2017-09-04  Pedro Alves  <palves@redhat.com>
4766
4767         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
4768         Remove useless assignments to 'op'.
4769
4770 2017-09-04  Pedro Alves  <palves@redhat.com>
4771
4772         * eval.c (eval_skip_value): New function.
4773         (evaluate_subexp_standard): Use it.
4774
4775 2017-09-04  Pedro Alves  <palves@redhat.com>
4776
4777         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
4778         function name from symbol/minsym and pass it to
4779         error_call_unknown_return_type.
4780
4781 2017-09-04  Pedro Alves  <palves@redhat.com>
4782
4783         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
4784         * ax-gdb.c (gen_msym_var_ref): New function.
4785         (gen_expr): Handle OP_VAR_MSYM_VALUE.
4786         * eval.c (evaluate_var_msym_value): New function.
4787         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
4788         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
4789         to call_function_by_hand.
4790         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4791         Handle OP_VAR_MSYM_VALUE.
4792         (union exp_element) <msymbol>: New field.
4793         * minsyms.h (struct type): Forward declare.
4794         (find_minsym_type_and_address): Declare.
4795         * parse.c (write_exp_elt_msym): New function.
4796         (write_exp_msymbol): Delete, refactored as ...
4797         (find_minsym_type_and_address): ... this new function.
4798         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
4799         (operator_length_standard, operator_check_standard): Handle
4800         OP_VAR_MSYM_VALUE.
4801         * std-operator.def (OP_VAR_MSYM_VALUE): New.
4802
4803 2017-09-04  Pedro Alves  <palves@redhat.com>
4804
4805         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
4806         TYPE_GNU_IFUNC specially here.  Throw error if return type is
4807         unknown.
4808         * ada-typeprint.c (print_func_type): Handle functions with unknown
4809         return type.
4810         * c-typeprint.c (c_type_print_base): Handle functions and methods
4811         with unknown return type.
4812         * compile/compile-c-symbols.c (convert_symbol_bmsym)
4813         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
4814         * compile/compile-c-types.c: Include "objfiles.h".
4815         (convert_func): For functions with unknown return type, warn and
4816         default to int.
4817         * compile/compile-object-run.c (compile_object_run): Adjust call
4818         to call_function_by_hand_dummy.
4819         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
4820         call_function_by_hand.
4821         * eval.c (evaluate_subexp_standard): Adjust calls to
4822         call_function_by_hand.  Handle functions and methods with unknown
4823         return type.  Pass expect_type to call_function_by_hand.
4824         * f-typeprint.c (f_type_print_base): Handle functions with unknown
4825         return type.
4826         * gcore.c (call_target_sbrk): Adjust call to
4827         call_function_by_hand.
4828         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
4829         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
4830         an integer address type instead of nodebug.
4831         * guile/scm-value.c (gdbscm_value_call): Adjust call to
4832         call_function_by_hand.
4833         * infcall.c (error_call_unknown_return_type): New function.
4834         (call_function_by_hand): New "default_return_type" parameter.
4835         Pass it down.
4836         (call_function_by_hand_dummy): New "default_return_type"
4837         parameter.  Use it instead of defaulting to int.  If there's no
4838         default and the return type is unknown, throw an error.  If
4839         there's a default return type, and the called function has no
4840         debug info, then assume the function is prototyped.
4841         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
4842         New "default_return_type" parameter.
4843         (error_call_unknown_return_type): New declaration.
4844         * linux-fork.c (call_lseek): Cast return type of lseek.
4845         (inferior_call_waitpid, checkpoint_command): Adjust calls to
4846         call_function_by_hand.
4847         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
4848         calls to call_function_by_hand.
4849         * m2-typeprint.c (m2_procedure): Handle functions with unknown
4850         return type.
4851         * objc-lang.c (lookup_objc_class, lookup_child_selector)
4852         (value_nsstring, print_object_command): Adjust calls to
4853         call_function_by_hand.
4854         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
4855         functions with unknown return type.
4856         (pascal_type_print_func_varspec_suffix): New function.
4857         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
4858         TYPE_CODE_METHOD>: Use it.
4859         * python/py-value.c (valpy_call): Adjust call to
4860         call_function_by_hand.
4861         * rust-lang.c (rust_evaluate_funcall): Adjust call to
4862         call_function_by_hand.
4863         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
4864         call_function_by_hand.
4865         * valops.c (value_allocate_space_in_inferior): Adjust call to
4866         call_function_by_hand.
4867         * typeprint.c (type_print_unknown_return_type): New function.
4868         * typeprint.h (type_print_unknown_return_type): New declaration.
4869
4870 2017-09-04  Pedro Alves  <palves@redhat.com>
4871
4872         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
4873         types with more than one parameter as prototyped.
4874
4875 2017-09-04  Pedro Alves  <palves@redhat.com>
4876
4877         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
4878         (disassemble_command): Use gdb_disassembly_flags instead of bare
4879         int.
4880         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
4881         (dump_insns, do_mixed_source_and_assembly_deprecated)
4882         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
4883         Use gdb_disassembly_flags instead of bare int.
4884         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
4885         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
4886         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
4887         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
4888         (enum gdb_disassembly_flag): ... values of this new enumeration.
4889         (gdb_disassembly_flags): Define.
4890         (gdb_disassembly)
4891         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
4892         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
4893         gdb_disassembly_flags instead of bare int.
4894         * record-btrace.c (btrace_insn_history)
4895         (record_btrace_insn_history, record_btrace_insn_history_range)
4896         (record_btrace_insn_history_from): Use gdb_disassembly_flags
4897         instead of bare int.
4898         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
4899         Use gdb_disassembly_flags instead of bare int.
4900         * target-debug.h (target_debug_print_gdb_disassembly_flags):
4901         Define.
4902         * target-delegates.c: Regenerate.
4903         * target.c (target_insn_history, target_insn_history_from)
4904         (target_insn_history_range): Use gdb_disassembly_flags instead of
4905         bare int.
4906         * target.h: Include "disasm.h".
4907         (struct target_ops) <to_insn_history, to_insn_history_from,
4908         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
4909         int.
4910         (target_insn_history, target_insn_history_from)
4911         (target_insn_history_range): Use gdb_disassembly_flags instead of
4912         bare int.
4913
4914 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
4915
4916         * cli/cli-script.c (build_command_line): For if/while commands,
4917         check whether args is empty.
4918
4919 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
4920
4921         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
4922         (enum command_control_type): Likewise.
4923         (struct command_line): Likewise.
4924         (free_command_lines): Likewise.
4925         (struct command_lines_deleter): Likewise.
4926         (command_line_up): Likewise.
4927         (read_command_lines): Likewise.
4928         (read_command_lines_1): Likewise.
4929         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
4930         (enum command_control_type): Likewise.
4931         (struct command_line): Likewise.
4932         (free_command_lines): Likewise.
4933         (struct command_lines_deleter): Likewise.
4934         (command_line_up): Likewise.
4935         (read_command_lines): Likewise.
4936         (read_command_lines_1): Likewise.
4937         * breakpoint.h: Include cli/cli-script.h.
4938         * extension-priv.h: Likewise.
4939         * gdbcmd.h: Likewise.
4940
4941 2017-09-04  Pedro Alves  <palves@redhat.com>
4942
4943         * ada-lang.c (is_known_support_routine): Move sal declaration to
4944         where it is initialized.
4945         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
4946         (parse_breakpoint_sals, decode_static_tracepoint_spec)
4947         (clear_command, update_static_tracepoint): Remove init_sal
4948         references.  Move declarations closer to initializations.
4949         * cli/cli-cmds.c (list_command): Move sal declarations closer to
4950         initializations.
4951         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
4952         references.  Move sal declarations closer to initializations.
4953         * frame.c (find_frame_sal): Return a symtab_and_line via function
4954         return instead of output parameter.  Remove init_sal references.
4955         * frame.h (find_frame_sal): Return a symtab_and_line via function
4956         return instead of output parameter.
4957         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
4958         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
4959         instead of memset.
4960         (gdbscm_find_pc_line): Remove init_sal reference.
4961         * infcall.c (call_function_by_hand_dummy): Remove init_sal
4962         references.  Move declarations closer to initializations.
4963         * infcmd.c (set_step_frame): Update.  Move declarations closer to
4964         initializations.
4965         (finish_backward): Remove init_sal references.  Move declarations
4966         closer to initializations.
4967         * infrun.c (process_event_stop_test, handle_step_into_function)
4968         (insert_hp_step_resume_breakpoint_at_frame)
4969         (insert_step_resume_breakpoint_at_caller): Likewise.
4970         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
4971         (symbol_to_sal): Likewise.
4972         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
4973         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
4974         to its initialization.
4975         * reverse.c (save_bookmark_command): Use new/delete.  Remove
4976         init_sal references.  Move declarations closer to initializations.
4977         * source.c (get_current_source_symtab_and_line): Remove brace
4978         initialization.
4979         (set_current_source_symtab_and_line): Now takes the sal by const
4980         reference.  Remove brace initialization.
4981         (line_info): Remove init_sal reference.
4982         * source.h (set_current_source_symtab_and_line): Now takes a
4983         symtab_and_line via const reference.
4984         * stack.c (set_current_sal_from_frame): Adjust.
4985         (print_frame_info): Adjust.
4986         (get_last_displayed_sal): Return the sal via function return
4987         instead of via output parameter.  Simplify.
4988         (frame_info): Adjust.
4989         * stack.h (get_last_displayed_sal): Return the sal via function
4990         return instead of via output parameter.
4991         * symtab.c (init_sal): Delete.
4992         (find_pc_sect_line): Remove init_sal references.  Move
4993         declarations closer to initializations.
4994         (find_function_start_sal): Remove init_sal references.  Move
4995         declarations closer to initializations.
4996         * symtab.h (struct symtab_and_line): In-class initialize all
4997         fields.
4998         * tracepoint.c (set_traceframe_context)
4999         (print_one_static_tracepoint_marker): Remove init_sal references.
5000         Move declarations closer to initializations.
5001         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
5002         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
5003         declarations closer to initializations.
5004         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
5005         init_sal references.  Adjust.
5006
5007 2017-09-04  Pedro Alves  <palves@redhat.com>
5008
5009         * ax-gdb.c (agent_command_1): Use range-for.
5010         * break-catch-throw.c (re_set_exception_catchpoint): Update.
5011         * breakpoint.c: Include "common/array-view.h".
5012         (init_breakpoint_sal, create_breakpoint_sal): Change sals
5013         parameter from struct symtabs_and_lines to
5014         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
5015         (breakpoint_sals_to_pc): Change sals parameter from struct
5016         symtabs_and_lines to std::vector reference.
5017         (check_fast_tracepoint_sals): Change sals parameter from struct
5018         symtabs_and_lines to std::array_view.  Use range-for.
5019         (decode_static_tracepoint_spec): Return a std::vector instead of
5020         symtabs_and_lines.  Update.
5021         (create_breakpoint): Update.
5022         (break_range_command, until_break_command, clear_command): Update.
5023         (base_breakpoint_decode_location, bkpt_decode_location)
5024         (bkpt_probe_create_sals_from_location)
5025         (bkpt_probe_decode_location, tracepoint_decode_location)
5026         (tracepoint_probe_decode_location)
5027         (strace_marker_create_sals_from_location): Return a std::vector
5028         instead of symtabs_and_lines.
5029         (strace_marker_create_breakpoints_sal): Update.
5030         (strace_marker_decode_location): Return a std::vector instead of
5031         symtabs_and_lines.  Update.
5032         (update_breakpoint_locations): Change struct symtabs_and_lines
5033         parameters to gdb::array_view.  Adjust.
5034         (location_to_sals): Return a std::vector instead of
5035         symtabs_and_lines.  Update.
5036         (breakpoint_re_set_default): Use std::vector instead of struct
5037         symtabs_and_lines.
5038         (decode_location_default): Return a std::vector instead of
5039         symtabs_and_lines.  Update.
5040         * breakpoint.h: Include "common/array-view.h".
5041         (struct breakpoint_ops) <decode_location>: Now returns a
5042         std::vector instead of returning a symtabs_and_lines via output
5043         parameter.
5044         (update_breakpoint_locations): Change sals parameters to use
5045         gdb::array_view.
5046         * cli/cli-cmds.c (edit_command, list_command): Update to use
5047         std::vector and gdb::array_view.
5048         (ambiguous_line_spec): Adjust to use gdb::array_view and
5049         range-for.
5050         (compare_symtabs): Rename to ...
5051         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
5052         const reference and adjust.
5053         (filter_sals): Rewrite using std::vector and standard algorithms.
5054         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
5055         (jump_command): Update to use std::vector.
5056         * linespec.c (struct linespec_state) <canonical_names>: Update
5057         comment.
5058         (add_sal_to_sals_basic): Delete.
5059         (add_sal_to_sals, filter_results, convert_results_to_lsals)
5060         (decode_line_2, create_sals_line_offset)
5061         (convert_address_location_to_sals, convert_linespec_to_sals)
5062         (convert_explicit_location_to_sals, parse_linespec)
5063         (event_location_to_sals, decode_line_full, decode_line_1)
5064         (decode_line_with_current_source)
5065         (decode_line_with_last_displayed, decode_objc)
5066         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
5067         (linespec_result::~linespec_result): Adjust to use std::vector
5068         instead of symtabs_and_lines.
5069         * linespec.h (linespec_sals::sals): Now a std::vector.
5070         (struct linespec_result): Use std::vector, bool, and in-class
5071         initialization.
5072         (decode_line_1, decode_line_with_current_source)
5073         (decode_line_with_last_displayed): Return std::vector.
5074         * macrocmd.c (info_macros_command): Use std::vector.
5075         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
5076         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
5077         std::vector.
5078         * probe.h (parse_probes): Return a std::vector.
5079         * python/python.c (gdbpy_decode_line): Use std::vector and
5080         gdb::array_view.
5081         * source.c (select_source_symtab, line_info): Use std::vector.
5082         * stack.c (func_command): Use std::vector.
5083         * symtab.h (struct symtabs_and_lines): Delete.
5084         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
5085
5086 2017-09-04  Pedro Alves  <palves@redhat.com>
5087
5088         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5089         unittests/array-view-selftests.c.
5090         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
5091         * common/array-view.h: New file.
5092         * unittests/array-view-selftests.c: New file.
5093
5094 2017-09-04  Pedro Alves  <palves@redhat.com>
5095
5096         * cli/cli-cmds.c (edit_command): Pass message to
5097         ambiguous_line_spec.
5098         (list_command): Pass message to ambiguous_line_spec.  Say
5099         "first"/"last" instead of "start" and "end" to be consistent with
5100         the manual.
5101         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
5102         them to print formatted message.
5103
5104 2017-09-04  Pedro Alves  <palves@redhat.com>
5105
5106         * btrace.c (ftrace_add_pt): Pass btrace_insn to
5107         ftrace_update_insns by reference instead of pointer.
5108
5109 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5110
5111         * i386-go32-tdep.c: Include x86-xstate.h.
5112         (i386_go32_init_abi): Call i386_target_description.
5113         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
5114         if xcr0 is X86_XSTATE_X87_MASK.
5115         * i386-tdep.h (tdesc_i386): Remove the declaration.
5116         (tdesc_i386_mmx): Likewise.
5117
5118 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5119
5120         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
5121         X86_XSTATE_SSE_MASK instead of 0.
5122
5123 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5124
5125         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
5126         i386_target_description.
5127         * i386-fbsd-nat.c (i386fbsd_read_description): Call
5128         i386_target_description.
5129         * i386-tdep.c (i386_gdbarch_init): Likewise.
5130
5131 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5132
5133         * amd64-darwin-tdep.c: Include "x86-xstate.h".
5134         (x86_darwin_init_abi_64): Call amd64_target_description.
5135         * amd64-dicos-tdep.c: Likewise.
5136         * amd64-fbsd-nat.c: Likewise.
5137         * amd64-fbsd-tdep.c: Likewise.
5138         * amd64-nbsd-tdep.c: Likewise.
5139         * amd64-obsd-tdep.c: Likewise.
5140         * amd64-sol2-tdep.c: Likewise.
5141         * amd64-windows-tdep.c: Likewise.
5142         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
5143
5144 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5145
5146         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
5147         (btrace_function) <insn>: Change type to use std::vector.
5148         * btrace.c (ftrace_debug, ftrace_call_num_insn,
5149         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
5150         ftrace_update_insns, ftrace_compute_global_level_offset,
5151         btrace_stitch_bts, btrace_clear, btrace_insn_get,
5152         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
5153         change to std::vector.
5154         (ftrace_update_insns): Adjust to change to std::vector, change
5155         type of INSN parameter.
5156         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
5157         * record-btrace.c (btrace_call_history_insn_range,
5158         btrace_compute_src_line_range,
5159         record_btrace_frame_prev_register): Adjust to change to
5160         std::vector.
5161         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
5162         to change to std::vector.
5163
5164 2017-09-03  Tom Tromey  <tom@tromey.com>
5165
5166         * corefile.c (reopen_exec_file): Use std::string.
5167
5168 2017-09-03  Tom Tromey  <tom@tromey.com>
5169
5170         * compile/compile.c (compile_register_name_mangled): Return
5171         std::string.
5172         * compile/compile-loc2c.c (pushf_register_address): Update.
5173         (pushf_register): Update.
5174         * compile/compile-c-types.c (convert_array): Update.
5175         * compile/compile-c-symbols.c (generate_vla_size): Update.
5176         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
5177         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
5178         (convert_one_symbol): Update.
5179         (generate_c_for_for_one_variable): Update.
5180         * compile/compile-c-support.c (c_get_range_decl_name): Return a
5181         std::string.
5182         (generate_register_struct): Update.
5183         * compile/compile-internal.h (c_get_range_decl_name): Return a
5184         std::string.
5185         (compile_register_name_mangled): Return std::string.
5186
5187 2017-09-03  Tom Tromey  <tom@tromey.com>
5188
5189         * utils.c (perror_string): Return a std::string.
5190         (throw_perror_with_name, perror_warning_with_name): Update.
5191
5192 2017-09-03  Tom Tromey  <tom@tromey.com>
5193
5194         * demangle.c (demangle_command): Use std::string,
5195         unique_xmalloc_ptr.
5196
5197 2017-09-03  Tom Tromey  <tom@tromey.com>
5198
5199         * cli/cli-setshow.c (do_set_command): Use std::string.
5200
5201 2017-09-03  Tom Tromey  <tom@tromey.com>
5202
5203         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
5204
5205 2017-09-03  Tom Tromey  <tom@tromey.com>
5206
5207         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
5208
5209 2017-09-03  Tom Tromey  <tom@tromey.com>
5210
5211         * mi/mi-cmd-env.c (env_execute_cli_command): Use
5212         gdb::unique_xmalloc_ptr.
5213
5214 2017-09-03  Tom Tromey  <tom@tromey.com>
5215
5216         * thread.c (print_thread_info_1): Use string_printf.
5217         (thread_apply_command, thread_apply_all_command): Use
5218         std::string.
5219
5220 2017-09-03  Tom Tromey  <tom@tromey.com>
5221
5222         * valprint.c (val_print_string): Update.
5223         * gdbcore.h (memory_error_message): Return std::string.
5224         * corefile.c (memory_error_message): Return std::string.
5225         (memory_error): Update.
5226         * breakpoint.c (insert_bp_location): Update.
5227
5228 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
5229
5230         * target/waitstatus.h (target_waitstatus_to_string): Change
5231         return type to std::string.
5232         * target/waitstatus.c (target_waitstatus_to_string): Return
5233         std::string.
5234         * target.h (target_waitstatus_to_string): Remove declaration.
5235         * infrun.c (resume, clear_proceed_status_thread,
5236         print_target_wait_results, do_target_wait, save_waitstatus,
5237         stop_all_threads): Adjust.
5238         * record-btrace.c (record_btrace_wait): Adjust.
5239         * target-debug.h
5240         (target_debug_print_struct_target_waitstatus_p): Adjust.
5241
5242 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
5243
5244         PR gdb/22046
5245         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
5246         detection.
5247
5248 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
5249
5250         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
5251         for setting/unsetting environment variables on the remote target.
5252         (New remote packets): Add entries for QEnvironmentHexEncoded,
5253         QEnvironmentUnset and QEnvironmentReset.
5254         * common/environ.c (gdb_environ::operator=): Extend method to
5255         handle m_user_set_env_list and m_user_unset_env_list.
5256         (gdb_environ::clear): Likewise.
5257         (match_var_in_string): Change type of first parameter from 'char
5258         *' to 'const char *'.
5259         (gdb_environ::set): Extend method to handle
5260         m_user_set_env_list and m_user_unset_env_list.
5261         (gdb_environ::unset): Likewise.
5262         (gdb_environ::clear_user_set_env): New method.
5263         (gdb_environ::user_set_envp): Likewise.
5264         (gdb_environ::user_unset_envp): Likewise.
5265         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
5266         m_user_unset_env_list on move constructor/assignment.
5267         (unset): Add new default parameter 'update_unset_list = true'.
5268         (clear_user_set_env): New method.
5269         (user_set_envp): Likewise.
5270         (user_unset_envp): Likewise.
5271         (m_user_set_env_list): New std::set.
5272         (m_user_unset_env_list): Likewise.
5273         * common/rsp-low.c (hex2str): New function.
5274         (bin2hex): New overload for bin2hex function.
5275         * common/rsp-low.c (hex2str): New prototype.
5276         (str2hex): New overload prototype.
5277         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
5278         QEnvironmentUnset and QEnvironmentReset.
5279         (remote_protocol_features): Add QEnvironmentHexEncoded,
5280         QEnvironmentUnset and QEnvironmentReset packets.
5281         (send_environment_packet): New function.
5282         (extended_remote_environment_support): Likewise.
5283         (extended_remote_create_inferior): Call
5284         extended_remote_environment_support.
5285         (_initialize_remote): Add QEnvironmentHexEncoded,
5286         QEnvironmentUnset and QEnvironmentReset packet configs.
5287         * unittests/environ-selftests.c (gdb_selftest_env_var):
5288         New variable.
5289         (test_vector_initialization): New function.
5290         (test_init_from_host_environ): Likewise.
5291         (test_reinit_from_host_environ): Likewise.
5292         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
5293         Likewise.
5294         (test_unset_set_empty_vector): Likewise.
5295         (test_vector_clear): Likewise.
5296         (test_std_move): Likewise.
5297         (test_move_constructor):
5298         (test_self_move): Likewise.
5299         (test_set_unset_reset): Likewise.
5300         (run_tests): Rewrite in terms of the functions above.
5301
5302 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
5303
5304         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
5305         (adi_available): Use a temp variable of type CORE_ADDR as argument
5306         3 when calling target_auxv_search.
5307         (adi_normalize_address): Use masks and xor operators to calculate
5308         normalized address.
5309         (adi_read_versions, adi_write_versions, adi_print_versions)
5310         (do_examine, do_assign): Use paddress.
5311
5312 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
5313
5314         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
5315         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
5316         out of loop and add supply of FIR.
5317         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
5318         add collect of FIR.
5319
5320 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
5321
5322         PR gdb/21827
5323         * cli/cli-script.c (define_command): Don't convert command name
5324         to lower case.
5325
5326 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
5327
5328         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
5329         Update all callers accordingly. Remove all code blocks handling
5330         the case where DISPP is not NULL.
5331
5332 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5333
5334         PR symtab/22003
5335         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
5336         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5337         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
5338
5339 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5340
5341         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
5342         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
5343         (read_comp_units_from_section): New parameter abbrev_section, use
5344         read_and_check_comp_unit_head, allocate signatured_type if needed.
5345         (create_all_comp_units): Update read_comp_units_from_section caller.
5346
5347 2017-08-23  Pedro Alves  <palves@redhat.com>
5348
5349         PR remote/21852
5350         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
5351         to null_ptid and switch to thread without reading the registers
5352         after adding the inferior.
5353
5354 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5355
5356         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
5357         compile-gcc.
5358         * compile/compile.c (compile_gcc, show_compile_gcc): New.
5359         (compile_to_object): Implement compile_gcc.
5360         (_initialize_compile): Install "set compile-gcc".  Initialize
5361         compile_gcc.
5362
5363 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5364
5365         * compile/compile.c (compile_to_object): Conditionally call
5366         set_verbose.  Conditionally call compile or compile_v0.
5367
5368 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
5369
5370         * sparc64-tdep.h: (adi_normalize_address): New export.
5371         * sparc-nat.h: (open_adi_tag_fd): New export.
5372         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
5373         * sparc64-linux-tdep.c:
5374         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
5375         (sparc64_linux_handle_segmentation_fault): New function.
5376         (sparc64_linux_init_abi): Register
5377         sparc64_linux_handle_segmentation_fault
5378         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
5379         (sparc64_addr_bits_remove): New function.
5380         (sparc64_init_abi): Register sparc64_addr_bits_remove.
5381         (MAX_PROC_NAME_SIZE): New macro.
5382         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
5383         (sparc64adilist): New variable.
5384         (adi_proc_list): New variable.
5385         (find_adi_info): New function.
5386         (add_adi_info): New function.
5387         (get_adi_info_proc): New function.
5388         (get_adi_info): New function.
5389         (info_adi_command): New function.
5390         (read_maps_entry): New function.
5391         (adi_available): New function.
5392         (adi_normalize_address): New function.
5393         (adi_align_address): New function.
5394         (adi_convert_byte_count): New function.
5395         (adi_tag_fd): New function.
5396         (adi_is_addr_mapped): New function.
5397         (adi_read_versions): New function.
5398         (adi_write_versions): New function.
5399         (adi_print_versions): New function.
5400         (do_examine): New function.
5401         (do_assign): New function.
5402         (adi_examine_command): New function.
5403         (adi_assign_command): New function.
5404         (_initialize_sparc64_adi_tdep): New function.
5405
5406 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
5407
5408         * breakpoint.c (breakpoints_info): Rename to ...
5409         (info_breakpoints_command): ... this.
5410         (watchpoints_info): Rename to ...
5411         (info_watchpoints_command): ... this.
5412         (tracepoints_info): Rename to ...
5413         (info_tracepoints_command): ... this.
5414         (_initialize_breakpoint): Adjust.
5415         * dcache.c (dcache_info): Rename to ...
5416         (info_display_command): ... this.
5417         (_initialize_dcache): Adjust.
5418         * frame.h (args_info): Rename to ...
5419         (info_args_command): ... this.
5420         (locals_info): Rename to ...
5421         (info_locals_command): ... this.
5422         * infcmd.c (nofp_registers_info): Rename to ...
5423         (info_registers_command): ... this.
5424         (float_info): Rename to ...
5425         (info_float_command): ... this.
5426         (program_info): Rename to ...
5427         (info_program_command): ... this.
5428         (all_registers_info): Rename to ...
5429         (info_all_registers_command): ... this.
5430         (vector_info): Rename to ...
5431         (info_vector_command): ... this.
5432         (float_info): Rename to ...
5433         (info_float_command): ... this.
5434         (_initialize_infcmd): Adjust.
5435         * inferior.h (term_info): Rename to ...
5436         (info_terminal_command): ... this.
5437         * inflow.c (term_info): Rename to ...
5438         (info_terminal_command): ... this.
5439         (_initialize_inflow): Adjust.
5440         * infrun.c (signals_info): Rename to ...
5441         (info_signals_command): ... this.
5442         (_initialize_infrun): Adjust.
5443         * objc-lang.c (classes_info): Rename to ...
5444         (info_classes_command): ... this.
5445         (selectors_info): Rename to ...
5446         (info_selectors_command): ... this.
5447         (_initialize_objc_language): Adjust.
5448         * printcmd.c (sym_info): Rename to ...
5449         (info_symbol_command): ... this.
5450         (address_info): Rename to ...
5451         (info_address_command): ... this.
5452         (display_info): Rename to ...
5453         (info_display_command): ... this.
5454         (_initialize_printcmd): Adjust.
5455         * reverse.c (bookmarks_info): Rename to ...
5456         (info_breakpoints_command): ... this.
5457         (_initialize_reverse): Adjust.
5458         * ser-go32.c (dos_info): Rename to ...
5459         (info_serial_command): ... this.
5460         (_initialize_ser_dos): Adjust.
5461         * skip.c (skip_info): Rename to ...
5462         (info_skip_command): ... this.
5463         (_initialize_step_skip): Adjust.
5464         * source.c (line_info): Rename to ...
5465         (info_line_command): ... this.
5466         (source_info): Rename to ...
5467         (info_source_command)
5468         * stack.c (frame_info): Rename to ...
5469         (info_frame_command): ... this.
5470         (locals_info): Rename to ...
5471         (info_locals_command): ... this.
5472         (args_info): Rename to ...
5473         (info_args_command): ... this.
5474         (_initialize_stack): Adjust.
5475         * symtab.c (sources_info): Rename to ...
5476         (info_sources_command): ... this.
5477         (variables_info): Rename to ...
5478         (info_variables_command): ... this.
5479         (functions_info): Rename to ...
5480         (info_functions_command): ... this.
5481         (types_info): Rename to ...
5482         (info_types_command): ... this.
5483         (_initialize_symtab): Adjust.
5484         * target.c (target_info): Rename to ...
5485         (info_target_command): ... this.
5486         (initialize_targets): Adjust.
5487         * tracepoint.c (tvariables_info): Rename to ...
5488         (info_tvariables_command): ... this.
5489         (scope_info): Rename to ...
5490         (info_scope_command): ... this.
5491         (trace_dump_actions): Adjust.
5492         (_initialize_tracepoint): Adjust.
5493
5494 2017-08-22  Tom Tromey  <tom@tromey.com>
5495
5496         * breakpoint.h (install_breakpoint): Update.
5497         * breakpoint.c (add_solib_catchpoint): Update.
5498         (install_breakpoint): Change argument to a std::unique_ptr.
5499         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
5500         (create_breakpoint_sal, create_breakpoint): Update.
5501         (watch_command_1, catch_exec_command_1)
5502         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
5503         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
5504         Return the breakpoint.
5505         (set_raw_breakpoint_without_location, set_raw_breakpoint)
5506         (new_single_step_breakpoint): Update.
5507         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
5508         std::unique_ptr.
5509         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5510         std::unique_ptr.
5511         * break-catch-sig.c (create_signal_catchpoint): Use
5512         std::unique_ptr.
5513         * ada-lang.c (create_ada_exception_catchpoint): Use
5514         std::unique_ptr.
5515
5516 2017-08-22  Tom Tromey  <tom@tromey.com>
5517
5518         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
5519
5520 2017-08-22  Tom Tromey  <tom@tromey.com>
5521
5522         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
5523         (lookup_partial_symbol): Update.
5524
5525 2017-08-22  Tom Tromey  <tom@tromey.com>
5526
5527         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
5528         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
5529         (find_and_open_source, symtab_to_fullname): Update.
5530         * psymtab.c (psymtab_to_fullname): Update.
5531
5532 2017-08-22  Tom Tromey  <tom@tromey.com>
5533
5534         * exec.c (exec_file_attach): Update.
5535         * linux-thread-db.c (try_thread_db_load): Update.
5536         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
5537         * utils.c (gdb_realpath): Change return type.
5538         (gdb_realpath_keepfile): Update.
5539         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
5540         (_initialize_utils): Register the new self test.
5541         * source.c (openp): Update.
5542         (find_and_open_source): Update.
5543         * nto-tdep.c (nto_find_and_open_solib): Update.
5544         * main.c (set_gdb_data_directory): Update.
5545         (captured_main_1): Update.
5546         * dwarf2read.c (dwarf2_get_dwz_file): Update
5547         (dw2_map_symbol_filenames): Update.
5548         * auto-load.c (auto_load_safe_path_vec_update): Update.
5549         (filename_is_in_auto_load_safe_path_vec): Change type of
5550         "filename_realp".
5551         (auto_load_objfile_script): Update.
5552         (file_is_auto_load_safe): Update.  Use std::string.
5553         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
5554
5555 2017-08-22  Tom Tromey  <tom@tromey.com>
5556
5557         * utils.c (gdb_realpath_keepfile): Return a
5558         gdb::unique_xmalloc_ptr.
5559         * exec.c (exec_file_attach): Update.
5560         * utils.h (gdb_realpath_keepfile): Return a
5561         gdb::unique_xmalloc_ptr.
5562
5563 2017-08-22  Tom Tromey  <tom@tromey.com>
5564
5565         * compile/compile.c (compile_file_command): Use
5566         gdb::unique_xmalloc_ptr, std::string.
5567         * utils.c (gdb_abspath): Change return type.
5568         * source.c (openp): Update.
5569         * objfiles.c (allocate_objfile): Update.
5570         * main.c (set_gdb_data_directory): Update.
5571         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
5572
5573 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
5574
5575         * cli-cmds.c (list_commands): List actual code around more than
5576         one location.
5577
5578 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
5579
5580         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
5581
5582 2017-08-21  Pedro Alves  <palves@redhat.com>
5583
5584         PR gdb/19487
5585         * c-exp.y (variable production): Handle function aliases.
5586         * minsyms.c (msymbol_is_text): New function.
5587         * minsyms.h (msymbol_is_text): Declare.
5588         * symtab.c (find_function_alias_target): New function.
5589         * symtab.h (find_function_alias_target): Declare.
5590
5591 2017-08-21  Pedro Alves  <palves@redhat.com>
5592
5593         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
5594         typedefs.
5595         * typeprint.c (whatis_exp): If handling "whatis", and expression
5596         is OP_TYPE, strip one typedef level.  Otherwise don't strip
5597         typedefs here.
5598         * valops.c (value_cast): Save "to" type before resolving
5599         stubs/typedefs.  Use that type as resulting value's type.
5600
5601 2017-08-18  Tom Tromey  <tom@tromey.com>
5602             Pedro Alves  <palves@redhat.com>
5603
5604         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
5605         * sol-thread.c (sol_thread_resume, sol_thread_wait)
5606         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
5607         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
5608         * proc-service.c (ps_xfer_memory): Use scoped_restore.
5609         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
5610         (linux_get_siginfo_data): Add "thread" argument.  Use
5611         scoped_restore.
5612         * linux-nat.c (linux_child_follow_fork)
5613         (check_stopped_by_watchpoint): Use scoped_restore.
5614         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
5615         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
5616         (restore_inferior_ptid, save_inferior_ptid): Remove.
5617         * btrace.c (btrace_fetch): Use scoped_restore.
5618         * bsd-uthread.c (bsd_uthread_fetch_registers)
5619         (bsd_uthread_store_registers): Use scoped_restore.
5620         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
5621         scoped_restore.
5622         * aix-thread.c (aix_thread_resume, aix_thread_wait)
5623         (aix_thread_xfer_partial): Use scoped_restore.
5624         * inferior.h (save_inferior_ptid): Remove.
5625
5626 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5627
5628         PR tdep/21818
5629         * arm-tdep.c (gdb_print_insn_arm): Mark
5630         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
5631
5632 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5633
5634         * NEWS: Mention GDBserver's new option "--selftest".
5635         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
5636         * selftest.c: Move it to common/selftest.c.
5637         * selftest.h: Move it to common/selftest.h.
5638         * selftest-arch.c (reset): New function.
5639         (tests_with_arch): Call reset.
5640
5641 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5642
5643         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
5644         instead of exception_fprintf and printf_filtered.
5645
5646 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5647
5648         * selftest.c (register_self_test): Rename it to
5649         selftests::register_test.
5650         (run_self_tests): selftest::run_tests.
5651         * selftest.h: Update declarations.
5652         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
5653         selftests::register_test_foreach_arch.
5654         * selftest-arch.h: Update declaration.
5655         * aarch64-tdep.c: Update.
5656         * arm-tdep.c: Likewise.
5657         * disasm-selftests.c: Likewise.
5658         * dwarf2loc.c: Likewise.
5659         * dwarf2-frame.c: Likewise.
5660         * findvar.c: Likewise.
5661         * gdbarch-selftests.c: Likewise.
5662         * maint.c (maintenance_selftest): Likewise.
5663         * regcache.c: Likewise.
5664         * rust-exp.y: Likewise.
5665         * selftest-arch.c: Likewise.
5666         * unittests/environ-selftests.c: Likewise.
5667         * unittests/function-view-selftests.c: Likewise.
5668         * unittests/offset-type-selftests.c: Likewise.
5669         * unittests/optional-selftests.c: Likewise.
5670         * unittests/scoped_restore-selftests.c: Likewise.
5671         * utils-selftests.c: Likewise.
5672
5673 2017-08-17  Pedro Alves  <palves@redhat.com>
5674
5675         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
5676         local.
5677
5678 2017-08-17  Pedro Alves  <palves@redhat.com>
5679
5680         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
5681         field.
5682         (reset_die_in_process): Delete, replaced by ...
5683         (process_die_scope): ... this new class.  Make it responsible for
5684         freeing cu->line_header too.
5685         (process_die): Use process_die_scope.
5686         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
5687         cu->line_header_die_owner.  Don't release the line header if it's
5688         owned by the CU.
5689         (setup_type_unit_groups): Make the CU/DIE own the line header.
5690         Don't release the line header here.
5691
5692 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
5693
5694         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
5695
5696 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5697
5698         * NEWS: Mention new shortcuts for nexti and stepi in TUI
5699         Single-Key mode
5700
5701 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5702
5703         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
5704         mode command list.
5705
5706 2017-08-15  Stafford Horne  <shorne@gmail.com>
5707
5708         * MAINTAINERS (Write After Approval): Add Stafford Horne.
5709
5710 2017-08-15  Stafford Horne  <shorne@gmail.com>
5711
5712         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
5713
5714 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
5715
5716         PR gdb/21954
5717         * infcmd.c (unset_environment_command): Use the 'clear' method on
5718         the environment instead of resetting it.
5719
5720 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
5721
5722         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
5723         platforms.
5724
5725 2017-08-14  Tom Tromey  <tom@tromey.com>
5726
5727         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
5728         (print_binary_chars): Likewise.
5729         (BITS_IN_BYTES): Remove.
5730
5731 2017-08-14  Tom Tromey  <tom@tromey.com>
5732
5733         PR gdb/21675
5734         * valprint.c (LOW_ZERO): Change value to 034.
5735         (print_octal_chars): Add static_asserts for octal constants.
5736         * printcmd.c (print_scalar_formatted): Add 'd' case.
5737
5738 2017-08-11  Tom Tromey  <tom@tromey.com>
5739
5740         * symfile.c (add_symbol_file_command): Use std::vector.
5741
5742 2017-08-14  Tom Tromey  <tom@tromey.com>
5743
5744         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
5745         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5746         std::move.
5747         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
5748
5749 2017-08-11  Pedro Alves  <palves@redhat.com>
5750
5751         * infrun.c (process_event_stop_test): Adjust
5752         function_name_is_marked_for_skip call.
5753         * skip.c: Include <list>.
5754         (skiplist_entry): Make it a class with private fields, and
5755         getters/setters.
5756         (skiplist_entry_chain): Delete.
5757         (skiplist_entries): New.
5758         (skiplist_entry_count): Delete.
5759         (highest_skiplist_entry_num): New.
5760         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
5761         (add_skiplist_entry): Delete.
5762         (skiplist_entry::skiplist_entry): New.
5763         (skiplist_entry::add_entry): New.
5764         (skip_file_command, skip_function): Adjust.
5765         (compile_skip_regexp): Delete.
5766         (skip_command): Don't compile regexp here.  Adjust to use
5767         skiplist_entry::add_entry.
5768         (skip_info): Adjust to use range-for and getters.
5769         (skip_enable_command, skip_disable_command): Adjust to use
5770         range-for and setters.
5771         (skip_delete_command): Adjust to use std::list.
5772         (add_skiplist_entry): Delete.
5773         (skip_file_p): Delete, refactored as ...
5774         (skiplist_entry::do_skip_file_p): ... this new method.
5775         (skip_gfile_p): Delete, refactored as ...
5776         (skiplist_entry::do_gskip_file_p): ... this new method.
5777         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
5778         (skiplist_entry::skip_function_p): ... this new method.
5779         (function_name_is_marked_for_skip): Now returns bool, and takes
5780         the function sal by const reference.  Adjust to use range-for and
5781         skiplist_entry methods.
5782         (_initialize_step_skip): Remove references to
5783         skiplist_entry_chain, skiplist_entry_count.
5784         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
5785         takes the function sal by const reference.
5786
5787 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5788
5789         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
5790         (dwarf2_frame_cache): Remove reset_cache_cleanup.
5791         (dwarf2_frame_cache):
5792         * frame-unwind.c (frame_unwind_try_unwinder): Catch
5793         RETURN_MASK_ALL and set *this_case to NULL.
5794         * frame-unwind.h: Update comments.
5795
5796 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5797
5798         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
5799         (dwarf2_frame_state_copy_regs): Remove.
5800         (dwarf2_frame_state_free_regs): Remove.
5801         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
5802         (dwarf2_restore_rule): Call method .alloc_regs instead of
5803         dwarf2_frame_state_alloc_regs.
5804         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
5805         constructor.  Call std::move.
5806         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
5807         (dwarf2_frame_cache): Likewise.
5808
5809         [GDB_SELF_TEST]: Include selftest.h and
5810         selftest-arch.h.
5811         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
5812         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
5813         execute_cfa_program_test.
5814
5815         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
5816         copy ctor, assignment operator, move assignment.
5817         <alloc_regs>: New method.
5818         <swap>: New method.
5819         (struct dwarf2_frame_state): Delete dtor.
5820         (dwarf2_frame_state_alloc_regs): Remove declaration.
5821         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
5822         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
5823
5824 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5825
5826         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
5827         (dwarf2_frame_state::dwarf2_frame_state): New.
5828         (dwarf2_frame_state::~dwarf2_frame_state): New.
5829         (dwarf2_fetch_cfa_info): Update.
5830         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
5831         rather than a pointer.  Update code.
5832         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
5833         dtor.
5834         <data_align, code_align, retaddr_column>: Change them to const.
5835         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
5836         to bool.
5837
5838 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5839
5840         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
5841         <loc.exp>: New field.
5842         * dwarf2-frame.c (execute_cfa_program): Update.
5843         (dwarf2_frame_prev_register): Update.
5844
5845 2017-08-10  Pedro Alves  <palves@redhat.com>
5846
5847         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
5848
5849 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
5850
5851         * fbsd-nat.c (struct fbsd_fork_info): Remove.
5852         (fbsd_pending_children): Use std::list.
5853         (fbsd_remember_child): Likewise.
5854         (fbsd_is_child_pending): Likewise.
5855         (fbsd_pending_vfork_done): Use std::forward_list.
5856         (fbsd_add_vfork_done): Likewise.
5857         (fbsd_is_vfork_done_pending): Likewise.
5858         (fbsd_next_vfork_done): Likewise.
5859
5860 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
5861
5862         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
5863         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
5864         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
5865         for `mapfilename'.
5866         (fbsd_xfer_partial): Use gdb::byte_vector.
5867         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
5868
5869 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
5870
5871         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
5872         "filestuff.h".
5873         (fbsd_find_memory_regions): Fix `mapfile' initialization.
5874
5875 2017-08-09  Tom Tromey  <tom@tromey.com>
5876
5877         * skip.c (skiplist_entry): New constructor.
5878         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
5879         (skiplist_entry::file_is_glob): Now bool.
5880         (skiplist_entry::file, skiplist_entry::function): Now
5881         std::string.
5882         (make_skip_entry): Return a unique_ptr.  Use new.
5883         (free_skiplist_entry, free_skiplist_entry_cleanup)
5884         (make_free_skiplist_entry_cleanup): Remove.
5885         (skip_command, skip_disable_command, add_skiplist_entry)
5886         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
5887         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
5888         (function_name_is_marked_for_skip): Update.
5889         (skip_delete_command): Update.  Use delete.
5890
5891 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
5892
5893         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
5894         (aarch64_linux_core_read_description): New function.
5895         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
5896
5897 2017-08-09  Pedro Alves  <palves@redhat.com>
5898
5899         * cp-name-parser.y (cp_comp_to_string): Return a
5900         gdb::unique_xmalloc_ptr<char>.
5901         * cp-support.c (replace_typedefs_qualified_name)
5902         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
5903         (cp_canonicalize_string_full): Use op= instead of explicit
5904         convertion.
5905         (cp_class_name_from_physname, method_name_from_physname)
5906         (cp_func_name, cp_remove_params): Adjust to use
5907         gdb::unique_xmalloc_ptr<char>.
5908         * cp-support.h (cp_comp_to_string): Return a
5909         gdb::unique_xmalloc_ptr<char>.
5910         * python/py-type.c (typy_lookup_type): Adjust to use
5911         gdb::unique_xmalloc_ptr<char>.
5912
5913 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
5914
5915         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
5916
5917 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
5918             Yao Qi  <yao.qi@linaro.org>
5919
5920         * cp-support.c (cp_canonicalize_string_full): Use
5921         gdb::unique_xmalloc_ptr<char>.
5922         (cp_canonicalize_string): Likewise.
5923
5924 2017-08-09  Yao Qi  <yao.qi@linaro.org>
5925
5926         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
5927         * regformats/i386/amd64-avx-avx512.dat: Remove.
5928         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
5929         * regformats/i386/amd64-avx-mpx.dat:Remove.
5930         * regformats/i386/amd64-avx.dat: Remove.
5931         * regformats/i386/amd64-mpx.dat: Remove.
5932         * regformats/i386/i386-avx-avx512.dat: Remove.
5933         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
5934         * regformats/i386/i386-avx-mpx.dat: Remove.
5935         * regformats/i386/i386-mmx.dat: Remove.
5936         * regformats/i386/i386-mpx.dat: Remove.
5937
5938 2017-08-09  Yao Qi  <yao.qi@linaro.org>
5939
5940         * amd64-tdep.h (tdesc_x32): Remove the declaration.
5941         * amd64-tdep.c: Don't include features/i386/x32*.c.
5942         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
5943         functions.
5944         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
5945         and i386/x32-avx-avx512.
5946         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
5947         and i386/x32.xml.
5948         * features/i386/x32-avx-avx512.c: Removed.
5949         * features/i386/x32-avx-avx512.xml: Removed.
5950         * features/i386/x32-avx.c: Removed.
5951         * features/i386/x32-avx.xml: Removed.
5952         * features/i386/x32.c: Removed.
5953         * features/i386/x32.xml: Removed.
5954         * regformats/i386/x32-avx-avx512.dat: Removed.
5955         * regformats/i386/x32-avx.dat: Removed.
5956         * regformats/i386/x32.dat: Removed.
5957
5958 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
5959
5960         PR breakpoints/21886
5961         * mem-break.c (default_memory_insert_breakpoint): Use
5962         `->placed_address' rather than `->reqstd_address' for the
5963         breakpoint location.
5964
5965 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
5966
5967         * arch-utils.c (default_print_insn): Remove arch/mach/endian
5968         assertions.
5969
5970 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
5971
5972         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
5973         a union of `tdep_info', `tdesc_data' and `id'.
5974         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
5975         rather than `info.tdep_info'.
5976         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
5977         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5978         * i386-tdep.c (i386_gdbarch_init): Likewise.
5979         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
5980         * mips-tdep.c (mips_gdbarch_init): Likewise.
5981         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5982         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5983         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
5984         `info.tdep_info'.
5985         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
5986         `info.tdep_info'.
5987         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5988         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
5989         `info.tdep_info'.
5990         * spu-tdep.c (spu_gdbarch_init): Likewise.
5991         * gdbarch.h: Regenerate.
5992
5993 2017-08-07  Leszek Swirski  <leszeks@google.com>
5994
5995         PR symtab/20899
5996         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
5997
5998 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5999
6000         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
6001         (gdbsim_open): Rename gdb_argv args object to argv.
6002
6003 2017-08-05  Tom Tromey  <tom@tromey.com>
6004
6005         * compile/compile-object-load.c (compile_object_load): Use
6006         gdb::unique_xmalloc_ptr.
6007         * cli/cli-dump.c (scan_filename): Rename from
6008         scan_filename_with_cleanup.  Change return type.
6009         (scan_expression): Rename from scan_expression_with_cleanup.
6010         Change return type.
6011         (dump_memory_to_file, dump_value_to_file, restore_command):
6012         Use gdb::unique_xmalloc_ptr.  Update.
6013         * cli/cli-cmds.c (find_and_open_script): Use
6014         gdb::unique_xmalloc_ptr.
6015         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
6016         * symmisc.c (maintenance_print_symbols)
6017         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
6018         * symfile.c (symfile_bfd_open, generic_load)
6019         (add_symbol_file_command, remove_symbol_file_command): Use
6020         gdb::unique_xmalloc_ptr.
6021         * source.c (openp): Use gdb::unique_xmalloc_ptr.
6022         * psymtab.c (maintenance_print_psymbols): Use
6023         gdb::unique_xmalloc_ptr.
6024         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
6025         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
6026         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
6027         (reload_shared_libraries_1): Likewise.
6028
6029 2017-08-05  Tom Tromey  <tom@tromey.com>
6030
6031         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
6032         (rust_op_vector, rust_set_vector): New typedefs.
6033         (current_parser): New global.
6034         (work_obstack): Change to pointer type.  Update all users.
6035         (rust_ast, pstate): Remove globals.
6036         (struct rust_parser): New.
6037         (%union) <params, field_inits>: Change type.
6038         (start, tuple_expr, unit_expr, struct_expr_list, literal)
6039         (field_expr, expr_list, maybe_expr_list, type_list): Update.
6040         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
6041         (convert_params_to_types, convert_params_to_expression): Change
6042         type of "params".
6043         (ast_string): Change type of "fields".
6044         (rust_parse): Make a rust_parser.  Remove cleanups.
6045         (rust_lex_tests): Make and install an auto_obstack.
6046
6047 2017-08-04  Yao Qi  <yao.qi@linaro.org>
6048
6049         * configure.srv (ipa_x32_linux_regobj): New.
6050         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
6051         instead of X86_TDESC_AVX512.
6052         (initialize_low_tracepoint): Call
6053         init_registers_x32_avx_avx512_linux.
6054
6055 2017-08-04  Yao Qi  <yao.qi@linaro.org>
6056
6057         * utils.h (gdb_argv): Add namespace std for nullptr_t.
6058
6059 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
6060
6061         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
6062
6063 2017-08-03  Tom Tromey  <tom@tromey.com>
6064
6065         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
6066         Remove.
6067         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
6068
6069 2017-08-03  Tom Tromey  <tom@tromey.com>
6070
6071         * python/py-param.c (compute_enum_values): Use gdb_argv.
6072
6073 2017-08-03  Tom Tromey  <tom@tromey.com>
6074
6075         * utils.h (struct gdb_argv_deleter): New.
6076         (gdb_argv): New class.
6077         * utils.c (gdb_argv::reset): New method.
6078         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
6079         * tracefile.c (tsave_command): Use gdb_argv.
6080         * top.c (new_ui_command): Use gdb_argv.
6081         * symmisc.c (maintenance_print_symbols)
6082         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
6083         * symfile.c (symbol_file_command, generic_load)
6084         (remove_symbol_file_command): Use gdb_argv.
6085         * stack.c (backtrace_command): Use gdb_argv.
6086         * source.c (add_path, show_substitute_path_command)
6087         (unset_substitute_path_command, set_substitute_path_command):
6088         Use gdb_argv.
6089         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
6090         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
6091         * remote.c (extended_remote_run, remote_put_command)
6092         (remote_get_command, remote_delete_command): Use gdb_argv.
6093         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
6094         (gdbsim_open): Use gdb_argv.
6095         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
6096         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
6097         * procfs.c (procfs_info_proc): Use gdb_argv.
6098         * interps.c (interpreter_exec_cmd): Use gdb_argv.
6099         * infrun.c (handle_command): Use gdb_argv.
6100         * inferior.c (add_inferior_command, clone_inferior_command):
6101         Use gdb_argv.
6102         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
6103         * exec.c (exec_file_command): Use gdb_argv.
6104         * cli/cli-cmds.c (alias_command): Use gdb_argv.
6105         * compile/compile.c (build_argc_argv): Use gdb_argv.
6106
6107 2017-08-03  Tom Tromey  <tom@tromey.com>
6108
6109         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
6110
6111 2017-08-03  Tom Tromey  <tom@tromey.com>
6112
6113         * python/python.c (compute_python_string): Return std::string.
6114         (gdbpy_eval_from_control_command): Update.
6115         (do_start_initialization): Use std::string.
6116         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
6117         xstrprintf.
6118         * python/py-breakpoint.c (local_setattro): Use string_printf, not
6119         xstrprintf.
6120
6121 2017-08-03  Tom Tromey  <tom@tromey.com>
6122
6123         * top.h (do_restore_instream_cleanup): Remove.
6124         * top.c (do_restore_instream_cleanup): Remove.
6125         (read_command_file): Use scoped_restore.
6126         * cli/cli-script.c (execute_user_command): Use scoped_restore.
6127
6128 2017-08-03  Tom Tromey  <tom@tromey.com>
6129
6130         * cli/cli-script.c (execute_user_command)
6131         (execute_control_command): Use scoped_restore.
6132
6133 2017-08-03  Tom Tromey  <tom@tromey.com>
6134
6135         * cli/cli-script.c (do_restore_user_call_depth): Remove.
6136         (execute_user_command): Remove user_call_depth; use
6137         user_args_stack's size instead.
6138
6139 2017-08-03  Tom Tromey  <tom@tromey.com>
6140
6141         * top.h (in_user_command): Remove.
6142         * top.c (in_user_command): Remove.
6143         * cli/cli-script.c (do_restore_user_call_depth)
6144         (execute_user_command): Update.
6145
6146 2017-08-03  Tom Tromey  <tom@tromey.com>
6147
6148         * valops.c (search_struct_method): Use gdb::byte_vector.
6149         * valarith.c (value_concat): Use std::vector.
6150         * target.c (memory_xfer_partial): Use gdb::byte_vector.
6151         (simple_search_memory): Likewise.
6152         * printcmd.c (find_string_backward): Use gdb::byte_vector.
6153         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
6154         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
6155         * elfread.c (elf_rel_plt_read): Use std::string.
6156         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
6157         * cli/cli-dump.c (restore_section_callback): Use
6158         gdb::byte_vector.
6159
6160 2017-08-03  Tom Tromey  <tom@tromey.com>
6161
6162         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
6163
6164 2017-08-03  Tom Tromey  <tom@tromey.com>
6165
6166         * tui/tui-regs.c (tui_restore_gdbout): Remove.
6167         (tui_register_format): Use scoped_restore.
6168
6169 2017-08-03  Tom Tromey  <tom@tromey.com>
6170
6171         * reverse.c (exec_direction_default): Remove.
6172         (exec_reverse_once): Use scoped_restore.
6173         * remote.c (restore_remote_timeout): Remove.
6174         (remote_flash_erase, remote_flash_write, remote_flash_done)
6175         (readchar, remote_serial_write): Use scoped_restore.
6176         * cli/cli-script.c (struct source_cleanup_lines_args)
6177         (source_cleanup_lines): Remove.
6178         (script_from_file): Use scoped_restore.
6179         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
6180         (source_command): Use scoped_restore.
6181
6182 2017-08-03  Tom Tromey  <tom@tromey.com>
6183
6184         * utils.h (make_cleanup_free_so): Remove.
6185         * utils.c (do_free_so, make_cleanup_free_so): Remove.
6186         * solist.h (struct so_deleter): New.
6187         (so_list_up): New typedef.
6188         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
6189
6190 2017-08-03  Tom Tromey  <tom@tromey.com>
6191
6192         * utils.h (make_cleanup_restore_current_language): Remove.
6193         * utils.c (do_restore_current_language)
6194         (make_cleanup_restore_current_language): Remove.
6195         * parse.c (parse_exp_in_context_1)
6196         (parse_expression_with_language): Use
6197         scoped_restore_current_language.
6198         * mi/mi-main.c (mi_cmd_execute): Use
6199         scoped_restore_current_language.
6200         * language.h (scoped_restore_current_language): New class.
6201
6202 2017-08-03  Tom Tromey  <tom@tromey.com>
6203
6204         * compile/compile.c (cleanup_unlink_file): Remove.
6205         (compile_to_object): Use gdb::unlinker.
6206         (eval_compile_command): Likewise.
6207
6208 2017-08-03  Tom Tromey  <tom@tromey.com>
6209
6210         * utils.h (make_cleanup_fclose): Remove.
6211         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
6212
6213 2017-08-03  Tom Tromey  <tom@tromey.com>
6214
6215         * top.c (open_terminal_stream): Return gdb_file_up.
6216         (new_ui_command): Update.
6217
6218 2017-08-03  Tom Tromey  <tom@tromey.com>
6219
6220         * source.c (print_source_lines_base, forward_search_command)
6221         (reverse_search_command): Use gdb_file_up.
6222
6223 2017-08-03  Tom Tromey  <tom@tromey.com>
6224
6225         * fbsd-nat.c (fbsd_find_memory_regions): Update.
6226
6227 2017-08-03  Tom Tromey  <tom@tromey.com>
6228
6229         * cli/cli-cmds.c (find_and_open_script): Change return type.
6230         Remove "streamp" and "full_path" parameters.
6231         (source_script_with_search): Update.
6232         * auto-load.c (source_script_file): Update.
6233         * cli/cli-cmds.h (find_and_open_script): Change type.
6234         (open_script): New struct.
6235
6236 2017-08-03  Tom Tromey  <tom@tromey.com>
6237
6238         * xml-support.c (xml_fetch_content_from_file): Update.
6239         * ui-file.c (stdio_file::open): Update.
6240         * tracefile-tfile.c (tfile_start): Update.
6241         * remote.c (remote_file_put, remote_file_get): Update.
6242         * nat/linux-procfs.c (linux_proc_get_int)
6243         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
6244         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
6245         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
6246         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
6247         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
6248         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
6249         * linux-nat.c (linux_proc_pending_signals): Update.
6250         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
6251         (file_closer): Remove.
6252         * compile/compile.c (compile_to_object): Update.
6253         * common/filestuff.h (struct gdb_file_deleter): New.
6254         (gdb_file_up): New typedef.
6255         (gdb_fopen_cloexec): Change return type.
6256         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
6257         * cli/cli-dump.c (fopen_with_cleanup): Remove.
6258         (dump_binary_file, restore_binary_file): Update.
6259         * auto-load.c (auto_load_objfile_script_1): Update.
6260
6261 2017-08-03  Tom Tromey  <tom@tromey.com>
6262
6263         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
6264         (info_static_tracepoint_markers_command): Likewise.
6265         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
6266         * skip.c (skip_info): Use ui_out_emit_table.
6267         * progspace.c (print_program_space): Use ui_out_emit_table.
6268         * osdata.c (info_osdata): Use ui_out_emit_table.
6269         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
6270         ui_out_emit_table.
6271         * linux-thread-db.c (info_auto_load_libthread_db): Use
6272         ui_out_emit_table.
6273         * inferior.c (print_inferior): Use ui_out_emit_table.
6274         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
6275         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
6276         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
6277         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
6278         * ui-out.h (class ui_out_emit_table): New.
6279
6280 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
6281
6282         * mips-tdep.c (mips_fpu_type_str): New function.
6283         (mips_dump_tdep): Call it.
6284
6285 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
6286
6287         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
6288         `->mips_fpu_type'.
6289
6290 2017-07-31  Xavier Roirand  <roirand@adacore.com>
6291
6292         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
6293
6294 2017-07-27  Xavier Roirand  <roirand@adacore.com>
6295
6296         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
6297
6298 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6299
6300         * cli/cli-cmds.c (maintenancechecklist): New variable.
6301         * gdbcmd.h (maintenancechecklist): Declare it.
6302         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
6303         Call i386_linux_read_description with different masks.
6304         * maint.c (maintenance_check_command): New function.
6305         (_initialize_maint_cmds): Call add_prefix_cmd.
6306         * target-descriptions.c (tdesc_reg): override operator != and ==.
6307         (tdesc_type): Likewise.
6308         (tdesc_feature): Likewise.
6309         (target_desc): Likewise.
6310         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
6311         (maintenance_check_xml_descriptions): New function.
6312         (_initialize_target_descriptions) Add command "xml-descriptions".
6313         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
6314
6315 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6316
6317         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
6318         Include features/i386/32bit-*.c.
6319         (i386_linux_read_description): Generate target description if it
6320         doesn't exist.
6321         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
6322         functions.
6323         * features/i386/32bit-linux.c: Re-generated.
6324         * features/i386/32bit-sse.c: Likewise.
6325         * target-descriptions.c (print_c_feature::visit): Print code to
6326         set register number if needed.
6327         (print_c_feature) <m_next_regnum>: New field.
6328
6329 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6330
6331         * features/Makefile (CFILES): Rename with TDESC_CFILES.
6332         (FEATURE_XMLFILES): New.
6333         (FEATURE_CFILES): New.
6334         New rules.
6335         (clean-cfiles): Remove generated c files.
6336         * features/i386/32bit-avx.c: Generated.
6337         * features/i386/32bit-avx512.c: Generated.
6338         * features/i386/32bit-core.c: Generated.
6339         * features/i386/32bit-linux.c: Generated.
6340         * features/i386/32bit-mpx.c: Generated.
6341         * features/i386/32bit-pkeys.c: Generated.
6342         * features/i386/32bit-sse.c: Generated.
6343         * target-descriptions.c: Include algorithm.
6344         (tdesc_element_visitor): Add method visit_end.
6345         (print_c_tdesc): Implement visit_end.
6346         (print_c_tdesc:: m_filename_after_features): Move it to
6347         protected.
6348         (print_c_feature): New class.
6349         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
6350         name starts with "i386/32bit-".
6351
6352 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6353
6354         * target-descriptions.c (tdesc_element_visitor): New class.
6355         (tdesc_element): New class.
6356         (tdesc_reg): Inherit from tdesc_element.
6357         (tdesc_reg::accept): New function.
6358         (tdesc_type): Inherit from tdesc_element.
6359         (tdesc_type::accept): New function.
6360         (tdesc_feature): Inherit from tdesc_element.
6361         (tdesc_feature::accept): New function.
6362         (target_desc): Inherit from tdesc_element.
6363         (target_desc::target_desc): New.
6364         (target_desc::~target_desc): New.
6365         (target_desc::accept): New.
6366         (allocate_target_description): Use new.
6367         (free_target_description): Use delete.
6368         (print_c_tdesc): New class.
6369         (maint_print_c_tdesc_cmd): Adjust.
6370
6371         * features/aarch64.c: Re-generated.
6372         * features/arc-arcompact.c: Re-generated.
6373         * features/arc-v2.c: Re-generated.
6374         * features/arm/arm-with-iwmmxt.c: Re-generated.
6375         * features/arm/arm-with-m.c: Re-generated.
6376         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
6377         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
6378         * features/arm/arm-with-neon.c: Re-generated.
6379         * features/arm/arm-with-vfpv2.c: Re-generated.
6380         * features/arm/arm-with-vfpv3.c: Re-generated.
6381         * features/i386/amd64-avx-avx512.c: Re-generated.
6382         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6383         * features/i386/amd64-avx.c: Re-generated.
6384         * features/i386/amd64-avx-linux.c: Re-generated.
6385         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
6386         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6387         * features/i386/amd64-avx-mpx.c: Re-generated.
6388         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
6389         * features/i386/amd64.c: Re-generated.
6390         * features/i386/amd64-linux.c: Re-generated.
6391         * features/i386/amd64-mpx.c: Re-generated.
6392         * features/i386/amd64-mpx-linux.c: Re-generated.
6393         * features/i386/i386-avx-avx512.c: Re-generated.
6394         * features/i386/i386-avx-avx512-linux.c: Re-generated.
6395         * features/i386/i386-avx.c: Re-generated.
6396         * features/i386/i386-avx-linux.c: Re-generated.
6397         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
6398         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
6399         * features/i386/i386-avx-mpx.c: Re-generated.
6400         * features/i386/i386-avx-mpx-linux.c: Re-generated.
6401         * features/i386/i386.c: Re-generated.
6402         * features/i386/i386-linux.c: Re-generated.
6403         * features/i386/i386-mmx.c: Re-generated.
6404         * features/i386/i386-mmx-linux.c: Re-generated.
6405         * features/i386/i386-mpx.c: Re-generated.
6406         * features/i386/i386-mpx-linux.c: Re-generated.
6407         * features/i386/x32-avx-avx512.c: Re-generated.
6408         * features/i386/x32-avx-avx512-linux.c: Re-generated.
6409         * features/i386/x32-avx.c: Re-generated.
6410         * features/i386/x32-avx-linux.c: Re-generated.
6411         * features/i386/x32.c: Re-generated.
6412         * features/i386/x32-linux.c: Re-generated.
6413         * features/microblaze.c: Re-generated.
6414         * features/microblaze-with-stack-protect.c: Re-generated.
6415         * features/mips64-dsp-linux.c: Re-generated.
6416         * features/mips64-linux.c: Re-generated.
6417         * features/mips-dsp-linux.c: Re-generated.
6418         * features/mips-linux.c: Re-generated.
6419         * features/nds32.c: Re-generated.
6420         * features/nios2.c: Re-generated.
6421         * features/nios2-linux.c: Re-generated.
6422         * features/rs6000/powerpc-32.c: Re-generated.
6423         * features/rs6000/powerpc-32l.c: Re-generated.
6424         * features/rs6000/powerpc-403.c: Re-generated.
6425         * features/rs6000/powerpc-403gc.c : Re-generated.
6426         * features/rs6000/powerpc-405.c: Re-generated.
6427         * features/rs6000/powerpc-505.c: Re-generated.
6428         * features/rs6000/powerpc-601.c: Re-generated.
6429         * features/rs6000/powerpc-602.c: Re-generated.
6430         * features/rs6000/powerpc-603.c: Re-generated.
6431         * features/rs6000/powerpc-604.c: Re-generated.
6432         * features/rs6000/powerpc-64.c: Re-generated.
6433         * features/rs6000/powerpc-64l.c: Re-generated.
6434         * features/rs6000/powerpc-7400.c: Re-generated.
6435         * features/rs6000/powerpc-750.c: Re-generated.
6436         * features/rs6000/powerpc-860.c: Re-generated.
6437         * features/rs6000/powerpc-altivec32.c: Re-generated.
6438         * features/rs6000/powerpc-altivec32l.c: Re-generated.
6439         * features/rs6000/powerpc-altivec64.c: Re-generated.
6440         * features/rs6000/powerpc-altivec64l.c: Re-generated.
6441         * features/rs6000/powerpc-cell32l.c: Re-generated.
6442         * features/rs6000/powerpc-cell64l.c: Re-generated.
6443         * features/rs6000/powerpc-e500.c: Re-generated.
6444         * features/rs6000/powerpc-e500l.c: Re-generated.
6445         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
6446         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
6447         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
6448         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
6449         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
6450         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
6451         * features/rs6000/powerpc-vsx32.c: Re-generated.
6452         * features/rs6000/powerpc-vsx32l.c: Re-generated.
6453         * features/rs6000/powerpc-vsx64.c: Re-generated.
6454         * features/rs6000/powerpc-vsx64l.c: Re-generated.
6455         * features/rs6000/rs6000.c: Re-generated.
6456         * features/s390-linux32.c: Re-generated.
6457         * features/s390-linux32v1.c: Re-generated.
6458         * features/s390-linux32v2.c: Re-generated.
6459         * features/s390-linux64.c: Re-generated.
6460         * features/s390-linux64v1.c: Re-generated.
6461         * features/s390-linux64v2.c: Re-generated.
6462         * features/s390-te-linux64.c: Re-generated.
6463         * features/s390-tevx-linux64.c: Re-generated.
6464         * features/s390-vx-linux64.c: Re-generated.
6465         * features/s390x-linux64.c: Re-generated.
6466         * features/s390x-linux64v1.c: Re-generated.
6467         * features/s390x-linux64v2.c: Re-generated.
6468         * features/s390x-te-linux64.c: Re-generated.
6469         * features/s390x-tevx-linux64.c: Re-generated.
6470         * features/s390x-vx-linux64.c: Re-generated.
6471         * features/sparc/sparc32-solaris.c: Re-generated.
6472         * features/sparc/sparc64-solaris.c: Re-generated.
6473         * features/tic6x-c62x.c: Re-generated.
6474         * features/tic6x-c62x-linux.c: Re-generated.
6475         * features/tic6x-c64x.c: Re-generated.
6476         * features/tic6x-c64x-linux.c: Re-generated.
6477         * features/tic6x-c64xp.c: Re-generated.
6478         * features/tic6x-c64xp-linux.c: Re-generated.
6479
6480 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6481
6482         * i386-linux-tdep.c (i386_linux_read_description): New function.
6483         (i386_linux_core_read_description): Call
6484         i386_linux_read_description.
6485         * i386-linux-tdep.h (i386_linux_read_description): Declare.
6486         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
6487         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
6488         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
6489         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
6490         * x86-linux-nat.c (x86_linux_read_description): Call
6491         i386_linux_read_description.
6492
6493 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6494
6495         * NEWS: Mention it.
6496         * features/Makefile (%.c: %.xml): Pass the xml file name to
6497         command "maint print c-tdesc".
6498         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
6499         name from 'arg'.
6500
6501 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6502
6503         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
6504         in-class initialization.
6505         (tdesc_create_feature): Call new instead of XCNEW.
6506         (free_target_description): Ue delete.
6507
6508 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
6509
6510         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
6511
6512 2017-07-25  Yao Qi  <yao.qi@linaro.org>
6513
6514         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
6515         constant.
6516         (amd64_x32_init_abi): Likewise.
6517         * amd64-tdep.h (amd64_init_abi): Update declaration.
6518         (amd64_x32_init_abi): Likewise.
6519
6520 2017-07-25  Yao Qi  <yao.qi@linaro.org>
6521
6522         PR tdep/21717
6523         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
6524         condition for FPSCR.
6525         (arm_linux_store_inferior_registers): Likewise.
6526
6527 2017-07-22  Tom Tromey  <tom@tromey.com>
6528
6529         * break-catch-syscall.c (struct catch_syscall_inferior_data)
6530         <syscalls_counts>: Now a std::vector.
6531         (get_catch_syscall_inferior_data): Use "new".
6532         (catch_syscall_inferior_data_cleanup): Use "delete".
6533         (insert_catch_syscall, remove_catch_syscall)
6534         (clear_syscall_counts): Update.
6535
6536 2017-07-22  Tom Tromey  <tom@tromey.com>
6537
6538         * break-catch-syscall.c (syscall_catchpoint)
6539         <syscalls_to_be_caught>: Now a std::vector<int>
6540         (~syscall_catchpoint): Remove.
6541         (insert_catch_syscall, remove_catch_syscall)
6542         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
6543         (print_mention_catch_syscall, print_recreate_catch_syscall):
6544         Update.
6545         (create_syscall_event_catchpoint): Change type of "filter"
6546         parameter.
6547         (catch_syscall_split_args): Return a std::vector.
6548         (catch_syscall_command_1, catching_syscall_number_1): Update.
6549
6550 2017-07-22  Tom Tromey  <tom@tromey.com>
6551
6552         * break-catch-throw.c (struct exception_catchpoint)
6553         <exception_rx>: Now a std::string.
6554         (~exception_catchpoint): Remove.
6555         (print_one_detail_exception_catchpoint): Update.
6556         (handle_gnu_v3_exceptions): Change type of except_rx.
6557         (extract_exception_regexp): Return a std::string.
6558         (catch_exception_command_1): Update.
6559
6560 2017-07-22  Tom Tromey  <tom@tromey.com>
6561
6562         * break-catch-sig.c (gdb_signal_type): Remove typedef.
6563         (struct signal_catchpoint) <signals_to_be_caught>: Now a
6564         std::vector.
6565         <catch_all>: Now a bool.
6566         (~signal_catchpoint): Remove.
6567         (signal_catchpoint_insert_location)
6568         (signal_catchpoint_remove_location)
6569         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
6570         (signal_catchpoint_print_mention)
6571         (signal_catchpoint_print_recreate)
6572         (signal_catchpoint_explains_signal): Update.
6573         (create_signal_catchpoint): Change type of "filter" and
6574         "catch_all".
6575         (catch_signal_split_args): Return a std::vector.  Change type of
6576         "catch_all".
6577         (catch_signal_command): Update.
6578
6579 2017-07-20  Pedro Alves  <palves@redhat.com>
6580
6581         * ada-lang.c (ada_language_defn): Make extern.
6582         (_initialize_ada_language): Remove add_language call.
6583         * c-lang.c (c_language_defn, cplus_language_defn)
6584         (asm_language_defn, minimal_language_defn): Make extern.
6585         (_initialize_c_language): Delete.
6586         * completer.c (compare_cstrings): Delete, moved to utils.h.
6587         * d-lang.c (d_language_defn): Make extern.
6588         (_initialize_d_language): Remove add_language calls.
6589         * defs.h (enum language): Add comment.
6590         * f-lang.c (f_language_defn): Make extern.
6591         (_initialize_f_language): Remove add_language call.
6592         * go-lang.c (go_language_defn): Make extern.
6593         (_initialize_go_language): Remove add_language call.
6594         * language.c: Include <algorithm>.
6595         (languages): Redefine as const array.
6596         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
6597         (set_language_command): Handle "local".  Use for-range loop.
6598         (set_language): Remove loop.
6599         (language_enum): Rewrite.
6600         (language_def, language_str): Remove loops.
6601         (add_language): Delete.
6602         (add_set_language_command): New, based on add_languages.
6603         (skip_language_trampoline): Adjust.
6604         (local_language_defn): Delete.
6605         (language_gdbarch_post_init): Adjust.
6606         (_initialize_language): Remove add_language calls.  Call
6607         add_set_language_command.
6608         * language.h (add_language): Delete.
6609         (auto_language_defn)
6610         (unknown_language_defn, minimal_language_defn, ada_language_defn)
6611         (asm_language_defn, c_language_defn, cplus_language_defn)
6612         (d_language_defn, f_language_defn, go_language_defn)
6613         (m2_language_defn, objc_language_defn, opencl_language_defn)
6614         (pascal_language_defn, rust_language_defn): Declare.
6615         * m2-lang.c (m2_language_defn): Make extern.
6616         (_initialize_m2_language): Remove add_language call.
6617         * objc-lang.c (objc_language_defn): Make extern.
6618         (_initialize_objc_language): Remove add_language call.
6619         * opencl-lang.c (opencl_language_defn): Make extern.
6620         (_initialize_opencl_language): Remove add_language call.
6621         * p-lang.c (pascal_language_defn): Make extern.
6622         (_initialize_pascal_language): Delete.
6623         * rust-lang.c (rust_language_defn): Make extern.
6624         (_initialize_rust_language): Delete.
6625         * utils.h (compare_cstrings): New static inline function.
6626
6627 2017-07-20  Pedro Alves  <palves@redhat.com>
6628
6629         * ada-lang.c (ada_to_fixed_type_1): Adjust.
6630         (get_var_value): Constify parameters.
6631         (get_int_var_value): Change prototype.
6632         (to_fixed_range_type): Adjust.
6633         * ada-lang.h (get_int_var_value): Change prototype.
6634
6635 2017-07-20  Pedro Alves  <palves@redhat.com>
6636
6637         * dwarf2read.c (dw2_lookup_symbol): Use
6638         SYMBOL_MATCHES_SEARCH_NAME.
6639         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
6640
6641 2017-07-20  Pedro Alves  <palves@redhat.com>
6642
6643         * block.c (block_iter_name_step, block_iter_name_first)
6644         (block_iter_name_next): Delete.
6645         (block_lookup_symbol_primary): Adjust to use
6646         dict_iter_match_first/dict_iter_match_next.
6647         * block.h (block_iter_name_first, block_iter_name_next): Delete
6648         declarations.
6649         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
6650         dict_iter_match_first/dict_iter_match_next.
6651
6652 2017-07-20  Pedro Alves  <palves@redhat.com>
6653
6654         * cp-support.c (cp_find_first_component_aux): Add missing case for
6655         end of string.
6656
6657 2017-07-18  David Blaikie  <dblaikie@gmail.com>
6658
6659         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
6660         of dwo_cu's dwo_file.
6661
6662 2017-07-18  Yao Qi  <yao.qi@linaro.org>
6663
6664         * remote.c (store_registers_using_G): Remove one line comment.
6665
6666 2017-07-18  Yao Qi  <yao.qi@linaro.org>
6667
6668         * regcache.c (regcache_cpy): Simplify it.
6669         (regcache::cpy_no_passthrough): Remove it.
6670         * regcache.h (cpy_no_passthrough): Remove it.
6671         (regcache_dup, regcache_cpy): Update comments.
6672
6673 2017-07-18  Pedro Alves  <palves@redhat.com>
6674
6675         * remote-sim.c (sim_command_completer): Adjust to work with a
6676         completion_tracker instead of a VEC.
6677
6678 2017-07-17  Pedro Alves  <palves@redhat.com>
6679
6680         * completer.c (complete_source_filenames): New function.
6681         (complete_address_and_linespec_locations): New function.
6682         (location_completer): Use complete_address_and_linespec_locations.
6683         (completion_tracker::build_completion_result): Honor the tracker's
6684         request to suppress append.
6685         * completer.h (completion_tracker::suppress_append_ws)
6686         (completion_tracker::set_suppress_append_ws): New methods.
6687         (completion_tracker::m_suppress_append_ws): New field.
6688         (complete_source_filenames): New declaration.
6689         * linespec.c (linespec_complete_what): New.
6690         (struct ls_parser) <complete_what, completion_word,
6691         completion_quote_char, completion_quote_end, completion_tracker>:
6692         New fields.
6693         (string_find_incomplete_keyword_at_end): New.
6694         (linespec_lexer_lex_string): Record quote char.  If in completion
6695         mode, don't throw.
6696         (linespec_lexer_consume_token): Advance the completion word point.
6697         (linespec_lexer_peek_token): Save/restore completion info.
6698         (save_stream_and_consume_token): New.
6699         (set_completion_after_number): New.
6700         (linespec_parse_basic): Set what to complete next depending on
6701         token.  Handle function and label completions specially.
6702         (parse_linespec): Disable objc shortcut in completion mode.  Set
6703         what to complete next depending on token type.  Skip keyword if in
6704         completion mode.
6705         (complete_linespec_component, linespec_complete): New.
6706         * linespec.h (linespec_complete): Declare.
6707
6708 2017-07-17  Pedro Alves  <palves@redhat.com>
6709
6710         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
6711         Handle 'operator<' / 'operator<<'.
6712
6713 2017-07-17  Pedro Alves  <palves@redhat.com>
6714
6715         * completer.c (collect_explicit_location_matches): Handle
6716         MATCH_LABEL.
6717         (convert_explicit_location_to_linespec): New, factored out from
6718         ...
6719         (convert_explicit_location_to_sals): ... this.
6720         (complete_label): New.
6721         (linespec_complete_label, find_label_symbols_in_block): New.
6722         (find_label_symbols): Add completion_mode parameter and adjust to
6723         call find_label_symbols_in_block.
6724         * linespec.h (linespec_complete_label): Declare.
6725
6726 2017-07-17  Pedro Alves  <palves@redhat.com>
6727
6728         * ada-lang.c (ada_collect_symbol_completion_matches): Add
6729         complete_symbol_mode parameter.
6730         * cli/cli-cmds.c (complete_command): Get the completion result out
6731         of the handle_brkchars tracker if used a custom word point.
6732         * completer.c: Include "linespec.h".
6733         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
6734         (advance_to_expression_complete_word_point): New.
6735         (completion_tracker::completes_to_completion_word): New.
6736         (complete_files_symbols): Pass down
6737         complete_symbol_mode::EXPRESSION.
6738         (explicit_options, probe_options): New.
6739         (collect_explicit_location_matches): Complete on the
6740         explictit_loc->foo instead of word.  Use
6741         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
6742         keyword and options completions.
6743         (backup_text_ptr): Delete.
6744         (skip_keyword): New.
6745         (complete_explicit_location): Remove 'word' parameter.  Add
6746         language, quoted_arg_start and quoted_arg_end parameters.
6747         Rewrite, parsing left to right.
6748         (location_completer): Rewrite.
6749         (location_completer_handle_brkchars): New function.
6750         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
6751         (enum complete_line_internal_reason): Adjust comments.
6752         (completion_tracker::discard_completions): New.
6753         (completer_handle_brkchars_func_for_completer): Handle
6754         location_completer.
6755         (gdb_custom_word_point_brkchars)
6756         (gdb_org_rl_basic_quote_characters): New.
6757         (gdb_completion_word_break_characters_throw)
6758         (completion_find_completion_word): Handle trackers that use a
6759         custom word point.
6760         (completion_tracker::advance_custom_word_point_by): New.
6761         (completion_tracker::build_completion_result): Don't rely on
6762         readline appending the quote char.
6763         (gdb_rl_attempted_completion_function_throw): Handle trackers that
6764         use a custom word point.
6765         (gdb_rl_attempted_completion_function): Restore
6766         rl_basic_quote_characters.
6767         * completer.h (class completion_tracker): Extend intro comment.
6768         (completion_tracker::set_quote_char)
6769         (completion_tracker::quote_char)
6770         (completion_tracker::set_use_custom_word_point)
6771         (completion_tracker::use_custom_word_point)
6772         (completion_tracker::custom_word_point)
6773         (completion_tracker::set_custom_word_point)
6774         (completion_tracker::advance_custom_word_point_by)
6775         (completion_tracker::completes_to_completion_word)
6776         (completion_tracker::discard_completions): New methods.
6777         (completion_tracker::m_quote_char)
6778         (completion_tracker::m_use_custom_word_point)
6779         (completion_tracker::m_custom_word_point): New fields.
6780         (advance_to_expression_complete_word_point): Declare.
6781         * f-lang.c (f_collect_symbol_completion_matches): Add
6782         complete_symbol_mode parameter.
6783         * language.h (struct language_defn)
6784         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
6785         parameter.
6786         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
6787         (linespec_complete_function): New function.
6788         (linespec_lexer_lex_keyword): Adjust.
6789         * linespec.h (linespec_keywords, linespec_complete_function): New
6790         declarations.
6791         * location.c (find_end_quote): New function.
6792         (explicit_location_lex_one): Add explicit_completion_info
6793         parameter.  Save quoting info.  Don't throw if being called for
6794         completion.  Don't handle Ada operators here.
6795         (is_cp_operator, skip_op_false_positives, first_of)
6796         (explicit_location_lex_one_function): New function.
6797         (string_to_explicit_location): Replace 'dont_throw' parameter with
6798         an explicit_completion_info pointer parameter.  Handle it.  Don't
6799         use explicit_location_lex_one to lex function names.  Use
6800         explicit_location_lex_one_function instead.
6801         * location.h (struct explicit_completion_info): New.
6802         (string_to_explicit_location): Replace 'dont_throw' parameter with
6803         an explicit_completion_info pointer parameter.
6804         * symtab.c (default_collect_symbol_completion_matches_break_on):
6805         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
6806         (default_collect_symbol_completion_matches)
6807         (collect_symbol_completion_matches): Add complete_symbol_mode
6808         parameter.
6809         (collect_symbol_completion_matches_type): Pass down
6810         complete_symbol_mode::EXPRESSION.
6811         (collect_file_symbol_completion_matches): Add complete_symbol_mode
6812         parameter.  Handle LINESPEC mode.
6813         * symtab.h (complete_symbol_mode): New.
6814         (default_collect_symbol_completion_matches_break_on)
6815         (default_collect_symbol_completion_matches)
6816         (collect_symbol_completion_matches)
6817         (collect_file_symbol_completion_matches): Add complete_symbol_mode
6818         parameter.
6819
6820 2017-07-17  Pedro Alves  <palves@redhat.com>
6821
6822         * utils.c (enum class strncmp_iw_mode): New.
6823         (strcmp_iw): Rename to ...
6824         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
6825         parameters.  Handle them.
6826         (strncmp_iw): New.
6827         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
6828         * utils.h (strncmp_iw): Declare.
6829         (strcmp_iw): Move describing comments here.
6830
6831 2017-07-17  Pedro Alves  <palves@redhat.com>
6832
6833         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
6834         CP_OPERATOR_STR.
6835         * c-typeprint.c (is_type_conversion_operator): Use
6836         CP_OPERATOR_STR.
6837         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
6838         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
6839         CP_OPERATOR_LEN.
6840         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
6841         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
6842         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
6843         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
6844         CP_OPERATOR_STR.
6845         * location.c: Include "cp-support.h".
6846         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
6847         CP_OPERATOR_STR.
6848         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
6849         CP_OPERATOR_LEN.
6850
6851 2017-07-17  Pedro Alves  <palves@redhat.com>
6852
6853         * cli/cli-cmds.c (complete_command): Use a completion tracker
6854         along with completion_find_completion_word for handle_brkchars
6855         phase.
6856         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
6857         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
6858         (struct gdb_rl_completion_word_info): New.
6859         (gdb_rl_find_completion_word): New.
6860         (completion_find_completion_word): New.
6861         * completer.h (completion_find_completion_word): Declare.
6862
6863 2017-07-17  Pedro Alves  <palves@redhat.com>
6864
6865         * ada-lang.c (symbol_completion_match): Adjust comments.
6866         (symbol_completion_add): Replace vector parameter with
6867         completion_tracker parameter.  Use it.
6868         (ada_make_symbol_completion_list): Rename to...
6869         (ada_collect_symbol_completion_matches): ... this.  Add
6870         completion_tracker parameter and use it.
6871         (ada_language_defn): Adjust.
6872         * break-catch-syscall.c (catch_syscall_completer): Adjust
6873         prototype and work with completion_tracker instead of VEC.
6874         * breakpoint.c (condition_completer): Adjust prototype and work
6875         with completion_tracker instead of VEC.
6876         * c-lang.c (c_language_defn, cplus_language_defn)
6877         (asm_language_defn, minimal_language_defn): Adjust to renames.
6878         * cli/cli-cmds.c (complete_command): Rework using
6879         completion_tracker.  Catch exceptions when completing.
6880         * cli/cli-decode.c (integer_unlimited_completer)
6881         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
6882         with completion_tracker instead of VEC.
6883         * command.h (struct completion_tracker): Forward declare.
6884         (completer_ftype, completer_handle_brkchars_ftype): Change
6885         types.
6886         (complete_on_cmdlist, complete_on_enum): Adjust.
6887         * completer.c: Include <algorithm>.
6888         (struct gdb_completer_state): New.
6889         (current_completion): New global.
6890         (readline_line_completion_function): Delete.
6891         (noop_completer, filename_completer)
6892         (filename_completer_handle_brkchars, complete_files_symbols)
6893         (linespec_location_completer): Adjust to work with a
6894         completion_tracker instead of a VEC.
6895         (string_or_empty): New.
6896         (collect_explicit_location_matches): Adjust to work with a
6897         completion_tracker instead of a VEC.
6898         (explicit_location_completer): Rename to ...
6899         (complete_explicit_location): ... this and adjust to work with a
6900         completion_tracker instead of a VEC.
6901         (location_completer): Adjust to work with a completion_tracker
6902         instead of a VEC.
6903         (add_struct_fields): Adjust to work with a completion_list instead
6904         of VEC.
6905         (expression_completer): Rename to ...
6906         (complete_expression): ... this and adjust to work with a
6907         completion_tracker instead of a VEC.  Use complete_files_symbols.
6908         (expression_completer): Reimplement on top of complete_expression.
6909         (symbol_completer): Adjust to work with a completion_tracker
6910         instead of a VEC.
6911         (enum complete_line_internal_reason): Add describing comments.
6912         (complete_line_internal_normal_command): Adjust to work with a
6913         completion_tracker instead of a VEC.
6914         (complete_line_internal): Rename to ...
6915         (complete_line_internal_1): ... this and adjust to work with a
6916         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
6917         handle_brkchars phase.
6918         (new_completion_tracker): Delete.
6919         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
6920         complete_line_internal_1.
6921         (free_completion_tracker): Delete.
6922         (INITIAL_COMPLETION_HTAB_SIZE): New.
6923         (completion_tracker::completion_tracker)
6924         (completion_tracker::~completion_tracker): New.
6925         (maybe_add_completion): Delete.
6926         (completion_tracker::maybe_add_completion)
6927         (completion_tracker::add_completion)
6928         (completion_tracker::add_completions): New.
6929         (throw_max_completions_reached_error): Delete.
6930         (complete_line): Adjust to work with a completion_tracker instead
6931         of a VEC.  Don't create a completion_tracker_t or check for max
6932         completions here.
6933         (command_completer, command_completer_handle_brkchars)
6934         (signal_completer, reg_or_group_completer_1)
6935         (reg_or_group_completer, default_completer_handle_brkchars):
6936         Adjust to work with a completion_tracker.
6937         (gdb_completion_word_break_characters_throw): New.
6938         (gdb_completion_word_break_characters): Reimplement.
6939         (line_completion_function): Delete.
6940         (completion_tracker::recompute_lowest_common_denominator)
6941         (expand_preserving_ws)
6942         (completion_tracker::build_completion_result)
6943         (completion_result::completion_result)
6944         (completion_result::completion_result)
6945         (completion_result::~completion_result)
6946         (completion_result::completion_result)
6947         (completion_result::release_match_list, compare_cstrings)
6948         (completion_result::sort_match_list)
6949         (completion_result::reset_match_list)
6950         (gdb_rl_attempted_completion_function_throw)
6951         (gdb_rl_attempted_completion_function): New.
6952         * completer.h (completion_list, struct completion_result)
6953         (class completion_tracker): New.
6954         (complete_line): Add completion_tracker parameter.
6955         (readline_line_completion_function): Delete.
6956         (gdb_rl_attempted_completion_function): New.
6957         (noop_completer, filename_completer, expression_completer)
6958         (location_completer, symbol_completer, command_completer)
6959         (signal_completer, reg_or_group_completer): Update prototypes.
6960         (completion_tracker_t, new_completion_tracker)
6961         (make_cleanup_free_completion_tracker): Delete.
6962         (enum maybe_add_completion_enum): Delete.
6963         (maybe_add_completion): Delete.
6964         (throw_max_completions_reached_error): Delete.
6965         * corefile.c (complete_set_gnutarget): Adjust to work with a
6966         completion_tracker instead of a VEC.
6967         * cp-abi.c (cp_abi_completer): Adjust to work with a
6968         completion_tracker instead of a VEC.
6969         * d-lang.c (d_language_defn): Adjust.
6970         * disasm.c (disassembler_options_completer): Adjust to work with a
6971         completion_tracker instead of a VEC.
6972         * f-lang.c (f_make_symbol_completion_list): Rename to ...
6973         (f_collect_symbol_completion_matches): ... this.  Adjust to work
6974         with a completion_tracker instead of a VEC.
6975         (f_language_defn): Adjust.
6976         * go-lang.c (go_language_defn): Adjust.
6977         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
6978         Adjust to work with a completion_tracker instead of a VEC.
6979         * infrun.c (handle_completer): Likewise.
6980         * interps.c (interpreter_completer): Likewise.
6981         * interps.h (interpreter_completer): Likewise.
6982         * language.c (unknown_language_defn, auto_language_defn)
6983         (local_language_defn): Adjust.
6984         * language.h (language_defn::la_make_symbol_completion_list):
6985         Rename to ...
6986         (language_defn::la_collect_symbol_completion_matches): ... this
6987         and adjust to work with a completion_tracker instead of a VEC.
6988         * m2-lang.c (m2_language_defn): Adjust.
6989         * objc-lang.c (objc_language_defn): Adjust.
6990         * opencl-lang.c (opencl_language_defn): Adjust.
6991         * p-lang.c (pascal_language_defn): Adjust.
6992         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
6993         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
6994         with a completion_tracker.
6995         * rust-lang.c (rust_language_defn): Adjust.
6996         * symtab.c (free_completion_list, do_free_completion_list)
6997         (return_val, completion_tracker): Delete.
6998         (completion_list_add_name, completion_list_add_symbol)
6999         (completion_list_add_msymbol, completion_list_objc_symbol)
7000         (completion_list_add_fields, add_symtab_completions): Add
7001         completion_tracker parameter and use it.
7002         (default_make_symbol_completion_list_break_on_1): Rename to...
7003         (default_collect_symbol_completion_matches_break_on): ... this.
7004         Add completion_tracker parameter and use it instead of allocating
7005         a completion tracker here.
7006         (default_make_symbol_completion_list_break_on): Delete old
7007         implementation.
7008         (default_make_symbol_completion_list): Delete.
7009         (default_collect_symbol_completion_matches): New.
7010         (make_symbol_completion_list): Delete.
7011         (collect_symbol_completion_matches): New.
7012         (make_symbol_completion_type): Rename to ...
7013         (collect_symbol_completion_matches_type): ... this.  Add
7014         completion_tracker parameter and use it instead of VEC.
7015         (make_file_symbol_completion_list_1): Rename to...
7016         (collect_file_symbol_completion_matches): ... this.  Add
7017         completion_tracker parameter and use it instead of VEC.
7018         (make_file_symbol_completion_list): Delete.
7019         (add_filename_to_list): Use completion_list instead of a VEC.
7020         (add_partial_filename_data::list): Now a completion_list.
7021         (make_source_files_completion_list): Work with a completion_list
7022         instead of a VEC.
7023         * symtab.h: Include "completer.h".
7024         (default_make_symbol_completion_list_break_on)
7025         (default_make_symbol_completion_list, make_symbol_completion_list)
7026         (make_symbol_completion_type, make_file_symbol_completion_list)
7027         (make_source_files_completion_list): Delete.
7028         (default_collect_symbol_completion_matches_break_on)
7029         (default_collect_symbol_completion_matches)
7030         (collect_symbol_completion_matches)
7031         (collect_symbol_completion_matches_type)
7032         (collect_file_symbol_completion_matches)
7033         (make_source_files_completion_list): New.
7034         * top.c (init_main): Don't install a rl_completion_entry_function
7035         hook.  Install a rl_attempted_completion_function hook instead.
7036         * tui/tui-layout.c (layout_completer): Adjust to work with a
7037         completion_tracker.
7038         * tui/tui-regs.c (tui_reggroup_completer):
7039         * tui/tui-win.c (window_name_completer, focus_completer)
7040         (winheight_completer): Adjust to work with a completion_tracker.
7041         * value.c: Include "completer.h".
7042         (complete_internalvar): Adjust to work with a completion_tracker.
7043         * value.h (complete_internalvar): Likewise.
7044
7045 2017-07-17  Pedro Alves  <palves@redhat.com>
7046
7047         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
7048         renames.
7049         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
7050         comments to completer_ftype's declaration.
7051         <completer_handle_brkchars>: Change type to
7052         completer_handle_brkchars_ftype.
7053         * command.h (completer_ftype): Add describing comment and give
7054         names to parameters.
7055         (completer_ftype_void): Rename to ...
7056         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
7057         (set_cmd_completer_handle_brkchars): Adjust.
7058         * completer.c (filename_completer_handle_brkchars): New function.
7059         (complete_line_internal_normal_command): New function, factored
7060         out from ...
7061         (complete_line_internal): ... here.
7062         (command_completer_handle_brkchars)
7063         (default_completer_handle_brkchars)
7064         (completer_handle_brkchars_func_for_completer): New functions.
7065         * completer.h (set_gdb_completion_word_break_characters): Delete
7066         declaration.
7067         (completer_handle_brkchars_func_for_completer): New declaration.
7068         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
7069         completer_handle_brkchars_func_for_completer.
7070
7071 2017-07-17  Pedro Alves  <palves@redhat.com>
7072
7073         * completer.c (symbol_completer): New function, based on
7074         make_symbol_completion_list_fn.
7075         * completer.h (symbol_completer): New declaration.
7076         * guile/scm-cmd.c (cmdscm_completers): Adjust.
7077         * python/py-cmd.c (completers): Adjust.
7078         * symtab.c (make_symbol_completion_list_fn): Delete.
7079         * symtab.h (make_symbol_completion_list_fn): Delete.
7080         * cli/cli-decode.c (add_cmd): Adjust.
7081
7082 2017-07-17  Pedro Alves  <palves@redhat.com>
7083
7084         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
7085         * dwarf2read.c: Include "filename-seen-cache.h".
7086         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
7087         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
7088         * filename-seen-cache.c: New file.
7089         * filename-seen-cache.h: New file.
7090         * symtab.c: Include "filename-seen-cache.h".
7091         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
7092         (create_filename_seen_cache, clear_filename_seen_cache)
7093         (delete_filename_seen_cache, filename_seen): Delete, parts moved
7094         to filename-seen-cache.h/filename-seen-cache.c.
7095         (output_source_filename, sources_info)
7096         (maybe_add_partial_symtab_filename)
7097         (make_source_files_completion_list): Adjust to use
7098         filename_seen_cache.
7099
7100 2017-07-17  Pedro Alves  <palves@redhat.com>
7101
7102         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
7103         fields.
7104         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
7105         dwarf2_debug_sections*)): New.
7106         (dwarf2_per_objfile::dwarf2_per_objfile(const
7107         dwarf2_per_objfile&)): Declare as deleted.
7108         (dwarf2_per_objfile::operator=): Declare as deleted.
7109         (dwarf2_per_objfile::dwarf2_per_objfile)
7110         (dwarf2_per_objfile::~dwarf2_per_objfile)
7111         (dwarf2_per_objfile::free_cached_comp_units): New.
7112         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
7113         ctor.  Call dwarf2_per_objfile's ctor manually.
7114         (dwarf2_locate_sections): Deleted/refactored as ...
7115         (dwarf2_per_objfile::locate_sections): ... this new method.
7116         (free_cached_comp_units): Defer to
7117         dwarf2_per_objfile::free_cached_comp_units.
7118         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
7119
7120 2017-07-14  Tom Tromey  <tom@tromey.com>
7121
7122         PR rust/21764:
7123         * rust-exp.y (convert_ast_to_expression): Add "want_type"
7124         parameter.
7125         <UNOP_SIZEOF>: Split into separate case.
7126         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
7127
7128 2017-07-14  Tom Tromey  <tom@tromey.com>
7129
7130         PR rust/21763:
7131         * symtab.c (symbol_matches_domain): Add language_rust to special
7132         case.
7133         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
7134         treat LOC_TYPEDEF symbols as variables.
7135
7136 2017-07-14  Pedro Alves  <palves@redhat.com>
7137
7138         * symtab.c (make_file_symbol_completion_list_1): Iterate over
7139         symtabs matching all symtabs with SRCFILE as file name instead of
7140         only considering the first hit, with lookup_symtab.
7141
7142 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7143
7144         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
7145         operator_name parameters.
7146         (gen_expr): Update function call.
7147
7148 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7149
7150         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
7151         parameter.
7152         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
7153         Likewise.
7154         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
7155         parameter, use agent_expr::gdbarch instead, update function
7156         calls.
7157         (locexpr_tracepoint_var_ref): Likewise.
7158         (loclist_tracepoint_var_ref): Likewise.
7159         * ax-gdb.c (gen_trace_static_fields): Likewise.
7160         (gen_traced_pop): Likewise.
7161         (gen_frame_args_address): Likewise.
7162         (gen_frame_locals_address): Likewise.
7163         (gen_var_ref): Likewise.
7164         (gen_struct_ref_recursive): Likewise.
7165         (gen_static_field): Likewise.
7166         (gen_maybe_namespace_elt): Likewise.
7167         (gen_expr): Likewise.
7168         (gen_trace_for_var): Likewise.
7169         (gen_trace_for_expr): Likewise.
7170         (gen_trace_for_return_address): Likewise.
7171
7172 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7173
7174         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
7175         parameter.
7176         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
7177
7178 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7179
7180         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
7181         from ax, update calls.
7182         (gen_usual_arithmetic): Likewise.
7183         (gen_integral_promotions): Likewise.
7184         (gen_bitfield_ref): Likewise.
7185         (gen_primitive_field): Likewise.
7186         (gen_struct_ref_recursive): Likewise.
7187         (gen_struct_ref): Likewise.
7188         (gen_maybe_namespace_elt): Likewise.
7189         (gen_struct_elt_for_reference): Likewise.
7190         (gen_namespace_elt): Likewise.
7191         (gen_aggregate_elt_ref): Likewise.
7192         (gen_expr): Get gdbarch from ax, update calls.
7193         (gen_expr_binop_rest): Likewise.
7194
7195 2017-07-13  Pedro Alves  <palves@redhat.com>
7196
7197         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
7198         as default tdesc.
7199         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
7200         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
7201         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
7202         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
7203         tdep.
7204         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
7205         Get final tdesc from the tdep.
7206         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
7207         default tdesc.
7208         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7209         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7210         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
7211         Use it as default tdesc.
7212         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
7213         down to amd_init_abi.  No longer handle fallback tdesc here.
7214         * amd64-tdep.h (tdesc_x32): Declare.
7215         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
7216         parameter.
7217         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
7218         as default tdesc.
7219
7220 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7221
7222         * s390-linux-tdep.c (s390_process_record): Add support for
7223         instructions new in arch12.
7224
7225 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7226
7227         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
7228         PT_GETFSBASE and PT_GETGSBASE.
7229         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
7230         PT_SETGSBASE.
7231
7232 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7233
7234         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
7235         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
7236         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
7237         those rules.
7238         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
7239         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
7240         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
7241         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
7242         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
7243         * features/i386/amd64.xml: Add 64bit-segments.xml.
7244         * features/i386/amd64-avx-avx512.c: Regenerated.
7245         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
7246         * features/i386/amd64-avx-mpx.c: Regenerated.
7247         * features/i386/amd64-avx.c: Regenerated.
7248         * features/i386/amd64-mpx.c: Regenerated.
7249         * features/i386/amd64.c: Regenerated.
7250         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
7251         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7252         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
7253         * regformats/i386/amd64-avx.dat: Regenerated.
7254         * regformats/i386/amd64-mpx.dat: Regenerated.
7255         * regformats/i386/amd64.dat: Regenerated.
7256
7257 2017-07-10  Yao Qi  <yao.qi@linaro.org>
7258
7259         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7260         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7261
7262 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
7263
7264         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
7265         unsetenv.
7266         * gnulib/aclocal.m4: Regenerate.
7267         * gnulib/config.in: Regenerate.
7268         * gnulib/configure: Regenerate.
7269         * gnulib/import/Makefile.am: Regenerate.
7270         * gnulib/import/Makefile.in: Regenerate.
7271         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7272         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7273         * gnulib/import/m4/environ.m4: New file.
7274         * gnulib/import/m4/setenv.m4: New file.
7275         * gnulib/import/setenv.c: New file.
7276         * gnulib/import/unsetenv.c: New file.
7277
7278 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
7279
7280         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
7281         address when op is DW_OP_addr.
7282
7283 2017-07-09  Tom Tromey  <tom@tromey.com>
7284
7285         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
7286         check and apply to outer type.
7287
7288 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7289
7290         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
7291         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
7292         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
7293         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
7294
7295 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7296
7297         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
7298
7299 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7300
7301         * corelow.c (get_core_siginfo): Remove.
7302         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
7303         instead of get_core_siginfo.
7304         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
7305         * gdbarch.h: Re-generate.
7306         * gdbarch.c: Re-generate.
7307         * linux-tdep.c (linux_core_xfer_siginfo): New.
7308         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
7309
7310 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7311
7312         * corelow.c (thread_section_name): Move to ...
7313         * gdbcore.h (thread_section_name): ... here.
7314
7315 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7316
7317         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
7318         (struct siginfo32): New.
7319         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
7320         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
7321         via ptrace(PT_LWPINFO).
7322
7323 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7324
7325         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
7326         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
7327         (fbsd_get_siginfo_type): New.
7328         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
7329         (_initialize_fbsd_tdep): New.
7330
7331 2017-07-06  David Blaikie  <dblaikie@gmail.com>
7332
7333         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
7334         a singular dwo_unit*) to support multiple CUs in the same way that
7335         multiple TUs are supported.
7336         (create_cus_hash_table): Replace create_dwo_cu with a function for
7337         parsing multiple CUs from a DWO file.
7338         (open_and_init_dwo_file): Use create_cus_hash_table rather than
7339         create_dwo_cu.
7340         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
7341         htab_find, rather than comparing the signature to a singleton CU in
7342         the dwo_file.
7343
7344 2017-07-06  Pedro Alves  <palves@redhat.com>
7345
7346         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
7347
7348 2017-07-04  Pedro Alves  <palves@redhat.com>
7349
7350         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
7351         * gdbtypes.h (TYPE_STATIC): Delete.
7352         (struct fn_field) <is_public, is_abstract, is_static, is_final,
7353         is_synchronized, is_native>: Delete.
7354         <dummy>: Bump.
7355         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
7356         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
7357         (TYPE_FN_FIELD_ABSTRACT): Delete.
7358
7359 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
7360
7361         * buffer.h (buffer_finish): Fix spelling mistakes.
7362
7363 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
7364
7365         * .dir-locals.el: Automatically switch to C-style comments in
7366         versions of Emacs that support the feature.
7367
7368 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7369             Pedro Alves  <palves@redhat.com>
7370
7371         PR cli/21688
7372         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
7373         (process_next_line): New variable 'inline_cmd'.
7374         Adjust 'if' clauses for "python", "compile" and "guile" to use
7375         'command_name_equals' and check for '!inline_cmd'.
7376
7377 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7378
7379         PR cli/21688
7380         * cli/cli-script.c (command_name_equals_not_inline): New function.
7381         (process_next_line): Adjust 'if' clauses for "python", "compile"
7382         and "guile" to use command_name_equals_not_inline.
7383
7384 2017-06-29  Pedro Alves  <palves@redhat.com>
7385
7386         * completer.c (expression_completer): Call
7387         linespec_location_completer instead of location_completer.
7388
7389 2017-06-29  Pedro Alves  <palves@redhat.com>
7390
7391         * completer.c (expression_completer): Remove code that recomputes
7392         'text' from 'word'.
7393
7394 2017-06-29  Yao Qi  <yao.qi@linaro.org>
7395
7396         * regformats/regdat.sh: Generate code with
7397         "ifndef IN_PROCESS_AGENT".
7398
7399 2017-06-28  Pedro Alves  <palves@redhat.com>
7400
7401         * command.h: Include "common/scoped_restore.h".
7402
7403 2017-06-28  Yao Qi  <yao.qi@linaro.org>
7404
7405         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
7406         instead of obstack_grow.
7407
7408 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
7409
7410         PR gdb/21337
7411         * symfile.c (reread_symbols): Call objfiles_changed just before
7412         read_symbols.
7413
7414 2017-06-27  Pedro Alves  <palves@redhat.com>
7415
7416         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
7417         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
7418         (completion_list_add_symbol, completion_list_add_msymbol):
7419         ... these new functions.
7420         (add_symtab_completions)
7421         (default_make_symbol_completion_list_break_on_1): Adjust.
7422
7423 2017-06-27  Pedro Alves  <palves@redhat.com>
7424
7425         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
7426         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
7427         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
7428         dtor.
7429         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
7430         'storage_obstack' field an auto_obstack.  In-class initialize all
7431         non-bitfield fields.  Make minsyms_read bool.
7432         * symfile.c (read_symbols): Adjust.
7433
7434 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
7435
7436         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
7437         (gdbsim_store_register): Likewise.
7438
7439 2017-06-27  Pedro Alves  <palves@redhat.com>
7440
7441         * c-exp.y (name_obstack): Now an auto_obstack.
7442         (yylex): Use auto_obstack::clear.
7443         (c_parse): Use auto_obstack::clear instead of reinitializing and
7444         freeing the obstack.
7445         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
7446         * d-exp.y (name_obstack): Now an auto_obstack.
7447         (yylex): Use auto_obstack::clear.
7448         (d_parse): Use auto_obstack::clear instead of reinitializing and
7449         freeing the obstack.
7450         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
7451         auto_obstack.
7452         * dwarf2read.c (create_addrmap_from_index)
7453         (dwarf2_build_psymtabs_hard)
7454         (update_enumeration_type_from_children): Likewise.
7455         * gdb_obstack.h (auto_obstack): New type.
7456         * go-exp.y (name_obstack): Now an auto_obstack.
7457         (build_packaged_name): Use auto_obstack::clear.
7458         (go_parse): Use auto_obstack::clear instead of reinitializing and
7459         freeing the obstack.
7460         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
7461         auto_obstack.
7462         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
7463         * rust-exp.y (work_obstack): Now an auto_obstack.
7464         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
7465         reinitializing and freeing the obstack.
7466         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
7467         (host_char_to_target): Use auto_obstack.
7468         * utils.h (make_cleanup_obstack_free): Delete declaration.
7469         * valprint.c (generic_emit_char, generic_printstr): Use
7470         auto_obstack.
7471
7472 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7473
7474         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
7475         thread.
7476         (darwin_init_thread_list): Don't update dummy thread.
7477         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
7478
7479 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7480
7481         * record-full.c (netorder16): Remove.
7482
7483 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7484
7485         * common/diagnostics.h: Define macros for GCC.
7486         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
7487         * common/vec.h: Include diagnostics.h.
7488         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
7489         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
7490         warning.
7491
7492 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7493
7494         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
7495         New macro.
7496         * ada-lex.l: Ignore deprecated register warnings.
7497
7498 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7499
7500         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
7501         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
7502
7503 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7504
7505         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
7506         its own line.
7507
7508 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7509
7510         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
7511
7512 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
7513
7514         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
7515         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
7516         (xtensa_register_read_masked): Likewise.
7517
7518 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
7519
7520         * common/environ.c (gdb_environ::unset): Update comment.
7521
7522 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7523
7524         * python/py-unwind.c (pyuw_sniffer): Allocate space for
7525         registers.
7526
7527 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7528
7529         * record-full.c (record_full_exec_insn): Use byte_vector.
7530
7531 2017-06-22  Yao Qi  <yao.qi@linaro.org>
7532
7533         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
7534         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7535
7536 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7537
7538         * remote.c (cached_reg): Move from here...
7539         * regcache.h (cached_reg): ...to here.
7540         * python/py-unwind.c (struct reg_info): Remove.
7541         (cached_frame_info): Use cached_reg_t.
7542         (pyuw_prev_register): Likewise.
7543         (pyuw_sniffer): Use cached_reg_t and allocate registers.
7544         (pyuw_dealloc_cache): Free all registers.
7545
7546 2017-06-22  Pedro Alves  <palves@redhat.com>
7547             Simon Marchi  <simon.marchi@ericsson.com>
7548
7549         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
7550         warning.
7551         * common/diagnostics.h: New file.
7552
7553 2017-06-22  Pedro Alves  <palves@redhat.com>
7554
7555         * common/agent.h: Add include guards.
7556
7557 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
7558
7559         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
7560         talk about addressable units instead of bytes.
7561
7562 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
7563
7564         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
7565         of '::const_iterator'.
7566
7567 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
7568
7569         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7570         'unittests/environ-selftests.c'.
7571         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
7572         * charset.c (find_charset_names): Declare object 'iconv_env'.
7573         Update code to use 'iconv_env' object.  Remove call to
7574         'free_environ'.
7575         * common/environ.c: Include <utility>.
7576         (make_environ): Delete function.
7577         (free_environ): Delete function.
7578         (gdb_environ::clear): New function.
7579         (gdb_environ::operator=): New function.
7580         (gdb_environ::get): Likewise.
7581         (environ_vector): Delete function.
7582         (set_in_environ): Delete function.
7583         (gdb_environ::set): New function.
7584         (unset_in_environ): Delete function.
7585         (gdb_environ::unset): New function.
7586         (gdb_environ::envp): Likewise.
7587         * common/environ.h: Include <vector>.
7588         (struct gdb_environ): Delete; transform into...
7589         (class gdb_environ): ... this class.
7590         (free_environ): Delete prototype.
7591         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
7592         environ_vector): Likewise.
7593         * infcmd.c (run_command_1): Update code to call
7594         'envp' from 'gdb_environ' class.
7595         (environment_info): Update code to call methods from 'gdb_environ'
7596         class.
7597         (unset_environment_command): Likewise.
7598         (path_info): Likewise.
7599         (path_command): Likewise.
7600         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
7601         (inferior::inferior): Initialize 'environment' using the host's
7602         information.
7603         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
7604         Include "environ.h".
7605         (class inferior) <environment>: Change type from 'struct
7606         gdb_environ' to 'gdb_environ'.
7607         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
7608         methods from 'gdb_environ' class.
7609         * solib.c (solib_find_1): Likewise
7610         * unittests/environ-selftests.c: New file.
7611
7612 2017-06-20  Yao Qi  <yao.qi@linaro.org>
7613
7614         * features/i386/i386-linux.xml: Exchange the order of including
7615         32bit-linux.xml and 32bit-sse.xml.
7616         * features/i386/i386-linux.c: Regenerated.
7617
7618 2017-06-20  Yao Qi  <yao.qi@linaro.org>
7619
7620         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
7621         Delete copy ctor and assignment operator.
7622         (tdesc_type): Likewise.
7623         (tdesc_feature): Likewise.
7624         (tdesc_free_reg): Remove.
7625         (tdesc_create_reg): Use new.
7626         (tdesc_free_type): Remove.
7627         (tdesc_create_vector): Use new.
7628         (tdesc_create_union): Likewise.
7629         (tdesc_create_flags): Likewise.
7630         (tdesc_create_enum): Likewise.
7631         (tdesc_free_feature): Delete.
7632         (free_target_description): Use delete.
7633
7634 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
7635
7636         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
7637         registers.
7638
7639 2017-06-19  Pedro Alves  <palves@redhat.com>
7640
7641         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
7642         after gdb::unlinker.
7643
7644 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
7645
7646         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
7647         gdb_environ to access an environment variable.
7648
7649 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
7650
7651         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
7652         gdb_byte*.
7653
7654 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7655
7656         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
7657
7658 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7659
7660         * configure: Re-generate.
7661         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
7662
7663 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7664
7665         * configure: Re-generate.
7666         * warning.m4: Pass -Werror to compiler when checking for
7667         supported warning flags.
7668
7669 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7670
7671         * Makefile.in (COMPILE.pre): Add "-x c++".
7672
7673 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
7674             Pedro Alves  <palves@redhat.com>
7675             Yao Qi  <yao.qi@linaro.org>
7676
7677         * defs.h (RequireLongest): New.
7678         (extract_integer): Declare function template.
7679         (extract_signed_integer): Remove the declaration, but define it
7680         static inline.
7681         (extract_unsigned_integer): Likewise.
7682         (store_integer): Declare function template.
7683         (store_signed_integer): Remove the declaration, but define it
7684         static inline.
7685         (store_unsigned_integer): Likewise.
7686         * findvar.c (extract_integer): New function template.
7687         (extract_signed_integer): Remove.
7688         (extract_unsigned_integer): Remove.
7689         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
7690         instantiations.
7691         (store_integer): New function template.
7692         (store_signed_integer): Remove.
7693         (store_unsigned_integer): Remove.
7694         (store_integer): Explicit instantiations.
7695         * regcache.c (regcache_raw_read_signed): Update.
7696         (regcache::raw_read): New function.
7697         (regcache::raw_read_signed): Remove.
7698         (regcache::raw_read_unsigned): Remove.
7699         (regcache_raw_read_unsigned): Update.
7700         (regcache_raw_write_unsigned): Update.
7701         (regcache::raw_write_signed): Remove.
7702         (regcache::raw_write): New function.
7703         (regcache_cooked_read_signed): Update.
7704         (regcache::raw_write_unsigned): Remove.
7705         (regcache::cooked_read_signed): Remove.
7706         (regcache_cooked_read_unsigned): Update.
7707         (regcache::cooked_read_unsigned): Remove.
7708         (regcache_cooked_write_signed): Update.
7709         (regcache_cooked_write_unsigned): Update.
7710         * regcache.h (regcache) <raw_read_signed>: Remove.
7711         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
7712         <raw_read, raw_write>: New.
7713         <cooked_read_signed, cooked_write_signed>: Remove.
7714         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
7715         <cooked_read, cooked_write>: New.
7716         * sh64-tdep.c (sh64_pseudo_register_read): Update.
7717         (sh64_pseudo_register_write): Update.
7718
7719 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
7720
7721         * arc-tdep.c (arc_disassembler_options): New variable.
7722         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
7723         of default_print_insn.
7724         (arc_delayed_print_insn): Set info->section when needed,
7725         use default_print_insn to retrieve a disassembler.
7726
7727 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
7728
7729         PR gdb/21574
7730         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
7731         to mention $SHELL and startup-with-shell.
7732
7733 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
7734
7735         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
7736
7737 2017-06-14  Yao Qi  <yao.qi@linaro.org>
7738
7739         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
7740         default_print_insn instead of print_insn_aarch64.
7741         * arm-tdep.c (gdb_print_insn_arm): Call
7742         default_print_insn instead of print_insn_big_arm
7743         and print_insn_little_arm.
7744         * i386-tdep.c (i386_print_insn): Call default_print_insn
7745         instead of print_insn_i386.
7746         * ia64-tdep.c (ia64_print_insn): Call
7747         default_print_insn instead of print_insn_ia64.
7748         * mips-tdep.c (gdb_print_insn_mips): Call
7749         default_print_insn instead of print_insn_big_mips
7750         and print_insn_little_mips.
7751         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
7752         instead of print_insn_spu.
7753
7754 2017-06-14  Pedro Alves  <palves@redhat.com>
7755
7756         * ada-lang.c: Include "common/byte-vector.h".
7757         (ada_value_primitive_packed_val): Use gdb::byte_vector.
7758         * charset.c (wchar_iterator::iterate): Resize the vector instead
7759         of reserving it.
7760         * common/byte-vector.h: Include "common/def-vector.h".
7761         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
7762         * cli/cli-dump.c: Include "common/byte-vector.h".
7763         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
7764         * common/byte-vector.h: New file.
7765         * common/def-vector.h: New file.
7766         * common/default-init-alloc.h: New file.
7767         * dwarf2loc.c: Include "common/byte-vector.h".
7768         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
7769         instead of reserving it.
7770         * dwarf2read.c: Include "common/byte-vector.h".
7771         (data_buf::m_vec): Now a gdb::byte_vector.
7772         * gdb_regex.c: Include "common/def-vector.h".
7773         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
7774         * mi/mi-main.c: Include "common/byte-vector.h".
7775         (mi_cmd_data_read_memory): Use gdb::byte_vector.
7776         * printcmd.c: Include "common/byte-vector.h".
7777         (print_scalar_formatted): Use gdb::byte_vector.
7778         * valprint.c: Include "common/byte-vector.h".
7779         (maybe_negate_by_bytes, print_decimal_chars): Use
7780         gdb::byte_vector.
7781
7782 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7783
7784         * darwin-nat.c: Include "nat/fork-inferior.h".
7785
7786 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7787
7788         * configure.nat: Factor out Darwin bits that are not
7789         architecture-specific.  Add fork-inferior.o.
7790
7791 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7792
7793         * configure.nat: Factor out AIX bits that are not
7794         architecture-specific.  Add fork-inferior.o.
7795
7796 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7797
7798         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
7799         (read_pieced_value, write_pieced_value): ...here.  Reduce to
7800         wrappers that just call rw_pieced_value.
7801
7802 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7803
7804         * dwarf2loc.c (write_pieced_value): When writing the data for a
7805         memory piece, use write_memory_with_notification instead of
7806         write_memory.
7807
7808 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7809
7810         * valops.c (read_value_memory): Change embedded_offset to
7811         represent a bit offset instead of a byte offset.
7812         * value.h (read_value_memory): Adjust comment.
7813
7814 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7815
7816         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
7817         dest_offset_bits and source_offset_bits.
7818         (write_pieced_value): Likewise.
7819
7820 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7821
7822         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
7823         given by DW_OP_bit_piece.
7824         (write_pieced_value): Likewise.
7825
7826 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7827
7828         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
7829         some other preparations to the places where sufficient information
7830         is available.
7831         (write_pieced_value): Likewise.
7832
7833 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7834
7835         * dwarf2loc.c (bits_to_bytes): New function.
7836         (read_pieced_value): Fix offset calculations for register pieces
7837         on big-endian targets.
7838         (write_pieced_value): Likewise.
7839
7840 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7841
7842         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
7843         (write_pieced_value): Likewise.
7844
7845 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7846
7847         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
7848         transfer the source value's least significant bits, instead of its
7849         lowest-addressed ones.  Rename type_len to max_offset.
7850         (read_pieced_value): Mirror above changes to write_pieced_value as
7851         applicable.
7852
7853 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7854
7855         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
7856         truncate full bytes from dest_offset_bits before using it as an
7857         offset into the buffer.
7858
7859 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7860
7861         * dwarf2loc.c (write_pieced_value): Include transfer size in
7862         byte-wise check.
7863
7864 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7865
7866         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
7867         calculation of this_size.
7868
7869 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7870
7871         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
7872         when targeting a bit-field.
7873         (write_pieced_value): Likewise.
7874
7875 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7876
7877         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
7878         (allocate_piece_closure): Drop addr_size parameter.
7879         (dwarf2_evaluate_loc_desc_full): Adjust call to
7880         allocate_piece_closure.
7881
7882 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7883
7884         PR gdb/21226
7885         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
7886         the LSB end, independent of endianness.
7887
7888 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7889
7890         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
7891         size capping.
7892
7893 2017-06-13  Yao Qi  <yao.qi@linaro.org>
7894
7895         * mips-linux-nat.c: Move include features/mips*-linux.c to
7896         mips-linux-tdep.c.
7897         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
7898         to mips-linux-tdep.c.
7899         * mips-linux-tdep.c: Include features/mips*-linux.c
7900         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
7901         functions.
7902         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
7903         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
7904         (tdesc_mips64_dsp_linux): Declare.
7905
7906 2017-06-12  Tom Tromey  <tom@tromey.com>
7907
7908         * valprint.h (val_print_type_code_int): Remove.
7909         * valprint.c (generic_val_print_int): Always call
7910         val_print_scalar_formatted.
7911         (val_print_type_code_int): Remove.
7912         * printcmd.c (print_scalar_formatted): Handle options->format==0.
7913         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
7914         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
7915         * ada-valprint.c (ada_val_print_num): Use
7916         val_print_scalar_formatted.
7917
7918 2017-06-12  Tom Tromey  <tom@tromey.com>
7919
7920         * printcmd.c (print_scalar_formatted): Unify the two switches.
7921         Don't convert scalars to LONGEST.
7922
7923 2017-06-12  Tom Tromey  <tom@tromey.com>
7924
7925         PR exp/16225:
7926         * valprint.h (print_decimal_chars): Update.
7927         * valprint.c (maybe_negate_by_bytes): New function.
7928         (print_decimal_chars): Add "is_signed" argument.
7929         * printcmd.c (print_scalar_formatted): Update.
7930
7931 2017-06-12  Tom Tromey  <tom@tromey.com>
7932
7933         PR exp/16225:
7934         * valprint.h (print_binary_chars, print_hex_chars): Update.
7935         * valprint.c (val_print_type_code_int): Update.
7936         (print_binary_chars): Add "zero_pad" argument.
7937         (emit_octal_digit): New function.
7938         (print_octal_chars): Don't zero-pad.
7939         (print_decimal_chars): Likewise.
7940         (print_hex_chars): Add "zero_pad" argument.
7941         * sh64-tdep.c (sh64_do_fp_register): Update.
7942         * regcache.c (regcache::dump): Update.
7943         * printcmd.c (print_scalar_formatted): Update.
7944         * infcmd.c (default_print_one_register_info): Update.
7945
7946 2017-06-12  Pedro Alves  <palves@redhat.com>
7947             Alan Hayward  <alan.hayward@arm.com>
7948
7949         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
7950         (mips_eabi_push_dummy_call): Rename local 'regsize' to
7951         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
7952         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
7953         Assert that abi_regsize bytes fit in 'ref_valbuf'.
7954
7955 2017-06-12  Pedro Alves  <palves@redhat.com>
7956
7957         * dwarf2read.c (mapped_symtab::data): Now a vector of
7958         symtab_index_entry instead of vector of
7959         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
7960         whether an element's name is NULL instead of checking whether the
7961         element itself is NULL.
7962         (find_slot): Change return type.  Adjust.
7963         (hash_expand, , add_index_entry, uniquify_cu_indices)
7964         (write_hash_table): Adjust.
7965
7966 2017-06-12  Pedro Alves  <palves@redhat.com>
7967
7968         * dwarf2read.c (recursively_count_psymbols): New function.
7969         (write_psymtabs_to_index): Call it to compute number of psyms and
7970         pass estimate size of psyms_seen to unordered_set's ctor.
7971
7972 2017-06-12  Pedro Alves  <palves@redhat.com>
7973
7974         * dwarf2read.c (write_hash_table): Check if key already exists
7975         before emplacing.
7976
7977 2017-06-12  Pedro Alves  <palves@redhat.com>
7978
7979         * dwarf2read.c (data_buf::append_space): Rename to...
7980         (data_buf::grow): ... this, and make private.  Adjust all callers.
7981         (data_buf::append_uint): New method.
7982         (add_address_entry, write_one_signatured_type)
7983         (write_psymtabs_to_index): Use it.
7984
7985 2017-06-12  Pedro Alves  <palves@redhat.com>
7986
7987         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
7988         (file_write (FILE *, const std::vector<Elem>&)): Delete.
7989         (data_buf::file_write): Call ::fwrite directly.
7990
7991 2017-06-12  Pedro Alves  <palves@redhat.com>
7992
7993         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
7994         std::vector::erase.
7995
7996 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
7997
7998         Code cleanup: C++ify .gdb_index producer.
7999         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
8000         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
8001         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
8002         (create_strtab, add_string): Remove.
8003         (file_write, data_buf): New.
8004         (struct symtab_index_entry): Use std::vector for cu_indices.
8005         (struct mapped_symtab): Use std::vector for data.
8006         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
8007         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
8008         Remove.
8009         (find_slot): Change return type.  Update it to the new data structures.
8010         (hash_expand, add_index_entry): Update it to the new data structures.
8011         (offset_type_compare): Remove.
8012         (uniquify_cu_indices): Update it to the new data structures.
8013         (c_str_view, c_str_view_hasher, vector_hasher): New.
8014         (add_indices_to_cpool): Remove.
8015         (write_hash_table): Update it to the new data structures.
8016         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
8017         (eq_psymtab_cu_index): Remove.
8018         (psym_index_map): New typedef.
8019         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
8020         reference and std::unordered_map for cu_index_htab.
8021         (add_address_entry, add_address_entry_worker, write_address_map)
8022         (write_psymbols): Update it to the new data structures.
8023         (write_obstack): Remove.
8024         (struct signatured_type_index_data): Change types_list to a data_buf
8025         reference and psyms_seen to a std::unordered_set reference.
8026         (write_one_signatured_type, recursively_write_psymbols)
8027         (write_psymtabs_to_index): Update it to the new data structures.
8028
8029 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
8030
8031         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
8032         separate-debug-file commands.
8033         * symfile.h (separate_debug_file_debug): New global.
8034         * symfile.c (separate_debug_file_debug): New global.
8035         (separate_debug_file_exists, find_separate_debug_file): Add
8036         debug output.
8037         (_initialize_symfile): Add "set debug separate-debug-file"
8038         command.
8039         * build-id.c (build_id_to_debug_bfd,
8040         find_separate_debug_file_by_buildid): Add debug output.
8041
8042 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
8043
8044         * gdbarch.sh (displaced_step_free_closure): Remove.
8045         * gdbarch.h, gdbarch.c: Re-generate.
8046         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
8047         displaced_step_free_closure.
8048         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
8049         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
8050         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8051         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8052         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8053         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8054         * arch-utils.h (simple_displaced_step_free_closure): Remove.
8055         * arch-utils.c (simple_displaced_step_free_closure): Remove.
8056         * infrun.c (displaced_step_clear): Call xfree instead of
8057         gdbarch_displaced_step_free_closure.
8058
8059 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
8060
8061         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
8062         NULL".
8063
8064 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
8065
8066         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
8067         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
8068         (mn10300_push_dummy_call): Likewise.
8069
8070 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
8071
8072         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
8073
8074 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
8075
8076         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
8077
8078 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8079
8080         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
8081         able to start inferiors using a shell.
8082         (New remote packets): Announce new packet "QStartupWithShell".
8083         * remote.c: Add PACKET_QStartupWithShell.
8084         (extended_remote_create_inferior): Handle new
8085         PACKET_QStartupWithShell.
8086         (remote_protocol_features) <QStartupWithShell>: New entry for
8087         PACKET_QStartupWithShell.
8088         (_initialize_remote): Call "add_packet_config_cmd" for
8089         QStartupShell.
8090
8091 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8092             Pedro Alves  <palves@redhat.com>
8093
8094         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
8095         and "nat/fork-inferior.h".
8096         * common/common-inferior.h: New file, with contents from
8097         "gdb/inferior.h".
8098         * commom/common-utils.c: Include "common-utils.h".
8099         (stringify_argv): New function.
8100         * common/common-utils.h (stringify_argv): New prototype.
8101         * configure.nat: Add "fork-inferior.o" as a dependency for
8102         "*linux*", "fbsd*" and "nbsd*" hosts.
8103         * corefile.c (get_exec_file): Update comment.
8104         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
8105         instead of "startup_inferior".
8106         (darwin_create_inferior): Call "add_thread_silent" after
8107         "fork_inferior".
8108         * fork-child.c: Cleanup unnecessary includes.
8109         (SHELL_FILE): Move to "common/common-fork-child.c".
8110         (environ): Likewise.
8111         (exec_wrapper): Initialize.
8112         (get_exec_wrapper): New function.
8113         (breakup_args): Move to "common/common-fork-child.c"; rename to
8114         "breakup_args_for_exec".
8115         (escape_bang_in_quoted_argument): Move to
8116         "common/common-fork-child.c".
8117         (saved_ui): New variable.
8118         (prefork_hook): New function.
8119         (postfork_hook): Likewise.
8120         (postfork_child_hook): Likewise.
8121         (gdb_startup_inferior): Likewise.
8122         (fork_inferior): Move to "common/common-fork-child.c".  Update
8123         function to support gdbserver.
8124         (startup_inferior): Likewise.
8125         * gdbcore.h (get_exec_file): Remove declaration.
8126         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
8127         instead of "startup_inferior".  Call "add_thread_silent" after
8128         "fork_inferior".
8129         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
8130         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
8131         instead of "startup_inferior".  Call "add_thread_silent" after
8132         "fork_inferior".
8133         * inferior.h: Include "common-inferior.h".
8134         (trace_start_error): Move to "common/common-utils.h".
8135         (trace_start_error_with_name): Likewise.
8136         (fork_inferior): Move prototype to "nat/fork-inferior.h".
8137         (startup_inferior): Likewise.
8138         (gdb_startup_inferior): New prototype.
8139         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
8140         * nat/fork-inferior.h: New file.
8141         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
8142         instead of "startup_inferior".  Call "add_thread_silent" after
8143         "fork_inferior".
8144         * target.h (target_terminal_init): Move prototype to
8145         "target/target.h".
8146         (target_terminal_inferior): Likewise.
8147         (target_terminal_ours): Likewise.
8148         * target/target.h (target_terminal_init): New prototype, moved
8149         from "target.h".
8150         (target_terminal_inferior): Likewise.
8151         (target_terminal_ours): Likewise.
8152         * utils.c (gdb_flush_out_err): New function.
8153
8154 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8155
8156         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
8157         * common/common-gdbthread.h: New file, with parts from
8158         "gdb/gdbthread.h".
8159         * gdbthread.h: Include "common-gdbthread.h".
8160         (switch_to_thread): Moved to "common/common-gdbthread.h".
8161
8162 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8163
8164         * Makefile.in (SFILES): Add "common/job-control.c".
8165         (HFILES_NO_SRCDIR): Add "common/job-control.h".
8166         (COMMON_OBS): Add "job-control.o".
8167         * common/job-control.c: New file, with contents from
8168         "gdb/inflow.c".
8169         * common/job-control.h: New file, with contents from "terminal.h".
8170         * fork-child.c: Include "job-control.h".
8171         * inflow.c: Include "job-control.h".
8172         (gdb_setpgid): Move to "common/common-inflow.c".
8173         (_initialize_inflow): Move setting of "job_control" to
8174         "handle_job_control".
8175         * terminal.h (job_control): Moved to "common/common-terminal.h".
8176         (gdb_setpgid): Likewise.
8177         * top.c: Include "job_control.h".
8178         * utils.c: Likewise.
8179         (job_control): Moved to "job-control.c".
8180
8181 2017-06-07  Pedro Alves  <palves@redhat.com>
8182
8183         * Makefile.in (SFILES): Add gdb_regex.c.
8184         (COMMON_OBS): Add gdb_regex.o.
8185         * ada-lang.c (ada_add_standard_exceptions)
8186         (ada_add_exceptions_from_frame, name_matches_regex)
8187         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
8188         parameter type to compiled_regex.  Adjust.
8189         (ada_exceptions_list): Use compiled_regex.
8190         * break-catch-throw.c (exception_catchpoint::pattern): Now a
8191         std::unique_ptr<compiled_regex>.
8192         (exception_catchpoint::~exception_catchpoint): Remove regfree
8193         call.
8194         (check_status_exception_catchpoint): Adjust to use compiled_regex.
8195         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
8196         * breakpoint.c (solib_catchpoint::compiled): Now a
8197         std::unique_ptr<compiled_regex>.
8198         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
8199         (check_status_catch_solib): Adjust to use compiled_regex.
8200         (add_solib_catchpoint): Adjust to use compiled_regex.
8201         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
8202         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
8203         compiled_regex reference.  Adjust to use it.
8204         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
8205         declaration.  Include "gdb_regex.h".
8206         (apropos_cmd): Change regex parameter to compiled_regex reference.
8207         * gdb_regex.c: New file.
8208         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
8209         declarations.
8210         (class compiled_regex): New.
8211         * linux-tdep.c: Include "common/gdb_optional.h".
8212         (struct mapping_regexes): New, factored out from
8213         mapping_is_anonymous_p, and adjusted to use compiled_regex.
8214         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
8215         gdb::optional and remove cleanups.  Adjust to compiled_regex.
8216         * probe.c: Include "common/gdb_optional.h".
8217         (collect_probes): Use compiled_regex and gdb::optional and remove
8218         cleanups.
8219         * skip.c: Include "common/gdb_optional.h".
8220         (skiplist_entry::compiled_function_regexp): Now a
8221         gdb::optional<compiled_regex>.
8222         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
8223         (free_skiplist_entry): Remove regfree call.
8224         (compile_skip_regexp, skip_rfunction_p): Adjust to use
8225         compiled_regex and gdb::optional.
8226         * symtab.c: Include "common/gdb_optional.h".
8227         (search_symbols): Use compiled_regex and gdb::optional.
8228         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
8229         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
8230         to gdb_regex.c.
8231
8232 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8233
8234         * regcache.c (regcache::save): Avoid buffer use.
8235         (regcache::dump): Likewise.
8236
8237 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8238
8239         * sh-tdep.c (sh_pseudo_register_read): Remove
8240         MAX_REGISTER_SIZE.
8241         (sh_pseudo_register_write): Likewise.
8242         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
8243         (sh64_pseudo_register_write): Likewise
8244
8245 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8246
8247         * aarch64-tdep.c (aarch64_store_return_value): Use
8248         V_REGISTER_SIZE.
8249         (aarch64_pseudo_read_value): Likewise.
8250         (aarch64_pseudo_write): Likewise.
8251
8252 2017-06-06  Yao Qi  <yao.qi@linaro.org>
8253
8254         * regformats/regdef.h (set_register_cache): Remove the
8255         declaration.
8256
8257 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
8258
8259         * frame.c (frame_unwind_register_signed): Use
8260         frame_unwind_register_value.
8261
8262 2017-06-06  Pedro Alves  <palves@redhat.com>
8263
8264         PR breakpoints/21553
8265         * breakpoint.c (create_breakpoints_sal_default)
8266         (init_breakpoint_sal, create_breakpoint_sal): Use
8267         gdb::unique_xmalloc_ptr for string parameters.
8268         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8269         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
8270         (base_breakpoint_create_breakpoints_sal)
8271         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
8272         (strace_marker_create_breakpoints_sal)
8273         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
8274         string parameters.
8275         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
8276         gdb::unique_xmalloc_ptr for string parameters.
8277         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8278         parameters.
8279
8280 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8281
8282         * alpha-tdep.c (alpha_register_to_value): Use
8283         get_frame_register_value.
8284         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
8285
8286 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8287
8288         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
8289         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
8290         (ia64_value_to_register): Likewise.
8291         (ia64_extract_return_value): Likewise.
8292         (ia64_store_return_value): Likewise.
8293         (ia64_push_dummy_call): Likewise.
8294
8295 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
8296
8297         GDB 8.0 released.
8298
8299 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
8300
8301         * x86-linux-nat.c (struct arch_lwp_info): Remove.
8302
8303 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
8304
8305         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
8306         parameter.
8307         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
8308
8309 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
8310
8311         * event-loop.c (poll_timers): Unallocate timer using delete
8312         instead of xfree.
8313
8314 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8315
8316         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
8317         (struct breakpoint) <~breakpoint>: New.
8318         (struct watchpoint): Inherit from breakpoint.
8319         <~watchpoint>: New.
8320         <base>: Remove.
8321         (struct tracepoint): Inherit from breakpoint.
8322         <base>: Remove.
8323         * breakpoint.c (longjmp_breakpoint_ops): Remove.
8324         (struct longjmp_breakpoint): Inherit from breakpoint.
8325         <~longjmp_breakpoint>: New.
8326         <base>: Remove.
8327         (new_breakpoint_from_type): Remove casts.
8328         (watchpoint_in_thread_scope): Remove reference to base field.
8329         (watchpoint_del_at_next_stop): Likewise.
8330         (update_watchpoint): Likewise.
8331         (watchpoint_check): Likewise.
8332         (bpstat_check_watchpoint): Likewise.
8333         (set_longjmp_breakpoint): Likewise.
8334         (struct fork_catchpoint): Inherit from breakpoint.
8335         <base>: Remove.
8336         (struct solib_catchpoint): Inherit from breakpoint.
8337         <~solib_catchpoint>: New.
8338         <base>: Remove.
8339         (dtor_catch_solib): Change to ...
8340         (solib_catchpoint::~solib_catchpoint): ... this.
8341         (breakpoint_hit_catch_solib): Remove reference to base field.
8342         (add_solib_catchpoint): Likewise.
8343         (create_fork_vfork_event_catchpoint): Likewise.
8344         (struct exec_catchpoint): Inherit from breakpoint.
8345         <~exec_catchpoint>: New.
8346         <base>: Remove.
8347         (dtor_catch_exec): Change to ...
8348         (exec_catchpoint::~exec_catchpoint): ... this.
8349         (dtor_watchpoint): Change to ...
8350         (watchpoint::~watchpoint): ... this.
8351         (watch_command_1): Remove reference to base field.
8352         (catch_exec_command_1): Likewise.
8353         (base_breakpoint_dtor): Change to ...
8354         (breakpoint::~breakpoint): ... this.
8355         (base_breakpoint_ops): Remove dtor field value.
8356         (longjmp_bkpt_dtor): Change to ...
8357         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
8358         (strace_marker_create_breakpoints_sal): Remove reference to base
8359         field.
8360         (delete_breakpoint): Don't manually call breakpoint destructor.
8361         (create_tracepoint_from_upload): Remove reference to base field.
8362         (trace_pass_set_count): Likewise.
8363         (initialize_breakpoint_ops): Don't initialize
8364         momentary_breakpoint_ops, don't set dtors.
8365         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
8366         <~ada_catchpoint>: New.
8367         <base>: Remove.
8368         (create_excep_cond_exprs): Remove reference to base field.
8369         (dtor_exception): Change to ...
8370         (ada_catchpoint::~ada_catchpoint): ... this.
8371         (dtor_catch_exception): Remove.
8372         (dtor_catch_exception_unhandled): Remove.
8373         (dtor_catch_assert): Remove.
8374         (create_ada_exception_catchpoint): Remove reference to base
8375         field.
8376         (initialize_ada_catchpoint_ops): Don't set dtors.
8377         * break-catch-sig.c (struct signal_catchpoint): Inherit from
8378         breakpoint.
8379         <~signal_catchpoint>: New.
8380         <base>: Remove.
8381         (signal_catchpoint_dtor): Change to ...
8382         (signal_catchpoint::~signal_catchpoint): ... this.
8383         (create_signal_catchpoint): Remove reference to base field.
8384         (initialize_signal_catchpoint_ops): Don't set dtor.
8385         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
8386         from breakpoint.
8387         <~syscall_catchpoint>: New.
8388         <base>: Remove.
8389         (dtor_catch_syscall): Change to ...
8390         (syscall_catchpoint::~syscall_catchpoint): ... this.
8391         (create_syscall_event_catchpoint): Remove reference to base
8392         field.
8393         (initialize_syscall_catchpoint_ops): Don't set dtor.
8394         * break-catch-throw.c (struct exception_catchpoint): Inherit
8395         from breakpoint.
8396         <~exception_catchpoint>: New.
8397         <base>: Remove.
8398         (dtor_exception_catchpoint): Change to ...
8399         (exception_catchpoint::~exception_catchpoint): ... this.
8400         (handle_gnu_v3_exceptions): Remove reference to base field.
8401         (initialize_throw_catchpoint_ops): Don't set dtor.
8402         * ctf.c (ctf_get_traceframe_address): Remove reference to base
8403         field.
8404         * remote.c (remote_get_tracepoint_status): Likewise.
8405         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
8406         * tracefile.c (tracefile_fetch_registers): Likewise.
8407         * tracepoint.c (actions_command): Likewise.
8408         (validate_actionline): Likewise.
8409         (tfind_1): Likewise.
8410         (get_traceframe_location): Likewise.
8411         (find_matching_tracepoint_location): Likewise.
8412         (parse_tracepoint_status): Likewise.
8413         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
8414
8415 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8416
8417         * breakpoint.c (struct longjmp_breakpoint): New struct.
8418         (is_tracepoint_type): Change return type to bool.
8419         (is_longjmp_type): New function.
8420         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
8421         (set_raw_breakpoint_without_location): Use
8422         new_breakpoint_from_type.
8423         (set_raw_breakpoint): Likewise.
8424
8425 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8426
8427         * breakpoint.c (new_breakpoint_from_type): New function.
8428         (create_breakpoint_sal): Use new_breakpoint_from_type and
8429         unique_ptr.
8430         (create_breakpoint): Likewise.
8431
8432 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
8433
8434         * memattr.c (mem_info_command): Rename to ...
8435         (info_mem_command): ... this.
8436         (mem_enable_command): Rename to ...
8437         (enable_mem_command): ... this.
8438         (mem_disable_command): Rename to ...
8439         (disable_mem_command): ... this.
8440         (mem_delete_command): Rename to ...
8441         (delete_mem_command): ... this.
8442         (_initialize_mem): Adjust function names.
8443
8444 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8445
8446         * btrace.c (handle_pt_insn_events): New.
8447         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
8448         STATUS.  Split into this and ...
8449         (handle_pt_insn_event_flags): ... this.
8450
8451 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8452
8453         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
8454         and struct pt_insn.resynced.
8455         * configure: Regenerated.
8456         * config.in: Regenerated.
8457
8458 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8459
8460         * btrace.c (ftrace_find_call_by_number): New function.
8461         (ftrace_new_function): Store objects, not pointers.
8462         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
8463         ftrace_new_gap, ftrace_update_function,
8464         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
8465         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
8466         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
8467         btrace_ends_with_single_insn, btrace_call_get): Account for
8468         btrace_thread_info::functions now storing objects.
8469         * btrace.h (struct btrace_thread_info): Add constructor.
8470         (struct btrace_thread_info) <functions>: Make std::vector.
8471         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
8472         Initialize with default values.
8473         * record-btrace.c (record_btrace_frame_sniffer): Account for
8474         btrace_thread_info::functions now storing objects.
8475
8476 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8477
8478         * btrace.c: Remove typedef bfun_s.
8479         (ftrace_new_gap): Directly add gaps to the list of gaps.
8480         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
8481         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
8482         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
8483         instead of gdb VEC.
8484
8485 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8486
8487         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
8488         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
8489         with btrace_thread_info::next_segment and
8490         btrace_thread_info::prev_segment.
8491         * btrace.h: Remove struct btrace_func_link.
8492         (struct btrace_function): Replace pair of function segment pointers
8493         with pair of indices.
8494         * python/py-record-btrace.c (btpy_call_prev_sibling,
8495         btpy_call_next_sibling): Replace references to
8496         btrace_thread_info::segment with btrace_thread_info::next_segment and
8497         btrace_thread_info::prev_segment.
8498         * record-btrace.c (record_btrace_frame_this_id): Use
8499         btrace_find_call_by_number.
8500
8501 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8502
8503         * btrace.c (ftrace_new_function, ftrace_fixup_level,
8504         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
8505         btrace_insn_next, btrace_insn_prev): Remove references to
8506         btrace_thread_info::flow.
8507         * btrace.h (struct btrace_function): Remove FLOW.
8508
8509 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8510
8511         * btrace.c (ftrace_find_call_by_number): New function.
8512         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
8513         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
8514         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
8515         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
8516         index.
8517         * btrace.h (struct btrace_function): Turn UP into an index.
8518         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
8519         as an index.
8520         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
8521         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
8522         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
8523
8524 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8525
8526         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8527         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8528         ftrace_update_function, ftrace_compute_global_level_offset,
8529         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
8530         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
8531         btrace_insn_end, btrace_is_empty): Remove references to
8532         btrace_thread_info::begin and btrace_thread_info::end.
8533         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
8534         (struct btrace_thread_info) <functions>: Adjust comment.
8535         * record-btrace.c (record_btrace_start_replaying): Remove reference to
8536         btrace_thread_info::begin.
8537
8538 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8539
8540         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8541         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8542         ftrace_update_function): Remove arguments that implicitly were always
8543         BTINFO->END.
8544         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
8545         Don't pass BTINFO->END.
8546
8547 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8548
8549         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
8550         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
8551         btrace_find_insn_by_number): Replace function segment pointer with
8552         index.
8553         (btrace_insn_cmp): Simplify.
8554         * btrace.h: (struct btrace_insn_iterator) Rename index to
8555         insn_index.  Replace function segment pointer with index into function
8556         segment vector.
8557         * record-btrace.c (record_btrace_call_history): Replace function
8558         segment pointer use with index.
8559         (record_btrace_frame_sniffer): Retrieve function call segment through
8560         vector.
8561         (record_btrace_set_replay): Remove defunc't safety check.
8562
8563 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8564
8565         * btrace.c (btrace_ends_with_single_insn): New function.
8566         (btrace_call_get, btrace_call_number, btrace_call_begin,
8567         btrace_call_end, btrace_call_next, btrace_call_prev,
8568         btrace_find_call_by_number): Use index into call segment vector
8569         instead of pointer.
8570         (btrace_call_cmp): Simplify.
8571         * btrace.h (struct btrace_call_iterator): Replace function call segment
8572         pointer with index into vector.
8573         * record-btrace.c (record_btrace_call_history): Use index instead of
8574         pointer.
8575
8576 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8577
8578         * btrace.c (btrace_insn_begin, btrace_insn_end,
8579         btrace_find_insn_by_number): Add btinfo to iterator.
8580         * btrace.h (struct btrace_insn_iterator): Add btinfo.
8581
8582 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8583
8584         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
8585         and save pointers directly.
8586         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
8587         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
8588         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
8589         changed signature of functions.
8590         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
8591         (btrace_fetch): Remove code that adds btrace_function pointers to
8592         vector of btrace_functions.
8593         (btrace_clear): Simplify freeing vector of btrace_functions.
8594
8595 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8596
8597         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
8598         Replace VEC_* with std::vector functions.
8599         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
8600         (struct btrace_thread_info)<functions>: Change type to std::vector.
8601
8602 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8603
8604         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
8605         "Removed targets and native configurations" up.  Merge duplicate
8606         "New commands" sub-sections.  Add "New options" sub-sections.
8607
8608 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
8609
8610         * defs.h (copy_integer_to_size): New declaration.
8611         * findvar.c (copy_integer_to_size): New function.
8612         (do_cint_test): New selftest function.
8613         (copy_integer_to_size_test): Likewise.
8614         (_initialize_findvar): Likewise.
8615         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
8616         (mips_fbsd_collect_reg): Use raw_collect_integer.
8617         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
8618         (mips64_fill_gregset): Use raw_collect_integer
8619         (mips64_fill_fpregset): Use raw_supply_integer.
8620         * regcache.c (regcache::raw_supply_integer): New function.
8621         (regcache::raw_collect_integer): Likewise.
8622         * regcache.h: (regcache::raw_supply_integer): New declaration.
8623         (regcache::raw_collect_integer): Likewise.
8624
8625 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8626
8627         * Makefile.in (SFILES): Add gdbarch-selftests.c.
8628         (COMMON_OBS): Add gdbarch-selftests.o.
8629         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
8630         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
8631         * gdbarch-selftests.c: New file.
8632         * regcache.h (regcache) <~regcache>: Mark it virtual if
8633         GDB_SELF_TEST.
8634         <raw_write>: Likewise.
8635
8636 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8637
8638         * regcache.c (current_regcache): Change it to
8639         regcache::current_regcache.
8640         (regcache_observer_target_changed): Update.
8641         (regcache_thread_ptid_changed): Make it a regcache static
8642         method.
8643         (regcache_thread_ptid_changed): Update.
8644         (class regcache_access): New.
8645         (current_regcache_test): Update.
8646         (_initialize_regcache): Update.
8647         * regcache.h: Include forward_list.
8648         (regcache): Declare regcache_thread_ptid_changed and declare
8649         registers_changed_ptid as friend.
8650
8651 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8652
8653         * i387-tdep.c (i387_register_to_value): Use register_size
8654         instead of TYPE_LENGTH.
8655         * m68k-tdep.c (m68k_register_to_value): Likewise.
8656
8657 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8658
8659         * i387-tdep.c (i387_convert_register_p): Return false if type
8660         code isn't TYPE_CODE_FLT.
8661
8662 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8663
8664         * alpha-tdep.c (alpha_convert_register_p): Return true if type
8665         length is 4.
8666         (alpha_register_to_value): Remove type length check.
8667         (alpha_value_to_register): Likewise.
8668
8669 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8670
8671         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
8672         TYPE_CODE_FLT.
8673
8674 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8675
8676         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
8677         TYPE_CODE_FLT or not.
8678
8679 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8680
8681         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
8682         * avr-tdep.c (avr_gdbarch_init): Likewise.
8683         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8684         * cris-tdep.c (cris_gdbarch_init): Likewise.
8685         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8686         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8687         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8688         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
8689         * mep-tdep.c (mep_gdbarch_init): Likewise.
8690         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8691         * mips-tdep.c (mips_gdbarch_init): Likewise.
8692         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8693         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8694         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8695         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8696         * v850-tdep.c (v850_gdbarch_init): Likewise.
8697
8698 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8699
8700         * selftest-arch.c (tests_with_arch): Call registers_changed
8701         and reinit_frame_cache.
8702         * selftest.c (run_self_tests): Likewise.
8703
8704 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8705
8706         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
8707         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
8708
8709 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8710
8711         * rl78-tdep.c (rl78_gdbarch_init): Don't call
8712         set_gdbarch_print_insn.
8713
8714 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8715
8716         * h8300-tdep.c (h8300_gdbarch_init): Don't call
8717         set_gdbarch_print_insn.
8718
8719 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8720
8721         * alpha-tdep.c (alpha_gdbarch_init): Don't call
8722         set_gdbarch_print_insn.
8723         * arc-tdep.c (arc_gdbarch_init): Likewise.
8724         * arch-utils.c: include dis-asm.h.
8725         (default_print_insn): New function.
8726         * arch-utils.h (default_print_insn): Declare.
8727         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
8728         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8729         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
8730         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
8731         * frv-tdep.c (frv_gdbarch_init): Likewise.
8732         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8733         * gdbarch.sh (print_insn): Use default_print_insn.
8734         * gdbarch.c: Regenerated.
8735         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
8736         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
8737         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8738         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
8739         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8740         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
8741         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
8742         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
8743         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
8744         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8745         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8746         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8747         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8748         * mt-tdep.c (mt_gdbarch_init): Likewise.
8749         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8750         * nios2-tdep.c (nios2_print_insn): Remove.
8751         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
8752         * rx-tdep.c (rx_gdbarch_init): Likewise.
8753         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8754         * score-tdep.c (score_print_insn): Remove.
8755         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
8756         * sh-tdep.c (sh_gdbarch_init): Likewise.
8757         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8758         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8759         * tic6x-tdep.c (tic6x_print_insn): Remove.
8760         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
8761         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
8762         * v850-tdep.c (v850_gdbarch_init): Likewise.
8763         * vax-tdep.c (vax_gdbarch_init): Likewise.
8764         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8765         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
8766
8767 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
8768
8769         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
8770         (MIPS_FP0_REGNUM): Remove.
8771         (MIPS_FSR_REGNUM): Remove.
8772         (mips_fbsd_supply_fpregs): Use mips_regnum.
8773         (mips_fbsd_supply_gregs): Likewise.
8774         (mips_fbsd_collect_fpregs): Likewise.
8775         (mips_fbsd_collect_gregs): Likewise.
8776
8777 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
8778
8779         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
8780         (getpfpregs_supplies): New function.
8781         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
8782         getfpregs_supplies.
8783         (mips_fbsd_store_inferior_registers): Likewise.
8784
8785 2017-05-22  Pedro Alves <palves@redhat.com>
8786
8787         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
8788         maintainer.
8789
8790 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
8791
8792         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
8793         (store_register): Likewise.
8794         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
8795         (get_decimal_float_return_value): Likewise.
8796         (do_ppc_sysv_return_value): Likewise.
8797         (ppc64_sysv_abi_push_integer): Likewise.
8798         (ppc64_sysv_abi_push_freg): Likewise.
8799         (ppc64_sysv_abi_return_value_base): Likewise.
8800         (ppc64_sysv_abi_return_value): Likewise.
8801         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
8802         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
8803         * rs6000-nat.c: Likewise.
8804         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
8805         (rs6000_value_to_register): Likewise.
8806         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
8807
8808 2017-05-21  Tom Tromey  <tom@tromey.com>
8809
8810         PR rust/21466:
8811         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
8812         arrays as "[T]", not "[T; ]".
8813
8814 2017-05-19  Tom Tromey  <tom@tromey.com>
8815
8816         PR rust/21484:
8817         * rust-lang.c (exp_descriptor_rust): New function.
8818         (rust_language_defn): Use it.
8819         * p-lang.c (pascal_language_defn): Update.
8820         * opencl-lang.c (opencl_language_defn): Update.
8821         * objc-lang.c (objc_language_defn): Update.
8822         * m2-lang.c (m2_language_defn): Update.
8823         * language.h (struct language_defn)
8824         <la_watch_location_expression>: New member.
8825         * language.c (unknown_language_defn, auto_language_defn)
8826         (local_language_defn): Update.
8827         * go-lang.c (go_language_defn): Update.
8828         * f-lang.c (f_language_defn): Update.
8829         * d-lang.c (d_language_defn): Update.
8830         * c-lang.h (c_watch_location_expression): Declare.
8831         * c-lang.c (c_watch_location_expression): New function.
8832         (c_language_defn, cplus_language_defn, asm_language_defn)
8833         (minimal_language_defn): Use it.
8834         * breakpoint.c (watch_command_1): Call
8835         la_watch_location_expression.
8836         * ada-lang.c (ada_language_defn): Update.
8837
8838 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8839
8840         PR tui/21482
8841         * gdb_curses.h (NOMACROS): Define.
8842         (NCURSES_NOMACROS): Define.
8843
8844 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8845
8846         PR tui/21482
8847         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
8848         arg to char *.
8849         * tui/tui-wingeneral.c (box_win): Likewise.
8850         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
8851         (tui_show_source_line): Likewise.
8852         (tui_show_exec_info_content): Likewise.
8853
8854 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
8855
8856         * sparc-tdep.c (sparc_structure_return_p)
8857         (sparc_arg_on_registers_p): New functions.
8858         (sparc32_store_arguments): Use them.
8859         * sparc64-tdep.c (sparc64_16_byte_align_p)
8860         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
8861         Handle TYPE_CODE_ARRAY.
8862
8863 2017-05-17  Yao Qi  <yao.qi@linaro.org>
8864
8865         * cli/cli-decode.c (add_alias_cmd): New function.
8866         * command.h (add_alias_cmd): Declare.
8867         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
8868         instead call add_alias_cmd.
8869
8870 2017-05-17  Pedro Alves  <palves@redhat.com>
8871
8872         * Makefile.in (nat_extra_makefile_frag): Rename to ...
8873         (nat_makefile_frag): ... this.  All references updated.
8874         * configure.ac: Likewise.
8875         * configure.nat: Likewise.  Enhance comments.
8876         * configure: Regenerate.
8877
8878 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8879
8880         * procfs.c (procfs_create_inferior): Change prototype to match
8881         definition.
8882
8883 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
8884
8885         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
8886         C++ compiler warning.
8887
8888 2017-05-12  Tom Tromey  <tom@tromey.com>
8889
8890         PR rust/21483:
8891         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
8892         recurse, just call value_struct_elt directly.
8893
8894 2017-05-12  Tom Tromey  <tom@tromey.com>
8895
8896         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
8897         OP_RUST_ARRAY>: Fix.
8898
8899 2017-05-12  Tom Tromey  <tom@tromey.com>
8900
8901         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
8902
8903 2017-05-09  Yao Qi  <yao.qi@linaro.org>
8904
8905         * regcache.c: Include <forward_list>.
8906         (struct regcache_list): Remove.
8907         (current_regcache): Update.
8908         (get_thread_arch_aspace_regcache): Update for std::forward_list.
8909         (regcache_thread_ptid_changed): Likewise.
8910         (registers_changed_ptid): Likewise.
8911         (current_regcache_size): Likewise.
8912
8913 2017-05-09  Yao Qi  <yao.qi@linaro.org>
8914
8915         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
8916         (current_regcache_size): New function.
8917         (current_regcache_test): New function.
8918         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
8919
8920 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
8921
8922         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
8923         (print_gp_register_row): Use get_frame_register_value.
8924
8925 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
8926
8927         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
8928         (mips_supply_fpregset): Likewise.
8929         (mips64_supply_gregset): Likewise.
8930
8931 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
8932
8933         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
8934         regcache->raw_supply_zeroed.
8935
8936 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8937
8938         * configure.nat: Rearrange 'case' statements to match
8939         host before cpu.
8940
8941 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8942
8943         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
8944         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
8945         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
8946         "@nat_extra_makefile_frag@".
8947         (Makefile): Remove dependency on "@frags@".
8948         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
8949         (data-directory/Makefile): Likewise.
8950         * config/aarch64/linux.mh: Deleted; moved contents to
8951         "gdb/configure.nat".
8952         * config/alpha/alpha-linux.mh: Likewise.
8953         * config/alpha/nbsd.mh: Likewise.
8954         * config/arm/linux.mh: Likewise.
8955         * config/arm/nbsdelf.mh: Likewise.
8956         * config/i386/cygwin.mh: Likewise.
8957         * config/i386/cygwin64.mh: Likewise.
8958         * config/i386/darwin.mh: Likewise.
8959         * config/i386/fbsd.mh: Likewise.
8960         * config/i386/fbsd64.mh: Likewise.
8961         * config/i386/go32.mh: Likewise.
8962         * config/i386/i386gnu.mh: Likewise.
8963         * config/i386/i386sol2.mh: Likewise.
8964         * config/i386/linux.mh: Likewise.
8965         * config/i386/linux64.mh: Likewise.
8966         * config/i386/mingw.mh: Likewise.
8967         * config/i386/mingw64.mh: Likewise.
8968         * config/i386/nbsd64.mh: Likewise.
8969         * config/i386/nbsdelf.mh: Likewise.
8970         * config/i386/nto.mh: Likewise.
8971         * config/i386/obsd.mh: Likewise.
8972         * config/i386/obsd64.mh: Likewise.
8973         * config/i386/sol2-64.mh: Likewise.
8974         * config/ia64/linux.mh: Likewise.
8975         * config/m32r/linux.mh: Likewise.
8976         * config/m68k/linux.mh: Likewise.
8977         * config/m68k/nbsdelf.mh: Likewise.
8978         * config/m68k/obsd.mh: Likewise.
8979         * config/m88k/obsd.mh: Likewise.
8980         * config/mips/fbsd.mh: Likewise.
8981         * config/mips/linux.mh: Likewise.
8982         * config/mips/nbsd.mh: Likewise.
8983         * config/mips/obsd64.mh: Likewise.
8984         * config/pa/linux.mh: Likewise.
8985         * config/pa/nbsd.mh: Likewise.
8986         * config/pa/obsd.mh: Likewise.
8987         * config/powerpc/aix.mh: Likewise.
8988         * config/powerpc/fbsd.mh: Likewise.
8989         * config/powerpc/linux.mh: Likewise.
8990         * config/powerpc/nbsd.mh: Likewise.
8991         * config/powerpc/obsd.mh: Likewise.
8992         * config/powerpc/ppc64-linux.mh: Likewise.
8993         * config/powerpc/spu-linux.mh: Likewise.
8994         * config/s390/linux.mh: Likewise.
8995         * config/sh/nbsd.mh: Likewise.
8996         * config/sparc/fbsd.mh: Likewise.
8997         * config/sparc/linux.mh: Likewise.
8998         * config/sparc/linux64.mh: Likewise.
8999         * config/sparc/nbsd64.mh: Likewise.
9000         * config/sparc/nbsdelf.mh: Likewise.
9001         * config/sparc/obsd64.mh: Likewise.
9002         * config/sparc/sol2.mh: Likewise.
9003         * config/tilegx/linux.mh: Likewise.
9004         * config/vax/nbsdelf.mh: Likewise.
9005         * config/vax/obsd.mh: Likewise.
9006         * config/xtensa/linux.mh: Likewise.
9007         * config/i386/i386gnu.mn: New file, with excerpts from
9008         "config/i386/i386gnu.mh".
9009         * configure: Regenerate.
9010         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
9011         *.mh files under "gdb/config".
9012         * configure.nat: New file, with contents from the
9013         "gdb/config/*/*.mh" files.
9014
9015 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
9016
9017         * btrace.c (btrace_clear): Free insn vector.
9018
9019 2017-05-05  Pedro Alves  <palves@redhat.com>
9020
9021         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
9022         * configure: Regenerate.
9023
9024 2017-05-04  Pedro Alves  <palves@redhat.com>
9025
9026         * Makefile.in (SFILES): Add progspace-and-thread.c.
9027         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
9028         (COMMON_OBS): Add progspace-and-thread.o.
9029         * breakpoint.c: Include "progspace-and-thread.h".
9030         (update_inserted_breakpoint_locations)
9031         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
9032         Use scoped_restore_current_pspace_and_thread.
9033         (create_std_terminate_master_breakpoint): Use
9034         scoped_restore_current_program_space.
9035         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
9036         (print_breakpoint_location): Use
9037         scoped_restore_current_program_space.
9038         (bp_loc_is_permanent): Use
9039         scoped_restore_current_pspace_and_thread.
9040         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
9041         (download_tracepoint_locations): Use
9042         scoped_restore_current_pspace_and_thread.
9043         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
9044         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
9045         (enum step_over_calls_kind): Moved from inferior.h.
9046         (class scoped_restore_current_thread): New class.
9047         * gdbthread.h (make_cleanup_restore_current_thread): Delete
9048         declaration.
9049         (scoped_restore_current_thread): New class.
9050         * infcmd.c: Include "common/gdb_optional.h".
9051         (continue_1, proceed_after_attach): Use
9052         scoped_restore_current_thread.
9053         (notice_new_inferior): Use scoped_restore_current_thread.
9054         * inferior.c: Include "progspace-and-thread.h".
9055         (restore_inferior, save_current_inferior): Delete.
9056         (add_inferior_command, clone_inferior_command): Use
9057         scoped_restore_current_pspace_and_thread.
9058         * inferior.h (scoped_restore_current_inferior): New class.
9059         * infrun.c: Include "progspace-and-thread.h" and
9060         "common/gdb_optional.h".
9061         (follow_fork_inferior): Use
9062         scoped_restore_current_pspace_and_thread.
9063         (scoped_restore_exited_inferior): New class.
9064         (handle_vfork_child_exec_or_exit): Use
9065         scoped_restore_exited_inferior,
9066         scoped_restore_current_pspace_and_thread,
9067         scoped_restore_current_thread and scoped_restore.
9068         (fetch_inferior_event): Use scoped_restore_current_thread.
9069         * linespec.c (decode_line_full, decode_line_1): Use
9070         scoped_restore_current_program_space.
9071         * mi/mi-main.c: Include "progspace-and-thread.h".
9072         (exec_continue): Use scoped_restore_current_thread.
9073         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
9074         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
9075         * proc-service.c (ps_pglobal_lookup): Use
9076         scoped_restore_current_program_space.
9077         * progspace-and-thread.c: New file.
9078         * progspace-and-thread.h: New file.
9079         * progspace.c (release_program_space, clone_program_space): Use
9080         scoped_restore_current_program_space.
9081         (restore_program_space, save_current_program_space)
9082         (save_current_space_and_thread): Delete.
9083         (switch_to_program_space_and_thread): Moved to
9084         progspace-and-thread.c.
9085         * progspace.h (save_current_program_space)
9086         (save_current_space_and_thread): Delete declarations.
9087         (scoped_restore_current_program_space): New class.
9088         * remote.c (remote_btrace_maybe_reopen): Use
9089         scoped_restore_current_thread.
9090         * symtab.c: Include "progspace-and-thread.h".
9091         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
9092         * thread.c (print_thread_info_1): Use
9093         scoped_restore_current_thread.
9094         (struct current_thread_cleanup): Delete.
9095         (do_restore_current_thread_cleanup)
9096         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
9097         (scoped_restore_current_thread::~scoped_restore_current_thread):
9098         ... this new dtor.
9099         (make_cleanup_restore_current_thread): Rename/convert to ...
9100         (scoped_restore_current_thread::scoped_restore_current_thread):
9101         ... this new ctor.
9102         (thread_apply_all_command): Use scoped_restore_current_thread.
9103         (thread_apply_command): Use scoped_restore_current_thread.
9104         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
9105         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
9106
9107 2017-05-04  Pedro Alves  <palves@redhat.com>
9108
9109         * thread.c (make_cleanup_restore_current_thread): Move
9110         find_thread_ptid call before the is_stopped call.  Assert that the
9111         thread is found.  Replace is_stopped call by checking the thread's
9112         state directly.  Remove unnecessary NULL-thread check.
9113
9114 2017-05-04  Pedro Alves  <palves@redhat.com>
9115
9116         * corelow.c (thread_section_name): New class.
9117         (get_core_register_section, get_core_siginfo): Use it.
9118
9119 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9120
9121         * corelow.c (sniff_core_bfd): Remove extra semicolon.
9122         (get_core_register_section): Remove xfree of NULL pointer.
9123
9124 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
9125
9126         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
9127         * regcache.c (regcache::raw_supply_zeroed): New function.
9128         * regcache.h (regcache::raw_supply_zeroed): New declaration.
9129
9130 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
9131
9132         * gdbarch.sh: Remove commented out definition of
9133         TARGET_CHAR_BIT.
9134         * gdbarch.h: Re-generate.
9135
9136 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
9137
9138         * configure: Regenerate.
9139
9140 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
9141
9142         * solib-target.c (solib_target_relocate_section_addresses):
9143         Remove num_section_bases, num_bases, segment_bases variables.
9144
9145 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9146
9147         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
9148
9149 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9150
9151         * solib-target.c: Include <vector>
9152         (struct lm_info_target) <~lm_info_target>: Remove.
9153         <segment_bases, section_bases>: Change type to
9154         std::vector<CORE_ADDR>.
9155         (library_list_start_segment, library_list_start_section,
9156         library_list_end_library,
9157         solib_target_relocate_section_addresses): Adjust.
9158
9159 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9160
9161         * gdbarch.sh (software_single_step): Change return type to
9162         std::vector<CORE_ADDR>.
9163         * gdbarch.c, gdbarch.h: Re-generate.
9164         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
9165         Adjust.
9166         (arm_deal_with_atomic_sequence_raw): Adjust.
9167         (thumb_get_next_pcs_raw): Adjust.
9168         (arm_get_next_pcs_raw): Adjust.
9169         (arm_get_next_pcs): Adjust.
9170         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
9171         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
9172         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
9173         (alpha_software_single_step): Adjust.
9174         * alpha-tdep.h (alpha_software_single_step): Adjust.
9175         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
9176         * arm-tdep.c (arm_software_single_step): Adjust.
9177         (arm_breakpoint_kind_from_current_state): Adjust.
9178         * arm-tdep.h (arm_software_single_step): Adjust.
9179         * breakpoint.c (insert_single_step_breakpoint): Adjust.
9180         * cris-tdep.c (cris_software_single_step): Adjust.
9181         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
9182         (micromips_deal_with_atomic_sequence): Adjust.
9183         (deal_with_atomic_sequence): Adjust.
9184         (mips_software_single_step): Adjust.
9185         * mips-tdep.h (mips_software_single_step): Adjust.
9186         * moxie-tdep.c (moxie_software_single_step): Adjust.
9187         * nios2-tdep.c (nios2_software_single_step): Adjust.
9188         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
9189         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
9190         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
9191         * s390-linux-tdep.c (s390_software_single_step): Adjust.
9192         * sparc-tdep.c (sparc_software_single_step): Adjust.
9193         * spu-tdep.c (spu_software_single_step): Adjust.
9194         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
9195
9196 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9197
9198         * gdbarch.sh: Use semi-colon as field separator instead of colon.
9199         * gdbarch.h: Re-generate.
9200
9201 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9202
9203         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
9204         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
9205         * python/py-instruction.c, python/py-instruction.h: New file.
9206         * python/py-record.c: Add py-instruction.h include.
9207         (gdbpy_initialize_record): Make gdb.Instruction a super class of
9208         gdb.RecordInstruction.
9209         * python/python-internal.h: Add gdbpy_initialize_instruction
9210         declaration.
9211         * python/python.c (do_start_initialization): Add
9212         gdbpy_initialize_instruction.
9213
9214 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9215
9216         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
9217         Remove.
9218         (btrace_func_from_recpy_func): New function.
9219         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
9220         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
9221         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
9222         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
9223         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
9224         Also, use new helper functions.
9225         (btpy_list_item): Use new helper functions.
9226         (recpy_bt_function_call_history): Use new type name.
9227         (btpy_call_getset): Remove.
9228         (gdbpy_initialize_btrace): Remove code to initialize
9229         gdb.BtraceFunctionCall.
9230         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
9231         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
9232         recpy_bt_func_prev, recpy_bt_func_next): New export.
9233         * python/py-record.c (recpy_func_type): New static object.
9234         (recpy_func_new, recpy_func_level, recpy_func_symbol,
9235         recpy_func_instructions, recpy_func_up, recpy_func_prev,
9236         recpy_func_next): New function.
9237         (recpy_element_hash, recpy_element_richcompare): Updated comment.
9238         (recpy_func_getset): New static object.
9239         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
9240         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
9241
9242 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9243
9244         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
9245         (btpy_object, btpy_insn_type, btpy_new): Remove.
9246         (btpy_list_object): Use gdb.RecordInstruction type instead of
9247         gdb.BtraceInstruction type.
9248         (btrace_insn_from_recpy_insn): New function.
9249         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
9250         btpy_new.
9251         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
9252         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
9253         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
9254         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
9255         instead of btpy_object.
9256         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9257         btpy_insn_data, btpy_insn_decode): Rename to ...
9258         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
9259         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
9260         recpy_bt_insn_decode): This.  Also, use new helper functions.
9261         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
9262         recpy_insn_type.
9263         (btpy_insn_getset): Remove.
9264         (gdbpy_initialize_btrace): Remove code to initialize
9265         gdb.BtraceInstruction.  Use recpy_element_object.
9266         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
9267         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
9268         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
9269         * python/py-record.c (recpy_insn_type): New static object.
9270         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
9271         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
9272         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
9273         New function.
9274         (recpy_insn_getset): New static object.
9275         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
9276         * python/py-record.h (recpy_element_object): New typedef.
9277         (recpy_insn_type, recpy_insn_new): New export.
9278
9279 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9280
9281         * py-record-btrace.c (btpy_insn_new): Removed.
9282         (btpy_insn_or_gap_new): New function.
9283         (btpy_insn_error): Removed.
9284         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9285         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
9286         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
9287         btpy_insn_or_gap_new instead of btpy_insn_new.
9288         (btpy_insn_getset): Remove btpy_insn_error.
9289         * py-record.c (recpy_gap_type): New static object.
9290         (recpy_gap_object): New typedef.
9291         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
9292         recpy_gap_reason_string): New function.
9293         (recpy_gap_getset): New static object.
9294         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
9295         * py-record.h (recpy_gap_new): New export.
9296
9297 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9298
9299         * python/py-record.c (recpy_ptid): Remove.
9300         (recpy_record_getset): Remove recpy_ptid.
9301
9302 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9303
9304         * btrace.c (btrace_fetch): Set inferior_ptid.
9305         * python/py-record-btrace.c: Add "py-record.h" include.
9306         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
9307         recpy_bt_end, recpy_bt_instruction_history,
9308         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
9309         in gdb.Record object instead of current ptid.
9310         * python/py-record.c: Include new "py-record.h" file.
9311         (recpy_record_object): Moved to py-record.h.
9312         * python/py-record.h: New file.
9313
9314 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9315
9316         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
9317         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
9318         indentation.
9319
9320 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
9321
9322         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
9323         the past maintainers section.
9324
9325 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9326
9327         * infcmd.c (get_return_value): Use regcache ctor, and remove
9328         cleanup.
9329
9330 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9331             Pedro Alves  <palves@redhat.com>
9332
9333         * regcache.c (regcache::regcache): New tag dispatch ctor.
9334         (do_cooked_read): Moved above.
9335         (regcache_dup): Use the tag dispatch ctor..
9336         * regcache.h (regcache): Declare ctor, delete copy ctor and
9337         assignment operator, remove friend regcache_dup.
9338
9339 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9340
9341         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
9342         call method save instead of regcache_cpy.
9343         * regcache.h (struct regcache): Make regcache_dup a friend.
9344
9345 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9346
9347         * regcache.c (struct regcache): Move to regcache.h
9348         (regcache::arch): New method.
9349         (regcache_get_ptid): Update.
9350         (get_regcache_arch): Call arch method.
9351         (get_regcache_aspace): Call method aspace.
9352         (register_buffer): Change it to method.
9353         (regcache_save): Change it to regcache::save.
9354         (regcache_restore): Likewise.
9355         (regcache_cpy_no_passthrough): Remove the declaration.
9356         (regcache_cpy): Call methods restore and cpy_no_passthrough.
9357         (regcache_cpy_no_passthrough): Change it to method
9358         cpy_no_passthrough.
9359         (regcache_register_status): Change it to method
9360         get_register_status.
9361         (regcache_invalidate): Change it to method invalidate.
9362         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
9363         (regcache_raw_update): Change it to method raw_update.
9364         (regcache_raw_read): Likewise.
9365         (regcache_raw_read_signed): Likewise.
9366         (regcache_raw_read_unsigned): Likewise.
9367         (regcache_raw_write_signed): Likewise.
9368         (regcache_raw_write_unsigned): Likewise.
9369         (regcache_cooked_read): Likewise.
9370         (regcache_cooked_read_value): Likewise.
9371         (regcache_cooked_read_signed): Likewise.
9372         (regcache_cooked_read_unsigned): Likewise.
9373         (regcache_cooked_write_signed): Likewise.
9374         (regcache_cooked_write_unsigned): Likewise.
9375         (regcache_raw_set_cached_value): Likewise.
9376         (regcache_raw_write): Likewise.
9377         (regcache_cooked_write): Likewise.
9378         (regcache_xfer_part): Likewise.
9379         (regcache_raw_read_part): Likewise.
9380         (regcache_raw_write_part): Likewise.
9381         (regcache_cooked_read_part): Likewise.
9382         (regcache_cooked_write_part): Likewise.
9383         (regcache_raw_supply): Likewise.
9384         (regcache_raw_collect): Likewise.
9385         (regcache_transfer_regset): Likewise.
9386         (regcache_supply_regset): Likewise.
9387         (regcache_collect_regset): Likewise.
9388         (regcache_debug_print_register): Likewise.
9389         (enum regcache_dump_what): Move it to regcache.h.
9390         (regcache_dump): Change it to method dump.
9391         * regcache.h (enum regcache_dump_what): New.
9392         (class regcache): New.
9393         * target.c (target_fetch_registers): Call method
9394         debug_print_register.
9395         (target_store_registers): Likewise.
9396
9397 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9398
9399         * windows-nat.c (struct lm_info_windows): Initialize field.
9400         (windows_make_so): Allocate lm_info_windows with new.
9401         (windows_free_so): Free lm_info_windows with delete.
9402
9403 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9404
9405         * solib-darwin.c (struct lm_info_darwin): Initialize field.
9406         (darwin_current_sos): Allocate lm_info_darwin with new, remove
9407         cleanup.
9408         (darwin_free_so): Free lm_info_darwin with delete.
9409
9410 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9411
9412         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
9413         <l_addr_p>: Change type to bool.
9414         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
9415         (svr4_free_so): Free lm_info_svr4 with delete.
9416         (svr4_copy_library_list): Replace memcpy with call to copy
9417         constructor.
9418         (library_list_start_library, svr4_default_sos): Allocate
9419         lm_info_svr4 with new.
9420
9421 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9422
9423         * solib-target.c (struct lm_info_target): Add destructor,
9424         initialize fields.
9425         <name>: Change type to std::string.
9426         (library_list_start_library): Allocate lm_info_target with new.
9427         (solib_target_free_library_list): Free lm_info_target with
9428         delete.
9429         (solib_target_current_sos): Adapt to std::string.
9430         (solib_target_free_so): Free lm_info_target with delete.
9431
9432 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9433
9434         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
9435         fields.
9436         (frv_current_sos): Allocate lm_info_frv with new.
9437         (frv_relocate_main_executable): Free lm_info_frv with delete,
9438         allocate with new.
9439         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
9440
9441 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9442
9443         * solib-frv.c (struct lm_info_frv): Fix indentation.
9444
9445 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9446
9447         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
9448         map field.
9449         (dsbt_current_sos): Allocate lm_info_dsbt with new.
9450         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
9451         and allocate with new.
9452         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
9453
9454 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9455
9456         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
9457         <filename, member_name>: Change type to std::string.
9458         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
9459         (library_list_start_library): Allocate lm_info_aix with new.
9460         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
9461         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
9462         with copy constructor.
9463
9464 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9465
9466         * solist.h (struct lm_info): Remove.
9467         (struct lm_info_base): New class.
9468         (struct so_list) <lm_info>: Change type to lm_info_base *.
9469         * nto-tdep.c (struct lm_info): Remove.
9470         (lm_addr): Adjust.
9471         * solib-aix.c (struct lm_info): Rename to ...
9472         (struct lm_info_aix): ... this.  Extend lm_info_base.
9473         (lm_info_p): Rename to ...
9474         (lm_info_aix_p): ... this, and adjust.
9475         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
9476         solib_aix_parse_libraries, library_list_start_library,
9477         solib_aix_free_library_list, solib_aix_parse_libraries,
9478         solib_aix_get_library_list,
9479         solib_aix_relocate_section_addresses, solib_aix_free_so,
9480         solib_aix_get_section_offsets,
9481         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
9482         Adjust.
9483         (struct solib_aix_inferior_data) <library_list>: Adjust.
9484         * solib-darwin.c (struct lm_info): Rename to ...
9485         (struct lm_info_darwin): ... this.  Extend lm_info_base.
9486         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
9487         * solib-dsbt.c (struct lm_info): Rename to ...
9488         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
9489         (struct dsbt_info) <main_executable_lm_info): Adjust.
9490         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
9491         dsbt_relocate_section_addresses): Adjust.
9492         * solib-frv.c (struct lm_info): Rename to ...
9493         (struct lm_info_frv): ... this.  Extend lm_info_base.
9494         (main_executable_lm_info): Adjust.
9495         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
9496         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
9497         find_canonical_descriptor_in_load_object,
9498         frv_fdpic_find_canonical_descriptor): Adjust.
9499         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
9500         to lm_info_svr4.
9501         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
9502         svr4_clear_so, svr4_copy_library_list,
9503         library_list_start_library, svr4_default_sos, svr4_read_so_list,
9504         svr4_current_sos, svr4_fetch_objfile_link_map,
9505         solist_update_incremental): Adjust.
9506         * solib-svr4.h (struct lm_info_svr4): Move here from
9507         solib-svr4.c.
9508         * solib-target.c (struct lm_info): Rename to ...
9509         (struct lm_info_target): ... this.  Extend lm_info_base.
9510         (lm_info_p): Rename to ...
9511         (lm_info_target_p): ... this.
9512         (solib_target_parse_libraries, library_list_start_segment,
9513         library_list_start_section, library_list_start_library,
9514         library_list_end_library, solib_target_free_library_list,
9515         solib_target_current_sos, solib_target_free_so,
9516         solib_target_relocate_section_addresses): Adjust.
9517         * windows-nat.c (struct lm_info): Rename to ...
9518         (struct lm_info_windows): ... this.  Extend lm_info_base.
9519         (windows_make_so, handle_load_dll, handle_unload_dll,
9520         windows_xfer_shared_libraries): Adjust.
9521
9522 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9523
9524         * solib-darwin.c (struct darwin_so_list): Remove.
9525         (darwin_current_sos): Allocate an so_list object instead of a
9526         darwin_so_list, separately allocate an lm_info object.
9527         (darwin_free_so): Free lm_info.
9528
9529 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
9530
9531         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
9532         with fprintf_filtered.
9533
9534 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9535
9536         * regcache.c (regcache::regcache): New function.
9537         (regcache::~regcache): New function.
9538         (regcache_xmalloc_1): Remove.
9539         (regcache_xmalloc): Call new regcache.
9540         (regcache_xfree): Call delete regcache.
9541         (get_thread_arch_aspace_regcache): Call new regcache.
9542
9543 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9544
9545         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
9546         lwp instead of ptid_get_lwp.
9547
9548 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9549
9550         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
9551         lwp_info instead of getting from inferior_ptid.
9552
9553 2017-04-27  Keith Seitz  <keiths@redhat.com>
9554
9555         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
9556         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
9557         (CV_CONVERSION_BADNESS): Define.
9558         (rank_one_type): Remove overly restrictive rvalue reference
9559         rank checks.
9560         Add cv-qualifier checks and subranks for type equality.
9561         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
9562         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
9563         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
9564
9565 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
9566
9567         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
9568         count when creating the object.
9569
9570 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
9571             Ulrich Weigand  <uweigand@de.ibm.com>
9572
9573         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
9574         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
9575         is used in AIX.
9576         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
9577         (process_xcoff_symbol): Likewise.
9578         (scan_xcoff_symtab): Likewise.
9579
9580 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9581
9582         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
9583         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
9584         (ia64_access_reg): Use get_frame_register_unsigned.
9585         (ia64_access_rse_reg): Likewise.
9586         (ia64_libunwind_frame_prev_register): Likewise.
9587
9588 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
9589
9590         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
9591         * gdbarch.c: Regenerated.
9592         * gdbarch.h: Regenerated.
9593         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
9594         visibility external.
9595         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
9596         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
9597         (enum cfa_how_kind): Move to ...
9598         (struct dwarf2_frame_state_reg_info): Likewise.
9599         (struct dwarf2_frame_state): Likewise.
9600         * dwarf2-frame.h: ... here.
9601         (dwarf2_frame_state_alloc_regs): New declaration.
9602         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
9603         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
9604
9605 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9606
9607         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
9608         regcache_raw_read_unsigned.
9609         (xtensa_pseudo_register_write): Likewise.
9610
9611 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9612
9613         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
9614         (nds32_pseudo_register_write): Likewise.
9615
9616 2017-04-25  Yao Qi  <yao.qi@linaro.org>
9617
9618         * regcache.c (struct regcache) <readonly_p>: Change its type
9619         to bool.
9620         (regcache_xmalloc_1): Update parameter type and callers update.
9621
9622 2017-04-25  Yao Qi  <yao.qi@linaro.org>
9623
9624         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
9625         set_gdbarch_wchar_bit.
9626         * arm-tdep.c (arm_gdbarch_init): Likewise.
9627
9628 2017-04-25  Pedro Alves  <palves@redhat.com>
9629
9630         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
9631         (BothAreRelocatable, memcopy, memmove): Don't define.
9632         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
9633         macros.
9634
9635 2017-04-25  Pedro Alves  <palves@redhat.com>
9636
9637         * common/common-defs.h: Include "common/poison.h".
9638         * common/function-view.h: (Not, Or, Requires): Move to traits.h
9639         and adjust.
9640         * common/poison.h: New file.
9641         * common/traits.h: Include <type_traits>.
9642         (Not, Or, Requires): New, moved from common/function-view.h.
9643
9644 2017-04-25  Pedro Alves  <palves@redhat.com>
9645
9646         * breakpoint.h (struct breakpoint): In-class initialize all
9647         fields.  Make boolean fields "bool".
9648         * breakpoint.c (init_raw_breakpoint_without_location): Remove
9649         memset call and initializations no longer necessary.
9650
9651 2017-04-25  Pedro Alves  <palves@redhat.com>
9652
9653         * btrace.c (pt_btrace_insn_flags): Change parameter type to
9654         reference.
9655         (pt_btrace_insn): New function.
9656         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
9657
9658 2017-04-25  Pedro Alves  <palves@redhat.com>
9659
9660         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
9661         "base" field and inherit from "bp_location" instead.  Add
9662         non-default ctor.
9663         (allocate_location_exception): Use new non-default ctor.
9664         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
9665         (init_bp_location): Convert to ...
9666         (bp_location::bp_location): ... this new ctor, and remove memset
9667         call.
9668         (base_breakpoint_allocate_location): Use the new non-default ctor.
9669         * breakpoint.h (bp_location): Now a class.  Declare default and
9670         non-default ctors.  In-class initialize all members.
9671         (init_bp_location): Remove declaration.
9672
9673 2017-04-25  Pedro Alves  <palves@redhat.com>
9674
9675         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
9676         assignment operator.
9677
9678 2017-04-24  Yao Qi  <yao.qi@linaro.org>
9679
9680         * doublest.c (convert_doublest_to_floatformat): Call
9681         floatformat_totalsize_bytes.
9682
9683 2017-04-22  Tom Tromey  <tom@tromey.com>
9684
9685         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
9686         ui_out_emit_list.
9687         * stack.c (print_frame): Use ui_out_emit_list.
9688         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9689         ui_out_emit_list.
9690         * mi/mi-main.c (print_one_inferior)
9691         (mi_cmd_data_list_register_names)
9692         (mi_cmd_data_list_register_values, mi_cmd_list_features)
9693         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
9694         ui_out_emit_list.
9695         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
9696         (mi_output_solib_attribs): Use ui_out_emit_list,
9697         ui_out_emit_tuple.
9698         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
9699         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
9700         (mi_cmd_stack_list_args, list_args_or_locals): Use
9701         ui_out_emit_list.
9702         * disasm.c (do_assembly_only): Use ui_out_emit_list.
9703         * breakpoint.c (print_solib_event, output_thread_groups): Use
9704         ui_out_emit_list.
9705
9706 2017-04-22  Tom Tromey  <tom@tromey.com>
9707
9708         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
9709         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
9710         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
9711
9712 2017-04-22  Tom Tromey  <tom@tromey.com>
9713
9714         * tracepoint.c (tvariables_info_1)
9715         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
9716
9717 2017-04-22  Tom Tromey  <tom@tromey.com>
9718
9719         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
9720         annotate_arg_emitter.
9721         * breakpoint.c (print_mention_watchpoint)
9722         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
9723         * annotate.h (struct annotate_arg_emitter): New.
9724
9725 2017-04-22  Tom Tromey  <tom@tromey.com>
9726
9727         * record-btrace.c (record_btrace_insn_history)
9728         (record_btrace_insn_history_range, record_btrace_call_history)
9729         (record_btrace_call_history_range): Use ui_out_emit_tuple.
9730         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
9731         ui_out_emit_tuple.
9732         * stack.c (print_frame_info): Use ui_out_emit_tuple.
9733         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
9734         * skip.c (skip_info): Use ui_out_emit_tuple.
9735         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
9736         * progspace.c (print_program_space): Use ui_out_emit_tuple.
9737         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
9738         * osdata.c (info_osdata): Use ui_out_emit_tuple.
9739         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9740         ui_out_emit_tuple.
9741         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
9742         (output_register, mi_cmd_data_read_memory)
9743         (mi_cmd_data_read_memory_bytes, mi_load_progress)
9744         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
9745         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
9746         Use ui_out_emit_tuple.
9747         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
9748         ui_out_emit_tuple.
9749         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9750         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
9751         * linux-thread-db.c (info_auto_load_libthread_db): Use
9752         ui_out_emit_tuple.
9753         * inferior.c (print_inferior): Use ui_out_emit_tuple.
9754         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
9755         * disasm.c (do_mixed_source_and_assembly_deprecated)
9756         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
9757         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
9758         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
9759         * breakpoint.c (print_one_breakpoint_location)
9760         (print_one_breakpoint): Use ui_out_emit_tuple.
9761         * auto-load.c (print_script, info_auto_load_cmd): Use
9762         ui_out_emit_tuple.
9763         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
9764
9765 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
9766
9767         * thread.c (print_thread_info_1): Remove dead code.
9768
9769 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
9770
9771         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
9772         GDB_SELF_TEST.
9773         * arm-tdep.c (selftests::arm_record_test): Likewise.
9774
9775 2017-04-21  Yao Qi  <yao.qi@linaro.org>
9776
9777         * regcache.c (regcache_restore): Remove argument 2.  Replace
9778         argument 3 with regcache.  Get register status from
9779         src->register_status and get register contents from
9780         register_buffer (src, regnum).
9781         (regcache_cpy): Update.
9782
9783 2017-04-19  Pedro Alves  <palves@redhat.com>
9784
9785         * gdbthread.h (thread): Add missing closing parenthesis in
9786         comment.
9787
9788 2017-04-19  Pedro Alves  <palves@redhat.com>
9789
9790         * common/refcounted-object.h: New file.
9791         * gdbthread.h: Include "common/refcounted-object.h".
9792         (thread_info): Inherit from refcounted_object and add comments.
9793         (thread_info::incref, thread_info::decref)
9794         (thread_info::m_refcount): Delete.
9795         (thread_info::deletable): Use the refcounted_object::refcount()
9796         method.
9797         * inferior.c (current_inferior_): Add comment.
9798         (set_current_inferior): Increment/decrement refcounts.
9799         (prune_inferiors, remove_inferior_command): Skip inferiors marked
9800         not-deletable instead of comparing with the current inferior.
9801         (initialize_inferiors): Increment the initial inferior's refcount.
9802         * inferior.h (struct inferior): Forward declare.
9803         Include "common/refcounted-object.h".
9804         (current_inferior, set_current_inferior): Move declaration to
9805         before struct inferior's definition, and fix comment.
9806         (inferior): Inherit from refcounted_object.  Add comments.
9807         * thread.c (switch_to_thread_no_regs): Reference the thread's
9808         inferior pointer directly instead of doing a ptid lookup.
9809         (switch_to_no_thread): New function.
9810         (switch_to_thread(thread_info *)): New function, factored out
9811         from ...
9812         (switch_to_thread(ptid_t)): ... this.
9813         (restore_current_thread): Delete.
9814         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
9815         fields, and add 'inf' field.
9816         (do_restore_current_thread_cleanup): Check whether old->inf is
9817         alive instead of looking up an inferior by ptid.  Use
9818         switch_to_thread and switch_to_no_thread.
9819         (restore_current_thread_cleanup_dtor): Use old->inf directly
9820         instead of lookup up an inferior by id.  Decref the inferior.
9821         Don't restore 'removable'.
9822         (make_cleanup_restore_current_thread): Same the inferior pointer
9823         in old, instead of the inferior number.  Incref the inferior.
9824         Don't save/clear 'removable'.
9825
9826 2017-04-19  Pedro Alves  <palves@redhat.com>
9827
9828         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9829         unittests/scoped_restore-selftests.c.
9830         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
9831         * common/scoped_restore.h (scoped_restore_base): Make "class".
9832         (scoped_restore_base::release): New public method.
9833         (scoped_restore_base::scoped_restore_base): New protected ctor.
9834         (scoped_restore_base::m_saved_var): New protected field.
9835         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
9836         scoped_restore_base base class instead of m_saved_var directly.
9837         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
9838         (scoped_restore_tmpl::scoped_restore_tmpl(const
9839         scoped_restore_tmpl<T>&)): Likewise.
9840         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
9841         method.
9842         (scoped_restore_tmpl::saved_var): New method.
9843         (scoped_restore_tmpl::m_saved_var): Delete.
9844         * inferior.h (inferior::detaching): Now a bool.
9845         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
9846         cleanup.
9847         * unittests/scoped_restore-selftests.c: New file.
9848
9849 2017-04-19  Pedro Alves  <palves@redhat.com>
9850
9851         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
9852         Re-sort in alphabetic order.
9853
9854 2017-04-18  Pedro Alves  <palves@redhat.com>
9855
9856         * xml-support.c (obstack_xml_printf): Delete.
9857         * xml-support.h (obstack_xml_printf): Delete.
9858
9859 2017-04-18  Pedro Alves  <palves@redhat.com>
9860
9861         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
9862         vdebug, verror, body_text, start_element, end_element, name,
9863         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
9864         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
9865         is_xinclude>: Make private and add m_ prefix.
9866         (gdb_xml_parser::body_text): New method, based on ...
9867         (gdb_xml_body_text): ... this.  Adjust.
9868         (gdb_xml_parser::vdebug): New method, based on ...
9869         (gdb_xml_debug): ... this.  Adjust.
9870         (gdb_xml_parser::verror): New method, based on ...
9871         (gdb_xml_error): ... this.  Adjust.
9872         (gdb_xml_parser::start_element): New method, based on ...
9873         (gdb_xml_start_element): ... this.  Adjust.
9874         (gdb_xml_start_element_wrapper): Defer to
9875         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
9876         (gdb_xml_parser::end_element): New method, based on ...
9877         (gdb_xml_end_element_wrapper): ... this.  Adjust.
9878         (gdb_xml_parser::~gdb_xml_parser): Adjust.
9879         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
9880         (gdb_xml_parser::use_dtd): New method, based on ...
9881         (gdb_xml_use_dtd): ... this.  Adjust.
9882         (gdb_xml_parser::parse): New method, based on ...
9883         (gdb_xml_parse): ... this.  Adjust.
9884         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
9885         (xinclude_start_include): Adjust to call the parser's name method.
9886         (xml_xinclude_default, xml_xinclude_start_doctype)
9887         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
9888         method.
9889         (xml_process_xincludes): Adjust to call parser methods.
9890         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
9891         declarations.
9892
9893 2017-04-18  Pedro Alves  <palves@redhat.com>
9894
9895         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
9896         gdb::optional<std::string>.
9897         * xml-support.c: Include <string>.
9898         (scope_level::scope_level(scope_level &&))
9899         (scope_level::~scope_level): Delete.
9900         (scope_level::body): Now a std::string.
9901         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
9902         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
9903         parameter.
9904         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
9905         (xinclude_parsing_data::output): Now a std::string reference.
9906         (xinclude_start_include): Adjust.
9907         (xml_xinclude_default): Adjust.
9908         (xml_process_xincludes): Add 'output' parameter, and return bool.
9909         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
9910         and return bool.
9911         * xml-tdesc.c: Include <unordered_map> and <string>.
9912         (tdesc_xml_cache): Delete.
9913         (tdesc_xml_cache_s): Delete.
9914         (xml_cache): Now an std::unordered_map.
9915         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
9916         (target_fetch_description_xml): Change return type to
9917         gdb::optional<std::string>, and adjust.
9918         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
9919         (target_fetch_description_xml): Change return type to
9920         gdb::optional<std::string>.
9921
9922 2017-04-18  Pedro Alves  <palves@redhat.com>
9923
9924         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9925         unittests/optional-selftests.c.
9926         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
9927         * unittests/optional-selftests.c: New file.
9928         * unittests/optional/assignment/1.cc: New file.
9929         * unittests/optional/assignment/2.cc: New file.
9930         * unittests/optional/assignment/3.cc: New file.
9931         * unittests/optional/assignment/4.cc: New file.
9932         * unittests/optional/assignment/5.cc: New file.
9933         * unittests/optional/assignment/6.cc: New file.
9934         * unittests/optional/assignment/7.cc: New file.
9935         * unittests/optional/cons/copy.cc: New file.
9936         * unittests/optional/cons/default.cc: New file.
9937         * unittests/optional/cons/move.cc: New file.
9938         * unittests/optional/cons/value.cc: New file.
9939         * unittests/optional/in_place.cc: New file.
9940         * unittests/optional/observers/1.cc: New file.
9941         * unittests/optional/observers/2.cc: New file.
9942
9943 2017-04-18  Pedro Alves  <palves@redhat.com>
9944
9945         * common/gdb_optional.h: Include common/traits.h.
9946         (in_place_t): New type.
9947         (in_place): New constexpr variable.
9948         (optional::optional): Remove member initialization of
9949         m_instantiated.
9950         (optional::optional(in_place_t...)): New constructor.
9951         (optional::~optional): Use reset.
9952         (optional::optional(const optional&)): New.
9953         (optional::optional(const optional&&)): New.
9954         (optional::optional(T &)): New.
9955         (optional::optional(T &&)): New.
9956         (operator::operator=(const optional &)): New.
9957         (operator::operator=(optional &&)): New.
9958         (operator::operator= (const T &))
9959         (operator::operator= (T &&))
9960         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
9961         (operator::reset): New.
9962         (operator::m_instantiated):: Add in-class initializer.
9963         * common/traits.h: Include <type_traits>.
9964         (struct And): New types.
9965
9966 2017-04-18  Pedro Alves  <palves@redhat.com>
9967
9968         * xml-support.c: Include <vector>.
9969         (scope_level::scope_level(const gdb_xml_element *))
9970         (scope_level::scope_level(scope_level&&)): New.
9971         (scope_level::~scope_level): New.
9972         (scope_level_s): Delete.
9973         (gdb_xml_parser::scopes): Now a std::vector.
9974         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
9975         Use std::vector.
9976         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
9977         scope cleanup code.
9978         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
9979         of the scopes member.  Use std::vector::emplace_back.
9980
9981 2017-04-18  Pedro Alves  <palves@redhat.com>
9982
9983         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
9984         a bool.
9985         (gdb_xml_end_element): Change type of first parameter.
9986         (gdb_xml_cleanup): Rename to ...
9987         (gdb_xml_parser::~gdb_xml_parser): ... this.
9988         (gdb_xml_create_parser_and_cleanup): Delete with ...
9989         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
9990         to this new ctor.
9991         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
9992         using gdb_xml_create_parser_and_cleanup.
9993         (xinclude_parsing_data): Add ctor/dtor.
9994         (xml_xinclude_cleanup): Delete.
9995         (xml_process_xincludes): Create a local xinclude_parsing_data
9996         instead of heap-allocating one.  Create a local gdb_xml_parser
9997         instead of heap-allocating one with
9998         gdb_xml_create_parser_and_cleanup.
9999
10000 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
10001
10002         PR threads/20743
10003         * fbsd-nat.c (resume_one_thread_cb): Remove.
10004         (resume_all_threads_cb): Remove.
10005         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
10006         iterate_over_threads.
10007
10008 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
10009
10010         * NEWS: Create a new section for the next release branch.
10011         Rename the section of the current branch, now that it has
10012         been cut.
10013
10014 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
10015
10016         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
10017         * version.in: Bump version to 8.0.50.DATE-git.
10018
10019 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
10020
10021         PR gdb/21385
10022         * windows-nat.c (windows_create_inferior): Declare 'allargs'
10023         independently of the host, and fix build breakage on Cygwin.
10024
10025 2017-04-13  Pedro Alves  <palves@redhat.com>
10026
10027         * inferior.c (free_inferior): Convert to ...
10028         (inferior::~inferior): ... this dtor.
10029         (inferior::inferior): New ctor, factored out from ...
10030         (add_inferior_silent): ... here.  Allocate the inferior with a new
10031         expression.
10032         (delete_inferior): Call delete instead of free_inferior.
10033         * inferior.h (gdb_environ, continuation): Forward declare.
10034         (inferior): Now a class.  Add in-class initialization to all
10035         members.  Make boolean fields bool, except 'detaching'.
10036         (inferior::inferior): New explicit ctor.
10037         (inferior::~inferior): New.
10038
10039 2017-04-13  Pedro Alves  <palves@redhat.com>
10040
10041         * inferior.c (init_inferior_list): Delete.
10042         * inferior.h (init_inferior_list): Delete.
10043
10044 2017-04-13  Pedro Alves  <palves@redhat.com>
10045
10046         PR threads/13217
10047         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
10048         (top level): Call it twice, with different thread sets.
10049
10050 2017-04-13  Pedro Alves  <palves@redhat.com>
10051
10052         * thread.c: Include <algorithm>.
10053         (thread_array_cleanup): Delete.
10054         (scoped_inc_dec_ref): New class.
10055         (live_threads_count): New function.
10056         (set_thread_refcount): Delete.
10057         (tp_array_compar_ascending): Now a bool.
10058         (tp_array_compar): Convert to a std::sort comparison function.
10059         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
10060         and live_threads_count.
10061
10062 2017-04-13  Pedro Alves  <palves@redhat.com>
10063
10064         * infrun.c (follow_fork_inferior): Also switch the current
10065         inferior.
10066
10067 2017-04-13  Pedro Alves  <palves@redhat.com>
10068
10069         * breakpoint.c (watch_command_1): Save watchpoint-frame info
10070         before calling create_internal_breakpoint.
10071
10072 2017-04-13  Pedro Alves  <palves@redhat.com>
10073
10074         * fork-child.c (execv_argv): New class.
10075         (breakup_args): Refactored as ...
10076         (execv_argv::init_for_no_shell): .. this method of execv_argv.
10077         Copy arguments to storage and replace separators with NULL
10078         terminators in place.
10079         (escape_bang_in_quoted_argument): Adjust to return bool.
10080         (execv_argv::execv_argv): New ctor.
10081         (execv_argv::init_for_shell): New method, factored out from
10082         fork_inferior.  Don't strdup strings into the vector.
10083         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
10084         Remove free_vector_argv call.
10085
10086 2017-04-13  Yao Qi  <yao.qi@linaro.org>
10087
10088         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
10089         tdep->rx_psw_type.
10090
10091 2017-04-13  Yao Qi  <yao.qi@linaro.org>
10092
10093         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
10094         * rx-tdep.c (rx_gdbarch_init): Likewise.
10095
10096 2017-04-13  Pedro Alves  <palves@redhat.com>
10097
10098         * breakpoint.h (struct breakpoint): Reindent.
10099
10100 2017-04-13  Pedro Alves  <palves@redhat.com>
10101
10102         * breakpoint.c (bp_location): Rename to ...
10103         (bp_locations): ... this.  All references updated.
10104         (bp_location_count): Rename to ...
10105         (bp_locations_count): ... this.  All references updated.
10106         (bp_location_placed_address_before_address_max): Rename to ...
10107         (bp_locations_placed_address_before_address_max): ... this.  All
10108         references updated.
10109         (bp_location_shadow_len_after_address_max): Rename to ...
10110         (bp_locations_shadow_len_after_address_max): ... this.  All
10111         references updated.
10112         (bp_location_compare_addrs): Rename to ...
10113         (bp_locations_compare_addrs): ... this.  All references updated.
10114         (bp_location_compare):Rename to ...
10115         (bp_locations_compare): ... this.  All references updated.
10116         (bp_location_target_extensions_update): Rename to ...
10117         (bp_locations_target_extensions_update): ... this.  All references
10118         updated.
10119
10120 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10121
10122         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
10123         * common/common.m4: Check headers 'termios.h', 'termio.h' and
10124         'sgtty.h'.
10125         * common/gdb_termios.h: New file, with parts of "terminal.h".
10126         * inflow.c: Include "gdb_termios.h".
10127         * ser-unix.c: Include "gdb_termios.h".
10128         * terminal.h: Move terminal-related defines to
10129         "common/gdb_termios.h".
10130
10131 2017-04-12  Tom Tromey  <tom@tromey.com>
10132
10133         * probe.c (parse_probes): Update.
10134         * location.h (delete_event_location): Don't declare.
10135         (event_location_deleter::operator()): Update.
10136         * location.c (event_location_deleter::operator()): Rename from
10137         delete_event_location.
10138         * linespec.h (linespec_result) <location>: Change type to
10139         event_location_up.
10140         * linespec.c (canonicalize_linespec, event_location_to_sals)
10141         (decode_objc): Update.
10142         (linespec_result): Don't call delete_event_location.
10143         * breakpoint.c (create_breakpoints_sal)
10144         (bkpt_probe_create_sals_from_location)
10145         (strace_marker_create_sals_from_location): Update.
10146
10147 2017-04-12  Tom Tromey  <tom@tromey.com>
10148
10149         * linespec.h (struct linespec_result): Add constructor and
10150         destructor.
10151         (init_linespec_result, destroy_linespec_result)
10152         (make_cleanup_destroy_linespec_result): Don't declare.
10153         * linespec.c (init_linespec_result): Remove.
10154         (linespec_result::~linespec_result): Rename from
10155         destroy_linespec_result.  Update.
10156         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
10157         Remove.
10158         * breakpoint.c (create_breakpoint, break_range_command)
10159         (decode_location_default): Update.
10160         * ax-gdb.c (agent_command_1): Update.
10161
10162 2017-04-12  Tom Tromey  <tom@tromey.com>
10163
10164         * remote.c (remote_download_tracepoint): Update.
10165         * python/py-breakpoint.c (bppy_get_location): Update.
10166         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
10167         (gdbscm_breakpoint_location): Update.
10168         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
10169         * breakpoint.h (struct breakpoint) <location, location_range_end>:
10170         Change type to event_location_up.
10171         * breakpoint.c (create_overlay_event_breakpoint)
10172         (create_longjmp_master_breakpoint)
10173         (create_std_terminate_master_breakpoint)
10174         (create_exception_master_breakpoint)
10175         (breakpoint_event_location_empty_p, print_breakpoint_location)
10176         (print_one_breakpoint_location, create_thread_event_breakpoint)
10177         (init_breakpoint_sal, create_breakpoint)
10178         (print_recreate_ranged_breakpoint, break_range_command)
10179         (init_ada_exception_breakpoint, say_where): Update.
10180         (base_breakpoint_dtor): Don't call delete_event_location.
10181         (bkpt_print_recreate, tracepoint_print_recreate)
10182         (dprintf_print_recreate, update_static_tracepoint)
10183         (breakpoint_re_set_default): Update.
10184
10185 2017-04-12  Tom Tromey  <tom@tromey.com>
10186
10187         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
10188         type of "to_do".  Update.
10189         (compute_stack_depth): Use std::vector.
10190
10191 2017-04-12  Tom Tromey  <tom@tromey.com>
10192
10193         * printcmd.c (find_instruction_backward): Use std::vector.
10194
10195 2017-04-12  Tom Tromey  <tom@tromey.com>
10196
10197         * symfile.c (objfilep): Remove typedef.
10198         (reread_symbols): Use a std::vector.
10199
10200 2017-04-12  Tom Tromey  <tom@tromey.com>
10201
10202         * mi/mi-main.c (exec_direction_forward): Remove.
10203         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
10204         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
10205         scoped_restore.
10206         * guile/guile.c (guile_repl_command, guile_command)
10207         (gdbscm_execute_gdb_command): Use scoped_restore.
10208         * go-exp.y (go_parse): Use scoped_restore.
10209         * d-exp.y (d_parse): Use scoped_restore.
10210         * cli/cli-decode.c (cmd_func): Use scoped_restore.
10211         * c-exp.y (c_parse): Use scoped_restore.
10212
10213 2017-04-12  Tom Tromey  <tom@tromey.com>
10214
10215         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
10216         (mi_parse): Update return type.
10217         (mi_parse_free): Remove.
10218         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
10219         (mi_parse::~mi_parse): Rename from mi_parse_free.
10220         (mi_parse_cleanup): Remove.
10221         (mi_parse): Return a unique_ptr.  Use new.
10222         * mi/mi-main.c (mi_execute_command): Update.
10223
10224 2017-04-12  Tom Tromey  <tom@tromey.com>
10225
10226         * location.c (explicit_location_lex_one): Return a
10227         unique_xmalloc_ptr.
10228         (string_to_explicit_location): Update.  Remove cleanups.
10229
10230 2017-04-12  Tom Tromey  <tom@tromey.com>
10231
10232         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
10233         (compare_value_and_voffset): Change type.  Update.
10234         (compute_vtable_size): Change type of "offset_vec".
10235         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
10236         (gnuv3_get_typeid): Remove extraneous declaration.
10237
10238 2017-04-12  Tom Tromey  <tom@tromey.com>
10239
10240         * charset.h (wchar_iterator): Fix comment.
10241
10242 2017-04-12  Tom Tromey  <tom@tromey.com>
10243
10244         * charset.c (iconv_wrapper): New class.
10245         (cleanup_iconv): Remove.
10246         (convert_between_encodings): Use it.
10247
10248 2017-04-12  Tom Tromey  <tom@tromey.com>
10249
10250         * symfile.h (increment_reading_symtab): Update type.
10251         * symfile.c (decrement_reading_symtab): Remove.
10252         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
10253         * psymtab.c (psymtab_to_symtab): Update.
10254         * dwarf2read.c (dw2_instantiate_symtab): Update.
10255
10256 2017-04-12  Tom Tromey  <tom@tromey.com>
10257
10258         * jit.c (struct jit_reader): Declare separately.  Add constructor
10259         and destructor.  Change type of "handle".
10260         (loaded_jit_reader): Define separately.
10261         (jit_reader_load): Update.  New "new".
10262         (jit_reader_unload_command): Use "delete".
10263         * gdb-dlfcn.h (struct dlclose_deleter): New.
10264         (gdb_dlhandle_up): New typedef.
10265         (gdb_dlopen, gdb_dlsym): Update types.
10266         (gdb_dlclose): Remove.
10267         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
10268         (gdb_dlsym): Change type of "handle".
10269         (make_cleanup_dlclose): Remove.
10270         (dlclose_deleter::operator()): Rename from gdb_dlclose.
10271         * compile/compile-c-support.c (load_libcc): Update.
10272
10273 2017-04-12  Tom Tromey  <tom@tromey.com>
10274
10275         * symtab.h (find_pcs_for_symtab_line): Change return type.
10276         * symtab.c (find_pcs_for_symtab_line): Change return type.
10277         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
10278         type of "vec".  Update.
10279         (ltpy_get_pcs_for_line): Update.
10280         * linespec.c (decode_digits_ordinary): Update.
10281
10282 2017-04-12  Tom Tromey  <tom@tromey.com>
10283
10284         * tracepoint.c (actions_command): Update.
10285         * python/python.c (python_command, python_interactive_command):
10286         Update.
10287         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10288         * guile/guile.c (guile_command): Update.
10289         * defs.h (read_command_lines, read_command_lines_1): Return
10290         command_line_up.
10291         (command_lines_deleter): New struct.
10292         (command_line_up): New typedef.
10293         * compile/compile.c (compile_code_command)
10294         (compile_print_command): Update.
10295         * cli/cli-script.h (get_command_line, copy_command_lines): Return
10296         command_line_up.
10297         (make_cleanup_free_command_lines): Remove.
10298         * cli/cli-script.c (get_command_line, read_command_lines_1)
10299         (copy_command_lines): Return command_line_up.
10300         (while_command, if_command, read_command_lines, define_command)
10301         (document_command): Update.
10302         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
10303         Remove.
10304         * breakpoint.h (breakpoint_set_commands): Change type of
10305         "commands".
10306         * breakpoint.c (breakpoint_set_commands): Change type of
10307         "commands".  Update.
10308         (do_map_commands_command, update_dprintf_command_list)
10309         (create_tracepoint_from_upload): Update.
10310
10311 2017-04-12  Tom Tromey  <tom@tromey.com>
10312
10313         * tracepoint.c (scope_info): Update.
10314         * spu-tdep.c (spu_catch_start): Update.
10315         * python/python.c (gdbpy_decode_line): Update.
10316         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
10317         * python/py-breakpoint.c (bppy_init): Update.
10318         * probe.c (parse_probes): Update.
10319         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
10320         * location.h (event_location_deleter): New struct.
10321         (event_location_up): New typedef.
10322         (new_linespec_location, new_address_location, new_probe_location)
10323         (new_explicit_location, copy_event_location)
10324         (string_to_event_location, string_to_event_location_basic)
10325         (string_to_explicit_location): Update return type.
10326         (make_cleanup_delete_event_location): Remove.
10327         * location.c (new_linespec_location, new_address_location)
10328         (new_probe_location, new_explicit_location, copy_event_location):
10329         Return event_location_up.
10330         (delete_event_location_cleanup)
10331         (make_cleanup_delete_event_location): Remove.
10332         (string_to_explicit_location, string_to_event_location_basic)
10333         (string_to_event_location): Return event_location_up.
10334         * linespec.c (canonicalize_linespec, event_location_to_sals)
10335         (decode_line_with_current_source)
10336         (decode_line_with_last_displayed, decode_objc): Update.
10337         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
10338         * completer.c (location_completer): Update.
10339         * cli/cli-cmds.c (edit_command, list_command): Update.
10340         * breakpoint.c (create_overlay_event_breakpoint)
10341         (create_longjmp_master_breakpoint)
10342         (create_std_terminate_master_breakpoint)
10343         (create_exception_master_breakpoint)
10344         (create_thread_event_breakpoint): Update.
10345         (init_breakpoint_sal): Update.  Remove some dead code.
10346         (create_breakpoint_sal): Change type of "location".  Update.
10347         (create_breakpoints_sal, create_breakpoint, break_command_1)
10348         (dprintf_command, break_range_command, until_break_command)
10349         (init_ada_exception_breakpoint)
10350         (strace_marker_create_sals_from_location)
10351         (update_static_tracepoint, trace_command, ftrace_command)
10352         (strace_command, create_tracepoint_from_upload): Update.
10353         * break-catch-throw.c (re_set_exception_catchpoint): Update.
10354         * ax-gdb.c (agent_command_1): Update.
10355
10356 2017-04-12  Pedro Alves  <palves@redhat.com>
10357
10358         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
10359         * configure.tgt: Handle i[34567]86-*-go32* and
10360         i[34567]86-*-msdosdjgpp*.
10361         * i386-tdep.c (i386_svr4_reg_to_regnum):
10362         Make extern.
10363         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
10364         i386-go32-tdep.c.
10365         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
10366         * i386-go32-tdep.c: New file.
10367         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
10368         declarations.
10369
10370 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
10371
10372         * aix-thread.c (pd_status2str): Change return type to const char *.
10373
10374 2017-04-12  Pedro Alves  <palves@redhat.com>
10375
10376         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
10377         calls to set_gdbarch_gnu_triplet_regexp.
10378
10379 2017-04-12  Pedro Alves  <palves@redhat.com>
10380
10381         PR gdb/21323
10382         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
10383         New enum value.
10384         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
10385         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
10386         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
10387         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
10388         * gdbarch.h, gdbarch.c: Regenerate.
10389         * aarch64-tdep.c (aarch64_gdbarch_init): Override
10390         gdbarch_wchar_bit and gdbarch_wchar_signed.
10391         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
10392         * arm-tdep.c (arm_gdbarch_init): Likewise.
10393         * avr-tdep.c (avr_gdbarch_init): Likewise.
10394         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
10395         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
10396         * i386-tdep.c (i386_go32_init_abi): Likewise.
10397         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10398         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10399         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10400         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10401         * sh-tdep.c (sh_gdbarch_init): Likewise.
10402         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10403         * sparc64-tdep.c (sparc64_init_abi): Likewise.
10404         * windows-tdep.c (windows_init_abi): Likewise.
10405         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10406
10407 2017-04-12  Pedro Alves  <palves@redhat.com>
10408
10409         PR c++/21323
10410         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
10411         cplus_primitive_type_char32_t>: New enum values.
10412         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
10413         and cplus_primitive_type_char32_t.
10414         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
10415         32, use the archtecture's built-in type for char16_t and char32_t,
10416         respectively.  Otherwise, fallback to init_integer_type as before,
10417         but make the type unsigned, and issue a complaint.
10418         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
10419
10420 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
10421
10422         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
10423         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
10424
10425 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10426
10427         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
10428         'const char *'.
10429
10430 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10431
10432         * common/common-utils.c (free_vector_argv): New function.
10433         * common/common-utils.h: Include <vector>.
10434         (free_vector_argv): New prototype.
10435         * darwin-nat.c (darwin_create_inferior): Rewrite function
10436         prototype in order to constify "exec_file" and accept a
10437         "std::string" for "allargs".
10438         * fork-child.c: Include <vector>.
10439         (breakup_args): Rewrite function, using C++.
10440         (fork_inferior): Rewrite function header, constify "exec_file_arg"
10441         and accept "std::string" for "allargs".  Update the code to
10442         calculate "argv" based on "allargs".  Update calls to "exec_fun"
10443         and "execvp".
10444         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
10445         order to constify "exec_file" and accept a "std::string" for
10446         "allargs".
10447         * go32-nat.c (go32_create_inferior): Likewise.
10448         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
10449         * infcmd.c (run_command_1): Constify "exec_file".  Use
10450         "std::string" for inferior arguments.
10451         * inferior.h (fork_inferior): Update prototype.
10452         * linux-nat.c (linux_nat_create_inferior): Rewrite function
10453         prototype in order to constify "exec_file" and accept a
10454         "std::string" for "allargs".
10455         * nto-procfs.c (procfs_create_inferior): Likewise.
10456         * procfs.c (procfs_create_inferior): Likewise.
10457         * remote-sim.c (gdbsim_create_inferior): Likewise.
10458         * remote.c (extended_remote_run): Update code to accept
10459         "std::string" as argument.
10460         (extended_remote_create_inferior): Rewrite function prototype in
10461         order to constify "exec_file" and accept a "std::string" for
10462         "allargs".
10463         * rs6000-nat.c (super_create_inferior): Likewise.
10464         (rs6000_create_inferior): Likewise.
10465         * target.h (struct target_ops) <to_create_inferior>: Likewise.
10466         * windows-nat.c (windows_create_inferior): Likewise.
10467
10468 2017-04-11  Pedro Alves  <palves@redhat.com>
10469
10470         * thread.c: Fix whitespace throughout.
10471
10472 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10473
10474         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
10475
10476 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
10477
10478         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
10479
10480 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
10481
10482         PR gdb/21364
10483         * osdata.c (info_osdata): Check if 'type' is an empty string
10484         instead of NULL.
10485
10486 2017-04-10  Pedro Alves  <palves@redhat.com>
10487
10488         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
10489         (ptid_to_global_thread_id, in_thread_list)
10490         (do_captured_list_thread_ids, set_resumed, set_running)
10491         (set_executing, set_stop_requested, finish_thread_state)
10492         (validate_registers_access, can_access_registers_ptid)
10493         (print_thread_info_1, switch_to_thread)
10494         (do_restore_current_thread_cleanup)
10495         (make_cleanup_restore_current_thread, thread_command)
10496         (thread_name_command): Use operator== instead of ptid_equal.
10497
10498 2017-04-10  Pedro Alves  <palves@redhat.com>
10499
10500         * thread.c (struct current_thread_cleanup) <next>: Delete field.
10501         (current_thread_cleanup_chain): Delete.
10502         (restore_current_thread_cleanup_dtor)
10503         (make_cleanup_restore_current_thread): Remove references to
10504         current_thread_cleanup_chain.
10505
10506 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
10507
10508         * msp430-tdep.c (msp430_pseudo_register_read): Never return
10509         REG_UNKNOWN.
10510
10511 2017-04-10  Yao Qi  <yao.qi@linaro.org>
10512
10513         PR gdb/19942
10514         * gdbthread.h (thread_info::deletable): New method.
10515         (thread_info::incref): New method.
10516         (thread_info::decref): New method.
10517         (thread_info::refcount): Move it to private.
10518         * infrun.c (save_stop_context): Call inc_refcount.
10519         (release_stop_context_cleanup): Likewise.
10520         * thread.c (set_thread_exited): New function.
10521         (init_thread_list): Delete "tp" only it is deletable, otherwise
10522         call set_thread_exited.
10523         (delete_thread_1): Call set_thread_exited.
10524         (current_thread_cleanup) <inferior_pid>: Remove.
10525         <thread>: New field.
10526         (restore_current_thread_ptid_changed): Removed.
10527         (do_restore_current_thread_cleanup): Adjust.
10528         (restore_current_thread_cleanup_dtor): Don't call
10529         find_thread_ptid.
10530         (set_thread_refcount): Use dec_refcount.
10531         (make_cleanup_restore_current_thread): Adjust.
10532         (thread_apply_all_command): Call inc_refcount.
10533         (_initialize_thread): Don't call
10534         observer_attach_thread_ptid_changed.
10535
10536 2017-04-10  Yao Qi  <yao.qi@linaro.org>
10537
10538         * thread.c (delete_thread_1): Hoist code on marking thread as
10539         exited.
10540
10541 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10542
10543         * windows-nat.c (windows_detach): Initialize ptid with
10544         minus_one_ptid.
10545
10546 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10547
10548         * unittests/ptid-selftests.c: Fix erroneous assert messages.
10549
10550 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
10551
10552         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
10553         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
10554         (bfin_pseudo_register_write): Likewise
10555
10556 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
10557
10558         * common/ptid.h (struct ptid): Change to...
10559         (class ptid_t): ... this.
10560         <ptid_t>: New constructors.
10561         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
10562         matches>: New methods.
10563         <make_null, make_minus_one>: New static methods.
10564         <pid>: Rename to...
10565         <m_pid>: ...this.
10566         <lwp>: Rename to...
10567         <m_lwp>: ...this.
10568         <tid>: Rename to...
10569         <m_tid>: ...this.
10570         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
10571         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
10572         as references, move comment to class ptid_t.
10573         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
10574         ptid_t static methods.
10575         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
10576         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
10577         Take ptid arguments as references, implement using ptid_t methods.
10578         * unittests/ptid-selftests.c: New file.
10579         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10580         unittests/ptid-selftests.c.
10581         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
10582
10583 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
10584
10585         * python/python.c (python_run_simple_file): Cast mode literal to
10586         non-const char pointer as expected by PyFile_FromString.
10587
10588 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
10589
10590         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
10591         minus_one_ptid and null_ptid.
10592
10593 2017-04-05  Pedro Alves  <palves@redhat.com>
10594
10595         * warning.m4 (build_warnings): Remove -Wno-write-strings.
10596         * configure: Regenerate.
10597
10598 2017-04-05  Pedro Alves  <palves@redhat.com>
10599
10600         * ada-exp.y (yyerror): Constify.
10601         * ada-lang.c (bound_name, get_selections)
10602         (ada_variant_discrim_type)
10603         (ada_variant_discrim_name, ada_value_struct_elt)
10604         (ada_lookup_struct_elt_type, is_unchecked_variant)
10605         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
10606         (catch_ada_exception_command_split)
10607         (catch_ada_assert_command_split, catch_assert_command)
10608         (ada_op_name): Constify.
10609         * ada-lang.h (ada_yyerror, get_selections)
10610         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
10611         * arc-tdep.c (arc_print_frame_cache): Constify.
10612         * arm-tdep.c (arm_skip_stub): Constify.
10613         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
10614         (gen_aggregate_elt_ref): Constify.
10615         * bcache.c (print_bcache_statistics): Constify.
10616         * bcache.h (print_bcache_statistics): Constify.
10617         * break-catch-throw.c (catch_exception_command_1):
10618         * breakpoint.c (struct ep_type_description::description):
10619         Constify.
10620         (add_solib_catchpoint): Constify.
10621         (catch_fork_command_1): Add cast.
10622         (add_catch_command): Constify.
10623         * breakpoint.h (add_catch_command, add_solib_catchpoint):
10624         Constify.
10625         * bsd-uthread.c (bsd_uthread_state): Constify.
10626         * buildsym.c (patch_subfile_names): Constify.
10627         * buildsym.h (next_symbol_text_func, patch_subfile_names):
10628         Constify.
10629         * c-exp.y (yyerror): Constify.
10630         (token::oper): Constify.
10631         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
10632         * c-varobj.c (cplus_describe_child): Constify.
10633         * charset.c (find_charset_names): Add cast.
10634         (find_charset_names): Constify array and add const_cast.
10635         * cli/cli-cmds.c (complete_command, cd_command): Constify.
10636         (edit_command): Constify.
10637         * cli/cli-decode.c (lookup_cmd): Constify.
10638         * cli/cli-dump.c (dump_memory_command, dump_value_command):
10639         Constify.
10640         (struct dump_context): Constify.
10641         (add_dump_command, restore_command): Constify.
10642         * cli/cli-script.c (get_command_line): Constify.
10643         * cli/cli-script.h (get_command_line): Constify.
10644         * cli/cli-utils.c (check_for_argument): Constify.
10645         * cli/cli-utils.h (check_for_argument): Constify.
10646         * coff-pe-read.c (struct read_pe_section_data): Constify.
10647         * command.h (lookup_cmd): Constify.
10648         * common/print-utils.c (decimal2str): Constify.
10649         * completer.c (gdb_print_filename): Constify.
10650         * corefile.c (set_gnutarget): Constify.
10651         * cp-name-parser.y (yyerror): Constify.
10652         * cp-valprint.c (cp_print_class_member): Constify.
10653         * cris-tdep.c (cris_register_name, crisv32_register_name):
10654         Constify.
10655         * d-exp.y (yyerror): Constify.
10656         (struct token::oper): Constify.
10657         * d-lang.h (d_yyerror): Constify.
10658         * dbxread.c (struct header_file_location::name): Constify.
10659         (add_old_header_file, add_new_header_file, last_function_name)
10660         (dbx_next_symbol_text, add_bincl_to_list)
10661         (find_corresponding_bincl_psymtab, set_namestring)
10662         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
10663         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
10664         * defs.h (command_line_input, print_address_symbolic)
10665         (deprecated_readline_begin_hook): Constify.
10666         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
10667         Constify.
10668         * event-top.c (handle_line_of_input): Constify and add cast.
10669         * exceptions.c (catch_errors): Constify.
10670         * exceptions.h (catch_errors): Constify.
10671         * expprint.c (print_subexp_standard, op_string, op_name)
10672         (op_name_standard, dump_raw_expression, dump_raw_expression):
10673         * expression.h (op_name, op_string, dump_raw_expression):
10674         Constify.
10675         * f-exp.y (yyerror): Constify.
10676         (struct token::oper): Constify.
10677         (struct f77_boolean_val::name): Constify.
10678         * f-lang.c (f_word_break_characters): Constify.
10679         * f-lang.h (f_yyerror): Constify.
10680         * fork-child.c (fork_inferior): Add cast.
10681         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
10682         (new_variant): Constify.
10683         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
10684         * gdbarch.c: Regenerate.
10685         * gdbcore.h (set_gnutarget): Constify.
10686         * go-exp.y (yyerror): Constify.
10687         (token::oper): Constify.
10688         * go-lang.h (go_yyerror): Constify.
10689         * go32-nat.c (go32_sysinfo): Constify.
10690         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
10691         * guile/scm-cmd.c (cmdscm_function): Constify.
10692         * guile/scm-param.c (pascm_param_value): Constify.
10693         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
10694         (h8300sx_register_name): Constify.
10695         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
10696         Constify.
10697         * ia64-tdep.c (ia64_register_names): Constify.
10698         * infcmd.c (construct_inferior_arguments): Constify.
10699         (path_command, attach_post_wait): Constify.
10700         * language.c (show_range_command, show_case_command)
10701         (unk_lang_error): Constify.
10702         * language.h (language_defn::la_error)
10703         (language_defn::la_name_of_this): Constify.
10704         * linespec.c (decode_line_2): Constify.
10705         * linux-thread-db.c (thread_db_err_str): Constify.
10706         * lm32-tdep.c (lm32_register_name): Constify.
10707         * m2-exp.y (yyerror): Constify.
10708         * m2-lang.h (m2_yyerror): Constify.
10709         * m32r-tdep.c (m32r_register_names): Constify and make static.
10710         * m68hc11-tdep.c (m68hc11_register_names): Constify.
10711         * m88k-tdep.c (m88k_register_name): Constify.
10712         * macroexp.c (appendmem): Constify.
10713         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
10714         (upgrade_type, parse_external, parse_partial_symbols)
10715         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
10716         (new_symbol): Constify.
10717         * memattr.c (mem_info_command): Constify.
10718         * mep-tdep.c (register_name_from_keyword): Constify.
10719         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
10720         Constify.
10721         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
10722         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
10723         * mi/mi-main.c (captured_mi_execute_command): Constify and add
10724         cast.
10725         (mi_execute_async_cli_command): Constify.
10726         * mips-tdep.c (mips_register_name): Constify.
10727         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
10728         (am33_register_name, am33_2_register_name)
10729         * moxie-tdep.c (moxie_register_names): Constify.
10730         * nat/linux-osdata.c (osdata_type): Constify fields.
10731         * nto-tdep.c (nto_parse_redirection): Constify.
10732         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
10733         (lookup_child_selector): Constify.
10734         (objc_methcall::name): Constify.
10735         * objc-lang.h (lookup_objc_class, lookup_child_selector)
10736         (lookup_struct_typedef): Constify.
10737         * objfiles.c (pc_in_section): Constify.
10738         * objfiles.h (pc_in_section): Constify.
10739         * p-exp.y (struct token::oper): Constify.
10740         (yyerror): Constify.
10741         * p-lang.h (pascal_yyerror): Constify.
10742         * parser-defs.h (op_name_standard): Constify.
10743         (op_print::string): Constify.
10744         (exp_descriptor::op_name): Constify.
10745         * printcmd.c (print_address_symbolic): Constify.
10746         * psymtab.c (print_partial_symbols): Constify.
10747         * python/py-breakpoint.c (stop_func): Constify.
10748         (bppy_get_expression): Constify.
10749         * python/py-cmd.c (cmdpy_completer::name): Constify.
10750         (cmdpy_function): Constify.
10751         * python/py-event.c (evpy_add_attribute)
10752         (gdbpy_initialize_event_generic): Constify.
10753         * python/py-event.h (evpy_add_attribute)
10754         (gdbpy_initialize_event_generic): Constify.
10755         * python/py-evts.c (add_new_registry): Constify.
10756         * python/py-finishbreakpoint.c (outofscope_func): Constify.
10757         * python/py-framefilter.c (get_py_iter_from_func): Constify.
10758         * python/py-inferior.c (get_buffer): Add cast.
10759         * python/py-param.c (parm_constant::name): Constify.
10760         * python/py-unwind.c (fprint_frame_id): Constify.
10761         * python/python.c (gdbpy_parameter_value): Constify.
10762         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
10763         * remote.c (memory_packet_config::name): Constify.
10764         (show_packet_config_cmd, remote_write_bytes)
10765         (remote_buffer_add_string):
10766         * reverse.c (exec_reverse_once): Constify.
10767         * rs6000-tdep.c (variant::name, variant::description): Constify.
10768         * rust-exp.y (rustyyerror): Constify.
10769         * rust-lang.c (rust_op_name): Constify.
10770         * rust-lang.h (rustyyerror): Constify.
10771         * serial.h (serial_ops::name): Constify.
10772         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
10773         (sh_sh3e_register_name, sh_sh2e_register_name)
10774         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
10775         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
10776         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
10777         (sh_sh4al_dsp_register_name): Constify.
10778         * sh64-tdep.c (sh64_register_name): Constify.
10779         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
10780         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
10781         * stabsread.c (patch_block_stabs, read_type_number)
10782         (ref_map::stabs, ref_add, process_reference)
10783         (symbol_reference_defined, define_symbol, define_symbol)
10784         (error_type, read_type, read_member_functions, read_cpp_abbrev)
10785         (read_one_struct_field, read_struct_fields, read_baseclasses)
10786         (read_tilde_fields, read_struct_type, read_array_type)
10787         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
10788         (read_huge_number, read_range_type, read_args, common_block_start)
10789         (find_name_end): Constify.
10790         * stabsread.h (common_block_start, define_symbol)
10791         (process_one_symbol, symbol_reference_defined, ref_add):
10792         * symfile.c (get_section_index, add_symbol_file_command):
10793         * symfile.h (get_section_index): Constify.
10794         * target-descriptions.c (tdesc_type::name): Constify.
10795         (tdesc_free_type): Add cast.
10796         * target.c (find_default_run_target):
10797         (add_deprecated_target_alias, find_default_run_target)
10798         (target_announce_detach): Constify.
10799         (do_option): Constify.
10800         * target.h (add_deprecated_target_alias): Constify.
10801         * thread.c (print_thread_info_1): Constify.
10802         * top.c (deprecated_readline_begin_hook, command_line_input):
10803         Constify.
10804         (init_main): Add casts.
10805         * top.h (handle_line_of_input): Constify.
10806         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
10807         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
10808         (tfind_command): Rename to ...
10809         (tfind_command_1): ... this and constify.
10810         (tfind_command): New function.
10811         (tfind_end_command, tfind_start_command): Adjust.
10812         (encode_source_string): Constify.
10813         * tracepoint.h (encode_source_string): Constify.
10814         * tui/tui-data.c (tui_partial_win_by_name): Constify.
10815         * tui/tui-data.h (tui_partial_win_by_name): Constify.
10816         * tui/tui-source.c (tui_set_source_content_nil): Constify.
10817         * tui/tui-source.h (tui_set_source_content_nil): Constify.
10818         * tui/tui-win.c (parse_scrolling_args): Constify.
10819         * tui/tui-windata.c (tui_erase_data_content): Constify.
10820         * tui/tui-windata.h (tui_erase_data_content): Constify.
10821         * tui/tui-winsource.c (tui_erase_source_content): Constify.
10822         * tui/tui.c (tui_enable): Add cast.
10823         * utils.c (defaulted_query): Constify.
10824         (init_page_info): Add cast.
10825         (puts_debug, subset_compare): Constify.
10826         * utils.h (subset_compare): Constify.
10827         * varobj.c (varobj_format_string): Constify.
10828         * varobj.h (varobj_format_string): Constify.
10829         * vax-tdep.c (vax_register_name): Constify.
10830         * windows-nat.c (windows_detach): Constify.
10831         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
10832         * xml-support.c (gdb_xml_end_element): Constify.
10833         * xml-tdesc.c (tdesc_start_reg): Constify.
10834         * xstormy16-tdep.c (xstormy16_register_name): Constify.
10835         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
10836         * xtensa-tdep.h (xtensa_register_t::name): Constify.
10837
10838 2017-04-05  Pedro Alves  <palves@redhat.com>
10839
10840         * proc-api.c (struct trans): Constify.
10841         (procfs_note): Constify.
10842         * proc-events.c (struct trans, syscall_table):
10843         * proc-flags.c (struct trans): Constify.
10844         * proc-utils.h (procfs_note): Constify.
10845         * proc-why.c (struct trans): Constify.
10846         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
10847         (procfs_detach): Constify.
10848         * sol-thread.c (struct string_map): Constify.
10849         (td_err_string, td_state_string): Constify.
10850
10851 2017-04-05  Pedro Alves  <palves@redhat.com>
10852
10853         * proc-api.c (procfs_filename): Don't initialize
10854         procfs_filename.
10855         (prepare_to_trace): Assume procfs_filename is non-NULL.
10856         (_initialize_proc_api): Give procfs_filename a default value here.
10857
10858 2017-04-05  Pedro Alves  <palves@redhat.com>
10859
10860         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
10861         'cond_string' parameter.
10862         (extract_exception_regexp): Constify 'string' parameter.
10863         (catch_exception_command_1): Constify.
10864         * breakpoint.c (init_catchpoint)
10865         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
10866         parameter.
10867         (ep_parse_optional_if_clause, catch_fork_command_1)
10868         (catch_exec_command_1): Constify.
10869         * breakpoint.h (init_catchpoint): Constify 'cond_string'
10870         parameter.
10871         (ep_parse_optional_if_clause): Constify.
10872         * cli/cli-utils.c (remove_trailing_whitespace)
10873         (check_for_argument): Constify.
10874         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
10875         non-const overload.
10876         (check_for_argument): Likewise.
10877
10878 2017-04-05  Pedro Alves  <palves@redhat.com>
10879
10880         * event-top.c (command_line_handler): Add cast to execute_command
10881         call.
10882         * record-btrace.c (cmd_record_btrace_bts_start)
10883         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
10884         (cmd_record_btrace_start): Add cast to execute_command call.
10885         * record-full.c (record_full_goto_insn):
10886         * record.c (record_start, record_stop): Add cast to
10887         execute_command_to_string calls.
10888         (cmd_record_start): Add cast to execute_command calls.
10889
10890 2017-04-05  Pedro Alves  <palves@redhat.com>
10891
10892         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
10893         static inline function.
10894         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
10895         array and use gdb_PyArg_ParseTupleAndKeywords.
10896         * python/py-cmd.c (cmdpy_init): Likewise.
10897         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
10898         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
10899         (infpy_search_memory): Likewise.
10900         * python/py-objfile.c (objfpy_add_separate_debug_file)
10901         (gdbpy_lookup_objfile): Likewise.
10902         * python/py-symbol.c (gdbpy_lookup_symbol)
10903         (gdbpy_lookup_global_symbol): Likewise.
10904         * python/py-type.c (gdbpy_lookup_type): Likewise.
10905         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
10906         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
10907         Likewise.
10908
10909 2017-04-05  Pedro Alves  <palves@redhat.com>
10910
10911         * python/python-internal.h (gdb_PyGetSetDef): New type.
10912         * python/py-block.c (block_object_getset)
10913         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
10914         * python/py-event.c (event_object_getset)
10915         (finish_breakpoint_object_getset): Likewise.
10916         * python/py-inferior.c (inferior_object_getset): Likewise.
10917         * python/py-infthread.c (thread_object_getset): Likewise.
10918         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
10919         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
10920         * python/py-objfile.c (objfile_getset): Likewise.
10921         * python/py-progspace.c (pspace_getset): Likewise.
10922         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
10923         Likewise.
10924         * python/py-record.c (recpy_record_getset): Likewise.
10925         * python/py-symbol.c (symbol_object_getset): Likewise.
10926         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
10927         Likewise.
10928         * python/py-type.c (type_object_getset, field_object_getset):
10929         Likewise.
10930         * python/py-value.c (value_object_getset): Likewise.
10931
10932 2017-04-05  Pedro Alves  <palves@redhat.com>
10933
10934         * python/python-internal.h (gdb_PyObject_CallMethod)
10935         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
10936         New functions.
10937         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
10938         (PySys_GetObject, PySys_SetPath): New macros.
10939
10940 2017-04-05  Pedro Alves  <palves@redhat.com>
10941
10942         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
10943         info_osdata_command.
10944         * osdata.c (info_osdata_command): Rename to ...
10945         (info_osdata): ... this.  Constify 'type' parameter, and remove
10946         the 'from_tty' parameter.  Accept NULL TYPE.
10947         (info_osdata_command): New function.
10948         * osdata.h (info_osdata_command): Remove declaration.
10949         (info_osdata): New declaration.
10950
10951 2017-04-05  Pedro Alves  <palves@redhat.com>
10952
10953         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
10954         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
10955         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
10956         parameter.
10957         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
10958         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
10959         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
10960         parameter.
10961         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
10962         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
10963         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
10964         (mi_cmd_file_list_exec_source_files)
10965         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
10966         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
10967         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
10968         parameter.
10969         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
10970         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
10971         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
10972         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
10973         (mi_cmd_stack_info_frame): Constify 'command' parameter.
10974         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
10975         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
10976         'command' parameter.
10977         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
10978         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
10979         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
10980         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
10981         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
10982         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
10983         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
10984         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
10985         (mi_cmd_var_set_update_range): Constify 'command' parameter.
10986         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
10987         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
10988         parameter.
10989         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
10990         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
10991         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
10992         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
10993         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
10994         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
10995         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
10996         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
10997         (mi_cmd_data_list_changed_registers)
10998         (mi_cmd_data_write_register_values)
10999         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
11000         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
11001         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
11002         (mi_cmd_list_features, mi_cmd_list_target_features)
11003         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
11004         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
11005         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
11006         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
11007         (mi_cmd_trace_frame_collected): Constify 'command'
11008         parameter.
11009         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
11010         'command' parameter.
11011
11012 2017-04-05  Pedro Alves  <palves@redhat.com>
11013
11014         * ada-lang.c (ada_completer_word_break_characters): Now a const
11015         array.
11016         (ada_get_gdb_completer_word_break_characters): Constify.
11017         * completer.c (gdb_completer_command_word_break_characters)
11018         (gdb_completer_file_name_break_characters)
11019         (gdb_completer_quote_characters): Now const arrays.
11020         (get_gdb_completer_quote_characters): Constify.
11021         (set_rl_completer_word_break_characters): New function.
11022         (set_gdb_completion_word_break_characters)
11023         (complete_line_internal): Use it.
11024         * completer.h (get_gdb_completer_quote_characters): Constify.
11025         (set_rl_completer_word_break_characters): Declare.
11026         * f-lang.c (f_word_break_characters): Constify.
11027         * language.c (default_word_break_characters): Constify.
11028         * language.h (language_defn::la_word_break_characters): Constify.
11029         (default_word_break_characters): Constify.
11030         * top.c (init_main): Use set_rl_completer_word_break_characters.
11031
11032 2017-04-05  Pedro Alves  <palves@redhat.com>
11033
11034         * aix-thread.c (aix_thread_pid_to_str)
11035         (aix_thread_extra_thread_info): Constify.
11036         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
11037         * bsd-uthread.c (bsd_uthread_extra_thread_info)
11038         (bsd_uthread_pid_to_str): Constify.
11039         * corelow.c (core_pid_to_str): Constify.
11040         * darwin-nat.c (darwin_pid_to_str): Constify.
11041         * fbsd-nat.c (fbsd_pid_to_str): Constify.
11042         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
11043         Constify.
11044         * gnu-nat.c (gnu_pid_to_str): Constify.
11045         * go32-nat.c (go32_pid_to_str): Constify.
11046         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
11047         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
11048         * inferior.c (inferior_pid_to_str): Constify.
11049         * linux-nat.c (linux_nat_pid_to_str): Constify.
11050         * linux-tdep.c (linux_core_pid_to_str): Constify.
11051         * linux-thread-db.c (thread_db_pid_to_str)
11052         (thread_db_extra_thread_info): Constify.
11053         * nto-tdep.c (nto_extra_thread_info): Constify.
11054         * nto-tdep.h (nto_extra_thread_info): Constify.
11055         * obsd-nat.c (obsd_pid_to_str): Constify.
11056         * procfs.c (procfs_pid_to_str): Constify.
11057         * ravenscar-thread.c (ravenscar_extra_thread_info)
11058         (ravenscar_pid_to_str): Constify.
11059         * remote-sim.c (gdbsim_pid_to_str): Constify.
11060         * remote.c (remote_threads_extra_info, remote_pid_to_str):
11061         Constify.
11062         * sol-thread.c (solaris_pid_to_str): Constify.
11063         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
11064         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
11065         * target.c (default_pid_to_str, target_pid_to_str)
11066         (normal_pid_to_str, default_pid_to_str): Constify.
11067         * target.h (target_ops::to_pid_to_str)
11068         (target_ops::to_extra_thread_info): Constify.
11069         (target_pid_to_str, normal_pid_to_str): Constify.
11070         * windows-nat.c (windows_pid_to_str): Constify.
11071         * gdbarch.sh (core_pid_to_str): Constify.
11072         * target-delegates.c: Regenerate.
11073         * gdbarch.h, gdbarch.c: Regenerate.
11074
11075 2017-04-05  Pedro Alves  <palves@redhat.com>
11076
11077         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
11078         the memory of the temporary warning_pre_print override.
11079         * utils.c (warning_pre_print): Constify.
11080         * utils.h (warning_pre_print): Constify.
11081
11082 2017-04-05  Pedro Alves  <palves@redhat.com>
11083
11084         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
11085         (shell_command): New function.
11086         (make_command): Use std::string.
11087         (init_cli_cmds): Register shell_command instead of shell_escape.
11088
11089 2017-04-05  Pedro Alves  <palves@redhat.com>
11090
11091         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
11092         * tracepoint.c (default_collect): Don't initialize.
11093
11094 2017-04-05  Pedro Alves  <palves@redhat.com>
11095
11096         * macroexp.c (macro_buffer::shared): Now a bool.
11097         (init_buffer): Update.
11098         (init_shared_buffer): Constify 'addr' parameter.
11099         (substitute_args, expand, macro_expand, macro_expand_next): Remove
11100         casts.
11101
11102 2017-04-05  Pedro Alves  <palves@redhat.com>
11103
11104         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
11105         * disasm.c (set_disassembler_options): Constify local.
11106         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
11107
11108 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
11109
11110         PR gdb/21352
11111         * tracefile.c (tsave_command): Fix argument parsing for '-r'
11112         option.
11113
11114 2017-04-05  Yao Qi  <yao.qi@linaro.org>
11115
11116         * frame.c (frame_unwind_register_unsigned): Call
11117         frame_unwind_register_value.
11118
11119 2017-04-05  Yao Qi  <yao.qi@linaro.org>
11120
11121         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
11122         Use gdb_test_multiple, and don't match anchor.
11123
11124 2017-04-05  Pedro Alves  <palves@redhat.com>
11125
11126         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
11127         (Write After Approval): Remove Simon Marchi.
11128
11129 2017-04-05  Pedro Alves  <palves@redhat.com>
11130
11131         * common/gdb_optional.h (optional::optional): Make constexpr and
11132         initialize m_dummy.
11133
11134 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11135
11136         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11137         (amd64fbsd_jmp_buf_reg_offset): Remove.
11138         (amd64fbsd_supply_uthread): Remove function.
11139         (amd64fbsd_collect_uthread): Remove function.
11140         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
11141         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
11142         (x86_64-*-freebsd*): Remove bsd-uthread.o.
11143         (fbsd-nat.c): Update comment.
11144         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11145         (i386fbsd_jmp_buf_reg_offset): Remove.
11146         (i386fbsd_supply_uthread): Remove function.
11147         (i386fbsd_collect_uthread): Remove function.
11148         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
11149
11150 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11151
11152         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
11153         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
11154         * NEWS: Mention that support for FreeBSD/alpha was removed.
11155         * alpha-fbsd-tdep.c: Delete file.
11156         * config/alpha/fbsd.mh: Delete file.
11157         * configure.host: Delete alpha*-*-freebsd* and
11158         alpha*-*-kfreebsd*-gnu.
11159         * configure.tgt: Delete alpha*-*-freebsd* and
11160         alpha*-*-kfreebsd*-gnu.
11161
11162 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11163
11164         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
11165         amd64bsd_store_inferior_registers): Use ptid from regcache.
11166
11167 2017-04-04  Pedro Alves  <palves@redhat.com>
11168
11169         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
11170         data fields, make them private and add "m_" prefixes.
11171         (lnp_state_machine::lnp_state_machine): New ctor.
11172         (record_line, check_line_address, handle_set_discriminator)
11173         (handle_set_address, handle_advance_pc, handle_special_opcode)
11174         (handle_advance_line, handle_set_file, handle_negate_stmt)
11175         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
11176         (end_sequence, advance_line): New methods.
11177         (m_gdbarch, m_record_lines_p): New fields.
11178         (lnp_reader_state): Delete.
11179         (dwarf_record_line): Rename to ...
11180         (lnp_state_machine::record_line): ... adjust.
11181         (init_lnp_state_machine): Delete.
11182         (lnp_state_machine::lnp_state_machine): New.
11183         (check_line_address): Rename to ...
11184         (lnp_state_machine::check_line_address): This.
11185         (dwarf_decode_lines_1): Remove reference to "reader_state".
11186         Adjust lnp_state_machine having a non-default ctor.  Use bool.
11187         State machine internal state manipulation moved to
11188         lnp_state_machine methods.
11189
11190 2017-04-04  Pedro Alves  <palves@redhat.com>
11191
11192         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11193         unittests/offset-type-selftests.c.
11194         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
11195         * common/offset-type.h: New file.
11196         * common/preprocessor.h: New file.
11197         * common/traits.h: New file.
11198         * common/valid-expr.h: New file.
11199         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
11200         sect_offset and cu_offset strong typedefs throughout.
11201         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
11202         typedefs throughout.
11203         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
11204         sect_offset and cu_offset strong typedefs throughout.
11205         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
11206         typedefs throughout.
11207         * gdbtypes.h: Include "common/offset-type.h".
11208         (cu_offset): Now an offset type (strong typedef) instead of a
11209         struct.
11210         (sect_offset): Likewise.
11211         (union call_site_parameter_u): Rename "param_offset" field to
11212         "param_cu_off".
11213         * unittests/offset-type-selftests.c: New file.
11214
11215 2017-04-04  Pedro Alves  <palves@redhat.com>
11216
11217         * common/underlying.h: New file.
11218         * dwarf2read.c: Include "common/gdb_optional.h" and
11219         "common/underlying.h".
11220         (dir_index, file_name_index): New types.
11221         (file_entry): Use them.
11222         (file_entry::include): Use to_underlying.
11223         (line_header::add_file_name): Use dir_index.
11224         (read_formatted_entries): Use gdb::optional.  Read form before
11225         writting to file_entry.
11226         (dwarf_decode_line_header): Use dir_index.
11227         (lnp_state_machine::current_file): Use to_underlying.
11228         (lnp_state_machine::file): Change type to file_name_index.
11229         (dwarf_record_line): Use to_underlying.
11230         (init_lnp_state_machine): Use file_name_index.
11231         (dwarf_decode_lines_1): Use dir_index and file_name_index.
11232
11233 2017-04-04  Pedro Alves  <palves@redhat.com>
11234
11235         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
11236         operator bool, has_value and get methods.
11237
11238 2017-04-04  Pedro Alves  <palves@redhat.com>
11239
11240         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
11241         fields.
11242         (line_header): Initialize all data fields.  Change type of
11243         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
11244         Change type of include_dirs to std::vector<const char *>.  Remove
11245         num_include_dirs, include_dirs_size.  Change type of file_names to
11246         std::vector<file_entry>.  Remove num_file_names, file_names_size.
11247         (line_header::line_header): New.
11248         (line_header::add_include_dir, line_header::add_file_name): New
11249         methods.
11250         (line_header::include_dir_at): Remove NULL check.
11251         (line_header::file_name_at): Add const overload.
11252         (line_header_up): New unique_ptr typedef.
11253         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
11254         std::vector.  Remove free_line_header call.
11255         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
11256         free_line_header call.
11257         (free_cu_line_header): Delete.
11258         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
11259         (setup_type_unit_groups): Use line_header_up instead of cleanups.
11260         Adjust to use std::vector.
11261         (free_line_header): Delete.
11262         (free_line_header_voidp): Use delete.
11263         (add_include_dir): Replace with ...
11264         (line_header::add_include_dir): ... this method.  Use std::vector.
11265         (add_file_name): Replace with ...
11266         (line_header::add_file_name): ... this method.  Use std::vector.
11267         (add_include_dir_stub): Delete.
11268         (read_formatted_entries): Remove memset.
11269         (dwarf_decode_line_header): Return a line_header_up instead of a
11270         raw pointer.  Remove cleanup handling.  Pass lambdas to
11271         read_formatted_entries.  Adjust to use line_header methods.
11272         (dwarf_decode_lines_1): Adjust to use line_header methods.
11273         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
11274         use std::vector.
11275
11276 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
11277
11278         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
11279         instead of struct ptid.
11280
11281 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
11282
11283         * frame.c (get_frame_register_bytes): Unwind using value.
11284         (put_frame_register_bytes): Likewise.
11285
11286 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
11287
11288         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
11289         aggregate-like.
11290
11291 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
11292
11293         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
11294
11295 2017-03-29  Yao Qi  <yao.qi@linaro.org>
11296
11297         * gdbthread.h (struct thread_info): Declare constructor and
11298         destructor.  Add some in-class member initializers.
11299         * thread.c (free_thread): Remove.
11300         (init_thread_list): Call delete instead of free_thread.
11301         (new_thread): Call thread_info constructor.
11302         (thread_info::thread_info): New function.
11303         (thread_info::~thread_info): New function.
11304         (delete_thread_1): Call delete instead of free_thread.
11305         (make_cleanup_restore_current_thread): Move tp and frame to
11306         inner block.
11307
11308 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11309
11310         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
11311         (arc_skip_prologue): Likewise.
11312         (arc_make_frame_cache): Likewise.
11313         (arc_pv_get_operand): New function.
11314         (arc_is_in_prologue): Likewise.
11315         (arc_analyze_prologue): Likewise.
11316         (arc_print_frame_cache): Likewise.
11317         (MAX_PROLOGUE_LENGTH): New constant.
11318
11319 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11320
11321         * configure.tgt: Add arc-insn.o.
11322         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
11323         (dump_arc_instruction_command): New function.
11324         (arc_fprintf_disasm): Likewise.
11325         (arc_disassemble_info): Likewise.
11326         (arc_insn_get_operand_value): Likewise.
11327         (arc_insn_get_operand_value_signed): Likewise.
11328         (arc_insn_get_memory_base_reg): Likewise.
11329         (arc_insn_get_memory_offset): Likewise.
11330         (arc_insn_get_branch_target): Likewise.
11331         (arc_insn_dump): Likewise.
11332         (arc_insn_get_linear_next_pc): Likewise.
11333         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
11334         (arc_disassemble_info): Likewise.
11335         (arc_insn_get_branch_target): Likewise.
11336         (arc_insn_get_linear_next_pc): Likewise.
11337         * NEWS: Mention new "maint print arc arc-instruction".
11338
11339 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11340
11341         * arc-tdep (maintenance_print_arc_list): New variable.
11342         (maintenance_print_arc_command): New function.
11343
11344 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11345
11346         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
11347         Add "limm" and "reserved".
11348         (arc_cannot_fetch_register, arc_cannot_store_register): Add
11349         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
11350         * arc-tdep.h (arc_regnum): Likewise.
11351
11352 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11353
11354         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11355         for THREADPTR register.
11356         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
11357         register.
11358         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
11359         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
11360         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
11361
11362 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11363
11364         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
11365         registers above gdbarch_num_regs (gdbarch) as privileged in
11366         call0 ABI.
11367
11368 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11369
11370         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11371         for a single specified register or for all registers in
11372         a0_base..a0_base + C0_NREGS range.
11373         (supply_gregset_reg): Call regcache_raw_supply for a single
11374         specified register or for all registers in a0_base..a0_base +
11375         C0_NREGS range.
11376
11377 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11378
11379         * arch/xtensa.h (C0_NREGS): Add definition.
11380         * xtensa-tdep.c (C0_NREGS): Remove definition.
11381
11382 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11383
11384         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
11385         Drop xtensa_default_isa initialization.
11386         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
11387
11388 2017-03-27  Pedro Alves  <palves@redhat.com>
11389
11390         * dwarf2read.c (file_entry) <dir_index>: Add comment.
11391         (file_entry::include_dir): New method.
11392         (line_header::include_dir_at, line_header::file_name_at): New
11393         methods.
11394         (setup_type_unit_groups, setup_type_unit_groups)
11395         (psymtab_include_file_name): Simplify using the new methods.
11396         (lnp_state_machine) <the_line_header>: New field.
11397         <file>: Add comment.
11398         (lnp_state_machine::current_file): New method.
11399         (dwarf_record_line): Simplify using the new methods.
11400         (init_lnp_state_machine): Initialize the "the_line_header" field.
11401         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
11402         Simplify using the new methods.
11403
11404 2017-03-27  Pedro Alves  <palves@redhat.com>
11405
11406         * cp-name-parser.y (make_empty): Delete.
11407         (demangler_special, nested_name, ptr_operator, array_indicator)
11408         (direct_declarator, declarator_1): Use fill_comp instead of
11409         make_empty.
11410
11411 2017-03-27  Pedro Alves  <palves@redhat.com>
11412
11413         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
11414         to ATTRIBUTE_PRINTF.
11415         * solib-target.c (library_list_start_list): Print "string" not
11416         "version".
11417         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
11418         gdb_xml_error call.
11419
11420 2017-03-27  Pedro Alves  <palves@redhat.com>
11421
11422         * dwarf2read.c (struct file_and_directory): New.
11423         (dwarf2_get_dwz_file): Adjust to use std::string.
11424         (dw2_get_file_names_reader): Adjust to use file_and_directory.
11425         (find_file_and_directory): Adjust to return a file_and_directory
11426         object.
11427         (read_file_scope): Adjust to use file_and_directory.  Remove
11428         make_cleanup/do_cleanups calls.
11429         (open_and_init_dwp_file): Adjust to use std::string.  Remove
11430         make_cleanup/do_cleanups calls.
11431         * python/python.c (do_start_initialization): Adjust to ldirname
11432         returning a std::string.
11433         * utils.c (ldirname): Now returns a std::string.
11434         * utils.h (ldirname): Change return type to std::string.
11435         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
11436         returning a std::string.
11437         * xml-tdesc.c (file_read_description_xml): Likewise.
11438
11439 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
11440
11441         * regcache.c (regcache_debug_print_register): New function.
11442         * regcache.h (regcache_debug_print_register): New declaration.
11443         * target.c (debug_print_register): Remove.
11444         (target_fetch_registers): Call regcache_debug_print_register.
11445         (target_store_registers): Likewise.
11446
11447 2017-03-24  Pádraig Brady  <pbrady@fb.com>
11448
11449         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
11450         reference beyond the 'lh->include_dirs' array before accessing to
11451         it.
11452         (psymtab_include_file_name): Likewise.
11453         (dwarf_decode_lines_1): Likewise.
11454         (dwarf_decode_lines): Likewise.
11455         (file_file_name): Likewise.
11456
11457 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
11458
11459         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
11460         inferior_ptid.
11461         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11462         ps_lsetfpregs): Likewise.
11463         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
11464         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11465         ps_lsetfpregs): Likewise.
11466         * target.c (target_fetch_registers, target_store_registers):
11467         Remove asserts.
11468
11469 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
11470
11471         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
11472
11473 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11474
11475         * aarch64-tdep.c (aarch64_process_record_test): Declare.
11476         (_initialize_aarch64_tdep): Register it.
11477         (aarch64_record_load_store): Handle PRFM instruction.
11478         (aarch64_process_record_test): New function.
11479
11480 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11481
11482         * aarch64-tdep.c (aarch64_record_load_store): Fix code
11483         indentation.
11484
11485 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11486
11487         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
11488
11489 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11490
11491         python/python.c (do_start_initialization): Fix memory leak.
11492
11493 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11494
11495         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
11496         using get_ptrace_pid.
11497         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
11498         inferior_ptid.
11499         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
11500         inferior_ptid instead of pid.
11501
11502 2017-03-22  Yao Qi  <yao.qi@linaro.org>
11503
11504         * aarch64-tdep.c: Wrap locally used classes in anonymous
11505         namespace.
11506         * arm-tdep.c: Likewise.
11507         * linespec.c: Likewise.
11508         * ui-out.c: Likewise.
11509
11510 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
11511
11512         PR gdb/19637
11513         * python/lib/gdb/printer/bound_registers.py: Import sys.
11514
11515 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
11516
11517         * windows-nat.c (do_windows_fetch_inferior_registers): Add
11518         windows_thread_info parameter and use it instead of
11519         current_thread.
11520         (windows_fetch_inferior_registers): Don't set current_thread,
11521         pass the thread to do_windows_fetch_inferior_registers.  Use
11522         ptid from regcache instead of inferior_ptid.
11523         (do_windows_store_inferior_registers): Add windows_thread_info
11524         parameter and use it instead of current_thread.
11525         (windows_store_inferior_registers): Don't set current_thread,
11526         pass the thread to do_windows_store_inferior_registers.  Use
11527         ptid from regcache instead of inferior_ptid.
11528
11529 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
11530
11531         * ser-mingw.c (ser_windows_raw): Remove reference to
11532         struct serial::current_timeout.
11533
11534 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
11535
11536         PR tdep/20928
11537         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
11538         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
11539         (sparc64_fsr_type): Fix %fsr decoding.
11540
11541 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
11542
11543         * python/py-record-btrace.c (btpy_insn_data): Change return type
11544         for Python 2.
11545
11546 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
11547
11548         * spu-linux-nat.c (spu_fetch_inferior_registers,
11549         spu_store_inferior_registers): Use ptid from regcache, set and
11550         restore inferior_ptid.
11551         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
11552         Likewise.
11553
11554 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
11555
11556         * i386-linux-nat.c (fetch_register, store_register,
11557         i386_linux_fetch_inferior_registers,
11558         i386_linux_store_inferior_registers): Use ptid from regcache.
11559         * ia64-linux-nat.c (ia64_linux_fetch_register,
11560         ia64_linux_store_register): Likewise.
11561         * inf-ptrace.c (inf_ptrace_fetch_register,
11562         inf_ptrace_store_register): Likewise.
11563         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
11564         m32r_linux_store_inferior_registers): Likewise.
11565         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
11566         m68kbsd_store_inferior_registers): Likewise.
11567         * m68k-linux-nat.c (fetch_register, store_register,
11568         m68k_linux_fetch_inferior_registers,
11569         m68k_linux_store_inferior_registers): Likewise.
11570         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
11571         m88kbsd_store_inferior_registers): Likewise.
11572         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
11573         mips_fbsd_store_inferior_registers): Likewise.
11574         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
11575         mips64_linux_regsets_store_registers): Likewise.
11576         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
11577         mipsnbsd_store_inferior_registers): Likewise.
11578         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
11579         mips64obsd_store_inferior_registers): Likewise.
11580         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
11581         Likewise.
11582         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
11583         ppcfbsd_store_inferior_registers): Likewise.
11584         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
11585         ppc_linux_store_inferior_registers): Likewise.
11586         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
11587         ppcnbsd_store_inferior_registers): Likewise.
11588         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
11589         ppcobsd_store_registers): Likewise.
11590         * procfs.c (procfs_fetch_registers, procfs_store_registers):
11591         Likewise.
11592         * ravenscar-thread.c (ravenscar_fetch_registers,
11593         ravenscar_store_registers, ravenscar_prepare_to_store):
11594         Likewise.
11595         * record-btrace.c (record_btrace_fetch_registers,
11596         record_btrace_store_registers, record_btrace_prepare_to_store):
11597         Likewise.
11598         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
11599         Lookup inferior using ptid from regcache, instead of
11600         current_inferior.
11601         * remote.c (remote_fetch_registers, remote_store_registers): Use
11602         ptid from regcache.
11603         * rs6000-nat.c (fetch_register, store_register): Likewise.
11604         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
11605         s390_linux_store_inferior_registers): Likewise.
11606         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
11607         shnbsd_store_inferior_registers): Likewise.
11608         * sol-thread.c (sol_thread_fetch_registers,
11609         sol_thread_store_registers): Likewise.
11610         * sparc-nat.c (sparc_fetch_inferior_registers,
11611         sparc_store_inferior_registers): Likewise.
11612         * tilegx-linux-nat.c (fetch_inferior_registers,
11613         store_inferior_registers): Likewise.
11614         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
11615         vaxbsd_store_inferior_registers): Likewise.
11616         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
11617         store_xtregs): Likewise.
11618
11619 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11620
11621         PR gdb/14441
11622         * NEWS: Mention support for rvalue references in GDB and python.
11623         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
11624         supports both lvalue and rvalue references.
11625
11626 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11627
11628         PR gdb/14441
11629         * gdbtypes.c (rank_one_type): Implement overloading
11630         resolution rules regarding rvalue references.
11631
11632 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11633
11634         PR gdb/14441
11635         * aarch64-tdep.c (aarch64_type_align)
11636         (aarch64_extract_return_value, aarch64_store_return_value): Change
11637         lvalue reference type checks to general reference type checks.
11638         * amd64-tdep.c (amd64_classify): Likewise.
11639         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
11640         Likewise.
11641         * arm-tdep.c (arm_type_align, arm_extract_return_value)
11642         (arm_store_return_value): Likewise.
11643         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
11644         * c-typeprint.c (c_print_type): Likewise.
11645         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
11646         (cplus_number_of_children, cplus_describe_child): Likewise.
11647         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
11648         * completer.c (expression_completer): Likewise.
11649         * cp-support.c (make_symbol_overload_list_adl_namespace):
11650         Likewise.
11651         * darwin-nat-info.c (info_mach_region_command): Likewise.
11652         * dwarf2loc.c (entry_data_value_coerce_ref)
11653         (value_of_dwarf_reg_entry): Likewise.
11654         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
11655         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
11656         Likewise.
11657         * findvar.c (extract_typed_address, store_typed_address):
11658         Likewise.
11659         * gdbtypes.c (rank_one_type): Likewise.
11660         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
11661         * infcall.c (value_arg_coerce): Likewise.
11662         * language.c (pointer_type): Likewise.
11663         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
11664         Likewise.
11665         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
11666         * mn10300-tdep.c (mn10300_type_align): Likewise.
11667         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
11668         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
11669         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
11670         Likewise.
11671         * printcmd.c (print_formatted, x_command): Likewise.
11672         * python/py-type.c (typy_get_composite, typy_template_argument):
11673         Likewise.
11674         * python/py-value.c (valpy_referenced_value)
11675         (valpy_get_dynamic_type, value_has_field): Likewise.
11676         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
11677         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
11678         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
11679         * spu-tdep.c (spu_scalar_value_p): Likewise.
11680         * symtab.c (lookup_symbol_aux): Likewise.
11681         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
11682         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
11683         Likewise.
11684         * valops.c (value_cast_pointers, value_cast)
11685         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
11686         (value_struct_elt, value_struct_elt_bitpos)
11687         (value_find_oload_method_list, find_overload_match)
11688         (value_rtti_indirect_type): Likewise.
11689         * valprint.c (val_print_scalar_type_p, generic_val_print):
11690         Likewise.
11691         * value.c (value_actual_type, value_as_address, unpack_long)
11692         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
11693         (coerce_ref): Likewise.
11694         * varobj.c (varobj_get_value_type): Likewise.
11695
11696 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11697
11698         PR gdb/14441
11699         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
11700         table of constants.
11701         * python/lib/gdb/command/explore.py: Support exploring values
11702         of rvalue reference types.
11703         * python/lib/gdb/types.py: Implement get_basic_type() for
11704         rvalue reference types.
11705         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
11706         constant.
11707         * python/py-value.c (valpy_getitem): Add an rvalue reference
11708         check.
11709         (valpy_reference_value): Add new parameter "refcode".
11710         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
11711         New wrappers for valpy_reference_value().
11712         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11713         (gdbpy_invoke_xmethod): Likewise.
11714
11715 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11716
11717         PR gdb/14441
11718         * dwarf2read.c (process_die, read_type_die_1): Handle the
11719         DW_TAG_rvalue_reference_type DIE.
11720         (read_tag_reference_type): Add new parameter "refcode".
11721
11722 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11723
11724         PR gdb/14441
11725         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
11726         (c_type_print_modifier, c_type_print_varspec_suffix)
11727         (c_type_print_base): Support printing rvalue reference types.
11728         * c-valprint.c (c_val_print, c_value_print): Support printing
11729         rvalue reference values.
11730
11731 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11732
11733         PR gdb/14441
11734         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
11735         typename.
11736         * cp-support.c (replace_typedefs): Handle
11737         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
11738         * python/py-type.c (typy_lookup_type): Likewise.
11739
11740 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11741
11742         PR gdb/14441
11743         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
11744         * parse.c (insert_type): Change assert statement.
11745         (follow_types): Handle rvalue reference types.
11746         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
11747         constant.
11748
11749 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11750
11751         PR gdb/14441
11752         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
11753         value_ref() interface.
11754         * c-valprint.c (c_value_print): Likewise.
11755         * infcall.c (value_arg_coerce): Likewise.
11756         * python/py-value.c (valpy_reference_value): Likewise.
11757         * valops.c (value_cast, value_reinterpret_cast)
11758         (value_dynamic_cast, typecmp): Likewise.
11759         (value_ref): Parameterize by kind of return value reference type.
11760         * value.h (value_ref): Add new parameter "refcode".
11761
11762 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11763
11764         PR gdb/14441
11765         * dwarf2read.c (read_tag_reference_type): Use
11766         lookup_lvalue_reference_type() instead of lookup_reference_type().
11767         * eval.c (evaluate_subexp_standard): Likewise.
11768         * f-exp.y: Likewise.
11769         * gdbtypes.c (make_reference_type, lookup_reference_type):
11770         Generalize with rvalue reference types.
11771         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
11772         convenience wrappers for lookup_reference_type().
11773         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
11774         reference kind parameter.
11775         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
11776         wrappers for lookup_reference_type().
11777         * guile/scm-type.c (gdbscm_type_reference): Use
11778         lookup_lvalue_reference_type() instead of lookup_reference_type().
11779         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
11780         * parse.c (follow_types): Likewise.
11781         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
11782         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
11783         Likewise.
11784         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11785         (gdbpy_invoke_xmethod): Likewise.
11786         * stabsread.c: Provide extra argument to make_reference_type()
11787         call.
11788         * valops.c (value_ref, value_rtti_indirect_type): Use
11789         lookup_lvalue_reference_type() instead of lookup_reference_type().
11790
11791 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11792
11793         PR gdb/14441
11794         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
11795         (TYPE_IS_REFERENCE): New macro.
11796         (struct type): Add rvalue_reference_type field.
11797         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
11798
11799 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
11800
11801         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
11802         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
11803         New function definition.
11804         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
11805         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
11806         New function declaration.
11807         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
11808         * mi/mi-interp.h: New file.
11809         * solib.c (info_sharedlibrary_command): Replace for loop with
11810         ALL_SO_LIBS macro
11811         * solib.h (update_solib_list): New function declaration.
11812         (so_list_head): Move macro.
11813         * solist.h (ALL_SO_LIBS): New macro.
11814
11815 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
11816
11817         * infcmd.c (post_create_inferior): Remove unused argument in
11818         call to solib_add.
11819         * remote.c (remote_start_remote): Likewise.
11820         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
11821         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
11822         (enable_break): Likewise.
11823         * solib.c (update_solib_list): Remove unused target argument
11824         and its documentation.
11825         (solib_add): Remove unused target argument.  Remove unused
11826         argument in call to update_solib_list.
11827         (info_sharedlibrary_command): Remove unused argument in call
11828         to update_solib_list.
11829         (sharedlibrary_command): Remove unused argument in call to
11830         solib_add.
11831         (handle_solib_event): Likewise.
11832         (reload_shared_libraries): Likewise.
11833         * solib.h (solib_add): Remove unused target argument.
11834
11835 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11836
11837         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
11838         (s390_displaced_step_fixup): Cover relative branches with the
11839         default fixup handling.  This fixes lack of support for some
11840         relative branch instructions.
11841
11842 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11843
11844         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
11845         ptid from regcache.
11846
11847 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11848
11849         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
11850         i386_darwin_store_inferior_registers): Use ptid from regcache.
11851
11852 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11853
11854         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
11855         i386bsd_store_inferior_registers): Use ptid from regcache.
11856
11857 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11858
11859         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
11860         hppaobsd_store_registers): Use ptid from regcache.
11861
11862 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11863
11864         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
11865         hppanbsd_store_registers): Use ptid from regcache.
11866
11867 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11868
11869         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
11870         from regcache.  Use get_ptrace_pid.
11871
11872 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11873
11874         * corelow.c (get_core_register_section): Use ptid from regcache,
11875         update doc.
11876
11877 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11878
11879         * bsd-uthread.c (bsd_uthread_fetch_registers,
11880         bsd_uthread_store_registers): Use ptid from regcache, set and
11881         restore inferior_ptid.
11882
11883 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11884
11885         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
11886         fetch_fp_regs, store_register, store_regs, store_fp_register,
11887         store_fp_regs): Use ptid from regcache.
11888
11889 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11890
11891         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
11892         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
11893         store_vfp_regs): Use ptid from regcache.
11894
11895 2017-03-17  Pedro Alves  <palves@redhat.com>
11896
11897         PR remote/21188
11898         * ser-base.c (ser_base_wait_for): Add comment.
11899         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
11900         version.
11901         * ser-unix.c (hardwire_raw): Remove reference to
11902         scb->current_timeout.
11903         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
11904         (hardwire_ops): Install ser_base_readchar instead of
11905         hardwire_readchar.
11906         * serial.h (struct serial) <current_timeout, timeout_remaining>:
11907         Remove fields.
11908
11909 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
11910
11911         PR gdb/19637
11912         * python/lib/gdb/printer/bound_registers.py: Add support for
11913         Python 3.
11914
11915 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11916
11917         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
11918         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
11919         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
11920         byte_offset to subobj_byte_offset.  Fix the handling of
11921         DWARF_VALUE_STACK on big-endian targets when coming via an
11922         implicit pointer.
11923         (dwarf2_evaluate_loc_desc): Adjust call to
11924         dwarf2_evaluate_loc_desc_full.
11925         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
11926         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
11927
11928 2017-03-16  Yao Qi  <yao.qi@linaro.org>
11929
11930         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
11931         and REVSH instructions.
11932
11933 2017-03-16  Yao Qi  <yao.qi@linaro.org>
11934
11935         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
11936         (arm_record_test): Declare.
11937         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
11938         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
11939         align with the manual.
11940         (thumb_record_misc): Adjust the code order to align with the
11941         manual.
11942         (thumb2_record_decode_insn_handler): Fix instruction matching.
11943         (instruction_reader_thumb): New class.
11944         (arm_record_test): New function.
11945
11946 2017-03-16  Yao Qi  <yao.qi@linaro.org>
11947
11948         * arm-tdep.c (abstract_memory_reader): New class.
11949         (instruction_reader): New class.
11950         (extract_arm_insn): Add argument 'reader'.  Callers updated.
11951         (decode_insn): Likewise.
11952
11953 2017-03-16  Doug Evans  <dje@google.com>
11954
11955         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
11956         member.  Change type of TYPE member to SCM.  All uses updated.
11957         (lsscm_make_lazy_string_smob): Add assert.
11958         (lsscm_make_lazy_string): Flag bad length values.
11959         (lsscm_elt_type): New function.
11960         (gdbscm_lazy_string_to_value): Rewrite to use
11961         lsscm_safe_lazy_string_to_value.
11962         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
11963         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
11964         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
11965         in incoming type.
11966         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
11967         * guile/scm-type.c (tyscm_scm_to_type): New function.
11968
11969 2017-03-15  Doug Evans  <dje@google.com>
11970
11971         PR python/17728, python/18439, python/18779
11972         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
11973         member.  Change type of TYPE member to PyObject *.  All uses updated.
11974         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
11975         (gdbpy_create_lazy_string_object): Flag bad length values.
11976         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
11977         Handle typedefs in incoming type.
11978         (stpy_lazy_string_elt_type): New function.
11979         (gdbpy_extract_lazy_string): Call it.
11980         * python/py-value.c (valpy_lazy_string): Flag bad length values.
11981         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
11982         typedefs in incoming type.
11983
11984 2017-03-16  Doug Evans  <dje@google.com>
11985
11986         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
11987         * guile/scm-type.c (tyscm_scm_to_type): New function.
11988
11989 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
11990
11991         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
11992         "ULONGEST" for "skip".
11993
11994 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11995
11996         PR gdb/21220
11997         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
11998         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
11999         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
12000         over ptrace peek/poke until end of buffer or error.
12001
12002 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
12003
12004         * parse.c (length_of_subexp): Make static.
12005         * parser-defs.h (length_of_subexp): Remove.
12006
12007 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12008
12009         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
12010         as well.
12011
12012 2017-03-14  Pedro Alves  <palves@redhat.com>
12013
12014         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
12015         (main): Use std::unique_ptr.  Remove calls to
12016         cp_demangled_name_parse_free.
12017
12018 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12019
12020         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
12021         alphabsd_store_inferior_registers): Use regcache->ptid instead
12022         of inferior_ptid.
12023
12024 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12025
12026         * aix-thread.c (aix_thread_fetch_registers,
12027         aix_thread_store_registers): Use regcache->ptid instead of
12028         inferior_ptid.
12029
12030 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12031
12032         * aarch64-linux-nat.c (fetch_gregs_from_thread,
12033         store_gregs_to_thread, fetch_fpregs_from_thread,
12034         store_fpregs_to_thread): Use regcache->ptid instead of
12035         inferior_ptid.
12036
12037 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12038
12039         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
12040         amd64_linux_fetch_inferior_registers): Use regcache->ptid
12041         instead of inferior_ptid.
12042
12043 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12044
12045         * target.c (target_fetch_registers, target_store_registers): Add
12046         assert.
12047
12048 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12049
12050         * regcache.h (regcache_get_ptid): New function.
12051         * regcache.c (regcache_get_ptid): New function.
12052
12053 2017-03-13  Mark Wielaard  <mark@klomp.org>
12054
12055         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
12056
12057 2017-03-10  Keith Seitz  <keiths@redhat.com>
12058
12059         PR c++/8218
12060         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
12061
12062 2017-03-08  Pedro Alves  <palves@redhat.com>
12063
12064         PR gdb/18360
12065         * infrun.c (start_step_over, do_target_resume, resume)
12066         (restart_threads): Assert we're not resuming a thread that is
12067         meant to be stopped.
12068         (infrun_thread_stop_requested_callback): Delete.
12069         (infrun_thread_stop_requested): If the thread is internally
12070         stopped, queue a pending stop event and clear the thread's
12071         inline-frame state.
12072         (handle_stop_requested): New function.
12073         (handle_syscall_event, handle_inferior_event_1): Use
12074         handle_stop_requested.
12075         (handle_stop_requested): New function.
12076         (handle_signal_stop): Set the thread's stop_signal here instead of
12077         at caller.
12078         (finish_step_over): Clear step over info unconditionally.
12079         (handle_signal_stop): If the user had interrupted the event
12080         thread, consider the stop a random signal.
12081         (handle_signal_stop) <signal arrived while stepping over
12082         breakpoint>: Don't restart threads here.
12083         (stop_waiting): Don't clear step-over info here.
12084
12085 2017-03-08  Pedro Alves  <palves@redhat.com>
12086
12087         PR 21206
12088         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
12089         goes to argument 2, not 1.
12090
12091 2017-03-08  Pedro Alves  <palves@redhat.com>
12092
12093         PR cli/21218
12094         * top.c (gdb_readline_wrapper): Avoid passing NULL to
12095         display_gdb_prompt.
12096         (command_line_input): Add comment.
12097
12098 2017-03-08  Pedro Alves  <palves@redhat.com>
12099
12100         PR tui/21216
12101         * tui/tui-file.c (tui_file::write): New.
12102         * tui/tui-file.h (tui_file): Override "write".
12103         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
12104         factored out from ...
12105         (tui_puts): ... here.
12106         (tui_putc): Use them.
12107         (tui_write): New function.
12108         * tui/tui-io.h (tui_write): Declare.
12109
12110 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
12111
12112         * Makefile.in (SFILES): Replace "environ.c" with
12113         "common/environ.c".
12114         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
12115         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
12116         to...
12117         * common/environ.c: ... here.
12118         * environ.h: Moved to...
12119         * common/environ.h: ... here.
12120
12121 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
12122
12123         * gdbarch.sh (pstring_ptr): New static function.
12124         (gdbarch_disassembler_options): Use it.
12125         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
12126         not valid_disassembler_option->name.
12127         * gdbarch.c: Regenerate.
12128
12129 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
12130
12131         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
12132
12133 2017-03-07  Pedro Alves  <palves@redhat.com>
12134
12135         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
12136
12137 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12138
12139         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
12140         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
12141         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
12142         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
12143
12144 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
12145
12146         * xtensa-linux-nat.c (fetch_gregs): Remove const.
12147
12148 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
12149
12150         * remote.c (remote_add_target_side_commands): Use range-based
12151         for loop.
12152
12153 2017-03-03  Yao Qi  <yao.qi@linaro.org>
12154
12155         PR gdb/21165
12156         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
12157         value is lazy.
12158         * valprint.c (common_val_print): Likewise.
12159
12160 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
12161
12162         * NEWS: Mention new set/show disassembler-options commands.
12163         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
12164         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
12165         (prospective_options): New static variable.
12166         (gdb_disassembler::gdb_disassembler): Initialize
12167         m_di.disassembler_options.
12168         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
12169         (get_disassembler_options): New function.
12170         (set_disassembler_options): Likewise.
12171         (set_disassembler_options_sfunc): Likewise.
12172         (show_disassembler_options_sfunc): Likewise.
12173         (disassembler_options_completer): Likewise.
12174         (_initialize_disasm): Likewise.
12175         * disasm.h (get_disassembler_options): New prototype.
12176         (set_disassembler_options): Likewise.
12177         * gdbarch.sh (gdbarch_disassembler_options): New variable.
12178         (gdbarch_verify_disassembler_options): Likewise.
12179         * gdbarch.c: Regenerate.
12180         * gdbarch.h: Likewise.
12181         * arm-tdep.c (num_disassembly_options): Delete.
12182         (set_disassembly_style): Likewise.
12183         (arm_disassembler_options): New static variable.
12184         (set_disassembly_style_sfunc): Convert short style name into long
12185         option name.  Call set_disassembler_options.
12186         (show_disassembly_style_sfunc): New function.
12187         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
12188         set_gdbarch_verify_disassembler_options.
12189         (_initialize_arm_tdep): Delete regnames variable and update callers.
12190         (arm_disassembler_options): Initialize.
12191         (disasm_options): New variable.
12192         (num_disassembly_options): Rename from this...
12193         (num_disassembly_styles): ...to this.  Compute by scanning through
12194         disasm_options.
12195         (valid_disassembly_styles): Initialize using disasm_options.
12196         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
12197         set_arm_regname_option.
12198         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
12199         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
12200         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
12201         set_gdbarch_verify_disassembler_options.
12202         * s390-tdep.c (s390_disassembler_options): New static variable.
12203         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
12204         set_gdbarch_verify_disassembler_options.
12205
12206 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12207
12208         * remote.c (remote_add_target_side_condition): Remove "struct"
12209         keyword from range-based for loop.
12210
12211 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12212
12213         * remote.c (remote_add_target_side_condition): Use range-based
12214         for loop.  Update comment.
12215
12216 2017-02-27  Yao Qi  <yao.qi@linaro.org>
12217
12218         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
12219
12220 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
12221
12222         * regcache.c (regcache_raw_update): New function.
12223         (regcache_raw_read): Move code to regcache_raw_update.
12224         * regcache.h (regcache_raw_update): New declaration.
12225         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
12226
12227 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
12228
12229         * dwarf2read.c (create_debug_type_hash_table): Initialize
12230         header.signature and header.type_offset_in_tu.
12231
12232 2017-02-24  Pedro Alves  <palves@redhat.com>
12233
12234         * symtab.c (make_file_symbol_completion_list_1): Use
12235         add_symtab_completions.
12236
12237 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12238
12239         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
12240
12241 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12242
12243         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
12244         I386_MAX_REGISTER_SIZE.
12245         (i386_pseudo_register_write): Likewise.
12246         (i386_process_record): Likewise.
12247         * i387-tdep.c (i387_supply_xsave): Likewise.
12248         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
12249         (store_register): Likewise.
12250
12251 2017-02-23  Pedro Alves  <palves@redhat.com>
12252
12253         * ada-lang.c: Include "common/function-view.h".
12254         (ada_iterate_over_symbols): Adjust to use function_view as
12255         callback type.
12256         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
12257         (ada_make_symbol_completion_list): Use a lambda.
12258         (ada_exc_search_name_matches): Delete.
12259         (name_matches_regex): New.
12260         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
12261         * compile/compile-c-support.c: Include "common/function-view.h".
12262         (print_one_macro): Change prototype to accept a ui_file pointer.
12263         (write_macro_definitions): Use a lambda.
12264         * dwarf2read.c: Include "common/function-view.h".
12265         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
12266         (dw2_expand_symtabs_matching): Adjust to use function_view as
12267         callback type.
12268         * language.h: Include "common/function-view.h".
12269         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
12270         function_view as callback type.
12271         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
12272         * linespec.c: Include "common/function-view.h".
12273         (collect_info::add_symbol): New method.
12274         (struct symbol_and_data_callback, iterate_inline_only, struct
12275         symbol_matcher_data, iterate_name_matcher): Delete.
12276         (iterate_over_all_matching_symtabs): Adjust to use function_view
12277         as callback type and lambdas.
12278         (iterate_over_file_blocks): Adjust to use function_view as
12279         callback type.
12280         (decode_compound_collector): Now a class with private fields.
12281         (decode_compound_collector::release_symbols): New method.
12282         (collect_one_symbol): Rename to...
12283         (decode_compound_collector::operator()): ... this and adjust.
12284         (lookup_prefix_sym): decode_compound_collector construction bits
12285         move to decode_compound_collector ctor.  Pass the
12286         decode_compound_collector object directly as callback.  Remove
12287         cleanups and use decode_compound_collector::release_symbols
12288         instead.
12289         (symtab_collector): Now a class with private fields.
12290         (symtab_collector::release_symtabs): New method.
12291         (add_symtabs_to_list): Rename to...
12292         (symtab_collector::operator()): ... this and adjust.
12293         (collect_symtabs_from_filename): symtab_collector construction
12294         bits move to symtab_collector ctor.  Pass the symtab_collector
12295         object directly as callback.  Remove cleanups and use
12296         symtab_collector::release_symtabs instead.
12297         (collect_symbols): Delete.
12298         (add_matching_symbols_to_info): Use lambdas.
12299         * macrocmd.c (print_macro_callback): Delete.
12300         (info_macro_command): Use a lambda.
12301         (info_macros_command): Pass print_macro_definition as callable
12302         directly.
12303         (print_one_macro): Remove 'ignore' parameter.
12304         (macro_list_command): Adjust.
12305         * macrotab.c (macro_for_each_data::fn): Now a function_view.
12306         (macro_for_each_data::user_data): Delete field.
12307         (foreach_macro): Adjust to call the function_view.
12308         (macro_for_each): Adjust to use function_view as callback type.
12309         (foreach_macro_in_scope): Adjust to call the function_view.
12310         (macro_for_each_in_scope): Adjust to use function_view as callback
12311         type.
12312         * macrotab.h: Include "common/function-view.h".
12313         (macro_callback_fn): Declare a prototype instead of a pointer.
12314         Remove "user_data" parameter.
12315         (macro_for_each, macro_for_each_in_scope): Adjust to use
12316         function_view as callback type.
12317         * psymtab.c (partial_map_expand_apply)
12318         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
12319         Adjust to use function_view as callback type and to return bool.
12320         (psym_expand_symtabs_matching): Adjust to use function_view as
12321         callback types.
12322         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
12323         to use function_view as callback type and to return bool.
12324         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
12325         callback types.
12326         * symfile.c (expand_symtabs_matching): Adjust to use function_view
12327         as callback types.
12328         * symfile.h: Include "common/function-view.h".
12329         (expand_symtabs_file_matcher_ftype)
12330         (expand_symtabs_symbol_matcher_ftype)
12331         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
12332         return bool.
12333         (quick_symbol_functions::map_symtabs_matching_filename)
12334         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
12335         function_view as callback type and return bool.
12336         (expand_symtabs_matching): Adjust to use function_view as callback
12337         type.
12338         (maintenance_expand_name_matcher)
12339         (maintenance_expand_file_matcher): Delete.
12340         (maintenance_expand_symtabs): Use lambdas.
12341         * symtab.c (iterate_over_some_symtabs): Adjust to use
12342         function_view as callback types and return bool.
12343         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
12344         of a cleanup.
12345         (lookup_symtab_callback): Delete.
12346         (lookup_symtab): Use a lambda.
12347         (iterate_over_symbols): Adjust to use function_view as callback
12348         type.
12349         (struct search_symbols_data, search_symbols_file_matches)
12350         (search_symbols_name_matches): Delete.
12351         (search_symbols): Use a pair of lambdas.
12352         (struct add_name_data, add_macro_name, symbol_completion_matcher)
12353         (symtab_expansion_callback): Delete.
12354         (default_make_symbol_completion_list_break_on_1): Use lambdas.
12355         * symtab.h: Include "common/function-view.h".
12356         (iterate_over_some_symtabs): Adjust to use function_view as
12357         callback type and return bool.
12358         (iterate_over_symtabs): Adjust to use function_view as callback
12359         type.
12360         (symbol_found_callback_ftype): Remove 'data' parameter and return
12361         bool.
12362         (iterate_over_symbols): Adjust to use function_view as callback
12363         type.
12364
12365 2017-02-23  Pedro Alves  <palves@redhat.com>
12366
12367         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
12368         (%.o) <unittests/%.c>: New pattern.
12369         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
12370         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
12371         * common/function-view.h: New file.
12372         * unittests/function-view-selftests.c: New file.
12373         * configure: Regenerate.
12374
12375 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
12376
12377         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
12378         inferior_ptid.
12379         * go32-nat.c (go32_thread_alive): Likewise.
12380
12381 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12382
12383         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
12384         delete.
12385
12386 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12387
12388         * varobj.c (varobj_clear_saved_item): Use delete instead of
12389         xfree.
12390         (update_dynamic_varobj_children): Likewise.
12391
12392 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12393
12394         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
12395
12396 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
12397
12398         * common/enum-flags.h (enum_flags::enum_flags): Initialize
12399         m_enum_value to 0 in default constructor.
12400
12401 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
12402
12403         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
12404         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
12405         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
12406         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
12407         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
12408         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
12409         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
12410         IS_STORE_CONDITIONAL_INSN.
12411
12412 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12413
12414         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
12415
12416 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12417
12418         * NEWS (Changes since GDB 7.12): Add DWARF-5.
12419
12420 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12421
12422         * dwarf2read.c (skip_one_die, read_attribute_value)
12423         (dwarf2_const_value_attr, dump_die_shallow)
12424         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
12425         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
12426
12427 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12428
12429         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
12430         (dwarf_parse_macro_header): Accept DWARF version 5.
12431         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
12432
12433 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12434
12435         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
12436         DW_AT_GNU_*.
12437         * common/common-exceptions.h (enum errors): Likewise.
12438         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
12439         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
12440         (dwarf_expr_context::execute_stack_op): Likewise.
12441         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
12442         Likewise.
12443         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
12444         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
12445         (show_entry_values_debug, call_site_to_target_addr)
12446         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
12447         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
12448         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
12449         (value_of_dwarf_block_entry, indirect_pieced_value)
12450         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
12451         (disassemble_dwarf_expression): Likewise.
12452         * dwarf2read.c (process_die, inherit_abstract_dies)
12453         (read_call_site_scope): Likewise.
12454         * gdbtypes.h (struct func_type, struct call_site_parameter)
12455         (struct call_site): Likewise.
12456         * stack.c (read_frame_arg): Likewise.
12457         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
12458
12459 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12460
12461         * defs.h (read_unsigned_leb128): New declaration.
12462         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
12463         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
12464         (dwarf2_find_location_expression): Call also
12465         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
12466         * dwarf2loc.h (dwarf2_version): New declaration.
12467         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
12468         rnglists.
12469         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
12470         .debug_rnglists.
12471         (struct dwop_section_names): Add loclists_dwo.
12472         (dwop_section_names): Add .debug_loclists.dwo.
12473         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
12474         (struct dwarf2_per_cu_data): Add dwarf_version.
12475         (struct dwo_sections): Add loclists.
12476         (struct attr_abbrev): Add implicit_const.
12477         (read_indirect_line_string): New declaration.
12478         (read_unsigned_leb128): Delete declaration.
12479         (rcuh_kind): New definition.
12480         (read_and_check_comp_unit_head): Change parameter
12481         is_debug_types_section to section_kind.
12482         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
12483         (read_comp_unit_head): Change parameter abfd to section, add parameter
12484         section_kind.  Handle DWARF-5.
12485         (error_check_comp_unit_head): Accept also DWARF version 5.
12486         (read_and_check_comp_unit_head): Change parameter
12487         is_debug_types_section to section_kind.
12488         (read_and_check_type_unit_head): Delete function.
12489         (read_abbrev_offset): Handle DWARF-5.
12490         (create_debug_type_hash_table): Add parameter section_kind.  Process
12491         only DW_UT_type.  Use signature and type_offset_in_tu from struct
12492         comp_unit_head.
12493         (create_debug_types_hash_table): Update create_debug_type_hash_table
12494         caller.
12495         (create_all_type_units): Call create_debug_type_hash_table.
12496         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
12497         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
12498         caller.
12499         (skip_one_die): Handle DW_FORM_implicit_const.
12500         (dwarf2_rnglists_process): New function.
12501         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
12502         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
12503         (read_attribute_value): Handle DW_FORM_implicit_const,
12504         DW_FORM_line_strp.
12505         (read_attribute): Handle DW_FORM_implicit_const.
12506         (read_indirect_string_at_offset_from): New function from
12507         read_indirect_string_at_offset.
12508         (read_indirect_string_at_offset): Call
12509         read_indirect_string_at_offset_from.
12510         (read_indirect_line_string_at_offset): New function.
12511         (read_indirect_string): New function comment.
12512         (read_indirect_line_string): New function.
12513         (read_unsigned_leb128): Make it global.
12514         (dwarf2_string_attr): Handle DWARF-5.
12515         (add_include_dir_stub, read_formatted_entries): New functions.
12516         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
12517         Handle DWARF-5.
12518         (per_cu_header_read_in): Update read_comp_unit_head caller.
12519         (dwarf2_version): New function.
12520         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
12521         rnglists.
12522         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
12523         fields.
12524
12525 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12526
12527         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
12528
12529 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12530
12531         * dwarf2read.c (dwarf2_ranges_process): New function from
12532         dwarf2_ranges_read.
12533         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
12534         dwarf2_ranges_process.
12535
12536 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12537
12538         * dwarf2read.c (create_debug_type_hash_table): New function from
12539         create_debug_types_hash_table.
12540         (create_debug_types_hash_table): Call create_debug_type_hash_table.
12541         (create_all_type_units, open_and_init_dwo_file): Update
12542         create_debug_types_hash_table callers.
12543
12544 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
12545
12546         PR gdb/16188
12547         * fork-child.c (trace_start_error): Fix thinko.  va_end should
12548         refer to 'ap', not 'args'.
12549
12550 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
12551             Pedro Alves  <palves@redhat.com>
12552
12553         PR gdb/16188
12554         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
12555         calls succeeded.
12556         * fork-child.c (trace_start_error): New function.
12557         (trace_start_error_with_name): Likewise.
12558         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
12559         * inf-ptrace.c (inf_ptrace_me): Likewise.
12560         * inferior.h (trace_start_error): New prototype.
12561         (trace_start_error_with_name): Likewise.
12562
12563 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
12564
12565         PR gdb/21164
12566         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
12567         NULL before using it.
12568         * symmisc.c (maintenance_print_symbols): Likewise.
12569         (maintenance_print_msymbols): Likewise.
12570
12571 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12572
12573         * NEWS: Add record Python bindings entry.
12574
12575 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12576
12577         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
12578         py-record-full.o.
12579         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
12580         * python/py-record-btrace.c, python/py-record-btrace.h,
12581         python/py-record-full.c, python/py-record-full.h: New file.
12582         * python/py-record.c: Add include for py-record-btrace.h and
12583         py-record-full.h.
12584         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
12585         recpy_instruction_history, recpy_function_call_history, recpy_begin,
12586         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
12587         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
12588         New definition.
12589         (gdbpy_initialize_btrace): New export.
12590         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
12591
12592 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12593
12594         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
12595         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
12596         * python/py-record.c: New file.
12597         * python/python-internal.h (gdbpy_start_recording,
12598         gdbpy_current_recording, gdpy_stop_recording,
12599         gdbpy_initialize_record): New export.
12600         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
12601         (python_GdbMethods): Add gdbpy_start_recording,
12602         gdbpy_current_recording and gdbpy_stop_recording.
12603
12604 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12605
12606         * record-btrace.c (record_btrace_record_method): New function.
12607         (init_record_btrace_ops): Initialize to_record_method.
12608         * record-full.c (record_full_record_method): New function.
12609         (init_record_full_ops, init_record_full_core_ops): Add
12610         record_full_record_method.
12611         * record.h (enum record_method): New enum.
12612         * target-debug.h (target_debug_print_enum_record_method: New define.
12613         * target-delegates.c: Regenerate.
12614         * target.c (target_record_method): New function.
12615         * target.h: Include record.h.
12616         (struct target_ops) <to_record_method>: New field.
12617         (target_record_method): New export.
12618
12619 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12620
12621         * record.h (record_start, record_stop): New export.
12622         * record.c (record_start, record_stop): New function.
12623
12624 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12625
12626         * btrace.c (btrace_fetch): Copy function call segments pointer
12627         into a vector.
12628         (btrace_clear): Clear the vector.
12629         (btrace_find_insn_by_number): Use binary search to find the correct
12630         function call segment.
12631         * btrace.h (brace_fun_p): New typedef.
12632         (struct btrace_thread_info) <functions>: New field.
12633
12634 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12635
12636         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
12637         * btrace.c (btrace_decode_error): ... here.  New function.
12638         * btrace.h (btrace_decode_error): New export.
12639
12640 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12641
12642         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
12643         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
12644         btrace_find_insn_by_number): Remove special case for gaps.
12645         * btrace.h (btrace_insn_get_error): New export.
12646         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
12647         * record-btrace.c (btrace_insn_history): Print number for gaps.
12648         (record_btrace_info, record_btrace_goto): Handle gaps.
12649
12650 2017-02-14  Tom Tromey  <tom@tromey.com>
12651
12652         PR python/13598:
12653         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
12654         event.
12655         * python/py-evts.c (gdbpy_initialize_py_events): Add
12656         before_prompt registry.
12657         * python/py-events.h (events_object) <before_prompt>: New field.
12658
12659 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
12660
12661         * btrace.c (ftrace_new_switch): Preserve up link and flags.
12662
12663 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
12664
12665         * symfile (_initialize_symfile): Add usage text to the load command's
12666         help text.
12667
12668 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
12669
12670         * utils.c (defaulted_query): Don't query on secondary UIs.
12671
12672 2017-02-10  Tom Tromey  <tom@tromey.com>
12673
12674         * rust-lang.c (rust_get_disr_info): Remove unused variable.
12675
12676 2017-02-10  Tom Tromey  <tom@tromey.com>
12677
12678         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
12679         "cleanup" local.
12680         * python/py-type.c (typy_legacy_template_argument): Remove
12681         unnecessary "cleanup" local.
12682
12683 2017-02-10  Tom Tromey  <tom@tromey.com>
12684
12685         * python/python.c (do_start_initialization): New function, from
12686         _initialize_python.
12687         (_initialize_python): Call do_start_initialization.
12688         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
12689         goto.
12690
12691 2017-02-10  Tom Tromey  <tom@tromey.com>
12692
12693         * python/py-prettyprint.c (pretty_print_one_value): Use
12694         gdbpy_ref.
12695
12696 2017-02-10  Tom Tromey  <tom@tromey.com>
12697
12698         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
12699         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
12700         gdbpy_ref.
12701         * python/py-type.c (field_new): Use gdbpy_ref.
12702         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
12703         gdbpy_ref.
12704         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
12705         (py_free_pspace): Likewise.
12706         (pspace_to_pspace_object): Likewise.
12707         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
12708         (py_free_objfile): Likewise.
12709         (objfile_to_objfile_object): Likewise.
12710         * python/py-inferior.c (delete_thread_object): Use
12711         gdbpy_ref.
12712         (infpy_read_memory): Likewise.
12713         (py_free_inferior): Likewise.
12714         * python/py-evtregistry.c (create_eventregistry_object): Use
12715         gdbpy_ref.
12716         * python/py-event.c (create_event_object): Use gdbpy_ref.
12717
12718 2017-02-10  Tom Tromey  <tom@tromey.com>
12719
12720         * python/py-ref.h (gdbpy_ref_policy): Now a template.
12721         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
12722         used.
12723         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
12724         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
12725         python/py-exitedevent.c, python/py-finishbreakpoint.c,
12726         python/py-framefilter.c, python/py-function.c,
12727         python/py-inferior.c, python/py-infevents.c,
12728         python/py-linetable.c, python/py-newobjfileevent.c,
12729         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
12730         python/py-signalevent.c, python/py-stopevent.c,
12731         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
12732         python/py-unwind.c, python/py-utils.c, python/py-value.c,
12733         python/py-varobj.c, python/py-xmethods.c, python/python.c,
12734         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
12735
12736 2017-02-10  Tom Tromey  <tom@tromey.com>
12737
12738         * ui-out.h (ui_out_emit_type): New class.
12739         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
12740         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
12741         and ui_out_emit_tuple.
12742         (enumerate_locals): Likewise.
12743         (py_mi_print_variables, py_print_locals, py_print_args): Use
12744         ui_out_emit_list.
12745         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
12746         ui_out_emit_list.
12747         * common/gdb_optional.h: New file.
12748
12749 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
12750
12751         * MAINTAINERS (Write After Approval): Update my e-mail address.
12752
12753 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
12754
12755         PR gdb/21122
12756         * breakpoint.c (_initialize_breakpoint): Update the help description
12757         of the 'commands' command to indicate that it takes a list argument.
12758
12759 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
12760
12761         * interps.c (current_interp_set_logging): Remove "return".
12762
12763 2017-02-09  Gary Benson  <gbenson@redhat.com>
12764
12765         * symtab.c (add_symtab_completions): Prevent NULL pointer
12766         dereference.
12767
12768 2017-02-08  Pedro Alves  <palves@redhat.com>
12769
12770         * interps.c (interp::interp): Remove reference to quiet_p.
12771         (interp_set): Make static.  Remove dead "Switching to" output
12772         code.
12773         (interp_quiet_p, interp_set_quiet): Delete.
12774         (interpreter_exec_cmd): Don't set the interpreter quiet.
12775         * interps.h (interp_quiet_p): Make static.
12776         (class interp) <quiet_p>: Remove field
12777
12778 2017-02-08  Jerome Guitton  <guitton@adacore.com>
12779
12780         * cli/cli-decode.c (find_command_name_length): Make it extern.
12781         * cli/cli-decode.h (find_command_name_length): Declare.
12782         * cli/cli-script.c (command_name_equals, line_first_arg):
12783         New functions.
12784         (process_next_line): Use cli-decode to parse command names.
12785         (build_command_line): Make args a constant pointer.
12786
12787 2017-02-08  Jerome Guitton  <guitton@adacore.com>
12788
12789         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
12790         Remove case-insensitive search.
12791
12792 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
12793
12794         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
12795         at the end of the line.  Avoids an ARI warning.
12796
12797 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
12798
12799         * NEWS: Mention support for record/replay of Intel 64 rdrand and
12800         rdseed instructions.
12801         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
12802
12803 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
12804
12805         PR tdep/20936
12806         Provide and use sparc32 and sparc64 target description XML files.
12807         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
12808         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
12809         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
12810         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
12811         * features/sparc/sparc32-solaris.xml: New file.
12812         * features/sparc/sparc64-solaris.xml: New file.
12813         * features/sparc/sparc32-solaris.c: Generated.
12814         * features/sparc/sparc64-solaris.c: Generated.
12815         * sparc-tdep.h: Account for differences in target descriptions.
12816         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
12817         (sparc32_register_type): Use target provided registers.
12818         (validate_tdesc_registers): New function.
12819         (sparc32_gdbarch_init): Use tdesc_has_registers.
12820         Set pseudoregister functions.
12821         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
12822         (sparc64_register_type): Use target provided registers.
12823         (sparc64_init_abi): Set pseudoregister functions.
12824
12825 2017-02-03  Tom Tromey  <tom@tromey.com>
12826
12827         PR rust/21097:
12828         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
12829         with a single member.
12830
12831 2017-02-03  Pedro Alves  <palves@redhat.com>
12832
12833         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
12834         (cli_interp_base::~cli_interp_base): New.
12835         (cli_interp): New struct.
12836         (as_cli_interp): Cast the interp itself to cli_interp.
12837         (cli_interpreter_pre_command_loop): Rename to ...
12838         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
12839         parameter.
12840         (cli_interpreter_init): Rename to ...
12841         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
12842         boolean.  Make extern.
12843         (cli_interpreter_resume): Rename to ...
12844         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
12845         extern.
12846         (cli_interpreter_suspend): Rename to ...
12847         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
12848         extern.
12849         (cli_interpreter_exec): Rename to ...
12850         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
12851         extern.
12852         (cli_interpreter_supports_command_editing): Rename to ...
12853         (cli_interp_base::supports_command_editing): ... this.  Remove
12854         'interp' parameter.  Make extern.
12855         (cli_ui_out): Rename to ...
12856         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
12857         Make extern.
12858         (cli_set_logging): Rename to ...
12859         (cli_interp_base::set_logging): ... this.  Remove 'interp'
12860         parameter.  Make extern.
12861         (cli_interp_procs): Delete.
12862         (cli_interp_factory): Adjust to use "new".
12863         * cli/cli-interp.h: Include "interps.h".
12864         (struct cli_interp_base): New struct.
12865         * interps.c (struct interp): Delete.  Fields moved to interps.h.
12866         (interp_new): Delete.
12867         (interp::interp, interp::~interp): New.
12868         (interp_set): Use bool, and return void.  Assume the interpreter
12869         has suspend, init and resume methods, and that the all return
12870         void.
12871         (set_top_level_interpreter): interp_set returns void.
12872         (interp_ui_out): Adapt.
12873         (current_interp_set_logging): Adapt.
12874         (interp_data): Delete.
12875         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
12876         (interp_exec): Adapt.
12877         (top_level_interpreter_data): Delete.
12878         * interps.h (interp_init_ftype, interp_resume_ftype)
12879         (interp_suspend_ftype, interp_exec_ftype)
12880         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
12881         (class interp): New.
12882         (interp_new): Delete.
12883         (interp_set): Now returns void.  Use bool.
12884         (interp_data, top_level_interpreter_data): Delete.
12885         * mi/mi-common.h: Include interps.h.
12886         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
12887         init, resume, suspect, exec, interp_ui_out, set_logging and
12888         pre_command_loop methods.
12889         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
12890         (mi_interpreter_init): Rename to ...
12891         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
12892         bool, return void and make extern.  Adjust.
12893         (mi_interpreter_resume): ... Rename to ...
12894         (mi_interp::resume): ... this.  Remove the 'data' parameter,
12895         return void and make extern.  Adjust.
12896         (mi_interpreter_suspend): ... Rename to ...
12897         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
12898         return void and make extern.  Adjust.
12899         (mi_interpreter_exec): ... Rename to ...
12900         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
12901         extern.  Adjust.
12902         (mi_interpreter_pre_command_loop): ... Rename to ...
12903         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
12904         parameter and make extern.
12905         (mi_on_normal_stop_1): Adjust.
12906         (mi_ui_out): Rename to ...
12907         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
12908         parameter and make extern.  Adjust.
12909         (mi_set_logging): Rename to ...
12910         (mi_interp::set_logging): ... this.  Remove the 'interp'
12911         parameter and make extern.  Adjust.
12912         (mi_interp_procs): Delete.
12913         (mi_interp_factory): Adjust to use 'new'.
12914         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
12915         (mi_print_exception, mi_execute_command, mi_load_progress):
12916         Adjust.
12917         * tui/tui-interp.c (tui_interp): New class.
12918         (as_tui_interp): Return a tui_interp pointer.
12919         (tui_on_normal_stop, tui_on_signal_received)
12920         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
12921         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
12922         to use interp::interp_ui_out.
12923         (tui_init): Rename to ...
12924         (tui_interp::init): ... this.  Remove the 'self' parameter, use
12925         bool, return void and make extern.  Adjust.
12926         (tui_resume): Rename to ...
12927         (tui_interp::resume): ... this.  Remove the 'data' parameter,
12928         return void and make extern.  Adjust.
12929         (tui_suspend): Rename to ...
12930         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
12931         return void and make extern.  Adjust.
12932         (tui_ui_out): Rename to ...
12933         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
12934         parameter, and make extern.  Adjust.
12935         (tui_exec): Rename to ...
12936         (tui_interp::exec): ... this.  Remove the 'data' parameter and
12937         make extern.
12938         (tui_interp_procs): Delete.
12939         (tui_interp_factory): Use "new".
12940
12941 2017-02-02  Tom Tromey  <tom@tromey.com>
12942
12943         * rust-exp.y (ends_raw_string, space_then_number)
12944         (rust_identifier_start_p): Return bool.
12945         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
12946         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
12947         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
12948         (rust_chartype_p): Return bool.
12949         (val_print_struct, rust_print_struct_def, rust_print_type):
12950         Update.
12951         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
12952         Return bool.
12953
12954 2017-02-02  Tom Tromey  <tom@tromey.com>
12955
12956         * rust-lang.c: Reindent.
12957
12958 2017-02-02  Tom Tromey  <tom@tromey.com>
12959
12960         * rust-lang.h (rust_crate_for_block): Update.
12961         * rust-lang.c (rust_crate_for_block): Return std::string.
12962         (rust_get_disr_info): Use std:;string, not
12963         gdb::unique_xmalloc_ptr.
12964         * rust-exp.y (crate_name): Update.
12965
12966 2017-02-02  Pedro Alves  <palves@redhat.com>
12967
12968         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
12969         field out of gdb_disassembler_test and make it static.
12970
12971 2017-02-02  Pedro Alves  <palves@redhat.com>
12972
12973         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
12974         mi1_interp and mi_interp fields.
12975
12976 2017-02-02  Pedro Alves  <palves@redhat.com>
12977
12978         * cli/cli-interp.c (struct saved_output_files, saved_output):
12979         Moved from cli/cli-logging.c.
12980         (cli_set_logging): New function.
12981         (cli_interp_procs): Install cli_set_logging.
12982         * cli/cli-interp.h (make_logging_output, cli_set_logging):
12983         Declare.
12984         * cli/cli-logging.c (struct saved_output_files, saved_output):
12985         Moved to cli/cli-interp.c.
12986         (pop_output_files): Don't save outputs here.
12987         (make_logging_output): New function.
12988         (handle_redirections): Don't build tee nor save previous outputs
12989         here.
12990         * interps.c (current_interp_set_logging): Change prototype.
12991         Assume there's always a set_logging_proc method installed.
12992         * interps.h (interp_set_logging_ftype): Change prototype.
12993         (current_interp_set_logging): Change prototype and adjust comment.
12994         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
12995         use make_logging_output.
12996         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
12997 2017-02-02  Pedro Alves  <palves@redhat.com>
12998
12999         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
13000         from ...
13001         (set_logging_overwrite): ... here.
13002         (logging_no_redirect_file): Delete.
13003         (set_logging_redirect): Don't handle redirection on the fly.
13004         Instead warn that "logging off" / "logging on" is necessary.
13005         (pop_output_files): Delete references to logging_no_redirect_file.
13006         (show_logging_command): Always speak in terms of what will happen
13007         once logging is reenabled.
13008
13009 2017-02-02  Pedro Alves  <palves@redhat.com>
13010
13011         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
13012
13013 2017-02-02  Pedro Alves  <palves@redhat.com>
13014
13015         * disasm.c (gdb_pretty_print_insn): Rename to ...
13016         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
13017         Remove gdbarch parameter.  Adapt to clear the object's buffers
13018         instead of allocating new buffers, and to print using the object's
13019         gdb_disassembler instead of calling gdb_print_insn.
13020         (dump_insns): Use gdb_pretty_print_disassembler.
13021         * disasm.h (gdb_pretty_print_insn): Delete declaration.
13022         (gdb_pretty_print_disassembler): New class.
13023         * record-btrace.c (btrace_insn_history): Use
13024         gdb_pretty_print_disassembler.
13025
13026 2017-02-02  Pedro Alves  <palves@redhat.com>
13027
13028         * ada-lang.c (type_as_string): Use string_file.
13029         * ada-valprint.c (ada_print_floating): Use string_file.
13030         * ada-varobj.c (ada_varobj_scalar_image)
13031         (ada_varobj_get_value_image): Use string_file.
13032         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
13033         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
13034         * breakpoint.c (update_inserted_breakpoint_locations)
13035         (insert_breakpoint_locations, reattach_breakpoints)
13036         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
13037         (print_it_watchpoint): Use string_file.
13038         (save_breakpoints): Use stdio_file.
13039         * c-exp.y (oper): Use string_file.
13040         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
13041         tee_file.
13042         (pop_output_files): Use delete.
13043         (handle_redirections): Use stdio_file and tee_file.
13044         * cli/cli-setshow.c (do_show_command): Use string_file.
13045         * compile/compile-c-support.c (c_compute_program): Use
13046         string_file.
13047         * compile/compile-c-symbols.c (generate_vla_size): Take a
13048         'string_file &' instead of a 'ui_file *'.
13049         (generate_c_for_for_one_variable): Take a 'string_file &' instead
13050         of a 'ui_file *'.  Use string_file.
13051         (generate_c_for_variable_locations): Take a 'string_file &'
13052         instead of a 'ui_file *'.
13053         * compile/compile-internal.h (generate_c_for_for_one_variable):
13054         Take a 'string_file &' instead of a 'ui_file *'.
13055         * compile/compile-loc2c.c (push, pushf, unary, binary)
13056         (print_label, pushf_register_address, pushf_register)
13057         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
13058         'ui_file *'.  Adjust.
13059         * compile/compile.c (compile_to_object): Use string_file.
13060         * compile/compile.h (compile_dwarf_expr_to_c)
13061         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
13062         'ui_file *'.
13063         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
13064         (replace_typedefs_qualified_name): Use string_file and
13065         obstack_copy0.
13066         * disasm.c (gdb_pretty_print_insn): Use string_file.
13067         (gdb_disassembly): Adjust reference the null_stream global.
13068         (do_ui_file_delete): Delete.
13069         (gdb_insn_length): Use null_stream.
13070         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
13071         * dwarf2loc.c (dwarf2_compile_property_to_c)
13072         (locexpr_generate_c_location, loclist_generate_c_location): Take a
13073         'string_file &' instead of a 'ui_file *'.
13074         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
13075         * dwarf2read.c (do_ui_file_peek_last): Delete.
13076         (dwarf2_compute_name): Use string_file.
13077         * event-top.c (gdb_setup_readline): Use stdio_file.
13078         * gdbarch.sh (verify_gdbarch): Use string_file.
13079         * gdbtypes.c (safe_parse_type): Use null_stream.
13080         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
13081         string_file.
13082         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
13083         'string_file *' instead of a 'ui_file *'.
13084         (gdbscm_arch_disassemble): Use string_file.
13085         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
13086         * guile/scm-ports.c (class ioscm_file_port): Now a class that
13087         inherits from ui_file.
13088         (ioscm_file_port_delete, ioscm_file_port_rewind)
13089         (ioscm_file_port_put): Delete.
13090         (ioscm_file_port_write): Rename to ...
13091         (ioscm_file_port::write): ... this.  Remove file_port_magic
13092         checks.
13093         (ioscm_file_port_new): Delete.
13094         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
13095         ui_file_up.
13096         * guile/scm-type.c (tyscm_type_name): Use string_file.
13097         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
13098         Use string_file.
13099         * infcmd.c (print_return_value_1): Use string_file.
13100         * infrun.c (print_target_wait_results): Use string_file.
13101         * language.c (add_language): Use string_file.
13102         * location.c (explicit_to_string_internal): Use string_file.
13103         * main.c (captured_main_1): Use null_file.
13104         * maint.c (maintenance_print_architecture): Use stdio_file.
13105         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
13106         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
13107         event_channel>: Change type to mi_console_file pointer.
13108         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
13109         (mi_console_file_delete): Delete.
13110         (struct mi_console_file): Delete.
13111         (mi_console_file_magic): Delete.
13112         (mi_console_file_new): Delete.
13113         (mi_console_file::mi_console_file): New.
13114         (mi_console_file_delete): Delete.
13115         (mi_console_file_fputs): Delete.
13116         (mi_console_file::write): New.
13117         (mi_console_raw_packet): Delete.
13118         (mi_console_file::flush): New.
13119         (mi_console_file_flush): Delete.
13120         (mi_console_set_raw): Rename to ...
13121         (mi_console_file::set_raw): ... this.
13122         * mi/mi-console.h (class mi_console_file): New class.
13123         (mi_console_file_new, mi_console_set_raw): Delete.
13124         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
13125         (mi_set_logging): Use delete and tee_file.  Adjust.
13126         * mi/mi-main.c (output_register): Use string_file.
13127         (mi_cmd_data_evaluate_expression): Use string_file.
13128         (mi_cmd_data_read_memory): Use string_file.
13129         (mi_cmd_execute, print_variable_or_computed): Use string_file.
13130         * mi/mi-out.c (mi_ui_out::main_stream): New.
13131         (mi_ui_out::rewind): Use main_stream and
13132         string_file.
13133         (mi_ui_out::put): Use main_stream and string_file.
13134         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13135         Allocate a 'string_file' instead.
13136         (mi_out_new): Don't allocate a mem_fileopen stream here.
13137         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13138         (mi_ui_out::main_stream): Declare method.
13139         * printcmd.c (eval_command): Use string_file.
13140         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
13141         * python/py-arch.c (archpy_disassemble): Use string_file.
13142         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
13143         * python/py-frame.c (frapy_str): Use string_file.
13144         * python/py-framefilter.c (py_print_type, py_print_single_arg):
13145         Use string_file.
13146         * python/py-type.c (typy_str): Use string_file.
13147         * python/py-unwind.c (unwind_infopy_str): Use string_file.
13148         * python/py-value.c (valpy_str): Use string_file.
13149         * record-btrace.c (btrace_insn_history): Use string_file.
13150         * regcache.c (regcache_print): Use stdio_file.
13151         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
13152         * remote.c (escape_buffer): Use string_file.
13153         * rust-lang.c (rust_get_disr_info): Use string_file.
13154         * serial.c (serial_open_ops_1): Use stdio_file.
13155         (do_serial_close): Use delete.
13156         * stack.c (print_frame_arg): Use string_file.
13157         (print_frame_args): Remove local mem_fileopen stream, not used.
13158         (print_frame): Use string_file.
13159         * symmisc.c (maintenance_print_symbols): Use stdio_file.
13160         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
13161         Take a 'string_file *' instead of a 'ui_file *'.
13162         * top.c (new_ui): Use stdio_file and stderr_file.
13163         (free_ui): Use delete.
13164         (execute_command_to_string): Use string_file.
13165         (quit_confirm): Use string_file.
13166         * tracepoint.c (collection_list::append_exp): Use string_file.
13167         * tui/tui-disasm.c (tui_disassemble): Use string_file.
13168         * tui/tui-file.c: Don't include "ui-file.h".
13169         (enum streamtype, struct tui_stream): Delete.
13170         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
13171         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
13172         (tui_file::tui_file): New method.
13173         (tui_file_fputs): Delete.
13174         (tui_file_get_strbuf): Delete.
13175         (tui_file::puts): New method.
13176         (tui_file_adjust_strbuf): Delete.
13177         (tui_file_flush): Delete.
13178         (tui_file::flush): New method.
13179         * tui/tui-file.h: Tweak intro comment.
13180         Include ui-file.h.
13181         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
13182         (tui_file_adjust_strbuf): Delete declarations.
13183         (class tui_file): New class.
13184         * tui/tui-io.c (tui_initialize_io): Use tui_file.
13185         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
13186         (tui_register_format): Use string_stream.
13187         * tui/tui-stack.c (tui_make_status_line): Use string_file.
13188         (tui_get_function_from_frame): Use string_file.
13189         * typeprint.c (type_to_string): Use string_file.
13190         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
13191         (null_stream): New global.
13192         (ui_file_delete): Delete.
13193         (ui_file::ui_file): New.
13194         (null_file_isatty): Delete.
13195         (ui_file::~ui_file): New.
13196         (null_file_rewind): Delete.
13197         (ui_file::printf): New.
13198         (null_file_put): Delete.
13199         (null_file_flush): Delete.
13200         (ui_file::putstr): New.
13201         (null_file_write): Delete.
13202         (ui_file::putstrn): New.
13203         (null_file_read): Delete.
13204         (ui_file::putc): New.
13205         (null_file_fputs): Delete.
13206         (null_file_write_async_safe): Delete.
13207         (ui_file::vprintf): New.
13208         (null_file_delete): Delete.
13209         (null_file::write): New.
13210         (null_file_fseek): Delete.
13211         (null_file::puts): New.
13212         (ui_file_data): Delete.
13213         (null_file::write_async_safe): New.
13214         (gdb_flush, ui_file_isatty): Adjust.
13215         (ui_file_put, ui_file_rewind): Delete.
13216         (ui_file_write): Adjust.
13217         (ui_file_write_for_put): Delete.
13218         (ui_file_write_async_safe, ui_file_read): Adjust.
13219         (ui_file_fseek): Delete.
13220         (fputs_unfiltered): Adjust.
13221         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
13222         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
13223         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
13224         (set_ui_file_data): Delete.
13225         (string_file::~string_file, string_file::write)
13226         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
13227         (do_ui_file_as_string, ui_file_as_string): Delete.
13228         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
13229         (struct mem_file): Delete.
13230         (mem_file_new): Delete.
13231         (stdio_file::stdio_file): New.
13232         (mem_file_delete): Delete.
13233         (stdio_file::stdio_file): New.
13234         (mem_fileopen): Delete.
13235         (stdio_file::~stdio_file): New.
13236         (mem_file_rewind): Delete.
13237         (stdio_file::set_stream): New.
13238         (mem_file_put): Delete.
13239         (stdio_file::open): New.
13240         (mem_file_write): Delete.
13241         (stdio_file_magic, struct stdio_file): Delete.
13242         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
13243         (stdio_file::flush): New.
13244         (stdio_file_read): Rename to ...
13245         (stdio_file::read): ... this.  Adjust.
13246         (stdio_file_write): Rename to ...
13247         (stdio_file::write): ... this.  Adjust.
13248         (stdio_file_write_async_safe): Rename to ...
13249         (stdio_file::write_async_safe) ... this.  Adjust.
13250         (stdio_file_fputs): Rename to ...
13251         (stdio_file::puts) ... this.  Adjust.
13252         (stdio_file_isatty): Delete.
13253         (stdio_file_fseek): Delete.
13254         (stdio_file::isatty): New.
13255         (stderr_file_write): Rename to ...
13256         (stderr_file::write) ... this.  Adjust.
13257         (stderr_file_fputs): Rename to ...
13258         (stderr_file::puts) ... this.  Adjust.
13259         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
13260         (stderr_file::stderr_file): New.
13261         (tee_file_magic): Delete.
13262         (struct tee_file): Delete.
13263         (tee_file::tee_file): New.
13264         (tee_file_new): Delete.
13265         (tee_file::~tee_file): New.
13266         (tee_file_delete): Delete.
13267         (tee_file_flush): Rename to ...
13268         (tee_file::flush): ... this.  Adjust.
13269         (tee_file_write): Rename to ...
13270         (tee_file::write): ... this.  Adjust.
13271         (tee_file::write_async_safe): New.
13272         (tee_file_fputs): Rename to ...
13273         (tee_file::puts): ... this.  Adjust.
13274         (tee_file_isatty): Rename to ...
13275         (tee_file::isatty): ... this.  Adjust.
13276         * ui-file.h (struct obstack, struct ui_file): Don't
13277         forward-declare.
13278         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
13279         (ui_file_write_ftype)
13280         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
13281         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
13282         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
13283         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
13284         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
13285         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
13286         (set_ui_file_fseek): Delete.
13287         (ui_file_data, ui_file_delete, ui_file_rewind)
13288         (struct ui_file): New.
13289         (ui_file_up): New.
13290         (class null_file): New.
13291         (null_stream): Declare.
13292         (ui_file_write_for_put, ui_file_put): Delete.
13293         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
13294         Delete.
13295         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
13296         (gdb_fopen, tee_file_new): Delete.
13297         (struct string_file): New.
13298         (struct stdio_file): New.
13299         (stdio_file_up): New.
13300         (struct stderr_file): New.
13301         (class tee_file): New.
13302         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
13303         of a 'ui_file *'.  Adjust.
13304         * ui-out.h (class ui_out) <field_stream>: Likewise.
13305         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
13306         (null_stream): Delete.
13307         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
13308         Adjust.
13309         * utils.h (struct ui_file): Delete forward declaration..
13310         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
13311         (error_stream): Take a 'string_file &' instead of a
13312         'ui_file *'.
13313         * varobj.c (varobj_value_get_print_value): Use string_file.
13314         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
13315         * gdbarch.c: Regenerate.
13316
13317 2017-02-02  Pedro Alves  <palves@redhat.com>
13318
13319         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
13320         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
13321         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
13322         Adjust to call gdb_print_insn instead of
13323         gdb_disassembler::print_insn.
13324         (dump_insns, do_mixed_source_and_assembly_deprecated)
13325         (do_mixed_source_and_assembly, do_assembly_only): Add back a
13326         'gdbarch' parameter.  Remove gdb_disassembler parameter.
13327         (gdb_disassembly): Don't allocate a gdb_disassembler here.
13328         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
13329         declaration.
13330         (gdb_pretty_print_insn): Re-add declaration.
13331         * record-btrace.c (btrace_insn_history): Don't allocate a
13332         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
13333
13334 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
13335
13336         * disasm.h (gdb_disassembly): Remove file_string parameter.
13337         * disasm.c (gdb_disassembly): Likewise.
13338         * cli/cli-cmds.c (print_disassembly): Adapt.
13339         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
13340         * stack.c (do_gdb_disassembly): Likewise.
13341
13342 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13343
13344         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
13345         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
13346         targets.  And if the implicit value is longer than needed, extract
13347         the first bytes instead of the "least significant" ones.
13348
13349 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13350
13351         * btrace.c (btrace_enable): Do not call btrace_add_pc for
13352         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
13353         (btrace_fetch): Assert can_access_registers_ptid.
13354         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
13355         validate_registers_access.
13356
13357 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13358
13359         * gdbthread.h (can_access_registers_ptid): New.
13360         * thread.c (can_access_registers_ptid): New.
13361
13362 2017-02-01  Pedro Alves  <palves@redhat.com>
13363
13364         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
13365
13366 2017-01-31  Pedro Alves  <palves@redhat.com>
13367
13368         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
13369         Fix typos.
13370
13371 2017-01-31  Pedro Alves  <palves@redhat.com>
13372
13373         * stack.c (print_frame_args): Remove local mem_fileopen stream,
13374         not used.
13375
13376 2017-01-31  Pedro Alves  <palves@redhat.com>
13377
13378         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
13379
13380 2017-01-31  Pedro Alves  <palves@redhat.com>
13381
13382         * common/scoped_restore.h
13383         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
13384         change the value's parameter type to T2.
13385         (make_scoped_restore): Likewise.
13386
13387 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13388             Richard Henderson  <rth@redhat.com>
13389
13390         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
13391         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
13392         GS_BASE for older kernels.
13393         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
13394         GS_BASE for older kernels.
13395         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
13396         and GS_BASE to the offset table.
13397         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
13398         system register group.
13399         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
13400         for older kernels.
13401         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
13402         amd64 ABI.
13403         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
13404         AMD64_GSBASE_REGNUM.
13405         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
13406         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
13407         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
13408         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
13409         i386/64bit-segments.xml in those rules.
13410         * features/i386/64bit-segments.xml: New file.
13411         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
13412         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
13413         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
13414         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
13415         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
13416         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
13417         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
13418         * features/i386/amd64-avx-linux.c: Regenerated.
13419         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
13420         * features/i386/amd64-avx-mpx.c: Regenerated.
13421         * features/i386/amd64-avx512-linux.c: Regenerated.
13422         * features/i386/amd64-linux.c: Regenerated.
13423         * features/i386/amd64-mpx-linux.c: Regenerated.
13424         * features/i386/i386-avx-mpx-linux.c: Regenerated.
13425         * features/i386/i386-avx-mpx.c: Regenerated.
13426         * features/i386/x32-avx-linux.c: Regenerated.
13427         * features/i386/x32-avx512-linux.c: Regenerated.
13428         * regformats/i386/amd64-avx-linux.dat: Regenerated.
13429         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
13430         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
13431         * regformats/i386/amd64-linux.dat: Regenerated.
13432         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
13433         * regformats/i386/x32-avx-linux.dat: Regenerated.
13434         * regformats/i386/x32-avx512-linux.dat: Regenerated.
13435         * regformats/i386/x32-linux.dat: Regenerated.
13436
13437 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13438
13439         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
13440         Set to AMD64_NUM_REGS.
13441
13442 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13443
13444         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
13445         that checks validity of a register number.
13446
13447 2017-01-27  Kees Cook  <keescook@google.com>
13448
13449         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
13450         fetch_fpregs if target has fpa registers.
13451         (arm_linux_store_inferior_registers): Call store_fpregs if target
13452         has fpa registers.
13453
13454 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13455
13456         * cris-tdep.c (cris_gdbarch_init): Remove check for
13457         info.byte_order and force it to BFD_ENDIAN_LITTLE.
13458
13459 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
13460
13461         * corelow.c (get_core_register_section): Check for regset
13462         existence before checking for REGSET_VARIABLE_SIZE.
13463
13464 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13465             Pedro Alves  <palves@redhat.com>
13466
13467         PR gdb/20939
13468         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
13469         call memory_error, save memaddr instead.
13470         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
13471         negative, cal memory_error.
13472         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
13473
13474 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13475
13476         * disasm-selftests.c (memory_error_test): New function.
13477         (_initialize_disasm_selftests): Register memory_error_test.
13478
13479 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13480
13481         * Makefile.in (SFILES): Add disasm-selftests.c and
13482         selftest-arch.c.
13483         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
13484         * disasm-selftests.c: New file.
13485         * selftest-arch.c: New file.
13486         * selftest-arch.h: New file.
13487
13488 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13489
13490         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
13491         to bfd_arch_mep.  Don't return 0 if section is not
13492         found.  Call print_insn_mep.
13493
13494 2017-01-26  Pedro Alves  <palves@redhat.com>
13495             Yao Qi  <yao.qi@linaro.org>
13496
13497         * arm-tdep.c: Include "disasm.h".
13498         (gdb_print_insn_arm): Update code to get gdbarch.
13499         * disasm.c (dis_asm_read_memory): Change it to
13500         gdb_disassembler::dis_asm_read_memory.
13501         (dis_asm_memory_error): Likewise.
13502         (dis_asm_print_address): Likewise.
13503         (gdb_pretty_print_insn): Change it to
13504         gdb_disassembler::pretty_print_insn.
13505         (dump_insns): Add one argument gdb_disassemlber.  All
13506         callers updated.
13507         (do_mixed_source_and_assembly_deprecated): Likewise.
13508         (do_mixed_source_and_assembly): Likewise.
13509         (do_assembly_only): Likewise.
13510         (gdb_disassembler::gdb_disassembler): New.
13511         (gdb_disassembler::print_insn): New.
13512         * disasm.h (class gdb_disassembler): New.
13513         (gdb_pretty_print_insn): Remove declaration.
13514         (gdb_disassemble_info): Likewise.
13515         * guile/scm-disasm.c (class gdbscm_disassembler): New.
13516         (gdbscm_disasm_read_memory_worker): Update.
13517         (gdbscm_disasm_read_memory): Update.
13518         (gdbscm_disasm_memory_error): Remove.
13519         (gdbscm_disasm_print_address): Remove.
13520         (gdbscm_disassembler::gdbscm_disassembler): New.
13521         (gdbscm_print_insn_from_port): Update.
13522         * mips-tdep.c: Include disasm.h.
13523         (gdb_print_insn_mips): Update code to get gdbarch.
13524         * record-btrace.c (btrace_insn_history): Update.
13525         * spu-tdep.c: Include disasm.h.
13526         (struct spu_dis_asm_data): Remove.
13527         (struct spu_dis_asm_info): New.
13528         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
13529         SPU id.
13530         (gdb_print_insn_spu): Cast disassemble_info to
13531         spu_dis_asm_info.
13532
13533 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13534
13535         * disasm.c (do_ui_file_delete): Delete.
13536         (gdb_insn_length): Move code creating stream to ...
13537         * utils.c (null_stream): ... here.  New function.
13538         * utils.h (null_stream): Declare.
13539
13540 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
13541
13542         * python/py-inferior.c (find_thread_object): Return directly
13543         from the loop.  Remove "found" variable.
13544
13545 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
13546
13547         GDB 7.12.1 released.
13548
13549 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
13550
13551         * python/py-function.c (fnpy_call): Reorder declarations to have
13552         the gdbpy_enter object declared first.
13553         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
13554
13555 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
13556
13557         PR python/21068
13558         * python/python-internal.h (PyMem_RawMalloc): Define for
13559         Python < 3.4.
13560         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
13561         PyMem_RawMalloc instead of PyMem_Malloc.
13562
13563 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
13564             Luis Machado  <lgustavo@codesourcery.com>
13565
13566         * NEWS (New commands): Mention flash-erase.
13567         (New MI commands): Mention target-flash-erase.
13568         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
13569         command.
13570         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
13571         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
13572         * target.c (flash_erase_command): New function.
13573         (initialize_targets): Add new flash-erase command.
13574         * target.h (flash_erase_command): New declaration.
13575
13576 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
13577
13578         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
13579         HAVE_SYS_PROCFS_H is defined.
13580
13581 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
13582
13583         * remote.c (struct cached_reg): Change data into a pointer.
13584         * (stop_reply_dtr): Free data pointers before deleting vector.
13585         (process_stop_reply): Likewise.
13586         (remote_parse_stop_reply): Allocate space for data
13587
13588 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
13589
13590         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
13591         MAX_REGISTER_SIZE.
13592         (amd64_pseudo_register_read_value): Likewise.
13593         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
13594         (store_register_using_P): Likewise.
13595         * regcache.c (regcache_xfer_part): Likewise.
13596
13597 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
13598
13599         Split real and pseudo registers.
13600         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
13601         (sparc32_pseudo_regnum): New enum.
13602         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
13603         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
13604         (SPARC32_CP0_REGISTERS): New macro.
13605         (sparc32_pseudo_register_name): New function.
13606         (sparc32_register_name): Use sparc32_pseudo_register_name.
13607         (sparc32_pseudo_register_type): New function.
13608         (sparc32_register_type): Use sparc32_pseudo_register_type.
13609         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
13610         pseudo register numbers.
13611         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
13612         (SPARC64_CP0_REGISTERS): New macro.
13613         (sparc64_pseudo_register_name): New function.
13614         (sparc64_register_name): Use sparc64_pseudo_register_name.
13615         (sparc64_pseudo_register_type): New function.
13616         (sparc64_register_type): Use sparc64_pseudo_register_type.
13617         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
13618         pseudo register numbers.
13619         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
13620         sparc64_store_arguments): Handle pseudo register numbers.
13621
13622 2017-01-13  Yao Qi  <yao.qi@linaro.org>
13623
13624         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
13625         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
13626         output.
13627         (getpkt_or_notif_sane_1): Likewise.
13628
13629 2017-01-13  Yao Qi  <yao.qi@linaro.org>
13630
13631         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
13632         of CC.  Pass "-x c++-header" instead of "-x c".
13633
13634 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13635
13636         * remote.c (remote_can_async_p): Update comment.
13637
13638 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13639
13640         * linux-nat.c (linux_nat_can_async_p): Update comment.
13641
13642 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13643
13644         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
13645
13646 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
13647
13648         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
13649
13650 2017-01-10  Tom Tromey  <tom@tromey.com>
13651
13652         * python/py-type.c (typy_legacy_template_argument): Update.
13653         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
13654         ~demangle_parse_info): Declare new members.
13655         (cp_demangled_name_to_comp): Return unique_ptr.
13656         (cp_demangled_name_parse_free)
13657         (make_cleanup_cp_demangled_name_parse_free)
13658         (cp_new_demangle_parse_info): Remove.
13659         * cp-support.c (do_demangled_name_parse_free_cleanup)
13660         (make_cleanup_cp_demangled_name_parse_free): Remove.
13661         (inspect_type, cp_canonicalize_string_full)
13662         (cp_canonicalize_string): Update.
13663         (mangled_name_to_comp): Change return type.
13664         (cp_class_name_from_physname, method_name_from_physname)
13665         (cp_func_name, cp_remove_params): Update.
13666         * cp-name-parser.y (demangle_parse_info): New constructor, from
13667         cp_new_demangle_parse_info.
13668         (~demangle_parse_info): New destructor, from
13669         cp_demangled_name_parse_free.
13670         (cp_merge_demangle_parse_infos): Update.
13671         (cp_demangled_name_to_comp): Change return type.
13672
13673 2017-01-10  Tom Tromey  <tom@tromey.com>
13674
13675         * top.c (prevent_dont_repeat): Change return type.
13676         * python/python.c (execute_gdb_command): Use std::string.
13677         Update.
13678         * guile/guile.c (gdbscm_execute_gdb_command): Update.
13679         * command.h (prevent_dont_repeat): Change return type.
13680         * breakpoint.c (bpstat_do_actions_1): Update.
13681
13682 2017-01-10  Tom Tromey  <tom@tromey.com>
13683
13684         * value.h (scoped_value_mark::~scoped_value_mark): Call
13685         free_to_mark.
13686         (scoped_value_mark::free_to_mark): New method.
13687         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
13688         scoped_value_mark.
13689
13690 2017-01-10  Tom Tromey  <tom@tromey.com>
13691
13692         * python/py-value.c (valpy_dereference, valpy_referenced_value)
13693         (valpy_reference_value, valpy_const_value, valpy_get_address)
13694         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
13695         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
13696         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
13697         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
13698         scoped_value_mark.
13699         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
13700         * value.h (scoped_value_mark): New class.
13701
13702 2017-01-10  Tom Tromey  <tom@tromey.com>
13703
13704         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
13705         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
13706         * psymtab.c (discard_psymtabs_upto): Remove.
13707         (make_cleanup_discard_psymtabs): Remove.
13708         (struct psymtab_state): Remove.
13709
13710 2017-01-10  Tom Tromey  <tom@tromey.com>
13711
13712         * record-full.c (record_full_save_cleanups): Remove.
13713         (record_full_save): Use gdb::unlinker.
13714         * gcore.c (do_bfd_delete_cleanup): Remove.
13715         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
13716         cleanups.
13717         * dwarf2read.c (unlink_if_set): Remove.
13718         (write_psymtabs_to_index): Use gdb::unlinker.
13719         * common/gdb_unlinker.h: New file.
13720
13721 2017-01-10  Tom Tromey  <tom@tromey.com>
13722
13723         * windows-tdep.c (windows_xfer_shared_library): Update.
13724         * windows-nat.c (windows_make_so): Update.
13725         * utils.h (make_cleanup_bfd_unref): Remove.
13726         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
13727         * symfile.h (symfile_bfd_open)
13728         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
13729         * symfile.c (read_symbols, symbol_file_add)
13730         (separate_debug_file_exists): Update.
13731         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
13732         (generic_load, reread_symbols): Update.
13733         * symfile-mem.c (symbol_file_add_from_memory): Update.
13734         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
13735         (spu_symbol_file_add_from_memory): Update.
13736         * solist.h (struct target_so_ops) <bfd_open>: Return
13737         gdb_bfd_ref_ptr.
13738         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
13739         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
13740         gdb_bfd_ref_ptr.
13741         (solib_map_sections, reload_shared_libraries_1): Update.
13742         * solib-svr4.c (enable_break): Update.
13743         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
13744         * solib-frv.c (enable_break2): Update.
13745         * solib-dsbt.c (enable_break): Update.
13746         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
13747         gdb_bfd_ref_ptr.
13748         (darwin_solib_get_all_image_info_addr_at_init): Update.
13749         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
13750         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
13751         * record-full.c (record_full_save): Update.
13752         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
13753         * procfs.c (insert_dbx_link_bpt_in_file): Update.
13754         * minidebug.c (find_separate_debug_file_in_section): Return
13755         gdb_bfd_ref_ptr.
13756         * machoread.c (macho_add_oso_symfile): Change abfd to
13757         gdb_bfd_ref_ptr.
13758         (macho_symfile_read_all_oso): Update.
13759         (macho_check_dsym): Return gdb_bfd_ref_ptr.
13760         (macho_symfile_read): Update.
13761         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
13762         (jit_bfd_try_read_symtab): Update.
13763         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13764         (gdb_bfd_openw, gdb_bfd_openr_iovec)
13765         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13766         gdb_bfd_ref_ptr.
13767         (gdb_bfd_ref_policy): New struct.
13768         (gdb_bfd_ref_ptr): New typedef.
13769         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13770         (gdb_bfd_openw, gdb_bfd_openr_iovec)
13771         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13772         gdb_bfd_ref_ptr.
13773         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13774         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13775         (gcore_command): Update.
13776         * exec.c (exec_file_attach): Update.
13777         * elfread.c (elf_symfile_read): Update.
13778         * dwarf2read.c (dwarf2_get_dwz_file): Update.
13779         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
13780         (open_and_init_dwo_file): Update.
13781         (open_dwp_file): Return gdb_bfd_ref_ptr.
13782         (open_and_init_dwp_file): Update.
13783         * corelow.c (core_open): Update.
13784         * compile/compile-object-load.c (compile_object_load): Update.
13785         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
13786         * coffread.c (coff_symfile_read): Update.
13787         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
13788         gdb_bfd_ref_ptr.  Rename.
13789         (dump_bfd_file, restore_command): Update.
13790         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13791         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13792         (find_separate_debug_file_by_buildid): Update.
13793
13794 2017-01-10  Tom Tromey  <tom@tromey.com>
13795
13796         * common/gdb_ref_ptr.h: New file.
13797         * python/py-ref.h (struct gdbpy_ref_policy): New.
13798         (gdbpy_ref): Now a typedef.
13799
13800 2017-01-10  Tom Tromey  <tom@tromey.com>
13801
13802         * utils.h (make_cleanup_htab_delete): Don't declare.
13803         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
13804         Remove.
13805         * linespec.c (decode_compound_collector): Add constructor,
13806         destructor.
13807         (lookup_prefix_sym): Remove cleanup.
13808         (symtab_collector): Add constructor, destructor.
13809         (collect_symtabs_from_filename): Remove cleanup.
13810         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
13811         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
13812         Use htab_up.
13813         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
13814         * dwarf2read.c (dw2_expand_symtabs_matching)
13815         (dw2_map_symbol_filenames, dwarf_decode_macros)
13816         (write_psymtabs_to_index): Use htab_up.
13817         * dwarf2loc.c (func_verify_no_selftailcall)
13818         (call_site_find_chain_1, func_verify_no_selftailcall)
13819         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
13820         std::vector, gdb::unique_xmalloc_ptr.
13821         (call_sitep): Remove typedef.
13822         (dwarf2_locexpr_baton_eval): Remove unused variable.
13823
13824 2017-01-10  Tom Tromey  <tom@tromey.com>
13825
13826         * python/python-internal.h (make_cleanup_py_decref)
13827         (make_cleanup_py_xdecref): Don't declare.
13828         * python/py-utils.c (py_decref, make_cleanup_py_decref)
13829         (py_xdecref, make_cleanup_py_xdecref): Remove.
13830
13831 2017-01-10  Tom Tromey  <tom@tromey.com>
13832
13833         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
13834         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
13835
13836 2017-01-10  Tom Tromey  <tom@tromey.com>
13837
13838         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
13839
13840 2017-01-10  Tom Tromey  <tom@tromey.com>
13841
13842         * python/py-utils.c (unicode_to_encoded_string)
13843         (python_string_to_target_string)
13844         (python_string_to_target_python_string)
13845         (python_string_to_host_string, gdbpy_obj_to_string)
13846         (get_addr_from_python): Use gdbpy_ref.
13847
13848 2017-01-10  Tom Tromey  <tom@tromey.com>
13849
13850         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
13851         gdbpy_ref.
13852
13853 2017-01-10  Tom Tromey  <tom@tromey.com>
13854
13855         * python/python.c (eval_python_command, gdbpy_decode_line)
13856         (gdbpy_run_events, gdbpy_start_type_printers)
13857         (gdbpy_apply_type_printers): Use gdbpy_ref.
13858
13859 2017-01-10  Tom Tromey  <tom@tromey.com>
13860
13861         * python/py-param.c (get_doc_string, compute_enum_values): Use
13862         gdbpy_ref.
13863
13864 2017-01-10  Tom Tromey  <tom@tromey.com>
13865
13866         * python/py-inferior.c (find_thread_object, build_inferior_list):
13867         Use gdbpy_ref.
13868
13869 2017-01-10  Tom Tromey  <tom@tromey.com>
13870
13871         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13872
13873 2017-01-10  Tom Tromey  <tom@tromey.com>
13874
13875         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
13876         gdbpy_ref.
13877
13878 2017-01-10  Tom Tromey  <tom@tromey.com>
13879
13880         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
13881         extra incref.
13882         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
13883         Use gdbpy_ref.
13884
13885 2017-01-10  Tom Tromey  <tom@tromey.com>
13886
13887         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
13888         gdbpy_ref.
13889
13890 2017-01-10  Tom Tromey  <tom@tromey.com>
13891
13892         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
13893         decref results of PyArg_ParseTupleAndKeywords.
13894
13895 2017-01-10  Tom Tromey  <tom@tromey.com>
13896
13897         * python/python.c (python_run_simple_file): Use
13898         unique_xmalloc_ptr, gdbpy_ref.
13899
13900 2017-01-10  Tom Tromey  <tom@tromey.com>
13901
13902         * python/py-prettyprint.c (print_stack_unless_memory_error)
13903         (print_string_repr, print_children): Use gdbpy_ref.
13904         (dummy_python_frame): New class.
13905         (dummy_python_frame::dummy_python_frame): Rename from
13906         push_dummy_python_frame.
13907         (py_restore_tstate): Remove.
13908
13909 2017-01-10  Tom Tromey  <tom@tromey.com>
13910
13911         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13912
13913 2017-01-10  Tom Tromey  <tom@tromey.com>
13914
13915         * python/python.c (ensure_python_env, restore_python_env):
13916         Remove.
13917         * python/python-internal.h (ensure_python_env): Don't declare.
13918         * varobj.h (varobj_ensure_python_env): Don't declare.
13919         * varobj.c (varobj_ensure_python_env): Remove.
13920
13921 2017-01-10  Tom Tromey  <tom@tromey.com>
13922
13923         * varobj.c (varobj_value_get_print_value): Use
13924         gdbpy_enter_varobj.
13925
13926 2017-01-10  Tom Tromey  <tom@tromey.com>
13927
13928         * python/py-prettyprint.c (print_string_repr, print_children):
13929         Update.
13930         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
13931         of "encoding".
13932         * varobj.c (varobj_value_get_print_value): Update.
13933         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
13934
13935 2017-01-10  Tom Tromey  <tom@tromey.com>
13936
13937         * varobj.c (varobj_get_display_hint)
13938         (dynamic_varobj_has_child_method, install_new_value_visualizer)
13939         (varobj_set_visualizer, free_variable): Use
13940         gdbpy_enter_varobj.
13941
13942 2017-01-10  Tom Tromey  <tom@tromey.com>
13943
13944         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
13945         (do_finish_initialization): New function.  Use gdbpy_ref.
13946         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
13947         do_finish_initialization.
13948
13949 2017-01-10  Tom Tromey  <tom@tromey.com>
13950
13951         * python/py-param.c (get_set_value, get_show_value): Use
13952         gdbpy_enter, gdbpy_ref.
13953
13954 2017-01-10  Tom Tromey  <tom@tromey.com>
13955
13956         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
13957
13958 2017-01-10  Tom Tromey  <tom@tromey.com>
13959
13960         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
13961
13962 2017-01-10  Tom Tromey  <tom@tromey.com>
13963
13964         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
13965         Use gdbpy_enter_varobj.
13966
13967 2017-01-10  Tom Tromey  <tom@tromey.com>
13968
13969         * varobj.c (gdbpy_enter_varobj): New constructor.
13970         * python/python-internal.h (gdbpy_enter_varobj): New class.
13971         * python/py-varobj.c (py_varobj_get_iterator): Use
13972         gdbpy_enter_varobj.
13973
13974 2017-01-10  Tom Tromey  <tom@tromey.com>
13975
13976         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
13977         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
13978         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
13979         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
13980         unique_xmalloc_ptr.
13981         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
13982
13983 2017-01-10  Tom Tromey  <tom@tromey.com>
13984
13985         * python/py-xmethods.c (invoke_match_method): Use
13986         gdbpy_ref.
13987
13988 2017-01-10  Tom Tromey  <tom@tromey.com>
13989
13990         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
13991         gdbpy_enter, gdbpy_ref.
13992
13993 2017-01-10  Tom Tromey  <tom@tromey.com>
13994
13995         * python/python.c (python_interactive_command): Use gdbpy_enter.
13996
13997 2017-01-10  Tom Tromey  <tom@tromey.com>
13998
13999         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
14000         gdbpy_ref.
14001
14002 2017-01-10  Tom Tromey  <tom@tromey.com>
14003
14004         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
14005         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14006
14007 2017-01-10  Tom Tromey  <tom@tromey.com>
14008
14009         * utils.h (htab_deleter): New struct.
14010         (htab_up): New typedef.
14011         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
14012         gdbpy_enter, gdbpy_ref, htab_up.
14013
14014 2017-01-10  Tom Tromey  <tom@tromey.com>
14015
14016         * python/py-unwind.c (pending_frame_invalidate): Remove.
14017         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
14018
14019 2017-01-10  Tom Tromey  <tom@tromey.com>
14020
14021         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
14022         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
14023
14024 2017-01-10  Tom Tromey  <tom@tromey.com>
14025
14026         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
14027
14028 2017-01-10  Tom Tromey  <tom@tromey.com>
14029
14030         * python/python.c (gdbpy_eval_from_control_command)
14031         (gdbpy_source_script, gdbpy_run_events)
14032         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
14033         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
14034         gdbpy_enter.
14035
14036 2017-01-10  Tom Tromey  <tom@tromey.com>
14037
14038         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
14039
14040 2017-01-10  Tom Tromey  <tom@tromey.com>
14041
14042         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
14043
14044 2017-01-10  Tom Tromey  <tom@tromey.com>
14045
14046         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
14047         (python_on_inferior_call_pre, python_on_inferior_call_post)
14048         (python_on_memory_change, python_on_register_change)
14049         (python_inferior_exit, python_new_objfile, add_thread_object)
14050         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
14051
14052 2017-01-10  Tom Tromey  <tom@tromey.com>
14053
14054         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
14055         (bpfinishpy_handle_exit): Use gdbpy_enter.
14056
14057 2017-01-10  Tom Tromey  <tom@tromey.com>
14058
14059         * python/py-cmd.c (cmdpy_destroyer)
14060         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
14061         gdbpy_enter.
14062
14063 2017-01-10  Tom Tromey  <tom@tromey.com>
14064
14065         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14066         gdbpy_enter.
14067         (gdbpy_breakpoint_has_cond): Likewise.
14068
14069 2017-01-10  Tom Tromey  <tom@tromey.com>
14070
14071         * python/python.c (gdbpy_enter): New constructor.
14072         (~gdbpy_enter): New destructor.
14073         (restore_python_env, ensure_python_env): Rewrite.
14074         * python/python-internal.h (gdbpy_enter): New class.
14075
14076 2017-01-10  Tom Tromey  <tom@tromey.com>
14077
14078         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
14079
14080 2017-01-10  Tom Tromey  <tom@tromey.com>
14081
14082         * python/py-value.c (value_has_field, get_field_flag)
14083         (get_field_type, valpy_getitem, convert_value_from_python): Use
14084         gdbpy_ref.
14085
14086 2017-01-10  Tom Tromey  <tom@tromey.com>
14087
14088         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
14089         gdbpy_ref.
14090
14091 2017-01-10  Tom Tromey  <tom@tromey.com>
14092
14093         * python/py-prettyprint.c (search_pp_list)
14094         (find_pretty_printer_from_objfiles)
14095         (find_pretty_printer_from_progspace)
14096         (find_pretty_printer_from_gdb, find_pretty_printer)
14097         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
14098         gdbpy_ref.
14099
14100 2017-01-10  Tom Tromey  <tom@tromey.com>
14101
14102         * python/py-param.c (call_doc_function): Use gdbpy_ref.
14103
14104 2017-01-10  Tom Tromey  <tom@tromey.com>
14105
14106         * python/py-linetable.c (build_line_table_tuple_from_pcs)
14107         (ltpy_get_all_source_lines): Use gdbpy_ref.
14108
14109 2017-01-10  Tom Tromey  <tom@tromey.com>
14110
14111         * python/py-framefilter.c (extract_sym, extract_value)
14112         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
14113         gdbpy_ref.
14114
14115 2017-01-10  Tom Tromey  <tom@tromey.com>
14116
14117         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
14118
14119 2017-01-10  Tom Tromey  <tom@tromey.com>
14120
14121         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
14122
14123 2017-01-10  Tom Tromey  <tom@tromey.com>
14124
14125         * python/py-function.c (convert_values_to_python, fnpy_init): Use
14126         gdbpy_ref.
14127
14128 2017-01-10  Tom Tromey  <tom@tromey.com>
14129
14130         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
14131
14132 2017-01-10  Tom Tromey  <tom@tromey.com>
14133
14134         * python/py-type.c (convert_field, make_fielditem, typy_fields)
14135         (typy_range): Use gdbpy_ref.
14136
14137 2017-01-10  Tom Tromey  <tom@tromey.com>
14138
14139         * python/py-threadevent.c (create_thread_event_object): Use
14140         gdbpy_ref.
14141         * python/py-stopevent.c (create_stop_event_object): Simplify.
14142         (emit_stop_event): Use gdbpy_ref.
14143         * python/py-signalevent.c (create_signal_event_object): Use
14144         gdbpy_ref.
14145         * python/py-newobjfileevent.c (create_new_objfile_event_object)
14146         (emit_new_objfile_event, create_clear_objfiles_event_object)
14147         (emit_clear_objfiles_event): Use gdbpy_ref.
14148         * python/py-infevents.c (create_inferior_call_event_object)
14149         (create_register_changed_event_object)
14150         (create_memory_changed_event_object, emit_inferior_call_event)
14151         (emit_memory_changed_event, emit_register_changed_event): Use
14152         gdbpy_ref.
14153         * python/py-exitedevent.c (create_exited_event_object)
14154         (emit_exited_event): Use gdbpy_ref.
14155         * python/py-event.h (evpy_emit_event): Remove
14156         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
14157         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
14158         * python/py-continueevent.c (emit_continue_event): Use
14159         gdbpy_ref.
14160         * python/py-breakpoint.c (gdbpy_breakpoint_created)
14161         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
14162         gdbpy_ref.
14163         * python/py-bpevent.c (create_breakpoint_event_object): Use
14164         gdbpy_ref.
14165
14166 2017-01-10  Tom Tromey  <tom@tromey.com>
14167
14168         * python/py-ref.h: New file.
14169
14170 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
14171
14172         * cli-out.c (cli_ui_out::do_redirect): Change return type to
14173         void.
14174         * cli-out.h (cli_ui_out::do_redirect): Likewise.
14175         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
14176         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
14177         * ui-out.c (ui_out::redirect): Likewise.
14178         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
14179         * cli/cli-logging.c (set_logging_redirect): Update call site of
14180         ui_out::redirect.
14181         (handle_redirections): Likewise.
14182         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
14183         * top.c (execute_command_to_string): Likewise.
14184         * utils.c (do_ui_out_redirect_pop): Likewise.
14185
14186 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
14187
14188         * stack.c (_initialize_stack): Update "frame" command help message.
14189
14190 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
14191
14192         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
14193
14194 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14195
14196         * x86-linux-nat.h: Include gdb_proc_service.h.
14197
14198 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14199
14200         * ser-base.h: Include serial.h.
14201
14202 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14203
14204         * ppc-linux-tdep.h: Include ppc-tdep.h.
14205
14206 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14207
14208         * nat/amd64-linux-siginfo.h: Include signal.h.
14209
14210 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14211
14212         * nat/aarch64-linux-hw-point.h: Include break-common.h.
14213
14214 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14215
14216         * mi/mi-parse.h: Include mi-cmds.h.
14217
14218 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14219
14220         * inf-loop.c: Don't include "target.h".
14221         * inf-loop.h: Include it here.
14222
14223 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14224
14225         * dfp.h: Include "dboulest.h" and "expression.h".
14226
14227 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14228
14229         * ax-gdb.h: Include "ax.h".
14230
14231 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14232
14233         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
14234         with nat/gdb_ptrace.h.
14235
14236 2017-01-05  Yao Qi  <yao.qi@linaro.org>
14237
14238         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
14239         new line.
14240         (mips64_fbsd_sigframe_init): Likewise.
14241
14242 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14243
14244         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
14245         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
14246
14247 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14248
14249         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
14250         * NEWS: Mention new FreeBSD/mips native configuration.
14251         * config/mips/fbsd.mh: New file.
14252         * configure.host: Add mips*-*-freebsd*.
14253         * mips-fbsd-nat.c: New file.
14254
14255 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14256
14257         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
14258         (ALLDEPFILES): Add mips-fbsd-tdep.c.
14259         * NEWS: Mention new FreeBSD/mips target.
14260         * configure.tgt: Add mips*-*-freebsd*.
14261         * mips-fbsd-tdep.c: New file.
14262         * mips-fbsd-tdep.h: New file.
14263
14264 2017-01-04  Yao Qi  <yao.qi@linaro.org>
14265
14266         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
14267         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
14268
14269 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14270
14271         Update copyright year range in all GDB files.
14272
14273 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14274
14275         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
14276
14277 For older changes see ChangeLog-2016.
14278 \f
14279 Local Variables:
14280 mode: change-log
14281 left-margin: 8
14282 fill-column: 74
14283 version-control: never
14284 coding: utf-8
14285 End: